This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix incorrect devirtualization (PR middle-end/48661)


> Hi!
> 
> If TREE_BINFO has BV_VCALL_INDEX set, this needs to be dynamically
> adjusted, but none of the callers are prepared to handle that.
> Thus, this patch makes devirtualization give up in those cases.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, trunk and 4.6.
> On the trunk the testcase ICEs before and after the patch in some new callgraph
> checking (added today or so, Honza?), on the branch it works just fine.

The ICE for me is:
jakub.C:77:1: error: a call to thunk improperly represented in the call graph:
# VUSE <.MEM_11>
D.2319_3 = D::_ZTv0_n24_NK1D1mEv (&q.D.2159);

void test()/26(14) @0x7ffff77066f0 (asm: _Z4testv) availability:available analyzed needed reachable body externally_visible finalized
  called by: int main()/28 (1.00 per call) (can throw external) 
  calls: void bar(int)/1 (1.00 per call) void bar(int)/1 (1.00 per call) virtual int D::m() const/15 (1.00 per call) D::D(const A&)/14 (1.00 per call) 
  References: 
  Refering this function: 
  has 3 outgoing edges for indirect calls.

this is not my snaity check, but Martins and I think it means that somehow your
change is ineffective on mainline and we still devirtualize. 
Martin, I declare this problem yours.

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]