diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-02-04 17:49:01 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-02-04 17:49:01 +0000 |
| commit | 75b2283602ad5f38543ea3e5f1fdc178c1755f72 (patch) | |
| tree | ac2c255cf1f58de852ce62bf5f80755b3998d41e | |
| parent | 347a23921a2ed7c30cd473f7f0a800cdaca49a9c (diff) | |
| download | bcm5719-llvm-75b2283602ad5f38543ea3e5f1fdc178c1755f72.tar.gz bcm5719-llvm-75b2283602ad5f38543ea3e5f1fdc178c1755f72.zip | |
Remove Obsolete LoopDepthCalculator. All users should use LoopInfo directly.
llvm-svn: 1697
| -rw-r--r-- | llvm/include/llvm/Analysis/LoopDepth.h | 40 | ||||
| -rw-r--r-- | llvm/lib/Analysis/LoopDepth.cpp | 33 |
2 files changed, 0 insertions, 73 deletions
diff --git a/llvm/include/llvm/Analysis/LoopDepth.h b/llvm/include/llvm/Analysis/LoopDepth.h deleted file mode 100644 index 2c5519855cd..00000000000 --- a/llvm/include/llvm/Analysis/LoopDepth.h +++ /dev/null @@ -1,40 +0,0 @@ -//===- llvm/Analysis/LoopDepth.h - Loop Depth Calculation --------*- C++ -*--=// -// -// This file provides a simple class to calculate the loop depth of a -// BasicBlock. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LOOP_DEPTH_H -#define LLVM_ANALYSIS_LOOP_DEPTH_H - -#include "llvm/Pass.h" -namespace cfg { - class LoopInfo; - -class LoopDepthCalculator : public MethodPass { - std::map<const BasicBlock*, unsigned> LoopDepth; - void calculate(Method *M, LoopInfo &Loops); -public: - static AnalysisID ID; // cfg::LoopDepth Analysis ID - - LoopDepthCalculator(AnalysisID id) { assert(id == ID); } - - // This is a pass... - bool runOnMethod(Method *M); - - inline unsigned getLoopDepth(const BasicBlock *BB) const { - std::map<const BasicBlock*,unsigned>::const_iterator I = LoopDepth.find(BB); - return I != LoopDepth.end() ? I->second : 0; - } - - // getAnalysisUsageInfo - Provide loop depth, require loop info - // - virtual void getAnalysisUsageInfo(Pass::AnalysisSet &Requires, - Pass::AnalysisSet &Destroyed, - Pass::AnalysisSet &Provided); -}; - -} // end namespace cfg - -#endif diff --git a/llvm/lib/Analysis/LoopDepth.cpp b/llvm/lib/Analysis/LoopDepth.cpp deleted file mode 100644 index 03b81b93122..00000000000 --- a/llvm/lib/Analysis/LoopDepth.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===- LoopDepth.cpp - Loop Depth Calculation --------------------*- C++ -*--=// -// -// This file provides a simple class to calculate the loop depth of a -// BasicBlock. -// -//===----------------------------------------------------------------------===// - -#include "llvm/Analysis/LoopDepth.h" -#include "llvm/Analysis/LoopInfo.h" -#include "llvm/Method.h" -#include <algorithm> - -AnalysisID cfg::LoopDepthCalculator::ID(AnalysisID::create<cfg::LoopDepthCalculator>()); - -bool cfg::LoopDepthCalculator::runOnMethod(Method *M) { - calculate(M, getAnalysis<LoopInfo>()); - return false; -} - -void cfg::LoopDepthCalculator::calculate(Method *M, LoopInfo &Loops) { - for (Method::iterator I = M->begin(), E = M->end(); I != E; ++I) - LoopDepth[*I] = Loops.getLoopDepth(*I); -} - -// getAnalysisUsageInfo - Provide loop depth, require loop info -// -void cfg::LoopDepthCalculator::getAnalysisUsageInfo(Pass::AnalysisSet &Requires, - Pass::AnalysisSet &Destroyed, - Pass::AnalysisSet &Provided) { - Provided.push_back(ID); - Requires.push_back(LoopInfo::ID); -} - |

