File: tailcallpic3.ll

package info (click to toggle)
llvm-toolchain-3.8 1%3A3.8.1-24
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 379,280 kB
  • ctags: 388,501
  • sloc: cpp: 2,309,705; ansic: 477,070; objc: 100,918; asm: 97,974; python: 95,911; sh: 18,634; makefile: 7,294; perl: 5,584; ml: 5,460; pascal: 4,661; lisp: 2,548; xml: 686; cs: 350; php: 212; csh: 117
file content (73 lines) | stat: -rw-r--r-- 1,407 bytes parent folder | download | duplicates (38)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
; RUN: llc < %s -mtriple=i686-pc-linux-gnu -relocation-model=pic | FileCheck %s

; While many of these could be tail called, we don't do it because it forces
; early binding.

declare void @external()

define hidden void @tailcallee_hidden() {
entry:
  ret void
}

define void @tailcall_hidden() {
entry:
  tail call void @tailcallee_hidden()
  ret void
}
; CHECK: tailcall_hidden:
; CHECK: jmp tailcallee_hidden

define internal void @tailcallee_internal() {
entry:
  ret void
}

define void @tailcall_internal() {
entry:
  tail call void @tailcallee_internal()
  ret void
}
; CHECK: tailcall_internal:
; CHECK: jmp tailcallee_internal

define default void @tailcallee_default() {
entry:
  ret void
}

define void @tailcall_default() {
entry:
  tail call void @tailcallee_default()
  ret void
}
; CHECK: tailcall_default:
; CHECK: calll tailcallee_default@PLT

define void @tailcallee_default_implicit() {
entry:
  ret void
}

define void @tailcall_default_implicit() {
entry:
  tail call void @tailcallee_default_implicit()
  ret void
}
; CHECK: tailcall_default_implicit:
; CHECK: calll tailcallee_default_implicit@PLT

define void @tailcall_external() {
  tail call void @external()
  ret void
}
; CHECK: tailcall_external:
; CHECK: calll external@PLT

define void @musttail_external() {
  musttail call void @external()
  ret void
}
; CHECK: musttail_external:
; CHECK: movl external@GOT
; CHECK: jmpl