diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-11-18 03:34:27 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-11-18 03:34:27 +0000 |
commit | 834b08af8d3d8fc6c76ac6ca40674565689e8d7f (patch) | |
tree | 54f4512d0d88c69265505976b1d17cdd845a2fb9 /include/llvm/Target | |
parent | 5eea34267376e76aceb53b6c3dfead816021258f (diff) | |
download | external_llvm-834b08af8d3d8fc6c76ac6ca40674565689e8d7f.zip external_llvm-834b08af8d3d8fc6c76ac6ca40674565689e8d7f.tar.gz external_llvm-834b08af8d3d8fc6c76ac6ca40674565689e8d7f.tar.bz2 |
Add a target hook to allow changing the tail duplication limit based on the
contents of the block to be duplicated. Use this for ARM Cortex A8/9 to
be more aggressive tail duplicating indirect branches, since it makes it
much more likely that they will be predicted in the branch target buffer.
Testcase coming soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89187 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index 40b7780..43fd54e 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -536,6 +536,13 @@ public: /// length. virtual unsigned getInlineAsmLength(const char *Str, const MCAsmInfo &MAI) const; + + /// TailDuplicationLimit - Returns the limit on the number of instructions + /// in basic block MBB beyond which it will not be tail-duplicated. + virtual unsigned TailDuplicationLimit(const MachineBasicBlock &MBB, + unsigned DefaultLimit) const { + return DefaultLimit; + } }; /// TargetInstrInfoImpl - This is the default implementation of |