This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: asking the flow analysis not to optimize
- To: thomas joseph <thomascanny at yahoo dot co dot nz>
- Subject: Re: asking the flow analysis not to optimize
- From: tm <tm at kloo dot net>
- Date: Wed, 18 Jul 2001 01:43:00 -0700
- Cc: gcc at gcc dot gnu dot org
- References: <20010717142646.88674.qmail@web14708.mail.yahoo.com>
thomas joseph wrote:
>
> Hi All
> I am facing a small problem with my new gcc port.
> For generating code for compare and branches, I am
> saving the operands in cmp patterns and generating
> code in branch (beq, bgt etc.,) patterns.
>
> The word size is 16 bit and I do n't have 16 bit
> compare instruction on my machine. So
> for longs (32 bits), I generate code like this ....
>
> 1). < clear the flags>
> 2). sbc lo0, lo1
> 3). sbc hio, hi1
>
> So , now I jump based on the flags. But actually
> when I compile a sample code with optimization's on
> the first instruction is being pulled out during flow
> analysis. So, I get the wrong code. So, how do I tell
> the flow analysis not to delete that particular
> instruction or rtl insn (basically generated by
> emit_insn () .)
>
> Any suggestions would be of great help.....
>
> thanks and regards,
>
> thomas
You need to trace through flow and figure out why
your insn is being deleted.
My guess is that flow thinks it's a dead insn, e.g.
it generates a result which is never used.
Toshi