about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/builder.rs
AgeCommit message (Collapse)AuthorLines
2020-04-19Dogfood more or_patterns in the compilerJosh Stone-2/+2
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-10/+11
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-3/+3
2020-03-27Rename TyLayout to TyAndLayout.Ana-Maria Mihalache-3/+3
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-1/+1
2020-03-11librustc_codegen_llvm: Use slices instead of 0-terminated stringsTomasz Miąsko-1/+0
Changed functions: * LLVMRustGetOrInsertFunction * LLVMRustGetNamedValue * LLVMRustBuildCall (removed unused name argument) * LLVMRustInlineAsm * LLVMRustInlineAsmVerify * LLVMRustAppendModuleInlineAsm
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-2/+2
2020-02-12Fix mangled names of lifetime intrinsicsNikita Popov-2/+2
2020-02-12Use IRBuilder to create memsetNikita Popov-6/+11
To avoid creating memsets with outdated signature. For some reason SROA chokes on this when using NewPM.
2020-02-03rustc_codegen_ssa: split declare_local into create_dbg_var and dbg_var_addr.Eduard-Mihai Burtescu-0/+1
2020-01-27Detect use-after-scope bugs with AddressSanitizerTomasz Miąsko-4/+11
Enable use-after-scope checks by default when using AddressSanitizer. They allow to detect incorrect use of stack objects after their scope have already ended. The detection is based on LLVM lifetime intrinsics. To facilitate the use of this functionality, the lifetime intrinsics are now emitted regardless of optimization level if enabled sanitizer makes use of them.
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-1/+1
2019-12-22Format the worldMark Rousskov-255/+230
2019-12-11rustc: Link LLVM directly into rustc againAlex Crichton-0/+2
This commit builds on #65501 continue to simplify the build system and compiler now that we no longer have multiple LLVM backends to ship by default. Here this switches the compiler back to what it once was long long ago, which is linking LLVM directly to the compiler rather than dynamically loading it at runtime. The `codegen-backends` directory of the sysroot no longer exists and all relevant support in the build system is removed. Note that `rustc` still supports a dynamically loaded codegen backend as it did previously, it just no longer supports dynamically loaded codegen backends in its own sysroot. Additionally as part of this the `librustc_codegen_llvm` crate now once again explicitly depends on all of its crates instead of implicitly loading them through the sysroot. This involved filling out its `Cargo.toml` and deleting all the now-unnecessary `extern crate` annotations in the header of the crate. (this in turn required adding a number of imports for names of macros too). The end results of this change are: * Rustbuild's build process for the compiler as all the "oh don't forget the codegen backend" checks can be easily removed. * Building `rustc_codegen_llvm` is much simpler since it's simply another compiler crate. * Managing the dependencies of `rustc_codegen_llvm` is much simpler since it's "just another `Cargo.toml` to edit" * The build process should be a smidge faster because there's more parallelism in the main rustc build step rather than splitting `librustc_codegen_llvm` out to its own step. * The compiler is expected to be slightly faster by default because the codegen backend does not need to be dynamically loaded. * Disabling LLVM as part of rustbuild is still supported, supporting multiple codegen backends is still supported, and dynamic loading of a codegen backend is still supported.
2019-11-24Store ptr_width as u32 on ConfigMark Rousskov-2/+2
This removes the dependency on IntTy, UintTy from Session.
2019-10-27Always use consteval to codegen caller_location.Adam Perry-16/+0
2019-10-27Panicking infra uses &core::panic::Location.Adam Perry-30/+0
This allows us to remove `static_panic_msg` from the SSA<->LLVM boundary, along with its fat pointer representation for &str. Also changes the signature of PanicInfo::internal_contructor to avoid copying. Closes #65856.
2019-10-27Implement core::intrinsics::caller_location.Adam Perry-0/+15
Returns a `&core::panic::Location` corresponding to where it was called, also making `Location` a lang item.
2019-10-13s/FuncId/Functionbjorn3-1/+1
2019-10-13Introduce FuncId backend typebjorn3-0/+1
2019-09-26Rename some `_sty` variables to `_kind`varkor-4/+4
2019-09-25Rename `sty` to `kind`varkor-1/+1
2019-09-12codegen: be more explicit about setting giving names to allocas.Eduard-Mihai Burtescu-18/+5
2019-09-05Rollup merge of #64003 - Dante-Broggi:place-align-in-layout, r=matthewjasperMazdak Farrokhzad-1/+1
place: Passing `align` = `layout.align.abi`, when also passing `layout` Of the calls changed: 7/12 use `align` = `layout.align.abi`. `from_const_alloc` uses `alloc.align`, but that is `assert_eq!` to `layout.align.abi`. only 4/11 use something interesting for `align`.
2019-09-04Remove `LocalInternedString` uses from `librustc_codegen_llvm`.Nicholas Nethercote-3/+3
2019-08-29`new_sized` is mostly used without alignDante-Broggi-1/+1
so rename it `new_sized_aligned`. 6/11 use `align` = `layout.align.abi`. `from_const_alloc` uses `alloc.align`, but that is `assert_eq!` to `layout.align.abi`. only 4/11 use something interesting for `align`.
2019-07-20Remove vector fadd/fmul reduction workaroundsNikita Popov-6/+6
The bugs that this was working around have been fixed in LLVM 9.
2019-07-08normalize use of backticks for compiler messages in librustc_codegenSamy Kacimi-4/+4
https://github.com/rust-lang/rust/issues/60532
2019-07-03Remove needless lifetimesJeremy Stucki-1/+1
2019-06-23Fix meta-variable binding errors in macrosJulien Cretin-1/+1
The errors are either: - The meta-variable used in the right-hand side is not bound (or defined) in the left-hand side. - The meta-variable used in the right-hand side does not repeat with the same kleene operator as its binder in the left-hand side. Either it does not repeat enough, or it uses a different operator somewhere. This change should have no semantic impact.
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-1/+1
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-1/+1
2019-06-12rustc_codegen_llvm: `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-3/+1
2019-06-12rustc: remove some unnecessary lifetimes in -> TyCtxt methods.Eduard-Mihai Burtescu-1/+1
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-1/+1
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-1/+1
2019-06-11rustc_codegen_*: deny(unused_lifetimes).Eduard-Mihai Burtescu-2/+2
2019-06-03add support for unchecked mathlcnr/Bastian Kauschke-0/+6
2019-06-01rustc_codegen_llvm: replace `fn noname()` with `const UNNAMED`.Eduard-Mihai Burtescu-47/+51
2019-06-01rustc_codegen_llvm: pretty up a few builder methods with a macro.Eduard-Mihai Burtescu-138/+34
2019-05-29rustc_codegen_llvm: rename away the last occurrence of `insn`.Eduard-Mihai Burtescu-3/+3
2019-05-29rustc_codegen_llvm: remove LLVM instruction count stats.Eduard-Mihai Burtescu-107/+0
2019-05-14removes `AbiMethods`Saleem Jaffer-0/+7
2019-05-04adding HasParamEnv traitSaleem Jaffer-0/+6
2019-03-29Use ExactSizeIterator + TrustedLen instead of num_cases arg for switchbjorn3-3/+3
2019-03-29Add a method for emiting a switch.bjorn3-8/+9
2019-03-29Remove inline_asm_call from cg_ssabjorn3-41/+1
`count_insn` is no longer called for inline asm, because it is private to builder.rs
2019-03-29Remove type_variadic_func and typ_array from cg_ssabjorn3-21/+51
2019-03-29Move get_param and set_value_namebjorn3-21/+23
2019-03-29Remove a lot of methods from BuilderMethodsbjorn3-213/+213