[PATCH] D35057: [SafepointIRVerifier] Avoid false positives in GC verifier for compare between pointers

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 10:43:09 PDT 2017


skatkov added inline comments.


================
Comment at: lib/IR/SafepointIRVerifier.cpp:230
 static bool
 isExclusivelyConstantDerivedRecursive(const Value *V,
+                                      DenseSet<const Value *> &Visited,
----------------
Don't you want to re-write this utility function without recursion?
In this case you will not need Visited parameter. Also I would suggest this function returns enum BaseType.


================
Comment at: lib/IR/SafepointIRVerifier.cpp:390
+            // pointer.
+            if (AvailableSet.count(LHS) || AvailableSet.count(RHS))
+              return false;
----------------
if both parts are true it means both are relocated pointers, why do we return false? Did I miss anything?


https://reviews.llvm.org/D35057





More information about the llvm-commits mailing list