Skip to content

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

Description

@agarret7

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<mlir::Block*>&)'
    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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions