diff options
author | Magnus Lång <[email protected]> | 2016-09-24 09:37:46 +0200 |
---|---|---|
committer | Magnus Lång <[email protected]> | 2017-03-16 20:49:42 +0100 |
commit | cc115ebc67a465233c7740efb42e0bc9584ad352 (patch) | |
tree | 766d1f10b40e4a4c145bad262d2bbd372eb3f636 /lib/hipe/regalloc/hipe_ppc_specific_fp.erl | |
parent | e99f1d41bc8a7e035e35fd5aef6f3ea023d7f12e (diff) | |
download | otp-cc115ebc67a465233c7740efb42e0bc9584ad352.tar.gz otp-cc115ebc67a465233c7740efb42e0bc9584ad352.tar.bz2 otp-cc115ebc67a465233c7740efb42e0bc9584ad352.zip |
hipe: Add branch prediction accessor ra callbacks
Adds a new register allocator callback
Target:branch_preds(Instr, Context) which, for a control flow
instruction Instr, returns a list of tuples {Target, Probability} for
each label name Target that Instr may branch to. Probability is a float
between 0.0 and 1.0 and corresponds to the predicted probability that
control flow branches to the corresponding target. The probabilities may
sum to at most 1.0 (rounding errors aside). Note that a sum less than
1.0 is valid.
Diffstat (limited to 'lib/hipe/regalloc/hipe_ppc_specific_fp.erl')
-rw-r--r-- | lib/hipe/regalloc/hipe_ppc_specific_fp.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/hipe/regalloc/hipe_ppc_specific_fp.erl b/lib/hipe/regalloc/hipe_ppc_specific_fp.erl index 3aab14f061..5a4f63fc78 100644 --- a/lib/hipe/regalloc/hipe_ppc_specific_fp.erl +++ b/lib/hipe/regalloc/hipe_ppc_specific_fp.erl @@ -56,6 +56,9 @@ update_bb/4, subst_temps/3]). +%% callbacks for hipe_bb_weights +-export([branch_preds/2]). + check_and_rewrite(CFG, Coloring, _) -> hipe_ppc_ra_postconditions_fp:check_and_rewrite(CFG, Coloring). @@ -112,6 +115,9 @@ bb(CFG, L, _) -> update_bb(CFG,L,BB,_) -> hipe_ppc_cfg:bb_add(CFG,L,BB). +branch_preds(Instr,_) -> + hipe_ppc_cfg:branch_preds(Instr). + %% PowerPC stuff def_use(I, Ctx) -> |