Skip to content

[Coroutines] The Coroutine elision optimization (or HALO) is not performed #64586

Open
@ChuanqiXu9

Description

@ChuanqiXu9

There is a middle-end optimization called coroutine elision to elide the dynamic allocation from coroutines. And several issue reports are complaining the compiler failed to optimize their program as expected.

This is not usually what we do for middle-end optimization passes. Since for an optimization pass, it is pretty common to give up optimization opportunities in complex cases. But coroutine elision (or HALO) is different than other middle-end optimizations. It is part of the coroutines semantics in many people's imagination even if it is not formally recorded. Then there is a slight conflict.

To fully address the issue, I think we need involvement from the language side, either formally from WG21 or as a clang extension.

The issue is created to collect different issues/cases/requirements that people want for coroutine elision (or HALO) so that we can handle similar things altogether. The issue reports I see now are including

Feel free to provide more reports or requirements on this page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    coroutinesC++20 coroutinesenhancementImproving things as opposed to bug fixing, e.g. new or missing featurellvm:optimizationsmetabugIssue to collect references to a group of similar or related issues.missed-optimization

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions