forked from OSchip/llvm-project
Fix MLIR Toy tutorial JIT example and add a test to cover it
This commit is contained in:
parent
9f4f6ac94b
commit
ae15b1e7ad
|
@ -240,7 +240,7 @@ int runJit(mlir::ModuleOp module) {
|
|||
auto &engine = maybeEngine.get();
|
||||
|
||||
// Invoke the JIT-compiled function.
|
||||
auto invocationResult = engine->invoke("main");
|
||||
auto invocationResult = engine->invokePacked("main");
|
||||
if (invocationResult) {
|
||||
llvm::errs() << "JIT invocation failed\n";
|
||||
return -1;
|
||||
|
|
|
@ -241,7 +241,7 @@ int runJit(mlir::ModuleOp module) {
|
|||
auto &engine = maybeEngine.get();
|
||||
|
||||
// Invoke the JIT-compiled function.
|
||||
auto invocationResult = engine->invoke("main");
|
||||
auto invocationResult = engine->invokePacked("main");
|
||||
if (invocationResult) {
|
||||
llvm::errs() << "JIT invocation failed\n";
|
||||
return -1;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
# RUN: toyc-ch6 -emit=jit %s
|
||||
|
||||
def main() {
|
||||
print([[1, 2], [3, 4]]);
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
# RUN: toyc-ch7 -emit=jit %s
|
||||
|
||||
def main() {
|
||||
print([[1, 2], [3, 4]]);
|
||||
}
|
Loading…
Reference in New Issue