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] Fix gcc.misc-tests/bprob-1.c [patch]


In message <20030131163228.GB24389@tornado.toronto.redhat.com>, Diego Novillo w
rites:
 >This fixes the regression that Jeff spotted yesterday.  The
 >problem was that now that we coalesce labels, the CFG cleanup
 >pass was missing live labels because it only checked the first
 >label in each block.  This code:
 >
 >	switch (4)
 >	  {
 >	    case 1:
 >	     ...
 >	     break;
 >
 >	    case 3:
 >	    case 4:
 >	     ...
 >	     break;
 >	  }
 >
 >would get wiped out because the 'case 4' label is not first in
 >the block.
 >
 >Bootstrapped and tested on x86.
 >
 >
 >Diego.
 >
 >
 >
 >	* tree-cfg.c (find_taken_edge_cond_expr): New function.
 >	(find_taken_edge_switch_expr): New function.
 >	(value_matches_some_label): New function.
 >	(find_taken_edge): Re-structure to use the three new functions.
Which makes me wonder if this is why the compiler was able to
compile insn-attrtab.c faster after the coalescing patch.  If we
were incorrectly wiping out code, then, well there'd be less for
the backend optimizers (particularly gcse) to do...

jeff


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