[PATCH] D86904: [mlir] [InProgress] Support for defining Types in tblgen
John Demme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 14:57:00 PDT 2020
jdd added inline comments.
================
Comment at: llvm/lib/Support/Hashing.cpp:30
+
+hash_code llvm::hash_value(float value) {
+ return hash_value(*(uint32_t *)&value);
----------------
silvas wrote:
> silvas wrote:
> > Drive-by comment: this actually is not a correct hashing implementation. it can result in x == y yet have hash(x) != hash(y) and other violation of invariants. (consider negative 0 and NaN's)
> more details here: https://research.swtch.com/randhash
yeah, I'm not accounting for -0. NaN is "just" a performance problem for degenerate cases AFAICT.
I'll probably remove these. I only need them for a test which probably doesn't make sense so I'll modify the test to not use them.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86904/new/
https://reviews.llvm.org/D86904
More information about the llvm-commits
mailing list