[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
Mon Dec 13 05:27:19 PST 2021
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5369
// Debug information does not impact spill cost.
- if ((isa<CallInst>(&*PrevInstIt) &&
- !isa<DbgInfoIntrinsic>(&*PrevInstIt)) &&
+ CallInst *CI = dyn_cast<CallInst>(&*PrevInstIt);
+ if ((CI && (!isa<DbgInfoIntrinsic>(CI) || !isa<AssumeInst>(CI) ||
----------------
`auto *CI`
================
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)
----------------
There is special function `IntrinsicInst::isAssumeLikeIntrinsic()`, use it here
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7279
}
+ CallInst *CI = dyn_cast<CallInst>(I);
+ if (CI && (!isa<DbgInfoIntrinsic>(I) || !isa<AssumeInst>(I) ||
----------------
`auto *CI`
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7280
+ CallInst *CI = dyn_cast<CallInst>(I);
+ if (CI && (!isa<DbgInfoIntrinsic>(I) || !isa<AssumeInst>(I) ||
+ !CI->isLifetimeStartOrEnd()))
----------------
There is special function `IntrinsicInst::isAssumeLikeIntrinsic()`, use it here
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110623/new/
https://reviews.llvm.org/D110623
More information about the llvm-commits
mailing list