-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Reuse crossgen2 logic to lay out methods using PGO data #114736
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
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.
Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.
Files not reviewed (2)
- src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj: Language not supported
- src/coreclr/tools/aot/ILCompiler.RyuJit/ILCompiler.RyuJit.csproj: Language not supported
Comments suppressed due to low confidence (2)
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunFileLayoutOptimizer.cs:321
- [nitpick] Consider using a structured logging API instead of directly writing to logger.Writer, to ensure consistent logging behavior and easier log management.
_logger.Writer.WriteLine("Warning: no call graph data was found or a .mibc file was not specified. Skipping Pettis Hansen method ordering.");
src/coreclr/tools/Common/Compiler/DependencyAnalysis/SortableDependencyNode.cs:152
- The removal of the partial method ApplyCustomSort in favor of directly comparing the CustomSort field appears consistent; please ensure that no scenarios relying on the legacy partial method behavior (especially under conditional compilation) are affected.
static partial void ApplyCustomSort(SortableDependencyNode x, SortableDependencyNode y, ref int result);
src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/RyuJitCompilationBuilder.cs
Show resolved
Hide resolved
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
| binaries are up to date and which are stale. --> | ||
| <GenerateDependencyFile>false</GenerateDependencyFile> | ||
| <Configurations>Debug;Release;Checked</Configurations> | ||
| <RunAnalyzers>false</RunAnalyzers> |
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.
Intentional?
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.
Matches ILCompiler.ReadyToRun, there are several low value warnings and I'm honestly growing tired of the analyzers and pragma warning suppresions we're accumulating as a result and decided to just take a page from the crossgen project.
| new("--optimize-time", "--Ot") { Description = "Enable optimizations, favor code speed" }; | ||
| public Option<string[]> MibcFilePaths { get; } = | ||
| new("--mibc", "-m") { DefaultValueFactory = _ => Array.Empty<string>(), Description = "Mibc file(s) for profile guided optimization" }; | ||
| public Option<ReadyToRunMethodLayoutAlgorithm> MethodLayout { get; } = |
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.
Do these options have the right default? Or is that a future item?
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.
This is a copypaste from crossgen - this should default to 0, which means don't do it.
| <Compile Include="..\ILCompiler.ReadyToRun\Compiler\PettisHansenSort\CallGraphNode.cs" Link="Compiler\PettisHansenSort\CallGraphNode.cs" /> | ||
| <Compile Include="..\ILCompiler.ReadyToRun\Compiler\PettisHansenSort\DisjointSetForest.cs" Link="Compiler\PettisHansenSort\DisjointSetForest.cs" /> | ||
| <Compile Include="..\ILCompiler.ReadyToRun\Compiler\PettisHansenSort\PettisHansen.cs" Link="Compiler\PettisHansenSort\PettisHansen.cs" /> | ||
| <Compile Include="..\ILCompiler.ReadyToRun\Compiler\ReadyToRunFileLayoutOptimizer.cs" Link="Compiler\ReadyToRunFileLayoutOptimizer.cs" /> |
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 would be nice to drop ReadyToRun prefix for this.
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.
Sure, just wanted to keep the diff small
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.
LGTM as intermediate step.
Fixes #114093.
Cc @dotnet/ilc-contrib