Skip to content

Commit

Permalink
fix patterngen writer
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Aug 22, 2024
1 parent 7a6858f commit b1c820a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions seal5/backends/patterngen/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ def process_instrunction(instr_def, set_name, set_dir, mattr, predicate, xlen):
skip = True
if skip:
metrics["n_skipped"] += 1
return False
return False, includes_
if not input_file.is_file():
metrics["n_skipped"] += 1
return False
return False, includes_
# if args.patterns:
out_name = f"{instr_def.name}.{args.ext}"
output_file = set_dir / out_name
Expand Down Expand Up @@ -186,6 +186,7 @@ def process_instrunction(instr_def, set_name, set_dir, mattr, predicate, xlen):
metrics["n_failed"] += 1
except AssertionError:
metrics["n_failed"] += 1
return False, includes_
# errs.append((insn_name, str(ex)))
return True, includes_

Expand All @@ -197,9 +198,10 @@ def process_instrunction(instr_def, set_name, set_dir, mattr, predicate, xlen):
futures.append(future)
results = []
for future in as_completed(futures):
result, includes_ = future.result
results.append(result)
includes.extend(includes_)
result_, includes_ = future.result
results.append(result_)
if result_:
includes.extend(includes_)
if len(includes) > 0:
set_includes_str = "\n".join([f'include "seal5/{inc}"' for inc in includes])
set_includes_artifact_dest = f"llvm/lib/Target/RISCV/seal5/{set_name}.td"
Expand Down

0 comments on commit b1c820a

Please sign in to comment.