Skip to content

Passes.h requires extra dependency on MLIRMathToEmitC #125360

@RoboTux

Description

@RoboTux

Hi,

Including Passes.h with a dependency on MLIRPass fails with the following error:

mlir/include/mlir/Conversion/MathToEmitC/MathToEmitC.h:11,
mlir/include/mlir/Conversion/MathToEmitC/MathToEmitCPass.h:12,
mlir/include/mlir/Conversion/Passes.h:44,
[...]
mlir/include/mlir/Dialect/EmitC/IR/EmitC.h:28:10: fatal error: mlir/Dialect/EmitC/IR/EmitCEnums.h.inc: No such file or directory

A dependency on MLIRMathToEmitC solves the problem of course but requires the user of Passes.h to know that that conversion is included and that it needs an extra dependency for mlir-tablegen to generate the right file. Likewise adding the dependency on MLIRMathToEmitC in MLIRPass would mean special casing MathToEmitC since none of the other conversions need a dependency on their library. I'm not sure how to handle this correctly, perhaps the dependency of MathToEmitCPass.h on LanguageTarget can be avoided?

@recursion-man any thought?

Best regards,
Thomas

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions