[AArch64][0/4] Improve variable argument (vaarg) support

Jiong Wang jiong.wang@foss.arm.com
Fri May 6 15:00:00 GMT 2016


Currently, there are three major issues in AArch64 variable argument
(vaarg) support.

   * tree-stdarg pass is not enabled, thus we are doing uncessary
     register pushes/popes.  This is PR63596.

   * va_arg gimplification hook is generating sub-optimal code due to the
     runtime boundary check code always consider composite types while we
     can make the check code lighter if there is no composite type.

   * Even when there is composite type, we can simplify the cfg generated
     during va_arg gimplification to avoid creating unnecessary basic
     block.

This patch set fixes above issues.

AArch64 boostrap OK, no regression, new testcases passed.

---
Jiong Wang (4)
   Enable tree-stdarg pass for AArch64 by defining counter fields
   R63596, honor tree-stdarg analysis result to improve VAARG codegen
   Don't generate redundant checks when there is no composite arg
   Simplify cfg during vaarg gimplification

  gcc/config/aarch64/aarch64.c                | 165 ++++++++++++------------
  gcc/testsuite/gcc.dg/tree-ssa/stdarg-2.c    |  15 +++++++++++++++
  gcc/testsuite/gcc.dg/tree-ssa/stdarg-3.c    |  11 +++++++++++
  gcc/testsuite/gcc.dg/tree-ssa/stdarg-4.c    |   4 ++++
  gcc/testsuite/gcc.dg/tree-ssa/stdarg-5.c    |   7 +++++++
  gcc/testsuite/gcc.dg/tree-ssa/stdarg-6.c    |   1 +
  gcc/testsuite/gcc.target/aarch64/va_arg_1.c |  11 +++++++++++
  gcc/testsuite/gcc.target/aarch64/va_arg_2.c |  18 ++++++++++++++++++
  gcc/testsuite/gcc.target/aarch64/va_arg_3.c |  26 
++++++++++++++++++++++++++
  gcc/testsuite/gcc.target/aarch64/va_arg_4.c |  23 +++++++++++++++++++++++
  gcc/testsuite/gcc.target/aarch64/va_arg_5.c |  20 ++++++++++++++++++++
  11 files changed, 255 insertions(+), 46 deletions(-)



More information about the Gcc-patches mailing list