Skip to content

Conversation

terapines-osc-cir
Copy link
Contributor

The PR 1742 contains too many conflicts with the main branch.

Got it re-patched to the current main branch.

/// Create a pass for transforming CIR operations to more 'scf' dialect-friendly
/// forms. It rewrites operations that aren't supported by 'scf', such as breaks
/// and continues.
std::unique_ptr<mlir::Pass> createMLIRLoweringPreparePass();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit skeptical of having an MLIRLoweringPrepare pass that is separate from the existing LoweringPrepare pass. For one thing, "lowering through MLIR" is a very vague concept. The fact that you're mentioning scf as the target dialect here is good. I'd like to consider what's in LoweringPrepare to see if things can be reorganized in a more general way so anyone lowering to arbitrary dialects will be able to reason about what passes they need to run to prepare.

@@ -0,0 +1,112 @@
#include "mlir/IR/BuiltinOps.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a file header comment block.


namespace cir {

struct MLIRLoweringPrepare
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be in the lib/CIR/Dialects/Transforms directory. That, of course, relates to my comment above about the focus of this pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants