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) {
161161 TargetPassConfig *PassConfig = &getAnalysis<TargetPassConfig>();
162162 // TailMerge can create jump into if branches that make CFG irreducible for
163163 // 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 ;
167166 MBFIWrapper MBBFreqInfo (
168167 getAnalysis<MachineBlockFrequencyInfoWrapperPass>().getMBFI ());
169168 BranchFolder Folder (
Original file line number Diff line number Diff line change @@ -1514,7 +1514,7 @@ void TargetPassConfig::addMachineLateOptimization() {
15141514 addPass (&MachineLateInstrsCleanupID);
15151515
15161516 // Branch folding must be run after regalloc and prolog/epilog insertion.
1517- addPass (&BranchFolderPassID );
1517+ addPass (createBranchFolderPass ( getEnableTailMerge ()) );
15181518
15191519 // Tail duplication.
15201520 // Note that duplicating tail just increases code size and degrades
You can’t perform that action at this time.
0 commit comments