summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-28 16:19:42 +0000
committerChris Lattner <sabre@nondot.org>2002-04-28 16:19:42 +0000
commit8fc2f2072de83665ae20e06929e28317f449bcdf (patch)
tree978d1527ce64987f813c97686195af5ab29e12ff /include
parent876509614b608f1af885d978c7d2a1e34f807e33 (diff)
downloadexternal_llvm-8fc2f2072de83665ae20e06929e28317f449bcdf.zip
external_llvm-8fc2f2072de83665ae20e06929e28317f449bcdf.tar.gz
external_llvm-8fc2f2072de83665ae20e06929e28317f449bcdf.tar.bz2
Remove all contents of the cfg namespace to the global namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2369 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/Dominators.h4
-rw-r--r--include/llvm/Analysis/InductionVariable.h6
-rw-r--r--include/llvm/Analysis/Interval.h15
-rw-r--r--include/llvm/Analysis/IntervalIterator.h4
-rw-r--r--include/llvm/Analysis/IntervalPartition.h6
-rw-r--r--include/llvm/Analysis/LoopInfo.h9
-rw-r--r--include/llvm/Analysis/Writer.h96
-rw-r--r--include/llvm/Transforms/Scalar/InductionVars.h4
8 files changed, 60 insertions, 84 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h
index 437a4fc..3a29eec 100644
--- a/include/llvm/Analysis/Dominators.h
+++ b/include/llvm/Analysis/Dominators.h
@@ -21,8 +21,6 @@
#include "llvm/Pass.h"
#include <set>
-namespace cfg {
-
//===----------------------------------------------------------------------===//
//
// DominatorBase - Base class that other, more interesting dominator analyses
@@ -301,6 +299,4 @@ public:
}
};
-} // End namespace cfg
-
#endif
diff --git a/include/llvm/Analysis/InductionVariable.h b/include/llvm/Analysis/InductionVariable.h
index 5139955..951ac05 100644
--- a/include/llvm/Analysis/InductionVariable.h
+++ b/include/llvm/Analysis/InductionVariable.h
@@ -22,7 +22,7 @@
class Value;
class PHINode;
class Instruction;
-namespace cfg { class LoopInfo; class Loop; }
+class LoopInfo; class Loop;
class InductionVariable {
public:
@@ -40,11 +40,11 @@ public:
// Create an induction variable for the specified value. If it is a PHI, and
// if it's recognizable, classify it and fill in instance variables.
//
- InductionVariable(PHINode *PN, cfg::LoopInfo *LoopInfo = 0);
+ InductionVariable(PHINode *PN, LoopInfo *LoopInfo = 0);
// Classify Induction
static enum iType Classify(const Value *Start, const Value *Step,
- const cfg::Loop *L = 0);
+ const Loop *L = 0);
};
#endif
diff --git a/include/llvm/Analysis/Interval.h b/include/llvm/Analysis/Interval.h
index 5fdb71d..b297441 100644
--- a/include/llvm/Analysis/Interval.h
+++ b/include/llvm/Analysis/Interval.h
@@ -1,6 +1,6 @@
//===- llvm/Analysis/Interval.h - Interval Class Declaration -----*- C++ -*--=//
//
-// This file contains the declaration of the cfg::Interval class, which
+// This file contains the declaration of the Interval class, which
// represents a set of CFG nodes and is a portion of an interval partition.
//
// Intervals have some interesting and useful properties, including the
@@ -17,8 +17,6 @@
class BasicBlock;
-namespace cfg {
-
//===----------------------------------------------------------------------===//
//
// Interval Class - An Interval is a set of nodes defined such that every node
@@ -89,27 +87,24 @@ public:
bool isLoop() const;
};
-} // End namespace cfg
-
// succ_begin/succ_end - define methods so that Intervals may be used
// just like BasicBlocks can with the succ_* functions, and *::succ_iterator.
//
-inline cfg::Interval::succ_iterator succ_begin(cfg::Interval *I) {
+inline Interval::succ_iterator succ_begin(Interval *I) {
return I->Successors.begin();
}
-inline cfg::Interval::succ_iterator succ_end(cfg::Interval *I) {
+inline Interval::succ_iterator succ_end(Interval *I) {
return I->Successors.end();
}
// pred_begin/pred_end - define methods so that Intervals may be used
// just like BasicBlocks can with the pred_* functions, and *::pred_iterator.
//
-inline cfg::Interval::pred_iterator pred_begin(cfg::Interval *I) {
+inline Interval::pred_iterator pred_begin(Interval *I) {
return I->Predecessors.begin();
}
-inline cfg::Interval::pred_iterator pred_end(cfg::Interval *I) {
+inline Interval::pred_iterator pred_end(Interval *I) {
return I->Predecessors.end();
}
-
#endif
diff --git a/include/llvm/Analysis/IntervalIterator.h b/include/llvm/Analysis/IntervalIterator.h
index 55413d4..64c1b60 100644
--- a/include/llvm/Analysis/IntervalIterator.h
+++ b/include/llvm/Analysis/IntervalIterator.h
@@ -34,8 +34,6 @@
#include <set>
#include <algorithm>
-namespace cfg {
-
// getNodeHeader - Given a source graph node and the source graph, return the
// BasicBlock that is the header node. This is the opposite of
// getSourceGraphNode.
@@ -248,6 +246,4 @@ inline interval_part_interval_iterator intervals_end(IntervalPartition &IP) {
return interval_part_interval_iterator();
}
-} // End namespace cfg
-
#endif
diff --git a/include/llvm/Analysis/IntervalPartition.h b/include/llvm/Analysis/IntervalPartition.h
index d31b5fd..281b32e 100644
--- a/include/llvm/Analysis/IntervalPartition.h
+++ b/include/llvm/Analysis/IntervalPartition.h
@@ -1,6 +1,6 @@
//===- IntervalPartition.h - Interval partition Calculation ------*- C++ -*--=//
//
-// This file contains the declaration of the cfg::IntervalPartition class, which
+// This file contains the declaration of the IntervalPartition class, which
// calculates and represents the interval partition of a function, or a
// preexisting interval partition.
//
@@ -19,8 +19,6 @@
#include "llvm/Analysis/Interval.h"
#include "llvm/Pass.h"
-namespace cfg {
-
//===----------------------------------------------------------------------===//
//
// IntervalPartition - This class builds and holds an "interval partition" for
@@ -93,6 +91,4 @@ private:
void updatePredecessors(Interval *Int);
};
-} // End namespace cfg
-
#endif
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index edbd55d..b56de0f 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -13,9 +13,8 @@
#include "llvm/Pass.h"
#include <set>
-namespace cfg {
- class DominatorSet;
- class LoopInfo;
+class DominatorSet;
+class LoopInfo;
//===----------------------------------------------------------------------===//
// Loop class - Instances of this class are used to represent loops that are
@@ -67,7 +66,7 @@ class LoopInfo : public FunctionPass {
std::map<BasicBlock*, Loop*> BBMap;
std::vector<Loop*> TopLevelLoops;
public:
- static AnalysisID ID; // cfg::LoopInfo Analysis ID
+ static AnalysisID ID; // LoopInfo Analysis ID
// LoopInfo ctor - Calculate the natural loop information for a CFG
LoopInfo(AnalysisID id) { assert(id == ID); }
@@ -117,6 +116,4 @@ private:
Loop *ConsiderForLoop(BasicBlock *BB, const DominatorSet &DS);
};
-} // End namespace cfg
-
#endif
diff --git a/include/llvm/Analysis/Writer.h b/include/llvm/Analysis/Writer.h
index 1b8ebe8..2ecc226 100644
--- a/include/llvm/Analysis/Writer.h
+++ b/include/llvm/Analysis/Writer.h
@@ -10,66 +10,62 @@
#include <iosfwd>
-namespace cfg {
+// This library provides support for printing out Intervals.
+class Interval;
+class IntervalPartition;
- // This library provides support for printing out Intervals.
- class Interval;
- class IntervalPartition;
+void WriteToOutput(const Interval *I, std::ostream &o);
+inline std::ostream &operator <<(std::ostream &o, const Interval *I) {
+ WriteToOutput(I, o); return o;
+}
- void WriteToOutput(const Interval *I, std::ostream &o);
- inline std::ostream &operator <<(std::ostream &o, const Interval *I) {
- WriteToOutput(I, o); return o;
- }
+void WriteToOutput(const IntervalPartition &IP, std::ostream &o);
+inline std::ostream &operator <<(std::ostream &o,
+ const IntervalPartition &IP) {
+ WriteToOutput(IP, o); return o;
+}
- void WriteToOutput(const IntervalPartition &IP, std::ostream &o);
- inline std::ostream &operator <<(std::ostream &o,
- const IntervalPartition &IP) {
- WriteToOutput(IP, o); return o;
- }
+// Stuff for printing out Dominator data structures...
+class DominatorSet;
+class ImmediateDominators;
+class DominatorTree;
+class DominanceFrontier;
- // Stuff for printing out Dominator data structures...
- class DominatorSet;
- class ImmediateDominators;
- class DominatorTree;
- class DominanceFrontier;
+void WriteToOutput(const DominatorSet &, std::ostream &o);
+inline std::ostream &operator <<(std::ostream &o, const DominatorSet &DS) {
+ WriteToOutput(DS, o); return o;
+}
- void WriteToOutput(const DominatorSet &, std::ostream &o);
- inline std::ostream &operator <<(std::ostream &o, const DominatorSet &DS) {
- WriteToOutput(DS, o); return o;
- }
+void WriteToOutput(const ImmediateDominators &, std::ostream &o);
+inline std::ostream &operator <<(std::ostream &o,
+ const ImmediateDominators &ID) {
+ WriteToOutput(ID, o); return o;
+}
- void WriteToOutput(const ImmediateDominators &, std::ostream &o);
- inline std::ostream &operator <<(std::ostream &o,
- const ImmediateDominators &ID) {
- WriteToOutput(ID, o); return o;
- }
+void WriteToOutput(const DominatorTree &, std::ostream &o);
+inline std::ostream &operator <<(std::ostream &o, const DominatorTree &DT) {
+ WriteToOutput(DT, o); return o;
+}
- void WriteToOutput(const DominatorTree &, std::ostream &o);
- inline std::ostream &operator <<(std::ostream &o, const DominatorTree &DT) {
- WriteToOutput(DT, o); return o;
- }
+void WriteToOutput(const DominanceFrontier &, std::ostream &o);
+inline std::ostream &operator <<(std::ostream &o,
+ const DominanceFrontier &DF) {
+ WriteToOutput(DF, o); return o;
+}
- void WriteToOutput(const DominanceFrontier &, std::ostream &o);
- inline std::ostream &operator <<(std::ostream &o,
- const DominanceFrontier &DF) {
- WriteToOutput(DF, o); return o;
- }
+// Stuff for printing out Loop information
+class Loop;
+class LoopInfo;
- // Stuff for printing out Loop information
- class Loop;
- class LoopInfo;
+void WriteToOutput(const LoopInfo &, std::ostream &o);
+inline std::ostream &operator <<(std::ostream &o, const LoopInfo &LI) {
+ WriteToOutput(LI, o); return o;
+}
- void WriteToOutput(const LoopInfo &, std::ostream &o);
- inline std::ostream &operator <<(std::ostream &o, const LoopInfo &LI) {
- WriteToOutput(LI, o); return o;
- }
-
- void WriteToOutput(const Loop *, std::ostream &o);
- inline std::ostream &operator <<(std::ostream &o, const Loop *L) {
- WriteToOutput(L, o); return o;
- }
-
-} // End namespace CFG
+void WriteToOutput(const Loop *, std::ostream &o);
+inline std::ostream &operator <<(std::ostream &o, const Loop *L) {
+ WriteToOutput(L, o); return o;
+}
class InductionVariable;
void WriteToOutput(const InductionVariable &, std::ostream &o);
diff --git a/include/llvm/Transforms/Scalar/InductionVars.h b/include/llvm/Transforms/Scalar/InductionVars.h
index b8d951b..196bb1f 100644
--- a/include/llvm/Transforms/Scalar/InductionVars.h
+++ b/include/llvm/Transforms/Scalar/InductionVars.h
@@ -9,12 +9,12 @@
#define LLVM_OPT_INDUCTION_VARS_H
#include "llvm/Pass.h"
-namespace cfg { class IntervalPartition; }
+class IntervalPartition;
struct InductionVariableCannonicalize : public FunctionPass {
// doInductionVariableCannonicalize - Simplify induction variables in loops
//
- static bool doIt(Function *F, cfg::IntervalPartition &IP);
+ static bool doIt(Function *F, IntervalPartition &IP);
virtual bool runOnFunction(Function *F);