[llvm] [GlobalISel][AMDGPU] Do not cache UsesAGPRs from empty functions. (PR #124799)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 09:38:42 PST 2025
================
@@ -788,6 +788,12 @@ bool SIMachineFunctionInfo::usesAGPRs(const MachineFunction &MF) const {
if (UsesAGPRs)
return *UsesAGPRs;
+ // Assume we cannot get any useful information about an empty function, but do
+ // not cache the result as we may not have useful information yet (for example
+ // after a Global-ISel fallback).
+ if (MF.empty())
----------------
arsenm wrote:
I would hope this could not reach here
https://github.com/llvm/llvm-project/pull/124799
More information about the llvm-commits
mailing list