Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't enforce (normal) emission for pragma(inline, true) function templates, and don't cull lambdas #3570

Merged
merged 1 commit into from
Sep 30, 2020

Conversation

kinke
Copy link
Member

@kinke kinke commented Sep 29, 2020

[The remaining non-upstreamed piece from #3456.]

With the new available_externally emission into each referencing CU, the enforced regular emission from the module members tree shouldn't be required anymore.

After adapting the codegen/inlining_templates.d lit-test accordingly (no IR definitions anymore in .ll file, because available_externally doesn't make it there), I've noticed that a lambda in imported and inlined call_enforce_with_default_template_params() wasn't emitted - it got culled by alreadyOrWillBeDefined().
Function/delegate literals aren't culled anymore.

…plates

With the new available_externally emission into each referencing CU, the
enforced regular emission from the module members tree shouldn't be
required anymore.

After adapting the codegen/inlining_templates.d lit-test accordingly (no
IR definitions anymore in .ll file, because available_externally doesn't
make it there), I've noticed that a lambda in imported and inlined
call_enforce_with_default_template_params() wasn't emitted - it got
culled by alreadyOrWillBeDefined().
Function/delegate literals aren't culled anymore.
@kinke kinke changed the title Don't enforce (normal) emission for pragma(inline, true) function templates Don't enforce (normal) emission for pragma(inline, true) function templates, and don't cull lambdas Sep 29, 2020
@kinke kinke merged commit b1bd6fb into ldc-developers:master Sep 30, 2020
@kinke kinke deleted the inline branch September 30, 2020 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant