mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
R600/SI: Implement SIInstrInfo::isTriviallyRematerializable()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205188 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f143aa3e9
commit
aa23732edd
@ -308,6 +308,18 @@ SIInstrInfo::isSafeToMoveRegClassDefs(const TargetRegisterClass *RC) const {
|
||||
return RC != &AMDGPU::EXECRegRegClass;
|
||||
}
|
||||
|
||||
bool
|
||||
SIInstrInfo::isTriviallyReMaterializable(const MachineInstr *MI,
|
||||
AliasAnalysis *AA) const {
|
||||
switch(MI->getOpcode()) {
|
||||
default: return AMDGPUInstrInfo::isTriviallyReMaterializable(MI, AA);
|
||||
case AMDGPU::S_MOV_B32:
|
||||
case AMDGPU::S_MOV_B64:
|
||||
case AMDGPU::V_MOV_B32_e32:
|
||||
return MI->getOperand(1).isImm();
|
||||
}
|
||||
}
|
||||
|
||||
namespace llvm {
|
||||
namespace AMDGPU {
|
||||
// Helper function generated by tablegen. We are wrapping this with
|
||||
|
@ -77,6 +77,9 @@ public:
|
||||
virtual MachineInstr *commuteInstruction(MachineInstr *MI,
|
||||
bool NewMI=false) const;
|
||||
|
||||
bool isTriviallyReMaterializable(const MachineInstr *MI,
|
||||
AliasAnalysis *AA = 0) const;
|
||||
|
||||
virtual unsigned getIEQOpcode() const {
|
||||
llvm_unreachable("Unimplemented");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user