Commit dce14cf
committed
Remove LLVM attribute removal
This was necessary before, because `declare_raw_fn` would always apply
the default optimization attributes to every declared function,
and then `attributes::from_fn_attrs` would have to remove the default
attributes in the case of, e.g. `#[optimize(speed)]` in a `-Os` build.
However, every relevant callsite of `declare_raw_fn` (i.e. where we
actually generate code for the function, and not e.g. a call to an
intrinsic, where optimization attributes don't [?] matter)
calls `from_fn_attrs`, so we can simply remove the attribute setting
from `declare_raw_fn`, and rely on `from_fn_attrs` to apply the correct
attributes all at once.1 parent b07d59f commit dce14cf
File tree
5 files changed
+13
-87
lines changed- compiler
- rustc_codegen_llvm/src
- llvm
- rustc_llvm/llvm-wrapper
5 files changed
+13
-87
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 31 | | |
38 | 32 | | |
39 | 33 | | |
| |||
217 | 211 | | |
218 | 212 | | |
219 | 213 | | |
220 | | - | |
221 | | - | |
| 214 | + | |
222 | 215 | | |
223 | 216 | | |
224 | 217 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 218 | + | |
| 219 | + | |
233 | 220 | | |
234 | 221 | | |
235 | | - | |
236 | | - | |
237 | | - | |
| 222 | + | |
238 | 223 | | |
239 | 224 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
| 225 | + | |
| 226 | + | |
248 | 227 | | |
249 | 228 | | |
250 | 229 | | |
251 | | - | |
| 230 | + | |
252 | 231 | | |
253 | 232 | | |
254 | 233 | | |
| |||
260 | 239 | | |
261 | 240 | | |
262 | 241 | | |
263 | | - | |
264 | 242 | | |
265 | 243 | | |
266 | 244 | | |
267 | 245 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 246 | + | |
276 | 247 | | |
277 | 248 | | |
278 | 249 | | |
279 | 250 | | |
280 | | - | |
281 | 251 | | |
| 252 | + | |
282 | 253 | | |
283 | 254 | | |
284 | 255 | | |
| |||
425 | 396 | | |
426 | 397 | | |
427 | 398 | | |
428 | | - | |
429 | 399 | | |
430 | 400 | | |
431 | 401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
| 47 | + | |
49 | 48 | | |
50 | 49 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 50 | + | |
54 | 51 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 52 | + | |
59 | 53 | | |
60 | 54 | | |
61 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | 1204 | | |
1211 | 1205 | | |
1212 | 1206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 40 | | |
47 | 41 | | |
48 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | 253 | | |
273 | 254 | | |
274 | 255 | | |
275 | 256 | | |
276 | 257 | | |
277 | 258 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | 259 | | |
286 | 260 | | |
287 | 261 | | |
| |||
0 commit comments