Commit Graph

23 Commits

Author SHA1 Message Date
Erik Desjardins
b7e5597491 Use undef for partially-uninit constants up to 1024 bytes
There needs to be some limit to avoid perf regressions on large arrays
with undef in each element (see comment in the code).
2022-02-18 15:57:10 -05:00
Ralf Jung
1f21ab114e bless mir-opt, codegen, and remaining ui tests 2021-07-14 18:17:49 +02:00
Simon Jakobi
3ea62cb5d1 Remove redundant ignore-tidy-linelength annotations
This is step 2 towards fixing #77548.

In the codegen and codegen-units test suites, the `//` comment markers
were kept in order not to affect any source locations. This is because
these tests cannot be automatically `--bless`ed.
2021-04-03 22:30:20 +02:00
Oliver Scherer
34785fcc4a Make codegen test bitwidth-independent 2020-09-20 09:09:56 +02:00
Oliver Scherer
6d3c7bb70d Update codegen tests 2020-09-19 10:36:36 +02:00
Ralf Jung
307d0d8f51 move Deaggregate pass to post_borrowck_cleanup 2020-08-11 17:09:15 +02:00
Jonas Schievink
a5c1851607 Fix codegen and mir-opt tests
Mostly renamed allocations, but I'm not sure about the const prop tests
2020-04-20 21:18:20 +02:00
Chris Simpkins
cf929f77bf support LLVM globals corresponding to miri allocations 2020-03-12 09:57:05 -04:00
Oliver Scherer
e51eccd2ef Make codegen tests wordsize independent 2020-01-11 14:40:07 +01:00
Santiago Pastorino
1688719214 Promote Refs to constants instead of static 2020-01-10 09:08:24 +01:00
Josh Stone
2304c25f31 Update the minimum external LLVM to 7
LLVM 7 is over a year old, which should be plenty for compatibility. The
last LLVM 6 holdout was llvm-emscripten, which went away in #65501.

I've also included a fix for LLVM 8 lacking `MemorySanitizerOptions`,
which was broken by #66522.
2019-12-02 11:36:21 -08:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Colin Pronovost
02190f397e Make globals with private linkage unnamed. Fixes #50862. 2018-07-31 23:45:18 -04:00
Alex Crichton
42eb85002a Upgrade to LLVM's master branch (LLVM 7)
This commit upgrades the main LLVM submodule to LLVM's current master branch.
The LLD submodule is updated in tandem as well as compiler-builtins.

Along the way support was also added for LLVM 7's new features. This primarily
includes the support for custom section concatenation natively in LLD so we now
add wasm custom sections in LLVM IR rather than having custom support in rustc
itself for doing so.

Some other miscellaneous changes are:

* We now pass `--gc-sections` to `wasm-ld`
* The optimization level is now passed to `wasm-ld`
* A `--stack-first` option is passed to LLD to have stack overflow always cause
  a trap instead of corrupting static data
* The wasm target for LLVM switched to `wasm32-unknown-unknown`.
* The syntax for aligned pointers has changed in LLVM IR and tests are updated
  to reflect this.
* The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug]

Nowadays we've been mostly only upgrading whenever there's a major release of
LLVM but enough changes have been happening on the wasm target that there's been
growing motivation for quite some time now to upgrade out version of LLD. To
upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet
another version of LLVM on the builders.

The revision of LLVM in use here is arbitrarily chosen. We will likely need to
continue to update it over time if and when we discover bugs. Once LLVM 7 is
fully released we can switch to that channel as well.

[llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382
2018-07-10 13:43:01 -07:00
Oliver Schneider
208d764833
Adjust test which differs between 32 bit and 64 bit
The differences are not part of what the test is testing, so they were simply removed.
2018-03-08 08:35:38 +01:00
Oliver Schneider
0595ff1009
Codegen tests 2018-03-08 08:34:08 +01:00
Eduard-Mihai Burtescu
44eef7c9ac rustc: do not inject discriminant fields into Layout::General's variants. 2017-11-19 02:14:28 +02:00
Eduard-Mihai Burtescu
8afa3a01e6 rustc_trans: always insert alignment padding, even before the first field. 2017-11-19 02:14:28 +02:00
Eduard-Mihai Burtescu
386d59dc89 rustc_trans: use a predictable layout for constant ADTs. 2017-11-19 02:14:28 +02:00
Michael Woerister
e46c1ad9c9 Adapt codegen test to new naming scheme for generated symbols. 2016-10-21 18:29:25 -04:00
Eduard Burtescu
cb9b0ed91b Disable old trans access via -Z orbit, #[rustc_no_mir] or --disable-orbit. 2016-08-24 13:23:37 +03:00
Eduard Burtescu
473f804491 Add #[rustc_no_mir] to make tests pass with -Z orbit. 2016-03-17 22:48:07 +02:00
Björn Steinbrink
6ad079e341 Set proper alignment on constants
For enum variants, the default alignment for a specific variant might be
lower than the alignment of the enum type itself. In such cases we, for
example, generate memcpy calls with an alignment that's higher than the
alignment of the constant we copy from.

To avoid that, we need to explicitly set the required alignment on
constants.

Fixes #28912.
2015-10-10 01:15:36 +02:00