[PATCH][RFC] Come up with VEC_COND_OP_EXPRs.
Martin Liška
mliska@suse.cz
Tue Sep 24 10:25:00 GMT 2019
Hi.
The patch introduces couple of new TREE_CODEs that will help us to have
a proper GIMPLE representation of current VECT_COND_EXPR. Right now,
the first argument is typically a GENERIC tcc_expression tree with 2 operands
that are visited at various places in GIMPLE code. That said, based on the discussion
with Richi, I'm suggesting to come up with e.g.
VECT_COND_LT_EXPR<COND_LHS, COND_RHS, IF_CLAUSE, ELSE_CLAUSE>. Such a change logically
introduces new GIMPLE_QUATERNARY_RHS gassignments. For now, the VEC_COND_EXPR remains
and is only valid in GENERIC and gimplifier will take care of the corresponding transition.
The patch is a prototype and missing bits are:
- folding support addition for GIMPLE_QUATERNARY_RHS is missing
- fancy tcc_comparison expressions like LTGT_EXPR, UNORDERED_EXPR, ORDERED_EXPR,
UNLT_EXPR and others are not supported right now
- comments are missing for various functions added
Apart from that I was able to bootstrap and run tests with a quite small fallout.
Thoughts?
Martin
---
gcc/cfgexpand.c | 33 ++++++++-----
gcc/expr.c | 36 +++++++++-----
gcc/expr.h | 2 +-
gcc/gimple-expr.c | 14 +++++-
gcc/gimple-expr.h | 6 +--
gcc/gimple-fold.c | 15 +++++-
gcc/gimple-match-head.c | 3 ++
gcc/gimple-pretty-print.c | 76 ++++++++++++++++++++--------
gcc/gimple.c | 95 ++++++++++++++++++++++++++++++-----
gcc/gimple.h | 82 +++++++++++++++++++++++++-----
gcc/gimplify.c | 42 +++++++++++-----
gcc/optabs.c | 58 +++++++++-------------
gcc/optabs.h | 2 +-
gcc/tree-cfg.c | 99 ++++++++++++++++++++++++++++++++-----
gcc/tree-inline.c | 2 +-
gcc/tree-ssa-forwprop.c | 11 +++--
gcc/tree-ssa-loop-niter.c | 4 +-
gcc/tree-ssa-operands.c | 1 -
gcc/tree-ssa-pre.c | 5 +-
gcc/tree-ssa-reassoc.c | 4 +-
gcc/tree-ssa-scopedtables.c | 46 ++++++++++++++++-
gcc/tree-ssa-scopedtables.h | 2 +
gcc/tree-vect-generic.c | 53 +++++++++++---------
gcc/tree-vect-loop.c | 50 ++++++++-----------
gcc/tree-vect-patterns.c | 4 +-
gcc/tree-vect-stmts.c | 17 ++++---
gcc/tree.def | 7 +++
gcc/tree.h | 64 ++++++++++++++++++++++++
28 files changed, 620 insertions(+), 213 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Come-up-with-VECT_COND_OP_EXPRs.patch
Type: text/x-patch
Size: 60874 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190924/64c4e80b/attachment.bin>
-------------- next part --------------
=== FAILURES ===
FAIL: g++.dg/ext/pr56790-1.C -std=gnu++14 scan-tree-dump ccp1 "{ 5, 13 }"
FAIL: g++.dg/ext/pr56790-1.C -std=gnu++17 scan-tree-dump ccp1 "{ 5, 13 }"
FAIL: g++.dg/ext/pr56790-1.C -std=gnu++98 scan-tree-dump ccp1 "{ 5, 13 }"
FAIL: g++.dg/tree-ssa/cprop-vcond.C -std=gnu++14 1 blank line(s) in output
FAIL: g++.dg/tree-ssa/cprop-vcond.C -std=gnu++14 (internal compiler error)
FAIL: g++.dg/tree-ssa/cprop-vcond.C -std=gnu++14 (test for excess errors)
FAIL: g++.dg/tree-ssa/cprop-vcond.C -std=gnu++17 1 blank line(s) in output
FAIL: g++.dg/tree-ssa/cprop-vcond.C -std=gnu++17 (internal compiler error)
FAIL: g++.dg/tree-ssa/cprop-vcond.C -std=gnu++17 (test for excess errors)
FAIL: g++.dg/tree-ssa/cprop-vcond.C -std=gnu++98 1 blank line(s) in output
FAIL: g++.dg/tree-ssa/cprop-vcond.C -std=gnu++98 (internal compiler error)
FAIL: g++.dg/tree-ssa/cprop-vcond.C -std=gnu++98 (test for excess errors)
FAIL: g++.dg/tree-ssa/pr88152-2.C -std=gnu++14 scan-tree-dump-not forwprop1 " (?:>|>=|<|<=) { -214748364[78]"
FAIL: g++.dg/tree-ssa/pr88152-2.C -std=gnu++14 scan-tree-dump-not forwprop1 " (?:>|>=|<|<=) { 214748364[67]"
FAIL: g++.dg/tree-ssa/pr88152-2.C -std=gnu++14 scan-tree-dump-times forwprop1 "(?:return| =) { -1, -1, -1, -1 }" 2
FAIL: g++.dg/tree-ssa/pr88152-2.C -std=gnu++14 scan-tree-dump-times forwprop1 "(?:return| =) { 0, 0, 0, 0 }" 2
FAIL: g++.dg/tree-ssa/pr88152-2.C -std=gnu++17 scan-tree-dump-not forwprop1 " (?:>|>=|<|<=) { -214748364[78]"
FAIL: g++.dg/tree-ssa/pr88152-2.C -std=gnu++17 scan-tree-dump-not forwprop1 " (?:>|>=|<|<=) { 214748364[67]"
FAIL: g++.dg/tree-ssa/pr88152-2.C -std=gnu++17 scan-tree-dump-times forwprop1 "(?:return| =) { -1, -1, -1, -1 }" 2
FAIL: g++.dg/tree-ssa/pr88152-2.C -std=gnu++17 scan-tree-dump-times forwprop1 "(?:return| =) { 0, 0, 0, 0 }" 2
FAIL: g++.dg/tree-ssa/pr88152-2.C -std=gnu++98 scan-tree-dump-not forwprop1 " (?:>|>=|<|<=) { -214748364[78]"
FAIL: g++.dg/tree-ssa/pr88152-2.C -std=gnu++98 scan-tree-dump-not forwprop1 " (?:>|>=|<|<=) { 214748364[67]"
FAIL: g++.dg/tree-ssa/pr88152-2.C -std=gnu++98 scan-tree-dump-times forwprop1 "(?:return| =) { -1, -1, -1, -1 }" 2
FAIL: g++.dg/tree-ssa/pr88152-2.C -std=gnu++98 scan-tree-dump-times forwprop1 "(?:return| =) { 0, 0, 0, 0 }" 2
FAIL: gcc.c-torture/execute/ieee/pr50310.c compilation, -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (internal compiler error)
FAIL: gcc.c-torture/execute/ieee/pr50310.c compilation, -O3 -g (internal compiler error)
FAIL: gcc.dg/pr50310-1.c (internal compiler error)
FAIL: gcc.dg/pr50310-1.c (test for excess errors)
FAIL: gcc.dg/pr50310-2.c (internal compiler error)
FAIL: gcc.dg/pr50310-2.c (test for excess errors)
FAIL: gcc.dg/tree-ssa/foldconst-6.c scan-tree-dump-not ccp1 "2, 666"
FAIL: gcc.dg/tree-ssa/operand-equal-2.c scan-tree-dump fre1 "v = . 0, 0, 0, 0 ."
FAIL: gcc.dg/tree-ssa/pr68714.c scan-tree-dump-times reassoc1 " <= " 1
More information about the Gcc-patches
mailing list