mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
R600/SI: Add instruction shrinking pass
This pass converts 64-bit instructions to 32-bit when possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213561 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1639,3 +1639,12 @@ void SIInstrInfo::reserveIndirectRegisters(BitVector &Reserved,
|
||||
for (int Index = std::max(0, Begin - 15); Index <= End; ++Index)
|
||||
Reserved.set(AMDGPU::VReg_512RegClass.getRegister(Index));
|
||||
}
|
||||
|
||||
const MachineOperand *SIInstrInfo::getNamedOperand(const MachineInstr& MI,
|
||||
unsigned OperandName) const {
|
||||
int Idx = AMDGPU::getNamedOperandIdx(MI.getOpcode(), OperandName);
|
||||
if (Idx == -1)
|
||||
return nullptr;
|
||||
|
||||
return &MI.getOperand(Idx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user