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"
31 class ScalarEvolution;
34 class LoopDependenceAnalysis : public LoopPass {
40 static char ID; // Class identification, replacement for typeinfo
41 LoopDependenceAnalysis() : LoopPass(&ID) {}
44 bool isDependencePair(const Value*, const Value*) const;
45 bool depends(Value*, Value*);
47 bool runOnLoop(Loop*, LPPassManager&);
49 virtual void getAnalysisUsage(AnalysisUsage&) const;
51 void print(raw_ostream&, const Module* = 0) const;
52 virtual void print(std::ostream&, const Module* = 0) const;
53 }; // class LoopDependenceAnalysis
56 // createLoopDependenceAnalysisPass - This creates an instance of the
57 // LoopDependenceAnalysis pass.
59 LoopPass *createLoopDependenceAnalysisPass();
63 #endif /* LLVM_ANALYSIS_LOOP_DEPENDENCE_ANALYSIS_H */