[llvm] [LV][VPlan] Add initial support for CSA vectorization (PR #106560)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 07:34:54 PDT 2024
================
@@ -0,0 +1,78 @@
+//===------------- CSADescriptors.h - CSA Descriptors -----------*- 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
+//
+//===----------------------------------------------------------------------===//
+//
+// This file "describes" conditional scalar assignments (CSA).
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/Analysis/LoopInfo.h"
+#include "llvm/IR/Instructions.h"
+#include "llvm/IR/Value.h"
+
+#ifndef LLVM_ANALYSIS_CSADESCRIPTORS_H
+#define LLVM_ANALYSIS_CSADESCRIPTORS_H
+
+namespace llvm {
+
+/// A Conditional Scalar Assignment (CSA) is an assignment from an initial
+/// scalar that may or may not occur.
+class CSADescriptor {
----------------
huntergr-arm wrote:
Is there a reason to introduce a whole new class + analysis file instead of adding a new RecurKind in IVDescriptors?
@Mel-Chen 's #67812 seems to be quite similar work which just extends the existing code. This CSA patch is more general in that it can handle values that aren't just the induction variable, but I think the amount of extra code can be cut down a little.
https://github.com/llvm/llvm-project/pull/106560
More information about the llvm-commits
mailing list