X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FCodeGen%2FValueSet.h;h=558e7489d1abe533d2209b9c3b2ece506ca3c14e;hb=a62e52ab181c10738066e65a6dcc6c3cdfa5d806;hp=ee6aa15aaba41594e19b001660d9bf158402a037;hpb=e939ddb96bd3143d1893782ddeaf35ec68be7479;p=oota-llvm.git diff --git a/include/llvm/CodeGen/ValueSet.h b/include/llvm/CodeGen/ValueSet.h index ee6aa15aaba..558e7489d1a 100644 --- a/include/llvm/CodeGen/ValueSet.h +++ b/include/llvm/CodeGen/ValueSet.h @@ -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 +#include -#include -#include -//#include -#include +namespace llvm { -#include "llvm/Value.h" +class Value; - -//------------------------ Support functions --------------------------------- - -struct hashFuncValue { // sturcture containing the hash func - 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 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 -{ - - 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 var from set - - bool setUnion( const ValueSet *const set1); // for performing set union - void setSubtract( const ValueSet *const set1); // for performing set diff - - - void setDifference( const ValueSet *const set1, const ValueSet *const set2); - - void printSet() const; // for printing a live variable set -}; - - - - - +} // End llvm namespace #endif