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/CellSPU | |
parent | a0b3909d432e9f2c79aee8ec3133f9b9ec71dc1a (diff) | |
download | external_llvm-940f83e772ca2007d62faffc83094bd7e8da6401.zip external_llvm-940f83e772ca2007d62faffc83094bd7e8da6401.tar.gz external_llvm-940f83e772ca2007d62faffc83094bd7e8da6401.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/CellSPU')
-rw-r--r-- | lib/Target/CellSPU/SPUInstrInfo.cpp | 8 | ||||
-rw-r--r-- | lib/Target/CellSPU/SPUInstrInfo.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/Target/CellSPU/SPUInstrInfo.cpp b/lib/Target/CellSPU/SPUInstrInfo.cpp index 3998b98..02490e9 100644 --- a/lib/Target/CellSPU/SPUInstrInfo.cpp +++ b/lib/Target/CellSPU/SPUInstrInfo.cpp @@ -180,7 +180,7 @@ SPUInstrInfo::isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const { return 0; } -void SPUInstrInfo::copyRegToReg(MachineBasicBlock &MBB, +bool SPUInstrInfo::copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *DestRC, @@ -218,9 +218,11 @@ void SPUInstrInfo::copyRegToReg(MachineBasicBlock &MBB, BuildMI(MBB, MI, get(SPU::ORv4i32), DestReg).addReg(SrcReg) .addReg(SrcReg); } else { - cerr << "Attempt to copy unknown/unsupported register class!\n"; - abort(); + // Attempt to copy unknown/unsupported register class! + return false; } + + return true; } void diff --git a/lib/Target/CellSPU/SPUInstrInfo.h b/lib/Target/CellSPU/SPUInstrInfo.h index 9adffde..5f3aaaa 100644 --- a/lib/Target/CellSPU/SPUInstrInfo.h +++ b/lib/Target/CellSPU/SPUInstrInfo.h @@ -46,7 +46,7 @@ namespace llvm { unsigned isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const; unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const; - virtual void copyRegToReg(MachineBasicBlock &MBB, + virtual bool copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *DestRC, |