This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Context sensitive type inheritance graph walking
- From: Markus Trippelsdorf <markus at trippelsdorf dot de>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, mjambor at suse dot cz
- Date: Wed, 25 Sep 2013 20:38:04 +0200
- Subject: Re: Context sensitive type inheritance graph walking
- Authentication-results: sourceware.org; auth=none
- References: <20130925102050 dot GB17377 at kam dot mff dot cuni dot cz>
On 2013.09.25 at 12:20 +0200, Jan Hubicka wrote:
> this is updated version of http://gcc.gnu.org/ml/gcc-patches/2013-09/msg00936.html
>
> Bootstrapped/regtested x86_64-linux. The patch is tested by ipa-devirt9
> testcase. I have extra four, but I would like to first fix the case where the
> devirtualization happens in TODO of early_local_passes that is not dumped
> anywhere. So I plan to post these incrementally once this code is hooked also
> into gimple folding.
>
> The patch results in 60% more devirtualizations on Firefox and 10% more
> speculative devirtualization. I think main component missing now is code
> determining dynamic type from a call to constructor. I have some prototype for
> this, too, I would like to discuss incrementally. I am not 100% sure how much
> harder tracking of dynamic type changes becomes here.
Hi Honza,
I've tested your patch and it failed during the "profile generate" phase of an
LTO/PGO build of Firefox.
Reduced:
markus@x4 /tmp % cat test.ii
class A {
public:
virtual void m_fn1();
};
class B final : A {
~B();
virtual void m_fn2() { m_fn1(); }
};
B::~B() {}
markus@x4 /tmp % g++ -c -std=c++11 -O2 -c test.ii
test.ii: In member function âvirtual void B::m_fn2()â:
test.ii:7:16: error: stmt (0x7f85504c3130) marked modified after optimization pass:
virtual void m_fn2() { m_fn1(); }
^
# .MEM_6 = VDEF <.MEM_2(D)>
A::m_fn1 (_5);
test.ii:7:16: internal compiler error: verify_ssa failed
0xc62364 verify_ssa(bool)
../../gcc/gcc/tree-ssa.c:1046
0xa305a1 execute_function_todo
../../gcc/gcc/passes.c:1834
0xa30d07 execute_todo
../../gcc/gcc/passes.c:1866
0xa32af9 execute_one_ipa_transform_pass
../../gcc/gcc/passes.c:2049
0xa32af9 execute_all_ipa_transforms()
../../gcc/gcc/passes.c:2079
0x7e3cc0 expand_function
../../gcc/gcc/cgraphunit.c:1743
0x7e5d96 expand_all_functions
../../gcc/gcc/cgraphunit.c:1855
0x7e5d96 compile()
../../gcc/gcc/cgraphunit.c:2192
0x7e6379 finalize_compilation_unit()
../../gcc/gcc/cgraphunit.c:2269
0x5f816e cp_write_global_declarations()
../../gcc/gcc/cp/decl2.c:4360
Please submit a full bug report,
--
Markus