This is the mail archive of the 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: reorg vs flow, the saga continues

On Mon, Nov 01, 1999 at 08:03:25PM -0700, Jeffrey A Law wrote:
>   In message <>you write:
>   > On Mon, Nov 01, 1999 at 05:30:54AM -0700, Jeffrey A Law wrote:
>   > > When we call update_block, which in turn calls incr_tick_for_insn, which
>   > > blows up with an out of range access trying to get BLOCK_NUM for an insn
>   > > created by reorg.
>   > 
>   > Oops, I fixed the usage of BLOCK_NUM in mark_target_live_regs but
>   > not in incr_tick_for_insn.  Try the appended.
> I'm poking at it right now.
>   > Ideally, reorg would call set_block_num for each new insn it creates.
> One of the problems (of course) is that reorg's actions can create new
> blocks, move insns between blocks, etc.  Ugh.  I think we've opened a major
> rats nest here and I'm really wondering if we're just going to end up 
> band-aiding this over and over.

I haven't looked at basic blocks in a long time, so I'm probably out of date
WRT to implementation.  One of my thoughts is to completely eliminate block
numbers, and the bb varray.  Instead make the 'block number' be a pointer to
allocated memory that is linked forward/backward to head/tail pointers in the
current_function structure.  Whether the list is circular or bounded doesn't
matter much (though circular is usually more regular and has less edge
conditions).  For printing out, you would have an index that is bumped whenever
you allocate one of the suckers.  Of course the bb pointer should be garbage

Ideally then we would do the same thing for registers, adding a union to the
reg_info structure for each pass to store data, and making the REGNO actually
be a pointer to the structure (keeping around the integer register number for
things like dumps, etc.).  Gen_reg_rtx and gen_rtx_REG would then allocate this
pointer, and it would be stored directly in the rtx field.

Michael Meissner, Cygnus Solutions
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886
email:	phone: 978-486-9304	fax: 978-692-4482

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