-
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
Remove GT_ADDR nodes #11057
Comments
The JIT already uses The question is what to do with |
@RussKeldorph I'm not quite sure what up-for-grabs really means but if it implies that the issue is perhaps more approachable then it might be misleading in this case. Removing BTW, you can also assign it to me since I have every intention of getting rid of |
@mikedn How about now? Maybe I'm being idealistic but I'd like to think we can offer problems of all difficulty levels under |
I don't know, as I already said, I'm not sure what the meaning of the label truly is. I guess that some kind of "hard" is perfectly fine for up-for-grabs. But when the work spans more than half of the JIT, interferes with other issues, requires multiple PRs to get it done then it's probably a bit too much. Sometimes I wonder how I ended up doing this. I guess that after a couple of years of looking at the JIT codebase, pieces finally fell into place and this looks feasible. Otherwise I probably wouldn't have opened all these issues to begin with. |
@mikedn I wish you the best of luck in cleaning up these disgusting design mistakes! Really need to get rid of stuff like this to move the JIT forward. |
@GSPP Thanks! |
I should mention that preliminary work to support this is on going in dotnet/coreclr#21705. Just so it doesn't look as if this issue (or the |
A (hopefully complete) list of
|
:mips-interest |
Hi @mikedn Testcase: JIT/HardwareIntrinsics/X86/Sse41/ConvertToVector128_r/ConvertToVector128_r.exe Assertion failed to work for MIPS:
Workaround:
Request for comments. Thanks, |
@xiangzhai If adding the You should check Since it's MIPS specific I would guess that it's caused by other MIPS change you have done, that's possibly related to struct call parameters handling (does MIPS pass structs by reference or by value?) And this isn't probably directly related to this issue but yes, the removal of |
Hi @mikedn Thanks for your teaching!
Thanks for pointing out the root cause!
Sorry! There are lots of debugging output messages in JitFunctionTrace.log.
Yes, Sse2.IsSupported, for example, should directly return false for MIPS without trigging assertion failure. \cc @QiaoVanke Thanks, |
I was referring to a JIT dump obtained by setting the environment variable This means that:
Without the dump, I can only guess that the local variable is perhaps one of the struct parameters and that It might be useful to highlight a discrepancy between IL instructions and JIT's IR: in IL you have
But in the JIT IR the |
Sorry! I uploaded wrong log ... Here JitDump.log is. Thanks, |
Thanks, the dump says:
It seems that you have "implicit by ref" parameter morphing enabled, even though you say that on MIPS struct args are passed by value. Perhaps you need to adjust the ifdef in bool Compiler::fgMorphImplicitByRefArgs(GenTree* tree)
{
#if (!defined(_TARGET_AMD64_) || defined(UNIX_AMD64_ABI)) && !defined(_TARGET_ARM64_)
return false;
#else // (_TARGET_AMD64_ && !UNIX_AMD64_ABI) || _TARGET_ARM64_
bool changed = false; Though as it is it will already reject a non x64/arm64 target so presumably you already changed this in some way. |
Thanks for pointing out my fault:
Thanks, |
Sorry! @QiaoVanke pointed out my fault: It is a special case for O32, but not mips64r2 N64. Short word: By Reference! Thanks, |
@QiaoVanke fixed it:
Thanks, |
Seeing as I will be working on this issue (and the
|
I hope you're not just copying all the work I did in my fork, it sounds way too similar to that... |
I was very careful to only look at the issues and changes in this (and coreclr) repository. I think most (all?) of the above is just a restatement of what has been said already, in different threads. |
Hi, @SingleAccretion @BruceForstall @jkotas @jakobbotsch The CoreRoot for runtime will be updated every weekday here |
@SingleAccretion We've been doing JIT work planning for .NET 8. Since you continue to contribute so much (thank you!) it would be useful to know if you have a plan for a set of significant work for the next year. Perhaps the description above (#11057 (comment)) covers it? (Is that description up-to-date?) Or, perhaps it would be useful to create a "meta-issue" (like #74873) to cover it? |
I will continue working on this, and #10873 after that. So, I suppose nothing new at this point :).
More or less. I have updated it to include the latest developments. |
@SingleAccretion Thanks for the update.
I'm sure we can find something for you if you don't find something yourself first :) |
@SingleAccretion I also want to thank you. I follow this issue tracker and I frequently see your excellent work. 🚀 |
Similar to #10873 but about
GT_ADDR
nodes. LikeGT_ASG
nodes,GT_ADDR
nodes have one fundamental issue: they change the semantics of their operand nodes.A
GT_LCL_VAR
that is used byGT_ADDR
is no longer a node that produces a value, it's a node that represents a location. It also affectsGT_FIELD
so you can have a chain likeGT_FIELD(GT_ADDR(GT_FIELD(GT_ADDR(GT_FIELD(…)))))
where the outerGT_FIELD
is an indirection that produces a value while the inner ones just represent locations.This approach results in various code complications, inefficiencies and bugs.
category:implementation
theme:ir
skill-level:expert
cost:extra-large
The text was updated successfully, but these errors were encountered: