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/Alpha/AlphaInstrInfo.cpp | |
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/Alpha/AlphaInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/Alpha/AlphaInstrInfo.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaInstrInfo.cpp b/llvm/lib/Target/Alpha/AlphaInstrInfo.cpp index ec8857fc7f4..b566de45105 100644 --- a/llvm/lib/Target/Alpha/AlphaInstrInfo.cpp +++ b/llvm/lib/Target/Alpha/AlphaInstrInfo.cpp @@ -133,15 +133,15 @@ unsigned AlphaInstrInfo::InsertBranch(MachineBasicBlock &MBB, return 2; } -void AlphaInstrInfo::copyRegToReg(MachineBasicBlock &MBB, +bool AlphaInstrInfo::copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *DestRC, const TargetRegisterClass *SrcRC) const { //cerr << "copyRegToReg " << DestReg << " <- " << SrcReg << "\n"; if (DestRC != SrcRC) { - cerr << "Not yet supported!"; - abort(); + // Not yet supported! + return false; } if (DestRC == Alpha::GPRCRegisterClass) { @@ -151,9 +151,11 @@ void AlphaInstrInfo::copyRegToReg(MachineBasicBlock &MBB, } else if (DestRC == Alpha::F8RCRegisterClass) { BuildMI(MBB, MI, get(Alpha::CPYST), DestReg).addReg(SrcReg).addReg(SrcReg); } else { - cerr << "Attempt to copy register that is not GPR or FPR"; - abort(); + // Attempt to copy register that is not GPR or FPR + return false; } + + return true; } void |