Page MenuHomePhabricator

[MicroBenchmarks] Add benchmarks for vector memory check generation.
ClosedPublic

Authored by fhahn on Mar 4 2022, 9:30 AM.

Details

Summary

This patch adds an initial set of benchmarks for memory runtime check
generation.

It comes with a function that takes 4 pointers and accesses them in a
vectorizable inner loop, but it requires runtime checks. The outer loop
should increase the contribution of the runtime checks to the overall
runtime.

The function is then used to benchmark multiple different scenarios
where all pointers are completely disjoint or overlap in different ways.

The goal of the initial benchmarks is to measure the impact of D119078.

The current benchmarks focus on cases that can be supported by the initial
version of D119078, but should be extended as more cases can be handled.

Diff Detail

Repository
rT test-suite

Event Timeline

fhahn created this revision.Mar 4 2022, 9:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2022, 9:30 AM
Herald added a subscriber: mgorny. · View Herald Transcript
fhahn requested review of this revision.Mar 4 2022, 9:30 AM
Meinersbur accepted this revision.Mar 24 2022, 8:17 AM

Sorry for the delay.

I doesn't seem to be important that TC is a compile-time constant, so I would have uses BENCHMARK(..)->Arg instead of BENCHMARK_TEMPLATE. It's also not important.

LGTM

This revision is now accepted and ready to land.Mar 24 2022, 8:17 AM
fhahn updated this revision to Diff 418621.Mar 28 2022, 9:38 AM

Sorry for the delay.

I doesn't seem to be important that TC is a compile-time constant, so I would have uses BENCHMARK(..)->Arg instead of BENCHMARK_TEMPLATE. It's also not important.

LGTM

Thanks! I updated the code to use BENCHMARK(...)->Arg() instead. I am planning to land it soon.