#
a7fda0e1 |
| 03-Dec-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Introduce VPScalarPHIRecipe, use for can & EVL IV codegen (NFC). (#114305)
Introduce a general recipe to generate a scalar phi. Lower
VPCanonicalIVPHIRecipe and VPEVLBasedIVRecipe to VPScal
[VPlan] Introduce VPScalarPHIRecipe, use for can & EVL IV codegen (NFC). (#114305)
Introduce a general recipe to generate a scalar phi. Lower
VPCanonicalIVPHIRecipe and VPEVLBasedIVRecipe to VPScalarIVPHIrecipe
before plan execution, avoiding the need for duplicated ::execute
implementations. There are other cases that could benefit, including
in-loop reduction phis and pointer induction phis.
Builds on a similar idea as
https://github.com/llvm/llvm-project/pull/82270.
PR: https://github.com/llvm/llvm-project/pull/114305
show more ...
|
Revision tags: llvmorg-19.1.5 |
|
#
0dbdc6dc |
| 24-Nov-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Simplify code to re-use existing basic blocks (NFCI).
Restructure and slightly simplify code to re-use existing basic blocks.
|
#
8663b877 |
| 21-Nov-2024 |
Finn Plummer <50529406+inbelic@users.noreply.github.com> |
[NFC][VectorUtils][TargetTransformInfo] Add `isVectorIntrinsicWithOverloadTypeAtArg` api (#114849)
This changes allows target intrinsics to specify and overwrite overloaded types.
- Updates `Repl
[NFC][VectorUtils][TargetTransformInfo] Add `isVectorIntrinsicWithOverloadTypeAtArg` api (#114849)
This changes allows target intrinsics to specify and overwrite overloaded types.
- Updates `ReplaceWithVecLib` to not provide TTI as there most probably won't be a use-case
- Updates `SLPVectorizer` to use available TTI
- Updates `VPTransformState` to pass down TTI
- Updates `VPlanRecipe` to use passed-down TTI
This change will let us add scalarization for `asdouble`: #114847
show more ...
|
Revision tags: llvmorg-19.1.4 |
|
#
a5a1612d |
| 10-Nov-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Consistently use DEBUG_TYPE loop-vectorize.
This ensures debug messages in VPlan.cpp are included in the commonly used -debug-only=loop-vectorize.
|
#
8a7a7b5f |
| 08-Nov-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Remove unneeded code connecting blocks in VPBB:splitAt (NFC).
insertBlockAfter already takes care of transferring successors. Remove unneeded code to transfer them manually.
|
#
596fd103 |
| 04-Nov-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Share logic to connect predecessors in VPBB/VPIRBB execute (NFC)
This moves the common logic to connect IRBBs created for a VPBB to their predecessors in the VPlan CFG, making it easier to k
[VPlan] Share logic to connect predecessors in VPBB/VPIRBB execute (NFC)
This moves the common logic to connect IRBBs created for a VPBB to their predecessors in the VPlan CFG, making it easier to keep in sync in the future.
show more ...
|
#
aa825b74 |
| 03-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[Vectorize] Remove unused includes (NFC) (#114643)
Identified with misc-include-cleaner.
|
#
4ed7bcb4 |
| 01-Nov-2024 |
David Sherwood <david.sherwood@arm.com> |
[VPlan][NFC] Add new getMiddleBlock interface to VPlan (#113558)
This work is in preparation for PRs #112138 and #88385 where
the middle block is not guaranteed to be the immediate successor
to th
[VPlan][NFC] Add new getMiddleBlock interface to VPlan (#113558)
This work is in preparation for PRs #112138 and #88385 where
the middle block is not guaranteed to be the immediate successor
to the region block. I've simply add new getMiddleBlock()
interfaces to VPlan that for now just return
cast<VPBasicBlock>(VectorRegion->getSingleSuccessor())
Once PR #112138 lands we'll need to do more work to discover
the middle block.
show more ...
|
#
3b4c45e4 |
| 31-Oct-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Fix long comment added in b021464d35ca (NFC).
Fix formatting of comment added in b021464d35ca.
|
#
b021464d |
| 31-Oct-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Introduce scalar loop header in plan, remove VPLiveOut. (#109975)
Update VPlan to include the scalar loop header. This allows retiring
VPLiveOut, as the remaining live-outs can now be handl
[VPlan] Introduce scalar loop header in plan, remove VPLiveOut. (#109975)
Update VPlan to include the scalar loop header. This allows retiring
VPLiveOut, as the remaining live-outs can now be handled by adding
operands to the wrapped phis in the scalar loop header.
Note that the current version only includes the scalar loop header, no
other loop blocks and also does not wrap it in a region block.
PR: https://github.com/llvm/llvm-project/pull/109975
show more ...
|
Revision tags: llvmorg-19.1.3 |
|
#
7fe149cd |
| 27-Oct-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Replace getIRBasicBlock with IRBB in VPIRBB::execute (NFC).
Suggested in https://github.com/llvm/llvm-project/pull/109975. This makes the function consistent throughout.
|
#
ef217a0f |
| 24-Oct-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Introduce and use getVectorPreheader (NFC).
Introduce a dedicated function to retrieve the vector preheader. This ensures the correct block is used, even if the skeleton is exetended.
|
#
1d9b3222 |
| 22-Oct-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Implement VPWidenSelectRecipe::computeCost.
Implement VPlan-based cost computation for VPWidenSelectRecipe.
|
#
b4970108 |
| 18-Oct-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Use VPInstruction::Name when assigning names (NFCI).
This slightly improves the printing of VPInstructions. NFC except debug output.
|
#
175461a2 |
| 15-Oct-2024 |
David Sherwood <david.sherwood@arm.com> |
[NFC][LoopVectorize] Make replaceVPBBWithIRVPBB more efficient (#111514)
In replaceVPBBWithIRVPBB we spend time erasing and appending
predecessors and successors from a list, when all we really hav
[NFC][LoopVectorize] Make replaceVPBBWithIRVPBB more efficient (#111514)
In replaceVPBBWithIRVPBB we spend time erasing and appending
predecessors and successors from a list, when all we really have to do
is replace the old with the new. Not only is this more efficient, but it
also preserves the ordering of successors and predecessors. This is
something which may become important for vectorising early exit loops
(see PR #88385), since a VPIRInstruction is the wrapper for a live-out
phi with extra operands that map to the incoming block according to the
block's predecessor.
show more ...
|
Revision tags: llvmorg-19.1.2 |
|
#
0b240319 |
| 02-Oct-2024 |
David Sherwood <david.sherwood@arm.com> |
[LoopVectorize] In LoopVectorize.cpp start using getSymbolicMaxBackedgeTakenCount (#108833)
LoopVectorizationLegality currently only treats a loop as legal to vectorise
if PredicatedScalarEvolution
[LoopVectorize] In LoopVectorize.cpp start using getSymbolicMaxBackedgeTakenCount (#108833)
LoopVectorizationLegality currently only treats a loop as legal to vectorise
if PredicatedScalarEvolution::getBackedgeTakenCount returns a valid
SCEV, or more precisely that the loop must have an exact backedge taken
count. Therefore, in LoopVectorize.cpp we can safely replace all calls to
getBackedgeTakenCount with calls to getSymbolicMaxBackedgeTakenCount,
since the result is the same.
This also helps prepare the loop vectoriser for PR #88385.
show more ...
|
Revision tags: llvmorg-19.1.1 |
|
#
725eb6bb |
| 30-Sep-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Move createVPIRBasicBlock helper to VPIRBasicBlock (NFC).
Move the helper to VPIRBasicBlock to allow easier re-use outside VPlan.cpp
|
#
aae7ac66 |
| 25-Sep-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Remove VPIteration, update to use directly VPLane instead (NFC)
After 8ec406757cb92 (https://github.com/llvm/llvm-project/pull/95842), only the lane part of VPIteration is used.
Simplify th
[VPlan] Remove VPIteration, update to use directly VPLane instead (NFC)
After 8ec406757cb92 (https://github.com/llvm/llvm-project/pull/95842), only the lane part of VPIteration is used.
Simplify the code by replacing remaining uses of VPIteration with VPLane directly.
show more ...
|
#
3fbf6f8b |
| 24-Sep-2024 |
Florian Hahn <flo@fhahn.com> |
[LV] Remove more references of unrolled parts after 57f5d8f2fe.
Continue to clean up some now stale references of unroll parts and related terminology as pointed out post-commit for 06c3a7d.
|
#
f76dae15 |
| 23-Sep-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Only store single scalar array per VPValue in VPTransState (NFC)
After 8ec406757cb92 (https://github.com/llvm/llvm-project/pull/95842), VPTransformState only stores a single scalar vector pe
[VPlan] Only store single scalar array per VPValue in VPTransState (NFC)
After 8ec406757cb92 (https://github.com/llvm/llvm-project/pull/95842), VPTransformState only stores a single scalar vector per VPValue.
Simplify the code by replacing the nested SmallVector in PerPartScalars with a single SmallVector and rename to VPV2Scalars for clarity.
show more ...
|
#
57f5d8f2 |
| 23-Sep-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Only store single vector per VPValue in VPTransformState. (NFC)
After 8ec406757cb92 (https://github.com/llvm/llvm-project/pull/95842), VPTransformState only stores a single vector value per
[VPlan] Only store single vector per VPValue in VPTransformState. (NFC)
After 8ec406757cb92 (https://github.com/llvm/llvm-project/pull/95842), VPTransformState only stores a single vector value per VPValue.
Simplify the code by replacing the SmallVector in PerPartOutput with a single Value * and rename to VPV2Vector for clarity.
Also remove the redundant Part argument from various accessors.
show more ...
|
#
06c3a7d2 |
| 22-Sep-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Remove unneeded State.UF after 8ec406757cb92 (NFC).
State.UF is not needed any longer after 8ec406757cb92 (https://github.com/llvm/llvm-project/pull/95842). Clean it up, simplifying ::execut
[VPlan] Remove unneeded State.UF after 8ec406757cb92 (NFC).
State.UF is not needed any longer after 8ec406757cb92 (https://github.com/llvm/llvm-project/pull/95842). Clean it up, simplifying ::execute of existing recipes.
show more ...
|
#
8ec40675 |
| 21-Sep-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Implement unrolling as VPlan-to-VPlan transform. (#95842)
This patch implements explicit unrolling by UF as VPlan transform. In
follow up patches this will allow simplifying VPTransform st
[VPlan] Implement unrolling as VPlan-to-VPlan transform. (#95842)
This patch implements explicit unrolling by UF as VPlan transform. In
follow up patches this will allow simplifying VPTransform state (no need
to store unrolled parts) as well as recipe execution (no need to
generate code for multiple parts in an each recipe). It also allows for
more general optimziations (e.g. avoid generating code for recipes that
are uniform-across parts).
It also unifies the logic dealing with unrolled parts in a single place,
rather than spreading it out across multiple places (e.g. VPlan post
processing for header-phi recipes previously.)
In the initial implementation, a number of recipes still take the
unrolled part as additional, optional argument, if their execution
depends on the unrolled part.
The computation for start/step values for scalable inductions changed
slightly. Previously the step would be computed as scalar and then
splatted, now vscale gets splatted and multiplied by the step in a
vector mul.
This has been split off https://github.com/llvm/llvm-project/pull/94339
which also includes changes to simplify VPTransfomState and recipes'
::execute.
The current version mostly leaves existing ::execute untouched and
instead sets VPTransfomState::UF to 1.
A follow-up patch will clean up all references to VPTransformState::UF.
Another follow-up patch will simplify VPTransformState to only store a
single vector value per VPValue.
PR: https://github.com/llvm/llvm-project/pull/95842
show more ...
|
#
4eb98384 |
| 20-Sep-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Generalize VPValue::isDefinedOutsideLoopRegions.
Update isDefinedOutsideLoopRegions to check if a recipe is defined outside any region. Split off already approved https://github.com/llvm/llv
[VPlan] Generalize VPValue::isDefinedOutsideLoopRegions.
Update isDefinedOutsideLoopRegions to check if a recipe is defined outside any region. Split off already approved https://github.com/llvm/llvm-project/pull/95842 now that this can be tested separately after landing VPlan-based LICM https://github.com/llvm/llvm-project/issues/107501
show more ...
|
#
25610048 |
| 19-Sep-2024 |
Florian Hahn <flo@fhahn.com> |
[VPlan] Rename isDefinedOutside[Vector]Regions -> [Loop] (NFC)
Clarify name of helper, split off from https://github.com/llvm/llvm-project/pull/95842/files#r1765556732.
|