[PR/middle-end 81897] make tree-ssa-uninit.c handle longer sequences
Jeff Law
law@redhat.com
Wed Jan 10 21:29:00 GMT 2018
On 01/10/2018 10:45 AM, Aldy Hernandez wrote:
>>> @@ -671,11 +668,9 @@ convert_control_dep_chain_into_preds (vec<edge> *dep_chains,
>>> e = one_cd_chain[j];
>>> guard_bb = e->src;
>>> gsi = gsi_last_bb (guard_bb);
>>> + /* Ignore empty BBs as they're basically forwarder blocks. */
>>> if (gsi_end_p (gsi))
>>> - {
>>> - has_valid_pred = false;
>>> - break;
>>> - }
>>> + continue;
>>> cond_stmt = gsi_stmt (gsi);
>>> if (is_gimple_call (cond_stmt) && EDGE_COUNT (e->src->succs) >= 2)
>>> /* Ignore EH edge. Can add assertion on the other edge's flag. */
>> ISTM that you want to use empty_block_p (bb) && single_succ_p (bb) to
>> detect the forwarder block. Otherwise ISTM that labels and debug
>> statements would affect the uninit analysis.
> We still need to check for gsi_end_p() because guard_bb can have no
> statements but be considered non empty according to empty_block_p().
> This is the case with a seemingly empty basic block that actually has
> an incoming PHI.
>
> Jakub suggested the following patch which fixes the new ICE in the PR.
> I've adjusted the comments accordingly.
>
> OK?
>
>
> curr.patch
>
>
> gcc/
>
> PR middle-end/81897
> * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
> empty blocks.
OK.
Sorry for mucking things up and making more work :(
jeff
More information about the Gcc-patches
mailing list