[PATCH] D72410: [DSE] Eliminate stores by terminators (free,lifetime.end).

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 7 13:03:15 PDT 2020


asbirlea added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1706
+
+    if (isFreeCall(MaybeTerm, &TLI)) {
+      DataLayout DL = MaybeTerm->getParent()->getModule()->getDataLayout();
----------------
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.


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:2263
+
+        ToCheck.insert(NextDef->getDefiningAccess());
+        if (OR == OW_Complete) {
----------------
I don't understand how this change is related.


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