[PATCH] D79164: [CostModel] getCFInstrCost
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 10:14:28 PDT 2020
fhahn added a comment.
It seems like this introduces a 9% performance regression for libquantum from SPEC2006 on AArch64 with -O3 LTO & PGO. I think AArch64 uses the implementation from `TargetTransformInfoImpl.h`, which overestimates the cost of branches on bigger cores.
In D79164#2128516 <https://reviews.llvm.org/D79164#2128516>, @maxim-kuvyrkov wrote:
> Hi Sam,
> Linaro benchmarking CI flagged this patch as it regresses SPEC2k6's 462.libquantum by 10% at -O2, -O3 and "-O3 -flto" for aarch64-linux-gnu. Impact on other benchmarks is below 2%, which is within noise.
>
> For -O2 profile changes are:
> <benchmark, exe/symbol>, %time, %size, time1, time2, size1, size2
> 462.libquantum,libquantum_base.default ,111,101,9859,10962,33140,33428
> 462.libquantum,[.] quantum_toffoli ,113,125,5616,6360,320,400
> 462.libquantum,[.] quantum_sigma_x ,100,100,2498,2499,224,224
> 462.libquantum,[.] quantum_cnot ,130,135,1150,1495,288,388
>
> After this patch quantum_toffoli is 13% slower and 25% bigger, and quantum_cnot is 30% slower and 35% bigger.
>
> Would you please investigate this? Such big performance and code size regressions might expose a corner-case in your patch.
This should be fixed by 1ccc49924aeb <https://reviews.llvm.org/rG1ccc49924aeb7bb5fbd2eb956243d16db3a02b08>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79164/new/
https://reviews.llvm.org/D79164
More information about the llvm-commits
mailing list