[PATCH] D21189: Create subranges for new intervals resulting from live interval splitting
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 19 17:13:01 PDT 2016
kparzysz marked 7 inline comments as done.
kparzysz added a comment.
Made all the changes locally. Will test and post the updated patch on Monday.
================
Comment at: lib/CodeGen/TargetInstrInfo.cpp:381-385
@@ -380,3 +380,7 @@
MachineInstr *MI = MBB.getParent()->CloneMachineInstr(&Orig);
- MI->substituteRegister(MI->getOperand(0).getReg(), DestReg, SubIdx, TRI);
+ MachineOperand &DefOp = MI->getOperand(0);
+ assert(DefOp.isReg() && DefOp.isDef());
+ MI->substituteRegister(DefOp.getReg(), DestReg, SubIdx, TRI);
+ if (!DefOp.getSubReg())
+ DefOp.setIsUndef(false);
MBB.insert(I, MI);
----------------
MatzeB wrote:
> This will fail if there is more than 1 definition or implicit definitions. It would probably be better to patch MachineOperand::substVirtReg() which in turn is used by MachineInstr::substituteRegister()
This one is still not done. I will post a separate patch for this on Monday.
Repository:
rL LLVM
https://reviews.llvm.org/D21189
More information about the llvm-commits
mailing list