Re: Fix devirtualiation in expanded thunks

2019-01-02 Thread Jan Hubicka
> On Wed, Jan 02, 2019 at 12:15:53AM +0100, Jan Hubicka wrote: > > > /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/tree-prof/devirt.C:99:26: > > > optimized: folding virtual function call to virtual unsigned int > > > mozPersonalDictionary::_ZThn8_N21mozPersonalDictionary6AddRefEv() > > > > >

Re: Fix devirtualiation in expanded thunks

2019-01-02 Thread Jakub Jelinek
On Wed, Jan 02, 2019 at 12:15:53AM +0100, Jan Hubicka wrote: > > /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/tree-prof/devirt.C:99:26: > > optimized: folding virtual function call to virtual unsigned int > > mozPersonalDictionary::_ZThn8_N21mozPersonalDictionary6AddRefEv() > > > > > Is ther

Re: Fix devirtualiation in expanded thunks

2019-01-01 Thread Jan Hubicka
> /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/tree-prof/devirt.C:99:26: > optimized: folding virtual function call to virtual unsigned int > mozPersonalDictionary::_ZThn8_N21mozPersonalDictionary6AddRefEv() > > > Is there a way to dump files for different patterns for 32bit or 64bit > > Wh

Re: Fix devirtualiation in expanded thunks

2019-01-01 Thread Rainer Orth
Hi Jan, >> Andreas Schwab writes: >> >> > On Dez 31 2018, Martin Liška wrote: >> > >> >> -/* { dg-final-use-not-autofdo { scan-ipa-dump-times 3 "folding virtual >> >> function call to virtual unsigned int mozPersonalDictionary::_ZThn16" >> >> "dom3" } } */ >> >> -/* { dg-final-use-not-autofdo {

Re: Fix devirtualiation in expanded thunks

2019-01-01 Thread Jan Hubicka
> Andreas Schwab writes: > > > On Dez 31 2018, Martin Liška wrote: > > > >> -/* { dg-final-use-not-autofdo { scan-ipa-dump-times 3 "folding virtual > >> function call to virtual unsigned int mozPersonalDictionary::_ZThn16" > >> "dom3" } } */ > >> -/* { dg-final-use-not-autofdo { scan-ipa-dump-ti

Re: Fix devirtualiation in expanded thunks

2019-01-01 Thread Rainer Orth
Andreas Schwab writes: > On Dez 31 2018, Martin Liška wrote: > >> -/* { dg-final-use-not-autofdo { scan-ipa-dump-times 3 "folding virtual >> function call to virtual unsigned int mozPersonalDictionary::_ZThn16" >> "dom3" } } */ >> -/* { dg-final-use-not-autofdo { scan-ipa-dump-times 3 "folding v

Re: Fix devirtualiation in expanded thunks

2019-01-01 Thread Andreas Schwab
On Dez 31 2018, Martin Liška wrote: > -/* { dg-final-use-not-autofdo { scan-ipa-dump-times 3 "folding virtual > function call to virtual unsigned int mozPersonalDictionary::_ZThn16" "dom3" > } } */ > -/* { dg-final-use-not-autofdo { scan-ipa-dump-times 3 "folding virtual > function call to vir

Re: Fix devirtualiation in expanded thunks

2018-12-31 Thread Martin Liška
On 12/28/18 12:19 PM, Sudakshina Das wrote: > Hi Jan > > On 21/12/18 7:20 PM, Jan Hubicka wrote: >> Hi, >> this patch fixes polymorphic call analysis in thunks. Unlike normal >> methods, thunks take THIS pointer offsetted by a known constant. This >> needs t be compensated for when calculating ad

Re: Fix devirtualiation in expanded thunks

2018-12-28 Thread Sudakshina Das
Hi Jan On 21/12/18 7:20 PM, Jan Hubicka wrote: > Hi, > this patch fixes polymorphic call analysis in thunks. Unlike normal > methods, thunks take THIS pointer offsetted by a known constant. This > needs t be compensated for when calculating address of outer type. > > Bootstrapped/regtested x86_64

Fix devirtualiation in expanded thunks

2018-12-21 Thread Jan Hubicka
Hi, this patch fixes polymorphic call analysis in thunks. Unlike normal methods, thunks take THIS pointer offsetted by a known constant. This needs t be compensated for when calculating address of outer type. Bootstrapped/regtested x86_64-linux, also tested with Firefox where this bug trigger mis