[llvm-commits] CVS: llvm/include/llvm/Reoptimizer/CFG.h

Anand Shukla ashukla at cs.uiuc.edu
Fri Jul 18 13:26:01 PDT 2003


Changes in directory llvm/include/llvm/Reoptimizer:

CFG.h added (r1.1)

---
Log message:

forgotten file


---
Diffs of the changes:

Index: llvm/include/llvm/Reoptimizer/CFG.h
diff -c /dev/null llvm/include/llvm/Reoptimizer/CFG.h:1.1
*** /dev/null	Fri Jul 18 13:25:12 2003
--- llvm/include/llvm/Reoptimizer/CFG.h	Fri Jul 18 13:25:01 2003
***************
*** 0 ****
--- 1,36 ----
+ //===----- CFG.h - interface to insert instrumentation -----------*- C++ -*--=//
+ //
+ // Instrument every back edges with counters
+ //===----------------------------------------------------------------------===//
+ 
+ #ifndef LLVM_REOPTIMIZER_CFG_H
+ #define LLVM_REOPTIMIZER_CFG_H
+ 
+ #include <list>
+ #include <vector>
+ #include <set>
+ 
+ struct CFG_Node{
+   uint64_t start;
+   uint64_t end;
+   std::list<CFG_Node *> succ_list;
+   CFG_Node(uint64_t s, uint64_t e); //ctor
+ };
+ 
+ namespace std {
+   struct less<CFG_Node *> : public binary_function<CFG_Node *, CFG_Node *, bool> {
+     bool operator()(CFG_Node *n1, CFG_Node *n2) const {
+       return n1->start < n2->start;
+     }
+   };
+ }
+ 
+ class BinCFG{
+ public:
+   BinCFG(uint64_t start, uint64_t end, VirtualMem *vm);
+ private:
+   std::set<CFG_Node *> allNodes; //for efficient lookup
+   std::vector<CFG_Node *> nodes;
+ };
+ 
+ #endif





More information about the llvm-commits mailing list