[PATCH] An Assumption-Tracking Pass

hfinkel at anl.gov hfinkel at anl.gov
Tue Aug 12 22:00:11 PDT 2014


================
Comment at: include/llvm/Analysis/AssumptionTracker.h:56-58
@@ +55,5 @@
+        : CallbackVH(I), AT(AT), F(nullptr) {
+        if (I != DMI::getEmptyKey() && I != DMI::getTombstoneKey() &&
+            I->getParent())
+          F = I->getParent()->getParent();
+      }
----------------
Chandler Carruth wrote:
> Why do you support building these for instructions without parents?
Hrmm... maybe this is not needed, IIRC it comes from.... Currently, in AssumptionTracker::ATCallCallbackVH::deleted() I have this:
 I->second.erase(cast<CallInst>(getValPtr()))
this causes a new temporary ATCallCallbackVH to be created from getValPtr() in order to remove *this from the map. getValPtr() has already been removed from its parent function, and so it has no parent, which is why this was needed.

http://reviews.llvm.org/D4689






More information about the llvm-commits mailing list