[mlir][SCCP] Don't visit private callables unless they are used when tracking interpr...
authorRiver Riddle <riddleriver@gmail.com>
Thu, 10 Dec 2020 20:53:13 +0000 (12:53 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Thu, 10 Dec 2020 20:53:27 +0000 (12:53 -0800)
commitc24f88b4db2ef359f47e976d8d79334ced221288
tree67b95ae06350c8d4037c6ee810b33636f23bf6ec
parent285c0aa262c9255e6ea4efbce1418e5f5f17e9c1
[mlir][SCCP] Don't visit private callables unless they are used when tracking interprocedural arguments/results

This fixes a subtle bug where SCCP could incorrectly optimize a private callable while waiting for its arguments to be resolved.

Fixes PR#48457

Differential Revision: https://reviews.llvm.org/D92976
mlir/lib/Transforms/SCCP.cpp
mlir/test/Transforms/sccp-callgraph.mlir