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 | 9fa72d9078dbead41d24462d0588135804999171 (patch) | |
tree | 694da4480cf7a13b73a4526ac7769da901b501e7 /lib/Target/ARM | |
parent | e4a7877733555c9924ab0ec77f69fae5efd54e7a (diff) | |
download | external_llvm-9fa72d9078dbead41d24462d0588135804999171.zip external_llvm-9fa72d9078dbead41d24462d0588135804999171.tar.gz external_llvm-9fa72d9078dbead41d24462d0588135804999171.tar.bz2 |
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/ARM')
-rw-r--r-- | lib/Target/ARM/ARMInstrInfo.cpp | 10 | ||||
-rw-r--r-- | lib/Target/ARM/ARMInstrInfo.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMInstrInfo.cpp b/lib/Target/ARM/ARMInstrInfo.cpp index 7fe3b47..839ee6a 100644 --- a/lib/Target/ARM/ARMInstrInfo.cpp +++ b/lib/Target/ARM/ARMInstrInfo.cpp @@ -459,14 +459,14 @@ unsigned ARMInstrInfo::InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *T return 2; } -void ARMInstrInfo::copyRegToReg(MachineBasicBlock &MBB, +bool ARMInstrInfo::copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, 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 == ARM::GPRRegisterClass) { @@ -484,7 +484,9 @@ void ARMInstrInfo::copyRegToReg(MachineBasicBlock &MBB, AddDefaultPred(BuildMI(MBB, I, get(ARM::FCPYD), DestReg) .addReg(SrcReg)); else - abort(); + return false; + + return true; } static const MachineInstrBuilder &ARMInstrAddOperand(MachineInstrBuilder &MIB, diff --git a/lib/Target/ARM/ARMInstrInfo.h b/lib/Target/ARM/ARMInstrInfo.h index 9fb74c1..8152283 100644 --- a/lib/Target/ARM/ARMInstrInfo.h +++ b/lib/Target/ARM/ARMInstrInfo.h @@ -163,7 +163,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 I, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *DestRC, |