aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/Thumb2InstrInfo.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-11-07 03:52:02 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-11-07 03:52:02 +0000
commit78e5c1140adc926e7c004748c1c912bfddd875b4 (patch)
tree6b41a4349a4ab4fdd379d1f6f7c007388e9a1475 /lib/Target/ARM/Thumb2InstrInfo.h
parentb6aae88ac003183cd386c7db2ce123b4d10b7a22 (diff)
downloadexternal_llvm-78e5c1140adc926e7c004748c1c912bfddd875b4.zip
external_llvm-78e5c1140adc926e7c004748c1c912bfddd875b4.tar.gz
external_llvm-78e5c1140adc926e7c004748c1c912bfddd875b4.tar.bz2
- Add TargetInstrInfo::isIdentical(). It's similar to MachineInstr::isIdentical
except it doesn't care if the definitions' virtual registers differ. This is used by machine LICM and other MI passes to perform CSE. - Teach Thumb2InstrInfo::isIdentical() to check two t2LDRpci_pic are identical. Since pc relative constantpool entries are always different, this requires it it check if the values can actually the same. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86328 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/Thumb2InstrInfo.h')
-rw-r--r--lib/Target/ARM/Thumb2InstrInfo.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/ARM/Thumb2InstrInfo.h b/lib/Target/ARM/Thumb2InstrInfo.h
index 456e827..2f25e91 100644
--- a/lib/Target/ARM/Thumb2InstrInfo.h
+++ b/lib/Target/ARM/Thumb2InstrInfo.h
@@ -54,6 +54,10 @@ public:
unsigned DestReg, unsigned SubIdx,
const MachineInstr *Orig) const;
+ bool isIdentical(const MachineInstr *MI,
+ const MachineInstr *Other,
+ const MachineRegisterInfo *MRI) const;
+
/// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
/// such, whenever a client has an instance of instruction info, it should
/// always be able to get register info as well (through this method).