summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86InstrInfo.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-01-12 00:09:37 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-01-12 00:09:37 +0000
commit4216615f99fb95692a0b847c06a21d2af466e1b2 (patch)
tree9f0146b29e5d1b9df761f6a3c21d94971ff8e8a5 /llvm/lib/Target/X86/X86InstrInfo.h
parente5f86be1385c0fddd554df26ecd7e8898949bc14 (diff)
downloadbcm5719-llvm-4216615f99fb95692a0b847c06a21d2af466e1b2.tar.gz
bcm5719-llvm-4216615f99fb95692a0b847c06a21d2af466e1b2.zip
Add TargetInstrInfo::isCoalescableInstr. It returns true if the specified
instruction is copy like where the source and destination registers can overlap. This is to be used by the coalescable to coalesce the source and destination registers of instructions like X86::MOVSX64rr32. Apparently some crazy people believe the coalescer is too simple. llvm-svn: 93210
Diffstat (limited to 'llvm/lib/Target/X86/X86InstrInfo.h')
-rw-r--r--llvm/lib/Target/X86/X86InstrInfo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.h b/llvm/lib/Target/X86/X86InstrInfo.h
index b83441d89ef..6ae7808e2dd 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.h
+++ b/llvm/lib/Target/X86/X86InstrInfo.h
@@ -448,6 +448,14 @@ public:
unsigned &SrcReg, unsigned &DstReg,
unsigned &SrcSubIdx, unsigned &DstSubIdx) const;
+ /// isCoalescableInstr - Return true if the instruction is "coalescable". That
+ /// is, it's like a copy where it's legal for the source to overlap the
+ /// destination. e.g. X86::MOVSX64rr32.
+ virtual bool isCoalescableInstr(const MachineInstr &MI, bool &isCopy,
+ unsigned &SrcReg, unsigned &DstReg,
+ unsigned &SrcSubIdx, unsigned &DstSubIdx) const;
+
+
unsigned isLoadFromStackSlot(const MachineInstr *MI, int &FrameIndex) const;
/// isLoadFromStackSlotPostFE - Check for post-frame ptr elimination
/// stack locations as well. This uses a heuristic so it isn't
OpenPOWER on IntegriCloud