[PATCH] D69295: Optimize SHA1 implementation
Kirill Bobyrev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 11:50:40 PDT 2019
kbobyrev added a comment.
In D69295#1719069 <https://reviews.llvm.org/D69295#1719069>, @terrelln wrote:
> > I also agree with this. I think llvm/benchmarks would be fine for now either way, but with more benchmarks (which hopefully would be there at some point, I had plans of adding some for a while now but I'm not sure when I'll get to that) subdirectories make sense.
>
> I agree it would be better in `llvm/benchmarks`, and that is what I tried that first, but had problems with getting the CMakeFile.txt right. I set up the file like this:
>
> set(LLVM_LINK_COMPONENTS
> Support)
>
> add_benchmark(DummyYAML DummyYAML.cpp)
> add_benchmark(hash-benchmark hash-benchmark.cpp)
>
>
> But the first benchmark complained that `hash-benchmark.cpp` is unused, and the second complained that `DummyYAML.cpp` is unused in LLVMProcessSources.cmake:112 <https://github.com/llvm/llvm-project/blob/c0da957bb05b7044bec83f8159c57b1d9ab9eb59/llvm/cmake/modules/LLVMProcessSources.cmake#L112>. If someone can help me with the CMake, I'd be glad to switch it back.
Ah, good point! I'll look into that, thank you for bringing it up.
>
>
>> Is it a -DCMAKE_BUILD_TYPE=Release build? I will be pretty surprised if gcc/clang -O3 does not inline these functions.
>
> Yeah, clang -O3 inlines all of them, but gcc -O3 inlines most, but not all of them before this patch. gcc-6 doesn't inline at least some calls of `r1`, `blk`, and `r3`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69295/new/
https://reviews.llvm.org/D69295
More information about the llvm-commits
mailing list