[llvm] r312156 - [GVNSink] Remove dependency on SmallPtrSet iteration order.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 10:01:31 PDT 2017


Good point Eli - Ben, thoughts?

On Wed, Aug 30, 2017 at 11:54 AM Friedman, Eli via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On 8/30/2017 11:46 AM, Benjamin Kramer via llvm-commits wrote:
> > Author: d0k
> > Date: Wed Aug 30 11:46:37 2017
> > New Revision: 312156
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=312156&view=rev
> > Log:
> > [GVNSink] Remove dependency on SmallPtrSet iteration order.
> >
> > Found by LLVM_ENABLE_REVERSE_ITERATION.
> >
> > 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=312156&r1=312155&r2=312156&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/Transforms/Scalar/GVNSink.cpp (original)
> > +++ llvm/trunk/lib/Transforms/Scalar/GVNSink.cpp Wed Aug 30 11:46:37 2017
> > @@ -229,12 +229,14 @@ 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());
> >     }
> >
>
> Does this actually solve anything?  "Blocks" is a
> "SmallVector<BasicBlock *, 4>", so sorting it will put it into a
> non-deterministic order.
>
> -Eli
>
> --
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
> Foundation Collaborative Project
>
> _______________________________________________
> 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/20170911/07b04f49/attachment.html>


More information about the llvm-commits mailing list