#ifndef __UTILITY__HPP
#define __UTILITY__HPP

#include "CommonTypes.hpp"
#include <string>

namespace llvm
{
  class Function;
  class Value;
}

/*!

 */
const llvm::Value* normalizeValue(const llvm::Value * v);

/*!
  If the value is a PHI Node, extract all values that could be
  represented into a flat value_set.

  If the node is not a PHI Node, just return the set containing that
  value.
 */
value_set flattenPhiNode(const llvm::Value * v);

llvm::Function* getParentFunction(llvm::Value* V);
std::string valueToString(const llvm::Value* V);

#endif // __UTILITY__HPP
