summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo/mod.rs
AgeCommit message (Collapse)AuthorLines
2019-12-11rustc: Link LLVM directly into rustc againAlex Crichton-0/+1
This commit builds on #65501 continue to simplify the build system and compiler now that we no longer have multiple LLVM backends to ship by default. Here this switches the compiler back to what it once was long long ago, which is linking LLVM directly to the compiler rather than dynamically loading it at runtime. The `codegen-backends` directory of the sysroot no longer exists and all relevant support in the build system is removed. Note that `rustc` still supports a dynamically loaded codegen backend as it did previously, it just no longer supports dynamically loaded codegen backends in its own sysroot. Additionally as part of this the `librustc_codegen_llvm` crate now once again explicitly depends on all of its crates instead of implicitly loading them through the sysroot. This involved filling out its `Cargo.toml` and deleting all the now-unnecessary `extern crate` annotations in the header of the crate. (this in turn required adding a number of imports for names of macros too). The end results of this change are: * Rustbuild's build process for the compiler as all the "oh don't forget the codegen backend" checks can be easily removed. * Building `rustc_codegen_llvm` is much simpler since it's simply another compiler crate. * Managing the dependencies of `rustc_codegen_llvm` is much simpler since it's "just another `Cargo.toml` to edit" * The build process should be a smidge faster because there's more parallelism in the main rustc build step rather than splitting `librustc_codegen_llvm` out to its own step. * The compiler is expected to be slightly faster by default because the codegen backend does not need to be dynamically loaded. * Disabling LLVM as part of rustbuild is still supported, supporting multiple codegen backends is still supported, and dynamic loading of a codegen backend is still supported.
2019-12-04Migrate to LLVM{Get,Set}ValueName2Josh Stone-18/+6
The deprecated `LLVM{Get,Set}ValueName` only work with NUL-terminated strings, but the `2` variants use explicit lengths, which fits better with Rust strings and slices. We now use these in new helper functions `llvm::{get,set}_value_name` that convert to/from `&[u8]`.
2019-12-03rustc_codegen_llvm: rewrite debuginfo::get_function_signature to use FnAbi.Eduard-Mihai Burtescu-33/+12
2019-12-03rustc_codegen_ssa: use FnAbi::of_instance wherever possible.Eduard-Mihai Burtescu-3/+10
2019-10-31rustc_codegen_ssa: hide address ops from the declare_local interface.Eduard-Mihai Burtescu-48/+53
2019-10-31rustc_codegen_ssa: move debuginfo scopes into FunctionDebugContext.Eduard-Mihai Burtescu-25/+26
2019-10-31rustc_codegen_ssa: change set_var_name back to taking a &str.Eduard-Mihai Burtescu-2/+2
2019-10-31rustc_codegen_ssa: move debuginfo-related things to a new mir::debuginfo module.Eduard-Mihai Burtescu-5/+6
2019-10-21Convert some `InternedString`s to `Symbols`.Nicholas Nethercote-2/+2
This avoids the needs for various conversions, and makes the code slightly faster, because `Symbol` comparisons and hashing is faster.
2019-10-05Replaces some instances of `as *[const | mut] _` with `.cast()`memoryruins-3/+3
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-1/+1
2019-09-26Rename `subst::Kind` to `subst::GenericArg`varkor-2/+2
2019-09-25Rename `sty` to `kind`varkor-4/+4
2019-09-06rustc_codegen_llvm: give names to non-alloca variable values.Eduard-Mihai Burtescu-3/+32
2019-09-04Remove `LocalInternedString` uses from `librustc/ty/`.Nicholas Nethercote-1/+1
This is not a compelling change in isolation, but it is a necessary step.
2019-06-02remove reexport of rustc::ty::InstanceMark Mansi-2/+1
2019-05-28Changes the type `mir::Mir` into `mir::Body`Claude-Alban RANÉLY-VERGÉ-DÉPRÉ-2/+2
The commit should have changed comments as well. At the time of writting, it passes the tidy and check tool. Revisions asked by eddyb : - Renamed of all the occurences of {visit/super}_mir - Renamed test structures `CachedMir` to `Cached` Fixing the missing import on `AggregateKind`
2019-05-20Avoid symbol interning in `file_metadata`.Nicholas Nethercote-2/+2
This commit changes `created_files` so it uses strings directly as keys, rather than symbols derived from the strings. This avoids the cost of having to do the hash table lookups to produce the symbols from the strings. The commit also uses `entry` to avoid doing a repeated hash table lookup (`get` + `insert`). Note that PR #60467 improved this code somewhat; this is a further improvement.
2019-05-02Avoid repeated interning of static strings.Nicholas Nethercote-1/+1
`file_metadata_raw` interns the strings `"<unknown>"` and `""` very frequently. This commit avoids that, which reduces the number of symbols interned significantly and reduces instruction counts by up to 0.5% on some workloads.
2019-04-26Update handling of Tuplevarkor-1/+1
2019-04-23rustc_codegen_ssa: rename debuginfo_upvar_decls_ops_sequence to ↵Eduard-Mihai Burtescu-1/+1
debuginfo_upvar_ops_sequence.
2019-04-20Move cg_llvm/debuginfo/type_names.rs to cg_ssabjorn3-3/+2
2019-04-05rustc: Start implementing compat with LLVM 9Alex Crichton-6/+5
This commit doesn't actually migrate to LLVM 9, but it brings our own C++ bindings in line with LLVM 9 and able to compile against tip of tree. The changes made were: * The `MainSubprogram` flag for debuginfo moved between flag types. * Iteration of archive members was tweaked slightly and we have to construct the two iterators before constructing the returned `RustArchiveIterator` value. * The `getOrInsertFunction` binding now returns a wrapper which we use `getCallee()` on to get the value we're interested in.
2019-03-29Move get_param and set_value_namebjorn3-0/+7
2019-03-29[WIP] Make some debug info methods take &mut FunctionDebugContextbjorn3-2/+2
declare_local still takes &FunctionDebugContext, because of borrowck errors
2019-03-29Remove internal mutability from source_locations_enabledbjorn3-3/+3
2019-02-27rename Substs to InternalSubstscsmoe-2/+2
Change-Id: I3fa00e999a2ee4eb72db1fdf53a8633b49176a18
2019-02-25librustc_codegen_llvm: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-4/+4
2019-02-18librustc_codegen_llvm => 2018Taiki Endo-7/+7
2019-02-10rustc: doc commentsAlexander Regueiro-1/+1
2019-01-25Rebase to the llvm-project monorepoJosh Stone-5/+10
The new git submodule src/llvm-project is a monorepo replacing src/llvm and src/tools/{clang,lld,lldb}. This also serves as a rebase for these projects to the new 8.x branch from trunk. The src/llvm-emscripten fork is unchanged for now.
2019-01-15Querify entry_fnIgor Matuszewski-4/+3
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-06Use a function to access the Hir map to be able to turn it into a query laterJohn Kåre Alsaker-1/+1
2018-11-23Auto merge of #54071 - eddyb:alignsssss, r=oli-obkbors-1/+1
rustc_target: separate out an individual alignment quantity type from Align. Before this PR, `rustc_target::abi::Align` combined "power-of-two alignment quantity" semantics, with a distinction between ABI (required) and preferred alignment (by having two quantities). After this PR, `Align` is only *one* such quantity, and a new `AbiAndPrefAlign` type is introduced to hold the pair of ABI and preferred `Align` quantities. `Align` is used everywhere one quantity is necessary/sufficient, simplifying some of the code in codegen/miri, while `AbiAndPrefAlign` only in layout computation (to propagate preferred alignment). r? @oli-obk cc @nagisa @RalfJung @nikomatsakis
2018-11-22rustc_target: avoid using AbiAndPrefAlign where possible.Eduard-Mihai Burtescu-1/+1
2018-11-22rustc_target: separate out an individual Align from AbiAndPrefAlign.Eduard-Mihai Burtescu-1/+1
2018-11-21rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns.Eduard-Mihai Burtescu-1/+1
2018-11-16[eddyb] rustc_codegen_ssa: rename `interfaces` to `traits`.Eduard-Mihai Burtescu-1/+1
2018-11-16All Builder methods now take &mut self instead of &selfDenis Merigoux-3/+3
2018-11-16Finished moving backend-agnostic code to rustc_codegen_ssaDenis Merigoux-7/+8
2018-11-16Great separation of librustc_codegen_llvm: librustc_codegen_ssa compilesDenis Merigoux-55/+16
2018-11-16Preparing the generalization of base:compile_coodegen_unitDenis Merigoux-0/+4
2018-11-16Move doc to trait declarationsDenis Merigoux-6/+0
2018-11-16Generalized base:maybe_create_entry_wrapperDenis Merigoux-0/+3
2018-11-16Generalized mir::codegen_mir (and all subsequent functions)Denis Merigoux-314/+356
2018-11-16Generalized base::unsized_infoDenis Merigoux-1/+0
2018-11-16Replaced Codegen field access by trait methodDenis Merigoux-1/+1
2018-11-16New files and folders for traitsDenis Merigoux-1/+1
Moved common enums to common