about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
AgeCommit message (Collapse)AuthorLines
2018-11-16Generalized memset and memcpyDenis Merigoux-368/+444
2018-11-16Generalized some base.rs methodsDenis Merigoux-50/+99
2018-11-16Attempt at including CodegenCx within Builder with Associated typesDenis Merigoux-41/+52
2018-11-16Fixed typosDenis Merigoux-2/+2
2018-11-16Removed phantomdata no longer necessaryDenis Merigoux-22/+12
Because CodegenContext doesn't implement Backend anymore
2018-11-16Removing LLVM content from CommonMethods -> ConstMethodsDenis Merigoux-124/+55
2018-11-16Prefixed type methods & removed trait impl for write::CodegenContextDenis Merigoux-272/+265
2018-11-16Prefixed const methods with "const" instead of "c"Denis Merigoux-212/+212
2018-11-16Traitification of type_ methodsDenis Merigoux-407/+402
The methods are now attached to CodegenCx instead of Type
2018-11-16Added definition of type traitDenis Merigoux-1/+51
2018-11-16Use the method form for CodegenCx everywhereDenis Merigoux-55/+54
2018-11-16All CommonMethods now real methods (not static)Denis Merigoux-32/+31
2018-11-16Removed code duplication for CommonWriteMethodsDenis Merigoux-42/+36
2018-11-16CommonWriteMethods are not static any moreDenis Merigoux-85/+179
2018-11-16Split CommonMethods to accomodate for use in back/write.rsDenis Merigoux-24/+29
2018-11-16Added self argument for Codegen CommonMethod trait methodsDenis Merigoux-118/+119
2018-11-16Replaced Codegen field access by trait methodDenis Merigoux-247/+247
2018-11-16Traitification of common.rs methodsDenis Merigoux-391/+492
2018-11-16New Backend trait containing associated typesDenis Merigoux-9/+26
2018-11-16New files and folders for traitsDenis Merigoux-172/+188
Moved common enums to common
2018-11-16Use real type names rather than Self::Denis Merigoux-163/+163
2018-11-16Removed parasite yaml file and put explicit lifetimesDenis Merigoux-1/+1
2018-11-16Use associated types instead of type parameters inside the BuilderMethods traitDenis Merigoux-361/+355
2018-11-16Removed genericity over Value in various functionsDenis Merigoux-194/+165
Prelude to using associated types in traits rather than type parameters
2018-11-16Generalized AsmDialect for BuilderMethodsDenis Merigoux-10/+15
2018-11-16Generalized SynchronisationScope for BuilderMethodsDenis Merigoux-6/+24
2018-11-16Generalized AtomicOrdering for BuilderMethodsDenis Merigoux-14/+69
2018-11-16Generalized AtomicRmwBinOp for BuilderMethodsDenis Merigoux-18/+56
2018-11-16Generalized OperandBundleDef in BuilderMethodsDenis Merigoux-12/+31
2018-11-16Removed useless traits for IntPredicate and RealPredicateDenis Merigoux-14/+5
2018-11-16Generalized RealPredicateDenis Merigoux-16/+62
2018-11-16Generalized IntPredicate in the BuilderMethods traitDenis Merigoux-38/+73
2018-11-16Generalized BasicBlocks in BuilderMethods traitDenis Merigoux-8/+16
2018-11-16Generalized base.rs#call_memcpy and everything that it usesDenis Merigoux-313/+791
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-16Reduced line length to pass tidyDenis Merigoux-38/+44
Generalized FunctionCx Added ValueTrait and first change Generalize CondegenCx Generalized the Builder struct defined in librustc_codegen_llvm/builder.rs
2018-11-16Work around to fix issue https://github.com/rust-lang/rust/issues/53912Denis Merigoux-1/+4
2018-11-16rustc_codegen_llvm: begin generalizing over backend values.Irina Popa-75/+107
2018-11-15Rollup merge of #55901 - euclio:speling, r=petrochenkovPietro Albini-1/+1
fix various typos in doc comments
2018-11-15Rollup merge of #55785 - stjepang:unsized-drop-forget, r=alexcrichtonPietro Albini-1/+1
Add mem::forget_unsized() for forgetting unsized values ~~Allows passing values of `T: ?Sized` types to `mem::drop` and `mem::forget`.~~ Adds `mem::forget_unsized()` that accepts `T: ?Sized`. I had to revert the PR that removed the `forget` intrinsic and replaced it with `ManuallyDrop`: https://github.com/rust-lang/rust/pull/40559 We can't use `ManuallyDrop::new()` here because it needs `T: Sized` and we don't have support for unsized return values yet (will we ever?). r? @eddyb
2018-11-15Auto merge of #55716 - RalfJung:escape-to-raw, r=oli-obkbors-1/+2
Add escape-to-raw MIR statement Add a new MIR "ghost state statement": Escaping a ptr to permit raw accesses. ~~This includes #55549, [click here](https://github.com/RalfJung/rust/compare/miri-visitor...RalfJung:escape-to-raw) for just the new commits.~~
2018-11-13Auto merge of #55912 - kennytm:rollup, r=kennytmbors-1/+1
Rollup of 20 pull requests Successful merges: - #55136 (Remove short doc where it starts with a codeblock) - #55711 (Format BtreeMap::range_mut example) - #55722 (impl_stable_hash_for: support enums and tuple structs with generic parameters) - #55754 (Avoid converting bytes to UTF-8 strings to print, just pass bytes to stdout/err) - #55804 (rustdoc: don't inline `pub use some_crate` unless directly asked to) - #55805 (Move `static_assert!` into librustc_data_structures) - #55837 (Make PhantomData #[structural_match]) - #55840 (Fix TLS errors when downloading stage0) - #55843 (add FromIterator<A> to Box<[A]>) - #55858 (Small fixes on code blocks in rustdoc) - #55863 (Fix a typo in std::panic) - #55870 (Fix typos.) - #55874 (string: Add documentation for `From` impls) - #55879 (save-analysis: Don't panic for macro-generated use globs) - #55882 (Reference count `crate_inherent_impls`s return value.) - #55888 (miri: for uniformity, also move memory_deallocated to AllocationExtra) - #55889 (global allocators: add a few comments) - #55896 (Document optimizations enabled by FusedIterator) - #55905 (Change `Lit::short_name` to `Lit::literal_name`.) - #55908 (Fix their/there grammar nit)
2018-11-13fix various typos in doc commentsAndy Russell-2/+2
2018-11-13Rollup merge of #55870 - waywardmonkeys:typo-fixes, r=wesleywiserkennytm-1/+1
Fix typos.
2018-11-12Use type safe `VariantIdx` instead of `usize` everywhereOliver Scherer-19/+21
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-11Auto merge of #55698 - nikic:remove-llvm-4-support, r=alexcrichtonbors-59/+26
Remove support for building against LLVM 4 With emscripten removed in #55626, we no longer need to support building against LLVM 4.
2018-11-11Fix typos.Bruce Mitchener-1/+1
2018-11-11Auto merge of #54993 - TimNN:pda-tdl, r=eddybbors-3/+13
Support for the program data address space option of LLVM's Target Datalayout This was introduced recently (specifically, for AVR, cc @dylanmckay). (I came up with this when attempting to run [avr-rust](https://github.com/avr-rust/rust) rebased on the latest [rust-lang](https://github.com/rust-lang/rust) commits. If this requires a different design, some additional discussions, or is not something to pursue right now, I'd be happy to close this PR). Note that this somewhat overlaps with @DiamondLovesYou's #51576, I think, although the implementation here is significantly simpler: Since the address space applies to _all_ program data, we can just check the pointee's type whenever we create an LLVM pointer type. If it is a function we use the program data address space; if not we use the default address space. cc @eddyb, who has been reviewing #51576 Ref: https://llvm.org/docs/LangRef.html#data-layout
2018-11-10Auto merge of #54864 - ljedrz:cleanup_codegen_llvm_back, r=Mark-Simulacrumbors-139/+110
Cleanup codegen_llvm/back - improve allocations - use `Cow<'static, str>` where applicable - use `to_owned` instead of `to_string` with string literals - remove a redundant `continue` - possible minor speedup in logic - use `mem::replace` instead of `swap` where more concise - remove `'static` from consts - improve common patterns - remove explicit `return`s - whitespace & formatting fixes
2018-11-10Auto merge of #55650 - nikic:funnel-shift, r=nagisabors-5/+45
Implement rotate using funnel shift on LLVM >= 7 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. Fixes #52457.