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: [tree-ssa]: Inserting on an entry block edge seems to cause a split



On Nov 22, 2003, at 11:25 PM, Andrew MacLeod wrote:


On Sat, 2003-11-22 at 21:27, Daniel Berlin wrote:


Any clue why it decides it should up and create a fallthru block
between ENTRY_BLOCK
and 0?

Err, am I misreading it? It looks like 0 has 2 predecessors, ENTRY and
14. So if you insert on ENTRY->0, you have to split the edge since you
can't append to ENTRY...

Why can't we append to ENTRY again? ENTRY only goes to 0 (by fallthru),
and it has code associated with it (or so debug_tree_bb claims).



Multiple entry points would have more successors than just BB 0. I wouldn't expect ENTRY to ever have code associated with it. It ought to be a symbolic representation of flow coming into the function. The function ought not be able to put code into the ENTRY or EXIT block, just on edges from ENTRY and to EXIT. At least in my view..

Otherwise, this is gonna get ugly, i'm sure.

This is what i get for trying to fix bugs :P


Any code thats written ought not be assuming block 0 is the first executed block... or thats a bug

No, that's not the problem.


The problem is that it causes new bb creation during insertion, which is what we were trying to avoid through critical edge splitting.

My two options are to special case this and try to handle it right, or just pre-split the entry->block 0 edge when block 0 has multiple preds.


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