[PATCH] D106277: [SVE] Remove the interface for getMaxVScale in favour of the IR attributes
Bradley Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 19 07:39:58 PDT 2021
bsmith added a reviewer: paulwalker-arm.
bsmith added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:505-506
+ } else if (getContext().getTargetInfo().hasFeature("sve")) {
+ CurFn->addFnAttr(
+ llvm::Attribute::getWithVScaleRangeArgs(getLLVMContext(), 0, 16));
}
----------------
Is this really what we want? Won't this enable fixed length codegen all of the time?
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:119-131
-Optional<unsigned> RISCVTTIImpl::getMaxVScale() const {
- // There is no assumption of the maximum vector length in V specification.
- // We use the value specified by users as the maximum vector length.
- // This function will use the assumed maximum vector length to get the
- // maximum vscale for LoopVectorizer.
- // If users do not specify the maximum vector length, we have no way to
- // know whether the LoopVectorizer is safe to do or not.
----------------
I'm not sure that RISCV have made a commitment to use the vscale_range attribute yet have they? In either case I think they should be involved in a change like this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106277/new/
https://reviews.llvm.org/D106277
More information about the llvm-commits
mailing list