C++: IR sanity queries for outgoing edges#811
Merged
dave-bartolomeo merged 1 commit intogithub:masterfrom Jan 24, 2019
Merged
Conversation
These queries have no results on our test cases in the repo, but `ambiguousSuccessors` has results on any large C++ code base, and `unexplainedLoop` has results on Windows builds of ChakraCore.
Contributor
|
Wow, the top half of that IR graph is a mess. What I find most disturbing is that there are multiple blocks labeled |
dave-bartolomeo
approved these changes
Jan 24, 2019
Contributor
dave-bartolomeo
left a comment
There was a problem hiding this comment.
New sanity tests LGTM.
jbj
added a commit
to jbj/ql
that referenced
this pull request
Jan 25, 2019
This prevents loops of non-back-edges on ChakraCore (see github#811).
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
These queries have no results on our test cases in the repo, but
ambiguousSuccessorshas results on any large C++ code base, andunexplainedLoophas results on Windows builds of ChakraCore. I haven't been able to replicate these problems in qltest, so I think they have to do with linker awareness or with how declarations of similar names show up in different files.Given the vast number of results for
ambiguousSuccessors, fixing these problems could be necessary not just for correctness but also for performance. Here is a screenshot ofraw/PrintIR.qlfor a function that comes up in both of these new sanity queries.This is the source of that function: https://github.com/Microsoft/ChakraCore/blob/08161b0b4110e3888f77632a9f40a2229884bbe7/lib/Runtime/Base/Entropy.cpp#L14-L21.