summaryrefslogtreecommitdiff
path: root/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/LegalityTest.cpp
AgeCommit message (Collapse)Author
2025-06-26TargetLibraryInfo: Delete default TargetLibraryInfoImpl constructor (#145826)Matt Arsenault
It should not be possible to construct one without a triple. It would also be nice to delete TargetLibraryInfoWrapperPass, but that is more difficult.
2025-02-20[SandboxVec][BottomUpVec] Separate vectorization decisions from code ↵vporpo
generation (#127727) Up until now the generation of vector instructions was taking place during the top-down post-order traversal of vectorizeRec(). The issue with this approach is that the vector instructions emitted during the traversal can be reordered by the scheduler, making it challenging to place them without breaking the def-before-uses rule. With this patch we separate the vectorization decisions (done in `vectorizeRec()`) from the code generation phase (`emitVectors()`). The vectorization decisions are stored in the `Actions` vector and are used by `emitVectors()` to drive code generation.
2025-02-03[SandboxVec][Legality] Fix legality of SelectInst (#125005)vporpo
SelectInsts need special treatment because they are not always straightforward to vectorize. This patch disables vectorization unless they are trivially vectorizable.
2025-01-29[SandboxVec][Legality] Don't vectorize when instructions repeat (#124479)vporpo
This patch adds a legality check that checks for repeated instrs in a bundle and won't vectorize if such pattern is found.
2025-01-24[SandboxVec][Legality] Pack from different BBs (#124363)vporpo
When the inputs of the pack come from different BBs we need to make sure we emit the pack instructions at the correct place.
2025-01-17[SandboxVec][Legality] Implement ShuffleMask (#123404)vporpo
This patch implements a helper ShuffleMask data structure that helps describe shuffles of elements across lanes.
2025-01-17[SandboxVec][InstrMaps] EraseInstr callback (#123256)vporpo
This patch hooks up InstrMaps to the Sandbox IR callbacks such that it gets updated when instructions get erased.
2025-01-16[SandboxVec][BottomUpVec] Implement InstrMaps (#122848)vporpo
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.
2024-11-06[SandboxVec] Notify scheduler about new instructions (#115102)vporpo
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.
2024-11-05[SandboxVec][Legality] Query the scheduler for legality (#114616)vporpo
This patch adds the legality check of whether the candidate instructions can be scheduled together. This uses a Scheduler object.
2024-11-01[SandboxVec][Legality] Per opcode checks (#114145)vporpo
This patch adds more opcode-specific legality checks.
2024-10-29[SandboxVec][Legality] Check wrap flags (#113975)vporpo
2024-10-28[SandboxVec][Legality] Check Fastmath flags (#113967)vporpo
2024-10-28[SandboxVec][Legality] Check opcodes and types (#113741)vporpo
2024-10-25Reapply "[SandboxVec][Legality] Reject non-instructions (#113190)"Vasileios Porpodas
This reverts commit eb9f4756bc3daaa4b19f4f46521dc05180814de4.
2024-10-25Revert "[SandboxVec][Legality] Reject non-instructions (#113190)"Vasileios Porpodas
This reverts commit 6c9bbbc818ae8a0d2849dbc1ebd84a220cc27d20.
2024-10-25[SandboxVec][Legality] Reject non-instructions (#113190)vporpo
2024-10-21[SandboxVec][Legality] Scaffolding for Legality (#112623)vporpo
This patch adds a LegalityResultWithReason class for describing the reason why legality decided not to vectorize the code.
2024-09-30[SandboxIR][NFC] Move Function class to a separate file (#110526)vporpo
2024-09-27[SandboxIR][NFC] Move Instruction classes into a separate file (#110294)vporpo
2024-09-17[SandboxVec] Legality boilerplate (#108650)vporpo
This patch adds the basic API for the Legality component of the vectorizer. It also adds some very basic code in the bottom-up vectorizer that uses the API.