Page MenuHomePhabricator

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

Authored by huihuiz on Mon, Mar 29, 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.Mon, Mar 29, 3:49 PM
huihuiz requested review of this revision.Mon, Mar 29, 3:49 PM
huihuiz updated this revision to Diff 334211.Tue, Mar 30, 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.Tue, Mar 30, 10:50 PM

Looks great!

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