aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-08-08 05:04:59 +0000
committerBill Wendling <isanbard@gmail.com>2010-08-08 05:04:59 +0000
commitc98af3370f899a0d1570b1dff01a2e36632f884f (patch)
tree6c3608f5e6e1d1822d0cb67adae4de8fa837e410 /include/llvm
parentbe04fdeb6c46e92fdeda7535c5912d072eff008c (diff)
downloadexternal_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 'include/llvm')
-rw-r--r--include/llvm/Target/TargetInstrInfo.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h
index 1c6ac1a..520c41b 100644
--- a/include/llvm/Target/TargetInstrInfo.h
+++ b/include/llvm/Target/TargetInstrInfo.h
@@ -577,17 +577,17 @@ public:
virtual ScheduleHazardRecognizer*
CreateTargetPostRAHazardRecognizer(const InstrItineraryData&) const = 0;
- /// isCompareInstr - If the machine instruction is a comparison instruction,
- /// then return true. Also return the source register in SrcReg and the value
- /// it compares against in CmpValue.
- virtual bool isCompareInstr(const MachineInstr *MI,
+ /// AnalyzeCompare - For a comparison instruction, return the source register
+ /// in SrcReg and the value it compares against in CmpValue. Return true if
+ /// the comparison instruction can be analyzed.
+ virtual bool AnalyzeCompare(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".
- virtual bool convertToSetZeroFlag(MachineInstr *Instr,
+ virtual bool ConvertToSetZeroFlag(MachineInstr *Instr,
MachineInstr *CmpInstr) const {
return false;
}