Simple pass that changes all symbols to private unless symbol is excluded (and
in which case there is no change to symbol's visibility).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Looks too specialized and a bit trivial of a task to justify a pass. But otherwise LGTM.
mlir/test/Transforms/test-symbol-privatize.mlir | ||
---|---|---|
2 | Don't need -allow-unregistered... |
mlir/lib/Transforms/SymbolPrivatize.cpp | ||
---|---|---|
41 | I would limit this to the current level of nesting and not walk recursively. |
Comment Actions
This is essentially the MLIR equivalent of LLVM's Internalize pass, so seems fine as an initial implementation of that. We may grow an interface or something to help drive this though, but that can come later.
mlir/include/mlir/Transforms/Passes.td | ||
---|---|---|
220 | ? Slightly more explicit. | |
mlir/lib/Transforms/SymbolPrivatize.cpp | ||
22 | ||
41 | Drop the mlir:: | |
41 | re: Mehdi's comment It would also be good to include this in the documentation. |
? Slightly more explicit.