public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Bin.Cheng" <amker.cheng@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Iain Sandoe <iain@sandoe.co.uk>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [C++ coroutines 4/6] Middle end expanders and transforms.
Date: Thu, 16 Jan 2020 08:15:00 -0000	[thread overview]
Message-ID: <CAHFci2-Dkq2KMNprw8zd+z06S3SKYhA8mrGY5jJpS89wuytLMA@mail.gmail.com> (raw)
In-Reply-To: <CAFiYyc2UBgeezSzvv8FMO80NrhQYjkoDhheASiys-rW1nMNhwg@mail.gmail.com>

> > +           gassign *get_res = gimple_build_assign (lhs, done);
> > +           gsi_replace (gsi, get_res, true);
> > +           *handled_ops_p = true;
> > +         }
> > +         break;
> > +       }
> > +    }
> > +  return NULL_TREE;
> > +}
> > +
> > +/* Main entry point for lowering coroutine FE builtins.  */
> > +
> > +static unsigned int
> > +execute_lower_coro_builtins (void)
> > +{
> > +  struct walk_stmt_info wi;
> > +  gimple_seq body;
> > +
> > +  body = gimple_body (current_function_decl);
> > +  memset (&wi, 0, sizeof (wi));
> > +  walk_gimple_seq_mod (&body, lower_coro_builtin, NULL, &wi);
> > +  gimple_set_body (current_function_decl, body);
>
> it would be nice to elide the function walk for functions not
> containing any CO* stuff (you noted that below for other parts).
> We can spend a bit in struct function noting functions with
> coroutine code inside and set the bit from frontends or from
> the gimplifier for example.  Since it's behind the flag_coroutines
> paywall this can be addressed as followup.

Yes, this bit flag is necessary for following optimization passes, I
wonder which bit you would suggest?

Thanks,
bin

  parent reply	other threads:[~2020-01-16  7:39 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-17 10:24 [C++ coroutines 0/6] Implement C++ coroutines Iain Sandoe
2019-11-17 10:24 ` [C++ coroutines 1/6] Common code and base definitions Iain Sandoe
2019-11-17 10:26   ` [C++ coroutines 2/6] Define builtins and internal functions Iain Sandoe
2019-11-17 10:26     ` [C++ coroutines 3/6] Front end parsing and transforms Iain Sandoe
2019-11-17 10:27       ` [C++ coroutines 4/6] Middle end expanders " Iain Sandoe
2019-11-17 10:28         ` [C++ coroutines 5/6] Standard library header Iain Sandoe
2019-11-17 15:49           ` [C++ coroutines 6/6] Testsuite Iain Sandoe
2019-11-19 10:04             ` Richard Biener
2020-01-09 12:40               ` [C++ coroutines 6/7, v2] Testsuite Iain Sandoe
2020-01-09 13:17                 ` Richard Biener
2019-11-20 11:17             ` [C++ coroutines 6/6] Testsuite JunMa
2019-11-20 11:24               ` Iain Sandoe
2019-11-20 13:35                 ` JunMa
2020-01-07 14:43                   ` JunMa
2020-01-09 13:00             ` [C++ coroutines 6/7] libiberty demangler update Iain Sandoe
2020-01-09 15:42               ` Ian Lance Taylor
2020-01-11 15:41                 ` [C++ coroutines 7/7] " Iain Sandoe
2020-01-12 13:16                   ` Ian Lance Taylor
2024-07-29  9:06             ` [C++ coroutines 6/6] Testsuite Thomas Schwinge
2024-07-29  9:20               ` Iain Sandoe
2019-11-17 16:30           ` [C++ coroutines 5/6] Standard library header Jonathan Wakely
2020-01-09 12:39             ` [C++ coroutines 5/7, v2] " Iain Sandoe
2020-01-09 13:35               ` Jonathan Wakely
2020-01-09 19:45                 ` [C++ coroutines 5/7, v3] " Iain Sandoe
2020-01-09 20:48                   ` Jonathan Wakely
2019-11-19 10:01         ` [C++ coroutines 4/6] Middle end expanders and transforms Richard Biener
2020-01-09 12:38           ` [C++ coroutines 4/7, v2] " Iain Sandoe
2020-01-09 13:52             ` Richard Biener
2020-01-16  8:15           ` Bin.Cheng [this message]
2020-01-16  8:54             ` [C++ coroutines 4/6] " Iain Sandoe
2019-11-18 13:24       ` [C++ coroutines 3/6] Front end parsing " Nathan Sidwell
2019-11-19 19:00       ` Nathan Sidwell
2020-01-09 12:37         ` [C++ coroutines 3/7, v2] " Iain Sandoe
2019-11-17 16:58     ` [C++ coroutines 2/6] Define builtins and internal functions Jeff Law
2020-01-09 12:36       ` [C++ coroutines 2/7, v2] " Iain Sandoe
2019-11-17 15:52   ` [C++ coroutines 1/6] Common code and base definitions Jeff Law
2020-01-09 12:36     ` [C++ coroutines 1/7] " Iain Sandoe
2019-11-18 12:37 ` [C++ coroutines 0/6] Implement C++ coroutines Nathan Sidwell
2020-01-09 12:36   ` [C++ coroutines 0/7] " Iain Sandoe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHFci2-Dkq2KMNprw8zd+z06S3SKYhA8mrGY5jJpS89wuytLMA@mail.gmail.com \
    --to=amker.cheng@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).