mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
[PM] Use a more appropriate name for the statistics variable in
lower-expect, as we don't have 'if's in the IR and we use it for switches as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226997 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5999806daf
commit
c31d4e4a86
@ -30,7 +30,8 @@ using namespace llvm;
|
|||||||
|
|
||||||
#define DEBUG_TYPE "lower-expect-intrinsic"
|
#define DEBUG_TYPE "lower-expect-intrinsic"
|
||||||
|
|
||||||
STATISTIC(IfHandled, "Number of 'expect' intrinsic instructions handled");
|
STATISTIC(ExpectIntrinsicsHandled,
|
||||||
|
"Number of 'expect' intrinsic instructions handled");
|
||||||
|
|
||||||
static cl::opt<uint32_t>
|
static cl::opt<uint32_t>
|
||||||
LikelyBranchWeight("likely-branch-weight", cl::Hidden, cl::init(64),
|
LikelyBranchWeight("likely-branch-weight", cl::Hidden, cl::init(64),
|
||||||
@ -147,10 +148,10 @@ bool LowerExpectIntrinsic::runOnFunction(Function &F) {
|
|||||||
// Create "block_weights" metadata.
|
// Create "block_weights" metadata.
|
||||||
if (BranchInst *BI = dyn_cast<BranchInst>(BB.getTerminator())) {
|
if (BranchInst *BI = dyn_cast<BranchInst>(BB.getTerminator())) {
|
||||||
if (handleBranchExpect(*BI))
|
if (handleBranchExpect(*BI))
|
||||||
IfHandled++;
|
ExpectIntrinsicsHandled++;
|
||||||
} else if (SwitchInst *SI = dyn_cast<SwitchInst>(BB.getTerminator())) {
|
} else if (SwitchInst *SI = dyn_cast<SwitchInst>(BB.getTerminator())) {
|
||||||
if (handleSwitchExpect(*SI))
|
if (handleSwitchExpect(*SI))
|
||||||
IfHandled++;
|
ExpectIntrinsicsHandled++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove llvm.expect intrinsics.
|
// remove llvm.expect intrinsics.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user