776 Commits

Author SHA1 Message Date
Guillaume Gomez
fd56f44836 Format cg_gcc with same formatting parameters 2024-08-12 15:17:57 +02:00
bjorn3
6199de2833 Sync ar_archive_writer to LLVM 18.1.3
From LLVM 15.0.0-rc3. This adds support for COFF archives containing
Arm64EC object files and has various fixes for AIX big archive files.
2024-08-12 15:17:57 +02:00
Ralf Jung
fb4738571f Miri function identity hack: account for possible inlining 2024-08-12 15:15:14 +02:00
Michael Goulet
007fa3b94e Fix spans 2024-08-12 15:15:14 +02:00
Michael Goulet
3eb28444b5 Give Instance::expect_resolve a span 2024-08-12 15:15:14 +02:00
sapir
4fe1647d21 Remove dummy value locals for function ptr calls 2024-08-07 13:45:19 +03:00
antoyo
fb95096593
Merge pull request #549 from sapir/value-counter
Replace stack_var_count and RETURN_VALUE_COUNT with a single counter
2024-08-05 13:38:30 -04:00
sapir
014a84029c Replace stack_var_count and RETURN_VALUE_COUNT with a single counter 2024-08-05 01:23:47 +03:00
sapir
f579dee206 Implement CodeModel 2024-08-05 00:37:59 +03:00
Antoni Boucher
0b5be441cf Fix for gcc-13 without int128 2024-07-05 14:58:07 -04:00
Antoni Boucher
fe054be06e Second attempt at fixing LTO tests
FIXME: we now have fat LTO objects even when only bitcode is requested.
2024-07-05 11:55:08 -04:00
Antoni Boucher
bc8520d98e Revert "Fix LTO tests"
This reverts commit 2d123d08c98419261bddec8f3ad8b80cadb82515.
2024-07-05 11:35:16 -04:00
Antoni Boucher
2d123d08c9 Fix LTO tests
FIXME: we now have fat LTO objects even when only bitcode is requested.
2024-07-05 10:42:03 -04:00
Antoni Boucher
59de4fa991 Fix type of intrinsics 2024-07-02 12:55:30 -04:00
Antoni Boucher
6099d97bcb Fix rebase 2024-07-02 12:40:45 -04:00
Antoni Boucher
05a41b88a9 Merge branch 'master' into sync_from_rust_2024_07_02 2024-07-02 12:40:16 -04:00
Antoni Boucher
ee41c1904a Update to nightly-2024-07-02 2024-07-02 12:33:09 -04:00
Antoni Boucher
4d3d0d492f Fix intrinsic/generic-arithmetic-pass.rs test 2024-07-02 12:28:44 -04:00
Antoni Boucher
cd014cda8c Replace the type of global variables instead of replacing them 2024-07-02 12:28:25 -04:00
Antoni Boucher
bbc765b49b Fix clippy warnings 2024-07-02 12:27:31 -04:00
Antoni Boucher
21b1b11981 WIP: Implement dummy ThinLTO
FIXME: This seems very slow.
==> Not sure anymore: compare with the master branch.
2024-07-02 12:27:25 -04:00
Antoni Boucher
9ca7658817 Fix tests 2024-07-02 12:27:18 -04:00
Antoni Boucher
e8e6663167 Fix provenance intrinsics 2024-07-02 12:25:29 -04:00
Antoni Boucher
0ffcbb0f6e Remove the hack in zext
TODO: make sure this doesn't break something else.
2024-07-02 12:24:47 -04:00
Guillaume Gomez
dd4a546de0 Add explanations for ptr func call argument cast 2024-07-02 12:24:11 -04:00
Guillaume Gomez
527c049584 Fix warnings 2024-07-02 12:24:07 -04:00
Guillaume Gomez
ca654047fb Add missing cast for function_ptr arguments 2024-07-02 12:24:03 -04:00
Guillaume Gomez
30ee7ba862 Add shl and shr missing casts 2024-07-02 12:23:55 -04:00
Guillaume Gomez
068fe5d10a If the type of a global is not the same, we remove the global and replace it with a new one 2024-07-02 12:23:33 -04:00
Guillaume Gomez
621e948721 Fix clippy lint 2024-07-02 12:21:25 -04:00
Guillaume Gomez
7615e04f82 Fix usage of get_size for gcc 12 2024-07-02 12:20:47 -04:00
Guillaume Gomez
9b1211db58 Fix casts 2024-07-02 12:20:42 -04:00
Guillaume Gomez
580e5ba456 Format code 2024-07-02 12:20:34 -04:00
Guillaume Gomez
f848dbbda5 Fix non-master build 2024-07-02 12:20:30 -04:00
Antoni Boucher
9274c63df3 Change Void to unreachable 2024-06-25 09:00:36 -04:00
Antoni Boucher
16e1ad7327 Fix clippy warnings 2024-06-25 08:10:29 -04:00
Robert Zakrzewski
dabf5faff0 Add support for Float64 2024-06-21 22:10:52 +02:00
bjorn3
994041a40c Remove type_i1 and type_struct from cg_ssa
They are not representable by Cranelift
2024-06-21 19:30:26 +00:00
bjorn3
8a1e58169a Remove check_overflow method from MiscMethods
It can be retrieved from the Session too.
2024-06-21 19:30:26 +00:00
bjorn3
9d25e851ce Remove const_bitcast from ConstMethods 2024-06-21 19:26:07 +00:00
Robert Zakrzewski
2eaac2388d Refactor type_f16|32|128 functions. Common type_kind()
fix
2024-06-21 17:21:46 +02:00
Antoni Boucher
c4e7c04de9 Fix location of check for sized floating-point types 2024-06-21 16:12:05 +02:00
Robert Zakrzewski
0dad11feb9 Do not use target dependent Float32
fix formatting
2024-06-21 16:12:05 +02:00
Robert Zakrzewski
b94cb8c01c Add missing types in the type_kind function
reorder type_kind

reorder type_kind

reorder type_kind

fix

fix

fix

fix
2024-06-21 16:12:05 +02:00
Robert Zakrzewski
d0977e3e2a Add support for Float16, Float32, Float64 and Float128
Upgrade libgccjit.version

Limit new Floatxx types to master branch only

apply rustfmt

Make new types available only when requested

Make new types available only when requested

Check if Float16 and Float128 are supported by the target platform

Replace Float with Float32 and Double with Float64 if target dependent type is defined

Add support for Float16|32|64|128 in the builder

Fix cargo fmt errors

Update gccjit wrapper

update hash of ligccjit
2024-06-21 16:12:05 +02:00
Oli Scherer
cb1bde07c1 Remove redundant argument from subdiagnostic method 2024-06-18 15:42:11 +00:00
Oli Scherer
527b3575ba Use a dedicated type instead of a reference for the diagnostic context
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
2024-06-18 15:42:11 +00:00
Ralf Jung
d565d3d23d ScalarInt: size mismatches are a bug, do not delay the panic 2024-06-10 13:43:16 +02:00
Michael Goulet
b2d39816ba Uplift TypeRelation and Relate 2024-06-01 12:50:58 -04:00
Guillaume Gomez
a1d293337c Rollup merge of #125345 - durin42:thin-link-bitcode, r=bjorn3
rustc_codegen_llvm: add support for writing summary bitcode

Typical uses of ThinLTO don't have any use for this as a standalone file, but distributed ThinLTO uses this to make the linker phase more efficient. With clang you'd do something like `clang -flto=thin -fthin-link-bitcode=foo.indexing.o -c foo.c` and then get both foo.o (full of bitcode) and foo.indexing.o (just the summary or index part of the bitcode). That's then usable by a two-stage linking process that's more friendly to distributed build systems like bazel, which is why I'm working on this area.

I talked some to `@teresajohnson` about naming in this area, as things seem to be a little confused between various blog posts and build systems. "bitcode index" and "bitcode summary" tend to be a little too ambiguous, and she tends to use "thin link bitcode" and "minimized bitcode" (which matches the descriptions in LLVM). Since the clang option is thin-link-bitcode, I went with that to try and not add a new spelling in the world.

Per `@dtolnay,` you can work around the lack of this by using `lld --thinlto-index-only` to do the indexing on regular .o files of bitcode, but that is a bit wasteful on actions when we already have all the information in rustc and could just write out the matching minimized bitcode. I didn't test that at all in our infrastructure, because by the time I learned that I already had this patch largely written.
2024-05-23 23:39:26 +02:00