diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-01-15 20:30:30 +0000 | 
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-01-15 20:30:30 +0000 | 
| commit | fff2517edcec21184fb86d3b48bed11885032587 (patch) | |
| tree | e4abbc7d5209c3d17aafcbab04d853f9430c601d /llvm/lib/CodeGen/LocalStackSlotAllocation.cpp | |
| parent | b587180fa7f38f61f5512a00a4812a8b20335619 (diff) | |
| download | bcm5719-llvm-fff2517edcec21184fb86d3b48bed11885032587.tar.gz bcm5719-llvm-fff2517edcec21184fb86d3b48bed11885032587.zip | |
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.
llvm-svn: 123547
Diffstat (limited to 'llvm/lib/CodeGen/LocalStackSlotAllocation.cpp')
0 files changed, 0 insertions, 0 deletions

