summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
AgeCommit message (Collapse)AuthorLines
2020-04-20Expand comment to justify not checking if all the exports are green.Felix S. Klock II-0/+17
2020-04-20Issue #71248: attempt to recover perf by removing `exports_all_green` flag.Felix S. Klock II-10/+5
(My hypothesis is that my use of this flag was an overly conservative generalization of PR 67020.)
2020-04-17Incorporated review feedback:Felix S. Klock II-22/+40
Renamed the struct to make it a little clearer that it doesn't just hold one imports map. (I couldn't bring myself to write it as `ThinLTOImportsExports` though, mainly since the exports map is literally derived from the imports map data.) Added some doc to the struct too. Revised comments to add link to the newer issue that discusses why the exports are relevant. Renamed a few of the methods so that the two character difference is more apparent (because 1. the method name is shorter and, perhaps more importantly, the changed characters now lie at the beginning of the method name.)
2020-04-17If an LLVM module's exports change, cannot reuse its post-LTO object file inFelix S. Klock II-4/+33
incremental compilation. This is symmetric to PR #67020, which handled the case where the LLVM module's *imports* changed. This commit builds upon the infrastructure added there; the export map is just the inverse of the import map, so we can build the export map at the same time that we load the serialized import map. Fix #69798
2020-03-10Rollup merge of #69836 - JohnTitor:immediate-outputs, r=nagisaMazdak Farrokhzad-2/+8
Check if output is immediate value Fixes #62046 r? @nagisa
2020-03-09Avoid unnecessary interning of enum variant part idTomasz Miąsko-4/+1
2020-03-09Use slices in preference to 0-terminated stringsTomasz Miąsko-128/+179
Additionally whenever possible match C API provided by the LLVM.
2020-03-09Check if output is immediate valueYuki Okushi-2/+8
2020-03-08Rollup merge of #69734 - tmiasko:di-enumerator, r=ecstatic-morseMazdak Farrokhzad-8/+19
Change DIBuilderCreateEnumerator signature to match LLVM 9 * Change DIBuilderCreateEnumerator signature to match LLVM 9 C API. * Use provided is unsigned flag when emitting enumerators.
2020-03-07Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkovMazdak Farrokhzad-5/+5
fix various typos
2020-03-07Rollup merge of #69667 - JohnTitor:no-debug, r=nikomatsakisMazdak Farrokhzad-12/+1
Remove the `no_debug` feature Context: https://github.com/rust-lang/rust/issues/29721#issuecomment-367642779 r? @nikomatsakis
2020-03-06Don't redundantly repeat field names (clippy::redundant_field_names)Matthias Krüger-1/+1
2020-03-06fix various typosMatthias Krüger-5/+5
2020-03-05Rollup merge of #69736 - matthiaskrgr:even_more_clippy, r=Dylan-DPCDylan DPC-1/+1
even more clippy cleanups * Don't pass &mut where immutable reference (&) is sufficient (clippy::unnecessary_mut_passed) * Use more efficient &&str to String conversion (clippy::inefficient_to_string) * Don't always eval arguments inside .expect(), use unwrap_or_else and closure. (clippy::expect_fun_call) * Use righthand '&' instead of lefthand "ref". (clippy::toplevel_ref_arg) * Use simple 'for i in x' loops instead of 'while let Some(i) = x.next()' loops on iterators. (clippy::while_let_on_iterator) * Const items have by default a static lifetime, there's no need to annotate it. (clippy::redundant_static_lifetimes) * Remove redundant patterns when matching ( x @ _ to x) (clippy::redundant_pattern)
2020-03-05debuginfo: Use is unsigned flag when emitting enumeratorsTomasz Miąsko-1/+6
2020-03-05debuginfo: Generators use u32 as discriminant type reprTomasz Miąsko-3/+3
2020-03-05Use more efficient &&str to String conversion (clippy::inefficient_to_string)Matthias Krüger-1/+1
2020-03-05Change DIBuilderCreateEnumerator signature to match LLVM 9Tomasz Miąsko-7/+13
No functional changes intended.
2020-03-04Don't use "if let" bindings to only check a value and not actually bind ↵Matthias Krüger-1/+1
anything. For example: `if let Some(_) = foo() {}` can be reduced to `if foo().is_some() {}` (clippy::redundant_pattern_matching)
2020-03-04Don't use .ok() before unwrapping via .expect() on a Result.Matthias Krüger-1/+0
The Result can be expect-unwrapped directly. (clippy::ok_expect)
2020-03-03Remove the `no_debug` featureYuki Okushi-12/+1
2020-03-03use conditions directlyMatthias Krüger-2/+1
2020-03-01Rollup merge of #69569 - matthiaskrgr:nonminimal_bool, r=mark-SimulacrumDylan DPC-1/+1
simplify boolean expressions
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-15/+15
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-29simplify boolean expressionsMatthias Krüger-1/+1
2020-02-29Rollup merge of #69551 - matthiaskrgr:len_zero, r=Mark-SimulacrumDylan DPC-2/+2
use is_empty() instead of len() == x to determine if structs are empty.
2020-02-28use is_empty() instead of len() == x to determine if structs are empty.Matthias Krüger-2/+2
2020-02-27use char instead of &str for single char patternsMatthias Krüger-1/+1
2020-02-15Change `const_field` and `const_caller_location` to return `ConstValue` ↵Ben Lewis-2/+1
instead of `Const` as the type in the returned const isn't needed.
2020-02-15Change const eval to return `ConstValue`, instead of `Const` as the type ↵Ben Lewis-6/+5
inside it shouldn't be used.
2020-02-13add selfprofiling for new llvm passmanagerAndreas Jonson-2/+88
2020-02-12Rollup merge of #67954 - nikic:new-pm, r=nagisaDylan DPC-32/+193
Support new LLVM pass manager Add support for the new LLVM pass manager behind a `-Z new-llvm-pass-manager=on` option. Both the pre-link optimization and LTO pipelines use the new pass manager. There's some bits that are not supported yet: * `-C passes`. NewPM requires an entirely different way of specifying custom pass pipelines. We should probably expose that functionality, but it doesn't directly map to what `-C passes` does. * NewPM has no support for custom inline parameters right now. We'd have to add upstream support for that first. * NewPM does not support PGO at O0 in LLVM 9 (which is why those tests fail with NewPM enabled). This is supported in LLVM 10. * NewPM does not support MergeFunctions in LLVM 9. I've landed this upstream just before the cut, so we'll be able to re-enable that with LLVM 10. Closes #64289. r? @ghost
2020-02-12Add support for new pass managerNikita Popov-18/+170
The new pass manager can be enabled using -Z new-llvm-pass-manager=on.
2020-02-12Fix mangled names of lifetime intrinsicsNikita Popov-4/+4
2020-02-12Use IRBuilder to create memsetNikita Popov-10/+19
To avoid creating memsets with outdated signature. For some reason SROA chokes on this when using NewPM.
2020-02-12Rollup merge of #69089 - nox:sym64-crash, r=eddybDylan DPC-0/+2
Properly use the darwin archive format on Apple targets See https://github.com/servo/servo/issues/25550.
2020-02-12Properly use the darwin archive format on Apple targetsAnthony Ramine-0/+2
See https://github.com/servo/servo/issues/25550.
2020-02-12Rollup merge of #68487 - 0dvictor:nolink, r=tmandryYuki Okushi-2/+2
[experiment] Support linking from a .rlink file Flag `-Z no-link` was previously introduced, which allows creating an `.rlink` file to perform compilation without linking. This change enables linking from an `.rlink` file. Part of Issue #64191
2020-02-11Rollup merge of #66498 - bjorn3:less_feature_flags, r=Dylan-DPCDylan DPC-18/+13
Remove unused feature gates I think many of the remaining unstable things can be easily be replaced with stable things. I have kept the `#![feature(nll)]` even though it is only necessary in `libstd`, to make regressions of it harder.
2020-02-11Support linking from a .rlink fileVictor Ding-2/+2
Flag `-Z no-link` was previously introduced, which allows creating an `.rlink` file to perform compilation without linking. This change enables linking from an `.rlink` file.
2020-02-10Rollup merge of #68932 - ↵Dylan DPC-57/+69
michaelwoerister:self-profile-generic-activity-args, r=wesleywiser self-profile: Support arguments for generic_activities. This PR adds support for recording arguments of "generic activities". The most notable use case is LLVM module names, which should be very interesting for `crox` profiles. In the future it might be interesting to add more fine-grained events for pre-query passes like macro expansion. I tried to judiciously de-duplicate existing self-profile events with `extra_verbose_generic_activity`, now that the latter also generates self-profile events. r? @wesleywiser
2020-02-10self-profile: Support arguments for generic_activities.Michael Woerister-57/+69
2020-02-09Rollup merge of #68881 - eddyb:always-preserve-dbg-vars, r=nagisaJonas Schievink-1/+1
rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables Making this depend on the optimization level appears to have been a copy-paste mistake (other LLVM functions called in this module also take a `bool` argument, but there it means something unrelated). Also see https://github.com/rust-lang/rust/pull/8855#discussion_r374392128. I don't believe we have any reason to let LLVM omit user variables from DWARF, and we were already setting this to `true` when LLVM *could* optimize them away, so this PR should have no effect anyway. r? @michaelwoerister or @nagisa cc @hanna-kruppe @nikomatsakis
2020-02-08rustc_codegen_ssa: remove unnecessary source_locations_enabled.Eduard-Mihai Burtescu-34/+9
2020-02-08rustc_codegen_llvm: remove InternalDebugLocation and simplify dbg_var_addr.Eduard-Mihai Burtescu-66/+35
2020-02-08rustc_codegen_llvm: remove unnecessary special-casing of root scopes' children.Eduard-Mihai Burtescu-8/+2
2020-02-07Rustfmtbjorn3-7/+9
2020-02-06rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables.Eduard-Mihai Burtescu-1/+1
2020-02-05Apply LLVM sanitize attributes to generated entry wrapperTomasz Miąsko-22/+31