-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add support for cross module inlining and cross module generic compilation to Crossgen2 #68919
Commits on Jun 10, 2022
-
Add support for cross module inlining and cross module generic compil…
…ation to Crossgen2 - Refactor Module into ModuleBase and Module - The goal is to have allow a subset version of Module which can only hold refs, this is to be used by the manifest module in an R2R image to allow for version resilient cross module references. - Update handling of ModuleBase so that its used everywhere that tokens are parsed from R2R - Remove ENCODE_MODULE_ID_FOR_STATICS and ENCODE_ACTIVE_DEPENDENCY - These were only used for NGEN, and conflict with easy impelmentation for the ModuleBase concept - Remove locking in ENCODE_STRING_HANDLE processing, and tweak comments. Comments applied to the removed ngen based code, and the lock was only necessary for the old ngen thing. - Adjust ComputeLoaderModuleWorker for locating loader module - Follow comment more accurately, to avoid putting every generic into its definition module. This will make R2R function lookup able to find compiled instantiations in some cases. This may be what we want long term, it may not. - Remove MemberRefToDesc map and replace with LookupMap like the other token types. We no longer make use of the hot table, so this is more efficient - Also reduces complexity of implementation of ModuleBase - Build fixup to describe a single method as a standalone blob of data - There are parallel implementations in Crossgen2 and in the runtime - They produce binary identical output - Basic R2RDump support for new fixup - Adjust module indices used within the R2R format to support a module index which refers to the R2R manifest metadata. This requires bumping the R2R version to 6.2 - Add a module index between the set of assembly refs in the index 0 module and the set of assembly refs in the R2R manifest metadata - Adjust compilation dependency rules to include a few critical AsyncStateMachineBox methods - Remove PEImage handling of native metadata which was duplicative - Do not enable any more devirtualization than was already in use, even in the cross module compilation scenario. In particular, do not enable devirtualization of methods where the decl method isn't within the version bubble, even if the decl method could be represented with a cross-module reference token. (This could be fixed, but is out of scope for this initial investigation) Make the compilation deterministic in this new model, even though we are generating new tokens on demand - Implement this by detecting when we need new tokens during a compile, and recompiling with new tokens when necessary - This may result in compiling the same code as much as twice Compile the right set of methods with cross module inlining enabled - Add support for compiling the called virtual methods on generic types - This catches the List<T> and Dictionary<TKey,TValue> scenarios - Add command line switches to enable/disable the new behavior NOTE: Module::IsInSameVersionBubble doesn't actually behave as expected. Currently we're generating a native manifest metadata in all circumstances, which will cause all modules to be treated as having InputBubble semantics. However, fortunately, we don't actually do anything like that at runtime. The only use of IsInSameVersionBubble is used to control R2R function lookup, which will not cause a problem.
Configuration menu - View commit details
-
Copy full SHA for 5aa5f79 - Browse repository at this point
Copy the full SHA 5aa5f79View commit details -
Configuration menu - View commit details
-
Copy full SHA for acf28b3 - Browse repository at this point
Copy the full SHA acf28b3View commit details -
Disable cross module pinvoke inlining
- We don't model the details necessary to prevent this from possibly being a problem at this time
Configuration menu - View commit details
-
Copy full SHA for 313792b - Browse repository at this point
Copy the full SHA 313792bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a5130f - Browse repository at this point
Copy the full SHA 6a5130fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e31e8bf - Browse repository at this point
Copy the full SHA e31e8bfView commit details -
Address code review feedback, and fix naming for native side of Ready…
…ToRunStandaloneMethodMetadata
Configuration menu - View commit details
-
Copy full SHA for 308c5c1 - Browse repository at this point
Copy the full SHA 308c5c1View commit details
Commits on Jun 11, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7326b39 - Browse repository at this point
Copy the full SHA 7326b39View commit details
Commits on Jun 13, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ca1d623 - Browse repository at this point
Copy the full SHA ca1d623View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a4247f - Browse repository at this point
Copy the full SHA 0a4247fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 55a8164 - Browse repository at this point
Copy the full SHA 55a8164View commit details -
Adjust command line switches for new behavior to be disabled, and exp…
…licitly declared to be experimental
Configuration menu - View commit details
-
Copy full SHA for 64a63b9 - Browse repository at this point
Copy the full SHA 64a63b9View commit details
Commits on Jun 14, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 3cbce96 - Browse repository at this point
Copy the full SHA 3cbce96View commit details -
Configuration menu - View commit details
-
Copy full SHA for c46fe1d - Browse repository at this point
Copy the full SHA c46fe1dView commit details
Commits on Jun 15, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 45fed21 - Browse repository at this point
Copy the full SHA 45fed21View commit details
Commits on Jun 16, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 93a041f - Browse repository at this point
Copy the full SHA 93a041fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a47ab4f - Browse repository at this point
Copy the full SHA a47ab4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 85831bb - Browse repository at this point
Copy the full SHA 85831bbView commit details
Commits on Jun 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7d6e658 - Browse repository at this point
Copy the full SHA 7d6e658View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ab7301 - Browse repository at this point
Copy the full SHA 7ab7301View commit details -
Fix error where the load in LookupMap can actually be torn in the pre…
…sence of multithreading.
Configuration menu - View commit details
-
Copy full SHA for 2e1541b - Browse repository at this point
Copy the full SHA 2e1541bView commit details
Commits on Jun 18, 2022
-
Update R2R version bump to 6.3 as this missed checking in ahead of so…
…me work by Jakob
Configuration menu - View commit details
-
Copy full SHA for 6af05fd - Browse repository at this point
Copy the full SHA 6af05fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for bd13931 - Browse repository at this point
Copy the full SHA bd13931View commit details