aboutsummaryrefslogtreecommitdiff
path: root/gcc/generic-match-head.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-10-24 11:00:08 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-10-24 11:00:08 +0000
commite0ee10ed5af17d90ea7621d4270a50284ad76c45 (patch)
tree826b57b3cced839600a97bf9bbdd9105348dfd6e /gcc/generic-match-head.c
parent77efea31205aab4e4fa0d2760d2fa6108d4a56f3 (diff)
downloadgcc-e0ee10ed5af17d90ea7621d4270a50284ad76c45.zip
gcc-e0ee10ed5af17d90ea7621d4270a50284ad76c45.tar.gz
gcc-e0ee10ed5af17d90ea7621d4270a50284ad76c45.tar.bz2
genmatch.c (expr::gen_transform): Use fold_buildN_loc and build_call_expr_loc.
2014-10-24 Richard Biener <rguenther@suse.de> * genmatch.c (expr::gen_transform): Use fold_buildN_loc and build_call_expr_loc. (dt_simplify::gen): Drop non_lvalue for GIMPLE, use non_lvalue_loc to build it for GENERIC. (decision_tree::gen_generic): Add location argument to generic_simplify prototype. (capture_info): New class. (capture_info::capture_info): New constructor. (capture_info::walk_match): New method. (capture_info::walk_result): New method. (capture_info::walk_c_expr): New method. (dt_simplify::gen): Handle preserving side-effects for GENERIC code generation. (decision_tree::gen_generic): Do not reject operands with TREE_SIDE_EFFECTS. * generic-match.h: New file. * generic-match-head.c: Include generic-match.h, not gimple-match.h. * match.pd: Add some constant folding patterns from fold-const.c. * fold-const.c: Include generic-match.h. (fold_unary_loc): Dispatch to generic_simplify. (fold_ternary_loc): Likewise. (fold_binary_loc): Likewise. Remove patterns now implemented by generic_simplify. * gimple-fold.c (replace_stmt_with_simplification): New function. (fold_stmt_1): Add valueize parameter, dispatch to gimple_simplify. (no_follow_ssa_edges): New function. (fold_stmt): New overload with valueization hook. Use no_follow_ssa_edges for the overload without hook. (fold_stmt_inplace): Likewise. * gimple-fold.h (no_follow_ssa_edges): Declare. From-SVN: r216631
Diffstat (limited to 'gcc/generic-match-head.c')
-rw-r--r--gcc/generic-match-head.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/generic-match-head.c b/gcc/generic-match-head.c
index 245f3ed..0ed7e1d 100644
--- a/gcc/generic-match-head.c
+++ b/gcc/generic-match-head.c
@@ -43,6 +43,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree-phinodes.h"
#include "ssa-iterators.h"
#include "dumpfile.h"
-#include "gimple-match.h"
+#include "generic-match.h"