Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AttributorLight] Without liveness checks, look at all functions #91004

Merged
merged 1 commit into from
May 23, 2024

Conversation

jdoerfert
Copy link
Member

No description provided.

@arsenm
Copy link
Contributor

arsenm commented May 6, 2024

Has test failures

@llvmbot
Copy link
Collaborator

llvmbot commented May 8, 2024

@llvm/pr-subscribers-llvm-transforms

Author: Johannes Doerfert (jdoerfert)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/91004.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/IPO/Attributor.cpp (+1-1)
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) &&

@jdoerfert
Copy link
Member Author

jdoerfert commented May 8, 2024

Has test failures

Locally, it passes. Unsure what I did wrong...

@jdoerfert jdoerfert force-pushed the attributor-light-fix1 branch 2 times, most recently from e35e7c3 to 18ea604 Compare May 22, 2024 01:07
@jdoerfert
Copy link
Member Author

I looked at the wrong tests. My bad. Should be fixed now.

@arsenm
Copy link
Contributor

arsenm commented May 22, 2024

Bot failed again

@arsenm arsenm merged commit 5ec91b3 into llvm:main May 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants