[PATCH] D45874: [LoopUnroll] Split out simplify code after Unroll into a new function. NFC
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 14 02:54:58 PDT 2018
dmgreen added a comment.
Thanks Florian
In https://reviews.llvm.org/D45874#1073460, @javed.absar wrote:
> Any test possible here?
This is just an NFC. Nothing should change.
================
Comment at: lib/Transforms/Utils/LoopUnroll.cpp:822
- // Simplify any new induction variables in the partially unrolled loop.
- if (SE && !CompletelyUnroll && (Count > 1 || Peeled)) {
- SmallVector<WeakTrackingVH, 16> DeadInsts;
- simplifyLoopIVs(L, SE, DT, LI, DeadInsts);
-
- // Aggressively clean up dead instructions that simplifyLoopIVs already
- // identified. Any remaining should be cleaned up below.
- while (!DeadInsts.empty())
- if (Instruction *Inst =
- dyn_cast_or_null<Instruction>(&*DeadInsts.pop_back_val()))
- RecursivelyDeleteTriviallyDeadInstructions(Inst);
- }
-
// At this point, the code is well formed. We now do a quick sweep over the
// inserted code, doing constant propagation and dead code elimination as we
----------------
fhahn wrote:
> I think this comment is stale now
I've reworded it a little, but I think it's mostly fine. I like that it explains that the code is now sensible and we can do normal stuff to it.
https://reviews.llvm.org/D45874
More information about the llvm-commits
mailing list