diff options
Diffstat (limited to 'include/llvm/Target/TargetLowering.h')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index b010a69ef7..4f04ce34fc 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -548,17 +548,23 @@ public: /// getIfCvtBlockLimit - returns the target specific if-conversion block size /// limit. Any block whose size is greater should not be predicated. - virtual unsigned getIfCvtBlockSizeLimit() const { + unsigned getIfCvtBlockSizeLimit() const { return IfCvtBlockSizeLimit; } /// getIfCvtDupBlockLimit - returns the target specific size limit for a /// block to be considered for duplication. Any block whose size is greater /// should not be duplicated to facilitate its predication. - virtual unsigned getIfCvtDupBlockSizeLimit() const { + unsigned getIfCvtDupBlockSizeLimit() const { return IfCvtDupBlockSizeLimit; } + /// getPrefLoopAlignment - return the preferred loop alignment. + /// + unsigned getPrefLoopAlignment() const { + return PrefLoopAlignment; + } + /// getPreIndexedAddressParts - returns true by value, base pointer and /// offset pointer and addressing mode by reference if the node's address /// can be legally represented as pre-indexed load / store address. @@ -583,7 +589,7 @@ public: /// jumptable. virtual SDOperand getPICJumpTableRelocBase(SDOperand Table, SelectionDAG &DAG) const; - + //===--------------------------------------------------------------------===// // TargetLowering Optimization Methods // @@ -890,6 +896,12 @@ protected: void setIfCvtDupBlockSizeLimit(unsigned Limit) { IfCvtDupBlockSizeLimit = Limit; } + + /// setPrefLoopAlignment - Set the target's preferred loop alignment. Default + /// alignment is zero, it means the target does not care about loop alignment. + void setPrefLoopAlignment(unsigned Align) { + PrefLoopAlignment = Align; + } public: @@ -1276,6 +1288,10 @@ private: /// duplicated during if-conversion. unsigned IfCvtDupBlockSizeLimit; + /// PrefLoopAlignment - The perferred loop alignment. + /// + unsigned PrefLoopAlignment; + /// StackPointerRegisterToSaveRestore - If set to a physical register, this /// specifies the register that llvm.savestack/llvm.restorestack should save /// and restore. |