[PATCH] D35663: [Polly] Remove dependency of `Scop::getStmtFor(Inst)` on `getStmtFor(BB)`. [NFC].

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 05:52:27 PDT 2017


Meinersbur added a comment.

This is good, just the additional assertion would be nice.



================
Comment at: lib/Analysis/ScopInfo.cpp:4759
+  for (Instruction &Inst : *BB)
+    InstStmtMap[&Inst] = Stmt;
 }
----------------
[Suggestion] Could you add an assertion here that checks that the instruction is not yet mapped to something else?


================
Comment at: lib/Analysis/ScopInfo.cpp:4769
+    for (Instruction &Inst : *BB)
+      InstStmtMap[&Inst] = Stmt;
+  }
----------------
Here too.


https://reviews.llvm.org/D35663





More information about the llvm-commits mailing list