Commit 2f3fde6
committed
Implement an
This can be applied to statics and it will indicate that LLVM will attempt to
merge the constant in .data with other statics.
I have preliminarily applied this to all of the statics generated by the new
`ifmt!` syntax extension. I compiled a file with 1000 calls to `ifmt!` and a
separate file with 1000 calls to `fmt!` to compare the sizes, and the results
were:
fmt 310k
ifmt (before) 529k
ifmt (after) 202k
This now means that ifmt! is both faster and smaller than fmt!, yay!address_insignificant attribute1 parent 74efdf6 commit 2f3fde6
File tree
5 files changed
+47
-16
lines changed- src
- librustc
- lib
- middle/trans
- libsyntax/ext
- rustllvm
5 files changed
+47
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2080 | 2080 | | |
2081 | 2081 | | |
2082 | 2082 | | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
2083 | 2086 | | |
2084 | 2087 | | |
2085 | 2088 | | |
| |||
2099 | 2102 | | |
2100 | 2103 | | |
2101 | 2104 | | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
2102 | 2111 | | |
2103 | 2112 | | |
2104 | 2113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2159 | 2159 | | |
2160 | 2160 | | |
2161 | 2161 | | |
2162 | | - | |
2163 | | - | |
2164 | | - | |
2165 | | - | |
2166 | | - | |
2167 | | - | |
2168 | | - | |
2169 | | - | |
2170 | | - | |
2171 | | - | |
2172 | | - | |
2173 | | - | |
2174 | | - | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
2175 | 2174 | | |
2176 | 2175 | | |
2177 | 2176 | | |
| |||
2432 | 2431 | | |
2433 | 2432 | | |
2434 | 2433 | | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
2435 | 2443 | | |
2436 | 2444 | | |
2437 | 2445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
433 | 438 | | |
434 | 439 | | |
435 | 440 | | |
| |||
550 | 555 | | |
551 | 556 | | |
552 | 557 | | |
553 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
554 | 562 | | |
555 | 563 | | |
556 | 564 | | |
| |||
613 | 621 | | |
614 | 622 | | |
615 | 623 | | |
| 624 | + | |
616 | 625 | | |
617 | 626 | | |
618 | 627 | | |
| |||
685 | 694 | | |
686 | 695 | | |
687 | 696 | | |
688 | | - | |
| 697 | + | |
689 | 698 | | |
690 | 699 | | |
691 | 700 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
| 616 | + | |
0 commit comments