[gimplefe] Patch for recognizing function declarations

2012-07-31 Thread Sandeep Soni
Hi Diego, The following patch recognizes function declarations. I am now trying to create a gimple sequence of all the statements within the function body. The chagelog is as follows: 2012-07-31 Sandeep Soni soni.sande...@gmail.com * parser.c (gl_token_starts_decl): Modify. Matches

Re: [gimplefe] Construction of individual gimple statements for gimple_cond and gimple_label

2012-07-18 Thread Sandeep Soni
On Tue, Jul 17, 2012 at 6:16 PM, Diego Novillo dnovi...@google.com wrote: Not so much, anymore (http://gcc.gnu.org/codingconventions.html#Variable). When gimplefe is merged into trunk, we will be using the C++ conventions which now allow this. No need to change anything, Sandy. Ah..Saved

Re: [gimplefe] Construction of individual gimple statements for gimple_cond and gimple_label

2012-07-17 Thread Sandeep Soni
On Tue, Jul 17, 2012 at 1:22 PM, Bernhard Reutner-Fischer rep.dot@gmail.com wrote: I'm curious if the coding conventions were relaxed to allow for variable declarations that are not at the beginning of a function or scope? You seem to do this pretty often in the gimplefe.. cheers, Not

[gimplefe] Construction of individual gimple statements for gimple_cond and gimple_label

2012-07-10 Thread Sandeep Soni
The patch adds support for creating individual gimple statements for the gimple_cond and gimple_label statements. Diego, I need your help in generalizing to include all possible cases of these statements. Here is the ChangeLog 2012-07-10 Sandeep Soni soni.sande...@gmail.com

Re: [gimplefe] Fixing the bug for gimple_assign statement with ternary operands

2012-07-10 Thread Sandeep Soni
On Fri, Jul 6, 2012 at 7:26 PM, Diego Novillo dnovi...@google.com wrote: On 12-07-06 00:38 , Sandeep Soni wrote: I am halfway through the patch for building gimple_cond statements. I will be able to complete the patch over the weekend. I am also working towards a patch that generalizes

[gimplefe] Fixing the bug for gimple_assign statement with ternary operands

2012-07-05 Thread Sandeep Soni
to complete the patch over the weekend. I am also working towards a patch that generalizes the assignment statements considering all possible types of assignments. Tested on x86. ChangeLog as follows: 2012-06-06 Sandeep Soni soni.sande...@gmail.com * parser.c (gp_parse_expect_rhs_op): Tidy

Re: [gimplefe] creating individual gimple_assign statements

2012-06-23 Thread Sandeep Soni
On Thu, Jun 21, 2012 at 11:33 AM, Diego Novillo dnovi...@google.com wrote: On 12-06-20 23:04 , Sandeep Soni wrote: Hi, This patch creates basic gimple_assign statements. It is a little raw not considering all types of gimple_assign statements for which I have already started working. Here

[gimplefe] creating individual gimple_assign statements

2012-06-20 Thread Sandeep Soni
Hi, This patch creates basic gimple_assign statements. It is a little raw not considering all types of gimple_assign statements for which I have already started working. Here is the Changelog. 2012-06-09 Sandeep Soni soni.sande...@gmail.com * parser.c (gimple_symtab_get): New

[gimplefe] Tests for type declarations and variable declarations

2012-06-12 Thread Sandeep Soni
The patch adds some preliminary tests for type declarations and varaible declarations for the gimple front end. Following is the ChangeLog Entry. 2012-06-12 Sandeep Soni soni.sande...@gmail.com gimple.dg/20120611-1.gimple : New. gimple.dg/20120611-2.gimple : New

[gimplefe] patch that fixes the bug for the failure test case

2012-06-08 Thread Sandeep Soni
Hi, This patch fixes the failure test case that I had submitted the last time. The changeLog is testsuite/gChangeLog.gimplefe is as follows. 2012-06-09 Sandeep Soni soni.sande...@gmail.com * gimple.dg/20120605-2.gimple : New. While the changelog in gimple/ChangeLog

[gimplefe] Adding more preliminary tests

2012-06-04 Thread Sandeep Soni
`/home/sandeep/gimple_build/gcc' Here is the changeLog.in testsuite/ChangeLog.gimplefe 2012-06-05 Sandeep Soni soni.sande...@gmail.com *gimple.dg/20120604-1.gimple : New. *gimple.dg/20120604-2.gimple : New. *gimple.dg/20120605-1.gimple: New. *gimple.dg

Re: [gimplefe] [patch] splits cpp_lshift and cpp_rshift tokens into discrete cpp_less and cpp_greater tokens respectively

2012-03-14 Thread Sandeep Soni
On Tue, Mar 13, 2012 at 9:42 PM, Diego Novillo dnovi...@google.com wrote: On 08/03/12 20:47 , Sandeep Soni wrote: +/* Splits the token TOKEN into two tokens FIRST_TOKEN and SECOND_TOKEN. +   Note that the split should work only if the type of the TOKEN is +   either CPP_RSHIFT or CPP_LSHIFT

[gimplefe] [patch] splits cpp_lshift and cpp_rshift tokens into discrete cpp_less and cpp_greater tokens respectively

2012-03-08 Thread Sandeep Soni
Hi, The current patch splits cpp_lshift and cpp_rshift tokens into cpp_less and cpp_greater tokens respectively.The necessary changes due to this are made throughout the parser. The changelog is as follows. Up for review. 2012-03-08 Sandeep Soni soni.sande...@gmail.com * parser.c

Re: [gimplefe][patch] The symbol table for declarations

2012-03-01 Thread Sandeep Soni
On Wed, Feb 29, 2012 at 8:14 PM, Diego Novillo dnovi...@google.com wrote: On 24/02/12 01:03 , Sandeep Soni wrote: +  name_token = gl_consume_expected_token (parser-lexer, CPP_NAME); +  name = gl_token_as_text (name_token); + +  e = ggc_alloc_cleared_gimple_symtab_entry_def (); +  e-id

Re: [gimplefe][patch] The symbol table for declarations

2012-02-23 Thread Sandeep Soni
On Wed, Nov 30, 2011 at 9:48 AM, Sandeep Soni soni.sande...@gmail.com wrote: Sorry. Wrong patch. New patch attached. I am getting the following error in the new patch though. ../../gimple-front-end/gcc/gimple/parser.c: In function ‘gp_parse_var_decl’: ../../gimple-front-end/gcc/gimple

Re: [gimplefe][patch] The symbol table for declarations

2011-11-29 Thread Sandeep Soni
Sorry. Wrong patch. New patch attached. I am getting the following error in the new patch though. ../../gimple-front-end/gcc/gimple/parser.c: In function ‘gp_parse_var_decl’: ../../gimple-front-end/gcc/gimple/parser.c:927:3: error: implicit declaration of function

[gimplefe][patch] The symbol table for declarations

2011-11-17 Thread Sandeep Soni
On Wed, Oct 12, 2011 at 7:01 PM, Diego Novillo dnovi...@google.com wrote: On 11-10-10 17:47 , Sandeep Soni wrote: Hi, The following patch is a basic attempt to build a symbol table that stores the names of all the declarations made in the input file. Index: gcc/gimple/parser.c

[gimplefe][patch] A bugfix for a missed symbol

2011-10-10 Thread Sandeep Soni
: + gl_consume_expected_token (parser-lexer, CPP_LESS); gl_consume_expected_token (parser-lexer, CPP_NUMBER); gl_consume_expected_token (parser-lexer, CPP_RSHIFT); break; The changelog is: 2011-10-11 Sandeep Soni soni.sande...@gmail.com * parser.c (gp_parse_var_decl

[gimplefe][patch] The symbol table for declarations

2011-10-10 Thread Sandeep Soni
, +gimple_symtab_eq_hash, NULL); gl_lex (parser-lexer); gp_parse (parser); gp_finish (parser); The changelog is as follows: 2011-10-11 Sandeep Soni soni.sande...@gmail.com * parser.c : Include hashtab.h. (struct gimple_symtab_entry_def): New. (gimple_symtab

Re: [gimplefe] Ran into a internal compiler error

2011-09-20 Thread Sandeep Soni
On Tue, Sep 20, 2011 at 10:48 PM, Diego Novillo dnovi...@google.com wrote: On 11-09-19 23:32 , Sandeep Soni wrote: It gives me a internal compiler error saying: gimple1: internal compiler error: tree check: expected identifier_node, have var_decl in gimple_symtab_entry_hash As Balaji said

[gimplefe] Ran into a internal compiler error

2011-09-19 Thread Sandeep Soni
Hi, I was trying to make a symbol table for all the variable declarations for the gimple front end. Following is a patch: Index: parser.c === --- parser.c(revision 174754) +++ parser.c(working copy) @@ -28,6 +28,7 @@

Re: [patch][gimplefe] Preliminary variable declaration support

2011-05-12 Thread Sandeep Soni
On Wed, May 11, 2011 at 1:19 AM, Diego Novillo dnovi...@google.com wrote: Please add a ChangeLog entry.  OK with that change. Committed after adding the ChangeLog entry. -- Cheers Sandy

[patch][gimplefe] Preliminary variable declaration support

2011-05-09 Thread Sandeep Soni
This patch is just a slight modification to an earlier patch that I submitted which was non-working. This is working. It just recognizes variable declarations and might be helpful for ketaki to start with things. It is now more or less up to date with the information on the wiki although not

Re: [gimplefe] Merge from trunk rev 173770

2011-05-07 Thread Sandeep Soni
On Fri, May 6, 2011 at 2:16 AM, Diego Novillo dnovi...@google.com wrote: This merge brings the gimple-front-end branch up to 4.7.  It needed some minimal adjustments, but things seem to be working.  Sandeep, please make sure it does.  You may need to rebase your patch before committing it. I

Re: Design Considerations of GIMPLE Front End

2010-05-18 Thread Sandeep Soni
On Tue, May 18, 2010 at 8:33 PM, Diego Novillo dnovi...@google.com wrote: Yup.  This shade of blue can be changed later.  Sandi, let's start with the S-expression syntax for everything.  Richard is correct in pointing out that even gimple expressions have metadata associated with them that

Design Considerations of GIMPLE Front End

2010-05-17 Thread Sandeep Soni
Hi, As part of GSoC 2010, I am developing a front end for GIMPLE. You can find the basic theme of the project at: http://gcc.gnu.org/wiki/GimpleFrontEnd One of the most important components in this GIMPLE Front End is to convert the GIMPLE tuples into text. How such a textual representation

Re: Design Considerations of GIMPLE Front End

2010-05-17 Thread Sandeep Soni
On Tue, May 18, 2010 at 2:34 AM, Andrew Haley a...@redhat.com wrote:    For example:    A textual GIMPLE tuple for the statement a=b+c can be like    GIMPLE_ASSIGNPLUS_EXPR,a,b,c  (As demonstrated by the internal manual also).    Is such a representation easy to parse? S-expressions are

Re: Build Error

2010-05-11 Thread Sandeep Soni
On Tue, May 11, 2010 at 6:30 PM, Diego Novillo dnovi...@google.com wrote: [ Moved to gcc@gcc.gnu.org ] Hmm, it did not detect elf_getshdrstrndx and yet it tried to use it later on. I think that's the bug.  Yes, please file a bug.  I believe it's going to be easy to fix, though.  There should

GIMPLE Front End (GSOC 2010)

2010-04-29 Thread Sandeep Soni
-- Forwarded message -- From: Diego Novillo dnovi...@google.com Date: Thu, Apr 29, 2010 at 7:05 PM Subject: Re: [LTO] Open items in the ToDo list To: Sandeep Soni saintiw...@gmail.com Cc: Andi Hellmund m...@andihellmund.com Thanks Sandeep.  Could you please add your proposal

Re: GIMPLE Front End (GSOC 2010)

2010-04-29 Thread Sandeep Soni
On Thu, Apr 29, 2010 at 11:01 PM, Manuel López-Ibáñez lopeziba...@gmail.com wrote: On 29 April 2010 19:25, Sandeep Soni soni.sande...@gmail.com wrote: I added the following page to the wiki. http://gcc.gnu.org/wiki/GimpleFrontEnd Any comments/suggestions or ideas related to the project

Tree-SSA question

2010-01-26 Thread sandeep soni
Hi, I am working to knw the details of the tree-ssa pass.I had this small piece of code as my test case: void func() { int x=10; int a=5; if(a==x) { x=x+1; } else { x=x-1; } a=x; } and when i did a gcc -fdump-ftree-ssa -O3 foo.c I got the following output : func () { int a; int x; bb

Re: entry point of gimplification

2010-01-05 Thread sandeep soni
On Tue, Jan 5, 2010 at 8:44 PM, Diego Novillo dnovi...@google.com wrote: On 1/4/10 14:57 , sandeep soni wrote: I want to know what is the entry point to the gimplification pass? and given a function body which are the functions in the gcc source that convert the body into equivalent gimple

entry point of gimplification

2010-01-04 Thread sandeep soni
Hi, I have been trying to understand the gcc source code and am interested in customizing gcc to support speculative parallelization of conditional branching and loop instructions instructions.I am considering gimple as input. I want to know what is the entry point to the gimplification pass?

Re: loop optimization in gcc

2009-10-14 Thread sandeep soni
Hi, you also might want to take a look at the Graphite project. http://gcc.gnu.org/wiki/Graphite where we do loop optimizations and automatic parallelization based on the polytop model. If you need any help feel free to ask. Tobias Hi, This seems to be quite interesting and

Re: loop optimization in gcc

2009-10-14 Thread sandeep soni
On Wed, Oct 14, 2009 at 9:02 PM, Tobias Grosser gros...@fim.uni-passau.de wrote: On Wed, 2009-10-14 at 20:12 +0530, sandeep soni wrote: Hi, you also might want to take a look at the Graphite project. http://gcc.gnu.org/wiki/Graphite where we do loop optimizations and automatic

Re: loop optimization in gcc

2009-10-12 Thread sandeep soni
On Mon, Oct 12, 2009 at 12:13 PM, Ian Lance Taylor i...@google.com wrote: I'm not really sure what you are asking.  gcc supports OpenMP for parallelizing loops.  That is mostly done in the frontends. I have been told that openMP does parallelizing of loops, but these types of optimizations are

Re: loop optimization in gcc

2009-10-12 Thread sandeep soni
On Mon, Oct 12, 2009 at 11:28 PM, Ian Lance Taylor i...@google.com wrote: sandeep soni saintiw...@gmail.com writes: On Mon, Oct 12, 2009 at 12:13 PM, Ian Lance Taylor i...@google.com wrote: I'm not really sure what you are asking.  gcc supports OpenMP for parallelizing loops.  That is mostly

loop optimization in gcc

2009-10-11 Thread sandeep soni
Hi All, I have been studying the gcc code lately as part of my project.I have got info from this mailing list about CFG and DFG information.I want to know how gcc uses this information to perform loop optimization? Does it Follow any particular algorithm or in particular what are the different