1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/unittests/Analysis
Chandler Carruth 4d480e7c41 [LCG] Add a unittest for the LazyCallGraph. I had a weak moment and
resisted this for too long. Just with the basic testing here I was able
to exercise the analysis in more detail and sift out both type signature
bugs in the API and a bug in the DFS numbering. All of these are fixed
here as well.

The unittests will be much more important for the mutation support where
it is necessary to craft minimal mutations and then inspect the state of
the graph. There is just no way to do that with a standard FileCheck
test. However, unittesting these kinds of analyses is really quite easy,
especially as they're designed with the new pass manager where there is
essentially no infrastructure required to rig up the core logic and
exercise it at an API level.

As a minor aside about the DFS numbering bug, the DFS numbering used in
LCG is a bit unusual. Rather than numbering from 0, we number from 1,
and use 0 as the sentinel "unvisited" state. Other implementations often
use '-1' for this, but I find it easier to deal with 0 and it shouldn't
make any real difference provided someone doesn't write silly bugs like
forgetting to actually initialize the DFS numbering. Oops. ;]

llvm-svn: 206954
2014-04-23 08:08:49 +00:00
..
CFGTest.cpp Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
CMakeLists.txt [LCG] Add a unittest for the LazyCallGraph. I had a weak moment and 2014-04-23 08:08:49 +00:00
LazyCallGraphTest.cpp [LCG] Add a unittest for the LazyCallGraph. I had a weak moment and 2014-04-23 08:08:49 +00:00
Makefile Reimplement isPotentiallyReachable to make nocapture deduction much stronger. 2013-07-27 01:24:00 +00:00
ScalarEvolutionTest.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00