aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorHongtao Yu <hoy@fb.com>2021-04-19 08:51:57 -0700
committerHongtao Yu <hoy@fb.com>2021-04-19 17:55:34 -0700
commit1812319292e0041e7e32ad7b61d7252a450b95c2 (patch)
tree58613e33f6fcb46824485ace4441484f8e58d273 /llvm/lib/CodeGen/BranchFolding.cpp
parentfbb9132e71a200c12f416d30f4528b58c6c283f2 (diff)
downloadllvm-1812319292e0041e7e32ad7b61d7252a450b95c2.zip
llvm-1812319292e0041e7e32ad7b61d7252a450b95c2.tar.gz
llvm-1812319292e0041e7e32ad7b61d7252a450b95c2.tar.bz2
[CSSPGO] Flip SkipPseudoOp to true for MIR APIs.
Flipping the default value of SkipPseudoOp to true for those MIR APIs to favor maximum performance. Note that certain spots like branch folding and MIR if-conversion is are disabled for better counts quality. For these two optimizations, this is a no-diff change. The counts quality with SPEC2017 before/after this change is unchanged. Reviewed By: wmi Differential Revision: https://reviews.llvm.org/D100332
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index c2a4bf8..6deb2dc0 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -286,7 +286,7 @@ static unsigned HashMachineInstr(const MachineInstr &MI) {
/// HashEndOfMBB - Hash the last instruction in the MBB.
static unsigned HashEndOfMBB(const MachineBasicBlock &MBB) {
- MachineBasicBlock::const_iterator I = MBB.getLastNonDebugInstr();
+ MachineBasicBlock::const_iterator I = MBB.getLastNonDebugInstr(false);
if (I == MBB.end())
return 0;
@@ -566,9 +566,9 @@ ProfitableToMerge(MachineBasicBlock *MBB1, MachineBasicBlock *MBB2,
// Move the iterators to the beginning of the MBB if we only got debug
// instructions before the tail. This is to avoid splitting a block when we
// only got debug instructions before the tail (to be invariant on -g).
- if (skipDebugInstructionsForward(MBB1->begin(), MBB1->end()) == I1)
+ if (skipDebugInstructionsForward(MBB1->begin(), MBB1->end(), false) == I1)
I1 = MBB1->begin();
- if (skipDebugInstructionsForward(MBB2->begin(), MBB2->end()) == I2)
+ if (skipDebugInstructionsForward(MBB2->begin(), MBB2->end(), false) == I2)
I2 = MBB2->begin();
bool FullBlockTail1 = I1 == MBB1->begin();
@@ -1929,8 +1929,8 @@ bool BranchFolder::HoistCommonCodeInSuccs(MachineBasicBlock *MBB) {
MachineBasicBlock::iterator FIE = FBB->end();
while (TIB != TIE && FIB != FIE) {
// Skip dbg_value instructions. These do not count.
- TIB = skipDebugInstructionsForward(TIB, TIE);
- FIB = skipDebugInstructionsForward(FIB, FIE);
+ TIB = skipDebugInstructionsForward(TIB, TIE, false);
+ FIB = skipDebugInstructionsForward(FIB, FIE, false);
if (TIB == TIE || FIB == FIE)
break;