[PATCH] fix non-determinism issue in SLP

David Majnemer david.majnemer at gmail.com
Fri Jan 9 11:13:13 PST 2015


LGTM.

On Fri, Jan 9, 2015 at 10:33 AM, Daniel Reynaud <dreynaud at apple.com> wrote:

>
> > On Jan 7, 2015, at 4:59 PM, David Majnemer <david.majnemer at gmail.com>
> wrote:
> >
> > Any reason why we can't just switch BlocksSchedules to being a MapVector?
>
> Ah you're right, a MapVector works. Here is the amended patch:
>
>
> diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp
> b/lib/Transforms/Vectorize/SLPVectorizer.cpp
> index c8b8ff2..c2ae163 100644
> --- a/lib/Transforms/Vectorize/SLPVectorizer.cpp
> +++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp
> @@ -857,7 +857,7 @@ private:
>    };
>
>    /// Attaches the BlockScheduling structures to basic blocks.
> -  DenseMap<BasicBlock *, std::unique_ptr<BlockScheduling>>
> BlocksSchedules;
> +  MapVector<BasicBlock *, std::unique_ptr<BlockScheduling>>
> BlocksSchedules;
>
>    /// Performs the "real" scheduling. Done before vectorization is
> actually
>    /// performed in a basic block.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150109/7bf5e231/attachment.html>


More information about the llvm-commits mailing list