From 85bd166647e7f260fd665eb44da9151c0d88f208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20L=C3=A5ng?= Date: Sat, 28 May 2016 20:22:34 +0200 Subject: 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. --- lib/hipe/regalloc/hipe_amd64_specific_sse2.erl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/hipe/regalloc/hipe_amd64_specific_sse2.erl') diff --git a/lib/hipe/regalloc/hipe_amd64_specific_sse2.erl b/lib/hipe/regalloc/hipe_amd64_specific_sse2.erl index 2e5804337d..6ef79ce95d 100644 --- a/lib/hipe/regalloc/hipe_amd64_specific_sse2.erl +++ b/lib/hipe/regalloc/hipe_amd64_specific_sse2.erl @@ -33,6 +33,7 @@ liveout/2, uses/1, defines/1, + defines_all_alloc/1, def_use/1, is_arg/1, %% used by hipe_ls_regalloc is_move/1, @@ -174,6 +175,8 @@ defines(I) -> hipe_x86:temp_is_allocatable(X), hipe_x86:temp_type(X) =:= 'double']. +defines_all_alloc(I) -> hipe_amd64_defuse:insn_defs_all(I). + is_move(Instruction) -> case hipe_x86:is_fmove(Instruction) of true -> -- cgit v1.2.3