From d6a1f5b3bb5d92bc2f89e4b16a86e5010ed02b5f Mon Sep 17 00:00:00 2001 From: Anjali Pal Date: Thu, 31 Oct 2024 14:38:27 -0700 Subject: [PATCH] fix again --- infra/generate_cfgs.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/infra/generate_cfgs.py b/infra/generate_cfgs.py index a7cfc316..54a1f75e 100755 --- a/infra/generate_cfgs.py +++ b/infra/generate_cfgs.py @@ -21,12 +21,13 @@ def make_cfgs(bench, data_dir): opt = "opt" # https://llvm.org/docs/Passes.html#dot-cfg-print-cfg-of-function-to-dot-file - cmd = f"{opt} -disable-output -passes=dot-cfg {bench}-{mode}-{mode}.ll" - os.system(cmd) - - # Delete the -init.ll file (We don't need it for nightly, - # so just reduce the amount of clutter we copy to the nightly machine) - os.system(f"rm {bench}-{mode}-{mode}-init.ll") + for filename in glob.glob("*.ll"): + if "init" in filename: + # Delete the -init.ll file (We don't need it for nightly, + # so just reduce the amount of clutter we copy to the nightly machine) + os.system(f"rm {filename}") + else: + os.system(f"{opt} -disable-output -passes=dot-cfg {filename}") # Find all the dot files (can't use glob because it doesn't match hidden files) # There are also a bunch of files that start with ._Z that I don't think we care about?