[PATCH] D28566: Disable Callee Saved Registers
Oren Ben Simhon via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 01:10:40 PST 2017
oren_ben_simhon added a comment.
I will create a wrapper function to be used instead of getCalleeSavedRegs().
Comment at: include/llvm/CodeGen/RegisterClassInfo.h:56
+ // runOnFunction() call. Used only to determine if an update was made.
+ SmallVector<uint8_t, 16> CalleeSavedRegs;
> There are several targets out there with more than 256 registers! AMDGPU already has > 1000, and I know of even crazier out-of-tree targets.
The size here is just the initial size. The size is updated according to the number of registers.
Notice that following code exmaple that actually changes the size (using push_back):
SmallVector<uint8_t, 16> ActualCalleeSaved;
for (unsigned I = 0; unsigned Reg = CSR[I]; ++I)
CalleeSavedRegs = ActualCalleeSaved;
More information about the llvm-commits