ipa-cp.c (ipcp_process_devirtualization_opportunities): Devirtualize also according...
authorMartin Jambor <mjambor@suse.cz>
Tue, 19 Apr 2011 16:35:33 +0000 (18:35 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Tue, 19 Apr 2011 16:35:33 +0000 (18:35 +0200)
commit49c471e3d8e5a505b20672f7029d07bb828cbe1b
treef6f04a6735e023b75b60f7849bf8007b8c56b69d
parent9714ca724859e90773df206f552937ddc4da004c
ipa-cp.c (ipcp_process_devirtualization_opportunities): Devirtualize also according to actual contants.

2011-04-19  Martin Jambor  <mjambor@suse.cz>

* ipa-cp.c (ipcp_process_devirtualization_opportunities): Devirtualize
also according to actual contants.
* gimple-fold.c (gimple_extract_devirt_binfo_from_cst): New function.
(gimple_fold_call): Use it.
* gimple.h (gimple_extract_devirt_binfo_from_cst): Declare.

* testsuite/g++.dg/opt/devirt1.C: Bump to -O2, remove XFAIL.
* testsuite/g++.dg/opt/devirt2.C: New test.
* testsuite/g++.dg/ipa/devirt-g-1.C: Likewise.

From-SVN: r172719
gcc/ChangeLog
gcc/gimple-fold.c
gcc/gimple.h
gcc/ipa-cp.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ipa/devirt-g-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/opt/devirt1.C
gcc/testsuite/g++.dg/opt/devirt2.C [new file with mode: 0644]