[PATCH] D110623: [SLP] Avoid calculating expensive spill cost when it is not required
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 24 14:52:50 PST 2021
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5370-5371
+ CallInst *CI = dyn_cast<CallInst>(&*PrevInstIt);
+ if ((CI && (!isa<DbgInfoIntrinsic>(CI) || !isa<AssumeInst>(CI) ||
+ !CI->isLifetimeStartOrEnd())) &&
&*PrevInstIt != PrevInst)
----------------
dtemirbulatov wrote:
> ABataev wrote:
> > There is special function `IntrinsicInst::isAssumeLikeIntrinsic()`, use it here
> We already dynamically cast to CallInst and instanceof AssumeInst is way cheaper.
`intrinsicinst::isAssumeLikeIntrinsic()` is way more universal and easier to maintain.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110623/new/
https://reviews.llvm.org/D110623
More information about the llvm-commits
mailing list