[libcxx-commits] [PATCH] D62778: [1/2] Add a benchmark for map operations.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 9 06:57:40 PDT 2020


ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.

How did you compile that? `ninja -C build cxx-benchmarks` fail after applying your patch:

  In file included from <llvm>/libcxx/benchmarks/map.bench.cpp:15:
  <llvm>/libcxx/benchmarks/CartesianBenchmarks.h:65:71: warning: pack fold expression is a C++17 extension [-Wc++17-extensions]
    (internal::makeBenchmarkImpl<B>(A, std::tuple<U..., T>(), rest...), ...);
                                                                        ^
  <llvm>/libcxx/benchmarks/map.bench.cpp:77:9: error: cannot form a reference to 'void'
      auto& map = R.Maps.emplace_back();
          ^
  <llvm>/libcxx/benchmarks/map.bench.cpp:78:9: error: cannot form a reference to 'void'
      auto& hints = R.Hints.emplace_back();
          ^
  <llvm>/libcxx/benchmarks/map.bench.cpp:367:40: error: no member named 'insert_or_assign' in 'std::__1::map<unsigned long long, long long, std::__1::less<unsigned long long>, std::__1::allocator<std::__1::pair<const unsigned long long, long long> > >'
            benchmark::DoNotOptimize(Map.insert_or_assign(K, 1));
                                     ~~~ ^
  <llvm>/libcxx/benchmarks/CartesianBenchmarks.h:46:69: note: in instantiation of member function '(anonymous namespace)::InsertAssign<internal::EnumValue<(anonymous namespace)::AllModes, (anonymous namespace)::Mode, 1>, internal::EnumValue<(anonymous namespace)::AllOrders, (anonymous namespace)::Order, 1> >::run' requested here
                                     [=](benchmark::State& S) { Bench.run(S); });
                                                                      ^
  <llvm>/libcxx/benchmarks/CartesianBenchmarks.h:53:3: note: in instantiation of function template specialization 'internal::makeBenchmarkFromValuesImpl<(anonymous namespace)::InsertAssign<internal::EnumValue<(anonymous namespace)::AllModes, (anonymous namespace)::Mode, 1>, internal::EnumValue<(anonymous namespace)::AllOrders, (anonymous namespace)::Order, 1> >, std::__1::vector<std::__1::tuple<unsigned long>, std::__1::allocator<std::__1::tuple<unsigned long> > >, 0>' requested here
    makeBenchmarkFromValuesImpl<B>(A, std::index_sequence_for<Args...>());
    ^
  <llvm>/libcxx/benchmarks/CartesianBenchmarks.h:58:3: note: in instantiation of function template specialization 'internal::makeBenchmarkFromValues<(anonymous namespace)::InsertAssign<internal::EnumValue<(anonymous namespace)::AllModes, (anonymous namespace)::Mode, 1>, internal::EnumValue<(anonymous namespace)::AllOrders, (anonymous namespace)::Order, 1> >, unsigned long>' requested here
    makeBenchmarkFromValues<B<U...> >(A);
    ^


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62778/new/

https://reviews.llvm.org/D62778





More information about the libcxx-commits mailing list