From 4229331da518282aac8f6bd485df3158e9421e5b Mon Sep 17 00:00:00 2001 From: Anjali Pal Date: Thu, 31 Oct 2024 13:20:04 -0700 Subject: [PATCH] fix names --- infra/generate_cfgs.py | 4 ++-- infra/profile.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/infra/generate_cfgs.py b/infra/generate_cfgs.py index 64d04450..a7cfc316 100755 --- a/infra/generate_cfgs.py +++ b/infra/generate_cfgs.py @@ -21,12 +21,12 @@ 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}.ll" + 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}-init.ll") + os.system(f"rm {bench}-{mode}-{mode}-init.ll") # 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? diff --git a/infra/profile.py b/infra/profile.py index 889f2030..0fafa467 100755 --- a/infra/profile.py +++ b/infra/profile.py @@ -80,7 +80,7 @@ def setup_benchmark(name): def optimize(benchmark): print(f'[{benchmark.index}/{benchmark.total}] Optimizing {benchmark.name} with {benchmark.treatment}') profile_dir = benchmark_profile_dir(benchmark.name) - optimized_bril_file = f'{profile_dir}/{benchmark.treatment}-optimized.bril' + optimized_bril_file = f'{profile_dir}/{benchmark.name}-{benchmark.treatment}.bril' # get the commands we need to run (eggcc_run_mode, llvm_args) = get_eggcc_options(benchmark) @@ -89,7 +89,7 @@ def optimize(benchmark): cmd1 = f'{EGGCC_BINARY} {benchmark.path} --run-mode {eggcc_run_mode}' cmd2 = f'{EGGCC_BINARY} {optimized_bril_file} --add-timing {llvm_args} -o {profile_dir}/{benchmark.treatment} --llvm-output-dir {llvm_out_dir}' - print(f'Running: {cmd1}', flush=True) + print(f'Running c1: {cmd1}', flush=True) start_eggcc = time.time() process = subprocess.run(cmd1, shell=True, capture_output=True, text=True) process.check_returncode() @@ -99,7 +99,7 @@ def optimize(benchmark): with open(optimized_bril_file, 'w') as f: f.write(process.stdout) - print(f'Running: {cmd2}', flush=True) + print(f'Running c2: {cmd2}', flush=True) start_llvm = time.time() process2 = subprocess.run(cmd2, shell=True) process2.check_returncode()