[llvm-commits] CVS: llvm/include/llvm/Analysis/DependenceGraph.h

Chris Lattner lattner at cs.uiuc.edu
Tue Jun 3 10:31:06 PDT 2003


Changes in directory llvm/include/llvm/Analysis:

DependenceGraph.h updated: 1.2 -> 1.3

---
Log message:

Minor cleanups:
  * LLVM #include should use "", not <>
  * Fix line wrapping
  * Remove noncopyable base class to improve doxygen output


---
Diffs of the changes:

Index: llvm/include/llvm/Analysis/DependenceGraph.h
diff -u llvm/include/llvm/Analysis/DependenceGraph.h:1.2 llvm/include/llvm/Analysis/DependenceGraph.h:1.3
--- llvm/include/llvm/Analysis/DependenceGraph.h:1.2	Wed Dec 11 23:31:26 2002
+++ llvm/include/llvm/Analysis/DependenceGraph.h	Tue Jun  3 10:30:01 2003
@@ -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 @@
   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 @@
   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 @@
     : 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 @@
 #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 @@
 // 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 @@
       ->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 @@
                          Instruction&  toI,
                          DependenceType      depType,
                          DependenceDirection dir,
-                         DependenceDistance  distance,
-                         DependenceLevel     level,
+                         int                 distance,
+                         short               level,
                          LoopInfo*           enclosingLoop);
 #endif // SUPPORTING_LOOP_DEPENDENCES
 };





More information about the llvm-commits mailing list