aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-03-15 09:51:26 +0100
committerHans Bolinder <[email protected]>2017-06-13 13:40:24 +0200
commit2e1f2ce523627ae27896fae8184412e608e4f3b9 (patch)
treee30a35539cb8f62776584acca2a33e5843d9b46e /lib/hipe
parent451ae334fdd71b52ff15f56a9fd8b983eab743d7 (diff)
downloadotp-2e1f2ce523627ae27896fae8184412e608e4f3b9.tar.gz
otp-2e1f2ce523627ae27896fae8184412e608e4f3b9.tar.bz2
otp-2e1f2ce523627ae27896fae8184412e608e4f3b9.zip
hipe: Optimize contract decoration somewhat
Diffstat (limited to 'lib/hipe')
-rw-r--r--lib/hipe/cerl/erl_types.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index 8b9b1241a0..3c6d42572a 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -614,7 +614,9 @@ t_find_unknown_opaque(T1, T2, Opaques) ->
%% is assumed to be taken from the contract.
t_decorate_with_opaque(T1, T2, Opaques) ->
- case t_is_equal(T1, T2) orelse not t_contains_opaque(T2) of
+ case
+ Opaques =:= [] orelse t_is_equal(T1, T2) orelse not t_contains_opaque(T2)
+ of
true -> T1;
false ->
T = t_inf(T1, T2),