Hi,
On Wed, Feb 05, 2014 at 12:47:30AM +0100, Jan Hubicka wrote:
- if (TREE_CODE (t) != TREE_BINFO)
+ /* Try to work out BINFO from virtual table pointer value in
replacements. */
+ if (!t agg_reps !ie-indirect_info-by_ref)
At this point you know that
I think it would be better, yes. IIRC, We want to re-organize
indirect_info anyway (I vaguely remember we want to split the
overloaded offset field into two but forgot the exact reason why but I
have it written somewhere), I suppose we'll be turning it into a union
(or class hierarchy?)
Hi,
On 02/04/2014 06:43 AM, Jan Hubicka wrote:
Hi,
this patch solves the actual ICE in PR59831 by using ipa-devirt instead of
gimple_extract_devirt_binfo_from_cst as discussed in the first post.
Honza
PR ipa/59831
* ipa-cp.c (ipa_get_indirect_edge_target_1): Use ipa-devirt
.. to wit, for 27_io/basic_stringbuf/sputbackc/char/9425.cc:
0xbb482f crash_signal
/scratch/Gcc/svn-dirs/trunk/gcc/toplev.c:337
0x10ce353 contains_struct_check
/scratch/Gcc/svn-dirs/trunk/gcc/tree.h:2822
0x10ce353 ipa_get_indirect_edge_target_1
On 2014.02.04 at 14:18 +0100, Paolo Carlini wrote:
.. to wit, for 27_io/basic_stringbuf/sputbackc/char/9425.cc:
0xbb482f crash_signal
/scratch/Gcc/svn-dirs/trunk/gcc/toplev.c:337
0x10ce353 contains_struct_check
/scratch/Gcc/svn-dirs/trunk/gcc/tree.h:2822
0x10ce353
Hi,
On 02/04/2014 06:43 AM, Jan Hubicka wrote:
Hi,
this patch solves the actual ICE in PR59831 by using ipa-devirt instead of
gimple_extract_devirt_binfo_from_cst as discussed in the first post.
Honza
PR ipa/59831
* ipa-cp.c (ipa_get_indirect_edge_target_1): Use ipa-devirt
Hi,
I went ahead and comitted Markus' patch. I updated the testcase to use hidden
visibility.
With default visibility the gimple-fold change will enable devirtualization.
Honza
Index: ChangeLog
===
--- ChangeLog (revision 207477)
Hi,
On Fri, Jan 31, 2014 at 07:22:55AM +0100, Jan Hubicka wrote:
...
PR ipa/59831
* gimple-fold.c (gimple_extract_devirt_binfo_from_cst): Remove.
* ipa-devirt.c (get_poymorphic_call_info_for_decl): Break out from ...
(get_polymorphic_call_info): ... here.
Hi,
On Mon, Feb 03, 2014 at 12:52:49AM +0100, Jan Hubicka wrote:
Hi,
this patch fixes the bug in extr_type_from_vtbl_ptr_store that made it to
consider store of construction virtual table or virtual table of virtual base
as store of type's virtual table.
In the testcase we have after early
Hi,
On Mon, Feb 03, 2014 at 12:52:49AM +0100, Jan Hubicka wrote:
Hi,
this patch fixes the bug in extr_type_from_vtbl_ptr_store that made it to
consider store of construction virtual table or virtual table of virtual
base
as store of type's virtual table.
In the testcase we have
Hi,
this is the first half of the original fix to the PR, bit expanded in length.
The main change is simple: we now devirtualize when aggregate propagation tells
us the virtual table pointer value. This is done to prevent fold() doing it
during inliner's function saving that confuses the cgraph on
Hi,
this patch solves the actual ICE in PR59831 by using ipa-devirt instead of
gimple_extract_devirt_binfo_from_cst as discussed in the first post.
Honza
PR ipa/59831
* ipa-cp.c (ipa_get_indirect_edge_target_1): Use ipa-devirt
to figure out targets of polymorphic calls
Hi,
since we hit can of worms here, I decided to decompose the changes into minimal
patches.
This is first one fixing small bug introduced last July in Martin's change to
add
a flags to passthrough about the type preservation. This does not affect
gcc-4.8
Bootstrapped/regtested x86_64-linux,
Hi,
this patch fixes the bug in extr_type_from_vtbl_ptr_store that made it to
consider store of construction virtual table or virtual table of virtual base
as store of type's virtual table.
In the testcase we have after early inlining:
virtual C::~C() (struct C * const this)
{
unsigned int i;
On 2014.01.31 at 07:22 +0100, Jan Hubicka wrote:
+tree
+vtable_pointer_value_to_binfo (tree t)
+{
+ /* We expect MEM[(void *)virtual_table + 16B].
+ We obtain object's BINFO from the context of the virtual table.
+ This one contains pointer to virtual table represented via
+
I've tested your patch a little bit and hit the gcc_assert above:
markus@x4 tmp % cat test.ii
class A {
public:
unsigned length;
};
class B {};
class MultiTermDocs : public virtual B {
protected:
A readerTermDocs;
A subReaders;
virtual B *m_fn1(int *);
virtual
Hi,
this is variant of testcase that produces wrong code on Mainline.
$ ./xgcc -B ./ -O3 ~/t.C -S -fno-partial-inlining -fno-early-inlining
-fdump-ipa-all ; g++ t.s; ./a.out
Aborted
The bug is that we determine wrong type on call of ~MultiTermDocs within ~C (it
is determined as C, while it
Hi,
here is even better testcase (in a sense that my patch does not solve the wrong
code issue)
Compile with ./xgcc -B ./ -O3 ~/t.C -S -fno-partial-inlining
-fno-early-inlining -fdump-ipa-all -fdump-tree-all -fipa-cp -fno-ipa-sra
Here the sequence is bit different. Here we have contstruction
Hi,
PR ipa/59831 has testcase with one virtual call that shows really interesting
sequence of events. First we speculatively identify the target of call. Next
ipa-cp correctly works out the target and decides to clone. While creating a
clone it however no longer identifies the direct edge. It
On Fri, Jan 31, 2014 at 07:22:55AM +0100, Jan Hubicka wrote:
--- ipa-devirt.c (revision 207287)
+++ ipa-devirt.c (working copy)
@@ -972,6 +972,120 @@ contains_type_p (tree outer_type, HOST_W
return get_class_context (context, otr_type);
}
+/* Proudce polymorphic call context
20 matches
Mail list logo