[ThinLTO] Internalize readonly globals

This patch allows internalising globals if all accesses to them
(from live functions) are from non-volatile load instructions

Differential revision: https://reviews.llvm.org/D49362


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346584 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eugene Leviant
2018-11-10 08:31:21 +00:00
parent 01568d51f0
commit 10c84a8f35
42 changed files with 774 additions and 89 deletions
@@ -17,7 +17,7 @@
; CHECK-NEXT: <FUNCTION op0=17 op1=4
; CHECK: <GLOBALVAL_SUMMARY_BLOCK
; CHECK-NEXT: <VERSION
; See if the call to func is registered.
; See if the call to func is registered
; CHECK-NEXT: <PERMODULE {{.*}} op4=1
; CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK>
; CHECK: <STRTAB_BLOCK
@@ -33,7 +33,7 @@
; COMBINED-NEXT: <VALUE_GUID
; COMBINED-NEXT: <COMBINED
; See if the call to func is registered.
; COMBINED-NEXT: <COMBINED {{.*}} op6=[[FUNCID]]/>
; COMBINED-NEXT: <COMBINED {{.*}} op7=[[FUNCID]]/>
; COMBINED-NEXT: </GLOBALVAL_SUMMARY_BLOCK>
; ModuleID = 'thinlto-function-summary-callgraph.ll'