diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-09-13 20:26:39 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-09-17 10:25:50 -0700 |
| commit | 6d614ddc2ebc25d3987b1efc84c0c7fea00ce325 (patch) | |
| tree | 92b7f2d6ef29e86f4e09bad8b818c3f2a414a6d2 /src/rustllvm/RustWrapper.cpp | |
| parent | 3021c1d0bf45d7628f6bf75aefce952ddf26193d (diff) | |
| download | rust-6d614ddc2ebc25d3987b1efc84c0c7fea00ce325.tar.gz rust-6d614ddc2ebc25d3987b1efc84c0c7fea00ce325.zip | |
rustc: Move codegen to a query
This commit moves the actual code generation in the compiler behind a query keyed by a codegen unit's name. This ended up entailing quite a few internal refactorings to enable this, along with a few cut corners: * The `OutputFilenames` structure is now tracked in the `TyCtxt` as it affects a whole bunch of trans and such. This is now behind a query and threaded into the construction of the `TyCtxt`. * The `TyCtxt` now has a channel "out the back" intended to send data to worker threads in rustc_trans. This is used as a sort of side effect of the codegen query but morally what's happening here is the return value of the query (currently unit but morally a path) is only valid once the background threads have all finished. * Dispatching work items to the codegen threads was refactored to only rely on data in `TyCtxt`, which mostly just involved refactoring where data was stored, moving it from the translation thread to the controller thread's `CodegenContext` or the like. * A new thread locals was introduced in trans to work around the query system. This is used in the implementation of `assert_module_sources` which looks like an artifact of the old query system and will presumably go away once red/green is up and running.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
