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]
Other format: [Raw text]

Re: [PATCH] Don't reset cselib hash table during vt_initialize after every bb, only after every ebb


On Sat, Feb 27, 2010 at 7:16 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Sat, Feb 27, 2010 at 02:15:32PM +0100, Steven Bosscher wrote:
>> Looks to me like you should be using things like "find_edge (bb,
>> bb->next_bb)" and "single_pred_p (bb->next_bb)" instead. Something
>> like,
>>
>> + ? ? ?first_bb = bb;
>> + ? ? ?for (;;)
>> + ? ? ? {
>> + ? ? ? ? edge e;
>> + ? ? ? ? if (bb->next_bb == EXIT_BLOCK_PTR
>> + ? ? ? ? ? ?|| ! single_pred_p (bb->next_bb))
>> + ? ? ? ? ? break;
>> + ? ? ? ? e = find_edge (bb, bb->next_bb);
>> + ? ? ? ? if (! e || (e->flags & EDGE_FALLTHRU) != 0)
>> + ? ? ? ? ? break;
>> + ? ? ? ? bb = bb->next_bb;
>> + ? ? ? }
>> + ? ? ?last_bb = bb;
>> +
>>
>> (Or at least something along these lines...)
>
> Makes sense, will change it. ?The code in the patch has been
> copied from sched-ebb.c.

Yes, well, sched-ebb.c is also not exactly an example of how to
properly manage the CFG. It does funny things like calling
compute_bb_for_insn (which should be valid anyway if someone runs this
scheduler), and then basically completely ignores the CFG and all
basic block boundaries in schedule_ebb. This is one of the few passes
that really doesn't work at all in cfglayout mode before register
allocation.

Ciao!
Steven


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