-
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
JIT: Model CPU flag dependencies explicitly in LIR #82355
JIT: Model CPU flag dependencies explicitly in LIR #82355
Conversation
This was an interesting experiment, but I think overall the complexity is not worth what we get. For most cases it seems to be ok to have the invariant that the flags def comes as the previous node in linear order. runtime/src/coreclr/jit/lowerarmarch.cpp Lines 886 to 909 in 86c04cf
But so far we haven't run into problems with these, and we don't need to be able to find the flags def for these cases (yet). |
An experiment to see what it would look like. Based on top of #82235.
GTF_SET_FLAGS
into LIR flags asLIR::Flags::ProducesFlags
.LIR::Flags::ProducesFlags
is set. A node that produces flags can appear in a node that consumes flags, likeGT_JCC
,GT_SELECTCC
,GT_ADD_HI
, etc.. If it produces a value it can also appear separately as a normal operand (e.g.GT_ADD_LO
usually appears as both a flags def and value def on x86)CheckLIR
in addition to checking for some flags interference.