mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Added TargetRegisterInfo::getAllocatableClass.
The ensures that virtual registers always belong to an allocatable class. If your target attempts to create a vreg for an operand that has no allocatable register subclass, you will crash quickly. This ensures that targets define register classes as intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156046 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1298,7 +1298,8 @@ TryInstructionTransform(MachineBasicBlock::iterator &mi,
|
||||
// Unfold the load.
|
||||
DEBUG(dbgs() << "2addr: UNFOLDING: " << MI);
|
||||
const TargetRegisterClass *RC =
|
||||
TII->getRegClass(UnfoldMCID, LoadRegIndex, TRI);
|
||||
TRI->getAllocatableClass(
|
||||
TII->getRegClass(UnfoldMCID, LoadRegIndex, TRI));
|
||||
unsigned Reg = MRI->createVirtualRegister(RC);
|
||||
SmallVector<MachineInstr *, 2> NewMIs;
|
||||
if (!TII->unfoldMemoryOperand(MF, &MI, Reg,
|
||||
|
||||
Reference in New Issue
Block a user