-
Notifications
You must be signed in to change notification settings - Fork 5k
Add options to optimize for size/speed #85133
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
Conversation
Publicly exposing the undocumented switches, adding test legs.
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsPublicly exposing the undocumented switches, adding test legs. Cc @dotnet/ilc-contrib
|
This will need a matching PR in the docs repo. |
Typing it up as we speak :) |
Docs update: dotnet/docs#35092 |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
* `<IlcOptimizationPreference>Speed</IlcOptimizationPreference>`: when generating optimized code, favor code execution speed. | ||
* `<IlcOptimizationPreference>Size</IlcOptimizationPreference>`: when generating optimized code, favor smaller code size. | ||
* `<OptimizationPreference>Speed</OptimizationPreference>`: when generating optimized code, favor code execution speed. | ||
* `<OptimizationPreference>Size</OptimizationPreference>`: when generating optimized code, favor smaller code size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought:
As the property can be set on a project level, it might look confusing to which tool the option is intended (and in which mode jit or aot). Would it make sense to add a Aot
prefix to the property name, so the option becomes: AotOptimizationPreference
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was considered. I've forwarded you the email with discussion.
This found a pre-existing issue in casting logic. I've activeissue'd it and not going to block this on that. |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm only slightly nervous about adding yet more extra-platforms legs
Have you considered replacing one of the existing runs for NativeAOT with one of these (or just run it with opt on).
I have, but it would be a test hole. It is already a test hole that we don't test any of this on e.g. Mac. We need to keep testing the mainline scenarios because the mainline matrix is already a compromise with holes. What we should consider is:
|
I'd recommend the first option, we have something similar with e.g. eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml which is available both as a standalone pipeline |
Should the default behaviour that happens when nothing is specified be also documented? |
It's documented in dotnet/docs#35092 (that's where docs are). Is there something you'd like to see changed? |
Publicly exposing the undocumented switches, adding test legs.
Cc @dotnet/ilc-contrib @dotnet/jit-contrib