Hi,
I am trying to implement Available Expressions data flow analysis. I created the following class (I am giving here code snippet.):
namespace {
typedef DenseMap<Expression, uint32_t> DMTy; //Expression is a class I defined.
struct DataFlowValue {
DMTy ExprMap;
llvm::BitVector* DFV;
// Functions operating on the data //
bool operator==(const DataFlowValue V) const;
void top(); /* set all elements /
void bot(); / reset all elements /
void set(DMTy emap);
void merge(DataFlowValue V); / confluence operation */
};
}
with the following function definition:
void DataFlowValue::set(DMTy emap) {
ExprMap = *emap; //Line153:
}
When I compile, I get the following error:
/home/zeus/masterLLVM/llvm/include/llvm/ADT/DenseMap.h: In member function ‘void llvm::DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT>::destroyAll() [with DerivedT = llvm::DenseMap<{anonymous}::Expression, unsigned int>, KeyT = {anonymous}::Expression, ValueT = unsigned int, KeyInfoT = llvm::DenseMapInfo<{anonymous}::Expression>]’:
/home/zeus/masterLLVM/llvm/include/llvm/ADT/DenseMap.h:600:5: instantiated from ‘void llvm::DenseMap<KeyT, ValueT, KeyInfoT>::copyFrom(const llvm::DenseMap<KeyT, ValueT, KeyInfoT>&) [with KeyT = {anonymous}::Expression, ValueT = unsigned int, KeyInfoT = llvm::DenseMapInfo<{anonymous}::Expression>, llvm::DenseMap<KeyT, ValueT, KeyInfoT> = llvm::DenseMap<{anonymous}::Expression, unsigned int>]’
/home/zeus/masterLLVM/llvm/include/llvm/ADT/DenseMap.h:585:5: instantiated from ‘llvm::DenseMap<KeyT, ValueT, KeyInfoT>& llvm::DenseMap<KeyT, ValueT, KeyInfoT>::operator=(const llvm::DenseMap<KeyT, ValueT, KeyInfoT>&) [with KeyT = {anonymous}::Expression, ValueT = unsigned int, KeyInfoT = llvm::DenseMapInfo<{anonymous}::Expression>, llvm::DenseMap<KeyT, ValueT, KeyInfoT> = llvm::DenseMap<{anonymous}::Expression, unsigned int>]’
/home/zeus/masterLLVM/llvm/lib/Analysis/AVEAnalysis.cpp:153:13: instantiated from here
/home/zeus/masterLLVM/llvm/include/llvm/ADT/DenseMap.h:256:7: error: ‘isEqual’ is not a member of ‘llvm::DenseMapInfo<{anonymous}::Expression>’
/home/zeus/masterLLVM/llvm/include/llvm/ADT/DenseMap.h:256:7: error: ‘isEqual’ is not a member of ‘llvm::DenseMapInfo<{anonymous}::Expression>’
Can someone help me solve the error?