[llvm] [Analysis][ValueTracking] Unify most of the tracking between AssumptionCache and DomConditionCache (PR #83161)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 00:45:41 PST 2024


================
@@ -0,0 +1,131 @@
+//===- llvm/Analysis/ConditionCacheUtil.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
+//
+//===----------------------------------------------------------------------===//
+//
+// Shared by DomConditionCache and AssumptionCache. Holds common operation of
+// finding values potentially affected by an assumed/branched on condition.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ANALYSIS_CONDITIONCACHEUTIL_H
+#define LLVM_ANALYSIS_CONDITIONCACHEUTIL_H
----------------
nikic wrote:

(If having it in a header is not necessary for compile-time reasons, then maybe consider putting this in ValueTracking? That way the logic for determining affected values and the logic that makes use of them is closer together. No strong feelings on this though.)

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


More information about the llvm-commits mailing list