[llvm] r341168 - AMDGPU: Stop forcing internalize at -O0
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 30 23:02:36 PDT 2018
Author: arsenm
Date: Thu Aug 30 23:02:36 2018
New Revision: 341168
URL: http://llvm.org/viewvc/llvm-project?rev=341168&view=rev
Log:
AMDGPU: Stop forcing internalize at -O0
This doesn't really matter if clang is always emitting
the visibility as hidden by default.
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
llvm/trunk/test/CodeGen/AMDGPU/internalize.ll
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp?rev=341168&r1=341167&r2=341168&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp Thu Aug 30 23:02:36 2018
@@ -359,17 +359,6 @@ void AMDGPUTargetMachine::adjustPassMana
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 &,
Modified: llvm/trunk/test/CodeGen/AMDGPU/internalize.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/internalize.ll?rev=341168&r1=341167&r2=341168&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/internalize.ll (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/internalize.ll Thu Aug 30 23:02:36 2018
@@ -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:
More information about the llvm-commits
mailing list