Commit c42d846
committed
Auto merge of rust-lang#94229 - erikdesjardins:rem2, r=nikic
Remove LLVM attribute removal
This was necessary before, because `declare_raw_fn` would always apply
the default optimization attributes to every declared function.
Then `attributes::from_fn_attrs` would have to remove the default
attributes in the case of, e.g. `#[optimize(speed)]` in a `-Os` build.
(see [`src/test/codegen/optimize-attr-1.rs`](https://github.com/rust-lang/rust/blob/03a8cc7df1d65554a4d40825b0490c93ac0f0236/src/test/codegen/optimize-attr-1.rs#L33))
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 remove the attribute setting
from `declare_raw_fn`, and rely on `from_fn_attrs` to apply the correct
attributes all at once.
r? `@ghost` (blocked on rust-lang#94221)
`@rustbot` label S-blockedFile 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 | | |
| |||
215 | 209 | | |
216 | 210 | | |
217 | 211 | | |
218 | | - | |
219 | | - | |
| 212 | + | |
220 | 213 | | |
221 | 214 | | |
222 | 215 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 216 | + | |
| 217 | + | |
231 | 218 | | |
232 | 219 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 220 | + | |
236 | 221 | | |
237 | 222 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 223 | + | |
| 224 | + | |
246 | 225 | | |
247 | 226 | | |
248 | 227 | | |
249 | | - | |
| 228 | + | |
250 | 229 | | |
251 | 230 | | |
252 | 231 | | |
| |||
258 | 237 | | |
259 | 238 | | |
260 | 239 | | |
261 | | - | |
262 | 240 | | |
263 | 241 | | |
264 | 242 | | |
265 | 243 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
| 244 | + | |
274 | 245 | | |
275 | 246 | | |
276 | 247 | | |
277 | 248 | | |
278 | | - | |
279 | 249 | | |
| 250 | + | |
280 | 251 | | |
281 | 252 | | |
282 | 253 | | |
| |||
421 | 392 | | |
422 | 393 | | |
423 | 394 | | |
424 | | - | |
425 | 395 | | |
426 | 396 | | |
427 | 397 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
1202 | 1202 | | |
1203 | 1203 | | |
1204 | 1204 | | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | 1205 | | |
1212 | 1206 | | |
1213 | 1207 | | |
| |||
| 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