mirror of
https://github.com/Noratrieb/website.git
synced 2026-01-14 17:05:02 +01:00
parent
d57e076267
commit
97b2f2c4be
2 changed files with 37 additions and 2 deletions
|
|
@ -584,6 +584,41 @@ fn main() { math::add() }
|
||||||
- annoying to set up
|
- annoying to set up
|
||||||
</textarea>
|
</textarea>
|
||||||
</section>
|
</section>
|
||||||
|
<section data-markdown>
|
||||||
|
<textarea data-template>
|
||||||
|
## inlining across codegen units in the same crate
|
||||||
|
|
||||||
|
- ThinLTO across different codegen units by default
|
||||||
|
</textarea>
|
||||||
|
</section>
|
||||||
|
<section data-markdown>
|
||||||
|
<textarea data-template>
|
||||||
|
## `Cargo.toml` config
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[profile.release]
|
||||||
|
lto = "thin"
|
||||||
|
codegen-units = 1
|
||||||
|
```
|
||||||
|
</textarea>
|
||||||
|
</section>
|
||||||
|
<section data-markdown>
|
||||||
|
<textarea data-template>
|
||||||
|
## and why did `#[inline]` make the error go away?
|
||||||
|
|
||||||
|
```rust
|
||||||
|
pub fn error() {
|
||||||
|
// vvvvvvvvvvv post-mono error!
|
||||||
|
let _x: [u8; usize::MAX] = [0; usize::MAX];
|
||||||
|
}
|
||||||
|
```
|
||||||
|
</textarea>
|
||||||
|
</section>
|
||||||
|
<section data-markdown>
|
||||||
|
<textarea data-template>
|
||||||
|
## happy compiling
|
||||||
|
</textarea>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
- resolve, typecheck
|
- resolve, typecheck
|
||||||
- MIR
|
- MIR
|
||||||
- intermediate representation
|
- intermediate representation
|
||||||
- CFG
|
|
||||||
- borrow checker
|
- borrow checker
|
||||||
- LLVM IR
|
- LLVM IR
|
||||||
- LLVM backend
|
- LLVM backend
|
||||||
|
|
@ -71,6 +70,7 @@
|
||||||
- dont always use it because its slow
|
- dont always use it because its slow
|
||||||
- dont forget about it
|
- dont forget about it
|
||||||
- benchmark
|
- benchmark
|
||||||
|
- todo
|
||||||
- if you dont want to worry about this as an application
|
- if you dont want to worry about this as an application
|
||||||
- LTO
|
- LTO
|
||||||
- no cross-crate-inline-threshold
|
- no cross-crate-inline-threshold
|
||||||
|
|
@ -98,4 +98,4 @@
|
||||||
- not by rustc, but by the linker
|
- not by rustc, but by the linker
|
||||||
- across languages
|
- across languages
|
||||||
- LLVM IR from Rust, LLVM IR from clang
|
- LLVM IR from Rust, LLVM IR from clang
|
||||||
- annoying to set up
|
- annoying to set up
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue