-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Java: IPA the CFG. #711
base: main
Are you sure you want to change the base?
Java: IPA the CFG. #711
Conversation
private newtype TNode = | ||
TExprNode(Expr e) { hasControlFlow(e) } or | ||
TStmtNode(Stmt s) or | ||
TExitNode(Callable c) { exists(c.getBody()) } |
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.
C# also has an entry node, for symmetry.
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.
C# also uses a separate IPA type for basic blocks.
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 was aiming for minimal changes, so I'm not going to change the CFG with e.g. a new entry node here. Using a separate type for basic blocks could of course be done, but I don't think it's that important, so I think I'll leave it as is for now.
@aschackmull - I've raised a PR with suggested text changes for the change note. |
Actually, you just added the commit directly to my PR without doing a separate PR against my PR. |
Many apologies. I must have managed to click the wrong button - sorry about that. |
I started writing review comments to suggest simplifications to the text/tense, but thought that this might be clearer. Feel free to close and simplify using alternative wording.
c1a35b4
to
d15df36
Compare
Looks like there are some performance problems, which are likely related to QL-167. |
This might be worth profiling again now that https://github.com/github/semmle-code/pull/39420 is merged to see if that fixed the performance issues. |
It would indeed be interesting to dust off this PR and revisit it, as we have much better tools to deal with performance problems now than back then, but as far as I recall the performance problems weren't related to the many-ipa-branches issue or ipa performance on its own, but rather the problem that ipa types don't have good size estimates, which caused a bunch of cascading changes to various join-orders. |
Address incorrectly referenced parameter in QLdoc
This converts the control flow graph to an IPA type to give us some more options in how we model control flow. There should be no change in any query results.