[PATCH] D70821: [SystemZ] Implement the packed stack layout

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 10:01:55 PST 2019


uweigand added a comment.

In D70821#1779889 <https://reviews.llvm.org/D70821#1779889>, @jonpa wrote:

> Varargs part of argument handling in assignCalleeSavedSpillSlots() moved into the !usePackedStack section.


Thanks!

>> Why are you calling getOrCreateFramePointerSaveIndex in determineCalleeSaves?
> 
> This has to always be done, and since the PrologEpilogInserter.cpp:assignCalleeSavedSpillSlots() has an early exit if SavedRegs is empty, TFI->assignCalleeSavedSpillSlots() will not always be reached. So to me that wouldn't work...
>  Maybe the constructor of SystemZMachineFunctionInfo would actually be the best place, although that would force the usePackedStack() to be moved back there as well...

Ah, I see.  I'm still a bit concerned about using determineCalleeSaves, as it is a bit unexpected for this routine to do anything else than filling in the SavedRegs array.  For example, there are other callers of determineCalleeSaves like in ShrinkWrap.cpp, I'm not sure if this (or some future caller) might get confused.

Possibly the best choice then is to put it at the top of the processFunctionBeforeFrameFinalized routine?  That routine seems to be the place for target-specific stuff.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70821/new/

https://reviews.llvm.org/D70821





More information about the llvm-commits mailing list