Skip to content

Commit c4fd1fd

Browse files
authored
[mlir][emitc] Rename call op to call_opaque (#72494)
This renames the `emitc.call` op to `emitc.call_opaque` as the existing call op does not refer to the callee by symbol. The rename allows to introduce a new call op alongside with a future `emitc.func` op to model and facilitate functions and function calls.
1 parent 76a441a commit c4fd1fd

File tree

17 files changed

+132
-128
lines changed

17 files changed

+132
-128
lines changed

mlir/docs/Dialects/emitc.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ ops. Those can be translated to C/C++ via the Cpp emitter.
33

44
The following convention is followed:
55

6-
* If template arguments are passed to an `emitc.call` operation, C++ is
6+
* If template arguments are passed to an `emitc.call_opaque` operation, C++ is
77
generated.
88
* If tensors are used, C++ is generated.
9-
* If multiple return values are used within in a functions or an `emitc.call`
10-
operation, C++11 is required.
11-
* If floating-point type template arguments are passed to an `emitc.call`
9+
* If multiple return values are used within in a functions or an
10+
`emitc.call_opaque` operation, C++11 is required.
11+
* If floating-point type template arguments are passed to an `emitc.call_opaque`
1212
operation, C++20 is required.
1313
* Else the generated code is compatible with C99.
1414

mlir/include/mlir/Dialect/EmitC/IR/EmitC.td

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,12 @@ def EmitC_ApplyOp : EmitC_Op<"apply", []> {
9292
let hasVerifier = 1;
9393
}
9494

95-
def EmitC_CallOp : EmitC_Op<"call", []> {
96-
let summary = "Call operation";
95+
def EmitC_CallOpaqueOp : EmitC_Op<"call_opaque", []> {
96+
let summary = "Opaque call operation";
9797
let description = [{
98-
The `call` operation represents a C++ function call. The call allows
99-
specifying order of operands and attributes in the call as follows:
98+
The `call_opaque` operation represents a C++ function call. The callee
99+
can be an arbitrary non-empty string. The call allows specifying order
100+
of operands and attributes in the call as follows:
100101

101102
- integer value of index type refers to an operand;
102103
- attribute which will get lowered to constant value in call;
@@ -105,10 +106,10 @@ def EmitC_CallOp : EmitC_Op<"call", []> {
105106

106107
```mlir
107108
// Custom form defining a call to `foo()`.
108-
%0 = emitc.call "foo" () : () -> i32
109+
%0 = emitc.call_opaque "foo" () : () -> i32
109110

110111
// Generic form of the same operation.
111-
%0 = "emitc.call"() {callee = "foo"} : () -> i32
112+
%0 = "emitc.call_opaque"() {callee = "foo"} : () -> i32
112113
```
113114
}];
114115
let arguments = (ins
@@ -454,7 +455,8 @@ def EmitC_VariableOp : EmitC_Op<"variable", []> {
454455
%1 = "emitc.variable"() {value = 0 : i32} : () -> i32
455456
%2 = emitc.apply "&"(%0) : (i32) -> !emitc.ptr<i32>
456457
%3 = emitc.apply "&"(%1) : (i32) -> !emitc.ptr<i32>
457-
emitc.call "write"(%2, %3) : (!emitc.ptr<i32>, !emitc.ptr<i32>) -> ()
458+
emitc.call_opaque "write"(%2, %3)
459+
: (!emitc.ptr<i32>, !emitc.ptr<i32>) -> ()
458460
```
459461
}];
460462

@@ -477,7 +479,7 @@ def EmitC_AssignOp : EmitC_Op<"assign", []> {
477479
```mlir
478480
// Integer variable
479481
%0 = "emitc.variable"(){value = 42 : i32} : () -> i32
480-
%1 = emitc.call "foo"() : () -> (i32)
482+
%1 = emitc.call_opaque "foo"() : () -> (i32)
481483

482484
// Assign emitted as `... = ...;`
483485
"emitc.assign"(%0, %1) : (i32, i32) -> ()

mlir/lib/Dialect/EmitC/IR/EmitC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ bool CastOp::areCastCompatible(TypeRange inputs, TypeRange outputs) {
131131
// CallOp
132132
//===----------------------------------------------------------------------===//
133133

134-
LogicalResult emitc::CallOp::verify() {
134+
LogicalResult emitc::CallOpaqueOp::verify() {
135135
// Callee must not be empty.
136136
if (getCallee().empty())
137137
return emitOpError("callee must not be empty");

mlir/lib/Target/Cpp/TranslateToCpp.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -412,13 +412,14 @@ static LogicalResult printOperation(CppEmitter &emitter, func::CallOp callOp) {
412412
return success();
413413
}
414414

415-
static LogicalResult printOperation(CppEmitter &emitter, emitc::CallOp callOp) {
415+
static LogicalResult printOperation(CppEmitter &emitter,
416+
emitc::CallOpaqueOp callOpaqueOp) {
416417
raw_ostream &os = emitter.ostream();
417-
Operation &op = *callOp.getOperation();
418+
Operation &op = *callOpaqueOp.getOperation();
418419

419420
if (failed(emitter.emitAssignPrefix(op)))
420421
return failure();
421-
os << callOp.getCallee();
422+
os << callOpaqueOp.getCallee();
422423

423424
auto emitArgs = [&](Attribute attr) -> LogicalResult {
424425
if (auto t = dyn_cast<IntegerAttr>(attr)) {
@@ -441,19 +442,19 @@ static LogicalResult printOperation(CppEmitter &emitter, emitc::CallOp callOp) {
441442
return success();
442443
};
443444

444-
if (callOp.getTemplateArgs()) {
445+
if (callOpaqueOp.getTemplateArgs()) {
445446
os << "<";
446-
if (failed(
447-
interleaveCommaWithError(*callOp.getTemplateArgs(), os, emitArgs)))
447+
if (failed(interleaveCommaWithError(*callOpaqueOp.getTemplateArgs(), os,
448+
emitArgs)))
448449
return failure();
449450
os << ">";
450451
}
451452

452453
os << "(";
453454

454455
LogicalResult emittedArgs =
455-
callOp.getArgs()
456-
? interleaveCommaWithError(*callOp.getArgs(), os, emitArgs)
456+
callOpaqueOp.getArgs()
457+
? interleaveCommaWithError(*callOpaqueOp.getArgs(), os, emitArgs)
457458
: emitter.emitOperands(op);
458459
if (failed(emittedArgs))
459460
return failure();
@@ -949,10 +950,11 @@ LogicalResult CppEmitter::emitOperation(Operation &op, bool trailingSemicolon) {
949950
.Case<cf::BranchOp, cf::CondBranchOp>(
950951
[&](auto op) { return printOperation(*this, op); })
951952
// EmitC ops.
952-
.Case<emitc::AddOp, emitc::ApplyOp, emitc::AssignOp, emitc::CallOp,
953-
emitc::CastOp, emitc::CmpOp, emitc::ConstantOp, emitc::DivOp,
954-
emitc::ForOp, emitc::IfOp, emitc::IncludeOp, emitc::MulOp,
955-
emitc::RemOp, emitc::SubOp, emitc::VariableOp>(
953+
.Case<emitc::AddOp, emitc::ApplyOp, emitc::AssignOp,
954+
emitc::CallOpaqueOp, emitc::CastOp, emitc::CmpOp,
955+
emitc::ConstantOp, emitc::DivOp, emitc::ForOp, emitc::IfOp,
956+
emitc::IncludeOp, emitc::MulOp, emitc::RemOp, emitc::SubOp,
957+
emitc::VariableOp>(
956958
[&](auto op) { return printOperation(*this, op); })
957959
// Func ops.
958960
.Case<func::CallOp, func::ConstantOp, func::FuncOp, func::ReturnOp>(

mlir/test/Conversion/SCFToEmitC/if.mlir

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@
22

33
func.func @test_if(%arg0: i1, %arg1: f32) {
44
scf.if %arg0 {
5-
%0 = emitc.call "func_const"(%arg1) : (f32) -> i32
5+
%0 = emitc.call_opaque "func_const"(%arg1) : (f32) -> i32
66
}
77
return
88
}
99
// CHECK-LABEL: func.func @test_if(
1010
// CHECK-SAME: %[[VAL_0:.*]]: i1,
1111
// CHECK-SAME: %[[VAL_1:.*]]: f32) {
1212
// CHECK-NEXT: emitc.if %[[VAL_0]] {
13-
// CHECK-NEXT: %[[VAL_2:.*]] = emitc.call "func_const"(%[[VAL_1]]) : (f32) -> i32
13+
// CHECK-NEXT: %[[VAL_2:.*]] = emitc.call_opaque "func_const"(%[[VAL_1]]) : (f32) -> i32
1414
// CHECK-NEXT: }
1515
// CHECK-NEXT: return
1616
// CHECK-NEXT: }
1717

1818

1919
func.func @test_if_else(%arg0: i1, %arg1: f32) {
2020
scf.if %arg0 {
21-
%0 = emitc.call "func_true"(%arg1) : (f32) -> i32
21+
%0 = emitc.call_opaque "func_true"(%arg1) : (f32) -> i32
2222
} else {
23-
%0 = emitc.call "func_false"(%arg1) : (f32) -> i32
23+
%0 = emitc.call_opaque "func_false"(%arg1) : (f32) -> i32
2424
}
2525
return
2626
}
2727
// CHECK-LABEL: func.func @test_if_else(
2828
// CHECK-SAME: %[[VAL_0:.*]]: i1,
2929
// CHECK-SAME: %[[VAL_1:.*]]: f32) {
3030
// CHECK-NEXT: emitc.if %[[VAL_0]] {
31-
// CHECK-NEXT: %[[VAL_2:.*]] = emitc.call "func_true"(%[[VAL_1]]) : (f32) -> i32
31+
// CHECK-NEXT: %[[VAL_2:.*]] = emitc.call_opaque "func_true"(%[[VAL_1]]) : (f32) -> i32
3232
// CHECK-NEXT: } else {
33-
// CHECK-NEXT: %[[VAL_3:.*]] = emitc.call "func_false"(%[[VAL_1]]) : (f32) -> i32
33+
// CHECK-NEXT: %[[VAL_3:.*]] = emitc.call_opaque "func_false"(%[[VAL_1]]) : (f32) -> i32
3434
// CHECK-NEXT: }
3535
// CHECK-NEXT: return
3636
// CHECK-NEXT: }
@@ -39,12 +39,12 @@ func.func @test_if_else(%arg0: i1, %arg1: f32) {
3939
func.func @test_if_yield(%arg0: i1, %arg1: f32) {
4040
%0 = arith.constant 0 : i8
4141
%x, %y = scf.if %arg0 -> (i32, f64) {
42-
%1 = emitc.call "func_true_1"(%arg1) : (f32) -> i32
43-
%2 = emitc.call "func_true_2"(%arg1) : (f32) -> f64
42+
%1 = emitc.call_opaque "func_true_1"(%arg1) : (f32) -> i32
43+
%2 = emitc.call_opaque "func_true_2"(%arg1) : (f32) -> f64
4444
scf.yield %1, %2 : i32, f64
4545
} else {
46-
%1 = emitc.call "func_false_1"(%arg1) : (f32) -> i32
47-
%2 = emitc.call "func_false_2"(%arg1) : (f32) -> f64
46+
%1 = emitc.call_opaque "func_false_1"(%arg1) : (f32) -> i32
47+
%2 = emitc.call_opaque "func_false_2"(%arg1) : (f32) -> f64
4848
scf.yield %1, %2 : i32, f64
4949
}
5050
return
@@ -56,13 +56,13 @@ func.func @test_if_yield(%arg0: i1, %arg1: f32) {
5656
// CHECK-NEXT: %[[VAL_3:.*]] = "emitc.variable"() <{value = #emitc.opaque<"">}> : () -> i32
5757
// CHECK-NEXT: %[[VAL_4:.*]] = "emitc.variable"() <{value = #emitc.opaque<"">}> : () -> f64
5858
// CHECK-NEXT: emitc.if %[[VAL_0]] {
59-
// CHECK-NEXT: %[[VAL_5:.*]] = emitc.call "func_true_1"(%[[VAL_1]]) : (f32) -> i32
60-
// CHECK-NEXT: %[[VAL_6:.*]] = emitc.call "func_true_2"(%[[VAL_1]]) : (f32) -> f64
59+
// CHECK-NEXT: %[[VAL_5:.*]] = emitc.call_opaque "func_true_1"(%[[VAL_1]]) : (f32) -> i32
60+
// CHECK-NEXT: %[[VAL_6:.*]] = emitc.call_opaque "func_true_2"(%[[VAL_1]]) : (f32) -> f64
6161
// CHECK-NEXT: emitc.assign %[[VAL_5]] : i32 to %[[VAL_3]] : i32
6262
// CHECK-NEXT: emitc.assign %[[VAL_6]] : f64 to %[[VAL_4]] : f64
6363
// CHECK-NEXT: } else {
64-
// CHECK-NEXT: %[[VAL_7:.*]] = emitc.call "func_false_1"(%[[VAL_1]]) : (f32) -> i32
65-
// CHECK-NEXT: %[[VAL_8:.*]] = emitc.call "func_false_2"(%[[VAL_1]]) : (f32) -> f64
64+
// CHECK-NEXT: %[[VAL_7:.*]] = emitc.call_opaque "func_false_1"(%[[VAL_1]]) : (f32) -> i32
65+
// CHECK-NEXT: %[[VAL_8:.*]] = emitc.call_opaque "func_false_2"(%[[VAL_1]]) : (f32) -> f64
6666
// CHECK-NEXT: emitc.assign %[[VAL_7]] : i32 to %[[VAL_3]] : i32
6767
// CHECK-NEXT: emitc.assign %[[VAL_8]] : f64 to %[[VAL_4]] : f64
6868
// CHECK-NEXT: }

mlir/test/Dialect/EmitC/attrs.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// CHECK-LABEL: func @opaque_attrs() {
66
func.func @opaque_attrs() {
77
// CHECK-NEXT: #emitc.opaque<"attr">
8-
emitc.call "f"() {args = [#emitc.opaque<"attr">]} : () -> ()
8+
emitc.call_opaque "f"() {args = [#emitc.opaque<"attr">]} : () -> ()
99
// CHECK-NEXT: #emitc.opaque<"\22quoted_attr\22">
10-
emitc.call "f"() {args = [#emitc.opaque<"\"quoted_attr\"">]} : () -> ()
10+
emitc.call_opaque "f"() {args = [#emitc.opaque<"\"quoted_attr\"">]} : () -> ()
1111
return
1212
}

mlir/test/Dialect/EmitC/invalid_ops.mlir

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,48 +25,48 @@ func.func @empty_constant() {
2525
// -----
2626

2727
func.func @index_args_out_of_range_1() {
28-
// expected-error @+1 {{'emitc.call' op index argument is out of range}}
29-
emitc.call "test" () {args = [0 : index]} : () -> ()
28+
// expected-error @+1 {{'emitc.call_opaque' op index argument is out of range}}
29+
emitc.call_opaque "test" () {args = [0 : index]} : () -> ()
3030
return
3131
}
3232

3333
// -----
3434

3535
func.func @index_args_out_of_range_2(%arg : i32) {
36-
// expected-error @+1 {{'emitc.call' op index argument is out of range}}
37-
emitc.call "test" (%arg, %arg) {args = [2 : index]} : (i32, i32) -> ()
36+
// expected-error @+1 {{'emitc.call_opaque' op index argument is out of range}}
37+
emitc.call_opaque "test" (%arg, %arg) {args = [2 : index]} : (i32, i32) -> ()
3838
return
3939
}
4040

4141
// -----
4242

4343
func.func @empty_callee() {
44-
// expected-error @+1 {{'emitc.call' op callee must not be empty}}
45-
emitc.call "" () : () -> ()
44+
// expected-error @+1 {{'emitc.call_opaque' op callee must not be empty}}
45+
emitc.call_opaque "" () : () -> ()
4646
return
4747
}
4848

4949
// -----
5050

5151
func.func @nonetype_arg(%arg : i32) {
52-
// expected-error @+1 {{'emitc.call' op array argument has no type}}
53-
emitc.call "nonetype_arg"(%arg) {args = [0 : index, [0, 1, 2]]} : (i32) -> i32
52+
// expected-error @+1 {{'emitc.call_opaque' op array argument has no type}}
53+
emitc.call_opaque "nonetype_arg"(%arg) {args = [0 : index, [0, 1, 2]]} : (i32) -> i32
5454
return
5555
}
5656

5757
// -----
5858

5959
func.func @array_template_arg(%arg : i32) {
60-
// expected-error @+1 {{'emitc.call' op template argument has invalid type}}
61-
emitc.call "nonetype_template_arg"(%arg) {template_args = [[0, 1, 2]]} : (i32) -> i32
60+
// expected-error @+1 {{'emitc.call_opaque' op template argument has invalid type}}
61+
emitc.call_opaque "nonetype_template_arg"(%arg) {template_args = [[0, 1, 2]]} : (i32) -> i32
6262
return
6363
}
6464

6565
// -----
6666

6767
func.func @dense_template_argument(%arg : i32) {
68-
// expected-error @+1 {{'emitc.call' op template argument has invalid type}}
69-
emitc.call "dense_template_argument"(%arg) {template_args = [dense<[1.0, 1.0]> : tensor<2xf32>]} : (i32) -> i32
68+
// expected-error @+1 {{'emitc.call_opaque' op template argument has invalid type}}
69+
emitc.call_opaque "dense_template_argument"(%arg) {template_args = [dense<[1.0, 1.0]> : tensor<2xf32>]} : (i32) -> i32
7070
return
7171
}
7272

mlir/test/Dialect/EmitC/ops.mlir

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ emitc.include "test.h"
88

99
// CHECK-LABEL: func @f(%{{.*}}: i32, %{{.*}}: !emitc.opaque<"int32_t">) {
1010
func.func @f(%arg0: i32, %f: !emitc.opaque<"int32_t">) {
11-
%1 = "emitc.call"() {callee = "blah"} : () -> i64
12-
emitc.call "foo" (%1) {args = [
11+
%1 = "emitc.call_opaque"() {callee = "blah"} : () -> i64
12+
emitc.call_opaque "foo" (%1) {args = [
1313
0 : index, dense<[0, 1]> : tensor<2xi32>, 0 : index
1414
]} : (i64) -> ()
1515
return
@@ -100,24 +100,24 @@ func.func @cmp(%arg0 : i32, %arg1 : f32, %arg2 : i64, %arg3 : f64, %arg4 : !emit
100100

101101
func.func @test_if(%arg0: i1, %arg1: f32) {
102102
emitc.if %arg0 {
103-
%0 = emitc.call "func_const"(%arg1) : (f32) -> i32
103+
%0 = emitc.call_opaque "func_const"(%arg1) : (f32) -> i32
104104
}
105105
return
106106
}
107107

108108
func.func @test_if_explicit_yield(%arg0: i1, %arg1: f32) {
109109
emitc.if %arg0 {
110-
%0 = emitc.call "func_const"(%arg1) : (f32) -> i32
110+
%0 = emitc.call_opaque "func_const"(%arg1) : (f32) -> i32
111111
emitc.yield
112112
}
113113
return
114114
}
115115

116116
func.func @test_if_else(%arg0: i1, %arg1: f32) {
117117
emitc.if %arg0 {
118-
%0 = emitc.call "func_true"(%arg1) : (f32) -> i32
118+
%0 = emitc.call_opaque "func_true"(%arg1) : (f32) -> i32
119119
} else {
120-
%0 = emitc.call "func_false"(%arg1) : (f32) -> i32
120+
%0 = emitc.call_opaque "func_false"(%arg1) : (f32) -> i32
121121
}
122122
return
123123
}
@@ -130,22 +130,22 @@ func.func @test_assign(%arg1: f32) {
130130

131131
func.func @test_for(%arg0 : index, %arg1 : index, %arg2 : index) {
132132
emitc.for %i0 = %arg0 to %arg1 step %arg2 {
133-
%0 = emitc.call "func_const"(%i0) : (index) -> i32
133+
%0 = emitc.call_opaque "func_const"(%i0) : (index) -> i32
134134
}
135135
return
136136
}
137137

138138
func.func @test_for_explicit_yield(%arg0 : index, %arg1 : index, %arg2 : index) {
139139
emitc.for %i0 = %arg0 to %arg1 step %arg2 {
140-
%0 = emitc.call "func_const"(%i0) : (index) -> i32
140+
%0 = emitc.call_opaque "func_const"(%i0) : (index) -> i32
141141
emitc.yield
142142
}
143143
return
144144
}
145145

146146
func.func @test_for_not_index_induction(%arg0 : i16, %arg1 : i16, %arg2 : i16) {
147147
emitc.for %i0 = %arg0 to %arg1 step %arg2 : i16 {
148-
%0 = emitc.call "func_const"(%i0) : (i16) -> i32
148+
%0 = emitc.call_opaque "func_const"(%i0) : (i16) -> i32
149149
}
150150
return
151151
}

mlir/test/Dialect/EmitC/types.mlir

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,37 @@
55
// CHECK-LABEL: func @opaque_types() {
66
func.func @opaque_types() {
77
// CHECK-NEXT: !emitc.opaque<"int">
8-
emitc.call "f"() {template_args = [!emitc<opaque<"int">>]} : () -> ()
8+
emitc.call_opaque "f"() {template_args = [!emitc<opaque<"int">>]} : () -> ()
99
// CHECK-NEXT: !emitc.opaque<"byte">
10-
emitc.call "f"() {template_args = [!emitc<opaque<"byte">>]} : () -> ()
10+
emitc.call_opaque "f"() {template_args = [!emitc<opaque<"byte">>]} : () -> ()
1111
// CHECK-NEXT: !emitc.opaque<"unsigned">
12-
emitc.call "f"() {template_args = [!emitc<opaque<"unsigned">>]} : () -> ()
12+
emitc.call_opaque "f"() {template_args = [!emitc<opaque<"unsigned">>]} : () -> ()
1313
// CHECK-NEXT: !emitc.opaque<"status_t">
14-
emitc.call "f"() {template_args = [!emitc<opaque<"status_t">>]} : () -> ()
14+
emitc.call_opaque "f"() {template_args = [!emitc<opaque<"status_t">>]} : () -> ()
1515
// CHECK-NEXT: !emitc.opaque<"std::vector<std::string>">
16-
emitc.call "f"() {template_args = [!emitc.opaque<"std::vector<std::string>">]} : () -> ()
16+
emitc.call_opaque "f"() {template_args = [!emitc.opaque<"std::vector<std::string>">]} : () -> ()
1717
// CHECK-NEXT: !emitc.opaque<"SmallVector<int*, 4>">
18-
emitc.call "f"() {template_args = [!emitc.opaque<"SmallVector<int*, 4>">]} : () -> ()
18+
emitc.call_opaque "f"() {template_args = [!emitc.opaque<"SmallVector<int*, 4>">]} : () -> ()
1919

2020
return
2121
}
2222

2323
// CHECK-LABEL: func @pointer_types() {
2424
func.func @pointer_types() {
2525
// CHECK-NEXT: !emitc.ptr<i32>
26-
emitc.call "f"() {template_args = [!emitc.ptr<i32>]} : () -> ()
26+
emitc.call_opaque "f"() {template_args = [!emitc.ptr<i32>]} : () -> ()
2727
// CHECK-NEXT: !emitc.ptr<i64>
28-
emitc.call "f"() {template_args = [!emitc.ptr<i64>]} : () -> ()
28+
emitc.call_opaque "f"() {template_args = [!emitc.ptr<i64>]} : () -> ()
2929
// CHECK-NEXT: !emitc.ptr<f32>
30-
emitc.call "f"() {template_args = [!emitc.ptr<f32>]} : () -> ()
30+
emitc.call_opaque "f"() {template_args = [!emitc.ptr<f32>]} : () -> ()
3131
// CHECK-NEXT: !emitc.ptr<f64>
32-
emitc.call "f"() {template_args = [!emitc.ptr<f64>]} : () -> ()
32+
emitc.call_opaque "f"() {template_args = [!emitc.ptr<f64>]} : () -> ()
3333
// CHECK-NEXT: !emitc.ptr<i32>
34-
%0 = emitc.call "f"() : () -> (!emitc.ptr<i32>)
34+
%0 = emitc.call_opaque "f"() : () -> (!emitc.ptr<i32>)
3535
// CHECK-NEXT: (!emitc.ptr<i32>) -> !emitc.ptr<!emitc.ptr<i32>>
36-
%1 = emitc.call "f"(%0) : (!emitc.ptr<i32>) -> (!emitc.ptr<!emitc.ptr<i32>>)
36+
%1 = emitc.call_opaque "f"(%0) : (!emitc.ptr<i32>) -> (!emitc.ptr<!emitc.ptr<i32>>)
3737
// CHECK-NEXT: !emitc.ptr<!emitc.opaque<"int">>
38-
emitc.call "f"() {template_args = [!emitc.ptr<!emitc.opaque<"int">>]} : () -> ()
38+
emitc.call_opaque "f"() {template_args = [!emitc.ptr<!emitc.opaque<"int">>]} : () -> ()
3939

4040
return
4141
}

0 commit comments

Comments
 (0)