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]

[tree-ssa] Minor dominator improvement



When Andrew revamped the operand management he ran into a bug where
ccp_fold_builtin would core trying to find the length of a non-existent
argument to certain builtin functions (specifically those which did not
have arguments).

Andrew's code was good at triggering that core because it actually fixed
a minor buglet in cprop_into_stmt which prevented copy propagations into
statements which had no real uses, but which had virtual uses.  That
in turn caused us to call fold_stmt on more builtins, thus triggering the
latent bug.

We agreed to temporarily keep the old cprop_into_stmt behavior until we
could fix ccp_fold_builtin, which was on my todo list.  Luckily, Jan
submitted a fix for ccp_fold_builtin before the holiday break which I
installed tonight.

With the ccp_fold_builtin bug fixed, we can now allow cprop_into_stmt
to copy propagate into statements which have no real uses, but which
have virtual uses.    It probably makes no significant difference in
the generated code, but it is the right thing to do.

Bootstrapped and regression tested on i686-pc-linux-gnu.



	* tree-ssa-dom.c (cprop_into_stmt): Remove hack which prevented
	copy propagation into statements with virtual operands, but no
	real operands.

Index: tree-ssa-dom.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-dom.c,v
retrieving revision 1.1.2.105
diff -c -3 -p -r1.1.2.105 tree-ssa-dom.c
*** tree-ssa-dom.c	5 Jan 2004 23:19:30 -0000	1.1.2.105
--- tree-ssa-dom.c	6 Jan 2004 07:24:03 -0000
*************** cprop_into_stmt (tree stmt)
*** 1768,1775 ****
    table_size[2] = NUM_VDEFS (vdefs);
    for (table_index = 0; table_index < 3; table_index++)
      {
-       if (table_size[table_index] == 0)
- 	return false;
        for (i = 0; i < table_size[table_index]; i++)
  	{
  	  tree val;
--- 1768,1773 ----





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