bjorn3
75a463a583
Update Cranelift to 0.81.0
2022-02-08 18:24:50 +01:00
bjorn3
bccf0a1f8d
Merge codegen of a couple more simd intrinsics
2022-01-30 19:44:15 +01:00
bjorn3
5a3cfb24d8
Merge codegen of several simd intrinsics
...
This reduces code duplication
2022-01-30 19:37:01 +01:00
bjorn3
c1d699d37b
Remove the remaining simd intrinsic macros
2022-01-30 19:31:18 +01:00
bjorn3
1ae27ea6aa
Remove simd_cmp macro
...
This reduces duplication in the codegened source file
2022-01-30 19:19:54 +01:00
bjorn3
037aafbbaf
Fix simd type validation
2022-01-30 18:35:08 +01:00
bjorn3
bb1b5cdde2
Remove validate_atomic_type
...
By expanding it in place. Also extract a common
report_atomic_type_validation_error function to reduce code duplication.
2022-01-30 18:23:01 +01:00
bjorn3
5efd7782b3
Don't generate unnecessary let $arg=$arg for intrinsics
2022-01-30 18:00:36 +01:00
bjorn3
246998f5ec
Remove some unused lint allows
2022-01-30 17:43:09 +01:00
bjorn3
1b8ea0705e
Add const_allocate and const_deallocate intrinsics
2022-01-30 17:35:33 +01:00
bjorn3
cc24cea101
Rustfmt
2022-01-19 16:38:58 +01:00
bjorn3
c6e607a947
Implement unchecked_mul intrinsic
2022-01-19 15:45:04 +01:00
bjorn3
400f122709
Sync from rust 2f004d2d401682e553af3984ebd9a3976885e752
2022-01-19 15:26:05 +01:00
bjorn3
78b65718bc
Split compile_fn out of codegen_fn
2022-01-18 19:07:26 +01:00
bjorn3
5f6c59e63f
Pass only the Function to write_clif_file
2022-01-18 18:58:37 +01:00
bjorn3
f3b2d37e77
Record object file artifact size in self profile data
2022-01-18 15:24:11 +01:00
bjorn3
489bff5543
Sync from rust 7531d2fdd49966d83830a7b4596c95587b1e9573
2022-01-18 12:49:50 +01:00
bjorn3
e59b024e02
Pass target_features set instead of has_feature closure
...
This avoids unnecessary monomorphizations in codegen backends
2022-01-17 18:06:30 +01:00
bjorn3
48abe3c6fa
Use Symbol for target features in asm handling
...
This saves a couple of Symbol::intern calls
2022-01-17 18:06:27 +01:00
bors
0b58e52786
Auto merge of #92816 - tmiasko:rm-llvm-asm, r=Amanieu
...
Remove deprecated LLVM-style inline assembly
The `llvm_asm!` was deprecated back in #87590 1.56.0, with intention to remove
it once `asm!` was stabilized, which already happened in #91728 1.59.0. Now it
is time to remove `llvm_asm!` to avoid continued maintenance cost.
Closes #70173 .
Closes #92794 .
Closes #87612 .
Closes #82065 .
cc `@rust-lang/wg-inline-asm`
r? `@Amanieu`
2022-01-17 09:40:29 +00:00
Ellen
eef35308ef
initial revert
2022-01-15 01:16:55 +00:00
Tomasz Miąsko
7ec4de3ab8
Remove deprecated LLVM-style inline assembly
2022-01-12 18:51:31 +01:00
Aaron Hill
409276cf55
Store a Symbol
instead of an Ident
in VariantDef
/FieldDef
...
The field is also renamed from `ident` to `name. In most cases,
we don't actually need the `Span`. A new `ident` method is added
to `VariantDef` and `FieldDef`, which constructs the full `Ident`
using `tcx.def_ident_span()`. This method is used in the cases
where we actually need an `Ident`.
This makes incremental compilation properly track changes
to the `Span`, without all of the invalidations caused by storing
a `Span` directly via an `Ident`.
2022-01-11 10:16:22 -05:00
bjorn3
b7cda373d5
Pass Ty instead of TyAndLayout to the closure of various simd helpers
...
This reduces the total amount of llvm ir lines for simd related
functions from 9604 to 9467.
2022-01-09 19:07:15 +01:00
bjorn3
2633024850
Don't monomorphize the simd helpers for each closure
...
This halves the total amount of llvm ir lines for simd related functions
from 18227 to 9604.
2022-01-09 18:55:57 +01:00
bjorn3
b60eced405
Return Value instead of CValue from the simd_for_each_lane closure
2022-01-09 18:43:08 +01:00
bjorn3
57d25ef60e
Use simplified version of bool_to_zero_or_max_uint in simd_cmp
2022-01-09 18:32:27 +01:00
bjorn3
d4d2b24d55
Slightly simplify some macros by removing an extra case for when signedness doesn't matter
...
This is slightly more verbose when invoking the macro.
2022-01-09 17:44:55 +01:00
bjorn3
78e2d4a275
Remove support for vector icmp for now
...
Real simd support will need an overhaul in the future anyway. For now it
only complicates the code.
2022-01-09 17:39:00 +01:00
bjorn3
8ace43e650
Move a couple of macros to intrinsics::simd
2022-01-09 17:34:55 +01:00
bjorn3
4e3a8d5fb9
Move validate_simd_type from intrinsics to intrinsics::simd
2022-01-09 17:30:01 +01:00
bjorn3
9295b086f6
Turn validate_simd_type into a function
...
This effectively outlines it, significantly reducing the size of
the codegen_simd_intrinsic_call llvm ir from 10419 lines to 6378 lines.
2022-01-09 17:29:16 +01:00
bjorn3
9e6d8c1b24
Remove the call_intrinsic_match macro
2022-01-09 17:22:23 +01:00
bjorn3
baad993dae
Dedup codegen_operand calls in codegen_float_intrinsic_call
...
This reduces the amount of llvm ir lines for this function by a little
over half from 1662 to 781.
2022-01-09 17:19:11 +01:00
bjorn3
300974714c
Dedup write_cvalue calls in codegen_float_intrinsic_call
...
Also directly use an array instead of going through a tuple. This
reduces the amount of llvm ir lines for this function by almost half
from 3086 to 1662.
2022-01-09 17:11:28 +01:00
bjorn3
a1a164083e
Move call_intrinsic_match macro into codegen_float_intrinsic_call
2022-01-09 16:44:54 +01:00
bjorn3
046e094842
Only use a single bug!() invocation in call_intrinsic_match
...
This reduces code size
2022-01-09 15:40:40 +01:00
bjorn3
409e3eb2cb
Remove unnecessary argument
2022-01-09 15:40:39 +01:00
bjorn3
70cc242545
Remove a couple of duplicate calls
2022-01-09 15:38:45 +01:00
bjorn3
c5b969583f
Split codegen_intrinsic_call function
...
This should reduce compile times of cg_clif
2022-01-09 15:36:05 +01:00
bjorn3
9913630158
Reduce usage of subst types in the intrinsic code
...
Using the arguments often saves a layout_of call
2022-01-09 14:54:43 +01:00
Matthias Krüger
1da0071338
Rollup merge of #90102 - nbdd0121:box3, r=jonas-schievink
...
Remove `NullOp::Box`
Follow up of #89030 and MCP rust-lang/compiler-team#460 .
~1 month later nothing seems to be broken, apart from a small regression that #89332 (1aac85bb716c09304b313d69d30d74fe7e8e1a8e) shows could be regained by remvoing the diverging path, so it shall be safe to continue and remove `NullOp::Box` completely.
r? `@jonas-schievink`
`@rustbot` label T-compiler
2022-01-03 14:44:15 +01:00
bjorn3
a5a14258e5
Merge commit '40b00f4200fbdeefd11815398cb46394b8cb0a5e' into sync_cg_clif-2021-12-30
2021-12-30 14:53:41 +01:00
bjorn3
f6d0e14b79
Fix dead code warning on windows
2021-12-30 12:56:45 +01:00
bjorn3
9bcdb53053
Rustfmt
2021-12-30 12:10:59 +01:00
bjorn3
9089c305da
Remove TyCtxt dependency from UnwindContext
2021-12-27 17:54:06 +01:00
bjorn3
799e067912
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
2021-12-20 18:56:35 +01:00
bjorn3
97e5045493
Fix taking address of truly unsized type field of unsized adt
2021-12-20 18:49:43 +01:00
bjorn3
bb6d83dac9
Sync from rust 84f962a89bac3948ed116f1ad04c2f4793fb69ea
2021-12-20 18:12:18 +01:00
bors
c3a9a9b424
Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk
...
Remove `SymbolStr`
This was originally proposed in https://github.com/rust-lang/rust/pull/74554#discussion_r466203544 . As well as removing the icky `SymbolStr` type, it allows the removal of a lot of `&` and `*` occurrences.
Best reviewed one commit at a time.
r? `@oli-obk`
2021-12-19 09:31:37 +00:00