File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -794,7 +794,8 @@ void MachineLICMBase::HoistOutOfLoop(MachineDomTreeNode *HeaderN,
794794
795795 for (auto *MBB : CurLoop->blocks ()) {
796796 for (auto &MI : *MBB) {
797- if (MI.mayStore () || MI.isCall () || (MI.mayLoad () && MI.hasOrderedMemoryRef ())) {
797+ if (MI.mayStore () || MI.isCall () ||
798+ (MI.mayLoad () && MI.hasOrderedMemoryRef ())) {
798799 for (MachineLoop *L = MLI->getLoopFor (MI.getParent ()); L != CurLoop;
799800 L = L->getParentLoop ())
800801 AllowedToHoistLoads[L] = false ;
@@ -813,19 +814,6 @@ void MachineLICMBase::HoistOutOfLoop(MachineDomTreeNode *HeaderN,
813814
814815 // Process the block
815816 SpeculationState = SpeculateUnknown;
816-
817- auto CanMoveLoad = [](MachineLoop *L) -> bool {
818- dbgs () << L << " \n " ;
819- for (auto *MBB : L->blocks ()) {
820- for (auto &MI : *MBB) {
821- // Taken from MachineInstr::isSafeToMove
822- if (MI.mayStore () || MI.isCall () || (MI.mayLoad () && MI.hasOrderedMemoryRef ()))
823- return false ;
824- }
825- }
826- return true ;
827- };
828-
829817 bool SafeToMoveLoad = HoistConstLoads && AllowedToHoistLoads[CurLoop];
830818 for (MachineInstr &MI : llvm::make_early_inc_range (*MBB)) {
831819 unsigned HoistRes = HoistResult::NotHoisted;
You can’t perform that action at this time.
0 commit comments