File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1039,11 +1039,13 @@ bool TargetPassConfig::addCoreISelPasses() {
10391039
10401040 if (addGlobalInstructionSelect ())
10411041 return true ;
1042+ }
10421043
1043- // Pass to reset the MachineFunction if the ISel failed.
1044+ // Pass to reset the MachineFunction if the ISel failed. Outside of the above
1045+ // if so that the verifier is not added to it.
1046+ if (Selector == SelectorType::GlobalISel)
10441047 addPass (createResetMachineFunctionPass (
10451048 reportDiagnosticWhenGlobalISelFallback (), isGlobalISelAbortEnabled ()));
1046- }
10471049
10481050 // Run the SDAG InstSelector, providing a fallback path when we do not want to
10491051 // abort on not-yet-supported input.
Original file line number Diff line number Diff line change @@ -788,12 +788,6 @@ bool SIMachineFunctionInfo::usesAGPRs(const MachineFunction &MF) const {
788788 if (UsesAGPRs)
789789 return *UsesAGPRs;
790790
791- // Assume we cannot get any useful information about an empty function, but do
792- // not cache the result as we may not have useful information yet (for example
793- // after a Global-ISel fallback).
794- if (MF.empty ())
795- return false ;
796-
797791 if (!mayNeedAGPRs ()) {
798792 UsesAGPRs = false ;
799793 return false ;
You can’t perform that action at this time.
0 commit comments