From: Jeff Law <jeffreyalaw@gmail.com>
To: Kito Cheng <kito.cheng@gmail.com>
Cc: "Li, Pan2" <pan2.li@intel.com>,
Stefan O'Rear <sorear@fastmail.com>,
"Wang, Yanzhang" <yanzhang.wang@intel.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>,
"kito.cheng@sifive.com" <kito.cheng@sifive.com>
Subject: Re: [PATCH] RISCV: Add -m(no)-omit-leaf-frame-pointer support.
Date: Mon, 26 Jun 2023 10:51:45 -0600 [thread overview]
Message-ID: <55edb915-19de-b7d8-4d20-c79d7ef990a2@gmail.com> (raw)
In-Reply-To: <CA+yXCZB+wQKwiFv9ki2q8LHjS5-zzkw=gEn0xJ7j0iHDqCCYXw@mail.gmail.com>
On 6/26/23 08:50, Kito Cheng wrote:
> LLVM will try to find scratch register even after RA to resolve the long
> jump issue. so maybe we could consider similar approach? And I guess the
> most complicate part would be the scratch register is not found, and
> require spill/reload after RA.
Right. And the spill/reload after RA is ta problem unless you
pre-allocate the space. Of course in a function near 1M in size, odds
are there were some calls in there and thus $ra would be saved. In the
exceedingly rare case where it wasn't, allocating a single stack slot
isn't going to be a major performance driver.
There's other things you can do as well. Register scavenging, jump
trampolines, etc. Examples of both exist.
The point I'm trying to make is that I suspect we're better off burning
$ra right now to address the correctness issue, then coming back to one
of the schemes noted above when the cost/benefit analysis shows it's a
reasonably high priority relative to other optimizations we could be doing.
Jeff
next prev parent reply other threads:[~2023-06-26 16:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 7:07 yanzhang.wang
2023-06-03 2:43 ` Jeff Law
2023-06-05 2:49 ` Wang, Yanzhang
2023-06-07 2:13 ` Jeff Law
2023-06-07 3:50 ` Wang, Yanzhang
2023-06-08 15:05 ` Jeff Law
2023-06-21 8:14 ` Wang, Yanzhang
2023-06-24 15:01 ` Jeff Law
2023-06-25 1:40 ` Stefan O'Rear
2023-06-25 12:49 ` Jeff Law
2023-06-25 18:45 ` Stefan O'Rear
2023-06-26 14:30 ` Jeff Law
2023-06-26 14:50 ` Kito Cheng
2023-06-26 16:51 ` Jeff Law [this message]
2023-06-05 1:04 ` Li, Pan2
2023-06-05 3:36 ` Wang, Yanzhang
2023-07-13 6:12 ` yanzhang.wang
2023-07-18 7:49 ` [PATCH v3] " yanzhang.wang
2023-07-21 3:49 ` Kito Cheng
2023-07-21 4:11 ` Jeff Law
2023-08-02 1:51 ` Wang, Yanzhang
2023-08-03 6:12 ` Jeff Law
2023-08-03 6:16 ` Li, Pan2
2023-08-03 6:22 ` Li, Pan2
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=55edb915-19de-b7d8-4d20-c79d7ef990a2@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=kito.cheng@gmail.com \
--cc=kito.cheng@sifive.com \
--cc=pan2.li@intel.com \
--cc=sorear@fastmail.com \
--cc=yanzhang.wang@intel.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).