[PATCH] D85037: [LCSSA] Use IRBuilder for PHI creation.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 1 10:04:41 PDT 2020


fhahn added a comment.

In D85037#2187796 <https://reviews.llvm.org/D85037#2187796>, @lebedev.ri wrote:

> LGTM, but shouldn't the patch as-is should be marked as "NFC"?

Now all instructions inserted as part of LCSSA PHI node creation are marked as 'inserted', whereas before only the final ones were. There weren't any binary changes on SPEC2000/SPEC2006/MultiSource with -O3 -flto, but I guess there some users of the expander could also skip the inserted PHI nodes now. Extremely unlikely to cause any changes in the end, but it slightly changes what the expander considers as 'inserted'.  Hence I'd prefer it not to be marked as NFC, but it's borderline I think.



================
Comment at: llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp:1773
       Instruction *Tmp;
+      IRBuilderBase::InsertPointGuard InsertPtGuard(Builder);
       if (Inst->getType()->isIntegerTy())
----------------
lebedev.ri wrote:
> Why is this now needed? `fixupLCSSAFormFor()` already preserves insertion point.
Yeah, I'll drop it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85037/new/

https://reviews.llvm.org/D85037



More information about the llvm-commits mailing list