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: [PR 47382] We cannot simply fold OBJ_TYPE_REF at all in 4.6


On 9/02/2011, at 6:53 AM, Martin Jambor wrote:

> 
> This patch basically disables all intraprocedural devirtualization
> simply because that transformation relies on assumptions that no
> longer hold true.  That leaves only devirtualization within inlining
> and IPA-CP but those do not work intraprocedurally (i.e. when the
> object is within the same function as the call).  And in your
> testcase, early inlining puts all virtual calls to main() where the
> objects are.
> 
>> 
>> GCC mainline just before your patch was optimizing the following
>> testcase to have no virtual calls.  I wonder how this can be fixed
>> non-intrusively to qualify for Stage 4.
> 
> I have patches for this and hope I will post them soon (probably only as an
> RFC, however).  They in fact are in the gcc-patches archives:
> http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01033.html and 
> http://gcc.gnu.org/ml/gcc-patches/2010-12/msg01214.html 
> 
> Unfortunately, I am afraid we would need to make a _very_ compelling
> case for them to be included at this point.

Martin,

Ping.

I am about to submit improvements to inlining that take devirtualization opportunities into account and your two above patches help improve devirtualization quite a bit.  Do you plan to commit them some time soon?

For reference, I'm attaching the patch that adds several new devirtualization testcases.  Not optimizing the very simple inline-devirt-1.C is just embarrassing. 

Thank you,

--
Maxim Kuvyrkov
CodeSourcery / Mentor Graphics

Attachment: fsf-gcc-devirt-testcases.patch
Description: Binary data


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