[llvm] 97f9226 - [MBP] tuple->pair. NFC.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Sat May 2 11:24:59 PDT 2020
Author: Benjamin Kramer
Date: 2020-05-02T20:23:34+02:00
New Revision: 97f92261df0807875f843eaefbe5fe81b347abd2
URL: https://github.com/llvm/llvm-project/commit/97f92261df0807875f843eaefbe5fe81b347abd2
DIFF: https://github.com/llvm/llvm-project/commit/97f92261df0807875f843eaefbe5fe81b347abd2.diff
LOG: [MBP] tuple->pair. NFC.
std::pair has a trivial copy ctor, std::tuple doesn't.
Added:
Modified:
llvm/lib/CodeGen/MachineBlockPlacement.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp
index a4f07806fbe3..71459e520664 100644
--- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp
+++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp
@@ -1570,7 +1570,7 @@ MachineBlockPlacement::selectBestSuccessor(
// For blocks with CFG violations, we may be able to lay them out anyway with
// tail-duplication. We keep this vector so we can perform the probability
// calculations the minimum number of times.
- SmallVector<std::tuple<BranchProbability, MachineBasicBlock *>, 4>
+ SmallVector<std::pair<BranchProbability, MachineBasicBlock *>, 4>
DupCandidates;
for (MachineBasicBlock *Succ : Successors) {
auto RealSuccProb = MBPI->getEdgeProbability(BB, Succ);
@@ -1584,7 +1584,7 @@ MachineBlockPlacement::selectBestSuccessor(
Chain, BlockFilter)) {
// If tail duplication would make Succ profitable, place it.
if (allowTailDupPlacement() && shouldTailDuplicate(Succ))
- DupCandidates.push_back(std::make_tuple(SuccProb, Succ));
+ DupCandidates.emplace_back(SuccProb, Succ);
continue;
}
More information about the llvm-commits
mailing list