diff options
author | Hans Wennborg <hans@hanshq.net> | 2017-09-14 00:40:14 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2017-09-14 00:40:14 +0000 |
commit | 2ca4715d250736139b8fce4ce71f474050128a55 (patch) | |
tree | 619f483dc130c1d2d19e85e12bbcb8fbf49957f2 /test/LTO | |
parent | cca65fd2eddb7a79b7c21e49f777f301ff56c452 (diff) |
Revert r313157 "ThinLTO: Correctly follow aliasee references when dead stripping."
This broke Chromium's CFI build; see crbug.com/765004.
> We were previously handling aliases during dead stripping by adding
> the aliased global's "original name" GUID to the worklist. This will
> lead to incorrect behaviour if the global has local linkage because
> the original name GUID will not correspond to the global's GUID in
> the summary.
>
> Because an alias is just another name for the global that it
> references, there is no need to mark the referenced global as used,
> or to follow references from any other copies of the global. So all
> we need to do is to follow references from the aliasee's summary
> instead of the alias.
>
> Differential Revision: https://reviews.llvm.org/D37789
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313222 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/LTO')
-rw-r--r-- | test/LTO/Resolution/X86/Inputs/dead-strip-alias.ll | 4 | ||||
-rw-r--r-- | test/LTO/Resolution/X86/dead-strip-alias.ll | 20 |
2 files changed, 0 insertions, 24 deletions
diff --git a/test/LTO/Resolution/X86/Inputs/dead-strip-alias.ll b/test/LTO/Resolution/X86/Inputs/dead-strip-alias.ll deleted file mode 100644 index 16154d2c45b..00000000000 --- a/test/LTO/Resolution/X86/Inputs/dead-strip-alias.ll +++ /dev/null @@ -1,4 +0,0 @@ -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -@external = global i8 42 diff --git a/test/LTO/Resolution/X86/dead-strip-alias.ll b/test/LTO/Resolution/X86/dead-strip-alias.ll deleted file mode 100644 index d009a484e4f..00000000000 --- a/test/LTO/Resolution/X86/dead-strip-alias.ll +++ /dev/null @@ -1,20 +0,0 @@ -; RUN: opt -module-summary -o %t %s -; RUN: opt -module-summary -o %t2 %S/Inputs/dead-strip-alias.ll -; RUN: llvm-lto2 run %t -r %t,main,px -r %t,alias,p -r %t,external, \ -; RUN: %t2 -r %t2,external,p \ -; RUN: -save-temps -o %t3 -; RUN: llvm-nm %t3.1 | FileCheck %s - -; CHECK: D external - -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -@alias = alias i8*, i8** @internal - -@internal = internal global i8* @external -@external = external global i8 - -define i8** @main() { - ret i8** @alias -} |