Use correct format for LLVM header #includes.
[oota-llvm.git] / include / llvm / Analysis / LoopDependenceAnalysis.h
1 //===- llvm/Analysis/LoopDependenceAnalysis.h --------------- -*- C++ -*---===//
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 // LoopDependenceAnalysis is an LLVM pass that analyses dependences in memory
11 // accesses in loops.
12 //
13 // Please note that this is work in progress and the interface is subject to
14 // change.
15 //
16 // TODO: adapt as interface progresses
17 //
18 //===----------------------------------------------------------------------===//
19
20 #ifndef LLVM_ANALYSIS_LOOP_DEPENDENCE_ANALYSIS_H
21 #define LLVM_ANALYSIS_LOOP_DEPENDENCE_ANALYSIS_H
22
23 #include "llvm/Analysis/LoopPass.h"
24 #include "llvm/Support/raw_ostream.h"
25 #include <iosfwd>
26
27 namespace llvm {
28
29   class AnalysisUsage;
30   class ScalarEvolution;
31   class Value;
32
33   class LoopDependenceAnalysis : public LoopPass {
34     Loop *L;
35     ScalarEvolution *SE;
36
37   public:
38     static char ID; // Class identification, replacement for typeinfo
39     LoopDependenceAnalysis() : LoopPass(&ID) {}
40
41     /// TODO: docs
42     bool isDependencePair(const Value*, const Value*) const;
43     bool depends(Value*, Value*);
44
45     bool runOnLoop(Loop*, LPPassManager&);
46
47     virtual void getAnalysisUsage(AnalysisUsage&) const;
48
49     void print(raw_ostream&, const Module* = 0) const;
50     virtual void print(std::ostream&, const Module* = 0) const;
51   }; // class LoopDependenceAnalysis
52
53
54   // createLoopDependenceAnalysisPass - This creates an instance of the
55   // LoopDependenceAnalysis pass.
56   //
57   LoopPass *createLoopDependenceAnalysisPass();
58
59 } // namespace llvm
60
61 #endif /* LLVM_ANALYSIS_LOOP_DEPENDENCE_ANALYSIS_H */