[PATCH] D72410: [DSE] Eliminate stores by terminators (free,lifetime.end).
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 13:41:13 PDT 2020
fhahn marked 3 inline comments as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1706
+
+ if (isFreeCall(MaybeTerm, &TLI)) {
+ DataLayout DL = MaybeTerm->getParent()->getModule()->getDataLayout();
----------------
asbirlea wrote:
> I'm not sure how expensive the `isFreeCall` is, but the check is already done inside the call to `getLocForTerminator`. You could add a bool optional, or return a pair, if worth eliminating the repeated check.
Done, thanks!
================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:2263
+
+ ToCheck.insert(NextDef->getDefiningAccess());
+ if (OR == OW_Complete) {
----------------
asbirlea wrote:
> I don't understand how this change is related.
It looks like this was a leftover from an earlier rebase. I removed it. It should not be required as it is already added around line 2205.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72410/new/
https://reviews.llvm.org/D72410
More information about the llvm-commits
mailing list