public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amker.cheng at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/54133] regrename introduces additional dependencies Date: Wed, 01 Aug 2012 07:50:00 -0000 [thread overview] Message-ID: <bug-54133-4-5wGu6fCUmv@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-54133-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54133 --- Comment #2 from amker.cheng <amker.cheng at gmail dot com> 2012-08-01 07:49:51 UTC --- I measured this kind of regression in benchmark CSiBE on arm-none-eabi/cortex-m0 with Os optimization. Turns out most of the them are relate to paramter/return register moving, like the reported case. The logic is: STEP1: At prologue or after call_insn, gcc saves parameter(or return) registers in pseudos, then load it from the pseudo when need to use it(like calling another function with the paramter). For example: { rx <- r0 ... ... r0 <- rx call another function } If instructions between saving and using do not clobber paramter register, the hard register can be propagated to remove one redundant move instruction. STEP2: copy propagation before IRA just ignore hard registers, so usually these can only be done in regcprop.c after IRA. BUT, STEP3: register renaming does not honor any propagation opportunities and may using r0 to rename, which introduces additional dependencies. It's a common regression because regrename always select renaming register from 0 to FIRST_PSEUOD_REG. In experiment, if I disable r0/r1 from renaming, most regressions observed in CSiBE are gone. So how should this be fixed? Thanks.
next prev parent reply other threads:[~2012-08-01 7:50 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-07-31 6:59 [Bug rtl-optimization/54133] New: " amker.cheng at gmail dot com 2012-07-31 8:01 ` [Bug rtl-optimization/54133] " steven at gcc dot gnu.org 2012-08-01 7:50 ` amker.cheng at gmail dot com [this message] 2012-08-01 10:14 ` steven at gcc dot gnu.org 2012-08-01 11:58 ` steven at gcc dot gnu.org 2012-08-01 13:49 ` amker.cheng at gmail dot com 2012-08-02 7:22 ` ebotcazou at gcc dot gnu.org 2012-08-02 10:18 ` amker.cheng at gmail dot com 2012-09-25 7:45 ` amker.cheng at gmail dot com
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-54133-4-5wGu6fCUmv@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).