diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 62d1a4865b..15dce9e435 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -162,7 +162,8 @@ jobs: --package peepmatic-fuzzing \ --package peepmatic-macro \ --package peepmatic-runtime \ - --package peepmatic-test + --package peepmatic-test \ + --package peepmatic-souper - name: Rebuild Peepmatic-based peephole optimizers and test them run: | cargo test \ @@ -248,7 +249,8 @@ jobs: --exclude peepmatic-fuzzing \ --exclude peepmatic-macro \ --exclude peepmatic-runtime \ - --exclude peepmatic-test + --exclude peepmatic-test \ + --exclude peepmatic-souper env: RUST_BACKTRACE: 1 @@ -383,6 +385,7 @@ jobs: --exclude peepmatic-macro \ --exclude peepmatic-runtime \ --exclude peepmatic-test \ + --exclude peepmatic-souper \ --exclude wasmtime-fuzz env: RUST_BACKTRACE: 1 diff --git a/Cargo.lock b/Cargo.lock index 4294ac631c..4e264f3c89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -564,6 +564,7 @@ dependencies = [ "filecheck", "indicatif", "log", + "peepmatic-souper", "pretty_env_logger", "target-lexicon", "term", @@ -1326,6 +1327,10 @@ dependencies = [ "wast", ] +[[package]] +name = "peepmatic-souper" +version = "0.66.0" + [[package]] name = "peepmatic-test" version = "0.2.0" diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index edcd9580ca..7347c75d96 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -36,6 +36,7 @@ term = "0.6.1" capstone = { version = "0.6.0", optional = true } wat = { version = "1.0.18", optional = true } target-lexicon = "0.10" +peepmatic-souper = { path = "./peepmatic/crates/souper", version = "0.66.0", optional = true } pretty_env_logger = "0.4.0" file-per-thread-logger = "0.1.2" indicatif = "0.13.0" @@ -43,7 +44,7 @@ thiserror = "1.0.15" walkdir = "2.2" [features] -default = ["disas", "wasm", "cranelift-codegen/all-arch"] +default = ["disas", "wasm", "cranelift-codegen/all-arch", "peepmatic-souper"] disas = ["capstone"] enable-peepmatic = ["cranelift-codegen/enable-peepmatic", "cranelift-filetests/enable-peepmatic"] wasm = ["wat", "cranelift-wasm"] diff --git a/cranelift/peepmatic/crates/souper/Cargo.toml b/cranelift/peepmatic/crates/souper/Cargo.toml new file mode 100644 index 0000000000..1d478d6820 --- /dev/null +++ b/cranelift/peepmatic/crates/souper/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "peepmatic-souper" +version = "0.66.0" +authors = ["Nick Fitzgerald "] +edition = "2018" +license = "Apache-2.0 WITH LLVM-exception" +description = "Converting Souper optimizations into Peepmatic DSL" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/cranelift/peepmatic/crates/souper/src/lib.rs b/cranelift/peepmatic/crates/souper/src/lib.rs new file mode 100644 index 0000000000..8431b4bd14 --- /dev/null +++ b/cranelift/peepmatic/crates/souper/src/lib.rs @@ -0,0 +1 @@ +//! Converting Souper optimizations into Peepmatic DSL. diff --git a/scripts/publish.rs b/scripts/publish.rs index 1cc5b9105b..b612d47356 100644 --- a/scripts/publish.rs +++ b/scripts/publish.rs @@ -22,6 +22,7 @@ const CRATES_TO_PUBLISH: &[&str] = &[ "peepmatic-test-operator", "peepmatic-runtime", "peepmatic", + "peepmatic-souper", // cranelift "cranelift-entity", "cranelift-bforest",