nikic added inline comments.

================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:929
 
-    if (MDNode *M = NI->getMetadata(LLVMContext::MD_alias_scope))
-      NI->setMetadata(LLVMContext::MD_alias_scope, MDMap[M]);
+    if (MDNode *M = I->getMetadata(LLVMContext::MD_alias_scope))
+      I->setMetadata(LLVMContext::MD_alias_scope, MDMap[M]);
----------------
jeroen.dobbelaere wrote:
> @nikic In the full restrict patches, we also check if the instruction was 
> already handled. I was able to trigger this with an assertion and I have a 
> more or less reduced testcase.
> 
> Either we keep a SmallPtrSet and check if the instruction was already handled 
> (this is what the full restrict version does; See D68509 
> InlineFunction.cpp#969). Or we only replace the metadata if it is in the 
> MDMap (by using MDMap.lookup(M).
> 
> Any preference ?
> 
I don't understand under what circumstances we'd handle an instruction twice.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93040/new/

https://reviews.llvm.org/D93040

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to