On 05/16/2016 12:22 AM, Jan Hubicka wrote:
> Hi,
> this patch teach inliner to inline into thunks. This is easy to do - all we
> need
> is to produce a gimple body when we decide to do so. This fixes some ages old
> xfails
> and enables some 40k inlines in Firefox. Not all those inlines are win,
> because
> the codst model of thunks is wrong. We need to model that thunk calls are
> really just
> simple jumps. I will do that incrementally.
>
> Bootstrapped/regtested x86_64-linux, will commit it tomorrow.
Hi Honza.
I've spotted a new ICE after I've applied all your patches (4) related
to thunk expansion.
tc.ii:13:80: error: Thunk is not supposed to have body
int C::m_fn2(B &p1, int p2, int p3, int &p4) { m_fn1()->m_fn2(p1, p2, p3, p4);
}
^
_ZThn8_N1C5m_fn2ER1BiiRi/37 (virtual int C::_ZThn8_N1C5m_fn2ER1BiiRi(B&, int,
int, int&)) @0x7fc693311450
Type: function definition analyzed
Visibility: public virtual artificial
next sharing asm name: 35
References:
Referring:
Function virtual int C::_ZThn8_N1C5m_fn2ER1BiiRi(B&, int, int, int&)/37 is
inline copy in virtual int C::m_fn2(B&, int, int, int&)/0
Clone of _ZThn8_N1C5m_fn2ER1BiiRi/19
Availability: local
First run: 0
Function flags: body local
Thunk fixed offset -8 virtual value 0 has virtual offset 0)
Called by: _ZN1C5m_fn2ER1BiiRi/36 (speculative) (inlined) (0.33 per call)
(can throw external)
Calls: *.LTHUNK0/1 (0.33 per call) (can throw external)
tc.ii:13:80: internal compiler error: verify_cgraph_node failed
0xb3258f cgraph_node::verify_node()
../../gcc/cgraph.c:3444
0xb20acb symtab_node::verify()
../../gcc/symtab.c:1177
0xb20b54 symtab_node::verify_symtab_nodes()
../../gcc/symtab.c:1197
0xb40bc6 symtab_node::checking_verify_symtab_nodes()
../../gcc/cgraph.h:614
0xdc9bc2 symbol_table::remove_unreachable_nodes(_IO_FILE*)
../../gcc/ipa.c:690
0x178f732 ipa_inline
../../gcc/ipa-inline.c:2444
0x179038e execute
../../gcc/ipa-inline.c:2848
Thanks,
Martin
class A;
class B {
public:
virtual A *m_fn1();
};
class A {
public:
virtual int m_fn2(B &, int, int, int &) = 0;
};
class C : B, A {
int m_fn2(B &, int, int, int &);
};
int C::m_fn2(B &p1, int p2, int p3, int &p4) { m_fn1()->m_fn2(p1, p2, p3, p4); }