-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
JIT: Give Compiler
a proper constructor
#107098
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
cc @dotnet/jit-contrib PTAL @AndyAyersMS With this change No diffs, some minor TP diffs (the somewhat large MinOpts ones are in collections with almost no MinOpts contexts). |
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.
Will take me a while to get used to the fact that fgInit
is no more.
src/coreclr/jit/compiler.cpp
Outdated
#endif // DEBUG | ||
|
||
#if defined(FEATURE_EH_WINDOWS_X86) | ||
// Cache Native AOT ABI check. This must happen *after* eeInfoInitialized is initialized, above. |
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.
Maybe reword this comment? eeInfoInitialized
is now initialized inline (which I assume happens "before" the constructor body runs).
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.
Deleted the comment (indeed, all the inline initialization happens before the body here runs, so we shouldn't have concerns like this anymore)
- Add a proper constructor for `Compiler` and call it via placement new from `jitNativeCode`. - Remove `compInit`, `fgInit`, `impInit`, `lvaInit` and `optInit`. Move all their initialization into the constructor or, when possible, initialize the field directly with its declaration.
Compiler
and call it via placement new fromjitNativeCode
.compInit
,fgInit
,impInit
,lvaInit
andoptInit
. Move all their initialization into the constructor or, when possible, initialize the field directly with its declaration.