[PATCH] D29316: Add predicateinfo intrinsic, analysis pass, and basic NewGVN support

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 10:54:56 PST 2017


dberlin added inline comments.


================
Comment at: lib/Transforms/Utils/PredicateInfo.cpp:86-87
+  mutable DenseMap<const BasicBlock *, OrderedBasicBlock *> OBBMap;
+  ValueDFS_Compare(DenseMap<const BasicBlock *, OrderedBasicBlock *> &OBBMap)
+      : OBBMap(OBBMap) {}
+  bool operator()(const ValueDFS &A, const ValueDFS &B) const {
----------------
Prazek wrote:
> Is it ok here to copy the map?
No.We really don't want it copying the map


================
Comment at: lib/Transforms/Utils/PredicateInfo.cpp:557-558
+PredicateInfo::~PredicateInfo() {
+  for (auto KV : OBBMap)
+    delete KV.second;
+}
----------------
Prazek wrote:
> Why just not store unique_ptrs inside the map?
Yeah, i'll fix it.


https://reviews.llvm.org/D29316





More information about the llvm-commits mailing list