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

Doing nothing vs going pragma(inline, true) vs function literals #137

Open
p0nce opened this issue Mar 16, 2024 · 1 comment
Open

Doing nothing vs going pragma(inline, true) vs function literals #137

p0nce opened this issue Mar 16, 2024 · 1 comment

Comments

@p0nce
Copy link
Collaborator

p0nce commented Mar 16, 2024

ldc-developers/ldc#4388 (comment)

Need to makes a well balanced decision for this! Surprising development.

Problem statement:

  • currently we'll have no inlining unless dub --combined is used, which is a major problem and not a LDC problem (EDIT: possibly not true anymore?)
  • some LDC construct such as __ir builds slow currently, which is a minor problem, unresolved but not really important
  • ideally we want intrinsics inlined or not, based upon the compiler deciding. Or we could live with a forced inlining for everything, which would itself be a minor issue.
  • it's unclear how DMD will manage that amount of pragma(inline), apparently in top-level this should be relatively harmless since .di generation needs that. Historically, pragma(inline) inside body used to cause problems.
  • reggae and redub builds needs pragma(inline, true) to build fast, as seen during redub development
  • kinke expects our "intrinsics" to be of course pragma(inline, true) so I'm missing something
    • but that also inlines the body everywhere, as mentionned above
  • function literals have differing linkage properties, as per-kinke response in ldc issues (read that) and could be used instead... maybe
@p0nce
Copy link
Collaborator Author

p0nce commented May 19, 2024

A redub build is 40% slower due to no --combined existing, is it an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant