Skip to content

Commit 4a5180e

Browse files
committed
[Heavy] Export (heavy mlit) add-argument
1 parent 730a009 commit 4a5180e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

heavy/lib/Mlir.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ heavy::ExternSyntax<> create_op;
4040
heavy::ExternFunction create_op_impl;
4141
heavy::ExternFunction region;
4242
heavy::ExternFunction entry_block;
43+
heavy::ExternFunction add_argument;
4344
heavy::ExternFunction results;
4445
heavy::ExternFunction result;
4546
heavy::ExternFunction at_block_begin;
@@ -135,9 +136,7 @@ void create_op_impl(Context& C, ValueRefs Args) {
135136

136137
// operands
137138
for (heavy::Value V : Operands->getElements()) {
138-
// FIXME
139-
// Implicitly unwrapping lists here because
140-
// unquote-splicing is not implemented.
139+
// Implicitly unwrap lists.
141140
if (isa<heavy::Pair, heavy::Empty>(V)) {
142141
for (heavy::Value V2 : V) {
143142
auto MVal = any_cast<mlir::Value>(V2);
@@ -846,6 +845,7 @@ void HEAVY_MLIR_INIT(heavy::Context& C) {
846845
HEAVY_MLIR_VAR(create_op_impl) = heavy::mlir_bind::create_op_impl;
847846
HEAVY_MLIR_VAR(region) = heavy::mlir_bind::region;
848847
HEAVY_MLIR_VAR(entry_block) = heavy::mlir_bind::entry_block;
848+
HEAVY_MLIR_VAR(add_argument) = heavy::mlir_bind::add_argument;
849849
HEAVY_MLIR_VAR(results) = heavy::mlir_bind::results;
850850
HEAVY_MLIR_VAR(result) = heavy::mlir_bind::result;
851851
HEAVY_MLIR_VAR(at_block_begin) = heavy::mlir_bind::at_block_begin;
@@ -880,6 +880,7 @@ void HEAVY_MLIR_LOAD_MODULE(heavy::Context& C) {
880880
{"current-builder", HEAVY_MLIR_VAR(current_builder).get_binding(C)},
881881
{"region", HEAVY_MLIR_VAR(region)},
882882
{"entry-block", HEAVY_MLIR_VAR(entry_block)},
883+
{"add-argument", HEAVY_MLIR_VAR(add_argument)},
883884
{"results", HEAVY_MLIR_VAR(results)},
884885
{"result", HEAVY_MLIR_VAR(result)},
885886
{"at-block-begin", HEAVY_MLIR_VAR(at_block_begin)},

0 commit comments

Comments
 (0)