diff options
author | Magnus Lång <[email protected]> | 2016-11-09 18:46:19 +0100 |
---|---|---|
committer | Magnus Lång <[email protected]> | 2016-11-15 14:58:59 +0100 |
commit | ca0fbe891d0f8278b4824d6b2c5db4cd01fcef5c (patch) | |
tree | 0c15bfa89f041c3faa2763a400eb3392e0da10fc /lib/hipe/rtl/hipe_rtl_lcm.erl | |
parent | bd898fab5d86ff44ce3129db9a06a5c709719392 (diff) | |
download | otp-ca0fbe891d0f8278b4824d6b2c5db4cd01fcef5c.tar.gz otp-ca0fbe891d0f8278b4824d6b2c5db4cd01fcef5c.tar.bz2 otp-ca0fbe891d0f8278b4824d6b2c5db4cd01fcef5c.zip |
hipe_rtl: unify branch and alub
branch and alub overlap in their use cases, but the backends rely on
knowing that the result is unused in their lowering of branch. By
extending alub so that the destination is optional, it can fully replace
branch.
This simplifies rtl by reducing code duplication and the number of
instructions.
Also, in the x86 and arm backends, we can now use 'test' and
{'tst','mvn','teq'} to lower some alubs without destinations. This is
particularly good for x86, as sequences such as 'is_boxed' type tests
now get shorter (both from not needing a mov to copy the variable, but
also from the fact that 'testb' encodes shorter than 'andq').
Diffstat (limited to 'lib/hipe/rtl/hipe_rtl_lcm.erl')
-rw-r--r-- | lib/hipe/rtl/hipe_rtl_lcm.erl | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/hipe/rtl/hipe_rtl_lcm.erl b/lib/hipe/rtl/hipe_rtl_lcm.erl index 71bd06c0df..67ddd0f649 100644 --- a/lib/hipe/rtl/hipe_rtl_lcm.erl +++ b/lib/hipe/rtl/hipe_rtl_lcm.erl @@ -378,7 +378,6 @@ is_expr(I) -> %% end; #alub{} -> false; %% TODO: Split instruction to consider alu expression? - #branch{} -> false; #call{} -> false; %% We cannot prove that a call has no side-effects #comment{} -> false; #enter{} -> false; |