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
|
||||
</textarea>
|
||||
</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>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
- resolve, typecheck
|
||||
- MIR
|
||||
- intermediate representation
|
||||
- CFG
|
||||
- borrow checker
|
||||
- LLVM IR
|
||||
- LLVM backend
|
||||
|
|
@ -71,6 +70,7 @@
|
|||
- dont always use it because its slow
|
||||
- dont forget about it
|
||||
- benchmark
|
||||
- todo
|
||||
- if you dont want to worry about this as an application
|
||||
- LTO
|
||||
- no cross-crate-inline-threshold
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue