[llvm-dev] callee saved regs list
Jonas Paulsson via llvm-dev
llvm-dev at lists.llvm.org
Fri Aug 18 03:03:56 PDT 2017
>>> It seems strange that the common code cannot deduce for itself that
>>> the super regs are also callee saved given that all sub-regs of a
>>> register are.
>>
>> For this to be true, the super-register needs to be covered by its
>> sub-registers. This is not the case in general (e.g. X86). Also, if
>> you have a multi-level sub-register hierarchy then you may not need
>> all sub-registers to cover a given register.
>>
> On SystemZ, the super-registers in question are indeed completely
> covered by its sub-registers in the callee-saved list: R6Q = R6 + R7,
> etc.
>
What's strange is that if I change the list to instead cover just the
super-regs, I then see that the call regmasks look the same, but the MBB
live-in lists now differ quite a bit.
It is clearly not working, since those registers are no longer saved in
the prologue / epilogue in the output.
/Jonas
More information about the llvm-dev
mailing list