AMDGPU: Support commuting a FrameIndex operand
llvm-svn: 281369
This commit is contained in:
@@ -175,6 +175,16 @@ void MachineOperand::ChangeToMCSymbol(MCSymbol *Sym) {
|
||||
Contents.Sym = Sym;
|
||||
}
|
||||
|
||||
void MachineOperand::ChangeToFrameIndex(int Idx) {
|
||||
assert((!isReg() || !isTied()) &&
|
||||
"Cannot change a tied operand into a FrameIndex");
|
||||
|
||||
removeRegFromUses();
|
||||
|
||||
OpKind = MO_FrameIndex;
|
||||
setIndex(Idx);
|
||||
}
|
||||
|
||||
/// ChangeToRegister - Replace this operand with a new register operand of
|
||||
/// the specified value. If an operand is known to be an register already,
|
||||
/// the setReg method should be used.
|
||||
|
||||
Reference in New Issue
Block a user