diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-08-08 05:04:59 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-08-08 05:04:59 +0000 |
commit | c98af3370f899a0d1570b1dff01a2e36632f884f (patch) | |
tree | 6c3608f5e6e1d1822d0cb67adae4de8fa837e410 /lib/Target/ARM/ARMBaseInstrInfo.cpp | |
parent | be04fdeb6c46e92fdeda7535c5912d072eff008c (diff) | |
download | external_llvm-c98af3370f899a0d1570b1dff01a2e36632f884f.zip external_llvm-c98af3370f899a0d1570b1dff01a2e36632f884f.tar.gz external_llvm-c98af3370f899a0d1570b1dff01a2e36632f884f.tar.bz2 |
Use the "isCompare" machine instruction attribute instead of calling the
relatively expensive comparison analyzer on each instruction. Also rename the
comparison analyzer method to something more in line with what it actually does.
This pass is will eventually be folded into the Machine CSE pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMBaseInstrInfo.cpp')
-rw-r--r-- | lib/Target/ARM/ARMBaseInstrInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index 68e35ed..7e1c84e 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -1355,7 +1355,7 @@ bool llvm::rewriteARMFrameIndex(MachineInstr &MI, unsigned FrameRegIdx, } bool ARMBaseInstrInfo:: -isCompareInstr(const MachineInstr *MI, unsigned &SrcReg, int &CmpValue) const { +AnalyzeCompare(const MachineInstr *MI, unsigned &SrcReg, int &CmpValue) const { switch (MI->getOpcode()) { default: break; case ARM::t2CMPri: @@ -1368,10 +1368,10 @@ isCompareInstr(const MachineInstr *MI, unsigned &SrcReg, int &CmpValue) const { return false; } -/// convertToSetZeroFlag - Convert the instruction to set the "zero" flag so +/// ConvertToSetZeroFlag - Convert the instruction to set the "zero" flag so /// that we can remove a "comparison with zero". bool ARMBaseInstrInfo:: -convertToSetZeroFlag(MachineInstr *MI, MachineInstr *CmpInstr) const { +ConvertToSetZeroFlag(MachineInstr *MI, MachineInstr *CmpInstr) const { // Conservatively refuse to convert an instruction which isn't in the same BB // as the comparison. if (MI->getParent() != CmpInstr->getParent()) |