aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_utils.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-11-18 12:06:42 +0100
committerBjörn Gustavsson <[email protected]>2016-11-18 12:06:42 +0100
commit79653c709f854e6fadd719ef5f079f66219c6bdf (patch)
tree2f2a3a1a3b1a06a5e458424da5cb88f9733ec56f /lib/compiler/src/beam_utils.erl
parentf578f6c57438ac7dd11a3d113406a104f4064b26 (diff)
parent09f170e35cf9df8438ae42d48b51becff167b5b4 (diff)
downloadotp-79653c709f854e6fadd719ef5f079f66219c6bdf.tar.gz
otp-79653c709f854e6fadd719ef5f079f66219c6bdf.tar.bz2
otp-79653c709f854e6fadd719ef5f079f66219c6bdf.zip
Merge branch 'bjorn/compiler/guards/PR-1232/OTP-14042'
* bjorn/compiler/guards/PR-1232/OTP-14042: compile_SUITE: Make sure that guards are optimized beam_dead: Remove redundant 'or' instruction beam_dead: Remove redundant 'bif' instructions Add test using LFE-generated Core Erlang modules Remove beam_bool v3_kernel: Generate optimized code for guards sys_core_fold: Remove unnecessary calls to opt_bool_case/1 record_SUITE: Strengthen test of record access in guards
Diffstat (limited to 'lib/compiler/src/beam_utils.erl')
-rw-r--r--lib/compiler/src/beam_utils.erl16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/compiler/src/beam_utils.erl b/lib/compiler/src/beam_utils.erl
index 564a62a7f2..74e3d7e38a 100644
--- a/lib/compiler/src/beam_utils.erl
+++ b/lib/compiler/src/beam_utils.erl
@@ -22,7 +22,7 @@
-module(beam_utils).
-export([is_killed_block/2,is_killed/3,is_killed_at/3,
- is_not_used/3,is_not_used_at/3,
+ is_not_used/3,
empty_label_index/0,index_label/3,index_labels/1,
code_at/2,bif_to_test/3,is_pure_test/1,
live_opt/1,delete_live_annos/1,combine_heap_needs/2,
@@ -96,20 +96,6 @@ is_not_used(R, Is, D) ->
{_,_} -> true
end.
-%% is_not_used(Register, [Instruction], State) -> true|false
-%% Determine whether a register is never used in the instruction sequence
-%% (it could still be referenced by an allocate instruction, meaning that
-%% it MUST be initialized, but that its value does not matter).
-%% The state is used to allow us to determine the usage state
-%% across branches.
-
-is_not_used_at(R, Lbl, D) ->
- St = #live{lbl=D,res=gb_trees:empty()},
- case check_liveness_at(R, Lbl, St) of
- {used,_} -> false;
- {_,_} -> true
- end.
-
%% index_labels(FunctionIs) -> State
%% Index the instruction sequence so that we can quickly
%% look up the instruction following a specific label.