This is the mail archive of the 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]

constraints in define_expand

[ was: Re: combination of read/write and earlyclobber constraint modifier ]

On 02-07-14 17:52, Jeff Law wrote:
(by the way, in the same file, I noticed some
define_expand with constraints, that looks strange)
It sometimes happens when a define_insn is converted into a define_expand --
folks just forget to remove the pointless constraints.

I happened to come across some code that is trying to check for this case in validate_pattern in genrecog.c:
               don't use the MATCH_OPERAND constraint, only the predicate.
               This is confusing to folks doing new ports, so help them
               not make the mistake.  */
            if (GET_CODE (insn) == DEFINE_EXPAND
                || GET_CODE (insn) == DEFINE_SPLIT
                || GET_CODE (insn) == DEFINE_PEEPHOLE2)
                if (constraints0)
                  error_with_line (pattern_lineno,
                                   "constraints not supported in %s",
                                   rtx_name[GET_CODE (insn)]);

But it doesn't triggered for define_expand, because validate_pattern is only used in genrecog.c, and define_expand is ignored in the main function.

- Tom

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