diff options
| author | Owen Anderson <resistor@mac.com> | 2008-08-26 18:03:31 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2008-08-26 18:03:31 +0000 |
| commit | 940f83e772ca2007d62faffc83094bd7e8da6401 (patch) | |
| tree | 694da4480cf7a13b73a4526ac7769da901b501e7 /lib/Target/IA64 | |
| parent | a0b3909d432e9f2c79aee8ec3133f9b9ec71dc1a (diff) | |
Make TargetInstrInfo::copyRegToReg return a bool indicating whether the copy requested
was inserted or not. This allows bitcast in fast isel to properly handle the case
where an appropriate reg-to-reg copy is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/IA64')
| -rw-r--r-- | lib/Target/IA64/IA64InstrInfo.cpp | 8 | ||||
| -rw-r--r-- | lib/Target/IA64/IA64InstrInfo.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/Target/IA64/IA64InstrInfo.cpp b/lib/Target/IA64/IA64InstrInfo.cpp index 0fe0a0c37a..54bcce13c5 100644 --- a/lib/Target/IA64/IA64InstrInfo.cpp +++ b/lib/Target/IA64/IA64InstrInfo.cpp @@ -57,14 +57,14 @@ IA64InstrInfo::InsertBranch(MachineBasicBlock &MBB,MachineBasicBlock *TBB, return 1; } -void IA64InstrInfo::copyRegToReg(MachineBasicBlock &MBB, +bool IA64InstrInfo::copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *DestRC, const TargetRegisterClass *SrcRC) const { if (DestRC != SrcRC) { - cerr << "Not yet supported!"; - abort(); + // Not yet supported! + return false; } if(DestRC == IA64::PRRegisterClass ) // if a bool, we use pseudocode @@ -73,6 +73,8 @@ void IA64InstrInfo::copyRegToReg(MachineBasicBlock &MBB, .addReg(IA64::r0).addReg(IA64::r0).addReg(SrcReg); else // otherwise, MOV works (for both gen. regs and FP regs) BuildMI(MBB, MI, get(IA64::MOV), DestReg).addReg(SrcReg); + + return true; } void IA64InstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB, diff --git a/lib/Target/IA64/IA64InstrInfo.h b/lib/Target/IA64/IA64InstrInfo.h index 61ef0a0a5a..203f1e851e 100644 --- a/lib/Target/IA64/IA64InstrInfo.h +++ b/lib/Target/IA64/IA64InstrInfo.h @@ -40,7 +40,7 @@ public: virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, const SmallVectorImpl<MachineOperand> &Cond) const; - virtual void copyRegToReg(MachineBasicBlock &MBB, + virtual bool copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *DestRC, |
