x64: add benchmarks for EVEX encoding

This change adds a criterion-enabled benchmark, x64-evex-encoding, to
compare the performance of the builder pattern used to encode EVEX
instructions in the new x64 backend against the function pattern
used to encode EVEX instructions in the legacy x86 backend. At face
value, the results imply that the builder pattern is faster, but no
efforts were made to analyze and optimize these approaches further.
This commit is contained in:
Andrew Brown
2021-05-10 11:05:07 -07:00
parent c89e6b2353
commit 011e94f3fa
3 changed files with 402 additions and 11 deletions

View File

@@ -34,6 +34,9 @@ wast = { version = "35.0.0", optional = true }
# machine code. Integration tests that need external dependencies can be
# accomodated in `tests`.
[dev-dependencies]
criterion = "0.3"
[build-dependencies]
cranelift-codegen-meta = { path = "meta", version = "0.73.0" }
@@ -103,3 +106,7 @@ souper-harvest = ["souper-ir", "souper-ir/stringify"]
[badges]
maintenance = { status = "experimental" }
[[bench]]
name = "x64-evex-encoding"
harness = false