1 //===- llvm/Analysis/LoopDependenceAnalysis.h --------------- -*- C++ -*---===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // LoopDependenceAnalysis is an LLVM pass that analyses dependences in memory
13 // Please note that this is work in progress and the interface is subject to
16 // TODO: adapt as interface progresses
18 //===----------------------------------------------------------------------===//
20 #ifndef LLVM_ANALYSIS_LOOP_DEPENDENCE_ANALYSIS_H
21 #define LLVM_ANALYSIS_LOOP_DEPENDENCE_ANALYSIS_H
23 #include "llvm/Analysis/LoopPass.h"
24 #include "llvm/Support/raw_ostream.h"
30 class ScalarEvolution;
33 class LoopDependenceAnalysis : public LoopPass {
38 static char ID; // Class identification, replacement for typeinfo
39 LoopDependenceAnalysis() : LoopPass(&ID) {}
42 bool isDependencePair(const Value*, const Value*) const;
43 bool depends(Value*, Value*);
45 bool runOnLoop(Loop*, LPPassManager&);
47 virtual void getAnalysisUsage(AnalysisUsage&) const;
49 void print(raw_ostream&, const Module* = 0) const;
50 virtual void print(std::ostream&, const Module* = 0) const;
51 }; // class LoopDependenceAnalysis
54 // createLoopDependenceAnalysisPass - This creates an instance of the
55 // LoopDependenceAnalysis pass.
57 LoopPass *createLoopDependenceAnalysisPass();
61 #endif /* LLVM_ANALYSIS_LOOP_DEPENDENCE_ANALYSIS_H */