loongson-community / gcc

GCC source tree for Loongson
GNU General Public License v2.0
17 stars 1 forks source link

postpone expanding va_arg till pass_stdarg #24

Open xiangzhai opened 6 years ago

xiangzhai commented 6 years ago

Hi fellows,

As PR64950 mentioned: pass_stdarg optimizes cfun->va_list_gpr/fpr_size by detecting va_args.

However, va_args are expanded at gimple level, so pass_stdarg detects them by matching what the expansion of va_arg looks like after running through the passes between gimplification and pass_stdarg.

Tom fixed the issue for GCC 6.x, I am backporting to GCC 5.5, and Uros also rebased the patch for Alpha Target, so what about other Targets?

Regards, Leslie Zhai