[llvm] [AMDGPU][SplitModule] Keep looking for more dependencies after finding an indirect call (PR #93480)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Mon May 27 07:24:17 PDT 2024
https://github.com/Pierre-vh created https://github.com/llvm/llvm-project/pull/93480
This is just something I noticed while going over this pass logic one more time and didn't cause issues (yet). If we find an indirect call, we stop looking assuming we added all functions to the list, but if not all functions in the module were indirectly callable, some may still be missing.
Just to be safe, keep looking until we did everything we could to find dependencies, so we don't accidentally miss one.
>From a667d4faaa4eb1f5fbaca16caf468e81139bb5a9 Mon Sep 17 00:00:00 2001
From: pvanhout <pierre.vanhoutryve at amd.com>
Date: Mon, 27 May 2024 16:23:18 +0200
Subject: [PATCH] [AMDGPU][SplitModule] Keep looking for more dependencies
after finding an indirect call
This is just something I noticed while going over this pass logic one more time and didn't cause issues (yet).
If we find an indirect call, we stop looking assuming we added all
functions to the list, but if not all functions in the module were
indirectly callable, some may still be missing.
Just to be safe, keep looking until we did everything we could to find dependencies, so we don't accidentally miss one.
---
llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
index dab773f28752d..2449fa581842a 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
@@ -340,7 +340,7 @@ static void addAllDependencies(SplitModuleLogger &SML, const CallGraph &CG,
// TODO: Print an ORE as well ?
addAllIndirectCallDependencies(M, Fns);
HadIndirectCall = true;
- return;
+ continue;
}
if (Callee->isDeclaration())
More information about the llvm-commits
mailing list