aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/arm/hipe_arm_ra_ls.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-09-02 14:51:25 +0200
committerSverker Eriksson <[email protected]>2016-09-02 14:51:25 +0200
commitc2f8b61ca3682281752fa0984699214dfcbf7ccd (patch)
tree3f44fa5c58d0d0d845045c3c5535aefad333b6dd /lib/hipe/arm/hipe_arm_ra_ls.erl
parent87643cf92c061d7518299fdebb326e315c32e528 (diff)
parenta19e3f0e1e82b793d58f9ef0db907ba637793fb6 (diff)
downloadotp-c2f8b61ca3682281752fa0984699214dfcbf7ccd.tar.gz
otp-c2f8b61ca3682281752fa0984699214dfcbf7ccd.tar.bz2
otp-c2f8b61ca3682281752fa0984699214dfcbf7ccd.zip
Merge branch 'sverker/hipe-performance-o1/PR-1154/OTP-13862'
* sverker/hipe-performance-o1/PR-1154: hipe_sparc: Minimise CFG<->linear conversions hipe_ppc: Minimise CFG<->linear conversions hipe_arm: Minimise CFG<->linear conversions hipe_x86: Use lea instead of move+add hipe_arm: Improve peephole optimiser hipe_arm: Be resilient to crappy RTL hipe_ppc: Be resilient to crappy RTL hipe_sparc: Be resilient to crappy RTL hipe: Reuse liveness info for spillmin hipe_x86: Minimise CFG<->linear conversions hipe: Fix o0 and o1 hipe: Add o0 and o1 to tests hipe_rtl_binary:get_word_integer/4: Handle imms hipe_x86: Be resilient to crappy RTL hipe_x86: LSRA for SSE2
Diffstat (limited to 'lib/hipe/arm/hipe_arm_ra_ls.erl')
-rw-r--r--lib/hipe/arm/hipe_arm_ra_ls.erl19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/hipe/arm/hipe_arm_ra_ls.erl b/lib/hipe/arm/hipe_arm_ra_ls.erl
index d9a360d00c..f9193ca9e0 100644
--- a/lib/hipe/arm/hipe_arm_ra_ls.erl
+++ b/lib/hipe/arm/hipe_arm_ra_ls.erl
@@ -23,15 +23,12 @@
-module(hipe_arm_ra_ls).
-export([ra/3]).
-ra(Defun, SpillIndex, Options) ->
- NewDefun = Defun, %% hipe_${ARCH}_ra_rename:rename(Defun,Options),
- CFG = hipe_arm_cfg:init(NewDefun),
+ra(CFG, SpillIndex, Options) ->
SpillLimit = hipe_arm_specific:number_of_temporaries(CFG),
- alloc(NewDefun, SpillIndex, SpillLimit, Options).
+ alloc(CFG, SpillIndex, SpillLimit, Options).
-alloc(Defun, SpillIndex, SpillLimit, Options) ->
- CFG = hipe_arm_cfg:init(Defun),
- {Coloring, _NewSpillIndex} =
+alloc(CFG, SpillIndex, SpillLimit, Options) ->
+ {Coloring, _NewSpillIndex, Liveness} =
regalloc(
CFG,
hipe_arm_registers:allocatable_gpr()--
@@ -41,16 +38,16 @@ alloc(Defun, SpillIndex, SpillLimit, Options) ->
[hipe_arm_cfg:start_label(CFG)],
SpillIndex, SpillLimit, Options,
hipe_arm_specific),
- {NewDefun, _DidSpill} =
+ {NewCFG, _DidSpill} =
hipe_arm_ra_postconditions:check_and_rewrite(
- Defun, Coloring, 'linearscan'),
+ CFG, Coloring, 'linearscan'),
TempMap = hipe_temp_map:cols2tuple(Coloring, hipe_arm_specific),
{SpillMap, _NewSpillIndex2} =
- hipe_spillmin:stackalloc(CFG, [], SpillIndex, Options,
+ hipe_spillmin:stackalloc(CFG, Liveness, [], SpillIndex, Options,
hipe_arm_specific, TempMap),
Coloring2 =
hipe_spillmin:mapmerge(hipe_temp_map:to_substlist(TempMap), SpillMap),
- {NewDefun, Coloring2}.
+ {NewCFG, Coloring2}.
regalloc(CFG, PhysRegs, Entrypoints, SpillIndex, DontSpill, Options, Target) ->
hipe_ls_regalloc:regalloc(