[PATCH] D32563: Add LiveRangeShrink pass to shrink live range within BB.
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 30 17:31:05 PDT 2017
MatzeB accepted this revision.
MatzeB added a comment.
LGTM, with nitpicks below.
================
Comment at: lib/CodeGen/LiveRangeShrink.cpp:165-166
+ if (!TargetRegisterInfo::isVirtualRegister(Reg)) {
+ if (MRI.isConstantPhysReg(Reg))
+ continue;
+/* if (TargetRegisterInfo::isPhysicalRegister(Reg) &&
----------------
You can probably use this so instructions are still moved even if they use %noreg.
```
if (!Reg || MRI.isConstantPhysReg(Reg))
continue;
```
================
Comment at: lib/CodeGen/LiveRangeShrink.cpp:167-168
+ continue;
+/* if (TargetRegisterInfo::isPhysicalRegister(Reg) &&
+ !MRI.isConstantPhysReg(Reg)) {*/
+ Insert = nullptr;
----------------
- Remove commented code.
https://reviews.llvm.org/D32563
More information about the llvm-commits
mailing list