aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/main/hipe.erl
diff options
context:
space:
mode:
authorMagnus Lång <[email protected]>2014-04-14 18:10:31 +0200
committerMagnus Lång <[email protected]>2016-05-23 17:09:27 +0200
commitb9068c94921e97cc918e9c8664c252af33bfaf39 (patch)
treecccab675404610b623ac5215c0cb59933b49b00a /lib/hipe/main/hipe.erl
parenta152a8a4e6df5fca0ca6fb0a62ac8fea41b99571 (diff)
downloadotp-b9068c94921e97cc918e9c8664c252af33bfaf39.tar.gz
otp-b9068c94921e97cc918e9c8664c252af33bfaf39.tar.bz2
otp-b9068c94921e97cc918e9c8664c252af33bfaf39.zip
Added elimination of maps:is_key/2 calls to HiPE
* Implemented removal of maps:is_key/2 calls of which the result is known in a new pass during the typed phase, called hipe_icode_call_elim. * Added the option icode_call_elim that enables the hipe_icode_call_elim pass, and made it default for o2.
Diffstat (limited to 'lib/hipe/main/hipe.erl')
-rw-r--r--lib/hipe/main/hipe.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/hipe/main/hipe.erl b/lib/hipe/main/hipe.erl
index 0e32da1d36..c026329276 100644
--- a/lib/hipe/main/hipe.erl
+++ b/lib/hipe/main/hipe.erl
@@ -1165,6 +1165,9 @@ option_text(caller_save_spill_restore) ->
"Activates caller save register spills and restores";
option_text(debug) ->
"Outputs internal debugging information during compilation";
+option_text(icode_call_elim) ->
+ "Performs call elimination of BIFs that are side-effect free\n" ++
+ "only on some argument types";
option_text(icode_range) ->
"Performs integer range analysis on the Icode level";
option_text(icode_ssa_check) ->
@@ -1318,6 +1321,7 @@ opt_keys() ->
get_called_modules,
split_arith,
split_arith_unsafe,
+ icode_call_elim,
icode_inline_bifs,
icode_ssa_check,
icode_ssa_copy_prop,
@@ -1399,7 +1403,7 @@ o1_opts(TargetArch) ->
o2_opts(TargetArch) ->
Common = [icode_ssa_const_prop, icode_ssa_copy_prop, % icode_ssa_struct_reuse,
- icode_type, icode_inline_bifs, rtl_lcm,
+ icode_type, icode_inline_bifs, icode_call_elim, rtl_lcm,
rtl_ssa, rtl_ssa_const_prop,
spillmin_color, use_indexing, remove_comments,
concurrent_comp, binary_opt | o1_opts(TargetArch)],
@@ -1429,6 +1433,7 @@ opt_negations() ->
{no_icode_inline_bifs, icode_inline_bifs},
{no_icode_range, icode_range},
{no_icode_split_arith, icode_split_arith},
+ {no_icode_call_elim, icode_call_elim},
{no_icode_ssa_check, icode_ssa_check},
{no_icode_ssa_copy_prop, icode_ssa_copy_prop},
{no_icode_ssa_const_prop, icode_ssa_const_prop},