[PATCH] D95141: [InstCombine] Remove unused llvm.experimental.noalias.scope.decl
Jeroen Dobbelaere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 24 04:43:11 PST 2021
jeroen.dobbelaere marked an inline comment as done.
jeroen.dobbelaere added a comment.
Thanks. I'll still do the small refactoring recommended by @jdoerfert and then do the commits.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3789
+ }
+ };
+
----------------
jdoerfert wrote:
> Style: I would prefer early exits but feel free to ignore if you think its not better.
> ```
> const auto *MDScopeList = dyn_cast_or_null<MDNode>(ScopeList);
> if (!MDScopeList || !Container.insert(MDSCopeList).second)
> return;
> for (auto &MDOperand : MDScopeList->operands())
> if (auto *MDScope = dyn_cast<MDNode>(MDOperand))
> Container.insert(MDScope);
> ```
>
> ---
>
> Is it legal that the cast fails? If the verifier would complain we might just assume it is an MDNode.
ok.
I don't think the verifier is already complaining. I am all for making this more strict, but rather do this in a followup patch.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95141/new/
https://reviews.llvm.org/D95141
More information about the llvm-commits
mailing list