[all-commits] [llvm/llvm-project] a9ffc9: [SPIR-V] Add pre-headers to loops. (#75844)
Nathan Gauër via All-commits
all-commits at lists.llvm.org
Mon Jan 8 02:41:59 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a9ffc92fc4428723e85485102dfe10fbea966e64
https://github.com/llvm/llvm-project/commit/a9ffc92fc4428723e85485102dfe10fbea966e64
Author: Nathan Gauër <brioche at google.com>
Date: 2024-01-08 (Mon, 08 Jan 2024)
Changed paths:
M llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
M llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
M llvm/lib/Target/SPIRV/SPIRVUtils.cpp
M llvm/lib/Target/SPIRV/SPIRVUtils.h
A llvm/test/CodeGen/SPIRV/scfg-add-pre-headers.ll
Log Message:
-----------
[SPIR-V] Add pre-headers to loops. (#75844)
This is the first of the 7 steps outlined in #75801. This PR explicitely
calls the SimplifyLoops pass. Directly following this pass should follow
the 6 others required to structurize the IR.
Running this pass could generate empty basic-blocks, which are implicit
fallthrough to the successor BB.
There was a specific condition in the SPIR-V ISel which handled implicit
fallthrough, but it couldn't work on empty basic-blocks. This commits
removes the old logic, and adds this new logic, which checks all
basic-blocks for implicit fallthroughs, including empty ones.
---------
Signed-off-by: Nathan Gauër <brioche at google.com>
More information about the All-commits
mailing list