This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-profiling-branch PATCH] IPA constant propagation


This patch implements IPA CP (InterProcedural constant propagation).
The flag fipa-cp enables the IPA CP optimization.
 At this stage IPA CP needs to analyze all of the application's files, as
cloning of methods is not yet supported. This functionality will be 
Therefore, for the moment the option -fipa-no-cloning  should be specified 

in order to perform IPA CP.

To apply the optimization on an application containing 
file1.c, file2.c, file3.c, we should use the command:

gcc -fipa-cp -fipa-no-cloning -combine file1.c file2.c file3.c 

combine option is currently supported only in mainline 
(it will be supported in the tree-profiling-branch soon)
but the code was tested also on mainline.

Bootstrap and regression tests successfully passed on x86.

Comments are welcome.


Changelog Entry: 

2004-07-30   Razya Ladelsky  <>

        * ipa_prop.c: New File: IPA constant propagation. 
        * ipa_prop.h: New File: Same.
        * (ipa_prop.c, ipa_prop.h): Add new files.
        * common.opt (fipa-cp, fipa-no-cloning): New flags for IPA 
        * opts.c (fipa-cp, fipa-no-cloning): Same. 
        * flags.h (fipa-cp, fipa-no-cloning): Same.
        * toplev.c (fipa-cp, fipa-no-cloning): Same. 
                * cgraph.h: Include ipa_prop.h.
        (cgraph_node, cgraph_edge): Added new fields for IPA constant 
                * cgraph.c (cgraph-create_node, cgraph_create_edge): 
Initialization for IPA constant 
        * cgraphunit.c (cgraph_optimize, record_call_1): Support for IPA 
constant propagation.


Attachment: ipa.diff
Description: Binary data

Attachment: ipa_prop.c
Description: Binary data

Attachment: ipa_prop.h
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]