rust/src/librustc_codegen_llvm
Mazdak Farrokhzad 97bee3a793
Rollup merge of #66877 - skinny121:const-eval-entry-points, r=oli-obk
Add simpler entry points to const eval for common usages.

I found the `tcx.const_eval` API to be complex/awkward to work with, because of the inherent complexity from all of the different situations it is called from. Though it mainly used in one of the following ways:
- Evaluates the value of a constant without any substitutions, e.g. evaluating a static, discriminant, etc.
- Evaluates the value of a resolved instance of a constant. this happens when evaluating unevaluated constants or normalising trait constants.
- Evaluates a promoted constant.

This PR adds three new functions `const_eval_mono`, `const_eval_resolve`, and `const_eval_promoted` to `TyCtxt`, which each cater to one of the three ways `tcx.const_eval`
 is normally used.
2019-12-22 19:46:07 +01:00
..
back save LTO import information and check it when trying to reuse build products. 2019-12-20 04:47:28 +01:00
debuginfo rustc: Link LLVM directly into rustc again 2019-12-11 09:50:11 -05:00
llvm Fix weird implicit dependency between rustllvm and rustc_codegen_llvm 2019-12-12 10:51:19 -05:00
abi.rs Fix fallout from rebase 2019-12-11 09:50:12 -05:00
allocator.rs rustc: Link LLVM directly into rustc again 2019-12-11 09:50:11 -05:00
asm.rs rustc: Link LLVM directly into rustc again 2019-12-11 09:50:11 -05:00
attributes.rs Rollup merge of #67363 - alexcrichton:wasm-import-modules, r=eddyb 2019-12-20 17:22:22 +01:00
base.rs Use Symbol for codegen unit names. 2019-10-21 18:30:40 +11:00
build.rs Remove licenses 2018-12-25 21:08:33 -07:00
builder.rs rustc: Link LLVM directly into rustc again 2019-12-11 09:50:11 -05:00
callee.rs rustc: Link LLVM directly into rustc again 2019-12-11 09:50:11 -05:00
Cargo.toml Fix fallout from rebase 2019-12-11 09:50:12 -05:00
common.rs 1. ast::Mutability::{Mutable -> Mut, Immutable -> Not}. 2019-12-20 22:22:44 +01:00
consts.rs Rollup merge of #66877 - skinny121:const-eval-entry-points, r=oli-obk 2019-12-22 19:46:07 +01:00
context.rs rustc: Link LLVM directly into rustc again 2019-12-11 09:50:11 -05:00
declare.rs rustc: Link LLVM directly into rustc again 2019-12-11 09:50:11 -05:00
intrinsic.rs Rollup merge of #66877 - skinny121:const-eval-entry-points, r=oli-obk 2019-12-22 19:46:07 +01:00
lib.rs Remove extern crate declarations 2019-12-11 09:50:12 -05:00
llvm_util.rs Remove rarely used -Zdisable_instrumentation_preinliner flag. 2019-12-20 17:08:46 +01:00
metadata.rs rustc: Link LLVM directly into rustc again 2019-12-11 09:50:11 -05:00
mono_item.rs rustc: Link LLVM directly into rustc again 2019-12-11 09:50:11 -05:00
README.md rustc-guide has moved 2018-11-26 15:03:13 -06:00
type_.rs rustc: Link LLVM directly into rustc again 2019-12-11 09:50:11 -05:00
type_of.rs rustc: Link LLVM directly into rustc again 2019-12-11 09:50:11 -05:00
va_arg.rs Expose VaListImpl as the Rust equivalent of __va_list_tag and implement Clone for it. 2019-06-17 16:04:49 -07:00
value.rs librustc_codegen_llvm: deny(elided_lifetimes_in_paths) 2019-02-25 08:40:18 +01: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.