[llvm] [SPIR-V] Add pre-headers to loops. (PR #75844)

Nathan Gauër via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 07:48:01 PST 2024


================
@@ -151,6 +152,13 @@ TargetPassConfig *SPIRVTargetMachine::createPassConfig(PassManagerBase &PM) {
 }
 
 void SPIRVPassConfig::addIRPasses() {
+  if (TM.getSubtargetImpl()->isVulkanEnv()) {
+    // Once legalized, we need to structurize the CFG to follow the spec.
+    // This is done through the following 8 steps.
+    // TODO(#75801): add the remaining steps.
+    addPass(createLoopSimplifyPass());
----------------
Keenuts wrote:

Done!

https://github.com/llvm/llvm-project/pull/75844


More information about the llvm-commits mailing list