diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-08-08 03:21:23 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-08-08 03:21:23 +0000 |
commit | 3eff16e27a4b0e9dfb8c0061faf10fdce9f4df4e (patch) | |
tree | 51f3345c14f00b5556764a017dee977b88849822 /lib/Target/ARM/ARMTargetMachine.cpp | |
parent | 8fb903604e83dfd63659c919042bf2bfed3c940f (diff) |
Add a skeleton Thumb2 instruction size reduction pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78456 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMTargetMachine.cpp')
-rw-r--r-- | lib/Target/ARM/ARMTargetMachine.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp index a58089088e..5666740bdd 100644 --- a/lib/Target/ARM/ARMTargetMachine.cpp +++ b/lib/Target/ARM/ARMTargetMachine.cpp @@ -26,6 +26,8 @@ static cl::opt<bool> DisableLdStOpti("disable-arm-loadstore-opti", cl::Hidden, cl::desc("Disable load store optimization pass")); static cl::opt<bool> DisableIfConversion("disable-arm-if-conversion",cl::Hidden, cl::desc("Disable if-conversion pass")); +static cl::opt<bool> Thumb2Shrink("shrink-thumb2-instructions", cl::Hidden, + cl::desc("Shrink 32-bit Thumb2 instructions to 16-bit ones")); extern "C" void LLVMInitializeARMTarget() { // Register the target. @@ -113,8 +115,11 @@ bool ARMBaseTargetMachine::addPreEmitPass(PassManagerBase &PM, !DisableIfConversion && !Subtarget.isThumb()) PM.add(createIfConverterPass()); - if (Subtarget.isThumb2()) + if (Subtarget.isThumb2()) { PM.add(createThumb2ITBlockPass()); + if (Thumb2Shrink) + PM.add(createThumb2SizeReductionPass()); + } PM.add(createARMConstantIslandPass()); return true; |