souper-harvest: Do not generate assignments of constants

It turns out that Souper does not allow a constant to be assigned to a variable,
they may only be used as operands. The 2.0.0 version of the `souper-ir` crate
correctly reflects this. In the `cranelift_codegen::souper_harvest` module, we
need to modify our Souper IR harvester so that it delays converting `iconst` and
`bconst` into Souper IR until their values are used as operands. Finally, some
unit tests in the `peepmatic-souper` crate need some small updates as well.
This commit is contained in:
Nick Fitzgerald
2020-10-15 17:00:02 -07:00
parent 09662fa716
commit f7cf771ee6
5 changed files with 60 additions and 35 deletions

View File

@@ -10,7 +10,7 @@ description = "Converting Souper optimizations into Peepmatic DSL"
[dependencies]
anyhow = "1"
souper-ir = { version = "1", features = ["parse"] }
souper-ir = { version = "2.0.0", features = ["parse"] }
log = "0.4.8"
[dev-dependencies]