<div dir="ltr"><div>Hi,<br><br></div>I am trying to implement Available Expressions data flow analysis. I created the following class (I am giving here code snippet.):<br><br>namespace {<br> typedef DenseMap<Expression, uint32_t> DMTy; //Expression is a class I defined.<br>
struct DataFlowValue {<br> DMTy ExprMap;<br> llvm::BitVector* DFV;<br><br> // Functions operating on the data //<br> bool operator==(const DataFlowValue V) const;<br> void top(); /* set all elements */<br>
void bot(); /* reset all elements */<br> void set(DMTy emap);<br> void merge(DataFlowValue V); /* confluence operation */<br> };<br>}<br><br clear="all"><div><div>with the following function definition:<br>
<br>
void DataFlowValue::set(DMTy emap) {<br> ExprMap = *emap; //Line153:<br>}<br><br></div><div>When I compile, I get the following error:<br><br>/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>]’:<br>
/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>]’<br>
/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>]’<br>
/home/zeus/masterLLVM/llvm/lib/Analysis/AVEAnalysis.cpp:153:13: instantiated from here<br>/home/zeus/masterLLVM/llvm/include/llvm/ADT/DenseMap.h:256:7: error: ‘isEqual’ is not a member of ‘llvm::DenseMapInfo<{anonymous}::Expression>’<br>
/home/zeus/masterLLVM/llvm/include/llvm/ADT/DenseMap.h:256:7: error: ‘isEqual’ is not a member of ‘llvm::DenseMapInfo<{anonymous}::Expression>’<br><br></div><div>Can someone help me solve the error?<br></div><div><br>
</div><div>-- <br>Rekha
</div></div></div>