Skip to content

Commit 68f3053

Browse files
cfallinmpardesh
authored andcommitted
Remove incomplete/unmaintained ARM32 backend (for now). (bytecodealliance#3799)
In bytecodealliance#3721, we have been discussing what to do about the ARM32 backend in Cranelift. Currently, this backend supports only 32-bit types, which is insufficient for full Wasm-MVP; it's missing other critical bits, like floating-point support; and it has only ever been exercised, AFAIK, via the filetests for the individual CLIF instructions that are implemented. We were very very thankful for the original contribution of this backend, even in its partial state, and we had hoped at the time that we could eventually mature it in-tree until it supported e.g. Wasm and other use-cases. But that hasn't yet happened -- to the blame of no-one, to be clear, we just haven't had a contributor with sufficient time. Unfortunately, the existence of the backend and lack of active maintainer now potentially pose a bit of a burden as we hope to make continuing changes to the backend framework. For example, the ISLE migration, and the use of regalloc2 that it will allow, would need all of the existing lowering patterns in the hand-written ARM32 backend to be rewritten as ISLE rules. Given that we don't currently have the resources to do this, we think it's probably best if we, sadly, for now remove this partial backend. This is not in any way a statement of what we might accept in the future, though. If, in the future, an ARM32 backend updated to our latest codebase with an active maintainer were to appear, we'd be happy to merge it (and likewise for any other architecture!). But for now, this is probably the best path. Thanks again to the original contributor @jmkrauz and we hope that this work can eventually be brought back and reused if someone has the time to do so!
1 parent 737ff90 commit 68f3053

27 files changed

+6
-7189
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,9 @@ jobs:
150150
# Check a few builds of the cranelift backend
151151
# - only x86 backend support,
152152
# - only arm64 backend support,
153-
# - experimental arm32 support,
154153
# - no debug_assertions.
155154
- run: cargo check --manifest-path=./cranelift/Cargo.toml --bin clif-util --no-default-features --features=cranelift-codegen/arm64
156155
- run: cargo check --manifest-path=./cranelift/Cargo.toml --bin clif-util --no-default-features --features=cranelift-codegen/x86
157-
- run: cargo check --manifest-path=./cranelift/Cargo.toml --bin clif-util --no-default-features --features=cranelift-codegen/arm32
158156
- run: cargo check --manifest-path=./cranelift/Cargo.toml --bin clif-util
159157
env:
160158
CARGO_PROFILE_DEV_DEBUG_ASSERTIONS: false

cranelift/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,5 @@ structopt = "0.3.17"
4747
default = ["disas", "wasm", "cranelift-codegen/all-arch", "souper-harvest"]
4848
disas = ["capstone"]
4949
wasm = ["wat", "cranelift-wasm"]
50-
experimental_arm32 = ["cranelift-codegen/arm32", "cranelift-filetests/experimental_arm32"]
5150
souper-harvest = ["cranelift-codegen/souper-harvest", "rayon"]
5251
all-arch = ["cranelift-codegen/all-arch"]

cranelift/codegen/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ unwind = ["gimli"]
6262
x86 = []
6363
arm64 = []
6464
s390x = []
65-
arm32 = [] # Work-in-progress codegen backend for ARM.
6665

6766
# Stub feature that does nothing, for Cargo-features compatibility: the new
6867
# backend is the default now.

cranelift/codegen/meta/src/isa/arm32.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

cranelift/codegen/meta/src/isa/mod.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use crate::cdsl::isa::TargetIsa;
33
use crate::shared::Definitions as SharedDefinitions;
44
use std::fmt;
55

6-
mod arm32;
76
mod arm64;
87
mod s390x;
98
pub(crate) mod x86;
@@ -12,7 +11,6 @@ pub(crate) mod x86;
1211
#[derive(PartialEq, Copy, Clone)]
1312
pub enum Isa {
1413
X86,
15-
Arm32,
1614
Arm64,
1715
S390x,
1816
}
@@ -32,14 +30,13 @@ impl Isa {
3230
"aarch64" => Some(Isa::Arm64),
3331
"s390x" => Some(Isa::S390x),
3432
x if ["x86_64", "i386", "i586", "i686"].contains(&x) => Some(Isa::X86),
35-
x if x.starts_with("arm") || arch.starts_with("thumb") => Some(Isa::Arm32),
3633
_ => None,
3734
}
3835
}
3936

4037
/// Returns all supported isa targets.
4138
pub fn all() -> &'static [Isa] {
42-
&[Isa::X86, Isa::Arm32, Isa::Arm64, Isa::S390x]
39+
&[Isa::X86, Isa::Arm64, Isa::S390x]
4340
}
4441
}
4542

@@ -48,7 +45,6 @@ impl fmt::Display for Isa {
4845
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4946
match *self {
5047
Isa::X86 => write!(f, "x86"),
51-
Isa::Arm32 => write!(f, "arm32"),
5248
Isa::Arm64 => write!(f, "arm64"),
5349
Isa::S390x => write!(f, "s390x"),
5450
}
@@ -59,7 +55,6 @@ pub(crate) fn define(isas: &[Isa], shared_defs: &mut SharedDefinitions) -> Vec<T
5955
isas.iter()
6056
.map(|isa| match isa {
6157
Isa::X86 => x86::define(shared_defs),
62-
Isa::Arm32 => arm32::define(shared_defs),
6358
Isa::Arm64 => arm64::define(shared_defs),
6459
Isa::S390x => s390x::define(shared_defs),
6560
})

0 commit comments

Comments
 (0)