[ExceptionHandling] Raise error at the exact failed lowering pass
zzzDavid opened this issue · 0 comments
zzzDavid commented
The LLVM backend goes through a series of lowering passes:
hcl_d.lower_composite_type(module)
hcl_d.lower_fixed_to_int(module)
hcl_d.lower_print_ops(module)
hcl_d.lower_anywidth_int(module)
However, when any pass failed, the error is raised at execution engine creation. Often times we get an error saying
RuntimeError: Failure while creating ExecutionEngine
But it's one of the pass that failed. I think this is pretty confusing and we should improve error raising (at the C++ side) to raise the error right after the failed pass.