-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C++/C#: Cleanup in preparation for indirect alias analysis #2421
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
Conversation
Make `bitsToBytesAndBits` omit the leftover bits if zero.
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.
Is performance still okay after the IRVariable changes?
cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/IRVariable.qll
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,2 @@ | |||
private import SSAConstruction as SSA | |||
import SSA::SSASanity |
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.
Why do we need this file? Can't we just write import SSAConstruction::SSASanity
in SSASanity.ql
?
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 think we could get rid of it, but it does fit the pattern we've used for IRSanity.qll
, where each sanity query .ql
file is just some metadata (which has to be specialized for the flavor of the IR) plus a single import
.
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.
Okay. We can come back to this question as part of a later reform of the sanity code (moving it out of Instruction.qll
).
On ChakraCore, I measured a performance speedup of 5% with these changes, which is probably within the measurement error for running perf numbers on my laptop. |
Tests are failing. |
This PR contains the first several commits from #1736, appropriately fixed up to handle the introduction of the IR type system and the sharing of the IR code with C#. These are all just cleanup and refactoring changes that came out of the indirect alias analysis work. I figured I'd get them in now, to avoid having them bit rot while I finish getting the rest of that PR in shape.