[RISCV] Introduce the concept of DLEN(data path width) into getLMULCost.
authorCraig Topper <craig.topper@sifive.com>
Tue, 13 Jun 2023 23:09:25 +0000 (16:09 -0700)
committerCraig Topper <craig.topper@sifive.com>
Tue, 13 Jun 2023 23:09:25 +0000 (16:09 -0700)
commit6ac2ce7d844c30e818dc4ea100d96c165a465edc
treecd2eed50d07d6421425a3af8b9b00f6d42103764
parente669011c3cca4b7b4a1c2e8d96467cecbc05df4d
[RISCV] Introduce the concept of DLEN(data path width) into getLMULCost.

SiFive's x280 CPU has a vector unit that VLEN/2 bits wide. This
means that LMUL=1 operations take 2 to process all VLEN bits.

This patch adds a DLenFactor tuning parameter and applies it to
TuneSiFive7. getLMULCost has been updated to use this factor in
its calculations. I've added an x280 command line to one cost
model test to demonstrate the effect.

Reviewed By: arcbbb

Differential Revision: https://reviews.llvm.org/D152421
llvm/lib/Target/RISCV/RISCVFeatures.td
llvm/lib/Target/RISCV/RISCVProcessors.td
llvm/lib/Target/RISCV/RISCVSubtarget.h
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/RISCV/arith-int.ll