You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0083f2e
Browse filesBrowse the repository at this point in the historyBrowse files
First pass implementing RULE-0-2-1, unused variables.
Implementation relies on shared code with autosar that was previously declared
in the ql files. This behavior has been moved into UnusedObjects.qll.
The previous code seemed like a very disorganized set of exceptional cases,
which was going to be worse with the new code. I made a minimal attempt to
better organize it by organizing it into modules containing individual filter
passes.
Filtering out `.getAnAccess()` was always the last step. From a performance
perspective, this is a bad order. We start with all variables, and for each
one we join it against some set of rare exceptional cases, like functions with
assembly, that only minimally reduce the set of variables we want to query.
Changed to use a better order, where we begin with the set of variables that
have no accesses, which should be a very small set relatively speaking, and then
perform the odds-and-ends filters on top of that set. Small performance
improvements have been measured across the queries.
- The organization of unused variable analysis has been reorganized to be usable in MISRA C++ rule 0.2.1, with no expected noticeable change in results.
3
+
- New filtering passes begin by filtering out variables that have an existing access (`.getAnAccess()`), which should improve performance in later filtering passes and overall query performance.
0 commit comments