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 | 27fb3dcbc738451856f641c70c94ed44a6b44ffd (patch) | |
tree | 75b9eeb837647d4fec784eca9e3115ce7ee56f36 /llvm/lib/Target/Sparc | |
parent | 4310d3984446bfea6401bc1d2eb0ea6e45b73c36 (diff) | |
download | bcm5719-llvm-27fb3dcbc738451856f641c70c94ed44a6b44ffd.tar.gz bcm5719-llvm-27fb3dcbc738451856f641c70c94ed44a6b44ffd.zip |
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.
llvm-svn: 55375
Diffstat (limited to 'llvm/lib/Target/Sparc')
-rw-r--r-- | llvm/lib/Target/Sparc/SparcInstrInfo.cpp | 11 | ||||
-rw-r--r-- | llvm/lib/Target/Sparc/SparcInstrInfo.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp index 68605a75d47..ab18044d6d4 100644 --- a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp +++ b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp @@ -109,14 +109,14 @@ SparcInstrInfo::InsertBranch(MachineBasicBlock &MBB,MachineBasicBlock *TBB, return 1; } -void SparcInstrInfo::copyRegToReg(MachineBasicBlock &MBB, +bool SparcInstrInfo::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 == SP::IntRegsRegisterClass) @@ -127,7 +127,10 @@ void SparcInstrInfo::copyRegToReg(MachineBasicBlock &MBB, BuildMI(MBB, I, get(Subtarget.isV9() ? SP::FMOVD : SP::FpMOVD),DestReg) .addReg(SrcReg); else - assert (0 && "Can't copy this register"); + // Can't copy this register + return false; + + return true; } void SparcInstrInfo:: diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.h b/llvm/lib/Target/Sparc/SparcInstrInfo.h index d19d55f84f6..aadbefd9db0 100644 --- a/llvm/lib/Target/Sparc/SparcInstrInfo.h +++ b/llvm/lib/Target/Sparc/SparcInstrInfo.h @@ -68,7 +68,7 @@ public: 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, |