annotate llvm/test/ThinLTO/X86/cache.ll @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents c4bab56944e8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ; NetBSD: noatime mounts currently inhibit 'touch -a' updates
anatofuz
parents:
diff changeset
2 ; UNSUPPORTED: system-netbsd
anatofuz
parents:
diff changeset
3
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
4 ; The .noindex suffix for output dir is to prevent Spotlight on macOS from
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
5 ; indexing it.
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
6
150
anatofuz
parents:
diff changeset
7 ; Verify first that *without* hash, we don't use the cache.
anatofuz
parents:
diff changeset
8 ; RUN: opt -module-summary %s -o %t.bc
anatofuz
parents:
diff changeset
9 ; RUN: opt -module-summary %p/Inputs/cache.ll -o %t2.bc
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 ; Verify that enabling caching is ignoring module without hash
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
12 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
13 ; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
14 ; RUN: ls %t.cache.noindex/llvmcache.timestamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
15 ; RUN: ls %t.cache.noindex | count 1
150
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 ; Verify that enabling caching is ignoring module without hash with llvm-lto2
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
18 ; RUN: rm -Rf %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
19 ; RUN: llvm-lto2 run -o %t.o %t2.bc %t.bc -cache-dir %t.cache.noindex \
150
anatofuz
parents:
diff changeset
20 ; RUN: -r=%t2.bc,_main,plx \
anatofuz
parents:
diff changeset
21 ; RUN: -r=%t2.bc,_globalfunc,lx \
anatofuz
parents:
diff changeset
22 ; RUN: -r=%t.bc,_globalfunc,plx
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
23 ; RUN: not ls %t.cache.noindex
150
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25
anatofuz
parents:
diff changeset
26 ; Repeat again, *with* hash this time.
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 ; RUN: opt -module-hash -module-summary %s -o %t.bc
anatofuz
parents:
diff changeset
29 ; RUN: opt -module-hash -module-summary %p/Inputs/cache.ll -o %t2.bc
anatofuz
parents:
diff changeset
30
anatofuz
parents:
diff changeset
31 ; Verify that enabling caching is working, and that the pruner only removes
anatofuz
parents:
diff changeset
32 ; files matching the pattern "llvmcache-*".
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
33 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
34 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache-foo %t.cache.noindex/foo
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
35 ; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
36 ; RUN: ls %t.cache.noindex | count 4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
37 ; RUN: ls %t.cache.noindex/llvmcache.timestamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
38 ; RUN: ls %t.cache.noindex/foo
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
39 ; RUN: not ls %t.cache.noindex/llvmcache-foo
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
40 ; RUN: ls %t.cache.noindex/llvmcache-* | count 2
150
anatofuz
parents:
diff changeset
41
anatofuz
parents:
diff changeset
42 ; Verify that enabling caching is working with llvm-lto2
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
43 ; RUN: rm -Rf %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
44 ; RUN: llvm-lto2 run -o %t.o %t2.bc %t.bc -cache-dir %t.cache.noindex \
150
anatofuz
parents:
diff changeset
45 ; RUN: -r=%t2.bc,_main,plx \
anatofuz
parents:
diff changeset
46 ; RUN: -r=%t2.bc,_globalfunc,lx \
anatofuz
parents:
diff changeset
47 ; RUN: -r=%t.bc,_globalfunc,plx
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
48 ; RUN: ls %t.cache.noindex | count 2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
49 ; RUN: ls %t.cache.noindex/llvmcache-* | count 2
150
anatofuz
parents:
diff changeset
50
anatofuz
parents:
diff changeset
51 ; Verify that caches with a timestamp older than the pruning interval
anatofuz
parents:
diff changeset
52 ; will be pruned
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
53 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
54 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache-foo
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
55 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache.timestamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
56 ; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
57 ; RUN: not ls %t.cache.noindex/llvmcache-foo
150
anatofuz
parents:
diff changeset
58
anatofuz
parents:
diff changeset
59 ; Verify that specifying a negative number for the pruning interval
anatofuz
parents:
diff changeset
60 ; effectively disables the pruning
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
61 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
62 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache-foo
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
63 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache.timestamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
64 ; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex --thinlto-cache-pruning-interval -1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
65 ; RUN: ls %t.cache.noindex/llvmcache-foo
150
anatofuz
parents:
diff changeset
66
anatofuz
parents:
diff changeset
67 ; Verify that the pruner doesn't run and a cache file is not deleted when:
anatofuz
parents:
diff changeset
68 ; default values for pruning interval and cache expiration are used,
anatofuz
parents:
diff changeset
69 ; llvmcache.timestamp is current,
anatofuz
parents:
diff changeset
70 ; cache file is older than default cache expiration value.
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
71 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
72 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache-foo
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
73 ; RUN: touch %t.cache.noindex/llvmcache.timestamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
74 ; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
75 ; RUN: ls %t.cache.noindex/llvmcache-foo
150
anatofuz
parents:
diff changeset
76
anatofuz
parents:
diff changeset
77 ; Verify that the pruner runs and a cache file is deleted when:
anatofuz
parents:
diff changeset
78 ; pruning interval has value 0 (i.e. run garbage collector now)
anatofuz
parents:
diff changeset
79 ; default value for cache expiration is used,
anatofuz
parents:
diff changeset
80 ; llvmcache.timestamp is current,
anatofuz
parents:
diff changeset
81 ; cache file is older than default cache expiration value.
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
82 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
83 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache-foo
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
84 ; RUN: touch %t.cache.noindex/llvmcache.timestamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
85 ; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex --thinlto-cache-pruning-interval 0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
86 ; RUN: not ls %t.cache.noindex/llvmcache-foo
150
anatofuz
parents:
diff changeset
87
anatofuz
parents:
diff changeset
88 ; Populate the cache with files with "old" access times, then check llvm-lto updates these file times
anatofuz
parents:
diff changeset
89 ; A negative pruning interval is used to avoid removing cache entries
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
90 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
91 ; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
92 ; RUN: touch -a -t 197001011200 %t.cache.noindex/llvmcache-*
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
93 ; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex --thinlto-cache-pruning-interval -1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
94 ; RUN: ls -ltu %t.cache.noindex/* | not grep 1970-01-01
150
anatofuz
parents:
diff changeset
95
anatofuz
parents:
diff changeset
96 ; Populate the cache with files with "old" access times, then check llvm-lto2 updates these file times
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
97 ; RUN: rm -Rf %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
98 ; RUN: llvm-lto2 run -o %t.o %t2.bc %t.bc -cache-dir %t.cache.noindex \
150
anatofuz
parents:
diff changeset
99 ; RUN: -r=%t2.bc,_main,plx \
anatofuz
parents:
diff changeset
100 ; RUN: -r=%t2.bc,_globalfunc,lx \
anatofuz
parents:
diff changeset
101 ; RUN: -r=%t.bc,_globalfunc,plx
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
102 ; RUN: touch -a -t 197001011200 %t.cache.noindex/llvmcache-*
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
103 ; RUN: llvm-lto2 run -o %t.o %t2.bc %t.bc -cache-dir %t.cache.noindex \
150
anatofuz
parents:
diff changeset
104 ; RUN: -r=%t2.bc,_main,plx \
anatofuz
parents:
diff changeset
105 ; RUN: -r=%t2.bc,_globalfunc,lx \
anatofuz
parents:
diff changeset
106 ; RUN: -r=%t.bc,_globalfunc,plx
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
107 ; RUN: ls -ltu %t.cache.noindex/* | not grep 1970-01-01
150
anatofuz
parents:
diff changeset
108
anatofuz
parents:
diff changeset
109 ; Verify that specifying max size for the cache directory prunes it to this
anatofuz
parents:
diff changeset
110 ; size, removing the oldest files first.
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
111 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
150
anatofuz
parents:
diff changeset
112 ; Create cache files with different sizes.
anatofuz
parents:
diff changeset
113 ; Only 8B and 76B files should stay after pruning.
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
114 ; RUN: %python -c "with open(r'%t.cache.noindex/llvmcache-foo-100k', 'w') as file: file.truncate(102400)"
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
115 ; RUN: touch -t 198002011200 %t.cache.noindex/llvmcache-foo-100k
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
116 ; RUN: %python -c "with open(r'%t.cache.noindex/llvmcache-foo-16', 'w') as file: file.truncate(16)"
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
117 ; RUN: touch -t 198002021200 %t.cache.noindex/llvmcache-foo-16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
118 ; RUN: %python -c "with open(r'%t.cache.noindex/llvmcache-foo-77k', 'w') as file: file.truncate(78848)"
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
119 ; RUN: touch -t 198002031200 %t.cache.noindex/llvmcache-foo-77k
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
120 ; RUN: %python -c "with open(r'%t.cache.noindex/llvmcache-foo-8', 'w') as file: file.truncate(8)"
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
121 ; RUN: touch -t 198002041200 %t.cache.noindex/llvmcache-foo-8
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
122 ; RUN: %python -c "with open(r'%t.cache.noindex/llvmcache-foo-76', 'w') as file: file.truncate(76)"
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
123 ; RUN: touch -t 198002051200 %t.cache.noindex/llvmcache-foo-76
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
124 ; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex --thinlto-cache-max-size-bytes 78847 --thinlto-cache-entry-expiration 4294967295
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
125 ; RUN: ls %t.cache.noindex/llvmcache-foo-8
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
126 ; RUN: ls %t.cache.noindex/llvmcache-foo-76
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
127 ; RUN: not ls %t.cache.noindex/llvmcache-foo-16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
128 ; RUN: not ls %t.cache.noindex/llvmcache-foo-100k
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
129 ; RUN: not ls %t.cache.noindex/llvmcache-foo-77k
150
anatofuz
parents:
diff changeset
130
anatofuz
parents:
diff changeset
131 ; Verify that specifying a max size > 4GB for the cache directory does not
anatofuz
parents:
diff changeset
132 ; prematurely prune, due to an integer overflow.
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
133 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
134 ; RUN: %python -c "with open(r'%t.cache.noindex/llvmcache-foo-10', 'w') as file: file.truncate(10)"
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
135 ; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex --thinlto-cache-max-size-bytes 4294967297
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
136 ; RUN: ls %t.cache.noindex/llvmcache-foo-10
150
anatofuz
parents:
diff changeset
137
anatofuz
parents:
diff changeset
138 ; Verify that negative numbers aren't accepted for the
anatofuz
parents:
diff changeset
139 ; --thinlto-cache-max-size-bytes switch
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
140 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
150
anatofuz
parents:
diff changeset
141 ; RUN: not llvm-lto %t.bc --thinlto-cache-max-size-bytes -1 2>&1 | FileCheck %s
anatofuz
parents:
diff changeset
142 ; CHECK: -thinlto-cache-max-size-bytes option: '-1' value invalid
anatofuz
parents:
diff changeset
143
anatofuz
parents:
diff changeset
144 ; Verify that specifying max number of files in the cache directory prunes
anatofuz
parents:
diff changeset
145 ; it to this amount, removing the oldest files first.
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
146 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
150
anatofuz
parents:
diff changeset
147 ; Create cache files with different sizes.
anatofuz
parents:
diff changeset
148 ; Only 75B and 76B files should stay after pruning.
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
149 ; RUN: %python -c "print(' ' * 1023)" > %t.cache.noindex/llvmcache-foo-1023
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
150 ; RUN: touch -t 198002011200 %t.cache.noindex/llvmcache-foo-1023
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
151 ; RUN: %python -c "print(' ' * 15)" > %t.cache.noindex/llvmcache-foo-15
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
152 ; RUN: touch -t 198002021200 %t.cache.noindex/llvmcache-foo-15
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
153 ; RUN: %python -c "print(' ' * 7)" > %t.cache.noindex/llvmcache-foo-7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
154 ; RUN: touch -t 198002031200 %t.cache.noindex/llvmcache-foo-7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
155 ; RUN: %python -c "print(' ' * 75)" > %t.cache.noindex/llvmcache-foo-75
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
156 ; RUN: touch -t 198002041200 %t.cache.noindex/llvmcache-foo-75
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
157 ; RUN: %python -c "print(' ' * 76)" > %t.cache.noindex/llvmcache-foo-76
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
158 ; RUN: touch -t 198002051200 %t.cache.noindex/llvmcache-foo-76
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
159 ; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex --thinlto-cache-max-size-files 4 --thinlto-cache-entry-expiration 4294967295
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
160 ; RUN: ls %t.cache.noindex/llvmcache-foo-75
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
161 ; RUN: ls %t.cache.noindex/llvmcache-foo-76
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
162 ; RUN: not ls %t.cache.noindex/llvmcache-foo-15
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
163 ; RUN: not ls %t.cache.noindex/llvmcache-foo-1024
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
164 ; RUN: not ls %t.cache.noindex/llvmcache-foo-7
150
anatofuz
parents:
diff changeset
165
anatofuz
parents:
diff changeset
166 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
anatofuz
parents:
diff changeset
167 target triple = "x86_64-apple-macosx10.11.0"
anatofuz
parents:
diff changeset
168
anatofuz
parents:
diff changeset
169 define void @globalfunc() #0 {
anatofuz
parents:
diff changeset
170 entry:
anatofuz
parents:
diff changeset
171 ret void
anatofuz
parents:
diff changeset
172 }