Skip to content

Conversation

jurahul
Copy link
Contributor

@jurahul jurahul commented Aug 22, 2025

Rearrange decode functions to be before including the generated disassembler code and eliminate forward declarations for most of them. This is possible because fieldFromInstruction is now in MCDecoder.h and not in the generated disassembler code.

@jurahul jurahul marked this pull request as ready for review August 22, 2025 19:02
@s-barannikov
Copy link
Contributor

Sorry, don't know what is going on, please see the snapshot of the comment.
image

@jurahul
Copy link
Contributor Author

jurahul commented Aug 22, 2025

Thanks, I lied :( The moved set of functions are also shuffled around a bit to avoid forward declarations within themselves (there were uses before definitions and I fixed them by rearranging the functions. No other code changes though. I updated description to mention that.

@nigelp-xmos
Copy link
Contributor

Happy to approve, but if this combines general tidying up of forward declarations, with changes enabled by fieldFromInstruction, wouldn't it be clearer in separate commits, or is there a reason to combine them? Minimizing NFCs?

@jurahul
Copy link
Contributor Author

jurahul commented Aug 26, 2025

Sounds good, I'll do this in 2 steps. (1) move all definitions up and remove any forward decls that are not necessary without reordering functions and then (2) reorder to eliminate some more fwd decls

@jurahul jurahul force-pushed the nfc_xcode_disasm_move_decoder_funcs branch from b6c7712 to b840e35 Compare August 26, 2025 16:46
@jurahul jurahul force-pushed the nfc_xcode_disasm_move_decoder_funcs branch from b840e35 to 22face3 Compare August 26, 2025 16:52
Copy link
Contributor

@s-barannikov s-barannikov left a comment

Choose a reason for hiding this comment

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

LGTM

@jurahul jurahul merged commit dac9d8f into llvm:main Aug 26, 2025
9 checks passed
@jurahul jurahul deleted the nfc_xcode_disasm_move_decoder_funcs branch August 26, 2025 17:36
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