diff options
author | Jim Grosbach <grosbach@apple.com> | 2009-10-20 20:19:50 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2009-10-20 20:19:50 +0000 |
commit | 860507d1bbced055f324e91a18de4f5ddd650a4f (patch) | |
tree | 39925d4c40c9f93394eed4aed0e4a916f1bdc8a2 /lib | |
parent | 5c6665c8637d9483f51c3448941298218748f7eb (diff) | |
download | external_llvm-860507d1bbced055f324e91a18de4f5ddd650a4f.zip external_llvm-860507d1bbced055f324e91a18de4f5ddd650a4f.tar.gz external_llvm-860507d1bbced055f324e91a18de4f5ddd650a4f.tar.bz2 |
add cmd line opt to disable frame index reuse for ARM and T2. debug aid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM/ARMBaseRegisterInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/lib/Target/ARM/ARMBaseRegisterInfo.cpp index 9ff9ae5..f522376 100644 --- a/lib/Target/ARM/ARMBaseRegisterInfo.cpp +++ b/lib/Target/ARM/ARMBaseRegisterInfo.cpp @@ -36,8 +36,13 @@ #include "llvm/Target/TargetOptions.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/Support/CommandLine.h" using namespace llvm; +static cl::opt<bool> +ReuseFrameIndexVals("arm-reuse-frame-index-vals", cl::Hidden, cl::init(true), + cl::desc("Reuse repeated frame index values")); + unsigned ARMBaseRegisterInfo::getRegisterNumbering(unsigned RegEnum, bool *isSPVFP) { if (isSPVFP) @@ -1088,6 +1093,8 @@ ARMBaseRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, Offset, Pred, PredReg, TII); } MI.getOperand(i).ChangeToRegister(ScratchReg, false, false, true); + if (!ReuseFrameIndexVals) + ScratchReg = 0; } return ScratchReg; } |