public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/63596] New: Saving of GPR/FPRs for stdarg even though the variable argument is not used Date: Sun, 19 Oct 2014 18:59:00 -0000 [thread overview] Message-ID: <bug-63596-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63596 Bug ID: 63596 Summary: Saving of GPR/FPRs for stdarg even though the variable argument is not used Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target: aarch64 Take a function like: int f(int a, ...) { return a; } Currently with the top of the trunk we get: f: sub sp, sp, #192 stp x1, x2, [sp, 136] stp x3, x4, [sp, 152] stp x5, x6, [sp, 168] str x7, [sp, 184] str q0, [sp] str q1, [sp, 16] str q2, [sp, 32] str q3, [sp, 48] str q4, [sp, 64] str q5, [sp, 80] str q6, [sp, 96] str q7, [sp, 112] add sp, sp, 192 ret --- CUT --- But we can optimize this down to just f: ret --- CUT --- The .stdarg debug dump says: f: va_list escapes 0, needs to save 0 GPR units and 0 FPR units. But nowhere in aarch64.c uses cfun->va_list_gpr_size or cfun->va_list_fpr_size to figure out how many registers need to be saved.
next reply other threads:[~2014-10-19 18:53 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-10-19 18:59 pinskia at gcc dot gnu.org [this message] 2014-10-20 12:51 ` [Bug target/63596] " rguenth at gcc dot gnu.org 2014-12-30 17:00 ` jiwang at gcc dot gnu.org 2014-12-30 18:24 ` pinskia at gcc dot gnu.org 2015-01-03 22:01 ` pinskia at gcc dot gnu.org 2015-01-06 18:26 ` jiwang at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-63596-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).