Skip to content

Add a sample operation pass to standalone-opt #57827

@nicholaiTukanov

Description

@nicholaiTukanov

Hi,

I am requesting a feature for the standalone optimizer driver example.

I am trying to learn how to write an Operation pass for a simple dialect in order to learn more about MLIR. Thus, I figured the standalone optimizer driver is the easiest route for this, since I do not have to write an entire compiler for it (also, I believe this is closer to how it is done in LLVM where a shared object with a pass is loaded into the opt tool).

Is this possible?

Also, is there a place for a newbie to learn more about Operation passes? I am somewhat familiar with LLVM passes, but not writing entire compilers.

Specifically, I am looking for a more detailed tutorial than what is in the mlir docs. Ideally, I would like to see the specific files that needed to be included or general directory organization.

Apologies if this is a dumb question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImproving things as opposed to bug fixing, e.g. new or missing featuretools:opt

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions