rust/compiler/rustc_codegen_llvm/src
bors 6f1bbf5ee0 Auto merge of #76071 - khyperia:configurable_to_immediate, r=eddyb
Make to_immediate/from_immediate configurable by backends

`librustc_codegen_ssa` has the concept of an immediate vs. memory type, and `librustc_codegen_llvm` uses this distinction to implement `bool`s being `i8` in memory, and `i1` in immediate contexts. However, some of that implementation leaked into `codegen_ssa` when converting to/from immediate values. So, move those methods into builder traits, so that behavior can be configured by backends.

This is useful if a backend is able to keep bools as bools, or, needs to do more trickery than just bools to bytes.

(Note that there's already a large amount of things abstracted with "immediate types" - this is just bringing this particular thing in line to be abstracted as well)

---

Pinging @eddyb since that's who I was talking about this change with when they suggested I submit a PR.
2020-09-01 07:44:34 +00:00
..
back mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
coverageinfo mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
debuginfo mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
llvm mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
abi.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
allocator.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
asm.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
attributes.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
base.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
builder.rs Auto merge of #76071 - khyperia:configurable_to_immediate, r=eddyb 2020-09-01 07:44:34 +00:00
callee.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
common.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
consts.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
context.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
declare.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
intrinsic.rs Auto merge of #76071 - khyperia:configurable_to_immediate, r=eddyb 2020-09-01 07:44:34 +00:00
lib.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
llvm_util.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
metadata.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
mono_item.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
type_.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
type_of.rs cg_llvm: fewer_names in uncached_llvm_type 2020-08-31 11:20:52 +01:00
va_arg.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00