[llvm] [RISCV][CostModel] Add getCFInstrCost RISC-V implementation (PR #65599)
Sergey Kachkov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 7 08:55:06 PDT 2023
skachkov-sc wrote:
Changes for SPECInt2006:
```
Program loop-vectorize.LoopsVectorized
before after diff
test-suite :: External/SPEC/CINT2006/401.bzip2/401.bzip2.test 28.00 28.00 0.0%
test-suite :: External/SPEC/CINT2006/456.hmmer/456.hmmer.test 80.00 80.00 0.0%
test-suite :: External/SPEC/CINT2006/458.sjeng/458.sjeng.test 5.00 5.00 0.0%
test-suite :: External/SPEC/CINT2006/462.libquantum/462.libquantum.test 16.00 16.00 0.0%
test-suite :: External/SPEC/CINT2006/471.omnetpp/471.omnetpp.test 14.00 14.00 0.0%
test-suite :: External/SPEC/CINT2006/473.astar/473.astar.test 22.00 22.00 0.0%
test-suite :: External/SPEC/CINT2006/483.xalancbmk/483.xalancbmk.test 193.00 193.00 0.0%
test-suite :: External/SPEC/CINT2006/464.h264ref/464.h264ref.test 287.00 285.00 -0.7%
test-suite :: External/SPEC/CINT2006/445.gobmk/445.gobmk.test 115.00 114.00 -0.9%
test-suite :: External/SPEC/CINT2006/403.gcc/403.gcc.test 183.00 178.00 -2.7%
test-suite :: External/SPEC/CINT2006/400.perlbench/400.perlbench.test 82.00 74.00 -9.8%
test-suite :: External/SPEC/CINT2006/429.mcf/429.mcf.test 11.00 9.00 -18.2%
```
Example of loop in 429.mcf that is not vectorized now (looks indeed not very profitable):
```
for( arc = net->arcs; arc != (arc_t *)stop; arc++ )
{
if( arc->flow )
{
if( !(arc->tail->number < 0 && arc->head->number > 0) )
{
if( !arc->tail->number )
{
operational_cost += (arc->cost - net->bigM);
fleet++;
}
else
operational_cost += arc->cost;
}
}
}
```
https://github.com/llvm/llvm-project/pull/65599
More information about the llvm-commits
mailing list