haikuwebkit/Source/JavaScriptCore/b3/air
Yijia Huang db38994b9d [ARM64] Clean up and fix Pre/Post-Indexed Address Mode to Air for ARM64 (Load Instruction)
https://bugs.webkit.org/show_bug.cgi?id=228890

Reviewed by Keith Miller.

This patch cleans up and does minor fix to the previous patch (https://bugs.webkit.org/show_bug.cgi?id=228047).

For the modifications in b3/B3Generate.cpp and b3/B3CanonicalizePrePostIncrements.cpp, we
need to convert post-index candidates to the canonical form. So, the address value needs to
be moved immediately before the load. This is subject to the dominance constraints that add
must be controlled equivalent to the load. So, similarly, if we need to move the offset to
just before the load, the dominance constraints must be satisfied. Since it is a constant
value, a better approach is to add a new constant value before the memory value. Then,
eliminate the dead code.

There is a bug in b3/B3CanonicalizePrePostIncrements.cpp. The insertionSet.execute(BasicBlock)
will reorder value indexes in the basic block. So, we should re-search for the value index in
the block every time after the execution.

In b3/B3LowerToAir.cpp, we need m_locked checks on address and base values. If they are already
locked, there is no need to convert the Load instruction to the pre/post-increment form.

* b3/B3CanonicalizePrePostIncrements.cpp:
(JSC::B3::canonicalizePrePostIncrements):
* b3/B3Generate.cpp:
(JSC::B3::generateToAir):
* b3/B3LowerToAir.cpp:
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::isValidIncrementIndexForm):
(JSC::B3::Air::Arg::isValidForm const):
(JSC::B3::Air::Arg::isValidPreIndexForm): Deleted.
(JSC::B3::Air::Arg::isValidPostIndexForm): Deleted.
* b3/air/opcode_generator.rb:


Canonical link: https://commits.webkit.org/240378@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-09 23:46:09 +00:00
..
AirAllocateRegistersAndStackAndGenerateCode.cpp Unreviewed, reverting r280609. 2021-08-04 19:24:47 +00:00
AirAllocateRegistersAndStackAndGenerateCode.h
AirAllocateRegistersAndStackByLinearScan.cpp Make AirAllocateRegistersByGraphColoring use less memory 2021-05-19 03:24:14 +00:00
AirAllocateRegistersAndStackByLinearScan.h
AirAllocateRegistersByGraphColoring.cpp GCC 11 builds should use -Wno-array-bounds, -Wno-nonnull 2021-08-05 15:27:03 +00:00
AirAllocateRegistersByGraphColoring.h
AirAllocateStackByGraphColoring.cpp AirAllocateStackByGraphColoring should use the optimized interference graphs from AirAllocateRegistersByGraphColoring 2021-05-28 02:08:19 +00:00
AirAllocateStackByGraphColoring.h
AirArg.cpp Add Pre/Post-Indexed Address Mode to Air for ARM64 2021-07-30 20:44:47 +00:00
AirArg.h [ARM64] Clean up and fix Pre/Post-Indexed Address Mode to Air for ARM64 (Load Instruction) 2021-08-09 23:46:09 +00:00
AirArgInlines.h
AirBasicBlock.cpp
AirBasicBlock.h [JSC] B3 PureCSE should ignore values which are moved to new BasicBlock 2020-07-09 06:30:53 +00:00
AirBlockInsertionSet.cpp [IWYU] Remove unnecessary includes from JSC implementation files 2020-05-15 19:39:36 +00:00
AirBlockInsertionSet.h
AirBlockWorklist.h
AirBreakCriticalEdges.cpp [IWYU] Remove unnecessary includes from JSC implementation files 2020-05-15 19:39:36 +00:00
AirBreakCriticalEdges.h
AirCCallSpecial.cpp Always use OperationPtrTag for all operations and annotate operations in CSS JIT 2020-09-30 07:19:47 +00:00
AirCCallSpecial.h [clang-tidy] Run modernize-use-override over JSC, then ensure as much as possible is final 2020-05-12 18:48:02 +00:00
AirCCallingConvention.cpp [IWYU] Remove unnecessary includes from JSC implementation files 2020-05-15 19:39:36 +00:00
AirCCallingConvention.h
AirCFG.h
AirCode.cpp Unreviewed, reverting r280609. 2021-08-04 19:24:47 +00:00
AirCode.h AirStackSlot's uint16_t byte size is too small 2021-07-22 21:37:02 +00:00
AirCustom.cpp
AirCustom.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
AirDisassembler.cpp [IWYU] Remove unnecessary includes from JSC implementation files 2020-05-15 19:39:36 +00:00
AirDisassembler.h
AirEliminateDeadCode.cpp
AirEliminateDeadCode.h
AirEmitShuffle.cpp
AirEmitShuffle.h
AirFixObviousSpills.cpp Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
AirFixObviousSpills.h
AirFixPartialRegisterStalls.cpp
AirFixPartialRegisterStalls.h
AirFixSpillsAfterTerminals.cpp [IWYU] Remove unnecessary includes from JSC implementation files 2020-05-15 19:39:36 +00:00
AirFixSpillsAfterTerminals.h
AirFormTable.h
AirFrequentedBlock.h
AirGenerate.cpp We should drop B3 values while running Air 2021-06-12 17:17:27 +00:00
AirGenerate.h
AirGenerated.cpp
AirGenerationContext.h
AirHandleCalleeSaves.cpp
AirHandleCalleeSaves.h
AirHelpers.h
AirInsertionSet.cpp
AirInsertionSet.h
AirInst.cpp [IWYU] Remove unnecessary includes from JSC implementation files 2020-05-15 19:39:36 +00:00
AirInst.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
AirInstInlines.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
AirKind.cpp
AirKind.h
AirLiveness.h
AirLivenessAdapter.h
AirLogRegisterPressure.cpp
AirLogRegisterPressure.h
AirLowerAfterRegAlloc.cpp Replace uses of black/white list with block/allow list 2020-06-11 22:47:21 +00:00
AirLowerAfterRegAlloc.h
AirLowerEntrySwitch.cpp [IWYU] Remove unnecessary includes from JSC implementation files 2020-05-15 19:39:36 +00:00
AirLowerEntrySwitch.h
AirLowerMacros.cpp [IWYU] Remove unnecessary includes from JSC implementation files 2020-05-15 19:39:36 +00:00
AirLowerMacros.h
AirLowerStackArgs.cpp Unreviewed, reverting r280609. 2021-08-04 19:24:47 +00:00
AirLowerStackArgs.h
AirOpcode.opcodes Add a new pattern to instruction selector to utilize UMULL supported by ARM64 2021-08-03 04:18:22 +00:00
AirOptimizeBlockOrder.cpp [IWYU] Remove unnecessary includes from JSC implementation files 2020-05-15 19:39:36 +00:00
AirOptimizeBlockOrder.h
AirPadInterference.cpp [IWYU] Remove unnecessary includes from JSC implementation files 2020-05-15 19:39:36 +00:00
AirPadInterference.h
AirPhaseInsertionSet.cpp
AirPhaseInsertionSet.h
AirPhaseScope.cpp
AirPhaseScope.h
AirPrintSpecial.cpp Remove ENABLE(MASM_PROBE) flag. 2021-05-23 21:46:38 +00:00
AirPrintSpecial.h Remove ENABLE(MASM_PROBE) flag. 2021-05-23 21:46:38 +00:00
AirRegLiveness.cpp
AirRegLiveness.h
AirReportUsedRegisters.cpp [IWYU] Remove unnecessary includes from JSC implementation files 2020-05-15 19:39:36 +00:00
AirReportUsedRegisters.h
AirSimplifyCFG.cpp Various compile-time boolean flags could/should be marked constexpr 2020-05-22 02:17:54 +00:00
AirSimplifyCFG.h
AirSpecial.cpp Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
AirSpecial.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
AirStackAllocation.cpp [IWYU] Remove unnecessary includes from JSC implementation files 2020-05-15 19:39:36 +00:00
AirStackAllocation.h
AirStackSlot.cpp AirStackSlot's uint16_t byte size is too small 2021-07-22 21:37:02 +00:00
AirStackSlot.h AirStackSlot's uint16_t byte size is too small 2021-07-22 21:37:02 +00:00
AirStackSlotKind.cpp
AirStackSlotKind.h
AirTmp.cpp
AirTmp.h [WTF] Remove the unnecessary inner class DefaultHash<T>::Hash 2020-07-17 00:33:37 +00:00
AirTmpInlines.h
AirTmpMap.h
AirTmpSet.h
AirTmpWidth.cpp Non unified build fixes, midsummer 2020 edition 2020-07-20 23:18:34 +00:00
AirTmpWidth.h Non unified build fixes, midsummer 2020 edition 2020-07-20 23:18:34 +00:00
AirTmpWidthInlines.h Non unified build fixes, midsummer 2020 edition 2020-07-20 23:18:34 +00:00
AirUseCounts.h Fix typo in AirUseCounts 2021-05-19 20:49:25 +00:00
AirValidate.cpp
AirValidate.h
opcode_generator.rb [ARM64] Clean up and fix Pre/Post-Indexed Address Mode to Air for ARM64 (Load Instruction) 2021-08-09 23:46:09 +00:00
testair.cpp Replace LockHolder with Locker in local variables 2021-05-22 16:49:42 +00:00