summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2015-12-12 00:32:00 +0000
committerHal Finkel <hfinkel@anl.gov>2015-12-12 00:32:00 +0000
commit65539e3c943704727b5b4cffca8fe0fb4bf0c14d (patch)
treec724a112422704fee9537f2def1ba41a7d519b12 /llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h
parentd547e5e16842f13b4c78eb942d349c8f1c553148 (diff)
downloadbcm5719-llvm-65539e3c943704727b5b4cffca8fe0fb4bf0c14d.tar.gz
bcm5719-llvm-65539e3c943704727b5b4cffca8fe0fb4bf0c14d.zip
[PowerPC] Add Branch Hints for Highly-Biased Branches
This branch adds hints for highly biased branches on the PPC architecture. Even in absence of profiling information, LLVM will mark code reaching unreachable terminators and other exceptional control flow constructs as highly unlikely to be reached. Patch by Tom Jablin! llvm-svn: 255398
Diffstat (limited to 'llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h')
-rw-r--r--llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h
index 6075631a541..acea600fbb0 100644
--- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h
+++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h
@@ -56,6 +56,14 @@ namespace PPC {
PRED_BIT_UNSET = 1025
};
+ // Bit for branch taken (plus) or not-taken (minus) hint
+ enum BranchHintBit {
+ BR_NO_HINT = 0x0,
+ BR_NONTAKEN_HINT = 0x2,
+ BR_TAKEN_HINT = 0x3,
+ BR_HINT_MASK = 0X3
+ };
+
/// Invert the specified predicate. != -> ==, < -> >=.
Predicate InvertPredicate(Predicate Opcode);
OpenPOWER on IntegriCloud