mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Teach GlobalOpt to delete aliases with internal linkage (after
forwarding any uses). GlobalDCE can also do this, but is only run at -O3. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90850 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
; RUN: opt < %s -globalopt -S | grep {define void @a}
|
||||
; RUN: opt < %s -globalopt -S | FileCheck %s
|
||||
|
||||
define internal void @f() {
|
||||
; CHECK-NOT: @f
|
||||
; CHECK: define void @a
|
||||
ret void
|
||||
}
|
||||
|
||||
@@ -10,3 +12,13 @@ define void @g() {
|
||||
call void()* @a()
|
||||
ret void
|
||||
}
|
||||
|
||||
@b = alias internal void ()* @g
|
||||
; CHECK-NOT: @b
|
||||
|
||||
define void @h() {
|
||||
call void()* @b()
|
||||
; CHECK: call void @g
|
||||
ret void
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user