Commit Graph

689 Commits

Author SHA1 Message Date
bjorn3
690085c2da Rewrite LLVM's archive writer in Rust
This allows it to be used by other codegen backends
2022-11-26 19:35:32 +00:00
Chris Denton
39511672e7 Remove more redundant alls 2022-11-26 09:54:54 +00:00
antoyo
0a54f243f6
Merge pull request #225 from rust-lang/feature/stdarch-tests
Run stdarch tests in the CI
2022-11-25 15:12:29 -05:00
Antoni Boucher
054696e4a3 Disable stdarch examples which require unwinding 2022-11-25 11:38:49 -05:00
Antoni Boucher
3791646c02 Run stdarch tests in the CI 2022-11-25 11:38:49 -05:00
antoyo
8520bc7f9f
Merge pull request #174 from rust-lang/ci/ubuntu-libgccjit-12
Download libgccjit-12-dev package in the CI
2022-11-24 21:29:42 -05:00
antoyo
57b50df17e
Merge pull request #241 from rust-lang/fix/avx-intrinsics
Fix the argument order for some AVX-512 intrinsics
2022-11-24 21:27:42 -05:00
Antoni Boucher
69341c44cc Fix the argument order for some AVX-512 intrinsics 2022-11-24 18:32:17 -05:00
Antoni Boucher
bbc0c26508 Download libgccjit-12-dev package in the CI 2022-11-24 18:13:23 -05:00
antoyo
83c55fc4df
Merge pull request #240 from rust-lang/fix/simd_bitmask
Fix simd_bitmask
2022-11-24 17:47:42 -05:00
Antoni Boucher
76991ba26f Fix simd_bitmask 2022-11-24 17:26:58 -05:00
antoyo
3c03c8f048
Merge pull request #239 from rust-lang/fix/expandloadu
Escape { and } in inline asm
2022-11-24 13:54:59 -05:00
Antoni Boucher
15fcca80a4 Escape { and } in inline asm 2022-11-24 13:21:04 -05:00
Dylan DPC
20ff36217a Rollup merge of #104001 - Ayush1325:custom-entry, r=bjorn3
Improve generating Custom entry function

This commit is aimed at making compiler-generated entry functions (Basically just C `main` right now) more generic so other targets can do similar things for custom entry. This was initially implemented as part of https://github.com/rust-lang/rust/pull/100316.

Currently, this moves the entry function name and Call convention to the target spec.

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-19 11:54:43 +05:30
bors
ee50714c91 Auto merge of #103138 - nnethercote:merge-BBs, r=bjorn3
Merge basic blocks where possible when generating LLVM IR.

r? `@ghost`
2022-11-17 01:56:24 +00:00
Matthias Krüger
5d862b86df Rollup merge of #103750 - calebzulawski:master, r=workingjubilee
Fix some misleading target feature aliases

This is the first half of a fix for #100752.  It looks like these aliases were added in #78361 and slipped under the radar, as these features are not AVX512.  These features _do_ add AVX512 instructions when used _in combination_ with AVX512F, but without AVX512F, these features still provide 128-bit and 256-bit vector instructions.  A user might be mislead into thinking these features imply AVX512F (which is true of the actual AVX512 features).  This PR allows using the names as defined by LLVM, which matches Intel documentation.

A future PR should change the `std::arch` intrinsics to use these names, and finally remove these aliases from rustc.

r? ```@workingjubilee```

cc ```@Amanieu```
2022-11-16 15:39:44 +01:00
Nicholas Nethercote
d01b63a09a Use &mut Bx more.
For the next commit, `FunctionCx::codegen_*_terminator` need to take a
`&mut Bx` instead of consuming a `Bx`. This triggers a cascade of
similar changes across multiple functions. The resulting code is more
concise and replaces many `&mut bx` expressions with `bx`.
2022-11-16 15:46:39 +11:00
bors
d2d2b28f5a Auto merge of #102570 - cjgillot:deagg-debuginfo, r=oli-obk
Perform simple scalar replacement of aggregates (SROA) MIR opt

This is a re-open of https://github.com/rust-lang/rust/pull/85796

I copied the debuginfo implementation (first commit) from `@eddyb's` own SROA PR.

This pass replaces plain field accesses by simple locals when possible.
To be eligible, the replaced locals:
- must not be enums or unions;
- must not be used whole;
- must not have their address taken.

The storage and deinit statements are duplicated on each created local.

cc `@tmiasko` who reviewed the former version of this PR.
2022-11-15 23:52:22 +00:00
Camille GILLOT
af8682b8b4 Introduce composite debuginfo. 2022-11-15 17:53:50 +00:00
bors
eb0bc4759b Auto merge of #104054 - RalfJung:byte-provenance, r=oli-obk
interpret: support for per-byte provenance

Also factors the provenance map into its own module.

The third commit does the same for the init mask. I can move it in a separate PR if you prefer.

Fixes https://github.com/rust-lang/miri/issues/2181

r? `@oli-obk`
2022-11-15 17:37:15 +00:00
Ayush Singh
695c76c45a Use custom entry name in gcc
This is a continuation of 9f0a8620bd for
gcc.

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-15 22:15:55 +05:30
Ralf Jung
358419cc25 add is_sized method on Abi and Layout, and use it 2022-11-13 12:23:53 +01:00
Caleb Zulawski
2596ab4d75 Allow actual AVX512-related feature names in the case of some misleading aliases 2022-11-12 18:46:21 -05:00
Ralf Jung
e876f43599 fix cranelift and gcc 2022-11-06 14:17:10 +01:00
Ayush Singh
87237cb699 Add type_array to BaseTypeMethods
Moved type_array function to rustc_codegen_ssa::BaseTypeMethods trait.
This allows using normal alloca function to create arrays as suggested in
https://github.com/rust-lang/rust/pull/104022.

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-06 14:18:36 +05:30
Amanieu d'Antras
5a1c8e8e5c Rewrite implementation of #[alloc_error_handler]
The new implementation doesn't use weak lang items and instead changes
`#[alloc_error_handler]` to an attribute macro just like
`#[global_allocator]`.

The attribute will generate the `__rg_oom` function which is called by
the compiler-generated `__rust_alloc_error_handler`. If no `__rg_oom`
function is defined in any crate then the compiler shim will call
`__rdl_oom` in the alloc crate which will simply panic.

This also fixes link errors with `-C link-dead-code` with
`default_alloc_error_handler`: `__rg_oom` was previously defined in the
alloc crate and would attempt to reference the `oom` lang item, even if
it didn't exist. This worked as long as `__rg_oom` was excluded from
linking since it was not called.

This is a prerequisite for the stabilization of
`default_alloc_error_handler` (#102318).
2022-10-31 16:32:57 +00:00
antoyo
bfc184cd2c
Merge pull request #232 from GuillaumeGomez/more-inline-asm-register-class-conversion
Add missing register class conversion for inline asm
2022-10-26 12:20:15 -04:00
Guillaume Gomez
bf3ef4ce1a Revert changes in argument parsing for setting asm syntax 2022-10-26 17:04:58 +02:00
bors
a1d984ce61 Auto merge of #103392 - RalfJung:miri, r=oli-obk
update Miri

I had to use a hacked version of josh to create this, so let's be careful with merging this and maybe wait a bit to see if the josh issue becomes more clear. But the history looks good to me, we are not adding duplicates of rustc commits that were previously mirrored to Miri.

Also I want to add some cross-testing of Miri in x.py.
2022-10-25 12:33:39 +00:00
Daniel Paoliello
e30385bc06 Support raw-dylib functions being used inside inlined functions 2022-10-24 16:17:38 -07:00
antoyo
fac8d3aacf
Merge pull request #238 from GuillaumeGomez/fix-build-instructions
Fix gcc build instructions
2022-10-24 12:17:56 -04:00
Guillaume Gomez
1a2c8b01cb Fix gcc build instructions 2022-10-24 17:00:42 +02:00
Guillaume Gomez
78f960be32 Disable asm tests in CI 2022-10-24 16:47:55 +02:00
Nilstrieb
d3b02e3186 Migrate all diagnostics 2022-10-23 10:09:44 +02:00
Ralf Jung
1e9d9b184c merge rustc history 2022-10-21 10:18:54 +02:00
antoyo
cc5c38717d
Merge pull request #236 from GuillaumeGomez/install-doc
Improve installation documentation
2022-10-19 18:27:22 -04:00
Guillaume Gomez
ea52df463b
Fix typo 2022-10-19 23:47:42 +02:00
Guillaume Gomez
c89e3e9b0c Update Readme.md 2022-10-19 21:01:08 +02:00
Guillaume Gomez
994a669e26 Make the asm test suite run on its own 2022-10-18 23:35:47 +02:00
Guillaume Gomez
f150ab3277 Improve code generating inline ASM 2022-10-18 23:11:46 +02:00
Guillaume Gomez
5484c131a5 Don't override -masm option if set in the command arguments 2022-10-18 22:45:22 +02:00
Guillaume Gomez
1b60286103 Implement constraits modifiers 2022-10-18 17:44:33 +02:00
Guillaume Gomez
549fbe8ecb Set llvm-filecheck binary path into rustc config 2022-10-18 17:44:33 +02:00
Guillaume Gomez
94a4a4c350 Convert llvm-arg --x86-asm-syntax into GCC arg -masm 2022-10-18 16:31:50 +02:00
Guillaume Gomez
d04e66fd0f Run assembly tests in the CI 2022-10-18 16:31:50 +02:00
Guillaume Gomez
ccfe7d8898 Add asm test suite 2022-10-18 16:31:49 +02:00
Guillaume Gomez
b3198c72db Add missing register class conversion for inline asm 2022-10-18 16:29:33 +02:00
Guillaume Gomez
25d482856e
Improve installation documentation 2022-10-17 23:47:18 +02:00
Amanieu d'Antras
14e0e0fec3 Stabilize asm_sym 2022-10-17 22:38:37 +01:00
antoyo
618553b9b4
Merge pull request #234 from paulcacheux/paulcacheux/remove-rustc-patch
Remove not applicable rustc patch
2022-10-17 12:14:18 -04:00