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]

Re: i386 bootstrap failure - analysis


> Date: Sun, 24 Jun 2001 09:14:54 -0700
> From: Richard Henderson <rth@redhat.com>
> To: Zack Weinberg <zackw@stanford.edu>

> The problem is with Meissner's __builtin_expect jump optimization.
> It may evaluate an expression twice.  Not all expressions can be
> re-evaluated; the most common evil form being STMT_EXPR.

> + 	case 2: /* Wildly unsafe.  */
> + 	  return NULL_RTX;

It is critical that over time we fix these instances so that they
_can_ be re-evaluated.  It is unfortunate that new trees are going in
that cannot be re-evaluated.

A quick check of some new code:

            case 2: /* Wildly unsafe.  */
              {
                tree var = build_decl (VAR_DECL, NULL_TREE,
                                       TREE_TYPE (args[i].tree_value));
                SET_DECL_RTL (var,
                              expand_expr (args[i].tree_value, NULL_RTX,
                                           VOIDmode, EXPAND_NORMAL));
                args[i].tree_value = var;
              }

makes me wonder if this works for C++.  A constant problem in C++ is
that the back-end isn't allow to every copy values around.  My reading
of the above seems to have this as not workable for C++.

:-(

Now, we probably don't trip this yet, one would hope, but, this type
of coding makes the trees very brittle.  You can use any trees
composited anyway you want, as long as you avoid all these complex
compositions.  :-(

The existence of the unsafe call I think is bad, as it gives the
impression that it is ok to have something unsafe.  In the original
code, I put the abort in there as it wasn't generated, and we need to
fix the code so that it was unsave friendly.

unsafe should go.


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