summaryrefslogtreecommitdiff
path: root/mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp
diff options
context:
space:
mode:
authorHenrich Lauko <xlauko@mail.muni.cz>2024-09-10 10:08:41 +0200
committerGitHub <noreply@github.com>2024-09-10 10:08:41 +0200
commit958f59d90fbc1cb2ae186246c8a64fec9e3ecd6e (patch)
tree0f97c0e6ca9c490d101648e433ae345cb90add4c /mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp
parent1581183d59b87760521e7223df3ff25c57e72fb3 (diff)
[MLIR] Make `resolveCallable` customizable in `CallOpInterface` (#100361)
Allow customization of the `resolveCallable` method in the `CallOpInterface`. This change allows for operations implementing this interface to provide their own logic for resolving callables. - Introduce the `resolveCallable` method, which does not include the optional symbol table parameter. This method replaces the previously existing extra class declaration `resolveCallable`. - Introduce the `resolveCallableInTable` method, which incorporates the symbol table parameter. This method replaces the previous extra class declaration `resolveCallable` that used the optional symbol table parameter.
Diffstat (limited to 'mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp')
-rw-r--r--mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp b/mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp
index 532480b6fad5..beb68018a3b1 100644
--- a/mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp
+++ b/mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp
@@ -297,7 +297,7 @@ LogicalResult DeadCodeAnalysis::visit(ProgramPoint point) {
}
void DeadCodeAnalysis::visitCallOperation(CallOpInterface call) {
- Operation *callableOp = call.resolveCallable(&symbolTable);
+ Operation *callableOp = call.resolveCallableInTable(&symbolTable);
// A call to a externally-defined callable has unknown predecessors.
const auto isExternalCallable = [this](Operation *op) {