2001-07-24 17:14:13 +00:00
|
|
|
|
2002-02-05 01:43:49 +00:00
|
|
|
|
|
|
|
|
2001-07-24 17:14:13 +00:00
|
|
|
#include "llvm/Analysis/LiveVar/ValueSet.h"
|
2001-12-03 22:26:30 +00:00
|
|
|
#include "llvm/ConstantVals.h"
|
2002-01-20 22:54:45 +00:00
|
|
|
#include <iostream>
|
2001-07-24 17:14:13 +00:00
|
|
|
|
2002-02-24 23:01:21 +00:00
|
|
|
std::ostream &operator<<(std::ostream &O, RAV V) { // func to print a Value
|
2002-02-05 01:43:49 +00:00
|
|
|
const Value *v = V.V;
|
2001-10-15 18:30:06 +00:00
|
|
|
if (v->hasName())
|
2002-02-05 01:43:49 +00:00
|
|
|
return O << v << "(" << v->getName() << ") ";
|
2001-12-03 22:26:30 +00:00
|
|
|
else if (Constant *C = dyn_cast<Constant>(v))
|
2002-04-18 18:14:40 +00:00
|
|
|
return O << v << "(" << C << ") ";
|
2001-08-20 21:12:49 +00:00
|
|
|
else
|
2002-02-05 01:43:49 +00:00
|
|
|
return O << v << " ";
|
2001-07-24 17:14:13 +00:00
|
|
|
}
|
|
|
|
|
2002-02-05 02:51:01 +00:00
|
|
|
void printSet(const ValueSet &S) {
|
|
|
|
for (ValueSet::const_iterator I = S.begin(), E = S.end(); I != E; ++I)
|
2002-02-05 01:43:49 +00:00
|
|
|
std::cerr << RAV(*I);
|
2001-07-24 17:14:13 +00:00
|
|
|
}
|
2002-02-05 02:51:01 +00:00
|
|
|
|