[PATCH] D33756: [RS4GC] Drop invalid metadata after pointers are relocated

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 10:55:16 PDT 2017


reames requested changes to this revision.
reames added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:2351
+    // metadata that's invalid after RS4GC.
+    if (isa<LoadInst>(I) && I.getMetadata(LLVMContext::MD_invariant_load))
+      I.dropUnknownNonDebugMetadata(KnownIDs);
----------------
I think that a better factoring on this would be to factor out something from RemoveNonValidAttrAtIndex which works on a load, call it on a load, then add !invariant.load to that list.  This is not specific to invariant load.  Really, we'd just completely failed to think about loads in implementing this.


https://reviews.llvm.org/D33756





More information about the llvm-commits mailing list