With Global ISel getReservedRegs() is called before function is
regbank selected for the first time. Defer caching of usesAGPRs()
in this case.
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Event Timeline
Comment Actions
LLVM ERROR: no registers from class available to allocate
What happens usesAGPRs() does not see any agprs used and then the whole register budget is allocated to vgprs.
Comment Actions
Wouldn't it work correctly after later getReservedRegs calls? I don't think we should be calling this before finalizeIsel?
Comment Actions
It does work correctly with a later call from freezeReservedRegs(). The first call though comes from MachineVerifier::visitMachineFunctionBefore().
Comment Actions
I am caching this value. The first call did not find any agprs and cached it. Here I am skipping the caching until selection is finalized.