This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RFC: overloading constraints
- From: Joern Rennecke <joernr at arc dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 17 Oct 2008 17:51:03 +0100
- Subject: RFC: overloading constraints
I want some constriants to be register constraints when compiling with
a particular set of compiler flags, and extra constraints when compiling
with another.
(In the first case, alternatives that use this constraint can be selected by
reload for reloading non-matching insns, whereas in the second case, they
will only be used if they already match. The register constraint then
yields NO_REG to allow the other definition to have effect).
That was straightforward with the old constraint target macros, but when
you define this in constraints.md, you get an error.
Are there any objections to implement constraint overloading in genpreds.c ?
Is it OK to just accept multiple definitions for disjoint categories,
or would you like to see msome extra syntactic sugar to affirm that
the overloading is intentional?