File tree 8 files changed +22
-20
lines changed
include/clang/CIR/Dialect/IR
8 files changed +22
-20
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def CIR_Dialect : Dialect {
22
22
let summary = "A high-level dialect for analyzing and optimizing Clang "
23
23
"supported languages";
24
24
25
- let cppNamespace = "::mlir:: cir";
25
+ let cppNamespace = "::cir";
26
26
27
27
let useDefaultAttributePrinterParser = 0;
28
28
let useDefaultTypePrinterParser = 0;
@@ -31,13 +31,15 @@ def CIR_Dialect : Dialect {
31
31
void registerAttributes();
32
32
void registerTypes();
33
33
34
- Type parseType(DialectAsmParser &parser) const override;
35
- void printType(Type type, DialectAsmPrinter &printer) const override;
34
+ mlir::Type parseType(mlir::DialectAsmParser &parser) const override;
35
+ void printType(mlir::Type type,
36
+ mlir::DialectAsmPrinter &printer) const override;
36
37
37
- Attribute parseAttribute(DialectAsmParser &parser,
38
- Type type) const override;
38
+ mlir:: Attribute parseAttribute(mlir:: DialectAsmParser &parser,
39
+ mlir:: Type type) const override;
39
40
40
- void printAttribute(Attribute attr, DialectAsmPrinter &os) const override;
41
+ void printAttribute(mlir::Attribute attr,
42
+ mlir::DialectAsmPrinter &os) const override;
41
43
}];
42
44
}
43
45
Original file line number Diff line number Diff line change @@ -51,12 +51,12 @@ include "mlir/Interfaces/SideEffectInterfaces.td"
51
51
// following:
52
52
//
53
53
// class CIRFooOpLowering
54
- // : public mlir::OpConversionPattern<mlir:: cir::FooOp> {
54
+ // : public mlir::OpConversionPattern<cir::FooOp> {
55
55
// public:
56
- // using OpConversionPattern<mlir:: cir::FooOp>::OpConversionPattern;
56
+ // using OpConversionPattern<cir::FooOp>::OpConversionPattern;
57
57
//
58
58
// mlir::LogicalResult matchAndRewrite(
59
- // mlir:: cir::FooOp op,
59
+ // cir::FooOp op,
60
60
// OpAdaptor adaptor,
61
61
// mlir::ConversionPatternRewriter &rewriter) const override {
62
62
// rewriter.replaceOpWithNewOp<mlir::LLVM::BarOp>(
@@ -92,7 +92,7 @@ def FuncOp : CIR_Op<"func"> {
92
92
93
93
let skipDefaultBuilders = 1;
94
94
95
- let builders = [OpBuilder<(ins "StringRef":$name)>];
95
+ let builders = [OpBuilder<(ins "llvm:: StringRef":$name)>];
96
96
97
97
let hasCustomAssemblyFormat = 1;
98
98
let hasVerifier = 1;
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ void CIRGenModule::buildGlobal(clang::GlobalDecl gd) {
77
77
void CIRGenModule::buildGlobalFunctionDefinition (clang::GlobalDecl gd,
78
78
mlir::Operation *op) {
79
79
auto const *funcDecl = cast<FunctionDecl>(gd.getDecl ());
80
- auto funcOp = builder.create <mlir:: cir::FuncOp>(
80
+ auto funcOp = builder.create <cir::FuncOp>(
81
81
getLoc (funcDecl->getSourceRange ()), funcDecl->getIdentifier ()->getName ());
82
82
theModule.push_back (funcOp);
83
83
}
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ void CIRGenerator::Initialize(ASTContext &astCtx) {
35
35
this ->astCtx = &astCtx;
36
36
37
37
mlirCtx = std::make_unique<mlir::MLIRContext>();
38
- mlirCtx->loadDialect <mlir:: cir::CIRDialect>();
38
+ mlirCtx->loadDialect <cir::CIRDialect>();
39
39
cgm = std::make_unique<clang::CIRGen::CIRGenModule>(*mlirCtx.get (), astCtx,
40
40
codeGenOpts, diags);
41
41
}
Original file line number Diff line number Diff line change 13
13
#include " clang/CIR/Dialect/IR/CIRDialect.h"
14
14
15
15
using namespace mlir ;
16
- using namespace mlir :: cir;
16
+ using namespace cir ;
17
17
18
18
// ===----------------------------------------------------------------------===//
19
19
// General CIR parsing / printing
Original file line number Diff line number Diff line change 17
17
#include " clang/CIR/Dialect/IR/CIROpsDialect.cpp.inc"
18
18
19
19
using namespace mlir ;
20
- using namespace mlir :: cir;
20
+ using namespace cir ;
21
21
22
22
// ===----------------------------------------------------------------------===//
23
23
// CIR Dialect
24
24
// ===----------------------------------------------------------------------===//
25
25
26
- void mlir:: cir::CIRDialect::initialize () {
26
+ void cir::CIRDialect::initialize () {
27
27
registerTypes ();
28
28
registerAttributes ();
29
29
addOperations<
@@ -36,8 +36,8 @@ void mlir::cir::CIRDialect::initialize() {
36
36
// FuncOp
37
37
// ===----------------------------------------------------------------------===//
38
38
39
- void mlir:: cir::FuncOp::build (OpBuilder &builder, OperationState &result,
40
- StringRef name) {
39
+ void cir::FuncOp::build (OpBuilder &builder, OperationState &result,
40
+ StringRef name) {
41
41
result.addAttribute (SymbolTable::getSymbolAttrName (),
42
42
builder.getStringAttr (name));
43
43
}
@@ -56,7 +56,7 @@ void cir::FuncOp::print(OpAsmPrinter &p) {
56
56
p.printSymbolName (getSymName ());
57
57
}
58
58
59
- mlir::LogicalResult mlir:: cir::FuncOp::verify () { return success (); }
59
+ mlir::LogicalResult cir::FuncOp::verify () { return success (); }
60
60
61
61
// ===----------------------------------------------------------------------===//
62
62
// TableGen'd op method definitions
Original file line number Diff line number Diff line change 13
13
#include " clang/CIR/Dialect/IR/CIRDialect.h"
14
14
15
15
using namespace mlir ;
16
- using namespace mlir :: cir;
16
+ using namespace cir ;
17
17
18
18
// ===----------------------------------------------------------------------===//
19
19
// General CIR parsing / printing
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ CreateFrontendBaseAction(CompilerInstance &CI) {
67
67
case EmitBC: return std::make_unique<EmitBCAction>();
68
68
case EmitCIR:
69
69
#if CLANG_ENABLE_CIR
70
- return std::make_unique<:: cir::EmitCIRAction>();
70
+ return std::make_unique<cir::EmitCIRAction>();
71
71
#else
72
72
llvm_unreachable (" CIR suppport not built into clang" );
73
73
#endif
You can’t perform that action at this time.
0 commit comments