LowerFormalArguments: info on aggregates


All arguments processed in the function LowerFormalArguments seem to be are already lowered to machine types. In addition, the flag isByVal seems to be set for each argument passed on the stack, and cannot be used to indicate a struct/union.

Is there a way to tell if an argument is of a simple type or of an aggregate (within LowerFormalArguments)? Is there any better way processing stack alignment of incoming arguments? This information would be needed for correct stack alignment of structs vs. simple types in AArch64 big endian mode.


If you check the ISD::InputArg, ArgVT should tell you the original type. If you look at R600 , it has a function that uses this to find all of the original argument types.