[llvm] [AttributorLight] Without liveness checks, look at all functions (PR #91004)
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 07:23:55 PDT 2024
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/91004
>From d06ddb35d26b0ff15f064ae927bab00345b73c13 Mon Sep 17 00:00:00 2001
From: Johannes Doerfert <johannes at jdoerfert.de>
Date: Fri, 3 May 2024 13:08:37 -0700
Subject: [PATCH] [AttributorLight] Without liveness checks, look at all
functions
---
llvm/lib/Transforms/IPO/Attributor.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index e3920b9e1d2ba..b6866580ccd3f 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -3954,7 +3954,7 @@ static bool runAttributorLightOnFunctions(InformationCache &InfoCache,
// We look at internal functions only on-demand but if any use is not a
// direct call or outside the current set of analyzed functions, we have
// to do it eagerly.
- if (F->hasLocalLinkage()) {
+ if (AC.UseLiveness && F->hasLocalLinkage()) {
if (llvm::all_of(F->uses(), [&Functions](const Use &U) {
const auto *CB = dyn_cast<CallBase>(U.getUser());
return CB && CB->isCallee(&U) &&
More information about the llvm-commits
mailing list