From 6ce2a2487e6d34d4ef40a055f830550bb76d1306 Mon Sep 17 00:00:00 2001 From: Gagandeep Singh Date: Fri, 1 Jul 2022 16:17:34 +0530 Subject: [PATCH] Add pass_llvm option to verify LLVM output after application of a pass --- run_tests.py | 3 ++- tests/tests.toml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/run_tests.py b/run_tests.py index d600045042..5f657433ef 100755 --- a/run_tests.py +++ b/run_tests.py @@ -54,6 +54,7 @@ def main(): x86 = test.get("x86", False) bin_ = test.get("bin", False) pass_ = test.get("pass", None) + pass_with_llvm = test.get("pass_with_llvm", None) if pass_ and pass_ not in ["do_loops", "global_stmts", "loop_vectorise", "inline_function_calls"]: raise Exception("Unknown pass: %s" % pass_) @@ -78,7 +79,7 @@ def main(): cmd = "lpython --pass=" + pass_ + " --show-asr --no-color {infile} -o {outfile}" run_test("pass_{}".format(pass_), cmd, filename, update_reference, extra_args) - if llvm: + if pass_with_llvm: cmd = "lpython --pass=" + pass_ + " --show-llvm --no-color {infile} -o {outfile}" run_test("pass_llvm_{}".format(pass_), cmd, filename, update_reference, extra_args) diff --git a/tests/tests.toml b/tests/tests.toml index 41a55f4b43..3c690000ac 100644 --- a/tests/tests.toml +++ b/tests/tests.toml @@ -161,6 +161,7 @@ pass = "loop_vectorise" filename = "../integration_tests/func_inline_01.py" asr = true llvm = true +pass_with_llvm = true pass = "inline_function_calls" [[test]]