[llvm-commits] [llvm] r75529 - in /llvm/trunk: include/llvm/Analysis/LoopVR.h include/llvm/Analysis/ScalarEvolution.h include/llvm/Analysis/ScalarEvolutionExpander.h include/llvm/Transforms/Utils/FunctionUtils.h include/llvm/Transforms/Utils/UnrollLoop.h lib/Analysis/LoopVR.cpp
Dan Gohman
gohman at apple.com
Mon Jul 13 15:19:41 PDT 2009
Author: djg
Date: Mon Jul 13 17:19:41 2009
New Revision: 75529
URL: http://llvm.org/viewvc/llvm-project?rev=75529&view=rev
Log:
Forward-declare Loop and LoopInfo instead of #including LoopInfo.h.
Modified:
llvm/trunk/include/llvm/Analysis/LoopVR.h
llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h
llvm/trunk/include/llvm/Transforms/Utils/FunctionUtils.h
llvm/trunk/include/llvm/Transforms/Utils/UnrollLoop.h
llvm/trunk/lib/Analysis/LoopVR.cpp
Modified: llvm/trunk/include/llvm/Analysis/LoopVR.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopVR.h?rev=75529&r1=75528&r2=75529&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopVR.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopVR.h Mon Jul 13 17:19:41 2009
@@ -36,11 +36,7 @@
virtual void print(std::ostream &os, const Module *) const;
void releaseMemory();
- void getAnalysisUsage(AnalysisUsage &AU) const {
- AU.addRequiredTransitive<LoopInfo>();
- AU.addRequiredTransitive<ScalarEvolution>();
- AU.setPreservesAll();
- }
+ void getAnalysisUsage(AnalysisUsage &AU) const;
//===---------------------------------------------------------------------
// Methods that are used to look up and update particular values.
Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=75529&r1=75528&r2=75529&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Mon Jul 13 17:19:41 2009
@@ -22,7 +22,7 @@
#define LLVM_ANALYSIS_SCALAREVOLUTION_H
#include "llvm/Pass.h"
-#include "llvm/Analysis/LoopInfo.h"
+#include "llvm/Instructions.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/ValueHandle.h"
#include "llvm/Support/Allocator.h"
@@ -30,14 +30,19 @@
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/DenseMap.h"
#include <iosfwd>
+#include <map>
namespace llvm {
class APInt;
+ class Constant;
class ConstantInt;
+ class DominatorTree;
class Type;
class ScalarEvolution;
class TargetData;
class LLVMContext;
+ class Loop;
+ class LoopInfo;
/// SCEV - This class represents an analyzed expression in the program. These
/// are opaque objects that the client is not allowed to do much with
Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h?rev=75529&r1=75528&r2=75529&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h Mon Jul 13 17:19:41 2009
@@ -17,6 +17,7 @@
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Support/IRBuilder.h"
#include "llvm/Support/TargetFolder.h"
+#include <set>
namespace llvm {
/// SCEVExpander - This class uses information about analyze scalars to
Modified: llvm/trunk/include/llvm/Transforms/Utils/FunctionUtils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/FunctionUtils.h?rev=75529&r1=75528&r2=75529&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/FunctionUtils.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/FunctionUtils.h Mon Jul 13 17:19:41 2009
@@ -14,13 +14,13 @@
#ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H
#define LLVM_TRANSFORMS_UTILS_FUNCTION_H
-#include "llvm/Analysis/LoopInfo.h"
#include <vector>
namespace llvm {
class BasicBlock;
class DominatorTree;
class Function;
+ class Loop;
/// ExtractCodeRegion - rip out a sequence of basic blocks into a new function
///
Modified: llvm/trunk/include/llvm/Transforms/Utils/UnrollLoop.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/UnrollLoop.h?rev=75529&r1=75528&r2=75529&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/UnrollLoop.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/UnrollLoop.h Mon Jul 13 17:19:41 2009
@@ -16,10 +16,10 @@
#ifndef LLVM_TRANSFORMS_UTILS_UNROLLLOOP_H
#define LLVM_TRANSFORMS_UTILS_UNROLLLOOP_H
-#include "llvm/Analysis/LoopInfo.h"
-
namespace llvm {
+class Loop;
+class LoopInfo;
class LPPassManager;
bool UnrollLoop(Loop *L, unsigned Count, LoopInfo* LI, LPPassManager* LPM);
Modified: llvm/trunk/lib/Analysis/LoopVR.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopVR.cpp?rev=75529&r1=75528&r2=75529&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopVR.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopVR.cpp Mon Jul 13 17:19:41 2009
@@ -16,6 +16,7 @@
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
#include "llvm/LLVMContext.h"
+#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Assembly/Writer.h"
#include "llvm/Support/CFG.h"
@@ -220,6 +221,12 @@
return FullSet;
}
+void LoopVR::getAnalysisUsage(AnalysisUsage &AU) const {
+ AU.addRequiredTransitive<LoopInfo>();
+ AU.addRequiredTransitive<ScalarEvolution>();
+ AU.setPreservesAll();
+}
+
bool LoopVR::runOnFunction(Function &F) { Map.clear(); return false; }
void LoopVR::print(std::ostream &os, const Module *) const {
More information about the llvm-commits
mailing list