[PATCH] D77999: Reimplement mlir::Identifier to be a wrapper around 'StringMapEntry*' instead of a wrapper around a 'const char*'. This makes it so strref() can be computed without calling strlen, which is more efficient and less error-prone. While here...

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 12 23:01:28 PDT 2020


rriddle accepted this revision.
rriddle added a comment.
This revision is now accepted and ready to land.

Thanks, looks much better now.



================
Comment at: mlir/include/mlir/IR/Identifier.h:98
   // Identifiers are uniqued, so we can just hash the pointer they contain.
   return llvm::hash_value(static_cast<const void *>(arg.data()));
 }
----------------
nit: Can we change this to `arg.getAsOpaquePointer()` to avoid the pointer arithmetic of `getKeyData`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77999





More information about the llvm-commits mailing list