Skip to content

Commit 5fcc0c3

Browse files
committed
Alternative, where we dont add a verifier pass after fallback instead
1 parent 7e95393 commit 5fcc0c3

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

llvm/lib/CodeGen/TargetPassConfig.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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.

llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)