diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-05-16 23:45:53 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-05-16 23:45:53 +0000 |
commit | d60483ef99a15630abba934001b1ff7d16a33b18 (patch) | |
tree | d8f9354ff89b2fd3932f259cbe38b63b52d17472 /include/llvm/Target/TargetLowering.h | |
parent | b6ec3a933d13fbfd4fe3d8944ae58770affec2f1 (diff) | |
download | external_llvm-d60483ef99a15630abba934001b1ff7d16a33b18.zip external_llvm-d60483ef99a15630abba934001b1ff7d16a33b18.tar.gz external_llvm-d60483ef99a15630abba934001b1ff7d16a33b18.tar.bz2 |
Add target hook to specify block size limit for if-conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37134 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLowering.h')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 6880708..d736a3a 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -434,6 +434,12 @@ public: return JumpBufAlignment; } + /// getIfCvtBlockLimit - returns the target specific if-conversion block size + /// limit. Any block whose size is greater should not be predicated. + virtual unsigned getIfCvtBlockSizeLimit() const { + return IfCvtBlockSizeLimit; + } + /// 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. @@ -750,6 +756,12 @@ protected: void setJumpBufAlignment(unsigned Align) { JumpBufAlignment = Align; } + + /// setIfCvtBlockSizeLimit - Set the target's if-conversion block size limit; + /// default is 2. + void setIfCvtBlockSizeLimit(unsigned Limit) { + IfCvtBlockSizeLimit = Limit; + } public: @@ -982,6 +994,10 @@ private: /// JumpBufAlignment - The alignment, in bytes, of the target's jmp_buf /// buffers unsigned JumpBufAlignment; + + /// IfCvtBlockSizeLimit - The maximum allowed block size for if-conversion. + /// + unsigned IfCvtBlockSizeLimit; /// StackPointerRegisterToSaveRestore - If set to a physical register, this /// specifies the register that llvm.savestack/llvm.restorestack should save |