summaryrefslogtreecommitdiff
path: root/lib/Support/Path.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-01-15 20:30:30 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-01-15 20:30:30 +0000
commitb6516aeef12a05aa47515f76e18fc426d85babbd (patch)
tree673d40370dbf9d6dfec81d45a5fbe5543185b99b /lib/Support/Path.cpp
parent248f9f280756a1d6eb20a97ee4ab457ec18170f6 (diff)
downloadllvm-b6516aeef12a05aa47515f76e18fc426d85babbd.tar.gz
llvm-b6516aeef12a05aa47515f76e18fc426d85babbd.tar.bz2
llvm-b6516aeef12a05aa47515f76e18fc426d85babbd.tar.xz
Reimplement CTPOP legalization with the "best" algorithm from
http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel In a silly microbenchmark on a 65 nm core2 this is 1.5x faster than the old code in 32 bit mode and about 2x faster in 64 bit mode. It's also a lot shorter, especially when counting 64 bit population on a 32 bit target. I hope this is fast enough to replace Kernighan-style counting loops even when the input is rather sparse. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Path.cpp')
0 files changed, 0 insertions, 0 deletions