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: [tree-ssa] PATCH to &&/|| gimplification


Richard Henderson <rth@redhat.com> writes:

> This is because the loop rotation code in expand_end_loop doesn't fire.
> Which is because we don't emit a NOTE_INSN_LOOP_END_TOP_COND note.  See
> the commentary there and in the gcc-patches message that created
> NOTE_INSN_END_TOP_COND for why.
>
>> I think this bug needs to be fixed in the loop optimizer.
>
> Not possible, IMO, for the reasons listed indirectly above.
>
> The gimplifier either needs to rotate the loop itself, i.e. generate
>
> 	if (i > 2)
> 	  do {
> 	    // ...
> 	  } while (i <= 2);
>
> or leave simple conditionals in the WHILE_COND, or... I dunno.

Note that I'd like to see the tree->RTL converter get a lot simpler in
the future, which would imply that more work should be done in the
GIMPLE representation.  Loop rotation seems to me like something that
belongs done on trees.  In fact, I could argue that all the loop
optimizations ought to happen then, too.

zw


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