Revision tags: llvmorg-21-init |
|
#
ac75d322 |
| 24-Jan-2025 |
vporpo <vporpodas@google.com> |
[SandboxVec][VecUtils] Filter out instructions not in BB in VecUtils:getLowest() (#124360)
This patch changes the functionality of `VecUtils::getLowest(Vals, BB)`
such that it filters out any instr
[SandboxVec][VecUtils] Filter out instructions not in BB in VecUtils:getLowest() (#124360)
This patch changes the functionality of `VecUtils::getLowest(Vals, BB)`
such that it filters out any instructions in `Vals` that are not in BB.
This is useful when Vals contains instructions from different BBs,
because in that case we are only interested in one BB.
show more ...
|
#
cff7ad56 |
| 24-Jan-2025 |
vporpo <vporpodas@google.com> |
[SandboxVec][Utils] Implement Utils::verifyFunction() (#124356)
This patch implements a wrapper function for the LLVM IR verifier for
functions, and calls it (flag-guarded) within the bottom-up-vec
[SandboxVec][Utils] Implement Utils::verifyFunction() (#124356)
This patch implements a wrapper function for the LLVM IR verifier for
functions, and calls it (flag-guarded) within the bottom-up-vectorizer
for finding IR bugs as soon as they happen.
show more ...
|
#
d2234ca1 |
| 24-Jan-2025 |
vporpo <vporpodas@google.com> |
[SandboxVec][BottomUpVec] Fix packing when PHIs are present (#124206)
Before this patch we might have emitted pack instructions in between PHI
nodes. This patch fixes it by fixing the insert point
[SandboxVec][BottomUpVec] Fix packing when PHIs are present (#124206)
Before this patch we might have emitted pack instructions in between PHI
nodes. This patch fixes it by fixing the insert point of the new packs.
show more ...
|
#
c7053ac2 |
| 23-Jan-2025 |
vporpo <vporpodas@google.com> |
[SandboxVec][BottomUpVec] Disable crossing BBs (#124039)
Crossing BBs is not currently supported by the structures of the
vectorizer. This patch fixes instances where this was happening,
including
[SandboxVec][BottomUpVec] Disable crossing BBs (#124039)
Crossing BBs is not currently supported by the structures of the
vectorizer. This patch fixes instances where this was happening,
including:
- a walk of use-def operands that updates the UnscheduledSuccs counter,
- the dead instruction removal is now done per BB,
- the scheduler, which will reject bundles that cross BBs.
show more ...
|
#
8110af75 |
| 23-Jan-2025 |
vporpo <vporpodas@google.com> |
[SandboxVec][BottomUpVec] Fix codegen when packing constants. (#124033)
Before this patch packing a bundle of constants would crash because
`getInsertPointAfterInstrs()` expected instructions. This
[SandboxVec][BottomUpVec] Fix codegen when packing constants. (#124033)
Before this patch packing a bundle of constants would crash because
`getInsertPointAfterInstrs()` expected instructions. This patch fixes
this.
show more ...
|
#
2dc1c955 |
| 23-Jan-2025 |
vporpo <vporpodas@google.com> |
[SandboxVec][VecUtils] Implement VecUtils::getLowest() (#124024)
VecUtils::getLowest(Valse) returns the lowest instruction in the BB among Vals.
If the instructions are not in the same BB, or if no
[SandboxVec][VecUtils] Implement VecUtils::getLowest() (#124024)
VecUtils::getLowest(Valse) returns the lowest instruction in the BB among Vals.
If the instructions are not in the same BB, or if none of them is an
instruction it returns nullptr.
show more ...
|
#
fd087135 |
| 22-Jan-2025 |
vporpo <vporpodas@google.com> |
[SandboxVec][Legality] Diamond reuse multi input (#123426)
This patch implements the diamond pattern where we are vectorizing
toward the top of the diamond from both edges, but the second edge may
[SandboxVec][Legality] Diamond reuse multi input (#123426)
This patch implements the diamond pattern where we are vectorizing
toward the top of the diamond from both edges, but the second edge may
use elements from a different vector or just scalar values. This
requires some additional packing code (see lit test).
show more ...
|
#
87e4b681 |
| 17-Jan-2025 |
vporpo <vporpodas@google.com> |
[SandboxVec][Legality] Implement ShuffleMask (#123404)
This patch implements a helper ShuffleMask data structure that helps
describe shuffles of elements across lanes.
|
#
d6315aff |
| 17-Jan-2025 |
vporpo <vporpodas@google.com> |
[SandboxVec][InstrMaps] EraseInstr callback (#123256)
This patch hooks up InstrMaps to the Sandbox IR callbacks such that it
gets updated when instructions get erased.
|
#
e902c696 |
| 16-Jan-2025 |
vporpo <vporpodas@google.com> |
[SandboxVec][BottomUpVec] Implement InstrMaps (#122848)
InstrMaps is a helper data structure that maps scalars to vectors and
the reverse. This is used by the vectorizer to figure out which vectors
[SandboxVec][BottomUpVec] Implement InstrMaps (#122848)
InstrMaps is a helper data structure that maps scalars to vectors and
the reverse. This is used by the vectorizer to figure out which vectors
it can extract scalar values from.
show more ...
|
Revision tags: llvmorg-19.1.7 |
|
#
7c51c310 |
| 14-Jan-2025 |
vporpo <vporpodas@google.com> |
[SandboxVec][BottomUpVec] Clean up dead address instrs (#122536)
When we vectorize loads or stores we only keep the address of the first
lane. The rest may become dead. This patch adds the address
[SandboxVec][BottomUpVec] Clean up dead address instrs (#122536)
When we vectorize loads or stores we only keep the address of the first
lane. The rest may become dead. This patch adds the address operands of
vectorized loads or stores to the dead candidates set, such that they
get erased if dead.
show more ...
|
#
6312beef |
| 09-Jan-2025 |
vporpo <vporpodas@google.com> |
[SandboxVec][BottomUpVec] Use SeedCollector and slice seeds (#120826)
With this patch we switch from the temporary dummy seeds to actual seeds
provided by the seed collector.
The seeds get sliced
[SandboxVec][BottomUpVec] Use SeedCollector and slice seeds (#120826)
With this patch we switch from the temporary dummy seeds to actual seeds
provided by the seed collector.
The seeds get sliced and each slice is used as the starting point for
vectorization.
show more ...
|
Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
1be98277 |
| 16-Nov-2024 |
vporpo <vporpodas@google.com> |
[SandboxVec][BottomUpVec] Implement packing of vectors (#116447)
Up until now we could only support packing of scalar elements. This
patch fixes this by implementing packing of vector elements, by
[SandboxVec][BottomUpVec] Implement packing of vectors (#116447)
Up until now we could only support packing of scalar elements. This
patch fixes this by implementing packing of vector elements, by
generating extractelement and insertelement instruction pairs.
show more ...
|
#
3be3b33e |
| 15-Nov-2024 |
vporpo <vporpodas@google.com> |
[SandboxVec][BottomUpVec] Implement pack of scalars (#115549)
This patch implements packing of scalar operands when the vectorizer
decides to stop vectorizing. Packing is implemented with a sequenc
[SandboxVec][BottomUpVec] Implement pack of scalars (#115549)
This patch implements packing of scalar operands when the vectorizer
decides to stop vectorizing. Packing is implemented with a sequence of
InsertElement instructions.
Packing vectors requires different instructions so it's implemented in a
follow-up patch.
show more ...
|
#
7dffc96a |
| 08-Nov-2024 |
vporpo <vporpodas@google.com> |
[SandboxVec][BottomUpVec] Clean up dead instructions (#115267)
When scalars get replaced by vectors the original scalars may become
dead. In that case erase them.
|
#
5942a99f |
| 06-Nov-2024 |
vporpo <vporpodas@google.com> |
[SandboxVec] Notify scheduler about new instructions (#115102)
This patch registers the "createInstr" callback that notifies the
scheduler about newly created instructions. This guarantees that all
[SandboxVec] Notify scheduler about new instructions (#115102)
This patch registers the "createInstr" callback that notifies the
scheduler about newly created instructions. This guarantees that all
newly created instructions have a corresponding DAG node associated with
them. Without this the pass crashes when the scheduler encounters the
newly created vector instructions.
This patch also changes the lifetime of the sandboxir Ctx variable in
the SandboxVectorizer pass. It needs to be destroyed after the passes
get destroyed. Without this change when components like the Scheduler
get destroyed Ctx will have already been freed, which is not legal.
show more ...
|
#
11b768af |
| 06-Nov-2024 |
Vasileios Porpodas <vporpodas@google.com> |
[SandboxVec][BottomUpVec] Fix bug in invalidation of analyses
This makes sure we don't preserve analyses when we modify the IR. This was causing errors in the EXPENSIVE_CHECKS build.
|
#
320389d4 |
| 06-Nov-2024 |
vporpo <vporpodas@google.com> |
[SandboxVec][BottomUpVec] Generate vector instructions (#115087)
This patch implements some very basic code generation, for some opcodes.
|
#
ce0d0858 |
| 05-Nov-2024 |
vporpo <vporpodas@google.com> |
[SandboxVec][Legality] Query the scheduler for legality (#114616)
This patch adds the legality check of whether the candidate instructions
can be scheduled together. This uses a Scheduler object.
|
#
083369fd |
| 01-Nov-2024 |
vporpo <vporpodas@google.com> |
[SandboxVec][Legality] Per opcode checks (#114145)
This patch adds more opcode-specific legality checks.
|
Revision tags: llvmorg-19.1.3 |
|
#
a461869d |
| 29-Oct-2024 |
vporpo <vporpodas@google.com> |
[SandboxIR][Pass] Implement Analyses class (#113962)
The Analyses class provides a way to pass around commonly used Analyses
to SandboxIR passes throught `runOnFunction()` and `runOnRegion()`
func
[SandboxIR][Pass] Implement Analyses class (#113962)
The Analyses class provides a way to pass around commonly used Analyses
to SandboxIR passes throught `runOnFunction()` and `runOnRegion()`
functions.
show more ...
|
#
1540f772 |
| 25-Oct-2024 |
Vasileios Porpodas <vporpodas@google.com> |
Reapply "[SandboxVec][Legality] Reject non-instructions (#113190)"
This reverts commit eb9f4756bc3daaa4b19f4f46521dc05180814de4.
|
#
eb9f4756 |
| 25-Oct-2024 |
Vasileios Porpodas <vporpodas@google.com> |
Revert "[SandboxVec][Legality] Reject non-instructions (#113190)"
This reverts commit 6c9bbbc818ae8a0d2849dbc1ebd84a220cc27d20.
|
#
6c9bbbc8 |
| 25-Oct-2024 |
vporpo <vporpodas@google.com> |
[SandboxVec][Legality] Reject non-instructions (#113190)
|
#
54c93aab |
| 21-Oct-2024 |
vporpo <vporpodas@google.com> |
[SandboxVec][Legality] Scaffolding for Legality (#112623)
This patch adds a LegalityResultWithReason class for describing the
reason why legality decided not to vectorize the code.
|