[llvm] [LICM] Promote conditional, loop-invariant memory accesses to scalars with intrinsic (PR #93999)
Ivan Shumakov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 4 09:11:41 PDT 2024
================
@@ -0,0 +1,30 @@
+//===- LowerConditionalStoreIntrinsic.h -------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+/// \file
+///
+/// Pass for early lowering of conditional store.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TRANSFORMS_SCALAR_LOWERCONDSTOREINTRINSIC_H
+#define LLVM_TRANSFORMS_SCALAR_LOWERCONDSTOREINTRINSIC_H
+
+#include "llvm/IR/PassManager.h"
+
+namespace llvm {
+
+class Function;
+
+struct LowerConditionalStoreIntrinsicPass
----------------
ii-sc wrote:
The main reason why conditional store intrinsic is needed is the fact that it is quite hard to change control flow in the LICM pass, so the destiny of the `llvm.conditional.store` is to be lowered as soon as possible after LICM pass. Almost all intrinsics leave until backend, so if we lower `llvm.conditional.store` there, we will miss potential control flow optimizations in the middleend.
https://github.com/llvm/llvm-project/pull/93999
More information about the llvm-commits
mailing list