* match.pd: Mark operators in some bitwise and plus-minus
patterns to be commutative.
Thanks and Regards,
Prathamesh
Index: gcc/match.pd
===
--- gcc/match.pd (revision 211893)
+++ gcc/match.pd (working copy)
@@ -138,7 +138,7 @@ along
* genmatch.c (gen_gimple_match_fail): Remove.
(expr::gen_gimple_transform): Remove call to gen_gimple_match_fail.
Change fprintf (f, if (!res)) to fprintf (f, if (!res) return false;\n)
Thanks and Regards,
Prathamesh
Index: gcc/genmatch.c
Hi,
This patch attempts to generate temporaries only when required.
I have changed generation of operand names. All children of an expr-node
are assigned at expr-node itself.
Names are generated as follows at expr-node:
olevelchild-pos = rhs;
where level is level of the expr-node in decision
oops, didn't set plain text mode.
sorry for re-post.
On Tue, Jun 24, 2014 at 4:59 PM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
This patch factors out checking expression-code in gimple-match-head.c
* gimple-match-head.c (check_gimple_assign): New function
On Tue, Jun 24, 2014 at 9:00 PM, Richard Biener rguent...@suse.de wrote:
This massages things so GENERIC code-gen works (well, is emitted
and compiles). The GENERIC interface matches that of
fold_{unary,binary,ternary} with also supporting calls here.
It's supposed to be called at the start
This patch avoids multiple definitions of def_stmt in different
blocks, and moves it at
the beginning of gimple_match_and_simplify.
* genmatch.c (decision_tree::gen_gimple): Call fprintf to generate
definition of def_stmt.
(dt_operand::gen_gimple_expr): Adjust call to fprintf to generate
This patch factors expression checking for GIMPLE.
Generates code as:
if (TREE_CODE (opname) == SSA_NAME)
{
gimple def_stmt = SSA_NAME_DEF_STMT (opname);
if (is_gimple_assign (def_stmt))
{
if (gimple_assign_rhs_code (def_stmt) == expr-code1)
{
}
if
Hi,
This patch adds few test-cases for gimple match-and-simplfiy and
removes match-2.c
[gcc/testsuite/gcc.dg/tree-ssa]
* match-2.c: Remove.
* match-plusminus.c: New test-case.
* match-bitwise.c: Likewise.
* match-realimag.c: Likewise.
Thanks and Regards,
Prathamesh
Index:
This patch adds DEBUG_FUNCTION attribute to print_* functions
in genmatch.c
* genmatch.c (print_operand): Add attribute DEBUG_FUNCTION.
(print_matches): Likewise.
(decision_tree::print_node): Likewise.
(decision_tree::print): Likewise.
Thanks and Regards,
Prathamesh
Index: genmatch.c
Hi,
This patch uses integral_op_p instead of
if (INTEGRAL_TYPE_P (TREE_TYPE (@0)))
* match.pd: Remove INTEGRAL_TYPE_P (TREE_TYPE (@0)) in bitwise
patterns and use integral_op_p@0
Thanks and Regards,
Prathamesh
Index: match.pd
===
On Mon, Jul 14, 2014 at 5:36 PM, Richard Biener
richard.guent...@gmail.com wrote:
On Fri, Jul 11, 2014 at 4:59 PM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
On 7/11/14, Richard Biener richard.guent...@gmail.com wrote:
On Thu, Jul 10, 2014 at 8:05 PM, Prathamesh Kulkarni
Would it be a good idea to allow multiple match_and_simplify within for ?
* genmatch.c (parse_for): Adjust to parse multiple patterns.
Thanks and Regards,
Prathamesh
Index: genmatch.c
===
--- genmatch.c (revision 212558)
+++
On Wed, Jul 23, 2014 at 3:42 AM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
Would it be a good idea to allow multiple match_and_simplify within for ?
allow multiple patterns (match_and_simplify, for).
* genmatch.c (parse_for): Adjust to parse multiple patterns.
Thanks and Regards
I was displaying pattern = number for debugging some issue related to
implementing for-pattern, not meant for dumping with -v
Removed accordingly.
* genmatch.c (main): Remove unnecessary debug information.
Thanks and Regards,
Prathamesh
Index: genmatch.c
This patch changes syntax of inner-if to be parenthesized - (if (cond))
* genmatch.c (parse_match_and_simplify): Adjust to parse parenthesized if.
(peek_ident): New function.
* match.pd: Adjust patterns having if-expr to new syntax.
Thanks and Regards,
Prathamesh
Index: gcc/genmatch.c
Reject for that has no pattern defined.
eg - (for op in plus minus)
* genmatch.c (parse_for): Reject for that has no pattern defined.
Thanks and Regards,
Prathamesh
Index: genmatch.c
===
--- genmatch.c (revision 212928)
+++
Added checks to see if either cmmand-line options is not repeated,
and generates match-and-simplify code on both GENERIC and GIMPLE
if both -generic and -gimple are specified.
* genmatch.c (cmd_options): New struct.
(check_repeated_arg): New function.
(parse_cmd_arg): Likewise.
Is it okay to include is-a.h ?
I have adjusted print_operand to use is_a and as_a in this patch.
* genmatch.c (is-a.h): Include.
(is_a_helper::test): Specialize for operand subclasses.
(print_operand): Adjust to use is_a and as_a.
Thanks,
Prathamesh.
Index: genmatch.c
On Mon, Jul 28, 2014 at 7:30 PM, David Malcolm dmalc...@redhat.com wrote:
On Mon, 2014-07-28 at 02:35 +0530, Prathamesh Kulkarni wrote:
- if (o-type == operand::OP_CAPTURE)
+ if (is_acapture * (o))
{
- capture *c = static_castcapture * (o);
- fprintf (f, @%s
Hi,
For the following test-case:
struct A {};
clang -fsyntax-only -Wc++-compat gives following warning and gcc does not:
empty-struct.c:1:1: warning: empty struct has size 0 in C, size 1 in
C++ [-Wc++-compat]
struct F {};
This patch adds the above warning to the C FE.
Bootstrapped on
On Tue, Nov 11, 2014 at 3:35 AM, Marek Polacek pola...@redhat.com wrote:
On Tue, Nov 11, 2014 at 03:24:48AM +0530, Prathamesh Kulkarni wrote:
* gcc/c/c-decl.c
(warn_cxx_compat_finish_struct): Add new parameter of type location_t.
Warn for empty struct.
(finish_struct): Pass loc
On Tue, Nov 11, 2014 at 4:30 PM, Marek Polacek pola...@redhat.com wrote:
On Tue, Nov 11, 2014 at 04:45:46AM +0530, Prathamesh Kulkarni wrote:
Index: gcc/c/c-decl.c
===
--- gcc/c/c-decl.c(revision 217287)
+++ gcc/c/c-decl.c
On Wed, Nov 12, 2014 at 1:28 AM, Marek Polacek pola...@redhat.com wrote:
On Tue, Nov 11, 2014 at 11:27:21PM +0530, Prathamesh Kulkarni wrote:
I tried the following:
struct A { struct B {}; int x; } /* { dg-warning empty struct has
size 0 in C
On Sat, Nov 15, 2014 at 3:06 AM, Joseph Myers jos...@codesourcery.com wrote:
On Wed, 12 Nov 2014, Prathamesh Kulkarni wrote:
Is this version okay ?
[gcc/c]
* c-decl.c (warn_cxx_compat_finish_struct): New parameters code,
record_loc.
Warn for empty struct.
(finish_struct
I had sent this patch during stage-3 of gcc-4.9.
Is the patch OK ?
On Thu, Feb 20, 2014 at 6:26 PM, Marek Polacek pola...@redhat.com wrote:
On Thu, Feb 20, 2014 at 05:52:09PM +0530, Prathamesh Kulkarni wrote:
Show column number of left operand instead of comma operator
in the warning left-hand
forgot to add gcc-patches@gcc.gnu.org. Sorry for the double-post.
On Wed, Apr 23, 2014 at 11:28 PM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
This is a follow up mail to
http://gcc.gnu.org/ml/gcc-help/2014-04/msg00096.html
I have attached patch that prints the warning when passed
for pedantic or
warn_traditional.
Thanks and Regards,
Prathamesh
On Wed, Apr 23, 2014 at 11:30 PM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
forgot to add gcc-patches@gcc.gnu.org. Sorry for the double-post.
On Wed, Apr 23, 2014 at 11:28 PM, Prathamesh Kulkarni
bilbotheelffri
Use macro CPP_PEDANTIC (PF) instead of directly using
it's definition: CPP_OPTION (PF, cpp_pedantic).
[libcpp]
* directives.c (_cpp_handle_directive): Use CPP_PEDANTIC macro.
* macro.c (parse_params): Likewise.
Bootstrapped on x86_64-unknown-linux-gnu.
OK for trunk ?
Thanks and Regards,
:15 AM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
Hi,
There was a comment in parse_c_expr, mentioning to use obstack to
build c-code string. I have attached patch for the same.
OK to commit ?
* genmatch.c (parse_c_expr): Use obstack to build c code string.
Thanks and Regards
On Fri, Apr 25, 2014 at 11:19 PM, Tom Tromey tro...@redhat.com wrote:
Prathamesh == Prathamesh Kulkarni bilbotheelffri...@gmail.com writes:
Prathamesh Use macro CPP_PEDANTIC (PF) instead of directly using
Prathamesh it's definition: CPP_OPTION (PF, cpp_pedantic).
I'm curious why you want
Hi,
Shall it a good idea to add new warning -Wsizeof-array-argument that
warns when sizeof is applied on parameter declared as an array ?
Similar to clang's -Wsizeof-array-argument:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20110613/042812.html
This was also reported as
On Sun, Apr 27, 2014 at 5:31 PM, Trevor Saunders tsaund...@mozilla.com wrote:
On Sun, Apr 27, 2014 at 02:31:46AM +0530, Prathamesh Kulkarni wrote:
Hi,
Shall it a good idea to add new warning -Wsizeof-array-argument that
warns when sizeof is applied on parameter declared as an array
On Sun, Apr 27, 2014 at 8:48 PM, Trevor Saunders tsaund...@mozilla.com wrote:
On Sun, Apr 27, 2014 at 06:21:20PM +0530, Prathamesh Kulkarni wrote:
On Sun, Apr 27, 2014 at 5:31 PM, Trevor Saunders tsaund...@mozilla.com
wrote:
On Sun, Apr 27, 2014 at 02:31:46AM +0530, Prathamesh Kulkarni wrote
On Sun, Apr 27, 2014 at 11:22 PM, pins...@gmail.com wrote:
On Apr 27, 2014, at 10:09 AM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
On Sun, Apr 27, 2014 at 8:48 PM, Trevor Saunders tsaund...@mozilla.com
wrote:
On Sun, Apr 27, 2014 at 06:21:20PM +0530, Prathamesh Kulkarni
On Mon, Apr 28, 2014 at 1:31 AM, Andrew Pinski pins...@gmail.com wrote:
On Sun, Apr 27, 2014 at 12:50 PM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
On Sun, Apr 27, 2014 at 11:22 PM, pins...@gmail.com wrote:
On Apr 27, 2014, at 10:09 AM, Prathamesh Kulkarni
bilbotheelffri
On Mon, Apr 28, 2014 at 2:13 AM, Andrew Pinski pins...@gmail.com wrote:
On Sun, Apr 27, 2014 at 1:25 PM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
On Mon, Apr 28, 2014 at 1:31 AM, Andrew Pinski pins...@gmail.com wrote:
On Sun, Apr 27, 2014 at 12:50 PM, Prathamesh Kulkarni
On Tue, Apr 29, 2014 at 2:07 PM, Manuel López-Ibáñez
lopeziba...@gmail.com wrote:
On 23 April 2014 20:03, Prathamesh Kulkarni bilbotheelffri...@gmail.com
wrote:
I didn't attach the patch, I am extremely sorry for the noise.
I am re-posting the mail.
This is a follow up mail to
http
{-Wtraditional}. To inhibit the warning
+messages, use @option{-Wno-variadic-macros}.
@item -Wvarargs
@opindex Wvarargs
Thanks. I added this to the patch.
On 29 April 2014 14:41, Prathamesh Kulkarni bilbotheelffri...@gmail.com
wrote:
Is this version OK ?
[libcpp]
* macro.c (parse_params
On Tue, Apr 29, 2014 at 7:37 PM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
On Tue, Apr 29, 2014 at 6:49 PM, Manuel López-Ibáñez
lopeziba...@gmail.com wrote:
This hunk in your patch doesn't seem related:
Oops, Sorry. Removed that, and re-tested.
@@ -509,6 +509,9 @@ Warn about
Append evaluates to 0, in Wundef diagnostic.
clang prints the following diagnostic for -Wundef:
undef.c:1:5: warning: 'FOO' is not defined, evaluates to 0 [-Wundef]
#if FOO
^
OK to commit ?
[libcpp]
* expr.c (eval_token): Modify Wundef diagnostic.
[gcc/testsuite/gcc.dg/cpp]
* warn-undef.c:
On Fri, May 2, 2014 at 5:50 AM, Joseph S. Myers jos...@codesourcery.com wrote:
The following apply to all versions of this patch:
* New options need documenting in invoke.texi.
Added.
* New options need nonempty help text in c.opt. (It's unfortunate that
the -Wsizeof-pointer-memaccess
Put a check for capture index.
* genmatch.c (parse_capture): Add condition to check capture index.
(capture_max): New constant.
(stdlib.h): Include.
Thanks and Regards,
Prathamesh
Index: genmatch.c
Hi, I was wondering if it's a good idea to add -Wheader-guard option
that warns on mismatches between #ifndef and #define lines
in header guard, similar to -Wheader-guard in clang-3.4 ?
(http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html)
I have implemented patch for -Wheader-guard
This patch removes C_EXPR_APPEND macro in c-tree.h
OK for trunk ?
* c-parser.c (c_parser_get_builtin_args): replace calls to
C_EXPR_APPEND (cexpr_list, expr) by vec_safe_push (cexpr_list, expr)
* c-tree.h (C_EXPR_APPEND): removed
Index: gcc/c/c-parser.c
On Sat, Feb 8, 2014 at 2:22 AM, Joseph S. Myers jos...@codesourcery.com wrote:
On Sat, 8 Feb 2014, Prathamesh Kulkarni wrote:
This patch removes C_EXPR_APPEND macro in c-tree.h
OK for trunk ?
Thanks, this is OK with the orphan comment A varray of c_expr_t. also
removed (please send
On Sat, Feb 8, 2014 at 3:06 AM, Marek Polacek pola...@redhat.com wrote:
On Sat, Feb 08, 2014 at 02:51:03AM +0530, Prathamesh Kulkarni wrote:
On Sat, Feb 8, 2014 at 2:22 AM, Joseph S. Myers jos...@codesourcery.com
wrote:
On Sat, 8 Feb 2014, Prathamesh Kulkarni wrote:
This patch removes
A trivial fix to print quotes around ) in libcpp/macro.c
OK for trunk ?
* macro.c (parse_params): print quote around ) in call to cpp_error() in
case CPP_EOF
Index: libcpp/macro.c
===
--- libcpp/macro.c(revision 207627)
+++
On Sun, Feb 9, 2014 at 8:31 PM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
A trivial fix to print quotes around ) in libcpp/macro.c
OK for trunk ?
Will not work for if pfile-cb.error callback does not recognize % and %
(maybe clients other than c, c++ front-ends ?).
So we cannot
* (generic.texi): Fix typo
Index: generic.texi
===
--- generic.texi(revision 207627)
+++ generic.texi(working copy)
@@ -53,7 +53,7 @@ seems inelegant.
@node Deficiencies
@section Deficiencies
-There are many places in
This patch folds strchr (e, 0) to e + strlen (e), if e has no side-effects.
Bootstrapped, regtested on x86_64-unknown-linux-gnu
Ok for trunk ?
[gcc]
* gcc/builtins.c (fold_builtin_strchr): returns tree for s1 + strlen (s1)
if TREE_SIDE_EFFECTS (s1) is false and integer_zerop (s2) is true.
On Sat, Feb 15, 2014 at 2:28 PM, Jakub Jelinek ja...@redhat.com wrote:
On Sat, Feb 15, 2014 at 02:23:24PM +0530, Prathamesh Kulkarni wrote:
This patch folds strchr (e, 0) to e + strlen (e), if e has no side-effects.
Bootstrapped, regtested on x86_64-unknown-linux-gnu
Ok for trunk ?
Why do
Replace calls to error() by error_at().
* c-parser.c (c_parser_declspecs): replace call to error () by error_at ()
* c-parser.c (c_parser_parameter_declaration): Likewise
Bootstrapped on x86_64-unknown-linux-gnu
Ok for trunk ?
Thanks and Regards,
Prathamesh
Index: gcc/c/c-parser.c
On Wed, Feb 19, 2014 at 7:01 PM, Marek Polacek pola...@redhat.com wrote:
On Wed, Feb 19, 2014 at 06:05:12PM +0530, Prathamesh Kulkarni wrote:
Replace calls to error() by error_at().
* c-parser.c (c_parser_declspecs): replace call to error () by error_at ()
Replace, drop ()'s, full stop
On Wed, Feb 19, 2014 at 7:56 PM, Marek Polacek pola...@redhat.com wrote:
On Wed, Feb 19, 2014 at 07:43:56PM +0530, Prathamesh Kulkarni wrote:
Index: gcc/testsuite/gcc.dg/decl-9.c
===
--- gcc/testsuite/gcc.dg/decl-9.c (revision
On Wed, Feb 19, 2014 at 9:41 PM, Marek Polacek pola...@redhat.com wrote:
On Wed, Feb 19, 2014 at 08:45:04PM +0530, Prathamesh Kulkarni wrote:
Index: gcc/c/c-parser.c
===
--- gcc/c/c-parser.c (revision 207700)
+++ gcc/c/c-parser.c
On Wed, Feb 19, 2014 at 11:32 PM, Joseph S. Myers
jos...@codesourcery.com wrote:
On Wed, 19 Feb 2014, Prathamesh Kulkarni wrote:
I have sent it attached this time.
Thanks, this version is OK. Please start the copyright assignment
paperwork process if you haven't already done so, if you may
Show column number of left operand instead of comma operator
in the warning left-hand operand of comma expression has no effect
Example:
ax.c:4:6: warning: left-hand operand of comma expression has no effect
[-Wunused-value]
x , y;
^
Instead of comma operator, show location of
On Thu, Feb 20, 2014 at 6:26 PM, Marek Polacek pola...@redhat.com wrote:
On Thu, Feb 20, 2014 at 05:52:09PM +0530, Prathamesh Kulkarni wrote:
Show column number of left operand instead of comma operator
in the warning left-hand operand of comma expression has no effect
Example:
ax.c:4:6
Not sure if this a good idea, but it seemed to me that goto sizeof_expr; wasn't
really required in c_parser_sizeof_expression.
Bootstrapped and regression tested on x8_64-unknown-linux-gnu
Ok for trunk ?
* c-parser.c (c_parser_sizeof_expression): Remove goto sizeof_expr;
Thanks and Regards,
On Sat, Feb 22, 2014 at 10:34 PM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
Not sure if this a good idea, but it seemed to me that goto sizeof_expr;
wasn't
really required in c_parser_sizeof_expression.
Bootstrapped and regression tested on x8_64-unknown-linux-gnu
Ok for trunk
On Sat, Feb 22, 2014 at 11:44 PM, Marek Polacek pola...@redhat.com wrote:
On Sat, Feb 22, 2014 at 10:34:13PM +0530, Prathamesh Kulkarni wrote:
Not sure if this a good idea, but it seemed to me that goto sizeof_expr;
wasn't
really required in c_parser_sizeof_expression.
Bootstrapped
On Sun, Feb 23, 2014 at 1:18 AM, Marek Polacek pola...@redhat.com wrote:
On Sun, Feb 23, 2014 at 12:19:49AM +0530, Prathamesh Kulkarni wrote:
Is this fine ?
No, there still are some formatting issues.
Index: gcc/c/c-parser.c
On Mon, Feb 24, 2014 at 11:28 PM, Marek Polacek pola...@redhat.com wrote:
On Mon, Feb 24, 2014 at 11:08:27PM +0530, Prathamesh Kulkarni wrote:
I apologize for bothering with stupid mistakes.
No problem, it takes some time to get up to speed.
+ mark_exp_read (expr.value);
+ if (TREE_CODE
Not sure if this is a good idea, I thought it would be better to
replace #else #if by #elif.
* hard-reg-set.h: Replace #else #if by #elif.
Bootstrapped on x86_64-unknown-linux-gnu.
Ok for trunk ?
Thanks and Regards,
Prathamesh
Index: gcc/hard-reg-set.h
Instead of iterating each time for calling lowering function
(lower_opt_convert, etc.),
add new lower function and pass lower_opt_convert, lower_for etc. to
it as callback.
* genmatch.c (lower): New overloaded function.
(lower): Adjust to call overloaded lower.
Thanks,
Prathamesh
Index:
Hi,
This patch adds support for operator-lists, and uses
them in match-bitwise.pd and match-comparison.pd
* genmatch.c
(parser::parse_operator_list): New member function in parser.
(add_substitute): New function.
(flatten_substitutes): Likewise.
(parser::parse_for): Call
Currently this is accepted:
(for plus (mult div)
...)
which is incorrect. This patch puts more error-checks on the user-defined
operator in for-pattern.
* genmatch.c
(insert_operator): New function.
(parse_for): Call insert_operator.
Thanks,
Prathamesh
Index: gcc/genmatch.c
:44 PM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
Hi,
This patch adds support for operator-lists, and uses
them in match-bitwise.pd and match-comparison.pd
* genmatch.c
(parser::parse_operator_list): New member function in parser.
(add_substitute): New function
I suppose we should reject conditional convert and commutative ops in
result operand ? since it would create 1-n mapping from match -
result.
* genmatch.c
(fatal_at): New overloaded function with source_location as first parameter.
(has_opt_convert_or_commutative_ops): New function.
On Tue, Oct 28, 2014 at 3:45 PM, Richard Biener
richard.guent...@gmail.com wrote:
On Sat, Oct 25, 2014 at 8:16 PM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
Currently this is accepted:
(for plus (mult div)
...)
which is incorrect. This patch puts more error-checks on the user
On Tue, Oct 28, 2014 at 3:50 PM, Richard Biener
richard.guent...@gmail.com wrote:
On Mon, Oct 27, 2014 at 3:32 PM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
I suppose we should reject conditional convert and commutative ops in
result operand ? since it would create 1-n mapping
genmatch segfaults if user-defined operator is not specified.
eg:
(for (oper1 oper2...)
pattern)
* genmatch.c
(parser::parse_for): Call peek instead of peek_ident.
Thanks,
Prathamesh
Index: genmatch.c
===
--- genmatch.c
(had sent it earlier by private mail).
The attached patch supports operator-list and it's use in for.
For now, operator-list is rejected in expression.
This patch also allows user-defined operator to be used as operator-list
(user-defined ops are really temporary or scoped operator-lists).
(for
Hi,
This patch adds support for operator-lists to be used in expression.
I reuse operator-list as the iterator. This is not really valid since
user-defined operator-lists cannot be iterator in 'for', but it was
convenient to reuse operator-list as a 'for' iterator
and lower_for doesn't care
Changes syntax of for pattern to:
(for op (list1...) op2 (list2...) opN (listN...)
patterns)
Number of operator substitutions must be same.
* genmatch.c (peek_ident): Change id to default argument with value 0.
(parse_for): Adjust.
* match-builtin.pd: Rewrite for-patterns to match new
* genmatch.c (dt_node::level_max): Remove.
Thanks,
Prathamesh
Index: genmatch.c
===
--- genmatch.c (revision 215271)
+++ genmatch.c (working copy)
@@ -466,7 +466,6 @@
struct dt_simplify: public dt_node
{
- static const unsigned
This patch attempts to performs CSE on expression captures.
I have reused captures[] to store the result of expression (capture::what).
* genmatch.c (operand::gen_transform): Add dt_operand ** default argument
to operand heirarchy.
(expr::gen_transform): Adjust.
(capture::gen_transform):
On Tue, Sep 16, 2014 at 2:15 AM, Marc Glisse marc.gli...@inria.fr wrote:
On Tue, 16 Sep 2014, Prathamesh Kulkarni wrote:
--- gcc/match-builtin.pd(revision 215271)
+++ gcc/match-builtin.pd(working copy)
@@ -44,8 +44,8 @@
/* ??? There is no way to CSE here. We'd
I have split match.pd in this patch.
Not sure if I have written the ChangeLog correctly though...
* match-bitwise.pd: New file.
* match-plusminus.pd: Likewise.
* match-constant-folding.pd: Likewise.
* match-builtin.pd: Likewise.
* match-rotate.pd): New file.
Adjust to
* genmatch.c (dt_simplify::gen_gimple): Use dt_simplify::capture_max.
(dt_simplify::gen_generic): Likewise.
Thanks,
Prathamesh
Index: genmatch.c
===
--- genmatch.c (revision 213343)
+++ genmatch.c (working copy)
@@ -1473,7
Added patterns in associate_pointerplus and associate_pointerplus_diff.
* genmatch.c (capture_max): Change value to 6.
(match-plusminus.pd): Add new patterns.
[gcc/testsuite/gcc.dg/tree-ssa]
* match-plusminus.c (plusminus_9): New test-case.
Thanks,
Prathamesh
Index: gcc/genmatch.c
reject operator to be used as variable in for.
eg:
(for mult in plus minus)
* genmatch.c (get_operator): New function.
(e_operation::e_operation): Adjust to call get_operator.
(parse_for): Add call to get_operator.
Thanks,
Prathamesh
Index: genmatch.c
Put check for EOF in parse_for and parse_if,
else it results in segmentation fault.
eg:
(if (0)
eof
Not sure why it segfaults.
I got following back-trace (in gdb):
#0 _cpp_lex_direct (pfile=pfile@entry=0x66f560) at ../../src/libcpp/lex.c:2183
#1 0x0041d50c in _cpp_lex_token
Add pattern: abs (abs (x)) - abs (x)
* match.pd: Add new pattern.
[gcc/testsuite/gcc.dg/tree-ssa]
* match.c: New test-case.
Thanks,
Prathamesh
Index: gcc/match.pd
===
--- gcc/match.pd (revision 213814)
+++ gcc/match.pd (working
[gcc/testsuite/gcc.dg/tree-ssa]
* match-constant-folding.c: New test-case.
Thanks,
Prathamesh
Index: gcc/testsuite/gcc.dg/tree-ssa/match-constant-folding.c
===
--- gcc/testsuite/gcc.dg/tree-ssa/match-constant-folding.c (revision 0)
We now have at-least one test-case for each of constant folding patterns
in match-constant-folding.pd
[gcc/testsuite/gcc.dg/tree-ssa]
* match-constant-folding.c: Add test-cases.
Thanks,
Prathamesh
Index: match-constant-folding.c
[gcc/doc]
* match-and-simplify.texi: Replace addres by address.
Thanks,
Prathamesh
Index: match-and-simplify.texi
===
--- match-and-simplify.texi (revision 214020)
+++ match-and-simplify.texi (working copy)
@@ -22,7 +22,7 @@ tries
On Mon, Aug 18, 2014 at 2:11 AM, Prathamesh Kulkarni
bilbotheelffri...@gmail.com wrote:
[gcc/doc]
* match-and-simplify.texi: Replace addres by address.
This version adds a small note for capturing expressions.
[gcc/doc]
* match-and-simplify.texi: Add documentation for capturing expressions
On Mon, Aug 18, 2014 at 11:06 PM, David Malcolm dmalc...@redhat.com wrote:
On Mon, 2014-08-18 at 01:11 +0530, Prathamesh Kulkarni wrote:
We now have at-least one test-case for each of constant folding
patterns
in match-constant-folding.pd
[gcc/testsuite/gcc.dg/tree-ssa]
* match-constant
Print name of capture in patterns written by user.
* genmatch.c
(capture::name): New.
(capture::capture): New default argument.
(parse_capture): Pass id to capture::capture.
(print_operand): Print name of capture if available.
Thanks,
Prathamesh
On 15 December 2014 at 02:03, Prathamesh Kulkarni
prathamesh.kulka...@linaro.org wrote:
Print name of capture in patterns written by user.
* genmatch.c
(capture::name): New.
(capture::capture): New default argument.
(parse_capture): Pass id to capture::capture.
(print_operand
Caused segfault for pattern containing no captures at:
info.safe_grow_cleared(capture_max + 1); in capture_info::capture_info
artificial test-case:
(define_predicates integer_zerop)
(simplify
(bit_not integer_zerop)
{ build_zero_cst (type); })
* genmatch.c
(simplify::simplify): Set
with languages c, c++ enabled.
Thank you,
Prathamesh
2014-12-14 Prathamesh Kulkarni prathamesh.kulka...@linaro.org
* cfgloopanal.h: New header file containing function prototypes from
cfgloopanal.c
* cfgloop.h: Remove includes.
(mark_irreducible_loops): Move prototype
This patch rejects 't' outside user-defined predicates.
2014-12-16 Prathamesh Kulkarni prathamesh.kulka...@linaro.org
* genmatch.c (parser::parsing_match): New.
(parser::parser): Initialize parsing_match to false.
(parser::parse_pattern): Reset parsing_match when
sorry for the noise. I sent it just before our conversation on IRC.
On 16 December 2014 at 19:58, Prathamesh Kulkarni
prathamesh.kulka...@linaro.org wrote:
This patch rejects 't' outside user-defined predicates.
2014-12-16 Prathamesh Kulkarni prathamesh.kulka...@linaro.org
On 17 December 2014 at 21:15, Richard Biener richard.guent...@gmail.com wrote:
On Sun, Dec 14, 2014 at 10:39 PM, Prathamesh Kulkarni
prathamesh.kulka...@linaro.org wrote:
Hi,
The attached patch flattens cfgloop.h.
Created new file cfgloopanal.h which exports function prototypes
from
Kraai kr...@ftbfs.org
Jan Kratochvil jan.kratoch...@redhat.com
+Prathamesh Kulkarniprathamesh.kulka...@linaro.org
Venkataramanan Kumarvenkataramanan.ku...@amd.com
Maxim Kuvyrkov maxim.kuvyr...@linaro.org
Doug Kwan dougk...@google.com
Hi,
I had a discussion with Michael, and would like to put this patch on
hold for now till we have tree.h and rtl.h flattening
patches checked in to avoid conflicts.
Thankyou,
Prathamesh
On 16 December 2014 at 17:13, Prathamesh Kulkarni
prathamesh.kulka...@linaro.org wrote:
Hi,
The attached
On 20 December 2014 at 02:16, Michael Collison
michael.colli...@linaro.org wrote:
The reason I included tree-core.h in all the .c files was the requirement in
tree.h (now flattened to the .c files) for fold-const.h. In tree.h there are
inline functions such as fold_build_pointer_plus_hwi_loc
Committed (r218996) as obvious.
Thanks,
Prathamesh
2014-12-21 Prathamesh Kulkarni prathamesh.kulka...@linaro.org
* genmatch.c (parser::parse_simplify): Make last two parametes have
default value 0.
(parser::parse_pattern): Adjust call to parser::parse_simplify to avoid
passing
1 - 100 of 979 matches
Mail list logo