[llvm] r340809 - Pull google/benchmark library to the LLVM tree

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 05:36:31 PDT 2018


Hi Kirill,

On Tue, 28 Aug 2018 at 14:55, Kirill Bobyrev via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> This patch pulls google/benchmark v1.4.1 into the LLVM tree so that any
> project could use it for benchmark generation. A dummy benchmark is
> added to `llvm/benchmarks/DummyYAML.cpp` to validate the correctness of
> the build process.

I think this breaks some 32-bit configurations (well, mine at least).
I was using Clang (from Xcode 10 beta) on macOS and got a bunch of
errors referencing sysinfo.cc:292 and onwards:

/Users/tim/llvm/llvm-project/llvm/utils/benchmark/src/sysinfo.cc:292:47:
error: non-constant-expression cannot be narrowed from type
'std::__1::array<unsigned long long, 4>::value_type' (aka 'unsigned
long long') to 'size_t' (aka 'unsigned long') in initializer list
[-Wc++11-narrowing]
  } Cases[] = {{"hw.l1dcachesize", "Data", 1, CacheCounts[1]},
                                              ^~~~~~~~~~~~~~

The same happens when self-hosting ToT. Unfortunately I couldn't
reproduce the issue on Debian (Clang 6.0.1) even with libc++; I'm not
sure what the difference is.

Officially, Xcode 10 doesn't actually support i386. But in practice
Clang does for now, and keeping the build working is likely to be
useful for when someone breaks 32-bit slices in general. Do you have
any ideas on what to do here?

Cheers.

Tim.


More information about the llvm-commits mailing list