fix most compiler/ doctests
This commit is contained in:
parent
bf611439e3
commit
7907385999
116 changed files with 666 additions and 609 deletions
|
@ -396,15 +396,15 @@ impl Drop for Linker<'_> {
|
|||
///
|
||||
/// At a high level Thin LTO looks like:
|
||||
///
|
||||
/// 1. Prepare a "summary" of each LLVM module in question which describes
|
||||
/// the values inside, cost of the values, etc.
|
||||
/// 2. Merge the summaries of all modules in question into one "index"
|
||||
/// 3. Perform some global analysis on this index
|
||||
/// 4. For each module, use the index and analysis calculated previously to
|
||||
/// perform local transformations on the module, for example inlining
|
||||
/// small functions from other modules.
|
||||
/// 5. Run thin-specific optimization passes over each module, and then code
|
||||
/// generate everything at the end.
|
||||
/// 1. Prepare a "summary" of each LLVM module in question which describes
|
||||
/// the values inside, cost of the values, etc.
|
||||
/// 2. Merge the summaries of all modules in question into one "index"
|
||||
/// 3. Perform some global analysis on this index
|
||||
/// 4. For each module, use the index and analysis calculated previously to
|
||||
/// perform local transformations on the module, for example inlining
|
||||
/// small functions from other modules.
|
||||
/// 5. Run thin-specific optimization passes over each module, and then code
|
||||
/// generate everything at the end.
|
||||
///
|
||||
/// The summary for each module is intended to be quite cheap, and the global
|
||||
/// index is relatively quite cheap to create as well. As a result, the goal of
|
||||
|
|
|
@ -27,9 +27,9 @@ The module is thus driven from an outside client with functions like
|
|||
Internally the module will try to reuse already created metadata by
|
||||
utilizing a cache. The way to get a shared metadata node when needed is
|
||||
thus to just call the corresponding function in this module:
|
||||
|
||||
let file_metadata = file_metadata(cx, file);
|
||||
|
||||
```ignore (illustrative)
|
||||
let file_metadata = file_metadata(cx, file);
|
||||
```
|
||||
The function will take care of probing the cache for an existing node for
|
||||
that exact file path.
|
||||
|
||||
|
@ -63,7 +63,7 @@ struct List {
|
|||
|
||||
will generate the following callstack with a naive DFS algorithm:
|
||||
|
||||
```
|
||||
```ignore (illustrative)
|
||||
describe(t = List)
|
||||
describe(t = i32)
|
||||
describe(t = Option<Box<List>>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue