This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] IPA constant propagation - very preliminary code
- From: Steven Bosscher <stevenb at suse dot de>
- To: Razya Ladelsky <RAZYA at il dot ibm dot com>, gcc at gcc dot gnu dot org
- Cc: Mircea Namolaru <NAMOLARU at il dot ibm dot com>, sabre at nondot dot org,hubicka at ucw dot cz
- Date: Tue, 8 Jun 2004 17:14:34 +0200
- Subject: Re: [RFC] IPA constant propagation - very preliminary code
- Organization: SUSE Labs
- References: <OF2656F1AF.8A3A2185-ONC2256EAD.003F9360-C2256EAD.00513B4C@il.ibm.com>
On Tuesday 08 June 2004 16:53, Razya Ladelsky wrote:
> Hello,
>
> Following our message ( http://gcc.gnu.org/ml/gcc/2004-05/msg00710.html)
> I enclose a very preliminary version of the code implementing IPA constant
> propagation.
> The code is of course not fully functional, but it does demonstrate the
> constants that it
> identifies in simple examples (by printing these values).
> Comments are welcome!
First of all, very cool to see how quickly this is progressing.
One comment on where you put stuff:
> ===================================================================
> RCS file: /cvsroot/gcc/gcc/gcc/cgraph.h,v
> retrieving revision 1.32
> diff -c -3 -p -r1.32 cgraph.h
> *** cgraph.h 22 May 2004 18:16:38 -0000 1.32
> --- cgraph.h 8 Jun 2004 11:45:39 -0000
> *************** struct cgraph_rtl_info GTY(())
> *** 70,75 ****
> --- 70,105 ----
> bool pure_function;
> };
>
> + /* The following definitions are used by
> + IPA Constant Propagation algorithm. */
> + enum Jfunc_type {
> + UNKNOWN_IPATYPE,
> + CONST_IPATYPE,
> + FORMAL_IPATYPE
> + };
> + enum Cvalue_type {
> + BOTTOM,
> + CONST_VALUE,
> + TOP
(...)
Can you not put this in a a separate header? It has nothing to
do with the call graph as such, so...
Also, Honza/me have plans to split up the call graph code more
properly. I have a cgraphanal.c in my local tree (doing the top
sort and finding SCCs in the call graph), it's nice if you could
put your jump functions in a separate header too (ipa-prop.h?
Gr.
Steven