This is an archive of the discontinued LLVM Phabricator instance.

[mlir][CAPI] Allow running pass manager on any operation
ClosedPublic

Authored by rkayaith on Feb 5 2023, 3:17 PM.

Details

Summary

mlirPassManagerRun is currently restricted to running on
builtin.module ops, but this restriction doesn't exist on the C++
side. This renames it to mlirPassManagerRunOnOp and updates it to take
MlirOperation instead of MlirModule.

Depends on D143352

Diff Detail

Event Timeline

rkayaith created this revision.Feb 5 2023, 3:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2023, 3:17 PM
rkayaith updated this revision to Diff 494962.Feb 5 2023, 4:14 PM

fix parse calls

rkayaith published this revision for review.Feb 5 2023, 6:07 PM
rkayaith added reviewers: ftynse, mehdi_amini.
mehdi_amini accepted this revision.Feb 5 2023, 6:19 PM
mehdi_amini added inline comments.
mlir/include/mlir-c/Pass.h
75

Can we delete the old API and name the new one mlirPassManagerRunOnOp? That will make the symbol change name and avoid weird behavior for anyone using the C API for linking to shared library for example.

This revision is now accepted and ready to land.Feb 5 2023, 6:19 PM
rkayaith added inline comments.Feb 5 2023, 6:45 PM
mlir/include/mlir-c/Pass.h
75

No objections from me, but I don't quite understand when we should change the symbol names for these API breaks. Here's a comment from a previous change: https://reviews.llvm.org/D136404#3885547

rkayaith added inline comments.Feb 11 2023, 1:54 PM
mlir/include/mlir-c/Pass.h
75

@ftynse any thoughts here?

rkayaith updated this revision to Diff 501673.Mar 1 2023, 2:45 PM
rkayaith edited the summary of this revision. (Show Details)

rename to mlirPassManagerRunOnOp

This revision was automatically updated to reflect the committed changes.