Message ID | 20141104153706.GF3173@virgil.suse |
---|---|
State | New |
Headers | show |
On Tue, Nov 4, 2014 at 4:37 PM, Martin Jambor <mjambor@suse.cz> wrote: > Hi, > > since revision 216728, testsuite/g++.dg/ipa/devirt-40.C is failing > because although the tested-for devirtualization does happen, it is > probably being done earlier and the string we are trying to match is > not emitted. But the important thing is that the tested > devirtualization takes place. > > Patch has been pre-approved on IRC by Honza, I have tested it with > make -k check RUNTESTFLAGS="dg.exp=ipa/devirt-40.C" which I hope is > sufficient and I have tested that the pattern matches a call to an > OBJ_TYPE_REF in function body in an earlier dump file. I will commit > the patch shortly. > > Thanks, > > Martin > > > gcc/testsuite/ > > 2014-11-04 Martin Jambor <mjambor@suse.cz> > > * devirt-40.C: Changed dump to not matching OBJ_TYPE_REF in > function body. > > Index: src/gcc/testsuite/g++.dg/ipa/devirt-40.C > =================================================================== > --- src.orig/gcc/testsuite/g++.dg/ipa/devirt-40.C > +++ src/gcc/testsuite/g++.dg/ipa/devirt-40.C > @@ -19,5 +19,5 @@ A::m_fn1 (UnicodeString &, int &p2, UErr > UnicodeString a[2]; > } > > -/* { dg-final { scan-tree-dump "converting indirect call to function virtual UnicodeString" "fre2" } } */ > +/* { dg-final { scan-tree-dump-not "\\n OBJ_TYPE_REF" "fre2" } } */ What's the odd newline and spaces here? > /* { dg-final { cleanup-tree-dump "fre2" } } */
Hi, On 11/04/2014 04:37 PM, Martin Jambor wrote: > Hi, > > since revision 216728, testsuite/g++.dg/ipa/devirt-40.C is failing > because although the tested-for devirtualization does happen, it is > probably being done earlier and the string we are trying to match is > not emitted. But the important thing is that the tested > devirtualization takes place. > > Patch has been pre-approved on IRC by Honza, I have tested it with > make -k check RUNTESTFLAGS="dg.exp=ipa/devirt-40.C" which I hope is > sufficient and I have tested that the pattern matches a call to an > OBJ_TYPE_REF in function body in an earlier dump file. I will commit > the patch shortly. Thanks. Just to confirm, devirt-42.C is also failing, that is also known, right? FAIL: g++.dg/ipa/devirt-42.C -std=gnu++11 scan-tree-dump-times optimized "return 2" 2 FAIL: g++.dg/ipa/devirt-42.C -std=gnu++1y scan-tree-dump-times optimized "return 2" 2 FAIL: g++.dg/ipa/devirt-42.C -std=gnu++98 scan-tree-dump-times optimized "return 2" 2 Thanks again, Paolo.
On 04/11/14 15:51, Paolo Carlini wrote: > Hi, > > On 11/04/2014 04:37 PM, Martin Jambor wrote: >> Hi, >> >> since revision 216728, testsuite/g++.dg/ipa/devirt-40.C is failing >> because although the tested-for devirtualization does happen, it is >> probably being done earlier and the string we are trying to match is >> not emitted. But the important thing is that the tested >> devirtualization takes place. >> >> Patch has been pre-approved on IRC by Honza, I have tested it with >> make -k check RUNTESTFLAGS="dg.exp=ipa/devirt-40.C" which I hope is >> sufficient and I have tested that the pattern matches a call to an >> OBJ_TYPE_REF in function body in an earlier dump file. I will commit >> the patch shortly. > Thanks. Just to confirm, devirt-42.C is also failing, +1, on my local arm/aarch64 test environment. FAIL: g++.dg/ipa/devirt-42.C -std=gnu++11 scan-tree-dump-times optimized "return 2" 2 FAIL: g++.dg/ipa/devirt-42.C -std=gnu++98 scan-tree-dump-times optimized "return 2" 2 FAIL: g++.dg/ipa/devirt-42.C -std=gnu++1y scan-ipa-dump-times inline "Discovered a virtual call to a known target" 2 FAIL: g++.dg/ipa/devirt-42.C -std=gnu++1y scan-ipa-dump-times inline "First type is base of second" 3 FAIL: g++.dg/ipa/devirt-42.C -std=gnu++11 scan-ipa-dump-times inline "First type is base of second" 3 FAIL: g++.dg/ipa/devirt-42.C -std=gnu++98 scan-ipa-dump-times inline "Discovered a virtual call to a known target" 2 FAIL: g++.dg/ipa/devirt-42.C -std=gnu++11 scan-ipa-dump-times inline "Discovered a virtual call to a known target" 2 FAIL: g++.dg/ipa/devirt-42.C -std=gnu++98 scan-ipa-dump-times inline "First type is base of second" 3 FAIL: g++.dg/ipa/devirt-42.C -std=gnu++1y scan-tree-dump-times optimized "return 2" 2 > that is also > known, right? > > FAIL: g++.dg/ipa/devirt-42.C -std=gnu++11 scan-tree-dump-times optimized > "return 2" 2 FAIL: g++.dg/ipa/devirt-42.C -std=gnu++1y > scan-tree-dump-times optimized "return 2" 2 FAIL: g++.dg/ipa/devirt-42.C > -std=gnu++98 scan-tree-dump-times optimized "return 2" 2 > > Thanks again, > Paolo. >
On Tue, Nov 04, 2014 at 04:47:18PM +0100, Richard Biener wrote: > On Tue, Nov 4, 2014 at 4:37 PM, Martin Jambor <mjambor@suse.cz> wrote: > > Hi, > > > > since revision 216728, testsuite/g++.dg/ipa/devirt-40.C is failing > > because although the tested-for devirtualization does happen, it is > > probably being done earlier and the string we are trying to match is > > not emitted. But the important thing is that the tested > > devirtualization takes place. > > > > Patch has been pre-approved on IRC by Honza, I have tested it with > > make -k check RUNTESTFLAGS="dg.exp=ipa/devirt-40.C" which I hope is > > sufficient and I have tested that the pattern matches a call to an > > OBJ_TYPE_REF in function body in an earlier dump file. I will commit > > the patch shortly. > > > > Thanks, > > > > Martin > > > > > > gcc/testsuite/ > > > > 2014-11-04 Martin Jambor <mjambor@suse.cz> > > > > * devirt-40.C: Changed dump to not matching OBJ_TYPE_REF in > > function body. > > > > Index: src/gcc/testsuite/g++.dg/ipa/devirt-40.C > > =================================================================== > > --- src.orig/gcc/testsuite/g++.dg/ipa/devirt-40.C > > +++ src/gcc/testsuite/g++.dg/ipa/devirt-40.C > > @@ -19,5 +19,5 @@ A::m_fn1 (UnicodeString &, int &p2, UErr > > UnicodeString a[2]; > > } > > > > -/* { dg-final { scan-tree-dump "converting indirect call to function virtual UnicodeString" "fre2" } } */ > > +/* { dg-final { scan-tree-dump-not "\\n OBJ_TYPE_REF" "fre2" } } */ > > What's the odd newline and spaces here? That only matches an OBJ_TYPE_REF as a statement in the function body and specifically does not match "Determining dynamic type for call: OBJ_TYPE_REF" and "Starting walk at: OBJ_TYPE_REF" that are present in the dump file above the dump function. An alternative would be of course to just scan the optimized dump if this is considered too much of a hack. But at least I though that for a testcas it would do nicely. Martin
On Tue, Nov 4, 2014 at 4:57 PM, Martin Jambor <mjambor@suse.cz> wrote: > On Tue, Nov 04, 2014 at 04:47:18PM +0100, Richard Biener wrote: >> On Tue, Nov 4, 2014 at 4:37 PM, Martin Jambor <mjambor@suse.cz> wrote: >> > Hi, >> > >> > since revision 216728, testsuite/g++.dg/ipa/devirt-40.C is failing >> > because although the tested-for devirtualization does happen, it is >> > probably being done earlier and the string we are trying to match is >> > not emitted. But the important thing is that the tested >> > devirtualization takes place. >> > >> > Patch has been pre-approved on IRC by Honza, I have tested it with >> > make -k check RUNTESTFLAGS="dg.exp=ipa/devirt-40.C" which I hope is >> > sufficient and I have tested that the pattern matches a call to an >> > OBJ_TYPE_REF in function body in an earlier dump file. I will commit >> > the patch shortly. >> > >> > Thanks, >> > >> > Martin >> > >> > >> > gcc/testsuite/ >> > >> > 2014-11-04 Martin Jambor <mjambor@suse.cz> >> > >> > * devirt-40.C: Changed dump to not matching OBJ_TYPE_REF in >> > function body. >> > >> > Index: src/gcc/testsuite/g++.dg/ipa/devirt-40.C >> > =================================================================== >> > --- src.orig/gcc/testsuite/g++.dg/ipa/devirt-40.C >> > +++ src/gcc/testsuite/g++.dg/ipa/devirt-40.C >> > @@ -19,5 +19,5 @@ A::m_fn1 (UnicodeString &, int &p2, UErr >> > UnicodeString a[2]; >> > } >> > >> > -/* { dg-final { scan-tree-dump "converting indirect call to function virtual UnicodeString" "fre2" } } */ >> > +/* { dg-final { scan-tree-dump-not "\\n OBJ_TYPE_REF" "fre2" } } */ >> >> What's the odd newline and spaces here? > > That only matches an OBJ_TYPE_REF as a statement in the function body > and specifically does not match > "Determining dynamic type for call: OBJ_TYPE_REF" and > "Starting walk at: OBJ_TYPE_REF" > that are present in the dump file above the dump function. Ah ok. Thanks, Richard. > An alternative would be of course to just scan the optimized dump if > this is considered too much of a hack. But at least I though that for > a testcas it would do nicely. > > Martin
Index: src/gcc/testsuite/g++.dg/ipa/devirt-40.C =================================================================== --- src.orig/gcc/testsuite/g++.dg/ipa/devirt-40.C +++ src/gcc/testsuite/g++.dg/ipa/devirt-40.C @@ -19,5 +19,5 @@ A::m_fn1 (UnicodeString &, int &p2, UErr UnicodeString a[2]; } -/* { dg-final { scan-tree-dump "converting indirect call to function virtual UnicodeString" "fre2" } } */ +/* { dg-final { scan-tree-dump-not "\\n OBJ_TYPE_REF" "fre2" } } */ /* { dg-final { cleanup-tree-dump "fre2" } } */