aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/main/hipe.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-03-21 16:14:25 +0100
committerBjörn Gustavsson <[email protected]>2019-03-21 16:14:25 +0100
commit2cc798bbbf9924e1c87c6eaa6e1c8be8cca5596c (patch)
tree027aeb6c0a4be44a412385be59c777b3cee366ca /lib/hipe/main/hipe.erl
parentb89b9d8e5f8a136150642b9f7e34268a6d99381f (diff)
parent4e0430638635083c199f81375a6c14f2ffb726fb (diff)
downloadotp-2cc798bbbf9924e1c87c6eaa6e1c8be8cca5596c.tar.gz
otp-2cc798bbbf9924e1c87c6eaa6e1c8be8cca5596c.tar.bz2
otp-2cc798bbbf9924e1c87c6eaa6e1c8be8cca5596c.zip
Merge branch 'bjorn/hipe-compilation/OTP-15596'
* bjorn/hipe-compilation/OTP-15596: HiPE: Don't fail the compilation for unimplemented instructions
Diffstat (limited to 'lib/hipe/main/hipe.erl')
-rw-r--r--lib/hipe/main/hipe.erl12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/hipe/main/hipe.erl b/lib/hipe/main/hipe.erl
index 2348e9b1f6..094b7bc508 100644
--- a/lib/hipe/main/hipe.erl
+++ b/lib/hipe/main/hipe.erl
@@ -583,9 +583,8 @@ fix_beam_exports([], Exports) ->
Exports.
get_beam_icode(Mod, {BeamCode, Exports}, File, Options) ->
- {ok, Icode} =
- ?option_time((catch {ok, hipe_beam_to_icode:module(BeamCode, Options)}),
- "BEAM-to-Icode", Options),
+ Icode = ?option_time(hipe_beam_to_icode:module(BeamCode, Options),
+ "BEAM-to-Icode", Options),
BeamBin = get_beam_code(File),
{{Mod, Exports, Icode}, BeamBin}.
@@ -662,9 +661,12 @@ run_compiler_1(Name, DisasmFun, IcodeFun, Options) ->
{Icode, WholeModule} = IcodeFun(Code, Opts),
CompRes = compile_finish(Icode, WholeModule, Opts),
compiler_return(CompRes, Parent)
- catch error:Error:StackTrace ->
+ catch
+ error:Error:StackTrace ->
print_crash_message(Name, Error, StackTrace),
- exit(Error)
+ exit(Error);
+ throw:{unimplemented_instruction,_Instruction}=Error ->
+ exit(Error)
end
end),
Timeout = case proplists:get_value(timeout, Options) of