[polly] r252522 - Revert r252375 "Fix non-affine region dominance of implicitely stored values"

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 14:37:29 PST 2015


Author: meinersbur
Date: Mon Nov  9 16:37:29 2015
New Revision: 252522

URL: http://llvm.org/viewvc/llvm-project?rev=252522&view=rev
Log:
Revert r252375 "Fix non-affine region dominance of implicitely stored values"

It introduced indeterminism as it was iterating over an address-indexed
hashtable. The corresponding bug PR25438 will be fixed in a successive
commit.

Modified:
    polly/trunk/lib/CodeGen/BlockGenerators.cpp
    polly/trunk/test/Isl/CodeGen/non-affine-region-implicit-store.ll

Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=252522&r1=252521&r2=252522&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Mon Nov  9 16:37:29 2015
@@ -1076,6 +1076,10 @@ void RegionGenerator::copyStmt(ScopStmt
     for (auto SI = succ_begin(BB), SE = succ_end(BB); SI != SE; SI++)
       if (R->contains(*SI) && SeenBlocks.insert(*SI).second)
         Blocks.push_back(*SI);
+
+    // Remember value in case it is visible after this subregion.
+    if (DT.dominates(BB, R->getExit()))
+      ValueMap.insert(RegionMap.begin(), RegionMap.end());
   }
 
   // Now create a new dedicated region exit block and add it to the region map.
@@ -1086,12 +1090,6 @@ void RegionGenerator::copyStmt(ScopStmt
 
   repairDominance(R->getExit(), ExitBBCopy);
 
-  // Remember value in case it is visible after this subregion. Only values that
-  // dominate the exit node can be visible.
-  for (auto &Pair : RegionMaps)
-    if (DT.properlyDominates(Pair.first, ExitBBCopy))
-      ValueMap.insert(Pair.second.begin(), Pair.second.end());
-
   // As the block generator doesn't handle control flow we need to add the
   // region control flow by hand after all blocks have been copied.
   for (BasicBlock *BB : SeenBlocks) {

Modified: polly/trunk/test/Isl/CodeGen/non-affine-region-implicit-store.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/non-affine-region-implicit-store.ll?rev=252522&r1=252521&r2=252522&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/non-affine-region-implicit-store.ll (original)
+++ polly/trunk/test/Isl/CodeGen/non-affine-region-implicit-store.ll Mon Nov  9 16:37:29 2015
@@ -1,5 +1,5 @@
 ; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
-;
+; XFAIL: *
 ; llvm.org/PR25438
 ; After loop versioning, a dominance check of a non-affine subregion's exit node
 ; causes the dominance check to always fail any block in the scop. The




More information about the llvm-commits mailing list