| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
Because CodegenContext doesn't implement Backend anymore
|
|
|
|
|
|
|
|
The methods are now attached to CodegenCx instead of Type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Moved common enums to common
|
|
|
|
|
|
|
|
Prelude to using associated types in traits rather than type parameters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
Generalized FunctionCx
Added ValueTrait and first change
Generalize CondegenCx
Generalized the Builder struct defined in librustc_codegen_llvm/builder.rs
|
|
|
|
|
|
fix various typos in doc comments
|
|
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
|
|
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.~~
|
|
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)
|
|
|
|
Fix typos.
|
|
|
|
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
|
|
Remove support for building against LLVM 4
With emscripten removed in #55626, we no longer need to support building against LLVM 4.
|
|
|
|
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
|
|
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
|
|
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.
|