aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/Binary.cpp
diff options
context:
space:
mode:
authorAiden Grossman <agrossman154@yahoo.com>2024-01-16 11:49:17 -0800
committerGitHub <noreply@github.com>2024-01-16 11:49:17 -0800
commit16b238798250cb16ac78c710958b353cb45b11a0 (patch)
tree585b1e57f756a01a0c1147a0d7b16acb112db573 /llvm/lib/Object/Binary.cpp
parent3973955282121cf97fb3b77c4bac0a89dcf82591 (diff)
downloadllvm-16b238798250cb16ac78c710958b353cb45b11a0.zip
llvm-16b238798250cb16ac78c710958b353cb45b11a0.tar.gz
llvm-16b238798250cb16ac78c710958b353cb45b11a0.tar.bz2
[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.
Diffstat (limited to 'llvm/lib/Object/Binary.cpp')
0 files changed, 0 insertions, 0 deletions