File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
clang/include/clang/CIR/Dialect/IR Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -478,28 +478,23 @@ def CIR_PtrStrideOp : CIR_Op<"ptr_stride",[
478478def CIR_ConstantOp : CIR_Op<"const",[
479479 ConstantLike, Pure, AllTypesMatch<["value", "res"]>
480480]> {
481- // FIXME: Use SameOperandsAndResultType or similar and prevent eye bleeding
482- // type repetition in the assembly form.
483-
484- let summary = "Defines a CIR constant";
481+ let summary = "Create a CIR constant from a literal attribute";
485482 let description = [{
486483 The `cir.const` operation turns a literal into an SSA value. The data is
487484 attached to the operation as an attribute.
488485
489486 ```mlir
490- %0 = cir.const 42 : i32
491- %1 = cir.const 4.2 : f32
492- %2 = cir.const nullptr : !cir.ptr<i32 >
487+ %0 = cir.const #cir.int<4> : !u32i
488+ %1 = cir.const #cir.fp<1.500000e+00> : !cir.float
489+ %2 = cir.const #cir.ptr<null> : !cir.ptr<!void >
493490 ```
494491 }];
495492
496- // The constant operation takes an attribute as the only input.
497493 let arguments = (ins TypedAttrInterface:$value);
498494
499- // The constant operation returns a single value of CIR_AnyType.
500495 let results = (outs CIR_AnyType:$res);
501496
502- let assemblyFormat = "attr-dict $value ";
497+ let assemblyFormat = "$value attr-dict";
503498
504499 let hasVerifier = 1;
505500
You can’t perform that action at this time.
0 commit comments