about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/context.rs
AgeCommit message (Collapse)AuthorLines
2019-10-13Remove MiscMethods::instancesbjorn3-5/+5
2019-10-13Inline functions from cg_ssa::callee and remove the modbjorn3-3/+16
Fixes #65271
2019-10-10Auto merge of #59546 - sfanxiang:interminable-ub, r=nagisabors-0/+1
Add llvm.sideeffect to potential infinite loops and recursions LLVM assumes that a thread will eventually cause side effect. This is not true in Rust if a loop or recursion does nothing in its body, causing undefined behavior even in common cases like `loop {}`. Inserting llvm.sideeffect fixes the undefined behavior. As a micro-optimization, only insert llvm.sideeffect when jumping back in blocks or calling a function. A patch for LLVM is expected to allow empty non-terminate code by default and fix this issue from LLVM side. https://github.com/rust-lang/rust/issues/28728 **UPDATE:** [Mentoring instructions here](https://github.com/rust-lang/rust/pull/59546#issuecomment-515072429) to unstall this PR
2019-10-05Replaces some instances of `as *[const | mut] _` with `.cast()`memoryruins-1/+1
2019-09-28Add llvm.sideeffect to potential infinite loops and recursionsXiang Fan-0/+1
LLVM assumes that a thread will eventually cause side effect. This is not true in Rust if a loop or recursion does nothing in its body, causing undefined behavior even in common cases like `loop {}`. Inserting llvm.sideeffect fixes the undefined behavior. As a micro-optimization, only insert llvm.sideeffect when jumping back in blocks or calling a function. A patch for LLVM is expected to allow empty non-terminate code by default and fix this issue from LLVM side. https://github.com/rust-lang/rust/issues/28728
2019-09-04Remove `LocalInternedString` uses from `librustc_codegen_llvm`.Nicholas Nethercote-2/+2
2019-08-04tweak output and testsEsteban Küber-4/+1
2019-08-04review comments: clean upEsteban Küber-3/+3
2019-08-03Point to local place span on "type too big" errorEsteban Küber-1/+9
2019-07-09Strip function pointer alignment for older LLVM versionsNikita Popov-6/+17
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-1/+1
2019-06-15Remove unnecessary `.clone()`Shotaro Yamada-1/+1
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-4/+4
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-6/+7
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-4/+4
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-3/+3
2019-06-06Add intrinsics for floating-point min and maxvarkor-0/+5
2019-06-02remove reexports of mir::mono::{MonoItem,CodegenUnit}Mark Mansi-1/+1
2019-06-02remove reexport of rustc::ty::InstanceMark Mansi-2/+1
2019-05-29rustc_codegen_llvm: remove LLVM instruction count stats.Eduard-Mihai Burtescu-11/+0
2019-05-04removing param_env from pointee_info_atSaleem Jaffer-2/+4
2019-05-04adding HasParamEnv traitSaleem Jaffer-1/+7
2019-05-04resolving conflictsSaleem Jaffer-1/+0
2019-05-04Remove old pointee_info_at body.Daan de Graaf-1/+1
2019-03-30Remove redundant importsFabian Drinck-1/+0
2019-03-29Move get_param and set_value_namebjorn3-5/+0
2019-03-29Don't use c_uint in cg_ssabjorn3-2/+2
2019-03-27Use informational target machine for metadataSimonas Kazlauskas-1/+1
Since there is nothing to optimise there...
2019-02-25librustc_codegen_llvm: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-1/+1
2019-02-24Auto merge of #58304 - gnzlbg:simd_saturated, r=nagisabors-8/+18
Add generic simd saturated add/sub intrinsics r? @eddyb
2019-02-18librustc_codegen_llvm => 2018Taiki Endo-15/+15
2019-02-14Rollup merge of #58308 - gnzlbg:context_insert_intr, r=eddybMazdak Farrokhzad-12/+17
Extract block to insert an intrinsic into its own function r? @eddyb
2019-02-10rustc: doc commentsAlexander Regueiro-2/+2
2019-02-08Add simd_saturating_{add,sub} intrinsicsgnzlbg-8/+18
2019-02-08Extract block to insert an intrinsic into its own functiongnzlbg-12/+17
2019-01-29Use LLVM intrinsics for saturating add/subNikita Popov-0/+24
2019-01-24Implement optimize(size) and optimize(speed)Simonas Kazlauskas-2/+3
2019-01-04add support for principal-less trait object typesAriel Ben-Yehuda-2/+3
should be a pure refactoring.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-17Auto merge of #56642 - nikic:llvm-6, r=alexcrichtonbors-5/+0
Bump minimum required LLVM version to 6.0 Based on the discussion in #55842, while the overall position of Rust wrt LLVM continues to be contentious, there does seem to be a consensus that there is no need for continued support of LLVM 5. This PR bumps our version requirement to LLVM 6.0 and makes Travis run against that. I hope that this is going to unblock #52694. If I understand correctly, while this issue still exists in LLVM 6, Ubuntu has backported the relevant patch. r? @alexcrichton
2018-12-12rustc: Switch `extern` functions to abort by default on panicAlex Crichton-1/+0
This was intended to land way back in 1.24, but it was backed out due to breakage which has long since been fixed. An unstable `#[unwind]` attribute can be used to tweak the behavior here, but this is currently simply switching rustc's internal default to abort-by-default if an `extern` function panics, making our codegen sound primarily (as currently you can produce UB with safe code) Closes #52652
2018-12-11Remove env_alloca hackNikita Popov-5/+0
This is no longer necessary for LLVM >= 6.
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-02Auto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddybbors-7/+7
Refactor rustc_codegen_ssa cc #56108 (not all things are done yet) This removes an unsafe method from cg_ssa. r? @eddyb cc @sunfishcode
2018-11-29Remove an unnecessary referencebjorn3-1/+1
2018-11-29Don't use llvm intrinsic names in cg_ssabjorn3-2/+2
2018-11-29Remove static_replace_all_uses and statics_to_rauw from cg_ssabjorn3-4/+4
2018-11-26libcore: Add va_list lang item and intrinsicsDan Robertson-11/+16
- Add the llvm intrinsics used to manipulate a va_list. - Add the va_list lang item in order to allow implementing VaList in libcore.
2018-11-16[eddyb] rustc_codegen_llvm: remove unused parametrization of `CodegenCx` and ↵Eduard-Mihai Burtescu-12/+12
`Builder` over `Value`s.