about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo
AgeCommit message (Collapse)AuthorLines
2018-11-16Prefixed const methods with "const" instead of "c"Denis Merigoux-3/+3
2018-11-16Traitification of type_ methodsDenis Merigoux-3/+2
The methods are now attached to CodegenCx instead of Type
2018-11-16Use the method form for CodegenCx everywhereDenis Merigoux-2/+2
2018-11-16Replaced Codegen field access by trait methodDenis Merigoux-7/+7
2018-11-16Traitification of common.rs methodsDenis Merigoux-6/+7
2018-11-16New files and folders for traitsDenis Merigoux-3/+3
Moved common enums to common
2018-11-16Removed genericity over Value in various functionsDenis Merigoux-1/+1
Prelude to using associated types in traits rather than type parameters
2018-11-16Generalized base.rs#call_memcpy and everything that it usesDenis Merigoux-2/+8
Generalized operand.rs#nontemporal_store and fixed tidy issues Generalized operand.rs#nontemporal_store's implem even more With a BuilderMethod trait implemented by Builder for LLVM Cleaned builder.rs : no more code duplication, no more ValueTrait Full traitification of builder.rs
2018-11-12Use type safe `VariantIdx` instead of `usize` everywhereOliver Scherer-5/+5
2018-11-12Auto merge of #55701 - tromey:ice-fix, r=matthewjasperbors-4/+4
Fix emission of niche-filling discriminant values Bug #55606 points out a regression introduced by #54004; namely that an assertion can erroneously fire when a niche-filling discriminant value is emitted. This fixes the bug by removing the assertion, and furthermore by arranging for the discriminant value to be masked according to the size of the niche. This makes handling the discriminant a bit simpler for debuggers. The test case is from Jonathan Turner. Closes #55606
2018-11-05Fix emission of niche-filling discriminant valuesTom Tromey-4/+4
Bug #55606 points out a regression introduced by #54004; namely that an assertion can erroneously fire when a niche-filling discriminant value is emitted. This fixes the bug by removing the assertion, and furthermore by arranging for the discriminant value to be masked according to the size of the niche. This makes handling the discriminant a bit simpler for debuggers. The test case is from Jonathan Turner. Closes #55606
2018-11-03Implement rotate using funnel shift on LLVM >= 7Nikita Popov-3/+3
Implement the rotate_left and rotate_right operations using llvm.fshl and llvm.fshr if they are available (LLVM >= 7). Originally I wanted to expose the funnel_shift_left and funnel_shift_right intrinsics and implement rotate_left and rotate_right on top of them. However, emulation of funnel shifts requires emitting a conditional to check for zero shift amount, which is not necessary for rotates. I was uncomfortable doing that here, as I don't want to rely on LLVM to optimize away that conditional (and for variable rotates, I'm not sure it can). We should revisit that question when we raise our minimum version requirement to LLVM 7 and don't need emulation code anymore.
2018-11-03Move `BoundTy` to `ty::TyKind`scalexm-0/+1
2018-10-30Avoid possible integer overflow in niche value computationTom Tromey-2/+5
@eddyb pointed out in review that the niche value computation had a possible integer overflow problem, fixed here as he suggested.
2018-10-30Address review commentsTom Tromey-11/+11
This fixes the issues pointed out in review.
2018-10-30Fix DWARF generation for enumsTom Tromey-144/+379
The DWARF generated for Rust enums was always somewhat unusual. Rather than using DWARF constructs directly, it would emit magic field names like "RUST$ENCODED$ENUM$0$Name" and "RUST$ENUM$DISR". Since PR #45225, though, even this has not worked -- the ad hoc scheme was not updated to handle the wider variety of niche-filling layout optimizations now available. This patch changes the generated DWARF to use the standard tags meant for this purpose; namely, DW_TAG_variant and DW_TAG_variant_part. The patch to implement this went in to LLVM 7. In order to work with older versions of LLVM, and because LLVM doesn't do anything here for PDB, the existing code is kept as a fallback mode. Support for this DWARF is in the Rust lldb and in gdb 8.2. Closes #32920 Closes #32924 Closes #52762 Closes #53153
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-13/+5
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-6/+6
2018-10-18Rollup merge of #54933 - ljedrz:cleanup_codegen_llvm/misc, r=varkorkennytm-64/+58
Cleanup the rest of codegen_llvm - improve common patterns - convert string literals with `to_owned` - remove explicit `return`s - whitespace & formatting improvements
2018-10-16end return statements and void expressions with a semicolonljedrz-6/+6
2018-10-13Check the invariant for `principal` inside the methodOliver Scherer-14/+7
2018-10-09codegen_llvm/misc: convert string literals with to_ownedljedrz-5/+5
2018-10-09codegen_llvm/misc: improve common patternsljedrz-38/+32
2018-10-09codegen_llvm/misc: remove explicit returnsljedrz-5/+5
2018-10-09codegen_llvm/misc: whitespace & formatting improvementsljedrz-16/+16
2018-10-03Introduce `TyKind::UnnormalizedProjection`scalexm-0/+1
2018-09-30use is_uninhabited in more placesJorge Aparicio-1/+1
2018-09-29Revert "Auto merge of #53508 - japaric:maybe-uninit, r=RalfJung"Ralf Jung-1/+1
This reverts commit c6e3d7fa3113aaa64602507f39d4627c427742ff, reversing changes made to 4591a245c7eec9f70d668982b1383cd2a6854af5.
2018-09-22use is_uninhabited in more placesJorge Aparicio-1/+1
2018-09-20Rollup merge of #54233 - irinagpopa:llvm-3.9, r=tromeykennytm-7/+1
Remove LLVM 3.9 workaround.
2018-09-18Merge indexed_set.rs into bitvec.rs, and rename it bit_set.rs.Nicholas Nethercote-3/+3
Currently we have two files implementing bitsets (and 2D bit matrices). This commit combines them into one, taking the best features from each. This involves renaming a lot of things. The high level changes are as follows. - bitvec.rs --> bit_set.rs - indexed_set.rs --> (removed) - BitArray + IdxSet --> BitSet (merged, see below) - BitVector --> GrowableBitSet - {,Sparse,Hybrid}IdxSet --> {,Sparse,Hybrid}BitSet - BitMatrix --> BitMatrix - SparseBitMatrix --> SparseBitMatrix The changes within the bitset types themselves are as follows. ``` OLD OLD NEW BitArray<C> IdxSet<T> BitSet<T> -------- ------ ------ grow - grow new - (remove) new_empty new_empty new_empty new_filled new_filled new_filled - to_hybrid to_hybrid clear clear clear set_up_to set_up_to set_up_to clear_above - clear_above count - count contains(T) contains(&T) contains(T) contains_all - superset is_empty - is_empty insert(T) add(&T) insert(T) insert_all - insert_all() remove(T) remove(&T) remove(T) words words words words_mut words_mut words_mut - overwrite overwrite merge union union - subtract subtract - intersect intersect iter iter iter ``` In general, when choosing names I went with: - names that are more obvious (e.g. `BitSet` over `IdxSet`). - names that are more like the Rust libraries (e.g. `T` over `C`, `insert` over `add`); - names that are more set-like (e.g. `union` over `merge`, `superset` over `contains_all`, `domain_size` over `num_bits`). Also, using `T` for index arguments seems more sensible than `&T` -- even though the latter is standard in Rust collection types -- because indices are always copyable. It also results in fewer `&` and `*` sigils in practice.
2018-09-14Remove LLVM 3.9 workaround.Unknown-7/+1
2018-09-11renamed is_nil to is_unitkenta7777-1/+1
2018-09-11Revert "renamed is_nil to is_unit"kenta7777-1/+1
This reverts commit 6f685ffad42a2d12dd1fad5ccb0471e7fa260826.
2018-09-10renamed is_nil to is_unitkenta7777-1/+1
2018-09-05Changing TyAnon -> TyOpaque and relevant functionsms2300-1/+1
2018-08-23use String::new() instead of String::from(""), "".to_string(), "".to_owned() ↵Matthias Krüger-2/+2
or "".into()
2018-08-22Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str}varkor-18/+18
2018-08-22Remove Ty prefix from Ty{Foreign|Param}varkor-3/+3
2018-08-22Remove Ty prefix from ↵varkor-42/+42
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-22miri/CTFE refactorRalf Jung-0/+1
* Value gets renamed to Operand, so that now interpret::{Place, Operand} are the "dynamic" versions of mir::{Place, Operand}. * Operand and Place share the data for their "stuff is in memory"-base in a new type, MemPlace. This also makes it possible to give some more precise types in other areas. Both Operand and MemPlace have methods available to project into fields (and other kinds of projections) without causing further allocations. * The type for "a Scalar or a ScalarPair" is called Value, and again used to give some more precise types. * All of these have versions with an attached layout, so that we can more often drag the layout along instead of recomputing it. This lets us get rid of `PlaceExtra::Downcast`. MPlaceTy and PlaceTy can only be constructed in place.rs, making sure the layout is handled properly. (The same should eventually be done for ValTy and OpTy.) * All the high-level functions to write typed memory take a Place, and live in place.rs. All the high-level typed functions to read typed memory take an Operand, and live in operands.rs.
2018-08-19mv codemap() source_map()Donato Sciarra-2/+2
2018-08-19mv FileMap SourceFileDonato Sciarra-1/+1
2018-08-10Introduce SmallCStr and use it where applicable.Michael Woerister-43/+42
2018-08-10Introduce const_cstr!() macro and use it where applicable.Michael Woerister-2/+2
2018-08-09Move Fingerprint to data structuresMark Rousskov-1/+2
2018-08-09Move path2cstr to rustc_fs_utilMark Rousskov-1/+1
2018-08-04Normalize DebugInfoLevel to standard styleMark Rousskov-6/+6
2018-08-01Split out growth functionality into BitVector typeMark Rousskov-3/+3
2018-07-30rustc_codegen_llvm: fix ownership of DIBuilder.Irina Popa-4/+14