2011-04-19 Martin Jambor <mjambor@suse.cz>
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Apr 2011 16:35:33 +0000 (16:35 +0000)
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Apr 2011 16:35:33 +0000 (16:35 +0000)
commit3658fd1d886ad2dac4da9ec95a953b156c9cb332
treef6f04a6735e023b75b60f7849bf8007b8c56b69d
parent6aba82285589b8cb829526b268476a462cff3984
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172719 138bc75d-0d04-0410-961f-82ee72b054a4
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]