[all-commits] [llvm/llvm-project] c63b0f: [NFC][LoopVectorize] Make the createStepForVF inte...
david-arm via All-commits
all-commits at lists.llvm.org
Mon Nov 8 07:15:05 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c63b0f471ba91382eb9f888b20ef77fe178c2916
https://github.com/llvm/llvm-project/commit/c63b0f471ba91382eb9f888b20ef77fe178c2916
Author: David Sherwood <david.sherwood at arm.com>
Date: 2021-11-08 (Mon, 08 Nov 2021)
Changed paths:
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Log Message:
-----------
[NFC][LoopVectorize] Make the createStepForVF interface more caller-friendly
The common use case for calling createStepForVF is currently something
like:
Value *Step = createStepForVF(Builder, ConstantInt::get(Ty, UF), VF);
and it makes more sense to reduce overall lines of code and change the
function to let it create the constant instead. With my patch this
becomes:
Value *Step = createStepForVF(Builder, Ty, VF, UF);
and the ConstantInt is created instead createStepForVF. A side-effect of
this is that the code in createStepForVF is also becomes simpler.
As part of this patch I've also replaced some calls to getRuntimeVF
with calls to createStepForVF, i.e.
getRuntimeVF(Builder, Count->getType(), VFactor * UFactor) ->
createStepForVF(Builder, Count->getType(), VFactor, UFactor)
because this feels semantically better.
Differential Revision: https://reviews.llvm.org/D113122
More information about the All-commits
mailing list