Coverage Report

Created: 2017-03-27 23:01

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/polly/lib/Analysis/ScopPass.cpp
Line
Count
Source
1
//===- ScopPass.cpp - The base class of Passes that operate on Polly IR ---===//
2
//
3
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This file contains the definitions of the ScopPass members.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#include "polly/ScopPass.h"
15
#include "polly/ScopInfo.h"
16
17
using namespace llvm;
18
using namespace polly;
19
20
4.84k
bool ScopPass::runOnRegion(Region *R, RGPassManager &RGM) {
21
4.84k
  S = nullptr;
22
4.84k
23
4.84k
  if ((S = getAnalysis<ScopInfoRegionPass>().getScop()))
24
1.23k
    return runOnScop(*S);
25
4.84k
26
3.61k
  return false;
27
4.84k
}
28
29
1.12k
void ScopPass::print(raw_ostream &OS, const Module *M) const {
30
1.12k
  if (S)
31
291
    printScop(OS, *S);
32
1.12k
}
33
34
513
void ScopPass::getAnalysisUsage(AnalysisUsage &AU) const {
35
513
  AU.addRequired<ScopInfoRegionPass>();
36
513
  AU.setPreservesAll();
37
513
}