-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
Please do not merge this PR yet. It requires additional validation. |
@CarolEidt Is there any testcase related with this issue? It takes about 7 hours to run the whole unittests even in Release build (and over 1 day in Debug build). It would be very helpful if we could know which unittests are relevant to this issue. |
@parjong - I have been looking at diffs in the frameworks; I will have a look at the tests to see if I can find some that show the difference. |
@CarolEidt Thanks 👍 Anyway, we will evaluate this patch for the whole unittest (it takes some time to get the result) |
@parjong - I am not able to duplicate the diffs I've seen in any of the unit tests that I've looked at so far. The diffs in the desktop build of the libraries had diffs for uses of DateTime and Decimal, as well as a number of struct types in the non-core libraries. |
It looks like I have missed a case in x86 ryujit, so I will have to track that one down. |
I'm trying to run unit tests on arm device. I will post the results soon. |
Um, I got the below exception error.
|
367d4f2
to
cc81d67
Compare
@dotnet/jit-contrib PTAL - I am attempting an arm cross build, so that I can look into the RegionInfoCurrentRegion.exe failure. In the meantime, I would like to start the review process. |
Don't mark GT_OBJ with GTF_EXCEPT or GTF_GLOB_REF if it is a local struct. Also, fix changes needed in arm register allocation and code generation to handle the case where a struct argument is promoted, which appears to be code that was never exercised. Also, handle the x86/RyuJIT case where we keep re-copying struct args. Note that in some cases we still treat an address-taken lclVar as a GTF_GLOB_REF; this is really overloading the meaning, but teasing that apart is more complex.
cc81d67
to
0ce4dda
Compare
@CarolEidt LGTM. However, I don't understand why the changes to codegenlegacy.cpp for reconstructing struct args from promoted structs is required, or related. That code is unfortunately complex... |
@BruceForstall - That code pre-existed, but was apparently never executed because when structs were passed as arguments, they were not being promoted. An alternative would be to prevent structs from being promoted on arm, but I'm not sure that's even desirable, as the code seems to be working correctly, modulo one possible test failure that I'm attempting to investigate - and IMO it serves as a proof point for doing this - which I hope we will be doing before too long for other targets as well. |
I have not yet been able to run the failing test on the emulator, but I ran the armaltjit on desktop for this test case, and the code produced is identical. |
@dotnet/jit-contrib ping - I would love to get another review on this. |
Looks Good |
…eGtObj Less conservative gt obj Commit migrated from dotnet/coreclr@aab8856
Don't mark GT_OBJ with GTF_EXCEPT or GTF_GLOB_REF if it is a local struct.
Also, fix changes needed in arm register allocation and code generation to handle the case where a struct argument is promoted, which appears to be code that was never exercised.
These changes are in preparation for further changes for First Class Structs. I am working to replace block ops with assignments, and was attempting to get to zero diffs, but it is quite difficult to do so given some inconsistencies in the treatment of GT_OBJs of locals.