[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
Thu Dec 9 05:41:14 PST 2021
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5536-5543
+ bool NoCallInst = true;
+ for (auto &BSIter : BlocksSchedules) {
+ BlockScheduling *BS = BSIter.second.get();
+ if (!BS->NoCalls) {
+ NoCallInst = false;
+ break;
+ }
----------------
```
bool NoCallInst = all_of(BlocksSchedules, [](const decltype(BlocksSchedules)::value_type &BS) {return BSIter.second->NoCalls; }));
```
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7282
}
+ if (isa<CallInst>(I) && !isa<DbgInfoIntrinsic>(I))
+ NoCalls = false;
----------------
lifetime intrinsics are also kind of `DbgInfoIntrinsic`? Or `llvm.assume`? Better to check for all these kinds of intrinsics.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110623/new/
https://reviews.llvm.org/D110623
More information about the llvm-commits
mailing list