Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions clang/include/clang/CIR/Dialect/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def HoistAllocas : Pass<"cir-hoist-allocas"> {
}

def FlattenCFG : Pass<"cir-flatten-cfg"> {
let summary = "Produces flatten cfg";
let description = [{
let summary = "Produces flatten CFG";
let description = [{
This pass transforms CIR and inline all the nested regions. Thus,
the next post condtions are met after the pass applied:
- there is not any nested region in a function body
Expand All @@ -132,7 +132,7 @@ def FlattenCFG : Pass<"cir-flatten-cfg"> {
}

def GotoSolver : Pass<"cir-goto-solver"> {
let summary = "Replaces goto operatations with branches";
let summary = "Replaces goto operations with branches";
let description = [{
This pass transforms CIR and replaces goto-s with branch
operations to the proper blocks.
Expand Down
6 changes: 5 additions & 1 deletion clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,11 @@ struct ConvertCIRToLLVMPass

void processCIRAttrs(mlir::ModuleOp moduleOp);

virtual StringRef getArgument() const override { return "cir-flat-to-llvm"; }
StringRef getDescription() const override {
return "Convert the prepared CIR dialect module to LLVM dialect";
Copy link
Member

Choose a reason for hiding this comment

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

Can we get that for free by adding let description for these passes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do not think these passes are described in a TableGen file.
Do you mean we should define them in a TableGen file first and then add such a description there?

}

StringRef getArgument() const override { return "cir-flat-to-llvm"; }
};

mlir::LogicalResult
Expand Down
6 changes: 5 additions & 1 deletion clang/lib/CIR/Lowering/ThroughMLIR/LowerCIRToMLIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ struct ConvertCIRToMLIRPass
}
void runOnOperation() final;

virtual StringRef getArgument() const override { return "cir-to-mlir"; }
StringRef getDescription() const override {
return "Convert the CIR dialect module to MLIR standard dialects";
}

StringRef getArgument() const override { return "cir-to-mlir"; }
};

class CIRCallOpLowering : public mlir::OpConversionPattern<cir::CallOp> {
Expand Down
7 changes: 6 additions & 1 deletion clang/lib/CIR/Lowering/ThroughMLIR/LowerMLIRToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ struct ConvertMLIRToLLVMPass
}
void runOnOperation() final;

virtual StringRef getArgument() const override { return "cir-mlir-to-llvm"; }
StringRef getDescription() const override {
return "Convert the MLIR standard dialects produced from CIR to MLIR LLVM "
"dialect";
}

StringRef getArgument() const override { return "cir-mlir-to-llvm"; }
};

void ConvertMLIRToLLVMPass::runOnOperation() {
Expand Down
Loading