[PATCH] D73832: Ignore/Drop droppable uses for code-sinking in InstCombine
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 12:34:48 PST 2020
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/KnowledgeRetention.cpp:263
+ Assume.bundle_op_infos(), [&Assume](const CallBase::BundleOpInfo &BOI) {
+ return BOI.Begin == BOI.End ||
+ getValueFromBundleOpInfo(Assume, BOI, BOIE_WasOn) != nullptr;
----------------
Tyker wrote:
> jdoerfert wrote:
> > We do we disallow empty BundleOpInfo here?
> i am not sure i understood the question.
>
> we will return true for empty bundles.
>
> this is a simple utility to check if the operand bundle of an llvm.assume still holds any information. it is used in a few places because instcombine was removing instructions like `call void @llvm.assume(i1 true) ["nonnull"(%p)]` because the argument to the call is known to be true so the assume was considered useless which is not true anymore.
>
>
Oh, empty bundles like `call void @llvm.assume(i1 true) ["cold"()]` ?
Maybe we should put a comment here because I will forget again.
Nit: no `!= nullptr`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73832/new/
https://reviews.llvm.org/D73832
More information about the llvm-commits
mailing list