Skip to content

Conversation

@jurahul
Copy link
Contributor

@jurahul jurahul commented Jul 29, 2025

Add support for measuring decode times in llvm-mc tool. Add command line options to enable time-trace profiling (similar to llc or opt) and add option runs to run the decoder several times on each instruction.

@jurahul jurahul marked this pull request as ready for review July 29, 2025 14:48
@jurahul
Copy link
Contributor Author

jurahul commented Jul 29, 2025

Planning to use this in the context of #146593

@jurahul jurahul requested a review from mshockwave July 29, 2025 18:26
@jurahul jurahul changed the title [LLVM][MC] Add tracing support to llvm-mc to measure decode times [LLVM][MC] Add tracing support to llvm-mc to profile decoding Jul 29, 2025
Copy link
Member

@mshockwave mshockwave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
could you add a simple test?

@jurahul
Copy link
Contributor Author

jurahul commented Jul 29, 2025

Added unit test

@MaskRay
Copy link
Member

MaskRay commented Jul 30, 2025

Perhaps shorten the option to --runs? (At least, I don't think the infix -benchmark is useful..)

Since this doesn't really touch lib/MC include/llvm/MC, I'd remove the [MC] tags. perhaps: [llvm-mc] Add --runs for benchmark

@jurahul jurahul changed the title [LLVM][MC] Add tracing support to llvm-mc to profile decoding [llvm-mc] Add --runs option for benchmarking Jul 30, 2025
@jurahul jurahul merged commit 4f39139 into llvm:main Jul 30, 2025
9 checks passed
@jurahul jurahul deleted the llvm_mc_profile branch July 30, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants