forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
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
wip: ILC & R2R UTF-8 name mangling. #3
Draft
PaulusParssinen
wants to merge
13
commits into
main
Choose a base branch
from
ilc-name-mangling-alloc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PaulusParssinen
changed the title
wip: ILC & R2R name mangling.
wip: ILC & R2R UTF-8 name mangling.
May 17, 2024
PaulusParssinen
force-pushed
the
ilc-name-mangling-alloc
branch
2 times, most recently
from
May 29, 2024 23:05
933391b
to
b789b7c
Compare
PaulusParssinen
force-pushed
the
ilc-name-mangling-alloc
branch
from
May 31, 2024 19:31
b789b7c
to
730ab37
Compare
PaulusParssinen
force-pushed
the
ilc-name-mangling-alloc
branch
from
June 30, 2024 23:47
f1b73e7
to
3753bef
Compare
* And pass it around as ref. This required dropping the fluent pattern.
accidentally fixed bugs maybe, a lot of todos left
* The last diff is inconsistent usage of AppendMangledTypeName in InterfaceDispatchMap. Other nodes append unmangled < & > characters but in this type it was sanitized, causing this diff.
* more consistent of u8str initialization * simplify StringTableBuilder.CreateIndex
* Also reduce some allocations in unwind utf-8 paths
PaulusParssinen
force-pushed
the
ilc-name-mangling-alloc
branch
from
July 20, 2024 19:55
3753bef
to
2a934ca
Compare
PaulusParssinen
commented
Jul 20, 2024
PaulusParssinen
commented
Jul 20, 2024
...ools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchCellSectionNode.cs
Outdated
Show resolved
Hide resolved
PaulusParssinen
commented
Jul 20, 2024
src/coreclr/tools/Common/Compiler/DependencyAnalysis/EmbeddedDataContainerNode.cs
Outdated
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
wip: Previewing diffs
todo: desc
todo: r2r correctness
Background
dotnet/corert/issues/2178
dotnet/corert/pull/2200
todo: write motivation
This PR
ref struct Utf8StringBuilder
ValueStringBuilder
but UTF-8.Utf8StringBuilder
using theArrayPool<byte>.Shared
GetName(this ISymbolNode ..)
had pooling logic, but now we can fallback to pool anywhere where we build mangled symbol name strings.GetMangled[Type/Method/Field/String]Name
methods,introduce
AppendMangled[Type/Method/Field/String]Name
overload which can be used to append directly to the existing builder (very common operation)string
->Utf8String
cast and its overhead.Problems and questions
Utf8String
so this PR flows it through all the way to the ObjectWriter logic. Choosing a cut off point for theUtf8String
elsewhere would render null the transcoding/allocation savings.Potential future improvements
IPrefixMangled[Method/Type]
could be optimized to append mangled namesResults
dotnet new webapiaot
Stage 2 Goldilocks (TodosApi)
Compile ILC with ILC
Bench with using the NAOT compiled ILC