Put TargetIsa's emit_inst under a "testing_hooks" feature. (#531)

* Put TargetIsa's emit_inst under a "testing_hooks" feature.

In practice, TargetIsa's emit_inst pulls in its own instantiation
of the target-specifi `emit_inst` functions, which can be quite
large, and LTO doesn't eliminate them because they're held live
by TargetIsa's vtable.

Fortunately, this function is only used by tests, so we can put
it behind a feature flag.

Fixes #530.

* Add comments for `emit_inst` to clarify its purpose.
This commit is contained in:
Dan Gohman
2018-10-05 09:12:47 -07:00
committed by GitHub
parent bf041e3ae2
commit 652e526bb6
7 changed files with 24 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ repository = "https://github.com/CraneStation/cranelift"
publish = false
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.22.0" }
cranelift-codegen = { path = "../codegen", version = "0.22.0", features = ["testing_hooks"] }
cranelift-reader = { path = "../reader", version = "0.22.0" }
file-per-thread-logger = "0.1.1"
filecheck = "0.4.0"