]> gcc.gnu.org Git - gcc.git/commit
Add null identifiers to genmatch
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 17 Nov 2015 18:48:23 +0000 (18:48 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 17 Nov 2015 18:48:23 +0000 (18:48 +0000)
commitfa74b47a8c825cbdde6f97591befb474b739006f
treebdc10567de14ef2c88576714c0c54d848ad98243
parentc9e926ce2bdc8bdce5fd9892443cf6147868e7f6
Add null identifiers to genmatch

This patch adds a null identifier that can never match anything and
can never be generated.  It is only valid in operator lists and fors.
Later patches will add uses of it.

The idea is to allow operator lists for maths functions that have
four entries:

- float built-in
- double built-in
- long double built-in
- internal function

Not all maths functions have an associated internal function,
and for those the final operator will be "null".  Any simplification
that tries to use a null substitution will be skipped.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
* doc/match-and-simplify.texi: Document the "null" identifier.
* genmatch.c (id_base::NULL_ID): New kind.
(null_id): New variable.
(get_operator): Add a parameter that says whether null identifiers
are allowed.
(contains_id): New function.
(lower_for): Skip substitutions that would have a null_id in
either the match or the result.
(parser::parse_for): Allow the null identifier to be used.
(parser::parse_operator_list): Likewise.
(main): Initialize null_id.

From-SVN: r230485
gcc/ChangeLog
gcc/doc/match-and-simplify.texi
gcc/genmatch.c
This page took 0.056205 seconds and 5 git commands to generate.