Recognize -mpacked-stack from the command line and add a function attribute "mpacked-stack"="true" when passed.
I compared building benchmarks with -mpacked-stack vs master with this change in SystemZFrameLowering.cpp:
static bool usePackedStack(MachineFunction &MF) { - bool HasPackedStackAttr = MF.getFunction().hasFnAttribute("packed-stack"); + bool HasPackedStackAttr = true; //MF.getFunction().hasFnAttribute("packed-stack"); bool IsVarArg = MF.getFunction().isVarArg();
I found that all files look the same, except for all those who contain the __clang_call_terminate function, which gets the default stack layout even when -mpacked-stack is passed. This seems to relate to exceptions, and my guess is this doesn't need to be handled, but it probably could get the "packed-stack" attribute added somewhere in clang/lib/CodeGen if needed...
Would we need to check in the backend that we don't have the attribute "packed-stack"="false", in case somebody would edit that by hand?