From 2ab941a282f56431e1ebc3713a8853c0db495c29 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Magnus=20L=C3=A5ng?= <margnus1@telia.com>
Date: Fri, 10 Jun 2016 14:58:55 +0200
Subject: hipe: clean up unnecessary catches

---
 lib/hipe/regalloc/hipe_graph_coloring_regalloc.erl | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

(limited to 'lib/hipe')

diff --git a/lib/hipe/regalloc/hipe_graph_coloring_regalloc.erl b/lib/hipe/regalloc/hipe_graph_coloring_regalloc.erl
index 1a3ea90c05..f71feebfc6 100644
--- a/lib/hipe/regalloc/hipe_graph_coloring_regalloc.erl
+++ b/lib/hipe/regalloc/hipe_graph_coloring_regalloc.erl
@@ -113,11 +113,6 @@ regalloc(CFG, SpillIndex, SpillLimit, Target, _Options) ->
 %%
 
 build_ig(CFG, Target) ->
-  try build_ig0(CFG, Target)
-  catch error:Rsn -> exit({?MODULE, build_ig, Rsn})
-  end.
-
-build_ig0(CFG, Target) ->
   Live = Target:analyze(CFG),
   NumN = Target:number_of_temporaries(CFG),  % poss. N-1?
   {IG, Spill} = build_ig_bbs(Target:labels(CFG), 
@@ -208,17 +203,8 @@ set_spill_cost(X, N, Spill) ->
 %%     * add low-degree neighbors of z to low
 %%     * restart the while-loop above
 
-color(IG, Spill, PhysRegs, SpillIx, SpillLimit, NumNodes, Target, NotAllocatable) ->
-   try color_0(IG, Spill, PhysRegs, SpillIx, SpillLimit,
-	       NumNodes, Target, NotAllocatable)
-   catch
-     error:Rsn ->
-       ?error_msg("Coloring failed with ~p~n", [Rsn]),
-       ?EXIT(Rsn)
-   end.
-
-color_0(IG, Spill, PhysRegs, SpillIx, SpillLimit, NumNodes, Target,
-	NotAllocatable) -> 
+color(IG, Spill, PhysRegs, SpillIx, SpillLimit, NumNodes, Target,
+      NotAllocatable) ->
   ?report("simplification of IG~n", []),
   K = ordsets:size(PhysRegs),
   Nodes = list_ig(IG),
-- 
cgit v1.2.3