[all-commits] [llvm/llvm-project] 20835c: [TTI] Refactor emitGetActiveLaneMask
sjoerdmeijer via All-commits
all-commits at lists.llvm.org
Wed Jun 17 01:54:54 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 20835cff272e2096a57aa5de53f6923f24a42049
https://github.com/llvm/llvm-project/commit/20835cff272e2096a57aa5de53f6923f24a42049
Author: Sjoerd Meijer <sjoerd.meijer at arm.com>
Date: 2020-06-17 (Wed, 17 Jun 2020)
Changed paths:
M llvm/include/llvm/Analysis/TargetTransformInfo.h
M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
M llvm/include/llvm/CodeGen/BasicTTIImpl.h
M llvm/lib/Analysis/TargetTransformInfo.cpp
M llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
M llvm/lib/Target/ARM/ARMTargetTransformInfo.h
Log Message:
-----------
[TTI] Refactor emitGetActiveLaneMask
Refactor TTI hook emitGetActiveLaneMask and remove the unused arguments
as suggested in D79100.
Commit: 47650451738c821993c763356854b560a0f9f550
https://github.com/llvm/llvm-project/commit/47650451738c821993c763356854b560a0f9f550
Author: Sjoerd Meijer <sjoerd.meijer at arm.com>
Date: 2020-06-17 (Wed, 17 Jun 2020)
Changed paths:
M llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
M llvm/lib/Transforms/Vectorize/VPlan.cpp
M llvm/lib/Transforms/Vectorize/VPlan.h
M llvm/test/Transforms/LoopVectorize/ARM/prefer-tail-loop-folding.ll
M llvm/test/Transforms/LoopVectorize/ARM/tail-folding-counting-down.ll
M llvm/test/Transforms/LoopVectorize/ARM/tail-loop-folding.ll
Log Message:
-----------
[LV] Emit @llvm.get.active.mask for tail-folded loops
This emits new IR intrinsic @llvm.get.active.mask for tail-folded vectorised
loops if the intrinsic is supported by the backend, which is checked by
querying TargetTransform hook emitGetActiveLaneMask.
This intrinsic creates a mask representing active and inactive vector lanes,
which is used by the masked load/store instructions that are created for
tail-folded loops. The semantics of @llvm.get.active.mask are described here in
LangRef:
https://llvm.org/docs/LangRef.html#llvm-get-active-lane-mask-intrinsics
This intrinsic is also used to provide a hint to the backend. That is, the
second argument of the intrinsic represents the back-edge taken count of the
loop. For MVE, for example, we use that to set up tail-predication, which is a
new form of predication in MVE for vector loops that implicitely predicates the
last vector loop iteration by implicitely setting active/inactive lanes, i.e.
the tail loop is predicated. In order to set up a tail-predicated vector loop,
we need to know the number of data elements processed by the vector loop, which
corresponds the the tripcount of the scalar loop, which we can now reconstruct
using @llvm.get.active.mask.
Differential Revision: https://reviews.llvm.org/D79100
Compare: https://github.com/llvm/llvm-project/compare/3847737fa489...47650451738c
More information about the All-commits
mailing list