-
Notifications
You must be signed in to change notification settings - Fork 5k
NativeAOT build support and doc improvements #68038
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
jkotas
commented
Apr 14, 2022
- Add IlcInstructionSet property that can be used to set the target instruction set from the command line.
- Moved link to the documentation of reflection-free mode to be in less prime location, so that people trying NativeAOT for the first time are not steared towards it.
- Copied help text improvements from crossgen2
- Add IlcInstructionSet property that can be used to set the target instruction set from the command line. - Moved link to the documentation of reflection-free mode to be in less prime location, so that people trying NativeAOT for the first time are not steared towards it. - Copied help text improvements from crossgen2
It'd be nice to be able to do |
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 haven't exposed the instruction set argument because I think we might need to preserve some extra registers in transitions for AVX that we currently don't. I don't have much experience in that area so I'll leave that up to you. Thanks!
We will need to deal with AVX registers for #67805. We are fine as of today. |
I will take a look at doing that in follow-up PR. |
@@ -6,7 +6,7 @@ Reflection-free mode is a mode of the NativeAOT compiler and runtime that greatl | |||
* Reduced working set and better code locality - parts of the program are more tightly packed together. | |||
* Less metadata for people to reverese engineer - apps compiled in reflection-free mode are as hard to reverse engineer as apps written in e.g. C++. |
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.
Typo..reverse
|
||
## Experimental Reflection Free Mode | ||
|
||
Reflection-free mode is a an experimental mode of the NativeAOT compiler and runtime that greatly reduces the functionality of the reflection APIs and demonstrates how far can reflection trimming can get. See [Reflection Free Mode](reflection-free-mode.md) for mode details. |
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.
"How far reflection can"
|
||
## Options related to code generation | ||
* `<IlcOptimizationPreference>Speed</IlcOptimizationPreference>`: when generating optimized code, favor code execution speed. | ||
* `<IlcOptimizationPreference>Size</IlcOptimizationPreference>`: when generating optimized code, favor smaller code size. | ||
* `<IlcFoldIdenticalMethodBodies>true</IlcFoldIdenticalMethodBodies>`: folds method bodies with identical bytes (method body deduplication). This makes your app smaller, but the stack traces might sometimes look nonsensical (unexpected methods might show up in the stack trace because the expected method had the same bytes as the unexpected method). Note: the current implementation of deduplication doesn't attempt to make the folding unobservable to managed code: delegates pointing to two logically different methods that ended up being folded together will compare equal. | ||
* `<IlcInstructionSet>`: By default, the compiler targets the minimum instruction set supported by the target OS and architecture. This option allows targeting newer instruction sets for better performance. The native binary will require the instruction sets to be supported by the hardware in order to run. For example, `<IlcInstructionSet>avx2,bmi2,fma,pclmul,popcnt,aes</IlcInstructionSet>` will produce binary that takes advantage of instruction sets that are typically present on current Intel and AMD processors. Run `ilc.exe --help` for the full list of available instruction sets. |
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.
Please excuse me if this is a dumb question, but where can I find ilc.exe
?
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.
Does this help? #68117