Don't rely on the DepCands iteration order when constructing checking pointer groups
authorSilviu Baranga <silviu.baranga@arm.com>
Thu, 9 Jul 2015 15:18:25 +0000 (15:18 +0000)
committerSilviu Baranga <silviu.baranga@arm.com>
Thu, 9 Jul 2015 15:18:25 +0000 (15:18 +0000)
commitf283cd9acfa20799ef46fd52088025d563fac7b3
treeea6eb2207369711c0a711fe416b8500ac82f6525
parent36969278468c29919360b47ac9bc6e9a1ddf684f
Don't rely on the DepCands iteration order when constructing checking pointer groups

Summary:
The checking pointer group construction algorithm relied on the iteration on DepCands.
We would need the same leaders across runs and the same iteration order over the underlying std::set for determinism.

This changes the algorithm to process the pointers in the order in which they were added to the runtime check, which is deterministic.
We need to update the tests, since the order in which pointers appear has changed.

No new tests were added, since it is impossible to test for non-determinism.

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11064

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241809 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/LoopAccessAnalysis.cpp
test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll
test/Analysis/LoopAccessAnalysis/unsafe-and-rt-checks.ll