-
Notifications
You must be signed in to change notification settings - Fork 66
Michaelrfairhurst/compatible types performance fix alt #891
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
Merged
knewbury01
merged 11 commits into
main
from
michaelrfairhurst/compatible-types-performance-fix-alt
Apr 29, 2025
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ed088be
Fix performance regression from Compatible.qll
MichaelRFairhurst 472c93a
Add changes to join order and prevent cartesian product through rewrite
MichaelRFairhurst 7f6b32d
Try new approach to reduce search set in type equivalence, some new j…
MichaelRFairhurst 4825774
Add missing file changed
MichaelRFairhurst 06351f5
Try forcing top-down pairwise comparison
MichaelRFairhurst 80a4077
Fix private predicate
MichaelRFairhurst a9ac2f1
Address feedback, separate `compares` from `recurses`, format.
MichaelRFairhurst 6c14eeb
Remove redundant condition
MichaelRFairhurst bc6a234
Merge branch 'main' into michaelrfairhurst/compatible-types-performan…
MichaelRFairhurst 4b8cdd3
Address next round of feedback
MichaelRFairhurst 7e0ff96
Ensure Config::resolvesTypedefs() enforced, remove comments
MichaelRFairhurst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
change_notes/2025-04-25-improve-type-comparison-performance.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- `RULE-8-3`, `RULE-8-4`, `DCL40-C`, `RULE-23-5`: `DeclarationsOfAFunctionSameNameAndType.ql`, `DeclarationsOfAnObjectSameNameAndType.ql`, `CompatibleDeclarationOfFunctionDefined.ql`, `CompatibleDeclarationObjectDefined.ql`, `IncompatibleFunctionDeclarations.ql`, `DangerousDefaultSelectionForPointerInGeneric.ql`: | ||
- Added pragmas to alter join order on function parameter equivalence (names and types). | ||
- Refactored expression which the optimizer was confused by, and compiled into a cartesian product. | ||
MichaelRFairhurst marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Altered the module `Compatible.qll` to compute equality in two stages. Firstly, all pairs of possible type comparisons (including recursive comparisons) are found, then those pairwise comparisons are evaluated in a second stage. This greatly reduces the number of comparisons and greatly improves performance. | ||
- `RULE-23-5`: `DangerousDefaultSelectionForPointerInGeneric.ql`: | ||
MichaelRFairhurst marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Altered the module `SimpleAssignment.qll` in accordance with the changes to `Compatible.qll`. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.