bongjunj opened PR #12233 from bongjunj:log-fired-isle-rules to bytecodealliance:main:
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->resolves https://github.com/bytecodealliance/wasmtime/issues/11971
Run the following command to check:
RUST_LOG=cranelift_codegen::opts::generated_code=trace cargo run -p cranelift-tools --bin clif-util -- compile --target x86_64-unknown-linux-gnu --set opt_level=speedShould print logs such as:
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 23 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bnot <OUT_DIR>/clif_opt.isle line 1322 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bnot <OUT_DIR>/clif_opt.isle line 1322 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 17 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bor <OUT_DIR>/clif_opt.isle line 1304 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/bitops.isle line 48 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 23 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bnot <OUT_DIR>/clif_opt.isle line 1322
bongjunj requested cfallin for a review on PR #12233.
bongjunj requested wasmtime-compiler-reviewers for a review on PR #12233.
bongjunj edited PR #12233:
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->resolves https://github.com/bytecodealliance/wasmtime/issues/11971
Run the following command to check:
RUST_LOG=cranelift_codegen::opts::generated_code=trace cargo run -p cranelift-tools --bin clif-util -- compile --target x86_64-unknown-linux-gnu --set opt_level=speed <input.clif>Should print logs such as:
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 23 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bnot <OUT_DIR>/clif_opt.isle line 1322 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bnot <OUT_DIR>/clif_opt.isle line 1322 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 17 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bor <OUT_DIR>/clif_opt.isle line 1304 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/bitops.isle line 48 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 23 [2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bnot <OUT_DIR>/clif_opt.isle line 1322
github-actions[bot] commented on PR #12233:
Subscribe to Label Action
cc @cfallin, @fitzgen
<details>
This issue or pull request has been labeled: "cranelift", "isle"Thus the following users have been cc'd because of the following labels:
- cfallin: isle
- fitzgen: isle
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
cfallin submitted PR review:
Thanks! Happy to merge with the one question below answered/addressed. This will definitely be helpful tracing rule applications!
cfallin created PR review comment:
I don't think we need the
#[cfg(feature = "trace-log")]here, since we are already conditionalizing this bit of codegen on thetrace-logfeature via theemit_loggingoption, right?
bongjunj updated PR #12233.
bongjunj submitted PR review.
bongjunj created PR review comment:
No, the feature guard is unnecessary as you pointed out, and the test below demonstrates you can safely remove the guard.
> RUST_LOG=cranelift_codegen::opts::generated_code=trace cargo run -p cranelift-tools --bin clif-util -- co mpile --target x86_64-unknown-linux-gnu --set opt_level=speed ../../keccak-no-opts.clif 2>&1 | head -n10 ... [2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 25 [2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 5 [2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 25 [2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 5 [2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 25 [2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 5 [2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 25 [2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 5 > cargo run -p cranelift-tools --bin clif-util -- compile --target x86_64-unknown-linux-gnu --set opt_level =speed ../../data/clif/keccak-no-opts.clif 2>&1 | head -n10 [No output]
bongjunj edited PR review comment.
bongjunj edited PR review comment.
cfallin commented on PR #12233:
@bongjunj it looks like this fails on Windows (see this CI job) because the paths have backslashes, and when embedding those into strings, they become (ill-formed) escapes. Could you address by either replacing
\with/or by properly escaping somehow?
bongjunj updated PR #12233.
bongjunj commented on PR #12233:
I have changed the string embedding from
Displaytrait toDebugtrait, asDebugtrait can automatically escape and places quotes.
bongjunj edited a comment on PR #12233:
I have changed the string embedding from
Displaytrait toDebugtrait, asDebugtrait can automatically place escapes and quotes.
cfallin submitted PR review.
cfallin merged PR #12233.
Last updated: Jan 09 2026 at 13:15 UTC