From: Richard Henderson <richard.henderson@linaro.org>
To: Michael Clark <michael@anarch128.org>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] tcg: refactor pool data for simplicity and comprehension
Date: Sat, 15 Feb 2025 13:50:25 -0800 [thread overview]
Message-ID: <38bfbaac-329c-45c8-a672-68cad965201b@linaro.org> (raw)
In-Reply-To: <8f107cd4-f5a2-4d3e-b023-5e53225511d4@anarch128.org>
On 2/15/25 12:24, Michael Clark wrote:
>> Why? varargs generally produces horrible code.
>> The split between alloc and insert was intentional to avoid this.
>
> it's pretty good code on SysV because it goes via registers except for perhaps new_pool_l8
> which will spill to stack and get copied unless the inliner can eliminate the copies.
> maybe windows has bad varargs. but I like the style better than deeper layers of wrapper
> functions. they should fix the compiler so that it produces better code.
varargs will generally prevent inlining.
Indeed, just a quick look at aarch64 tcg_out_movi shows that without your change,
new_pool_label, new_pool_data and new_pool_insert are all inlined. With your change,
new_pool_data is not inlined, all the argument regs are dumped to the stack, etc.
I don't think this is a good change to make.
r~
next prev parent reply other threads:[~2025-02-15 21:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-15 2:11 [PATCH] tcg: refactor pool data for simplicity and comprehension Michael Clark
2025-02-15 17:58 ` Richard Henderson
2025-02-15 20:24 ` Michael Clark
2025-02-15 21:50 ` Richard Henderson [this message]
2025-02-15 22:40 ` Michael Clark
2025-02-15 23:41 ` Richard Henderson
2025-02-16 0:48 ` Michael Clark
2025-02-15 22:58 ` Michael Clark
2025-02-16 8:00 ` Michael Clark
2025-02-16 18:01 ` Richard Henderson
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=38bfbaac-329c-45c8-a672-68cad965201b@linaro.org \
--to=richard.henderson@linaro.org \
--cc=michael@anarch128.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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: link
Be 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 NNTP newsgroup(s).