genmatch.c (::gen_transform): Add capture_info and expand_compares arguments.
authorRichard Biener <rguenther@suse.de>
Wed, 12 Nov 2014 12:49:14 +0000 (12:49 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 12 Nov 2014 12:49:14 +0000 (12:49 +0000)
commit47b25362bc8f509e3e1852a4ec719494e6afaace
tree0d922379b068aa7f068f84da48c36830c63bae8b
parent1304953e4fa46305d1ce0b884bf2f58e08409ff3
genmatch.c (::gen_transform): Add capture_info and expand_compares arguments.

2014-11-12  Richard Biener  <rguenther@suse.de>

* genmatch.c (::gen_transform): Add capture_info and
expand_compares arguments.
(struct expr): Add is_generic flag.
(lower_cond): New functions lowering [VEC_]COND_EXPR
conditions to a GENERIC and a GIMPLE variant.
(lower): Call lower_cond.
(cmp_operand): Also compare the is_generic flag.
(capture_info::cinfo): Add cond_expr_cond_p flag.
(capture_info::capture_info): Pass down whether the
expression argument is a COND_EXPR condition.
(capture_info::walk_match): Likewise, mark captures
capturing COND_EXPR conditions with cond_expr_cond_p.
(expr::gen_transform): Pass down whether we need to
expand compares from COND_EXPR conditions.
(capture::gen_transform): Expand compares substituted
from COND_EXPR conditions into non-COND_EXPR conditions.
(dt_operand::gen_gimple_expr): Handle explicitely marked
GENERIC expressions as generic.
(dt_simplify::gen): Pass whether we need to expand
conditions to gen_transform.  Handle capture results
which are from COND_EXPR conditions.
(main): Pass gimple flag down to lower.

From-SVN: r217416
gcc/ChangeLog
gcc/genmatch.c