diff options
author | Simon Marlow <marlowsd@gmail.com> | 2015-09-21 09:14:33 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2015-09-23 14:07:44 +0100 |
commit | 939a7d6367501d43be73f4e41db7395af1194989 (patch) | |
tree | e915a6cc270fca5e0b4c803b38e5467f9f4d61c3 /compiler/llvmGen | |
parent | 65bf7baa81772b7f07a4c74d3510dbd2ef03592d (diff) | |
download | haskell-939a7d6367501d43be73f4e41db7395af1194989.tar.gz |
Annotate CmmBranch with an optional likely target
Summary:
This allows the code generator to give hints to later code generation
steps about which branch is most likely to be taken. Right now it
is only taken into account in one place: a special case in
CmmContFlowOpt that swapped branches over to maximise the chance of
fallthrough, which is now disabled when there is a likelihood setting.
Test Plan: validate
Reviewers: austin, simonpj, bgamari, ezyang, tibbe
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1273
Diffstat (limited to 'compiler/llvmGen')
-rw-r--r-- | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs index 9896c4040a..ed046be891 100644 --- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs +++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs @@ -119,7 +119,7 @@ stmtToInstrs stmt = case stmt of CmmStore addr src -> genStore addr src CmmBranch id -> genBranch id - CmmCondBranch arg true false + CmmCondBranch arg true false _ -- TODO: likely annotation -> genCondBranch arg true false CmmSwitch arg ids -> genSwitch arg ids |