This is the mail archive of the gcc@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]: After edge insertion, two bb's share the same heda



Note that 345 was an empty block (but still had the same head_tree_p)
at the time 444 was created by bsi_insert_on_edge_immediate.

The edge we insert on is also from 54->346 (346 is the successor block
of 345), so it looks like collateral damage that we chose the same
head_tree_p as block 345.

Soooo. What block is the switch stmt in?
Whats block 345? I clearly need
more context :-)

Yeah, i'm working on minimizing a testcase for you.


it occurs in combine.c from 176.gcc, in simplify_shift_const.
It's not a nice looking function, so i set my automatic test case minimizer on it an hour ago to see if we could come up with something smaller that still fails. It's slow, but it's working on it, and getting somewhere.
I've already halved the number of bb's in the failing functions.
:)




We end up with head_tree_p of block 345, and using it, after line 3820
of tree-cfg.c:

3820 tsi = tsi_last (&BIND_EXPR_BODY (SWITCH_BODY (sw_stmt)));

IE after this line, tsi points to block 345's head_tree_p, and we build
a statement and append it into the new bb, and the new bb gets 345's
head_tree_p:


We then append this to the new bb here:
3827      append_stmt_to_bb (tsi_container (tsi), new_bb, sw_stmt);


Andrew, the switch statement insertion is beyond my comprehension. If I send you the test case and instructions, can you look at this?

Its the child no one wants to talk about :-)  Yep, I'll take a look. As
long as its simple enough of an example for me to understand :-)

I'm working on it :)


Even a
breakdown of whats in each block and what the relationship between the
edge you are inserting on and the pred/succs of the involved blocks is
probably enough for me to sort it out. It seems there is a switch
involved, what edge are you inserting on, and what are the pred/succs
which cause this to be a critical edge?

Andrew




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