rust/src/librustc_codegen_llvm
bors b355906919 Auto merge of #51131 - qnighy:unsized-locals, r=eddyb
Implement Unsized Rvalues

This PR is the first step to implement RFC1909: unsized rvalues (#48055).

## Implemented

- `Sized` is removed for arguments and local bindings. (under `#![feature(unsized_locals)]`)
- Unsized locations are allowed in MIR
- Unsized places and operands are correctly translated at codegen

## Not implemented in this PR

- Additional `Sized` checks:
  - tuple struct constructor (accidentally compiles now)
  - closure arguments at closure generation (accidentally compiles now)
  - upvars (ICEs now)
- Generating vtable for `fn method(self)` (ICEs now)
- VLAs: `[e; n]` where `n` isn't const
- Reduce unnecessary allocations

## Current status

- [x] Fix `__rust_probestack` (rust-lang-nursery/compiler-builtins#244)
  - [x] Get the fix merged
- [x] `#![feature(unsized_locals)]`
  - [x] Give it a tracking issue number
- [x] Lift sized checks in typeck and MIR-borrowck
  - [ ] <del>Forbid `A(unsized-expr)`</del> will be another PR
- [x] Minimum working codegen
- [x] Add more examples and fill in unimplemented codegen paths
- [ ] <del>Loosen object-safety rules (will be another PR)</del>
- [ ] <del>Implement `Box<FnOnce>` (will be another PR)</del>
- [ ] <del>Reduce temporaries (will be another PR)</del>
2018-08-19 12:21:56 +00:00
..
back Use the new Entry::or_default method where possible. 2018-08-18 20:19:45 +03:00
debuginfo Introduce SmallCStr and use it where applicable. 2018-08-10 11:13:00 +02:00
llvm Add Builder::array_alloca. 2018-08-19 08:06:42 +09:00
mir Integrate OperandValue::UnsizedRef into OperandValue::Ref. 2018-08-19 08:07:33 +09:00
abi.rs Integrate OperandValue::UnsizedRef into OperandValue::Ref. 2018-08-19 08:07:33 +09:00
allocator.rs rustc: Tweak visibility of some lang items 2018-08-07 08:42:38 -07:00
asm.rs rustc_codegen_llvm: use safe references for Value. 2018-07-30 19:49:18 +03:00
attributes.rs Set more llvm function attributes for __rust_try 2018-08-16 13:23:35 -07:00
base.rs Integrate OperandValue::UnsizedRef into OperandValue::Ref. 2018-08-19 08:07:33 +09:00
build.rs
builder.rs Add Builder::array_alloca. 2018-08-19 08:06:42 +09:00
callee.rs Set more llvm function attributes for __rust_try 2018-08-16 13:23:35 -07:00
Cargo.toml Building librustc_codegen_llvm in a separate directory 2018-08-06 07:00:34 -06:00
common.rs rustc_codegen_llvm: fix tidy errors. 2018-07-30 20:35:08 +03:00
consts.rs Rollup merge of #53274 - bjorn3:remove_statics_field, r=nagisa 2018-08-14 23:59:15 +08:00
context.rs Rollup merge of #53274 - bjorn3:remove_statics_field, r=nagisa 2018-08-14 23:59:15 +08:00
declare.rs Introduce SmallCStr and use it where applicable. 2018-08-10 11:13:00 +02:00
diagnostics.rs Add backticks to E0558 2018-06-24 00:16:10 +01:00
glue.rs rustc_codegen_llvm: use safe references for Value. 2018-07-30 19:49:18 +03:00
intrinsic.rs Integrate OperandValue::UnsizedRef into OperandValue::Ref. 2018-08-19 08:07:33 +09:00
lib.rs Use CGU name as LLVM module name and add some caching to CGU name generation. 2018-08-15 14:50:54 +02:00
llvm_util.rs Add wasm32 simd128 target feature 2018-08-08 01:39:52 +02:00
metadata.rs Move path2cstr to rustc_fs_util 2018-08-09 10:00:25 -06:00
meth.rs Make globals with private linkage unnamed. Fixes #50862. 2018-07-31 23:45:18 -04:00
mono_item.rs Set more llvm function attributes for __rust_try 2018-08-16 13:23:35 -07:00
README.md
type_.rs Introduce SmallCStr and use it where applicable. 2018-08-10 11:13:00 +02:00
type_of.rs [nll] librustc_codegen_llvm: remove unused mut annotation 2018-08-10 06:31:40 -04:00
value.rs rustc_codegen_llvm: use safe references for Value. 2018-07-30 19:49:18 +03:00

The codegen crate contains the code to convert from MIR into LLVM IR, and then from LLVM IR into machine code. In general it contains code that runs towards the end of the compilation process.

For more information about how codegen works, see the rustc guide.