aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/BranchFolding.cpp')
-rw-r--r--lib/CodeGen/BranchFolding.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp
index 11777d5ea1..66c5aa5ff7 100644
--- a/lib/CodeGen/BranchFolding.cpp
+++ b/lib/CodeGen/BranchFolding.cpp
@@ -50,9 +50,8 @@ TailMergeThreshold("tail-merge-threshold",
char BranchFolderPass::ID = 0;
-FunctionPass *llvm::createBranchFoldingPass(bool DefaultEnableTailMerge,
- CodeGenOpt::Level OptLevel) {
- return new BranchFolderPass(DefaultEnableTailMerge, OptLevel);
+FunctionPass *llvm::createBranchFoldingPass(bool DefaultEnableTailMerge) {
+ return new BranchFolderPass(DefaultEnableTailMerge);
}
bool BranchFolderPass::runOnMachineFunction(MachineFunction &MF) {
@@ -64,8 +63,7 @@ bool BranchFolderPass::runOnMachineFunction(MachineFunction &MF) {
-BranchFolder::BranchFolder(bool defaultEnableTailMerge, CodeGenOpt::Level OL) {
- OptLevel = OL;
+BranchFolder::BranchFolder(bool defaultEnableTailMerge) {
switch (FlagEnableTailMerge) {
case cl::BOU_UNSET: EnableTailMerge = defaultEnableTailMerge; break;
case cl::BOU_TRUE: EnableTailMerge = true; break;
@@ -472,8 +470,7 @@ unsigned BranchFolder::ComputeSameTails(unsigned CurHash,
I->second,
TrialBBI1, TrialBBI2);
// If we will have to split a block, there should be at least
- // minCommonTailLength instructions in common; if not, and if we are not
- // optimizing for performance at the expense of code size, at worst
+ // minCommonTailLength instructions in common; if not, at worst
// we will be replacing a fallthrough into the common tail with a
// branch, which at worst breaks even with falling through into
// the duplicated common tail, so 1 instruction in common is enough.
@@ -481,8 +478,7 @@ unsigned BranchFolder::ComputeSameTails(unsigned CurHash,
// tail if there is one.
// (Empty blocks will get forwarded and need not be considered.)
if (CommonTailLen >= minCommonTailLength ||
- (OptLevel != CodeGenOpt::Aggressive &&
- CommonTailLen > 0 &&
+ (CommonTailLen > 0 &&
(TrialBBI1==CurMPIter->second->begin() ||
TrialBBI2==I->second->begin()))) {
if (CommonTailLen > maxCommonTailLength) {