This revision adds support for propagating constants across symbol-based callgraph edges. It uses the existing Call/CallableOpInterfaces to detect the dataflow edges, and propagates constants through arguments and out of returns.
Depends On D78522
Paths
| Differential D78592
[mlir][SCCP] Add support for propagating across symbol based calls ClosedPublic Authored by rriddle on Apr 21 2020, 3:21 PM.
Details Summary This revision adds support for propagating constants across symbol-based callgraph edges. It uses the existing Call/CallableOpInterfaces to detect the dataflow edges, and propagates constants through arguments and out of returns. Depends On D78522
Diff Detail
Event TimelineComment Actions Looks great!
When can the arguments not be tracked? And shouldn't the CallableOpInterface guarantee that?
Comment Actions
I thought I had a reason originally, but after thinking about it the constraints of symbol visibility already guarantee this today. Comment Actions
Could you say a line or two on what 'initial' is or what other things you want to add in the near term? Comment Actions
It'd be good to incorporate this understanding somewhere as a comment.
Sorry about the delay - I should be able to get back on this by later today. bondhugula marked an inline comment as done. Comment ActionsLooks great overall. A bunch of mostly minor comments on tweaking doc/comments. Feel free to ignore the minor ones if not necessary. Many of them are also due to the order in which I looked at the changes and "local" reading.
This revision now requires changes to proceed.Apr 25 2020, 11:44 PM bondhugula added inline comments.
rriddle marked 24 inline comments as done. Comment ActionsResolve comments
bondhugula added inline comments.
This revision is now accepted and ready to land.Apr 27 2020, 2:47 AM Closed by commit rGa90151d67e23: [mlir][SCCP] Add support for propagating across symbol based calls (authored by rriddle). · Explain WhyApr 27 2020, 1:29 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 260445 mlir/include/mlir/IR/SymbolTable.h
mlir/include/mlir/Interfaces/CallInterfaces.td
mlir/lib/IR/SymbolTable.cpp
mlir/lib/Transforms/Inliner.cpp
mlir/lib/Transforms/SCCP.cpp
mlir/test/Transforms/sccp-callgraph.mlir
mlir/test/lib/Dialect/Test/TestOps.td
|
Rephrase to clarify which uses are being referred to.