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() {
1039
1039
1040
1040
if (addGlobalInstructionSelect ())
1041
1041
return true ;
1042
+ }
1042
1043
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)
1044
1047
addPass (createResetMachineFunctionPass (
1045
1048
reportDiagnosticWhenGlobalISelFallback (), isGlobalISelAbortEnabled ()));
1046
- }
1047
1049
1048
1050
// Run the SDAG InstSelector, providing a fallback path when we do not want to
1049
1051
// 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 {
788
788
if (UsesAGPRs)
789
789
return *UsesAGPRs;
790
790
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
-
797
791
if (!mayNeedAGPRs ()) {
798
792
UsesAGPRs = false ;
799
793
return false ;
You can’t perform that action at this time.
0 commit comments