Commit 1cd1dd7
committed
Auto merge of rust-lang#120370 - x17jiri:likely_unlikely_fix, r=saethlin
Likely unlikely fix
RFC 1131 ( rust-lang#26179 ) added likely/unlikely intrinsics, but they have been broken for a while: rust-lang#96276 , rust-lang#96275 , rust-lang#88767 . This PR tries to fix them.
Changes:
- added a new `cold_path()` intrinsic
- `likely()` and `unlikely()` changed to regular functions implemented using `cold_path()`1 file changed
Lines changed: 40 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1465 | 1465 | | |
1466 | 1466 | | |
1467 | 1467 | | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
1468 | 1484 | | |
1469 | 1485 | | |
1470 | 1486 | | |
| |||
1480 | 1496 | | |
1481 | 1497 | | |
1482 | 1498 | | |
1483 | | - | |
1484 | 1499 | | |
1485 | | - | |
1486 | 1500 | | |
1487 | | - | |
| 1501 | + | |
1488 | 1502 | | |
1489 | | - | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
1490 | 1514 | | |
1491 | 1515 | | |
1492 | 1516 | | |
| |||
1504 | 1528 | | |
1505 | 1529 | | |
1506 | 1530 | | |
1507 | | - | |
1508 | 1531 | | |
1509 | | - | |
1510 | 1532 | | |
1511 | | - | |
| 1533 | + | |
1512 | 1534 | | |
1513 | | - | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
1514 | 1546 | | |
1515 | 1547 | | |
1516 | 1548 | | |
| |||
0 commit comments