diff options
author | Philip Pfaffe <philip.pfaffe@gmail.com> | 2019-01-08 14:06:58 +0000 |
---|---|---|
committer | Philip Pfaffe <philip.pfaffe@gmail.com> | 2019-01-08 14:06:58 +0000 |
commit | efb5ad1c58e2fe758af3fd2a2f9a8c1196552864 (patch) | |
tree | 5336c58a99eab1b45851b402fd763765729791a1 /llvm/lib/Analysis/DependenceAnalysis.cpp | |
parent | 7a6d7672c164ec466ad37bcf5928680e1ce49ce4 (diff) | |
download | bcm5719-llvm-efb5ad1c58e2fe758af3fd2a2f9a8c1196552864.tar.gz bcm5719-llvm-efb5ad1c58e2fe758af3fd2a2f9a8c1196552864.zip |
[DA][NewPM] Add a printerpass and port the testsuite
The new-pm version of DA is untested. Testing requires a printer, so
add that and use it in the existing DA tests.
Differential Revision: https://reviews.llvm.org/D56386
llvm-svn: 350624
Diffstat (limited to 'llvm/lib/Analysis/DependenceAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/DependenceAnalysis.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp index b544ae5f535..3f4dfa52e1d 100644 --- a/llvm/lib/Analysis/DependenceAnalysis.cpp +++ b/llvm/lib/Analysis/DependenceAnalysis.cpp @@ -194,6 +194,13 @@ void DependenceAnalysisWrapperPass::print(raw_ostream &OS, dumpExampleDependence(OS, info.get()); } +PreservedAnalyses +DependenceAnalysisPrinterPass::run(Function &F, FunctionAnalysisManager &FAM) { + OS << "'Dependence Analysis' for function '" << F.getName() << "':\n"; + dumpExampleDependence(OS, &FAM.getResult<DependenceAnalysis>(F)); + return PreservedAnalyses::all(); +} + //===----------------------------------------------------------------------===// // Dependence methods |