Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 5 pull requests #97887

Merged
merged 110 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
590bfc6
Don't pass --target in cargo.sh
bjorn3 Mar 26, 2022
3888aaf
Merge commit '39683d8eb7a32a74bea96ecbf1e87675d3338506' into sync_cg_…
bjorn3 Mar 26, 2022
14c33f5
Merge pull request #147 from bjorn3/misc_improvements
antoyo Mar 26, 2022
02970a6
Add support for target builtins
antoyo Feb 6, 2022
13ab1ab
Merge pull request #129 from rust-lang/feature/simd
antoyo Mar 30, 2022
267e5e1
Add support for target builtins
antoyo Feb 6, 2022
a445bcb
Merge pull request #149 from rust-lang/missing-comments
antoyo Mar 30, 2022
927eea3
Add support for packed struct
antoyo Mar 29, 2022
74edcb8
Spellchecking some comments
nyurik Mar 30, 2022
c519b85
Spellchecking compiler code
nyurik Mar 30, 2022
81083b9
Rollup merge of #95461 - nyurik:spelling, r=lcnr
Dylan-DPC Mar 30, 2022
9bb797c
Add missing vendor intrinsics
bjorn3 Mar 27, 2022
76cf7c2
Merge pull request #150 from bjorn3/bootstrap_missing_vendor_intrinsics
antoyo Mar 30, 2022
f537564
Merge pull request #148 from rust-lang/feature/packed-struct
antoyo Mar 30, 2022
3970825
Add intrinsic translation for x86 arch
GuillaumeGomez Mar 30, 2022
0237d95
Merge pull request #151 from GuillaumeGomez/x86-intrinsics
antoyo Mar 30, 2022
68ac3a4
Generate all listed architectures from llvmint
GuillaumeGomez Mar 30, 2022
dac3595
Merge pull request #152 from GuillaumeGomez/more-intrinsics
antoyo Mar 30, 2022
ef1a6d7
Fix error related to var tracking assignments
antoyo Mar 31, 2022
403e198
Merge pull request #154 from rust-lang/fix/error-var-tracking
antoyo Mar 31, 2022
035ac03
Add intrinsics not bound to a specific arch
GuillaumeGomez Mar 30, 2022
341b9f2
Merge pull request #153 from GuillaumeGomez/general-intrinsics
antoyo Mar 31, 2022
56983cf
test: Remove redundant code from `tests/run/int.rs`
yvt Apr 1, 2022
88c058b
make memcmp return a value of c_int_width instead of i32
drmorr0 Nov 11, 2021
6ce5ce8
Cleanup after some refactoring in rustc_target
Urgau Apr 3, 2022
d71f633
Mark scalar layout unions so that backends that do not support partia…
oli-obk Mar 3, 2022
249d3e9
Use WrappingRange::full instead of hand-rolling it
oli-obk Apr 5, 2022
837a446
test: Test more integer types and checked arithmetic in `tests/run/in…
yvt Apr 5, 2022
00677e5
Implement `saturating_{add, sub}` for non-native integer types
yvt Apr 1, 2022
5061e3a
Remove redundant assertions
yvt Apr 6, 2022
a7a09d5
Wrap numbers with `black_box` in-line, remove `one`
yvt Apr 6, 2022
d69ada6
Merge pull request #156 from yvt/fix-int-ops
antoyo Apr 6, 2022
c59b01f
simplify a self-profiling activity call in the cg_gcc backend
lqd Apr 1, 2022
4d7de81
Add feature for future libgccjit 12 release
antoyo Apr 13, 2022
3301275
Don't assume /bin/bash is available on every system.
Apr 14, 2022
c35f4e8
Merge pull request #158 from rust-lang/feature/gcc12
antoyo Apr 14, 2022
f927795
Add set -v as we can't pass command line argument with /usr/bin/env
MikaelUrankar Apr 15, 2022
0e31b92
Add codegen for global_asm! sym operands
Amanieu Mar 1, 2022
4210fd4
Merge pull request #160 from MikaelUrankar/master
antoyo Apr 15, 2022
21be9da
Auto merge of #95689 - lqd:self-profiler, r=wesleywiser
bors Apr 16, 2022
52cd51f
asm: Add a kreg0 register class on x86 which includes k0
Amanieu Apr 6, 2022
63e9911
Rollup merge of #95740 - Amanieu:kreg0, r=nagisa
Dylan-DPC Apr 19, 2022
889c402
Fix test.sh --build
antoyo Apr 23, 2022
b30a8f3
Merge pull request #162 from rust-lang/fix/test-script
antoyo Apr 24, 2022
a0742bd
Don't emit `.intel_syntax` for non-x86 targets
yvt Mar 27, 2022
1d62e95
Merge pull request #164 from yvt/no-intel-syntax
antoyo Apr 24, 2022
5d25b8f
Convert inline assembly `sym` operands into GCC input operands
yvt Apr 23, 2022
63ffdfd
Add compilation tests with optimization enabled
yvt Apr 25, 2022
dc8da94
Add rustfmt config to disable formatting
antoyo Apr 30, 2022
248c1c5
Merge pull request #168 from rust-lang/config/no-fmt
antoyo Apr 30, 2022
0405aa0
Merge pull request #163 from yvt/fix-asm-sym
antoyo Apr 30, 2022
758a7da
Rename run_lto_pass_manager to optimize_fat and remove thin parameter
bjorn3 Apr 30, 2022
e2f645d
Let LtoModuleCodegen::optimize take self by value
bjorn3 Apr 30, 2022
c00ecf5
Remove config parameter of optimize_fat and avoid interior mutability…
bjorn3 Apr 30, 2022
dc82445
Merge new_metadata into codegen_allocator
bjorn3 Apr 30, 2022
a225f0a
Pass a pointee type to `<Builder as BuilderMethods>::load` when calli…
yvt May 3, 2022
351c683
Use the given pointee type in `<Builder as BuilderMethods>::load`
yvt May 2, 2022
37892fc
Merge pull request #170 from yvt/fix-internal-load-calls
antoyo May 3, 2022
af9149a
Add tool to generate intrinsics conversion automatically
GuillaumeGomez May 3, 2022
ed0ba31
Update intrinsics
GuillaumeGomez May 3, 2022
19d8617
Generate intrinsics translations from llvmint as well
GuillaumeGomez May 3, 2022
f402cfe
Update intrinsics
GuillaumeGomez May 3, 2022
618ba48
Handle a syntax corner case where a def does not end with a `;`
GuillaumeGomez May 3, 2022
6e1bf49
Give priority to intrinsics translations from llvm
GuillaumeGomez May 3, 2022
852735d
Merge pull request #171 from GuillaumeGomez/update-intrinsics
antoyo May 3, 2022
5088fb3
Cast arguments in SIMD function
antoyo Apr 24, 2022
4636c59
Add more SIMD
antoyo Apr 30, 2022
ddc152b
Add more SIMD
antoyo May 1, 2022
a654186
Implement simd_select_bitmask
antoyo May 1, 2022
ace3250
Fix shuffle_vector
antoyo May 1, 2022
6bfe2b0
Support more SIMD intrinsics
antoyo May 3, 2022
eba654c
Support more SIMD intrinsics
antoyo May 3, 2022
4b40ac7
Support more SIMD intrinsics and refactor argument adjustment
antoyo May 4, 2022
41807a3
Support more SIMD intrinsics
antoyo May 4, 2022
d4ab681
Add comments
antoyo May 5, 2022
603d342
Feature-gate for libgccjit 12
antoyo May 5, 2022
e7df0a4
Simplify get() after contains()
antoyo May 5, 2022
4a97440
Feature gate call to get_size() for libgccjit 12
antoyo May 5, 2022
e062c37
Merge pull request #172 from rust-lang/feature/more-simd
antoyo May 5, 2022
be960e1
Update llvmint
GuillaumeGomez May 15, 2022
e25e2c3
Regenerate JSON file for llvmint every time
GuillaumeGomez May 15, 2022
bac878c
Add instrinsics from aweinstock314's llvmint as well
GuillaumeGomez May 15, 2022
cede919
Add tools/llvmint-2 to ignored entries
GuillaumeGomez May 15, 2022
e6dbecd
Merge pull request #175 from GuillaumeGomez/llvmint-update
antoyo May 15, 2022
084d2d7
Handle tmm_reg in rustc_codegen_gcc
chorman0773 May 17, 2022
8f0f6e3
rustc_codegen_ssa: cleanup `AtomicOrdering`
tmiasko May 24, 2022
4620b9f
rustc_codegen_ssa: derive copy and clone for various enums
tmiasko May 24, 2022
f26eb5a
Update `gccjit`
yvt May 25, 2022
a513b2a
Finish bumping stage0
Mark-Simulacrum May 20, 2022
10a9c0e
Mark immutable globals as read-only with `LValue::global_set_readonly`
yvt May 25, 2022
7e0a42b
Merge pull request #165 from yvt/fix-const-memattr
antoyo May 28, 2022
bafdded
Merge branch 'master' into sync_from_rust2
antoyo Jun 7, 2022
8697dec
Update toolchain
antoyo Jun 7, 2022
fb69f73
Fix exactudiv
antoyo Jun 7, 2022
e8dca3e
Merge pull request #179 from rust-lang/sync_from_rust2
antoyo Jun 7, 2022
3fac982
Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_fro…
antoyo Jun 7, 2022
80cbaa3
Remove unused macro rule
antoyo Jun 7, 2022
27b9501
Rename `download_component` -> `download_ci_component`
jyn514 May 27, 2022
bd6409d
Simplify handling of `initial_rustfmt`
jyn514 May 27, 2022
81f511c
Move beta rustfmt downloads to rustbuild
jyn514 May 29, 2022
a9ca4b9
Add checksum verification for rustfmt downloads
jyn514 May 29, 2022
6115f4e
Add a `DownloadSource` enum
jyn514 May 29, 2022
e846c52
Add regression test for #84634
GuillaumeGomez Jun 8, 2022
85b5f74
remove unneeded code
stlankes Jun 8, 2022
f4ba14d
Fix typo: fo->for
ChayimFriedman2 Jun 8, 2022
07f1c16
Rollup merge of #97507 - jyn514:download-rustfmt, r=Mark-Simulacrum
matthiaskrgr Jun 8, 2022
8a2aedc
Rollup merge of #97813 - antoyo:sync_from_cg_gcc, r=petrochenkov
matthiaskrgr Jun 8, 2022
d11ab85
Rollup merge of #97878 - GuillaumeGomez:regression-test-84634, r=notr…
matthiaskrgr Jun 8, 2022
ef56a1e
Rollup merge of #97879 - hermitcore:condvar, r=Dylan-DPC
matthiaskrgr Jun 8, 2022
c374529
Rollup merge of #97880 - ChayimFriedman2:patch-2, r=lcnr
matthiaskrgr Jun 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,15 @@ dependencies = [
"cmake",
"filetime",
"getopts",
"hex 0.4.2",
"ignore",
"libc",
"once_cell",
"opener",
"pretty_assertions 0.7.2",
"serde",
"serde_json",
"sha2",
"sysinfo",
"tar",
"toml",
Expand Down
24 changes: 23 additions & 1 deletion compiler/rustc_codegen_gcc/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
libgccjit_version: ["libgccjit.so", "libgccjit_without_int128.so"]
libgccjit_version: ["libgccjit.so", "libgccjit_without_int128.so", "libgccjit12.so"]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -78,12 +78,21 @@ jobs:
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}

- name: Build
if: matrix.libgccjit_version != 'libgccjit12.so'
run: |
./prepare_build.sh
./build.sh
cargo test
./clean_all.sh

- name: Build
if: matrix.libgccjit_version == 'libgccjit12.so'
run: |
./prepare_build.sh
./build.sh --no-default-features
cargo test --no-default-features
./clean_all.sh

- name: Prepare dependencies
run: |
git config --global user.email "[email protected]"
Expand All @@ -98,6 +107,7 @@ jobs:
args: --release

- name: Test
if: matrix.libgccjit_version != 'libgccjit12.so'
run: |
# Enable backtraces for easier debugging
export RUST_BACKTRACE=1
Expand All @@ -107,3 +117,15 @@ jobs:
export RUN_RUNS=2

./test.sh --release

- name: Test
if: matrix.libgccjit_version == 'libgccjit12.so'
run: |
# Enable backtraces for easier debugging
export RUST_BACKTRACE=1

# Reduce amount of benchmark runs as they are slow
export COMPILE_RUNS=2
export RUN_RUNS=2

./test.sh --release --no-default-features
4 changes: 4 additions & 0 deletions compiler/rustc_codegen_gcc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ perf.data.old
/rust
/simple-raytracer
/regex
/rand
gimple*
*asm
res
test-backend
gcc_path
benchmarks
tools/llvm-project
tools/llvmint
tools/llvmint-2
1 change: 1 addition & 0 deletions compiler/rustc_codegen_gcc/.rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable_all_formatting = true
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_gcc/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ dependencies = [
[[package]]
name = "gccjit"
version = "1.0.0"
source = "git+https://github.com/antoyo/gccjit.rs#bdecdecfb8a02ec861a39a350f990faa33bd31c3"
source = "git+https://github.com/antoyo/gccjit.rs#bdb86fb5092895ff5589726b33250010c64d93f6"
dependencies = [
"gccjit_sys",
]

[[package]]
name = "gccjit_sys"
version = "0.0.1"
source = "git+https://github.com/antoyo/gccjit.rs#bdecdecfb8a02ec861a39a350f990faa33bd31c3"
source = "git+https://github.com/antoyo/gccjit.rs#bdb86fb5092895ff5589726b33250010c64d93f6"
dependencies = [
"libc 0.1.12",
]
Expand Down
12 changes: 10 additions & 2 deletions compiler/rustc_codegen_gcc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ license = "MIT OR Apache-2.0"
crate-type = ["dylib"]

[[test]]
name = "lang_tests"
path = "tests/lib.rs"
name = "lang_tests_debug"
path = "tests/lang_tests_debug.rs"
harness = false
[[test]]
name = "lang_tests_release"
path = "tests/lang_tests_release.rs"
harness = false

[features]
default = ["master"]
master = ["gccjit/master"]

[dependencies]
gccjit = { git = "https://github.com/antoyo/gccjit.rs" }
Expand Down
25 changes: 14 additions & 11 deletions compiler/rustc_codegen_gcc/build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/bash
#!/usr/bin/env bash

#set -x
set -e

codegen_channel=debug
sysroot_channel=debug

flags=

while [[ $# -gt 0 ]]; do
case $1 in
--release)
Expand All @@ -16,6 +18,15 @@ while [[ $# -gt 0 ]]; do
sysroot_channel=release
shift
;;
--no-default-features)
flags="$flags --no-default-features"
shift
;;
--features)
shift
flags="$flags --features $1"
shift
;;
*)
echo "Unknown option $1"
exit 1
Expand All @@ -33,21 +44,13 @@ fi
export LD_LIBRARY_PATH="$GCC_PATH"
export LIBRARY_PATH="$GCC_PATH"

features=

if [[ "$1" == "--features" ]]; then
shift
features="--features $1"
shift
fi

if [[ "$codegen_channel" == "release" ]]; then
export CHANNEL='release'
CARGO_INCREMENTAL=1 cargo rustc --release $features
CARGO_INCREMENTAL=1 cargo rustc --release $flags
else
echo $LD_LIBRARY_PATH
export CHANNEL='debug'
cargo rustc $features
cargo rustc $flags
fi

source config.sh
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/build_sysroot/build_sysroot.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Requires the CHANNEL env var to be set to `debug` or `release.`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
cd $(dirname "$0")

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_gcc/cargo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [ -z $CHANNEL ]; then
export CHANNEL='debug'
Expand All @@ -20,4 +20,4 @@ fi
cmd=$1
shift

RUSTDOCFLAGS="$RUSTFLAGS" cargo +${TOOLCHAIN} $cmd --target $TARGET_TRIPLE $@
RUSTDOCFLAGS="$RUSTFLAGS" cargo +${TOOLCHAIN} $cmd $@
3 changes: 2 additions & 1 deletion compiler/rustc_codegen_gcc/clean_all.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash --verbose
#!/usr/bin/env bash
set -e
set -v

rm -rf target/ build_sysroot/{sysroot/,sysroot_src/,target/,Cargo.lock} perf.data{,.old}
rm -rf regex/ simple-raytracer/
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_gcc/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set -e

export CARGO_INCREMENTAL=0

if [ -f ./gcc_path ]; then
if [ -f ./gcc_path ]; then
export GCC_PATH=$(cat gcc_path)
else
echo 'Please put the path to your custom build of libgccjit in the file `gcc_path`, see Readme.md for details'
Expand Down Expand Up @@ -38,7 +38,7 @@ if [[ "$HOST_TRIPLE" != "$TARGET_TRIPLE" ]]; then
fi
fi

export RUSTFLAGS="$linker -Cpanic=abort -Csymbol-mangling-version=v0 -Cdebuginfo=2 -Clto=off -Zpanic-abort-tests -Zcodegen-backend=$(pwd)/target/${CHANNEL:-debug}/librustc_codegen_gcc.$dylib_ext --sysroot $(pwd)/build_sysroot/sysroot"
export RUSTFLAGS="$CG_RUSTFLAGS $linker -Cpanic=abort -Csymbol-mangling-version=v0 -Cdebuginfo=2 -Clto=off -Zpanic-abort-tests -Zcodegen-backend=$(pwd)/target/${CHANNEL:-debug}/librustc_codegen_gcc.$dylib_ext --sysroot $(pwd)/build_sysroot/sysroot"

# FIXME(antoyo): remove once the atomic shim is gone
if [[ `uname` == 'Darwin' ]]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From a8fb97120d71252538b6b026695df40d02696bdb Mon Sep 17 00:00:00 2001
From: bjorn3 <[email protected]>
Date: Sat, 15 Aug 2020 20:04:38 +0200
Subject: [PATCH] [rand] Disable failing test

---
src/distributions/uniform.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/distributions/uniform.rs b/src/distributions/uniform.rs
index 480b859..c80bb6f 100644
--- a/src/distributions/uniform.rs
+++ b/src/distributions/uniform.rs
@@ -1085,7 +1085,7 @@ mod tests {
_ => panic!("`UniformDurationMode` was not serialized/deserialized correctly")
}
}
-
+
#[test]
#[cfg(feature = "serde1")]
fn test_uniform_serialization() {
@@ -1314,6 +1314,7 @@ mod tests {
not(target_arch = "wasm32"),
not(target_arch = "asmjs")
))]
+ #[ignore] // FIXME
fn test_float_assertions() {
use super::SampleUniform;
use std::panic::catch_unwind;
--
2.20.1
Loading