File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -161,9 +161,8 @@ bool BranchFolderLegacy::runOnMachineFunction(MachineFunction &MF) {
161
161
TargetPassConfig *PassConfig = &getAnalysis<TargetPassConfig>();
162
162
// TailMerge can create jump into if branches that make CFG irreducible for
163
163
// HW that requires structurized CFG.
164
- bool EnableTailMerge = !MF.getTarget ().requiresStructuredCFG () &&
165
- PassConfig->getEnableTailMerge () &&
166
- this ->EnableTailMerge ;
164
+ bool EnableTailMerge =
165
+ !MF.getTarget ().requiresStructuredCFG () && this ->EnableTailMerge ;
167
166
MBFIWrapper MBBFreqInfo (
168
167
getAnalysis<MachineBlockFrequencyInfoWrapperPass>().getMBFI ());
169
168
BranchFolder Folder (
Original file line number Diff line number Diff line change @@ -1514,7 +1514,7 @@ void TargetPassConfig::addMachineLateOptimization() {
1514
1514
addPass (&MachineLateInstrsCleanupID);
1515
1515
1516
1516
// Branch folding must be run after regalloc and prolog/epilog insertion.
1517
- addPass (&BranchFolderPassID );
1517
+ addPass (createBranchFolderPass ( getEnableTailMerge ()) );
1518
1518
1519
1519
// Tail duplication.
1520
1520
// Note that duplicating tail just increases code size and degrades
You can’t perform that action at this time.
0 commit comments