From: "Bingfeng Mei" <bmei@broadcom.com>
To: "Paolo Bonzini" <bonzini@gnu.org>
Cc: "Steven Bosscher" <stevenb.gcc@gmail.com>, gcc@gcc.gnu.org
Subject: RE: Inefficient loop unrolling.
Date: Thu, 10 Jul 2008 13:44:00 -0000 [thread overview]
Message-ID: <2E073B3ABB3F664DBA1D1C4D5FB47EF40E9D76DD@NT-IRVA-0752.brcm.ad.broadcom.com> (raw)
In-Reply-To: <487601BB.5010802@gnu.org>
Paolo,
Thanks for the reply. However, I am not sure it is a simple folding
issue.
For example,
B1 = B + 4;
= [A, B1]
B2 = B + 8;
= [A, B2]
B3 = B + 12;
= [A, B3]
Should be transformed to
C = A + B
= [C, 4]
= [C, 8]
= [C, 12]
Loop exit condition needs to be changed accordingly.
BTW, I just added an experimental tree-level loop unrolling pass in my
porting, right before ivopt pass. The results are very promising except
a few quirky things, which I belive to be problem of ivopts. The
produced assembly code is as good as maunal unrolling now.
Cheers,
Bingfeng
-----Original Message-----
From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo
Bonzini
Sent: 10 July 2008 13:34
To: Bingfeng Mei
Cc: Steven Bosscher; gcc@gcc.gnu.org
Subject: Re: Inefficient loop unrolling.
Bingfeng Mei wrote:
> Steven,
> I just created a bug report. You should receive a CCed mail now.
>
> I can see these issues are solvable at RTL-level, but require lots of
> efforts. The main optimization in loop unrolling pass, split iv, can
> reduce dependence chain but not extra ADDs and alias issue. What is
the
> main reason that loop unrolling should belong to RTL level? Is it
> fundamental?
No, it is just effectiveness of the code size expansion heuristics.
Ivopts is already complex enough on the tree level, that doing it on RTL
would be insane. But other low-level loop optimizations had already
been written on the RTL level and since there were no compelling
reasons, they were left there.
That said, this is a bug -- fwprop should have folded the ADDs, at the
very least. I'll look at the PR.
Paolo
prev parent reply other threads:[~2008-07-10 13:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-02 11:59 Bingfeng Mei
2008-07-02 12:08 ` Richard Guenther
2008-07-02 13:40 ` Bingfeng Mei
2008-07-02 16:14 ` Steven Bosscher
2008-07-03 13:48 ` Bingfeng Mei
2008-07-10 13:04 ` Paolo Bonzini
2008-07-10 13:44 ` Bingfeng Mei [this message]
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=2E073B3ABB3F664DBA1D1C4D5FB47EF40E9D76DD@NT-IRVA-0752.brcm.ad.broadcom.com \
--to=bmei@broadcom.com \
--cc=bonzini@gnu.org \
--cc=gcc@gcc.gnu.org \
--cc=stevenb.gcc@gmail.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).