This is the mail archive of the gcc-patches@gcc.gnu.org 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] | |
Hello,
This patch implements a simple variant of RTA (see "Fast Static Analysis
of C++ Virtual Function Call" by Bacon & Sweeney - OOPSLA'96) for
devirtualization of C++ function calls. The interprocedural analysis done
may infer the type of the object upon which a virtual method is invoked.
If this happens the virtual call is transformed in a direct call, this
making possible the inlining of the method afterward.
The current patch includes and completes the previous patch:
http://gcc.gnu.org/ml/gcc-patches/2005-09/msg00982.html.
It contains support for transformation of a virtual call in a direct one
in a more general case.
This optimization works only for C++ code. To enable it use the option
-fipa-cha. The option -fdump-ipa-cha generates information in the *.cha
file.
This optimization assumes that all the application files are available
to the compiler. The case when only a partial view of the application is
not available is still not supported. In this stage I was more interested
in extending the functionality of this optimization.
Regression tests successfully passed on Power.
Mircea
Attachment:
ChangeLog
Description: Binary data
Attachment:
diff.log
Description: Binary data
Attachment:
ipa-cha.c
Description: Binary data
Attachment:
tests.tar.gz
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |