This is an archive of the discontinued LLVM Phabricator instance.

[LoopVectorize] Use SetVector to track uniform uses to prevent non-determinism.
ClosedPublic

Authored by huihuiz on Mar 29 2021, 3:49 PM.

Details

Summary

Use SetVector instead of SmallPtrSet to track values with uniform use. Doing this
can help avoid non-determinism caused by iterating over unordered containers.

This bug was found with reverse iteration turning on,
--extra-llvm-cmake-variables="-DLLVM_REVERSE_ITERATION=ON".
Failing LLVM test consecutive-ptr-uniforms.ll .

Diff Detail

Event Timeline

huihuiz created this revision.Mar 29 2021, 3:49 PM
huihuiz requested review of this revision.Mar 29 2021, 3:49 PM
huihuiz updated this revision to Diff 334211.Mar 30 2021, 10:09 AM
huihuiz retitled this revision from [LoopVectorize] Use SmallVector to track uniform uses to prevent non-determinism. to [LoopVectorize] Use SetVector to track uniform uses to prevent non-determinism..
huihuiz edited the summary of this revision. (Show Details)
huihuiz added a reviewer: fhahn.

Update diff to use SetVector.

MaskRay accepted this revision.Mar 30 2021, 10:50 PM

Looks great!

This revision is now accepted and ready to land.Mar 30 2021, 10:50 PM