[llvm] r286159 - Reset debug loc to OldInduction in InnerLoopVectorizer::createInductionVariable. (NFC)
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 8 15:21:31 PST 2016
https://reviews.llvm.org/D26428 sent to test this patch.
Dehao
On Tue, Nov 8, 2016 at 12:39 PM, Robinson, Paul <paul.robinson at sony.com>
wrote:
> Is this really NFC? Seems like it is actually affecting the DebugLoc
> attached to the next instruction, if so it should have a test.
> --paulr
>
> > -----Original Message-----
> > From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On
> Behalf
> > Of Dehao Chen via llvm-commits
> > Sent: Monday, November 07, 2016 2:00 PM
> > To: llvm-commits at lists.llvm.org
> > Subject: [llvm] r286159 - Reset debug loc to OldInduction in
> > InnerLoopVectorizer::createInductionVariable. (NFC)
> >
> > Author: dehao
> > Date: Mon Nov 7 15:59:40 2016
> > New Revision: 286159
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=286159&view=rev
> > Log:
> > Reset debug loc to OldInduction in
> > InnerLoopVectorizer::createInductionVariable. (NFC)
> >
> > This is to prevent SetInsertionPoint from setting debug loc to Latch-
> > >getTerminator().
> >
> > Modified:
> > llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
> >
> > Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
> > URL: http://llvm.org/viewvc/llvm-
> > project/llvm/trunk/lib/Transforms/Vectorize/
> LoopVectorize.cpp?rev=286159&r
> > 1=286158&r2=286159&view=diff
> > ============================================================
> ==============
> > ====
> > --- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
> > +++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Mon Nov 7
> > 15:59:40 2016
> > @@ -3040,10 +3040,12 @@ PHINode *InnerLoopVectorizer::createIndu
> > Latch = Header;
> >
> > IRBuilder<> Builder(&*Header->getFirstInsertionPt());
> > - setDebugLocFromInst(Builder,
> > getDebugLocFromInstOrOperands(OldInduction));
> > + Instruction *OldInst = getDebugLocFromInstOrOperands(OldInduction);
> > + setDebugLocFromInst(Builder, OldInst);
> > auto *Induction = Builder.CreatePHI(Start->getType(), 2, "index");
> >
> > Builder.SetInsertPoint(Latch->getTerminator());
> > + setDebugLocFromInst(Builder, OldInst);
> >
> > // Create i+1 and fill the PHINode.
> > Value *Next = Builder.CreateAdd(Induction, Step, "index.next");
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161108/ee73cf65/attachment.html>
More information about the llvm-commits
mailing list