aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-03 15:30:01 +0000
committerChris Lattner <sabre@nondot.org>2003-06-03 15:30:01 +0000
commit5b595b9421826b193d116f70df2f626ce6de6657 (patch)
tree26e71a08f5041900bc1720805d188bd548595891 /include
parent4ade9ed40ffef8a3ea44ae0a3bfc1150a952df51 (diff)
downloadexternal_llvm-5b595b9421826b193d116f70df2f626ce6de6657.zip
external_llvm-5b595b9421826b193d116f70df2f626ce6de6657.tar.gz
external_llvm-5b595b9421826b193d116f70df2f626ce6de6657.tar.bz2
Minor cleanups:
* LLVM #include should use "", not <> * Fix line wrapping * Remove noncopyable base class to improve doxygen output git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/DependenceGraph.h62
1 files changed, 36 insertions, 26 deletions
diff --git a/include/llvm/Analysis/DependenceGraph.h b/include/llvm/Analysis/DependenceGraph.h
index d2f3ad5..509b6f4 100644
--- a/include/llvm/Analysis/DependenceGraph.h
+++ b/include/llvm/Analysis/DependenceGraph.h
@@ -11,15 +11,14 @@
// of the dependence. This saves space and is important because dep. graphs
// can grow quickly. It works just fine because the standard idiom is to
// start with a known node and enumerate the dependences to or from that node.
+//
//===----------------------------------------------------------------------===//
#ifndef LLVM_ANALYSIS_DEPENDENCEGRAPH_H
#define LLVM_ANALYSIS_DEPENDENCEGRAPH_H
-
-#include <Support/NonCopyable.h>
-#include <Support/hash_map>
+#include "Support/hash_map"
#include <iosfwd>
#include <vector>
#include <utility>
@@ -44,12 +43,6 @@ enum DependenceType {
IncomingFlag = 0x10 // is this an incoming or outgoing dep?
};
-#undef SUPPORTING_LOOP_DEPENDENCES
-#ifdef SUPPORTING_LOOP_DEPENDENCES
-typedef int DependenceDistance; // negative means unknown distance
-typedef short DependenceLevel; // 0 means global level outside loops
-#endif
-
//----------------------------------------------------------------------------
// class Dependence:
@@ -62,9 +55,7 @@ class Dependence {
unsigned char depType;
public:
- /*ctor*/ Dependence (DepGraphNode* toOrFromN,
- DependenceType type,
- bool isIncoming)
+ Dependence(DepGraphNode* toOrFromN, DependenceType type, bool isIncoming)
: toOrFromNode(toOrFromN),
depType(type | (isIncoming? IncomingFlag : 0x0)) { }
@@ -72,7 +63,7 @@ public:
: toOrFromNode(D.toOrFromNode),
depType(D.depType) { }
- bool operator==(const Dependence& D) {
+ bool operator==(const Dependence& D) const {
return toOrFromNode == D.toOrFromNode && depType == D.depType;
}
@@ -111,8 +102,8 @@ public:
#ifdef SUPPORTING_LOOP_DEPENDENCES
struct LoopDependence: public Dependence {
DependenceDirection dir;
- DependenceDistance distance;
- DependenceLevel level;
+ int distance;
+ short level;
LoopInfo* enclosingLoop;
};
#endif
@@ -166,7 +157,10 @@ public:
// for the node.
//----------------------------------------------------------------------------
-class DependenceGraph: public NonCopyable {
+class DependenceGraph {
+ DependenceGraph(const DependenceGraph&); // DO NOT IMPLEMENT
+ void operator=(const DependenceGraph&); // DO NOT IMPLEMENT
+
typedef hash_map<Instruction*, DepGraphNode*> DepNodeMapType;
typedef DepNodeMapType:: iterator map_iterator;
typedef DepNodeMapType::const_iterator const_map_iterator;
@@ -204,17 +198,33 @@ public:
->getNodeInternal(const_cast<Instruction&>(inst));
}
- iterator inDepBegin ( DepGraphNode& T) { return T.inDeps.begin(); }
- const_iterator inDepBegin (const DepGraphNode& T) const { return T.inDeps.begin(); }
+ iterator inDepBegin(DepGraphNode& T) {
+ return T.inDeps.begin();
+ }
+ const_iterator inDepBegin (const DepGraphNode& T) const {
+ return T.inDeps.begin();
+ }
- iterator inDepEnd ( DepGraphNode& T) { return T.inDeps.end(); }
- const_iterator inDepEnd (const DepGraphNode& T) const { return T.inDeps.end(); }
+ iterator inDepEnd(DepGraphNode& T) {
+ return T.inDeps.end();
+ }
+ const_iterator inDepEnd(const DepGraphNode& T) const {
+ return T.inDeps.end();
+ }
- iterator outDepBegin( DepGraphNode& F) { return F.outDeps.begin();}
- const_iterator outDepBegin(const DepGraphNode& F) const { return F.outDeps.begin();}
+ iterator outDepBegin(DepGraphNode& F) {
+ return F.outDeps.begin();
+ }
+ const_iterator outDepBegin(const DepGraphNode& F) const {
+ return F.outDeps.begin();
+ }
- iterator outDepEnd ( DepGraphNode& F) { return F.outDeps.end(); }
- const_iterator outDepEnd (const DepGraphNode& F) const { return F.outDeps.end(); }
+ iterator outDepEnd(DepGraphNode& F) {
+ return F.outDeps.end();
+ }
+ const_iterator outDepEnd(const DepGraphNode& F) const {
+ return F.outDeps.end();
+ }
/// Debugging support methods
///
@@ -239,8 +249,8 @@ public:
Instruction& toI,
DependenceType depType,
DependenceDirection dir,
- DependenceDistance distance,
- DependenceLevel level,
+ int distance,
+ short level,
LoopInfo* enclosingLoop);
#endif // SUPPORTING_LOOP_DEPENDENCES
};