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: define_constraints patch, re-revised


On 10/2/06, Zack Weinberg <zackw@panix.com> wrote:
Oh ho, I know what's going on now.  There are two problems.  First, I
was mistaken in thinking that the boilerplate code got unconditionally
emitted; it's cut out if we don't think it's needed.  Second, there is
an optimization in add_constraint ("Remove the redundant match_code
from the expression") which is correct when IJKLMNOP constraints are
called from the legacy interface (CONST_OK_FOR_CONSTRAINT/LETTER) but
not when the satisfies_constraint_* functions / satisfies_constraint_p
are called directly.  I will try to find time to patch this in the
next week or so, but I can't make any promises.

Here is a patch which I believe will fix this problem and a number of related problems. Assuming this message gets through - I keep getting "quota exceeded" bounces - would you please test it on your architecture, Rask? It has passed an i686-linux bootstrap, and manual inspection of the relevant generated files suggests the problem is gone, but that target is not terribly interesting.

zw

       * genpreds.c (add_constraint): Do not remove anything from the
expression here.
       (write_tm_constrs_h): Determine whether op will be unused, and
tag it with
       ARG_UNUSED if so.
       (write_insn_const_int_ok_for_constraint): Avoid writing out
the redundant (and
       impossible to evaluate in this context) test for a CONST_INT
that will be in the predicate
      expression.


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