Finish support for Microsoft ML/MASM. May still be a few rough edges.
[oota-llvm.git] / include / llvm / CodeGen / ValueSet.h
index 02d3906178ce1ae7791e9b98d7f42c080b53420f..558e7489d1abe533d2209b9c3b2ece506ca3c14e 100644 (file)
@@ -1,62 +1,39 @@
-/* Title:   ValueSet.h
-   Author:  Ruchira Sasanka
-   Date:    Jun 30, 01
-   Purpose: Contains a mathematical set of Values. LiveVarSet is derived from
-            this. Contains both class and method definitions
-*/
+//===-- llvm/CodeGen/ValueSet.h ---------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This header is OBSOLETE, do not use it for new code.
+//
+// FIXME: Eliminate this file.
+//
+//===----------------------------------------------------------------------===//
 
 #ifndef VALUE_SET_H
 #define VALUE_SET_H
 
-#include <stdlib.h>
+#include <set>
 
-#include <hash_set>
-#include <algorithm>
-#include <fstream>
-#include <iostream>
+namespace llvm {
 
-#include "llvm/Value.h"
+class Value;
 
-
-//------------------------ Support functions ---------------------------------
-
-struct hashFuncValue {                // sturcture containing the hash function. 
-  inline size_t operator () (const Value *const val) const 
-  { return (size_t) val;  }
+// RAV - Used to print values in a form used by the register allocator.
+//
+struct RAV {  // Register Allocator Value
+  const Value &V;
+  RAV(const Value *v) : V(*v) {}
+  RAV(const Value &v) : V(v) {}
 };
+std::ostream &operator<<(std::ostream &out, RAV Val);
 
+typedef std::set<const Value*> ValueSet;
+void printSet(const ValueSet &S);
 
-
-//------------------- Class Definition for ValueSet ----------------------------
-
-void printValue( const Value *const v);  // func to print a Value 
-
-
-
-class ValueSet : public hash_set<const Value *,  hashFuncValue > 
-{
- public:
-  ValueSet();   // constructor
-
-  inline void add(const Value *const  val) 
-    { assert( val ); insert(val);}           // for adding a live variable to set
-
-  inline void remove(const Value *const  val) 
-    { assert( val ); erase(val); }       // for removing a live variable from set
-
-  bool setUnion( const ValueSet *const set1);    // for performing two set unions
-  void setSubtract( const ValueSet *const set1); // for performing set difference
-
-                                                 // for performing set difference
-  void setDifference( const ValueSet *const set1, const ValueSet *const set2); 
-  void printSet() const;  // for printing a live variable set
-};
-
-
-
-
-
+} // End llvm namespace
 
 #endif