-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: Split out call importation into new importercalls.cpp #76792
JIT: Split out call importation into new importercalls.cpp #76792
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsNo code changes yes, purely moving code.
|
we already have |
Most of the JIT files do not use underscores as separators so I'm not really sure. Seems like |
Maybe we should rename |
Feel free to fix that but currently it looks inconsistent. I'd prefer %phase name%%what it does% -- similar to LLVM: https://github.com/llvm/llvm-project/tree/main/llvm/lib/Transforms/InstCombine |
I have a batch of changes for it support bytes - not sure it can be called stringintrinsics after that. |
And honestly, I hate |
How about I just rename |
Works for me (although I'd prefer capital letters but it's against our guidelines for file names I assume) 👍 maybe someone from @dotnet/jit-contrib have a different opinion? |
This change shows some differences in diff algorithms: ❯ git diff 79a78728bd40ae917^..79a78728bd40ae917 --diff-algorithm=myers --shortstat -- .\src\coreclr\jit\importer.cpp
1 file changed, 8765 insertions(+), 16568 deletions(-) ❯ git diff 79a78728bd40ae917^..79a78728bd40ae917 --diff-algorithm=histogram --shortstat -- .\src\coreclr\jit\importer.cpp
1 file changed, 7803 deletions(-) Unfortunately I'm not sure if Git today supports using a different diff algorithm than Myers for |
A typical way to retain history is to keep the rename and code change commits separate, and merge the PR without squashing (or split file renames into a separate PR). |
I am not just renaming a file here, I am splitting I tried splitting the delete in two commits where the first commit left all comments as sort of "anchors" and the second commit then deleted all the comments. Indeed this would then have to be rebased in. Unfortunately the same problem just happens in the second commit, with Git's default diff algorithm believing I am changing the comments I am deleting into code from later in the file. |
I'm trying now to see if I can do the move in a few chunks instead to convince the diff algorithm so that |
0e8a89a
to
947ab2c
Compare
@jakobbotsch, feel free to rename (or log an issue tracking a rename for) We might want to decide how to do cases like Also just noting, as names get longer like this, I think that the |
hwintrinsic.cpp does seem to have some functions that are not related to importation, e.g. |
Ok, moving the functions in batches seems to have worked out, Git properly tracks the deletions in the individual commits. Now we'll just need to rebase/merge this PR. |
Are you planning on not squashing this? I have some edits for |
I suppose I can pull down your changes and rebase what I have on top of that. |
Yes, that would be the plan. But I don't think Git can figure the code move out automatically, unfortunately. |
947ab2c
to
9b677c2
Compare
9b677c2
to
f433f35
Compare
…m file names Also avoid marking some functions as 'inline' since then they cannot be used from other TUs (in general, we can just leave the DCE up to the compiler).
…rinsic, impSRCSUnsafeIntrinsic
…allSite, impCheckForPInvokeCall
…atibleMethodGDV, considerGuardedDevirtualization, addGuardedDevirtualizationCandidate
…getIntrinsic, IsIntrinsicImplementedByUserCall, IsMathIntrinsic, impDevirtualizeCall, impConsiderCallProbe, compClassifyGDVProbeType, impGetSpecialIntrinsicExactReturnType
…Intrinsic, impArrayAccessIntrinsic, impKeepAliveIntrinsic
f433f35
to
66cca97
Compare
cc @dotnet/jit-contrib, any final thoughts? |
rebased and merged per @jakobbotsch's request |
No code changes yet, purely moving the code.