Skip to content
Unverified Commit 16b23879 authored by Aiden Grossman's avatar Aiden Grossman Committed by GitHub
Browse files

[llvm-exegesis] Fix snippet value scaling (#77226)

Currently, BenchmarkRunner scales the per snippet counters by
multiplying the raw counter values by the number of instructions (casted
to a double) divided by the minimum number of instructions. This is
incorrect for the loop repetition mode for snippets that don't fit a
whole number of times into the minimum instruction count. For example,
with 3 instructions in the snippet and the minimum number of
instructions set to 4, the loop repetitor will execute a total of six
instructions, but BenchmarkRunner will scale the raw count by 3/4
instead of 3/6=1/2. This will also be incorrect for the duplicate
snippet repetitor after #77224.

This patch fixes this behavior by dividing the raw count by the ceiling
of the number of repetitions divided by the instruction count.
parent 39739552
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment