[PATCH] D72482: [mlir] Add a DCE pass for dead symbols.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 20:11:30 PST 2020


mehdi_amini accepted this revision.
mehdi_amini added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/include/mlir/Transforms/Passes.h:130
+
+/// Creates a pass which delete symbol operations that have are unreachable.
+/// This pass may *only* be scheduled on an operation that defines a
----------------
Typo "have are"


================
Comment at: mlir/lib/Transforms/SymbolDCE.cpp:104
+      // TODO(riverriddle) Add hooks here to allow symbols to provide additional
+      // information, e.g. linakage can be used to drop some symbols that may
+      // otherwise be considered "live".
----------------
typo: `linakage`


================
Comment at: mlir/lib/Transforms/SymbolDCE.cpp:117
+    // Make sure not to recurse when computing uses if this is a symbol table,
+    // we only want uses within the current 'symbolTableOp'.
+    Optional<SymbolTable::UseRange> uses = SymbolTable::getSymbolUses(op);
----------------
I'm not sure what this comment is trying to express here?


================
Comment at: mlir/lib/Transforms/SymbolDCE.cpp:134
+        return failure();
+    }
+
----------------
Could we get the uses after this step? This would reduce slightly the memory pressure during the recursion I think.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72482/new/

https://reviews.llvm.org/D72482





More information about the llvm-commits mailing list