This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/56718] New: Early inlining prevents type based devirtualization


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56718

             Bug #: 56718
           Summary: Early inlining prevents type based devirtualization
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jamborm@gcc.gnu.org


Created attachment 29718
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29718
Testcase

The attached testcase runs 2.5 times faster (on my x86_64 desktop at
-O3) when early inlining is disabled.  The reason is that while
inlining and IPA-CP can work out the type of the object in
checkGetElement and checkSetElement, early inlining cannot and after
it puts the virtual call into the same function with the definition of
the object, there is subsequently no mechanism to do the
devirtualization in such intraprocedural setting.


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