mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-27 02:09:54 +00:00
[polly] Fix non-determinism in polly BlockGenerators
Summary: Iterating over SeenBlocks which is a SmallPtrSet results in non-determinism in codegen Reviewers: jdoerfert, zinob, grosser Tags: #polly Differential Revision: https://reviews.llvm.org/D25778 llvm-svn: 284622
This commit is contained in:
parent
6fd94bf47c
commit
5b1abfc88e
@ -1193,7 +1193,7 @@ void RegionGenerator::copyStmt(ScopStmt &Stmt, LoopToScevMapT <S,
|
||||
|
||||
// Iterate over all blocks in the region in a breadth-first search.
|
||||
std::deque<BasicBlock *> Blocks;
|
||||
SmallPtrSet<BasicBlock *, 8> SeenBlocks;
|
||||
SmallSetVector<BasicBlock *, 8> SeenBlocks;
|
||||
Blocks.push_back(EntryBB);
|
||||
SeenBlocks.insert(EntryBB);
|
||||
|
||||
@ -1232,7 +1232,7 @@ void RegionGenerator::copyStmt(ScopStmt &Stmt, LoopToScevMapT <S,
|
||||
|
||||
// And continue with new successors inside the region.
|
||||
for (auto SI = succ_begin(BB), SE = succ_end(BB); SI != SE; SI++)
|
||||
if (R->contains(*SI) && SeenBlocks.insert(*SI).second)
|
||||
if (R->contains(*SI) && SeenBlocks.insert(*SI))
|
||||
Blocks.push_back(*SI);
|
||||
|
||||
// Remember value in case it is visible after this subregion.
|
||||
|
Loading…
Reference in New Issue
Block a user