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.