-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #96974 - matthiaskrgr:rollup-jd4otnc, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #95896 (Note the contacts for the nvptx64 target(s)) - #96860 (openbsd: convert futex timeout managment to Timespec usage) - #96939 (Fix settings page CSS) - #96941 (update graphviz links) - #96968 (Add tests for #96806) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
16 changed files
with
431 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# `nvptx64-nvidia-cuda` | ||
|
||
**Tier: 2** | ||
|
||
This is the target meant for deploying code for Nvidia® accelerators based on their CUDA | ||
platform. | ||
|
||
## Target maintainers | ||
|
||
- Riccardo D'Ambrosio, https://github.com/RDambrosio016 | ||
- Kjetil Kjeka, https://github.com/kjetilkjeka | ||
|
||
<!-- FIXME: fill this out | ||
## Requirements | ||
Does the target support host tools, or only cross-compilation? Does the target | ||
support std, or alloc (either with a default allocator, or if the user supplies | ||
an allocator)? | ||
Document the expectations of binaries built for the target. Do they assume | ||
specific minimum features beyond the baseline of the CPU/environment/etc? What | ||
version of the OS or environment do they expect? | ||
Are there notable `#[target_feature(...)]` or `-C target-feature=` values that | ||
programs may wish to use? | ||
What calling convention does `extern "C"` use on the target? | ||
What format do binaries use by default? ELF, PE, something else? | ||
## Building the target | ||
If Rust doesn't build the target by default, how can users build it? Can users | ||
just add it to the `target` list in `config.toml`? | ||
## Building Rust programs | ||
Rust does not yet ship pre-compiled artifacts for this target. To compile for | ||
this target, you will either need to build Rust with the target enabled (see | ||
"Building the target" above), or build your own copy of `core` by using | ||
`build-std` or similar. | ||
## Testing | ||
Does the target support running binaries, or do binaries have varying | ||
expectations that prevent having a standard way to run them? If users can run | ||
binaries, can they do so in some common emulator, or do they need native | ||
hardware? Does the target support running the Rust testsuite? | ||
## Cross-compilation toolchains and C code | ||
Does the target support C code? If so, what toolchain target should users use | ||
to build compatible C code? (This may match the target triple, or it may be a | ||
toolchain for a different target triple, potentially with specific options or | ||
caveats.) | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#![crate_type = "lib"] | ||
|
||
use std::fmt::Debug; | ||
|
||
pub trait Cache { | ||
type V: Debug; | ||
|
||
fn store_nocache(&self); | ||
} | ||
|
||
pub trait Query { | ||
type V; | ||
type C: Cache<V = Self::V>; | ||
|
||
fn cache<T>(s: &T) -> &Self::C; | ||
} | ||
|
||
// EMIT_MIR dyn_trait.mk_cycle.Inline.diff | ||
#[inline(always)] | ||
pub fn mk_cycle<V: Debug>(c: &dyn Cache<V = V>) { | ||
c.store_nocache() | ||
} | ||
|
||
// EMIT_MIR dyn_trait.try_execute_query.Inline.diff | ||
#[inline(always)] | ||
pub fn try_execute_query<C: Cache>(c: &C) { | ||
mk_cycle(c) | ||
} | ||
|
||
// EMIT_MIR dyn_trait.get_query.Inline.diff | ||
#[inline(always)] | ||
pub fn get_query<Q: Query, T>(t: &T) { | ||
let c = Q::cache(t); | ||
try_execute_query(c) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
- // MIR for `get_query` before Inline | ||
+ // MIR for `get_query` after Inline | ||
|
||
fn get_query(_1: &T) -> () { | ||
debug t => _1; // in scope 0 at $DIR/dyn-trait.rs:32:31: 32:32 | ||
let mut _0: (); // return place in scope 0 at $DIR/dyn-trait.rs:32:38: 32:38 | ||
let _2: &<Q as Query>::C; // in scope 0 at $DIR/dyn-trait.rs:33:9: 33:10 | ||
let mut _3: &T; // in scope 0 at $DIR/dyn-trait.rs:33:22: 33:23 | ||
let mut _4: &<Q as Query>::C; // in scope 0 at $DIR/dyn-trait.rs:34:23: 34:24 | ||
scope 1 { | ||
debug c => _2; // in scope 1 at $DIR/dyn-trait.rs:33:9: 33:10 | ||
+ scope 2 (inlined try_execute_query::<<Q as Query>::C>) { // at $DIR/dyn-trait.rs:34:5: 34:25 | ||
+ debug c => _4; // in scope 2 at $DIR/dyn-trait.rs:26:36: 26:37 | ||
+ let mut _5: &dyn Cache<V = <Q as Query>::V>; // in scope 2 at $DIR/dyn-trait.rs:27:14: 27:15 | ||
+ let mut _6: &<Q as Query>::C; // in scope 2 at $DIR/dyn-trait.rs:27:14: 27:15 | ||
+ scope 3 (inlined mk_cycle::<<Q as Query>::V>) { // at $DIR/dyn-trait.rs:27:5: 27:16 | ||
+ debug c => _5; // in scope 3 at $DIR/dyn-trait.rs:20:27: 20:28 | ||
+ let mut _7: &dyn Cache<V = <Q as Query>::V>; // in scope 3 at $DIR/dyn-trait.rs:21:5: 21:22 | ||
+ } | ||
+ } | ||
} | ||
|
||
bb0: { | ||
StorageLive(_2); // scope 0 at $DIR/dyn-trait.rs:33:9: 33:10 | ||
StorageLive(_3); // scope 0 at $DIR/dyn-trait.rs:33:22: 33:23 | ||
_3 = &(*_1); // scope 0 at $DIR/dyn-trait.rs:33:22: 33:23 | ||
_2 = <Q as Query>::cache::<T>(move _3) -> bb1; // scope 0 at $DIR/dyn-trait.rs:33:13: 33:24 | ||
// mir::Constant | ||
// + span: $DIR/dyn-trait.rs:33:13: 33:21 | ||
// + user_ty: UserType(0) | ||
// + literal: Const { ty: for<'r> fn(&'r T) -> &'r <Q as Query>::C {<Q as Query>::cache::<T>}, val: Value(Scalar(<ZST>)) } | ||
} | ||
|
||
bb1: { | ||
StorageDead(_3); // scope 0 at $DIR/dyn-trait.rs:33:23: 33:24 | ||
StorageLive(_4); // scope 1 at $DIR/dyn-trait.rs:34:23: 34:24 | ||
_4 = &(*_2); // scope 1 at $DIR/dyn-trait.rs:34:23: 34:24 | ||
- _0 = try_execute_query::<<Q as Query>::C>(move _4) -> bb2; // scope 1 at $DIR/dyn-trait.rs:34:5: 34:25 | ||
+ StorageLive(_5); // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15 | ||
+ StorageLive(_6); // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15 | ||
+ _6 = _4; // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15 | ||
+ _5 = move _6 as &dyn Cache<V = <Q as Query>::V> (Pointer(Unsize)); // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15 | ||
+ StorageDead(_6); // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15 | ||
+ StorageLive(_7); // scope 3 at $DIR/dyn-trait.rs:21:5: 21:22 | ||
+ _7 = _5; // scope 3 at $DIR/dyn-trait.rs:21:5: 21:22 | ||
+ _0 = <dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache(move _7) -> bb2; // scope 3 at $DIR/dyn-trait.rs:21:5: 21:22 | ||
// mir::Constant | ||
- // + span: $DIR/dyn-trait.rs:34:5: 34:22 | ||
- // + literal: Const { ty: for<'r> fn(&'r <Q as Query>::C) {try_execute_query::<<Q as Query>::C>}, val: Value(Scalar(<ZST>)) } | ||
+ // + span: $DIR/dyn-trait.rs:21:7: 21:20 | ||
+ // + literal: Const { ty: for<'r> fn(&'r dyn Cache<V = <Q as Query>::V>) {<dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache}, val: Value(Scalar(<ZST>)) } | ||
} | ||
|
||
bb2: { | ||
+ StorageDead(_7); // scope 3 at $DIR/dyn-trait.rs:21:21: 21:22 | ||
+ StorageDead(_5); // scope 2 at $DIR/dyn-trait.rs:27:15: 27:16 | ||
StorageDead(_4); // scope 1 at $DIR/dyn-trait.rs:34:24: 34:25 | ||
StorageDead(_2); // scope 0 at $DIR/dyn-trait.rs:35:1: 35:2 | ||
return; // scope 0 at $DIR/dyn-trait.rs:35:2: 35:2 | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
- // MIR for `mk_cycle` before Inline | ||
+ // MIR for `mk_cycle` after Inline | ||
|
||
fn mk_cycle(_1: &dyn Cache<V = V>) -> () { | ||
debug c => _1; // in scope 0 at $DIR/dyn-trait.rs:20:27: 20:28 | ||
let mut _0: (); // return place in scope 0 at $DIR/dyn-trait.rs:20:49: 20:49 | ||
let mut _2: &dyn Cache<V = V>; // in scope 0 at $DIR/dyn-trait.rs:21:5: 21:22 | ||
|
||
bb0: { | ||
StorageLive(_2); // scope 0 at $DIR/dyn-trait.rs:21:5: 21:22 | ||
_2 = &(*_1); // scope 0 at $DIR/dyn-trait.rs:21:5: 21:22 | ||
_0 = <dyn Cache<V = V> as Cache>::store_nocache(move _2) -> bb1; // scope 0 at $DIR/dyn-trait.rs:21:5: 21:22 | ||
// mir::Constant | ||
// + span: $DIR/dyn-trait.rs:21:7: 21:20 | ||
// + literal: Const { ty: for<'r> fn(&'r dyn Cache<V = V>) {<dyn Cache<V = V> as Cache>::store_nocache}, val: Value(Scalar(<ZST>)) } | ||
} | ||
|
||
bb1: { | ||
StorageDead(_2); // scope 0 at $DIR/dyn-trait.rs:21:21: 21:22 | ||
return; // scope 0 at $DIR/dyn-trait.rs:22:2: 22:2 | ||
} | ||
} | ||
|
Oops, something went wrong.