[llvm] r313701 - Revert "[GVNSink] Remove dependency on SmallPtrSet iteration order."

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 10:20:05 PDT 2017


+1

On Mon, Sep 25, 2017 at 8:45 AM Benjamin Kramer via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> This now fails again with reverse iteration order. Why do we have test
> coverage for iteration order but not for the behavior you depend on
> here?
>
> On Wed, Sep 20, 2017 at 2:07 AM, Daniel Berlin via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: dannyb
> > Date: Tue Sep 19 17:07:25 2017
> > New Revision: 313701
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=313701&view=rev
> > Log:
> > Revert "[GVNSink] Remove dependency on SmallPtrSet iteration order."
> >
> > This reverts commit r312156, because now the op and block arrays are not
> in the same order :(.
> >
> > Modified:
> >     llvm/trunk/lib/Transforms/Scalar/GVNSink.cpp
> >
> > Modified: llvm/trunk/lib/Transforms/Scalar/GVNSink.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVNSink.cpp?rev=313701&r1=313700&r2=313701&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/Transforms/Scalar/GVNSink.cpp (original)
> > +++ llvm/trunk/lib/Transforms/Scalar/GVNSink.cpp Tue Sep 19 17:07:25 2017
> > @@ -229,14 +229,12 @@ public:
> >    ModelledPHI(const VArray &V, const BArray &B) {
> >      std::copy(V.begin(), V.end(), std::back_inserter(Values));
> >      std::copy(B.begin(), B.end(), std::back_inserter(Blocks));
> > -    std::sort(Blocks.begin(), Blocks.end());
> >    }
> >
> >    /// Create a PHI from [I[OpNum] for I in Insts].
> >    template <typename BArray>
> >    ModelledPHI(ArrayRef<Instruction *> Insts, unsigned OpNum, const
> BArray &B) {
> >      std::copy(B.begin(), B.end(), std::back_inserter(Blocks));
> > -    std::sort(Blocks.begin(), Blocks.end());
> >      for (auto *I : Insts)
> >        Values.push_back(I->getOperand(OpNum));
> >    }
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> _______________________________________________
> 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/20170925/481bf79a/attachment.html>


More information about the llvm-commits mailing list