Lines Matching full:cache
7 ; Verify first that *without* hash, we don't use the cache.
9 ; RUN: opt -module-summary %p/Inputs/cache.ll -o %t2.bc
12 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
13 …to -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex
14 ; RUN: ls %t.cache.noindex/llvmcache.timestamp
15 ; RUN: ls %t.cache.noindex | count 1
18 ; RUN: rm -Rf %t.cache.noindex
19 ; RUN: llvm-lto2 run -o %t.o %t2.bc %t.bc -cache-dir %t.cache.noindex \
23 ; RUN: not ls %t.cache.noindex
29 ; RUN: opt -module-hash -module-summary %p/Inputs/cache.ll -o %t2.bc
33 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
34 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache-foo %t.cache.noindex/foo
35 …to -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex
36 ; RUN: ls %t.cache.noindex | count 4
37 ; RUN: ls %t.cache.noindex/llvmcache.timestamp
38 ; RUN: ls %t.cache.noindex/foo
39 ; RUN: not ls %t.cache.noindex/llvmcache-foo
40 ; RUN: ls %t.cache.noindex/llvmcache-* | count 2
43 ; RUN: rm -Rf %t.cache.noindex
44 ; RUN: llvm-lto2 run -o %t.o %t2.bc %t.bc -cache-dir %t.cache.noindex \
48 ; RUN: ls %t.cache.noindex | count 2
49 ; RUN: ls %t.cache.noindex/llvmcache-* | count 2
53 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
54 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache-foo
55 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache.timestamp
56 …to -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex
57 ; RUN: not ls %t.cache.noindex/llvmcache-foo
61 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
62 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache-foo
63 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache.timestamp
64 …=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex --thinlto-cache-…
65 ; RUN: ls %t.cache.noindex/llvmcache-foo
67 ; Verify that the pruner doesn't run and a cache file is not deleted when:
68 ; default values for pruning interval and cache expiration are used,
70 ; cache file is older than default cache expiration value.
71 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
72 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache-foo
73 ; RUN: touch %t.cache.noindex/llvmcache.timestamp
74 …to -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex
75 ; RUN: ls %t.cache.noindex/llvmcache-foo
77 ; Verify that the pruner runs and a cache file is deleted when:
79 ; default value for cache expiration is used,
81 ; cache file is older than default cache expiration value.
82 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
83 ; RUN: touch -t 197001011200 %t.cache.noindex/llvmcache-foo
84 ; RUN: touch %t.cache.noindex/llvmcache.timestamp
85 …=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex --thinlto-cache-…
86 ; RUN: not ls %t.cache.noindex/llvmcache-foo
88 ; Populate the cache with files with "old" access times, then check llvm-lto updates these file tim…
89 ; A negative pruning interval is used to avoid removing cache entries
90 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
91 …to -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex
92 ; RUN: touch -a -t 197001011200 %t.cache.noindex/llvmcache-*
93 …=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex --thinlto-cache-…
94 ; RUN: ls -ltu %t.cache.noindex/* | not grep 1970-01-01
96 ; Populate the cache with files with "old" access times, then check llvm-lto2 updates these file ti…
97 ; RUN: rm -Rf %t.cache.noindex
98 ; RUN: llvm-lto2 run -o %t.o %t2.bc %t.bc -cache-dir %t.cache.noindex \
102 ; RUN: touch -a -t 197001011200 %t.cache.noindex/llvmcache-*
103 ; RUN: llvm-lto2 run -o %t.o %t2.bc %t.bc -cache-dir %t.cache.noindex \
107 ; RUN: ls -ltu %t.cache.noindex/* | not grep 1970-01-01
109 ; Verify that specifying max size for the cache directory prunes it to this
111 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
112 ; Create cache files with different sizes.
114 ; RUN: %python -c "with open(r'%t.cache.noindex/llvmcache-foo-100k', 'w') as file: file.truncate(10…
115 ; RUN: touch -t 198002011200 %t.cache.noindex/llvmcache-foo-100k
116 ; RUN: %python -c "with open(r'%t.cache.noindex/llvmcache-foo-16', 'w') as file: file.truncate(16)"
117 ; RUN: touch -t 198002021200 %t.cache.noindex/llvmcache-foo-16
118 ; RUN: %python -c "with open(r'%t.cache.noindex/llvmcache-foo-77k', 'w') as file: file.truncate(788…
119 ; RUN: touch -t 198002031200 %t.cache.noindex/llvmcache-foo-77k
120 ; RUN: %python -c "with open(r'%t.cache.noindex/llvmcache-foo-8', 'w') as file: file.truncate(8)"
121 ; RUN: touch -t 198002041200 %t.cache.noindex/llvmcache-foo-8
122 ; RUN: %python -c "with open(r'%t.cache.noindex/llvmcache-foo-76', 'w') as file: file.truncate(76)"
123 ; RUN: touch -t 198002051200 %t.cache.noindex/llvmcache-foo-76
124 …bol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex --thinlto-cache-max-size-bytes 788…
125 ; RUN: ls %t.cache.noindex/llvmcache-foo-8
126 ; RUN: ls %t.cache.noindex/llvmcache-foo-76
127 ; RUN: not ls %t.cache.noindex/llvmcache-foo-16
128 ; RUN: not ls %t.cache.noindex/llvmcache-foo-100k
129 ; RUN: not ls %t.cache.noindex/llvmcache-foo-77k
131 ; Verify that specifying a max size > 4GB for the cache directory does not
133 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
134 ; RUN: %python -c "with open(r'%t.cache.noindex/llvmcache-foo-10', 'w') as file: file.truncate(10)"
135 …=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex --thinlto-cache-…
136 ; RUN: ls %t.cache.noindex/llvmcache-foo-10
139 ; --thinlto-cache-max-size-bytes switch
140 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
141 ; RUN: not llvm-lto %t.bc --thinlto-cache-max-size-bytes -1 2>&1 | FileCheck %s
142 ; CHECK: -thinlto-cache-max-size-bytes option: '-1' value invalid
144 ; Verify that specifying max number of files in the cache directory prunes
146 ; RUN: rm -Rf %t.cache.noindex && mkdir %t.cache.noindex
147 ; Create cache files with different sizes.
149 ; RUN: %python -c "print(' ' * 1023)" > %t.cache.noindex/llvmcache-foo-1023
150 ; RUN: touch -t 198002011200 %t.cache.noindex/llvmcache-foo-1023
151 ; RUN: %python -c "print(' ' * 15)" > %t.cache.noindex/llvmcache-foo-15
152 ; RUN: touch -t 198002021200 %t.cache.noindex/llvmcache-foo-15
153 ; RUN: %python -c "print(' ' * 7)" > %t.cache.noindex/llvmcache-foo-7
154 ; RUN: touch -t 198002031200 %t.cache.noindex/llvmcache-foo-7
155 ; RUN: %python -c "print(' ' * 75)" > %t.cache.noindex/llvmcache-foo-75
156 ; RUN: touch -t 198002041200 %t.cache.noindex/llvmcache-foo-75
157 ; RUN: %python -c "print(' ' * 76)" > %t.cache.noindex/llvmcache-foo-76
158 ; RUN: touch -t 198002051200 %t.cache.noindex/llvmcache-foo-76
159 …ymbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache.noindex --thinlto-cache-max-size-files 4…
160 ; RUN: ls %t.cache.noindex/llvmcache-foo-75
161 ; RUN: ls %t.cache.noindex/llvmcache-foo-76
162 ; RUN: not ls %t.cache.noindex/llvmcache-foo-15
163 ; RUN: not ls %t.cache.noindex/llvmcache-foo-1024
164 ; RUN: not ls %t.cache.noindex/llvmcache-foo-7