Fork of llvm with experimental commits and workarounds for RPCS3
Go to file
Chandler Carruth cc9b4516cb Rewrite LLVM's generalized support library for hashing to follow the API
of the proposed standard hashing interfaces (N3333), and to use
a modified and tuned version of the CityHash algorithm.

Some of the highlights of this change:
 -- Significantly higher quality hashing algorithm with very well
    distributed results, and extremely few collisions. Should be close to
    a checksum for up to 64-bit keys. Very little clustering or clumping of
    hash codes, to better distribute load on probed hash tables.
 -- Built-in support for reserved values.
 -- Simplified API that composes cleanly with other C++ idioms and APIs.
 -- Better scaling performance as keys grow. This is the fastest
    algorithm I've found and measured for moderately sized keys (such as
    show up in some of the uniquing and folding use cases)
 -- Support for enabling per-execution seeds to prevent table ordering
    or other artifacts of hashing algorithms to impact the output of
    LLVM. The seeding would make each run different and highlight these
    problems during bootstrap.

This implementation was tested extensively using the SMHasher test
suite, and pased with flying colors, doing better than the original
CityHash algorithm even.

I've included a unittest, although it is somewhat minimal at the moment.
I've also added (or refactored into the proper location) type traits
necessary to implement this, and converted users of GeneralHash over.

My only immediate concerns with this implementation is the performance
of hashing small keys. I've already started working to improve this, and
will continue to do so. Currently, the only algorithms faster produce
lower quality results, but it is likely there is a better compromise
than the current one.

Many thanks to Jeffrey Yasskin who did most of the work on the N3333
paper, pair-programmed some of this code, and reviewed much of it. Many
thanks also go to Geoff Pike Pike and Jyrki Alakuijala, the original
authors of CityHash on which this is heavily based, and Austin Appleby
who created MurmurHash and the SMHasher test suite.

Also thanks to Nadav, Tobias, Howard, Jay, Nick, Ahmed, and Duncan for
all of the review comments! If there are further comments or concerns,
please let me know and I'll jump on 'em.

llvm-svn: 151822
2012-03-01 18:55:25 +00:00
autoconf Enable -Wcovered-switch-default again, but add -Werror to the checks to make 2012-02-28 23:32:06 +00:00
bindings ocaml bindings: landing pad is now the last opcode. 2012-02-07 18:58:19 +00:00
cmake Enable -Wcovered-switch-default again, but add -Werror to the checks to make 2012-02-28 23:32:06 +00:00
docs rplace Alpha with ARM in docs/WritingAnLLVMBackend.html, patch by chenwj 2012-03-01 15:14:19 +00:00
examples Switch to a more idiomatic way of silencing unused variable warnings in 2012-02-20 00:02:49 +00:00
include Rewrite LLVM's generalized support library for hashing to follow the API 2012-03-01 18:55:25 +00:00
lib Rewrite LLVM's generalized support library for hashing to follow the API 2012-03-01 18:55:25 +00:00
projects Enable -Wcovered-switch-default again, but add -Werror to the checks to make 2012-02-28 23:32:06 +00:00
runtime Fixing a warning in MSVC (this is also a test commit) 2012-02-05 19:43:39 +00:00
test Revert r151816 as Jim has the appropriate fix. 2012-03-01 17:41:19 +00:00
tools [Object] 2012-03-01 01:36:50 +00:00
unittests Rewrite LLVM's generalized support library for hashing to follow the API 2012-03-01 18:55:25 +00:00
utils Move getSubRegIndex out of generated code into MCRegisterInfo, devirtualize it. 2012-03-01 18:16:35 +00:00
.gitignore
CMakeLists.txt add LLVM_VERSION_MAJOR and _MINOR defines 2012-02-13 18:48:10 +00:00
configure Enable -Wcovered-switch-default again, but add -Werror to the checks to make 2012-02-28 23:32:06 +00:00
CREDITS.TXT Add myself to the credits file 2012-02-29 16:43:11 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in Enable -Wcovered-switch-default again, but add -Werror to the checks to make 2012-02-28 23:32:06 +00:00
Makefile.rules Enable -Wcovered-switch-default again, but add -Werror to the checks to make 2012-02-28 23:32:06 +00:00
README.txt test commit 2012-02-07 08:18:05 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.