This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Asking about how to run peephole
- From: "Pranav Bhandarkar" <pranav dot bhandarkar at gmail dot com>
- To: "Dong Phuong" <dongphuong2410 at yahoo dot com>
- Cc: gcc-help at gnu dot org
- Date: Sat, 27 Sep 2008 11:48:54 -0500
- Subject: Re: Asking about how to run peephole
- References: <332102.27140.qm@web31913.mail.mud.yahoo.com>
Hi,
On Sat, Sep 27, 2008 at 7:48 AM, Dong Phuong <dongphuong2410@yahoo.com> wrote:
> I'm porting for microcontroller C166. I've defined
> some peepholes in machine description file C166.md.
> When I configured and made cc1 file, everything seemed
> to be OK.
>
> But when I tried to compile some C program into
> assembly code, I've realized that the peepholes I had
> defined didn't run. I've tried some options -O1, -O2
> but it still didn't run.
If I have correctly got what you mean by "the peepholes didnt run",
then I'd say that It looks like that the patterns that you implemented
in your peepholes didnt match in the C program that you compiled. If
you have good reason to think that they should have matched then
typically you must have missed something really small in your pattern
(like not handling some constraint or your predicates may be wrong).
The best way to learn about peepholes, IMO, is to look at other
backends.
Also, since this is a development related question I think you'll have
more luck posting it on the "gcc" list. "gcc-help" is meant for help
using or building gcc.
Cheers!
Pranav