llvm-project/llvm/lib/CodeGen/SelectionDAG
Tomas Matheson a9968c0a33 [NFC][CodeGen] Tidy up TargetRegisterInfo stack realignment functions
Currently needsStackRealignment returns false if canRealignStack returns false.
This means that the behavior of needsStackRealignment does not correspond to
it's name and description; a function might need stack realignment, but if it
is not possible then this function returns false. Furthermore,
needsStackRealignment is not virtual and therefore some backends have made use
of canRealignStack to indicate whether a function needs stack realignment.

This patch attempts to clarify the situation by separating them and introducing
new names:

 - shouldRealignStack - true if there is any reason the stack should be
   realigned

 - canRealignStack - true if we are still able to realign the stack (e.g. we
   can still reserve/have reserved a frame pointer)

 - hasStackRealignment = shouldRealignStack && canRealignStack (not target
   customisable)

Targets can now override shouldRealignStack to indicate that stack realignment
is required.

This change will make it easier in a future change to handle the case where we
need to realign the stack but can't do so (for example when the register
allocator creates an aligned spill after the frame pointer has been
eliminated).

Differential Revision: https://reviews.llvm.org/D98716

Change-Id: Ib9a4d21728bf9d08a545b4365418d3ffe1af4d87
2021-03-30 17:31:39 +01:00
..
CMakeLists.txt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
DAGCombiner.cpp [SelDag] Add isIntOrFPConstant helper function. 2021-03-28 12:48:58 +01:00
FastISel.cpp [FastISel] Don't trivially kill extractvalues (PR49467) 2021-03-09 18:46:38 +01:00
FunctionLoweringInfo.cpp [NFC] Wisely nest dyn_cast in FunctionLoweringInfo 2021-03-16 10:22:44 +01:00
InstrEmitter.cpp [DebugInfo] Emit DBG_VALUE_LIST from ISel 2021-03-09 12:17:39 +00:00
InstrEmitter.h [DebugInfo] Emit DBG_VALUE_LIST from ISel 2021-03-09 12:17:39 +00:00
LegalizeDAG.cpp [SelectionDAG][AArch64][SVE] Perform SETCC condition legalization in LegalizeVectorOps 2021-03-29 15:32:25 +01:00
LegalizeFloatTypes.cpp [Legalizer] Promote result type in expanding FP_TO_XINT 2021-01-18 11:56:11 +08:00
LegalizeIntegerTypes.cpp [IR][SVE] Add new llvm.experimental.stepvector intrinsic 2021-03-23 10:43:35 +00:00
LegalizeTypes.cpp [SelectionDAG] Use range-based for loops (NFC) 2021-02-09 22:14:30 -08:00
LegalizeTypes.h [IR][SVE] Add new llvm.experimental.stepvector intrinsic 2021-03-23 10:43:35 +00:00
LegalizeTypesGeneric.cpp [CodeGen] Refactor getMemBasePlusOffset & getObjectPtrOffset to accept a TypeSize 2020-08-11 12:17:10 +01:00
LegalizeVectorOps.cpp [SelectionDAG][AArch64][SVE] Perform SETCC condition legalization in LegalizeVectorOps 2021-03-29 15:32:25 +01:00
LegalizeVectorTypes.cpp [IR][SVE] Add new llvm.experimental.stepvector intrinsic 2021-03-23 10:43:35 +00:00
ResourcePriorityQueue.cpp ResourcePriorityQueue.h - reduce unnecessary includes to forward declarations. NFC. 2020-05-26 19:22:14 +01:00
SDNodeDbgValue.h [DebugInfo] Handle dbg.values with multiple variable location operands in ISel 2021-03-09 09:48:03 +00:00
ScheduleDAGFast.cpp [DebugInstrRef] Create DBG_INSTR_REFs in SelectionDAG 2020-10-14 14:24:08 +01:00
ScheduleDAGRRList.cpp Revert "[NFC][ScheduleDAG] Remove unused EntrySU SUnit" 2020-09-21 13:33:05 +02:00
ScheduleDAGSDNodes.cpp [DebugInfo] Emit DBG_VALUE_LIST from ISel 2021-03-09 12:17:39 +00:00
ScheduleDAGSDNodes.h DAG: Use Register 2020-04-08 13:44:31 -04:00
ScheduleDAGVLIW.cpp [SelectionDAG] Use range-based for loops (NFC) 2021-02-09 22:14:30 -08:00
SelectionDAG.cpp [NFC][CodeGen] Tidy up TargetRegisterInfo stack realignment functions 2021-03-30 17:31:39 +01:00
SelectionDAGAddressAnalysis.cpp [SelectionDAG] Avoid aliasing analysis if the object size is unknown. 2020-11-25 06:13:37 +08:00
SelectionDAGBuilder.cpp [IR][SVE] Add new llvm.experimental.stepvector intrinsic 2021-03-23 10:43:35 +00:00
SelectionDAGBuilder.h [IR][SVE] Add new llvm.experimental.stepvector intrinsic 2021-03-23 10:43:35 +00:00
SelectionDAGDumper.cpp [IR][SVE] Add new llvm.experimental.stepvector intrinsic 2021-03-23 10:43:35 +00:00
SelectionDAGISel.cpp [DebugInfo] Emit DBG_VALUE_LIST from ISel 2021-03-09 12:17:39 +00:00
SelectionDAGPrinter.cpp [SelectionDAG] Drop unnecessary const from a return type (NFC) 2021-02-07 09:49:33 -08:00
SelectionDAGTargetInfo.cpp
StatepointLowering.cpp [Statepoint Lowering] Handle the case with several gc.result 2021-03-11 18:44:44 +07:00
StatepointLowering.h [Statepoint] Consolidate relocation type tracking [NFC] 2020-07-29 11:45:31 -07:00
TargetLowering.cpp [SelectionDAG][AArch64][SVE] Perform SETCC condition legalization in LegalizeVectorOps 2021-03-29 15:32:25 +01:00