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
C++: Fix join order in isArgumentForParameter
#7392
base: main
Are you sure you want to change the base?
C++: Fix join order in isArgumentForParameter
#7392
Conversation
|
The first commit seems to have broken C# |
That's .... odd (considering the fact that the IR part of C# is in the experimental directory). I'll take a look. Thanks for the heads up! |
|
Looks like it was a transient failure, @andersfugmann |
|
DCA hit an out-of-memory error when checking the PR for bad join-orders, so unfortunately the experiment didn't automatically create the execution-timg log. However, I was able to generate it locally, and it looks like: I've checked locally that the increase on |
| @@ -266,6 +266,20 @@ private predicate operandReturned(Operand operand, IntValue bitOffset) { | |||
| bitOffset = Ints::unknown() | |||
| } | |||
|
|
|||
| pragma[nomagic] | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain to a newbie what does this incantation do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can! "Magic" is a datalog-specific optimization that is implemented by the QL compiler. This optimization gathers "context" from places where the predicate is called, and pushes that context into the predicate body in order to make the number of tuples in the predicate smaller (and thus the evaluation faster). pragma[nomagic] disables that optimization for this predicate. It's described very well in this paper: https://dl.acm.org/doi/10.1145/1376616.1376673
Normally, when we factor out some joins into their own predicate, we do this because we want those joins to happen in isolation. If we allow magic in that predicate, chances are that the compiler will just insert those additional joins (that we wanted to prevent) back into this new predicate.
So by marking the predicate as nomagic we're saying "I pulled out these joins, and I don't want the compiler to insert additional joins". Does that make sense?
This join was previously fixed in #3813, but it seems like it's broken again. This is another attempt that will hopefully be more robust.
main(on ChakraCore):This PR:
The text was updated successfully, but these errors were encountered: