[llvm] [AMDGPU] Add AMDGPU-specific module splitting (PR #89245)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Thu May 16 04:12:38 PDT 2024
================
@@ -358,22 +358,24 @@ struct KernelWithDependencies {
const DenseMap<const Function *, CostType> &FnCosts,
const Function *Fn)
: Fn(Fn) {
- addAllDependencies(SML, CG, *Fn, Dependencies, HasIndirectCall,
- HasExternallyVisibleDependecy);
+ addAllDependencies(SML, CG, *Fn, Dependencies, HasIndirectCall);
TotalCost = FnCosts.at(Fn);
for (const auto *Dep : Dependencies) {
TotalCost += FnCosts.at(Dep);
- HasExternallyVisibleDependecy |= Dep->hasExternalLinkage();
+
+ // We cannot duplicate functions with external linkage, or functions that
+ // may be overriden at runtime.
+ HasNonDuplicatableDependecy |=
+ (Dep->hasExternalLinkage() || !Dep->isDefinitionExact());
----------------
Pierre-vh wrote:
`mayBeDerefined` is private I think, `isDefinitionExact` is just `!mayBeDerefined` so it's already using it
https://github.com/llvm/llvm-project/pull/89245
More information about the llvm-commits
mailing list