[PATCH] D93040: [InlineFunction] Use llvm.experimental.noalias.scope.decl for noalias arguments.
Jeroen Dobbelaere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 1 02:09:57 PST 2021
jeroen.dobbelaere 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]);
----------------
@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 ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93040/new/
https://reviews.llvm.org/D93040
More information about the llvm-commits
mailing list