[RISCV] Add target specific loop unrolling and peeling preferences
authorMichael Berg <michael.berg@sifive.com>
Tue, 7 Dec 2021 23:06:24 +0000 (15:06 -0800)
committerMichael Berg <michael.berg@sifive.com>
Tue, 7 Dec 2021 23:06:42 +0000 (15:06 -0800)
commit8487981a7249f7c080d5395ebee0e8b969c6f47c
tree50b819c62369f6e61c3c2064794fcfd4bea75815
parent6de698bf10996b532632bb9dfa9fd420c5af62af
[RISCV] Add target specific loop unrolling and peeling preferences

Both these preference helper functions have initial support with
this change. The loop unrolling preferences are set with initial
settings to control thresholds, size and attributes of loops to
unroll with some tuning done.  The peeling preferences may need
some tuning as well as the initial support looks much like what
other architectures utilize.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D113798
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
llvm/test/Transforms/LoopUnroll/RISCV/unroll.ll [new file with mode: 0644]