Skip to content

Commit

Permalink
improve error handling in gmir pass
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Aug 20, 2024
1 parent 7adc0f2 commit 65e0b93
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions seal5/pass_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,7 @@ def convert_llvmir_to_gmir(
verbose: bool = False,
split: bool = True,
inplace: bool = True,
allow_errors: bool = False,
use_subprocess: bool = False,
**kwargs,
):
Expand Down Expand Up @@ -1337,15 +1338,18 @@ def convert_llvmir_to_gmir(
output_file,
mattr=mattr,
xlen=xlen,
verbose=verbose,
)
except AssertionError:
pass
# errs.append((insn_name, str(ex)))
except AssertionError as ex:
if allow_errors:
errs.append((insn_name, str(ex)))
else:
raise ex
if len(errs) > 0:
# print("errs", errs)
logger.warning("Ignored Errors:")
for insn_name, err_str in errs:
print("Err:", insn_name, err_str)
input("!")
logger.warning("%s: %s", insn_name, err_str)


def gen_seal5_td(
Expand Down

0 comments on commit 65e0b93

Please sign in to comment.