EnzymeAD / EnzymeAD/Enzyme

[MLIR] MLIREnzymeAnalysis fails to build: getSuccessorInputs removed in current MLIR

Open
#2,858 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
LLVM
Stars
1.7k
Forks
188
Avg merge
1d 22h
Merged PRs (30d)
26

Description

## `MLIREnzymeAnalysis` fails to build against current MLIR (`getSuccessorInputs` removed)

`enzyme/Enzyme/MLIR/Analysis/ActivityAnalysis.cpp` calls
`RegionBranchOpInterface::getSuccessorInputs` and
`RegionBranchTerminatorOpInterface` in a way that no longer compiles
against MLIR main (and LLVM/MLIR 22). Both APIs were changed as part of
the region branch interface refactor upstream.

### Error

```
ActivityAnalysis.cpp:1169:28: error: 'class mlir::RegionBranchOpInterface'
has no member named 'getSuccessorInputs'; did you mean 'getSuccessorRegions'?

ActivityAnalysis.cpp:1284:37: error: no match for call to
'(...lambda...)(mlir::Operation*&, mlir::RegionBranchTerminatorOpInterface,
std::deque&)'
note: no known conversion for argument 2 from
'mlir::RegionBranchTerminatorOpInterface' to 'mlir::RegionBranchPoint'
```

### Impact

`MLIREnzymeAnalysis` is a transitive dependency of `MLIREnzymeTransforms`
and `enzymemlir-opt`, so the entire MLIR test suite (`test/MLIR/`) is
currently broken on main.

### Relevant upstream change

`getSuccessorInputs` was removed and `RegionBranchTerminatorOpInterface`
was replaced by `RegionBranchPoint` in the MLIR region branch interface
refactor. The fix likely involves updating the two call sites in
`ActivityAnalysis.cpp` to use the new API.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.