1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/unittests/Analysis
Chandler Carruth aa9da3439e [LCG] Add the necessary functionality to the LazyCallGraph to support inlining.
The basic inlining operation makes the following changes to the call graph:
1) Add edges that were previously transitive edges. This is always trivial and
   this patch gives the LCG helper methods to make this more convenient.
2) Remove the inlined edge. We had existing support for this, but it contained
   bugs that needed to be fixed. Testing in the same pattern as the inliner
   exposes these bugs very nicely.
3) Delete a function when it becomes dead because it is internal and all calls
   have been inlined. The LCG had no support at all for this operation, so this
   adds that support.

Two unittests have been added that exercise this specific mutation pattern to
the call graph. They were extremely effective in uncovering bugs. Sadly,
a large fraction of the code here is just to implement those unit tests, but
I think they're paying for themselves. =]

This was split out of a patch that actually uses the routines to
implement inlining in the new pass manager in order to isolate (with
unit tests) the logic that was entirely within the LCG.

Many thanks for the careful review from folks! There will be a few minor
follow-up patches based on the comments in the review as well.

Differential Revision: https://reviews.llvm.org/D24225

llvm-svn: 283982
2016-10-12 07:59:56 +00:00
..
AliasAnalysisTest.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
BlockFrequencyInfoTest.cpp Revert r272891 "[JumpThreading] Prevent dangling pointer problems in BranchProbabilityInfo" 2016-06-16 16:25:53 +00:00
CallGraphTest.cpp [GraphTraits] Replace all NodeType usage with NodeRef 2016-08-22 21:09:30 +00:00
CFGTest.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
CGSCCPassManagerTest.cpp [PM] Refactor this unittest a bit to remove duplicated code. This was 2016-09-26 06:29:21 +00:00
CMakeLists.txt Add getBlockProfileCount method to BlockFrequencyInfo 2016-03-23 18:18:26 +00:00
LazyCallGraphTest.cpp [LCG] Add the necessary functionality to the LazyCallGraph to support inlining. 2016-10-12 07:59:56 +00:00
LoopPassManagerTest.cpp Consistently use LoopAnalysisManager 2016-08-09 00:28:52 +00:00
MixedTBAATest.cpp [PM/AA] Port alias analysis evaluator to the new pass manager, and use 2016-02-20 03:46:03 +00:00
ScalarEvolutionTest.cpp Add a C++ unittest to test the fix for PR30213. 2016-09-15 04:06:44 +00:00
UnrollAnalyzer.cpp Revert "Revert "[Unroll] Implement a conservative and monotonically increasing cost tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the..."" 2016-05-13 21:23:25 +00:00
ValueTrackingTest.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00