-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[NativeAOT] Move IsByRefLikeFlag from RareFlags to ExtendedFlags #106155
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
Heh, I was thinking about this too. One could potentially even overload the meaning of one of the existing bits (if they're not interpreted by someone else, like the GC), because some of the FlagsEx only have a meaning for a reference type. This one only has meaning for a value type. And it's not perf critical to access. We might even be able to fit all optional fields into FlagsEx. The remaining RareFlags after this are all related to dynamic types, so I'd just move them to
Hopefully we won't need the "prime real estate" flags later again. |
Ah, good observation!
I didn't go that far in exploring this, but presumably there's enough space to do that. There are two remaining things in the optional fields on
Both should easily fit in the leftover bits unless they have some special GC meaning. Not sure if I will go on and prototype this. There are some more pressing issues on my list. This one flag just seemed trivial enough to try. |
The failed test are relevant. I didn't notice that |
It would probably be fine to store the information |
Thanks for confirmation. That's what I thought. It was just no longer as trivial change as I thought. |
Would you mind if I pick this up and try shuffling these? |
That would be great! Thanks! |
The flag is only valid for value types, we have ample space in
EETypeFlagsEx
. This may avoid building the optional fields node in ILC and it's basically free tiny space optimization.