#
ec26c9cd |
| 01-Mar-2023 |
Luke Lau <luke@igalia.com> |
[RISCV] Lower fixed length interleaved accesses via vssegN/vlsegN
This enables the interleaved access pass on O1 and above, and causes interleaving/deinterleaving shuffles of fixed length vectors wi
[RISCV] Lower fixed length interleaved accesses via vssegN/vlsegN
This enables the interleaved access pass on O1 and above, and causes interleaving/deinterleaving shuffles of fixed length vectors with stores/loads to be lowered into vssegN/vlsegN.
We need to be careful and make sure that we only lower vsseg/vlseg whenever we know the fixed vector type will fit within the minimum vlen, and that the interleaving factor is supported for the given LMUL.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D145085
show more ...
|
#
80f3be96 |
| 02-Apr-2023 |
Luke Lau <luke@igalia.com> |
Revert "[RISCV] Lower fixed length interleaved accesses via vssegN/vlsegN"
This reverts commit b95913e8c3a3521b85d689a358e620d89a4e83de.
|
#
b95913e8 |
| 01-Mar-2023 |
Luke Lau <luke@igalia.com> |
[RISCV] Lower fixed length interleaved accesses via vssegN/vlsegN
This enables the interleaved access pass on O1 and above, and causes interleaving/deinterleaving shuffles of fixed length vectors wi
[RISCV] Lower fixed length interleaved accesses via vssegN/vlsegN
This enables the interleaved access pass on O1 and above, and causes interleaving/deinterleaving shuffles of fixed length vectors with stores/loads to be lowered into vssegN/vlsegN.
We need to be careful and make sure that we only lower vsseg/vlseg whenever we know the fixed vector type will fit within the minimum vlen, and that the interleaving factor is supported for the given LMUL.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D145085
show more ...
|
#
4c10a612 |
| 29-Mar-2023 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Merge SExtWRemoval and StripWSuffix into a single pass.
These run together in the pipeline and are the only users of TII.hasAllWUsers. Merging them will allow us to move hasAllWUsers back fr
[RISCV] Merge SExtWRemoval and StripWSuffix into a single pass.
These run together in the pipeline and are the only users of TII.hasAllWUsers. Merging them will allow us to move hasAllWUsers back from TII.
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D147173
show more ...
|
#
0f4c9c01 |
| 27-Mar-2023 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Replace RISCV->RISC-V in strings.
To be consistent with RISC-V branding guidelines https://riscv.org/about/risc-v-branding-guidelines/ Think we should be using RISC-V where possible.
D14644
[RISCV] Replace RISCV->RISC-V in strings.
To be consistent with RISC-V branding guidelines https://riscv.org/about/risc-v-branding-guidelines/ Think we should be using RISC-V where possible.
D146449 already updated comments. Strings may have more user impact.
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D146451
show more ...
|
#
29463612 |
| 27-Mar-2023 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Replace RISCV -> RISC-V in comments. NFC
To be consistent with RISC-V branding guidelines https://riscv.org/about/risc-v-branding-guidelines/ Think we should be using RISC-V where possible.
[RISCV] Replace RISCV -> RISC-V in comments. NFC
To be consistent with RISC-V branding guidelines https://riscv.org/about/risc-v-branding-guidelines/ Think we should be using RISC-V where possible.
More patches will follow.
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D146449
show more ...
|
#
084e4138 |
| 14-Mar-2023 |
Alex Bradbury <asb@igalia.com> |
[RISCV] Fix regression due to interaction of MachineOutliner and MachineCopyPropagation
D144535 enabled machine copy propagation for RISC-V and added it to the pass pipeline in addPreEmitPass2 (afte
[RISCV] Fix regression due to interaction of MachineOutliner and MachineCopyPropagation
D144535 enabled machine copy propagation for RISC-V and added it to the pass pipeline in addPreEmitPass2 (after the MachineOutliner). Unfortunately, the MachineCopyPropagation pass is unable to correctly analyse outlined functions, and will delete copy instructions where a register is set that is intended to be live-out. RISCVInstrInfo::buildOutlinedFrame will directly insert a JALR, while a similar function going through the normal codegen path would have a PseudoRet with operands indicating registers that are live-out.
This patch does the simplest fix, which is to run MachineCopyPropagation before the MachineOutliner.
Differential Revision: https://reviews.llvm.org/D146037
show more ...
|
#
5fdab3c8 |
| 07-Mar-2023 |
wangpc <pc.wang@linux.alibaba.com> |
[RISCV] Enable machine copy propagation for copy-like instructions
Like what has been done in AArch64 (D125335).
We enable this under `-O2` to show the codegen diffs here but we may only do this un
[RISCV] Enable machine copy propagation for copy-like instructions
Like what has been done in AArch64 (D125335).
We enable this under `-O2` to show the codegen diffs here but we may only do this under `-O3` like AArch64.
There are two cases that we may produce these eliminable copies: 1. ISel of `FrameIndex`. Like `rvv/fixed-vectors-calling-conv.ll`. 2. Tail duplication. Like `select-optimize-multiple.ll`.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D144535
show more ...
|
#
fa6aadd6 |
| 01-Mar-2023 |
Leonard Chan <leonardchan@google.com> |
[llvm] Prevent building for riscv32-unknown-fuchsia
Fuchsia is exclusively 64-bit so this throw an error when using this triple.
Differential Revision: https://reviews.llvm.org/D144998
|
#
3b8c0b34 |
| 22-Feb-2023 |
Piyou Chen <piyou.chen@sifive.com> |
[RISCV] Add new pass to transform undef to pseudo for vector values.
RISC-V vector instruction has register overlapping constraint for certain instructions, and will cause illegal instruction trap i
[RISCV] Add new pass to transform undef to pseudo for vector values.
RISC-V vector instruction has register overlapping constraint for certain instructions, and will cause illegal instruction trap if violated, we use early clobber to model this constraint, but it can't prevent register allocator allocated same or overlapped if the input register is undef value, so convert IMPLICIT_DEF to temporary pseudo could prevent that happen, it's not best way to resolve this. Ideally we should model the constraint right, but before we model the constraint right, it's the approach to prevent that happen.
See also: https://github.com/llvm/llvm-project/issues/50157
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D129735
show more ...
|
#
6f3e6a76 |
| 15-Feb-2023 |
Fangrui Song <i@maskray.me> |
Revert D129735 "[RISCV] Add new pass to transform undef to pseudo for vector values."
This reverts commit f1c4241fb6e50c507adafbe14faf82a755ab92ca.
It causes use-after-poison asan failures for Code
Revert D129735 "[RISCV] Add new pass to transform undef to pseudo for vector values."
This reverts commit f1c4241fb6e50c507adafbe14faf82a755ab92ca.
It causes use-after-poison asan failures for CodeGen/RISCV/rvv/undef-earlyclobber-chain.ll and CodeGen/RISCV/regalloc-last-chance-recoloring-failure.ll
show more ...
|
#
f1c4241f |
| 15-Feb-2023 |
Piyou Chen <piyou.chen@sifive.com> |
[RISCV] Add new pass to transform undef to pseudo for vector values.
RISC-V vector instruction has register overlapping constraint for certain instructions, and will cause illegal instruction trap i
[RISCV] Add new pass to transform undef to pseudo for vector values.
RISC-V vector instruction has register overlapping constraint for certain instructions, and will cause illegal instruction trap if violated, we use early clobber to model this constraint, but it can't prevent register allocator allocated same or overlapped if the input register is undef value, so convert IMPLICIT_DEF to temporary pseudo could prevent that happen, it's not best way to resolve this. Ideally we should model the constraint right, but before we model the constraint right, it's the approach to prevent that happen.
See also: https://github.com/llvm/llvm-project/issues/50157
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D129735
show more ...
|
#
2dd221fe |
| 06-Feb-2023 |
Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> |
Remove no longer needed includes of LegacyPassManager.h
Most of the removed includes should probably have been removed already when we removed TargetMachine::adjustPassManager.
|
#
f20b5071 |
| 28-Jan-2023 |
Kazu Hirata <kazu@google.com> |
[llvm] Use llvm::bit_floor instead of llvm::PowerOf2Floor (NFC)
|
Revision tags: llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
e5a71a41 |
| 06-Jan-2023 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Add support for the vscale_range attribute.
This is based on @frasercrmck's D107290. At least some of the clang portion of D107290 has already been committed.
This uses vscale_range for min
[RISCV] Add support for the vscale_range attribute.
This is based on @frasercrmck's D107290. At least some of the clang portion of D107290 has already been committed.
This uses vscale_range for min/max vector width unless the command line overrides are used.
As a follow up, I plan to add a max or exact VLEN option to clang to control the vscale_range. This will eliminate many of the reasons for users to use the overrides through the -mllvm interface.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D139873
show more ...
|
#
d64d3c5a |
| 22-Dec-2022 |
Nitin John Raj <nitin.raj@sifive.com> |
[RISCV] Add pass to remove W suffix from ADDIW and SLLIW to improve compressibility
SLLI and ADD are more compressible than SLLIW and ADDW. SLLI/ADD both have a 5-bit register encoding. SLLIW/ADDW h
[RISCV] Add pass to remove W suffix from ADDIW and SLLIW to improve compressibility
SLLI and ADD are more compressible than SLLIW and ADDW. SLLI/ADD both have a 5-bit register encoding. SLLIW/ADDW have a 3-bit register encoding. They both require the dest to also be one of the sources.
We aggressively form ADDW/SLLIW as it helps hasAllWBitUsers in RISCVISelDAGToDAG to not require recursion. So we need a pass to remove excessive -w suffixes.
Differential Revision: https://reviews.llvm.org/D139948
show more ...
|
#
19a004b4 |
| 21-Dec-2022 |
Nick Desaulniers <ndesaulniers@google.com> |
[llvm][SelectionDAGISel] support -{start|stop}-{before|after}= for remaining targets
Follow up to the series: 1. https://reviews.llvm.org/D140161 2. https://reviews.llvm.org/D140349 3. https://revie
[llvm][SelectionDAGISel] support -{start|stop}-{before|after}= for remaining targets
Follow up to the series: 1. https://reviews.llvm.org/D140161 2. https://reviews.llvm.org/D140349 3. https://reviews.llvm.org/D140331 4. https://reviews.llvm.org/D140323
Completes the work from the previous two for remaining targets.
This creates the following named passes that can be run via `llc -{start|stop}-{before|after}`: - arc-isel - arm-isel - avr-isel - bpf-isel - csky-isel - hexagon-isel - lanai-isel - loongarch-isel - m68k-isel - msp430-isel - mips-isel - nvptx-isel - ppc-codegen - riscv-isel - sparc-isel - systemz-isel - ve-isel - wasm-isel - xcore-isel
A nice way to write tests for SelectionDAGISel might be to use a RUN: line like: llc -mtriple=<triple> -start-before=<arch>-isel -stop-after=finalize-isel -o -
Fixes: https://github.com/llvm/llvm-project/issues/59538
Reviewed By: asb, zixuan-wu
Differential Revision: https://reviews.llvm.org/D140364
show more ...
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
#
69e75ae6 |
| 18-Jun-2020 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
CodeGen: Don't lazily construct MachineFunctionInfo
This fixes what I consider to be an API flaw I've tripped over multiple times. The point this is constructed isn't well defined, so depending on w
CodeGen: Don't lazily construct MachineFunctionInfo
This fixes what I consider to be an API flaw I've tripped over multiple times. The point this is constructed isn't well defined, so depending on where this is first called, you can conclude different information based on the MachineFunction. For example, the AMDGPU implementation inspected the MachineFrameInfo on construction for the stack objects and if the frame has calls. This kind of worked in SelectionDAG which visited all allocas up front, but broke in GlobalISel which hasn't visited any of the IR when arguments are lowered.
I've run into similar problems before with the MIR parser and trying to make use of other MachineFunction fields, so I think it's best to just categorically disallow dependency on the MachineFunction state in the constructor and to always construct this at the same time as the MachineFunction itself.
A missing feature I still could use is a way to access an custom analysis pass on the IR here.
show more ...
|
#
011cbb39 |
| 20-Dec-2022 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Move -riscv-v-vector-bits-max/min options to RISCVTargetMachine.
Split from D139873.
Reviewed By: reames, kito-cheng
Differential Revision: https://reviews.llvm.org/D140283
|
#
f8c68122 |
| 12-Dec-2022 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Enable the Machine Late Cleanup pass.
Believe the bug has been fixed with D139169
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D139753
|
#
5ecd3632 |
| 05-Dec-2022 |
Jonas Paulsson <paulsson@linux.vnet.ibm.com> |
Reapply "[CodeGen] Add new pass for late cleanup of redundant definitions."
This reverts commit 122efef8ee9be57055d204d52c38700fe933c033.
- Patch fixed to not reuse definitions from predecessors in
Reapply "[CodeGen] Add new pass for late cleanup of redundant definitions."
This reverts commit 122efef8ee9be57055d204d52c38700fe933c033.
- Patch fixed to not reuse definitions from predecessors in EH landing pads. - Late review suggestions (by MaskRay) have been addressed. - M68k/pipeline.ll test updated. - Init captures added in processBlock() to avoid capturing structured bindings. - RISCV has this disabled for now.
Original commit message:
A new pass MachineLateInstrsCleanup is added to be run after PEI.
This is a simple pass that removes redundant and identical instructions whenever found by scanning the MF once while keeping track of register definitions in a map. These instructions are typically immediate loads resulting from rematerialization, and address loads emitted by target in eliminateFrameInde().
This is enabled by default, but a target could easily disable it by means of 'disablePass(&MachineLateInstrsCleanupID);'.
This late cleanup is naturally not "optimal" in removing instructions as it is done by looking at phys-regs, but still quite effective. It would be desirable to improve other parts of CodeGen and avoid these redundant instructions in the first place, but there are no ideas for this yet.
Differential Revision: https://reviews.llvm.org/D123394
Reviewed By: RKSimon, foad, craig.topper, arsenm, asb
show more ...
|
#
122efef8 |
| 04-Dec-2022 |
Jonas Paulsson <paulsson@linux.vnet.ibm.com> |
Revert "Reapply "[CodeGen] Add new pass for late cleanup of redundant definitions.""
This reverts commit 17db0de330f943833296ae72e26fa988bba39cb3.
Some more bots got broken - need to investigate.
|
#
17db0de3 |
| 01-Dec-2022 |
Jonas Paulsson <paulsson@linux.vnet.ibm.com> |
Reapply "[CodeGen] Add new pass for late cleanup of redundant definitions."
Init captures added in processBlock() to avoid capturing structured bindings, which caused the build problems (with clang)
Reapply "[CodeGen] Add new pass for late cleanup of redundant definitions."
Init captures added in processBlock() to avoid capturing structured bindings, which caused the build problems (with clang).
RISCV has this disabled for now until problems relating to post RA pseudo expansions are resolved.
show more ...
|
#
bac97427 |
| 03-Dec-2022 |
Fangrui Song <i@maskray.me> |
CodeGen/CommandFlags: Convert Optional to std::optional
|
#
8c7c20f0 |
| 03-Dec-2022 |
Krzysztof Parzyszek <kparzysz@quicinc.com> |
Convert Optional<CodeModel> to std::optional<CodeModel>
|