aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/regalloc/hipe_x86_specific_x87.erl
diff options
context:
space:
mode:
authorMagnus Lång <[email protected]>2016-05-28 20:22:34 +0200
committerMagnus Lång <[email protected]>2016-09-02 15:04:45 +0200
commit85bd166647e7f260fd665eb44da9151c0d88f208 (patch)
tree84878ab624fcc22246bae89b75a6857415508539 /lib/hipe/regalloc/hipe_x86_specific_x87.erl
parentc2f8b61ca3682281752fa0984699214dfcbf7ccd (diff)
downloadotp-85bd166647e7f260fd665eb44da9151c0d88f208.tar.gz
otp-85bd166647e7f260fd665eb44da9151c0d88f208.tar.bz2
otp-85bd166647e7f260fd665eb44da9151c0d88f208.zip
hipe: Add hipe_regalloc_prepass
hipe_regalloc_prepass speeds up register allocation by spilling any temp that is live over a call (which clobbers all register). In order to detect these, a new function was added to the target interface; defines_all_alloc/1, that takes an instruction and returns a boolean.
Diffstat (limited to 'lib/hipe/regalloc/hipe_x86_specific_x87.erl')
-rw-r--r--lib/hipe/regalloc/hipe_x86_specific_x87.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/hipe/regalloc/hipe_x86_specific_x87.erl b/lib/hipe/regalloc/hipe_x86_specific_x87.erl
index 0c022d5a27..cd4d02491d 100644
--- a/lib/hipe/regalloc/hipe_x86_specific_x87.erl
+++ b/lib/hipe/regalloc/hipe_x86_specific_x87.erl
@@ -53,6 +53,7 @@
liveout/2,
uses/1,
defines/1,
+ defines_all_alloc/1,
is_global/1,
reg_nr/1,
physical_name/1,
@@ -162,6 +163,8 @@ defines(I) ->
hipe_x86:temp_is_allocatable(X),
temp_is_double(X)].
+defines_all_alloc(I) -> hipe_amd64_defuse:insn_defs_all(I).
+
temp_is_double(Temp) ->
hipe_x86:temp_type(Temp) =:= 'double'.