[all-commits] [llvm/llvm-project] 9c5ad6: Revert "[RISCV][GISEL] Introduce the RISCVPostLega...
Michael Maitland via All-commits
all-commits at lists.llvm.org
Fri Sep 20 07:09:30 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9c5ad62e7440423fbcd2d84c8f0347a5f000400e
https://github.com/llvm/llvm-project/commit/9c5ad62e7440423fbcd2d84c8f0347a5f000400e
Author: Michael Maitland <michaeltmaitland at gmail.com>
Date: 2024-09-20 (Fri, 20 Sep 2024)
Changed paths:
M llvm/lib/Target/RISCV/CMakeLists.txt
R llvm/lib/Target/RISCV/GISel/RISCVPostLegalizerLowering.cpp
M llvm/lib/Target/RISCV/RISCV.h
M llvm/lib/Target/RISCV/RISCVCombine.td
M llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
M llvm/test/CodeGen/RISCV/GlobalISel/gisel-commandline-option.ll
Log Message:
-----------
Revert "[RISCV][GISEL] Introduce the RISCVPostLegalizerLowering pass (#108991)"
This reverts commit 64972834c193632cbc47e54c0f0c721636b077e6.
Based on the discussions in #108991 that happened post merge, we have decided
to remove this pass in favor of generating `RISCV::G_*` opcodes in the legalizer.
We may reconsider moving that code elsewhere in the future so that we can do
a better job during generic combines. We don't feel that doing it in instruciton
selection is the right decision today. Firstly, it requires us to manually
do regbankselect on the newly introduced instructions. Secondly, it is more
difficult to test since the test output will contain whatever `RISCV::G_*`
instructions select to (instead of `RISCV::G_*`).
My personal opinion is that the legalizer pass can be split into an early
legalizer and a late legalizer, both before regbankselect. The first legalizer
would not introduce target specific generic opcodes and the generic combiner
would run after it. The second legalizer would introduce the target specific
generic opcodes. I think this approach is better than the lowerer because the
legalizer guarantees that whatever we lower to is legal, and apparently because
it is more performant at compared to the lowerer (although, I'm not sure how
true this is).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list