summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp11
-rw-r--r--llvm/test/CodeGen/AMDGPU/internalize.ll7
2 files changed, 4 insertions, 14 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index cd1823cc187..37b3d03d132 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -359,17 +359,6 @@ void AMDGPUTargetMachine::adjustPassManager(PassManagerBuilder &Builder) {
Builder.Inliner = createAMDGPUFunctionInliningPass();
}
- if (Internalize) {
- // If we're generating code, we always have the whole program available. The
- // relocations expected for externally visible functions aren't supported,
- // so make sure every non-entry function is hidden.
- Builder.addExtension(
- PassManagerBuilder::EP_EnabledOnOptLevel0,
- [](const PassManagerBuilder &, legacy::PassManagerBase &PM) {
- PM.add(createInternalizePass(mustPreserveGV));
- });
- }
-
Builder.addExtension(
PassManagerBuilder::EP_ModuleOptimizerEarly,
[Internalize, EarlyInline, AMDGPUAA](const PassManagerBuilder &,
diff --git a/llvm/test/CodeGen/AMDGPU/internalize.ll b/llvm/test/CodeGen/AMDGPU/internalize.ll
index 8f7e5568b88..138b1c9cc60 100644
--- a/llvm/test/CodeGen/AMDGPU/internalize.ll
+++ b/llvm/test/CodeGen/AMDGPU/internalize.ll
@@ -8,14 +8,15 @@
; ALL: gvar_used
@gvar_used = addrspace(1) global i32 undef, align 4
-; ALL: define internal fastcc void @func_used_noinline(
+; OPT: define internal fastcc void @func_used_noinline(
+; OPT-NONE: define fastcc void @func_used_noinline(
define fastcc void @func_used_noinline(i32 addrspace(1)* %out, i32 %tid) #1 {
entry:
store volatile i32 %tid, i32 addrspace(1)* %out
ret void
}
-; OPTNONE: define internal fastcc void @func_used_alwaysinline(
+; OPTNONE: define fastcc void @func_used_alwaysinline(
; OPT-NOT: @func_used_alwaysinline
define fastcc void @func_used_alwaysinline(i32 addrspace(1)* %out, i32 %tid) #2 {
entry:
@@ -23,7 +24,7 @@ entry:
ret void
}
-; OPTNONE: define internal void @func_unused(
+; OPTNONE: define void @func_unused(
; OPT-NOT: @func_unused
define void @func_unused(i32 addrspace(1)* %out, i32 %tid) #1 {
entry:
OpenPOWER on IntegriCloud