[PATCH] D32563: Add LiveRangeShrink pass to shrink live range within BB.
Andrea Di Biagio via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 12 03:55:00 PDT 2017
andreadb accepted this revision.
andreadb added a comment.
Thanks for fixing the issue with debug values.
The patch still looks good to me.
A couple of comments can be slightly improved (see below).
================
Comment at: lib/CodeGen/LiveRangeShrink.cpp:166
+ if (MO.isDef()) {
+ // Do not move if there is more than one def
+ if (DefMO) {
----------------
Please remember to add a period at the end of each sentence.
================
Comment at: lib/CodeGen/LiveRangeShrink.cpp:182
+ }
+ // Move the instruction when # of shrinked live range > 1
+ if (DefMO && Insert && NumEligibleUse > 1 && Barrier <= IOM[Insert]) {
----------------
s/shrinked/shrunk
Also, please add a period at the end of this sentence.
================
Comment at: lib/CodeGen/LiveRangeShrink.cpp:185
+ MachineBasicBlock::iterator I = std::next(Insert->getIterator());
+ // Skip all the PHI instructions
+ while (I != MBB.end() && (I->isPHI() || I->isDebugValue()))
----------------
You should update this comment since we also skip debug values now.
https://reviews.llvm.org/D32563
More information about the llvm-commits
mailing list