]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #8421 : alexcrichton/rust/unnamed-addr, r=thestinger
authorbors <bors@rust-lang.org>
Sun, 11 Aug 2013 14:29:07 +0000 (07:29 -0700)
committerbors <bors@rust-lang.org>
Sun, 11 Aug 2013 14:29:07 +0000 (07:29 -0700)
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!

1  2 
src/librustc/lib/llvm.rs
src/librustc/middle/trans/base.rs
src/libsyntax/ext/ifmt.rs

Simple merge
Simple merge
Simple merge