This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit fcd818f
committed
Auto merge of rust-lang#116583 - saethlin:inline-small-core-fns, r=<try>
Add #[inline] to small functions in core
Where "small" is strictly defined as optimized_mir with 5 or less statements and no calls. I've also applied that heuristic recursively; applying it once causes some functions to become eligible for MIR inlining bring other functions under the threshold.
r? `@ghost`File tree
74 files changed
+306
-1
lines changed- library/core/src
- alloc
- array
- char
- convert
- ffi
- fmt
- future
- hash
- iter
- adapters
- sources
- traits
- mem
- net
- num
- dec2flt
- flt2dec
- ops
- panic
- ptr
- slice
- str
- sync
- task
- unicode
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
74 files changed
+306
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| 144 | + | |
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
| |||
357 | 360 | | |
358 | 361 | | |
359 | 362 | | |
| 363 | + | |
360 | 364 | | |
361 | 365 | | |
362 | 366 | | |
| 367 | + | |
363 | 368 | | |
364 | 369 | | |
365 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| 148 | + | |
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
| 156 | + | |
153 | 157 | | |
154 | 158 | | |
155 | 159 | | |
| |||
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
| 180 | + | |
176 | 181 | | |
177 | 182 | | |
178 | 183 | | |
179 | 184 | | |
180 | 185 | | |
181 | 186 | | |
182 | 187 | | |
| 188 | + | |
183 | 189 | | |
184 | 190 | | |
185 | 191 | | |
| |||
321 | 327 | | |
322 | 328 | | |
323 | 329 | | |
| 330 | + | |
324 | 331 | | |
325 | 332 | | |
326 | 333 | | |
| |||
331 | 338 | | |
332 | 339 | | |
333 | 340 | | |
| 341 | + | |
334 | 342 | | |
335 | 343 | | |
336 | 344 | | |
| |||
435 | 443 | | |
436 | 444 | | |
437 | 445 | | |
| 446 | + | |
438 | 447 | | |
439 | 448 | | |
440 | 449 | | |
| |||
444 | 453 | | |
445 | 454 | | |
446 | 455 | | |
| 456 | + | |
447 | 457 | | |
448 | 458 | | |
449 | 459 | | |
| |||
541 | 551 | | |
542 | 552 | | |
543 | 553 | | |
| 554 | + | |
544 | 555 | | |
545 | 556 | | |
546 | 557 | | |
547 | 558 | | |
548 | 559 | | |
549 | 560 | | |
550 | 561 | | |
| 562 | + | |
551 | 563 | | |
552 | 564 | | |
553 | 565 | | |
| |||
783 | 795 | | |
784 | 796 | | |
785 | 797 | | |
786 | | - | |
| 798 | + | |
787 | 799 | | |
788 | 800 | | |
789 | 801 | | |
| |||
792 | 804 | | |
793 | 805 | | |
794 | 806 | | |
| 807 | + | |
795 | 808 | | |
796 | 809 | | |
797 | 810 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| 226 | + | |
224 | 227 | | |
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
| 234 | + | |
231 | 235 | | |
232 | 236 | | |
233 | 237 | | |
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
237 | 241 | | |
| 242 | + | |
238 | 243 | | |
239 | 244 | | |
240 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
376 | 377 | | |
377 | 378 | | |
378 | 379 | | |
| |||
488 | 489 | | |
489 | 490 | | |
490 | 491 | | |
| 492 | + | |
491 | 493 | | |
492 | 494 | | |
493 | 495 | | |
| |||
658 | 660 | | |
659 | 661 | | |
660 | 662 | | |
| 663 | + | |
661 | 664 | | |
662 | 665 | | |
663 | 666 | | |
| |||
678 | 681 | | |
679 | 682 | | |
680 | 683 | | |
| 684 | + | |
681 | 685 | | |
682 | 686 | | |
683 | 687 | | |
| |||
1172 | 1176 | | |
1173 | 1177 | | |
1174 | 1178 | | |
| 1179 | + | |
1175 | 1180 | | |
1176 | 1181 | | |
1177 | 1182 | | |
| |||
1356 | 1361 | | |
1357 | 1362 | | |
1358 | 1363 | | |
| 1364 | + | |
1359 | 1365 | | |
1360 | 1366 | | |
1361 | 1367 | | |
| |||
1577 | 1583 | | |
1578 | 1584 | | |
1579 | 1585 | | |
| 1586 | + | |
1580 | 1587 | | |
1581 | 1588 | | |
1582 | 1589 | | |
| |||
1743 | 1750 | | |
1744 | 1751 | | |
1745 | 1752 | | |
| 1753 | + | |
1746 | 1754 | | |
1747 | 1755 | | |
1748 | 1756 | | |
| |||
2190 | 2198 | | |
2191 | 2199 | | |
2192 | 2200 | | |
| 2201 | + | |
2193 | 2202 | | |
2194 | 2203 | | |
2195 | 2204 | | |
| |||
2290 | 2299 | | |
2291 | 2300 | | |
2292 | 2301 | | |
| 2302 | + | |
2293 | 2303 | | |
2294 | 2304 | | |
2295 | 2305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
| 228 | + | |
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
| 234 | + | |
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
| |||
304 | 307 | | |
305 | 308 | | |
306 | 309 | | |
| 310 | + | |
307 | 311 | | |
308 | 312 | | |
309 | 313 | | |
310 | 314 | | |
| 315 | + | |
311 | 316 | | |
312 | 317 | | |
313 | 318 | | |
314 | 319 | | |
315 | 320 | | |
316 | 321 | | |
| 322 | + | |
317 | 323 | | |
318 | 324 | | |
319 | 325 | | |
320 | 326 | | |
| 327 | + | |
321 | 328 | | |
322 | 329 | | |
323 | 330 | | |
| |||
0 commit comments