about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/lib.rs
AgeCommit message (Collapse)AuthorLines
2019-10-31rustc_codegen_ssa: hide address ops from the declare_local interface.Eduard-Mihai Burtescu-0/+1
2019-10-27rustc, rustc_passes: don't depend on syntax_expand.Mazdak Farrokhzad-2/+1
This is done by moving some data definitions to syntax::expand.
2019-10-24rustc: Add a convenience alias for `dyn MetadataLoader + Sync`Vadim Petrochenkov-2/+2
2019-10-21Use `Symbol` for codegen unit names.Nicholas Nethercote-2/+1
This is a straightforward replacement except for two places where we have to convert to `LocalInternedString` to get a stable sort.
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-1/+2
2019-10-13Move span_invalid_monomorphization_error from cg_llvm to cg_ssabjorn3-3/+1
The associated long diagnostic didn't get registered before
2019-10-13Move some provides from cg_llvm to rustc_interfacebjorn3-5/+0
2019-10-13Remove unused method CodegenBackend::diagnosticsbjorn3-4/+0
2019-10-08Stabilize mem::take (mem_take)Jon Gjengset-1/+0
Tracking issue: https://github.com/rust-lang/rust/issues/61129
2019-10-01Rollup merge of #64840 - michaelwoerister:self-profiling-raii-refactor, ↵Tyler Mandry-2/+2
r=wesleywiser SelfProfiler API refactoring and part one of event review This PR refactors the `SelfProfiler` a little bit so that most profiling methods are RAII-based. The codegen backend code already had something similar, this refactoring pulls this functionality up into `SelfProfiler` itself, for general use. The second commit of this PR is a review and update of the existing events we are already recording. Names have been made more consistent. CGU names have been removed from event names. They will be added back in when function parameter recording is implemented. There is still some work to be done for adding new events, especially around trait resolution and the incremental system. r? @wesleywiser
2019-09-30Self-Profiling: Make names of existing events more consistent and use new API.Michael Woerister-2/+2
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-0/+1
2019-09-25Remove tx_to_llvm_workers from TyCtxtMark Rousskov-5/+8
This can be kept within the codegen backend crates entirely
2019-09-15use println!()Guanqun Lu-3/+3
2019-09-05Remove rustc_diagnostic_macros featureMark Rousskov-1/+0
2019-09-05Replace diagnostic plugins with macro_rulesMark Rousskov-3/+1
2019-08-27rustc: Handle modules in "fat" LTO more robustlyAlex Crichton-3/+4
When performing a "fat" LTO the compiler has a whole mess of codegen units that it links together. To do this it needs to select one module as a "base" module and then link everything else into this module. Previously LTO passes assume that there's at least one module in-memory to link into, but nowadays that's not always true! With incremental compilation modules may actually largely be cached and it may be possible that there's no in-memory modules to work with. This commit updates the logic of the LTO backend to handle modules a bit more uniformly during a fat LTO. This commit immediately splits them into two lists, one serialized and one in-memory. The in-memory list is then searched for the largest module and failing that we simply deserialize the first serialized module and link into that. This refactoring avoids juggling three lists, two of which are serialized modules and one of which is half serialized and half in-memory. Closes #63349
2019-07-31Deduplicate rustc_demangle in librustc_codegen_llvmAlex Crichton-0/+1
This commit removes the crates.io dependency of `rustc-demangle` from `rustc_codegen_llvm`. This crate is actually already pulled in to part of the `librustc_driver` build and with the upcoming pipelining implementation in Cargo it causes build issues if `rustc-demangle` is left to its own devices. This is not currently required, but once pipelining is enabled for rustc's own build it will be required to build correctly.
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-1/+0
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-2/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-24Merge `rustc_allocator` into `libsyntax_ext`Vadim Petrochenkov-2/+1
2019-07-07rustc: Remove `dylib` crate type from most rustc cratesAlex Crichton-0/+1
Now that procedural macros no longer link transitively to libsyntax, this shouldn't be needed any more! This commit is an experiment in removing all dynamic libraries from rustc except for librustc_driver itself. Let's see how far we can get with that!
2019-07-05Rollup merge of #61545 - flip1995:internal_lints, r=oli-obkMazdak Farrokhzad-1/+0
Implement another internal lints cc #49509 This adds ~~two~~ one internal lint~~s~~: 1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669 2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~ ~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~ TODO (not directly relevant for review): - [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) :thinking: cc @eddyb) - [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870 - [x] Check explicitly for the `{declare,impl}_lint_pass!` macros r? @oli-obk
2019-07-04Rollup merge of #62249 - czipperz:use-mem-take-instead-of-replace-default, ↵Mazdak Farrokhzad-0/+1
r=dtolnay,Centril Use mem::take instead of mem::replace with default
2019-07-03Remove needless lifetimesJeremy Stucki-1/+1
2019-07-01Enable mem_take feature in relevant cratesChris Gregory-0/+1
2019-06-24Enable internal lints in bootstrapflip1995-1/+0
2019-06-22Deny explicit_outlives_requirements in the compilerMatthew Jasper-1/+0
2019-06-18rustc: remove unused lifetimes.Eduard-Mihai Burtescu-1/+1
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-1/+1
2019-06-14Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-5/+1
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-9/+9
2019-06-12rustc_codegen_llvm: `deny(internal)`.Eduard-Mihai Burtescu-0/+1
2019-06-12rustc_codegen_llvm: `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-3/+4
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-3/+3
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-7/+7
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-4/+4
2019-06-08Remove unused `#![feature(custom_attribute)]`sVadim Petrochenkov-1/+0
2019-06-02remove unneeded depsMark Mansi-1/+0
2019-06-02move codegenunitext to rustc::mir::monoMark Mansi-1/+0
2019-06-01rustc_codegen_llvm: replace `fn noname()` with `const UNNAMED`.Eduard-Mihai Burtescu-0/+1
2019-05-29rustc_codegen_llvm: remove LLVM instruction count stats.Eduard-Mihai Burtescu-3/+2
2019-04-30Move metadata encoding earlier.Nicholas Nethercote-5/+9
This commit separates metadata encoding (`tcx.encode_metadata`) from the creation of the metadata module (which is now handled by `write_compressed_metadata`, formerly `write_metadata`). The metadata encoding now occurs slightly earlier in the pipeline, at the very start of code generation within `start_codegen`. Metadata *writing* still occurs near the end of compilation; that will be moved forward in subsequent commits.
2019-04-30In JSON output, emit a directive after metadata is generated.Nicholas Nethercote-1/+1
To implement pipelining, Cargo needs to know when metadata generation is finished. This commit adds code to do that. Unfortunately, metadata file writing currently occurs very late during compilation, so pipelining won't produce a speed-up. Moving metadata file writing earlier will be a follow-up. The change involves splitting the existing `Emitter::emit` method in two: `Emitter::emit_diagnostic` and `Emitter::emit_directive`. The JSON directives look like this: ``` {"directive":"metadata file written: liba.rmeta"} ``` The functionality is behind the `-Z emit-directives` option, and also requires `--error-format=json`.
2019-04-20Remove cg_llvm/back/link.rsbjorn3-4/+12
2019-04-20Move almost all of cg_llvm/back/link.rs to cg_ssabjorn3-4/+0
2019-04-17Rename modulesYuki OKUSHI-1/+1
2019-04-12Use measureme in self-profilerWesley Wiser-3/+2
Related to #58372 Related to #58967
2019-03-29Use ExactSizeIterator + TrustedLen instead of num_cases arg for switchbjorn3-0/+1
2019-03-27Use informational target machine for metadataSimonas Kazlauskas-3/+15
Since there is nothing to optimise there...