Index: test-suite/trunk/MicroBenchmarks/XRay/FDRMode/fdrmode-bench.cc =================================================================== --- test-suite/trunk/MicroBenchmarks/XRay/FDRMode/fdrmode-bench.cc +++ test-suite/trunk/MicroBenchmarks/XRay/FDRMode/fdrmode-bench.cc @@ -71,7 +71,7 @@ if (state.thread_index == 0) { SetUpXRayFDRMultiThreaded(state); } - while (state.KeepRunning()) { + for (auto _ : state) { val = EmptyFunction(); benchmark::DoNotOptimize(val); } Index: test-suite/trunk/MicroBenchmarks/XRay/ReturnReference/retref-bench.cc =================================================================== --- test-suite/trunk/MicroBenchmarks/XRay/ReturnReference/retref-bench.cc +++ test-suite/trunk/MicroBenchmarks/XRay/ReturnReference/retref-bench.cc @@ -25,7 +25,7 @@ [[clang::xray_never_instrument]] static void BM_ReturnNeverInstrumented( benchmark::State& state) { - while (state.KeepRunning()) { + for (auto _ : state) { benchmark::DoNotOptimize(neverInstrumented()); } } @@ -41,7 +41,7 @@ [[clang::xray_never_instrument]] static void BM_ReturnInstrumentedUnPatched( benchmark::State& state) { __xray_unpatch(); - while (state.KeepRunning()) { + for (auto _ : state) { int x; benchmark::DoNotOptimize(x = alwaysInstrumented()); benchmark::ClobberMemory(); @@ -55,7 +55,7 @@ benchmark::State& state) { __xray_patch(); __xray_unpatch(); - while (state.KeepRunning()) { + for (auto _ : state) { int x; benchmark::DoNotOptimize(x = alwaysInstrumented()); benchmark::ClobberMemory(); @@ -68,7 +68,7 @@ [[clang::xray_never_instrument]] static void BM_ReturnInstrumentedPatched( benchmark::State& state) { __xray_patch(); - while (state.KeepRunning()) { + for (auto _ : state) { int x; benchmark::DoNotOptimize(alwaysInstrumented()); benchmark::ClobberMemory(); @@ -79,7 +79,7 @@ [[clang::xray_never_instrument]] static void BM_RDTSCP_Cost( benchmark::State& state) { - while (state.KeepRunning()) { + for (auto _ : state) { unsigned cpu; unsigned tsc; benchmark::DoNotOptimize(tsc = __rdtscp(&cpu)); @@ -104,7 +104,7 @@ __xray_set_handler(benchmark_handler); __xray_patch(); benchmark::ClobberMemory(); - while (state.KeepRunning()) { + for (auto _ : state) { int x; benchmark::DoNotOptimize(x = alwaysInstrumented()); benchmark::ClobberMemory();