-
Notifications
You must be signed in to change notification settings - Fork 209
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
Fix complexity analysis #2380
Fix complexity analysis #2380
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2380 +/- ##
=======================================
Coverage 77.53% 77.54%
=======================================
Files 467 467
Lines 30779 30785 +6
=======================================
+ Hits 23864 23871 +7
+ Misses 6915 6914 -1
|
If I understand the problem correctly, the optimizer was not considering the dependence between branch check and functor call. And the fix is to give functor call a larger complexity. If so, can we give it an INT_MAX to make it clear that we want functor calls to be put at last? |
I agree, the current fix is not sufficient in some situations and associating the maximum complexity rank to functor call should solve the issue entirely. |
@@ -62,7 +62,7 @@ int ComplexityAnalysis::getComplexity(const Node* node) const { | |||
} | |||
|
|||
int visit_(type_identity<UserDefinedOperator>, const UserDefinedOperator&) override { | |||
return 10; |
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.
As per the comment, make it the maximum value of Int.
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.
Done.
The complexity analysis was ignoring intrinsics operations that can contain functor calls. It had an impact on the reordering of conditions that would move a functor call too early when it is within an intrinsic operation. fix souffle-lang#2373
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.
Thanks!
The complexity analysis was ignoring intrinsics operations that can contain functor calls. It had an impact on the reordering of conditions that would move a functor call too early when it is within an intrinsic operation.
fix #2373