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: RFC: Patch for switch elimination (PR 54742)


On Thu, Sep 4, 2014 at 3:06 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Sep 04, 2014 at 02:57:47PM +0200, Richard Biener wrote:
>> Note that I think we arrived at the point where the loop structure
>> has annotations that are required for correctness :/  (simduid
>> for example - if that goes away we do ...?  ICE?  generate
>> wrong code?  I don't know - Jakub shoud).
>
> For safelen loops it will be just (perhaps serious) missed-optimization,
> for simduid I believe it shouldn't ICE either, the IFN_GOMP* builtins would
> just fold as if the vectorization factor was 1 if the loop goes away.
> But it will be even significantly bigger missed-optimization.

The following is a patch abstracting away the ->header = NULL settings
to a mark_loop_for_removal function and adding checking code
that tries to discover suspicious cases.

I see it fire on fold-const.ii compile in VRP for example:

fold-const.ii.067t.vrp1:fix_loop_structure: re-discovered removed loop
6 with pointer-equal header 459

(only testcase I tried).  As noted in the patch the pointer-equal header
case should probably be an ICE (although it's possible we just
re-allocated that basic-block ...).

Richard.

Attachment: loop-removal
Description: Binary data


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