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
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
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
bjorn3
a795a0384b
Remove triple method from FunctionCx
...
Instead use the default_call_conv field on TargetFrontendConfig to get
the default CallConv.
2021-12-18 15:46:30 +01:00
bjorn3
fdd0f8a3b5
Slightly reduce the amount of fx.module references
2021-12-18 15:33:31 +01:00
bjorn3
d0f97fc039
Rustup to rustc 1.59.0-nightly (c5ecc1570 2021-12-15)
2021-12-16 14:11:04 +01:00
bjorn3
d084fca557
Sync from rust a090c8659c3be0cbc7dc93c4b2c11a9cdbf8b980
2021-12-16 13:52:12 +01:00
bjorn3
2cb4fe711e
Fix unused crate warning
2021-12-16 13:51:18 +01:00
bjorn3
f74cf39a74
Fix crash when struct argument size is not a multiple of the pointer size
...
Fixes #1200
2021-12-15 16:53:35 +01:00
Nicholas Nethercote
93511d926f
Remove unnecessary sigils around Symbol::as_str()
calls.
2021-12-15 17:32:14 +11:00
Nicholas Nethercote
75f6118ad1
Remove SymbolStr
.
...
By changing `as_str()` to take `&self` instead of `self`, we can just
return `&str`. We're still lying about lifetimes, but it's a smaller lie
than before, where `SymbolStr` contained a (fake) `&'static str`!
2021-12-15 13:30:26 +11:00
Matthias Krüger
c57bcb8fcb
Rollup merge of #91868 - tmiasko:llvm-time-trace-out, r=oli-obk
...
Use `OutputFilenames` to generate output file for `-Zllvm-time-trace`
The resulting profile will include the crate name and will be stored in
the `--out-dir` directory.
This implementation makes it convenient to use LLVM time trace together
with cargo, in the contrast to the previous implementation which would
overwrite profiles or store them in `.cargo/registry/..`.
2021-12-15 01:28:06 +01:00
Amanieu d'Antras
edeb3891e9
Remove invalid doc links.
2021-12-13 20:40:17 +00:00
Tomasz Miąsko
a4bf9fbdbf
Use OutputFilenames
to generate output file for -Zllvm-time-trace
...
The resulting profile will include the crate name and will be stored in
the `--out-dir` directory.
This implementation makes it convenient to use LLVM time trace together
with cargo, in the contrast to the previous implementation which would
overwrite profiles or store them in `.cargo/registry/..`.
2021-12-13 00:00:00 +00:00
bjorn3
057635b9da
Rustfmt
2021-12-09 13:43:32 +01:00
bjorn3
47962076a1
Use cg_ssa for creating the dylib metadata file
...
The new api was introduced in rust-lang/rust#91604
2021-12-09 13:36:33 +01:00
bjorn3
aaf508cab3
Use const thread_local!
2021-12-07 18:25:27 +01:00
bjorn3
7d34d3ad78
Sync from rust c5c94945096265b6d675b2f55a247c4799de8d87
2021-12-07 17:57:58 +01:00
bjorn3
df7f02072b
Remove black box inline asm fallback
...
It isn't used anymore since the introduction of the black_box intrinsic
2021-12-04 15:03:50 +01:00
cynecx
dd3cb0cd75
cg_cranelift: check may_unwind flag instead of cleanup
2021-12-03 23:51:49 +01:00
cynecx
5728c165fa
LLVM codgen support for unwinding inline assembly
2021-12-03 23:51:49 +01:00
bjorn3
dd288d27de
Fix vector types containing an array field with mir opts enabled
2021-12-03 12:13:41 +01:00
Petr Sumbera
948d0243de
fix sparc64 ABI for aggregates with floating point members
2021-12-01 10:03:45 +01:00
bjorn3
c989324672
Fix warning
2021-11-26 16:21:19 +01:00
bjorn3
efdbd88a74
Ensure inline asm wrapper name never starts with a digit
...
This could previously happen if the cgu name starts with a digit
2021-11-25 11:43:18 +01:00
bjorn3
8714be0ad3
Include NOTYPE symbols in the archive symbol table
...
This is necessary for blog os
2021-11-24 20:35:57 +01:00
bjorn3
1222192374
Use cgu name instead of function name as base for inline asm wrapper name
...
This fixes using #[inline] functions containing inline assembly from multiple cgus
2021-11-24 19:18:22 +01:00
Gary Guo
5f0c6e5539
Fix allocated reg in AT&T style asm
2021-11-22 17:01:43 +00:00
Gary Guo
f9534a9bc9
Add RISC-V inline asm support
2021-11-22 16:28:14 +00:00
Gary Guo
31e7fa54a0
Dispatch inline asm to the correct arch
2021-11-22 16:28:14 +00:00