diff options
author | Magnus Lång <[email protected]> | 2017-03-27 15:19:25 +0200 |
---|---|---|
committer | Magnus Lång <[email protected]> | 2017-03-27 16:16:32 +0200 |
commit | 48b5cc3c35e1d94807e9587c222a41c3cd513f64 (patch) | |
tree | 8907ac3fdb14e6ecfa922a870a38ddc935428ccb /lib/hipe/icode/hipe_icode_range.erl | |
parent | 7eb0f13659f045dad0db27e4c8e1c6588d6eb044 (diff) | |
download | otp-48b5cc3c35e1d94807e9587c222a41c3cd513f64.tar.gz otp-48b5cc3c35e1d94807e9587c222a41c3cd513f64.tar.bz2 otp-48b5cc3c35e1d94807e9587c222a41c3cd513f64.zip |
hipe: Fix range analysis of calls with ignored res
HiPE's range analysis would not update the arguments of a callee when
the result of the call was ignored.
Fixes ERL-278.
Diffstat (limited to 'lib/hipe/icode/hipe_icode_range.erl')
-rw-r--r-- | lib/hipe/icode/hipe_icode_range.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/hipe/icode/hipe_icode_range.erl b/lib/hipe/icode/hipe_icode_range.erl index 9aed40bd6d..d1ffb105f4 100644 --- a/lib/hipe/icode/hipe_icode_range.erl +++ b/lib/hipe/icode/hipe_icode_range.erl @@ -392,14 +392,14 @@ widen(#range{range=Old}, #range{range=New}, T = #range{range=Wide}) -> -spec analyse_call(#icode_call{}, call_fun()) -> #icode_call{}. analyse_call(Call, LookupFun) -> + Args = hipe_icode:args(Call), + Fun = hipe_icode:call_fun(Call), + Type = hipe_icode:call_type(Call), + DstRanges = analyse_call_or_enter_fun(Fun, Args, Type, LookupFun), case hipe_icode:call_dstlist(Call) of [] -> Call; Dsts -> - Args = hipe_icode:args(Call), - Fun = hipe_icode:call_fun(Call), - Type = hipe_icode:call_type(Call), - DstRanges = analyse_call_or_enter_fun(Fun, Args, Type, LookupFun), NewDefs = [update_info(Var, R) || {Var,R} <- lists:zip(Dsts, DstRanges)], hipe_icode:subst_defines(lists:zip(Dsts, NewDefs), Call) end. |