mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 05:32:25 +00:00
74fa7327d6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116158 91177308-0d34-0410-b5e6-96231b3b80d8
50 lines
1.3 KiB
LLVM
50 lines
1.3 KiB
LLVM
; If there are not enough callsites for a particular specialization to
|
|
; justify its existence, the specialization shouldn't be created.
|
|
;
|
|
; RUN: opt -S -partialspecialization -disable-inlining %s | FileCheck %s
|
|
declare void @callback1()
|
|
declare void @callback2()
|
|
|
|
declare void @othercall()
|
|
|
|
define internal void @UseCallback(void()* %pCallback) {
|
|
call void %pCallback()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
call void @othercall()
|
|
ret void
|
|
}
|
|
|
|
define void @foo(void()* %pNonConstCallback)
|
|
{
|
|
Entry:
|
|
; CHECK: Entry
|
|
; CHECK-NOT: call void @UseCallback(void ()* @callback1)
|
|
; CHECK: call void @UseCallback(void ()* @callback2)
|
|
; CHECK-NEXT: call void @UseCallback(void ()* @callback2)
|
|
; CHECK-NEXT: ret void
|
|
call void @UseCallback(void()* @callback1)
|
|
call void @UseCallback(void()* @callback1)
|
|
call void @UseCallback(void()* @callback1)
|
|
call void @UseCallback(void()* @callback1)
|
|
call void @UseCallback(void()* @callback2)
|
|
call void @UseCallback(void()* @callback2)
|
|
|
|
ret void
|
|
}
|