Make sure the each instruction is mapped to one memory access.
authorHongbin Zheng <etherzhhb@gmail.com>
Tue, 16 Jul 2013 15:18:51 +0000 (15:18 +0000)
committerHongbin Zheng <etherzhhb@gmail.com>
Tue, 16 Jul 2013 15:18:51 +0000 (15:18 +0000)
llvm-svn: 186417

polly/lib/Analysis/ScopInfo.cpp

index c0aeb0c..d2c8b0a 100644 (file)
@@ -486,6 +486,8 @@ void ScopStmt::buildAccesses(TempScop &tempScop, const Region &CurRegion) {
                                       E = AccFuncs->end();
        I != E; ++I) {
     MemAccs.push_back(new MemoryAccess(I->first, I->second, this));
+    assert(!InstructionToAccess.count(I->second)
+           && "Unexpected 1-to-N mapping on instruction to access map!");
     InstructionToAccess[I->second] = MemAccs.back();
   }
 }