diff options
author | Kyle Butt <kyle+llvm@iteratee.net> | 2016-08-18 18:57:29 +0000 |
---|---|---|
committer | Kyle Butt <kyle+llvm@iteratee.net> | 2016-08-18 18:57:29 +0000 |
commit | 64e428147ffc9bbeff444c922b98cc4110c21561 (patch) | |
tree | 30208c4c0cb8c8ac3e0f003a16b663757e48b0ae /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | 24c86990575fd7c780f944a60d345565208067b0 (diff) | |
download | llvm-64e428147ffc9bbeff444c922b98cc4110c21561.zip llvm-64e428147ffc9bbeff444c922b98cc4110c21561.tar.gz llvm-64e428147ffc9bbeff444c922b98cc4110c21561.tar.bz2 |
Branch Folding: Accept explicit threshold for tail merge size.
This is prep work for allowing the threshold to be different during layout,
and to enforce a single threshold between merging and duplicating during
layout. No observable change intended.
llvm-svn: 279117
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index 88457ba8..37055af 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -1747,8 +1747,10 @@ bool MachineBlockPlacement::runOnMachineFunction(MachineFunction &MF) { BranchFoldPlacement; // No tail merging opportunities if the block number is less than four. if (MF.size() > 3 && EnableTailMerge) { + // Default to the standard tail-merge-size option. + unsigned TailMergeSize = 0; BranchFolder BF(/*EnableTailMerge=*/true, /*CommonHoist=*/false, *MBFI, - *MBPI); + *MBPI, TailMergeSize); if (BF.OptimizeFunction(MF, TII, MF.getSubtarget().getRegisterInfo(), getAnalysisIfAvailable<MachineModuleInfo>(), MLI, |