This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Asking about how to run peephole


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]