[llvm] [LV] Add cross-part load overlap heuristic for interleaving (PR #214500)
Sergey Shcherbinin via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 06:47:53 PDT 2026
================
@@ -0,0 +1,288 @@
+//===- VPlanCrossPartCSE.cpp - Cross-part CSE for VPlan -------------------===//
+//
+// 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 implements exact load-overlap profitability analysis across two
+// logical VPlan parts.
+//
+//===----------------------------------------------------------------------===//
+
+#include "VPlanCrossPartCSE.h"
+#include "VPlan.h"
+#include "VPlanPatternMatch.h"
+#include "VPlanUtils.h"
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/Hashing.h"
+#include "llvm/Analysis/LoopInfo.h"
+#include "llvm/Analysis/ScalarEvolution.h"
+#include "llvm/IR/Instructions.h"
+#include "llvm/Support/Debug.h"
+#include "llvm/Support/raw_ostream.h"
+#include <cstdint>
+#include <optional>
+
+using namespace llvm;
+
+#define DEBUG_TYPE "loop-vectorize"
+
+namespace {
+
+/// A simple widened load supported by the prediction-only analysis.
+struct CrossPartSupportedLoad {
+ /// VPlan recipe whose logical UF=2 instances are modeled.
+ VPWidenLoadRecipe *Recipe;
+ /// Underlying scalar load used for type, SCEV, and poison identity.
+ LoadInst *Load;
----------------
SergeyShch01 wrote:
Ok, done
https://github.com/llvm/llvm-project/pull/214500
More information about the llvm-commits
mailing list