Skip to content
/ rust Public
forked from rust-lang/rust

Commit 33c186b

Browse files
authored
Rollup merge of rust-lang#136807 - workingjubilee:merge-gpus-to-get-the-arcradeongeforce, r=bjorn3
compiler: internally merge `PtxKernel` into `GpuKernel` r? ``@bjorn3`` for review
2 parents 03e2d7e + be1d6df commit 33c186b

File tree

6 files changed

+4
-13
lines changed

6 files changed

+4
-13
lines changed

compiler/rustc_codegen_cranelift/src/abi/mod.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@ pub(crate) fn conv_to_call_conv(sess: &Session, c: Conv, default_call_conv: Call
6565
sess.dcx().fatal("C-cmse-nonsecure-entry call conv is not yet implemented");
6666
}
6767

68-
Conv::Msp430Intr
69-
| Conv::PtxKernel
70-
| Conv::GpuKernel
71-
| Conv::AvrInterrupt
72-
| Conv::AvrNonBlockingInterrupt => {
68+
Conv::Msp430Intr | Conv::GpuKernel | Conv::AvrInterrupt | Conv::AvrNonBlockingInterrupt => {
7369
unreachable!("tried to use {c:?} call conv which only exists on an unsupported target");
7470
}
7571
}

compiler/rustc_codegen_llvm/src/abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,6 @@ impl llvm::CallConv {
687687
Conv::AvrNonBlockingInterrupt => llvm::AvrNonBlockingInterrupt,
688688
Conv::ArmAapcs => llvm::ArmAapcsCallConv,
689689
Conv::Msp430Intr => llvm::Msp430Intr,
690-
Conv::PtxKernel => llvm::PtxKernel,
691690
Conv::X86Fastcall => llvm::X86FastcallCallConv,
692691
Conv::X86Intr => llvm::X86_Intr,
693692
Conv::X86Stdcall => llvm::X86StdcallCallConv,

compiler/rustc_smir/src/rustc_smir/convert/abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ impl<'tcx> Stable<'tcx> for callconv::Conv {
105105
Conv::CCmseNonSecureCall => CallConvention::CCmseNonSecureCall,
106106
Conv::CCmseNonSecureEntry => CallConvention::CCmseNonSecureEntry,
107107
Conv::Msp430Intr => CallConvention::Msp430Intr,
108-
Conv::PtxKernel => CallConvention::PtxKernel,
109108
Conv::X86Fastcall => CallConvention::X86Fastcall,
110109
Conv::X86Intr => CallConvention::X86Intr,
111110
Conv::X86Stdcall => CallConvention::X86Stdcall,

compiler/rustc_target/src/callconv/mod.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,6 @@ pub enum Conv {
542542

543543
Msp430Intr,
544544

545-
PtxKernel,
546-
547545
GpuKernel,
548546

549547
X86Fastcall,
@@ -689,7 +687,8 @@ impl<'a, Ty> FnAbi<'a, Ty> {
689687
"sparc" => sparc::compute_abi_info(cx, self),
690688
"sparc64" => sparc64::compute_abi_info(cx, self),
691689
"nvptx64" => {
692-
if cx.target_spec().adjust_abi(abi, self.c_variadic) == ExternAbi::PtxKernel {
690+
let abi = cx.target_spec().adjust_abi(abi, self.c_variadic);
691+
if abi == ExternAbi::PtxKernel || abi == ExternAbi::GpuKernel {
693692
nvptx64::compute_ptx_kernel_abi_info(cx, self)
694693
} else {
695694
nvptx64::compute_abi_info(self)
@@ -841,7 +840,6 @@ impl FromStr for Conv {
841840
"CCmseNonSecureCall" => Ok(Conv::CCmseNonSecureCall),
842841
"CCmseNonSecureEntry" => Ok(Conv::CCmseNonSecureEntry),
843842
"Msp430Intr" => Ok(Conv::Msp430Intr),
844-
"PtxKernel" => Ok(Conv::PtxKernel),
845843
"X86Fastcall" => Ok(Conv::X86Fastcall),
846844
"X86Intr" => Ok(Conv::X86Intr),
847845
"X86Stdcall" => Ok(Conv::X86Stdcall),

compiler/rustc_target/src/json.rs

-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ impl ToJson for crate::callconv::Conv {
105105
Self::CCmseNonSecureCall => "CCmseNonSecureCall",
106106
Self::CCmseNonSecureEntry => "CCmseNonSecureEntry",
107107
Self::Msp430Intr => "Msp430Intr",
108-
Self::PtxKernel => "PtxKernel",
109108
Self::X86Fastcall => "X86Fastcall",
110109
Self::X86Intr => "X86Intr",
111110
Self::X86Stdcall => "X86Stdcall",

compiler/rustc_ty_utils/src/abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: ExternAbi, c_variadic: bool) -> Conv
290290
Aapcs { .. } => Conv::ArmAapcs,
291291
CCmseNonSecureCall => Conv::CCmseNonSecureCall,
292292
CCmseNonSecureEntry => Conv::CCmseNonSecureEntry,
293-
PtxKernel => Conv::PtxKernel,
293+
PtxKernel => Conv::GpuKernel,
294294
Msp430Interrupt => Conv::Msp430Intr,
295295
X86Interrupt => Conv::X86Intr,
296296
GpuKernel => Conv::GpuKernel,

0 commit comments

Comments
 (0)