public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Loop fusion in gcc
@ 2023-09-23 12:53 Hanke Zhang
  2023-09-24  6:35 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Hanke Zhang @ 2023-09-23 12:53 UTC (permalink / raw)
  To: gcc

Hi, I have been very interested in loop fusion recently. I found that
both LLVM and icc have implemented this optimization. I also noticed
that gcc does not seem to implement it.

I would like to ask if gcc have any plans to implement this
optimization? In addition, I also found that there is a function
called `fuse_loop` in gcc/gimple-loop-jam.cc. Can it achieve the
purpose of loop fusion?

Hanke Zhang.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Loop fusion in gcc
  2023-09-23 12:53 Loop fusion in gcc Hanke Zhang
@ 2023-09-24  6:35 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2023-09-24  6:35 UTC (permalink / raw)
  To: Hanke Zhang; +Cc: gcc

On Sat, Sep 23, 2023 at 2:54 PM Hanke Zhang via Gcc <gcc@gcc.gnu.org> wrote:
>
> Hi, I have been very interested in loop fusion recently. I found that
> both LLVM and icc have implemented this optimization. I also noticed
> that gcc does not seem to implement it.
>
> I would like to ask if gcc have any plans to implement this
> optimization? In addition, I also found that there is a function
> called `fuse_loop` in gcc/gimple-loop-jam.cc. Can it achieve the
> purpose of loop fusion?

I do not know of anybody implementing loop fusion.  The fuse_loop
function in unroll-and-jam might be able to fuse two loops in the IL
but it does not perform the required checking for correctness of
such transform and instead relies on the two loops being formed
by unrolling the loop containing them.

Richard.

>
> Hanke Zhang.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-24  6:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-23 12:53 Loop fusion in gcc Hanke Zhang
2023-09-24  6:35 ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).