This is the mail archive of the gcc-patches@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]

Re: lcm assumes an insn is a note without testing


On Dec  6, 2000, Alexandre Oliva <aoliva@redhat.com> wrote:

> On Nov 30, 2000, Jeffrey A Law <law@redhat.com> wrote:
>> In message <ory9y3dog6.fsf@guarana.lsd.ic.unicamp.br>you write:

>>> Index: gcc/ChangeLog
>>> from  Alexandre Oliva  <aoliva@redhat.com>

>>> * lcm.c (optimize_mode_switching): Check whether an insn is a NOTE
>>> before taking its NOTE_LINE_NUMBER.

>> Is it even valid for a note to be in ptr->insn_ptr?!?  

> It appears to be valid.  When a BB doesn't have any mode-related
> requirements, insn will be pointing to the insn that follows the
> BLOCK_END when new_seginfo is called.  This insn is quite likely to be
> the note that marks the beginning of the following basic block.

It is indeed valid.

> However, it seems odd to me that, in case NORMAL_MODE is defined, INSN
> may be modified in the block just above this call, and I'm not sure it
> would be left with a reasonable value for the new segment.

Nope, there's another declaration of INSN local to the block that I
thought would modify it.

So, I think my patch is indeed correct.  If I get approval to install
it, I'll post a separate patch for the docs to explain the case in
which the insn may be a NOTE.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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