[PATCH] D146923: [SPIR-V] Remove switch G_ICMP+G_BRCOND+G_BR before ISel
Michal Paszkowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 26 11:26:29 PDT 2023
mpaszkowski created this revision.
mpaszkowski added reviewers: iliya-diyachkov, zuban32, konrad.trifunovic, rengolin, arsenm.
Herald added subscribers: ThomasRaoux, hiraditya.
Herald added a project: All.
mpaszkowski requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
IRTranslator lowers switches to [G_SUB] + G_ICMP + G_BRCOND + G_BR sequences. Since values and destination MBBs are included in the spv_switch intrinsics, the sequences are not needed for ISel.
Before this patch, the information decoded by these sequences were added to spv_switch intrinsics in SPIRVPreLegalizer and the sequences were kept until SPIRVModuleAnalysis where they were marked skipped for emission.
After this patch, the [G_SUB] + G_ICMP + G_BRCOND + G_BR sequences and MBBs containing only these MIs are erased in SPIRVPreLegalizer.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146923
Files:
llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h
llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146923.508435.patch
Type: text/x-patch
Size: 7815 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230326/c866bbda/attachment.bin>
More information about the llvm-commits
mailing list