[PATCH] D86968: [IRSim] Adding IR Instruction Mapper

Puyan Lotfi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 15 11:48:33 PDT 2020


plotfi added inline comments.


================
Comment at: llvm/include/llvm/Analysis/IRSimilarityIdentifier.h:173
+    using llvm::hash_value;
+    assert(E && "IRInstructionData is a nullptr?");
+    return hash_value(*E);
----------------
AndrewLitteken wrote:
> plotfi wrote:
> > Can you make these a pass by reference to avoid the need for assert? 
> Since the DenseMap accepts an IRInstructionData pointer rather than a value, these have to be a pointer rather than pass by reference.
Cant you just take the address of the reference when adding to the DenseMap?? 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86968/new/

https://reviews.llvm.org/D86968



More information about the llvm-commits mailing list