File 0121-Document-result-from-failed-simplification-of-beam_s.patch of Package erlang

From e991becd4f2e4911908a1c0e0f298310c83c9045 Mon Sep 17 00:00:00 2001
From: Frej Drejhammar <frej.drejhammar@gmail.com>
Date: Tue, 6 Oct 2020 15:51:36 +0200
Subject: [PATCH] Document result from failed simplification of
 beam_ssa_bool.erl

Try to document the conclusions from attempts to simplify or at least
reduce the complexity of the beam_ssa_bool pass in a comment.
---
 lib/compiler/src/beam_ssa_bool.erl | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/compiler/src/beam_ssa_bool.erl b/lib/compiler/src/beam_ssa_bool.erl
index 5b81ca2be1..208f27a891 100644
--- a/lib/compiler/src/beam_ssa_bool.erl
+++ b/lib/compiler/src/beam_ssa_bool.erl
@@ -96,6 +96,21 @@
 %%
 %% 3: Error.
 %%   ...
+%%
+%% Attempts have been made to simplify this pass and replace it with
+%% simpler transforms in the hope of avoiding much of the work
+%% performed by bool_opt/2. Targeting boolean expressions in guards
+%% and rewriting them along the patterns shown in the examples above
+%% can achieve the same results in many cases, but does not by any
+%% means reach the level of quality achieved by bool_opt/2.
+%%
+%% An analysis of the instances where the simpler transforms fail to
+%% reach parity with bool_opt/2 indicates that the information they
+%% lack in order to improve their result would require more or less
+%% the same control flow graph analysis and simplification as
+%% bool_opt/2 already does.
+%%
+
 
 -module(beam_ssa_bool).
 -export([module/2]).
-- 
2.26.2

openSUSE Build Service is sponsored by