Skip to content

Conversation

vosen
Copy link
Owner

@vosen vosen commented Oct 16, 2025

Currently, "instruction_mode_to_global_mode" is extremely slow. Here's a timing for a mildly big module (not the worst one):

Pass "normalize_identifiers" took 59.860832ms
Pass "replace_known_functions" took 2.624µs
Pass "normalize_predicates2" took 23.391069ms
Pass "resolve_function_pointers" took 7.802311ms
Pass "fix_special_registers" took 22.046943ms
Pass "expand_operands" took 22.284991ms
Pass "insert_post_saturation" took 6.117475ms
Pass "deparamize_functions" took 4.783183ms
Pass "replace_instructions_with_functions_fp_required" took 11.614769ms
Pass "normalize_basic_blocks" took 8.002911ms
Pass "remove_unreachable_basic_blocks" took 6.165235ms
Pass "instruction_mode_to_global_mode" took 21.265026257s
Pass "insert_explicit_load_store" took 92.962535ms
Pass "insert_implicit_conversions2" took 99.951435ms
Pass "replace_instructions_with_functions" took 73.920287ms
Pass "hoist_globals" took 5.73405ms
Pass "emit_llvm" took 260.021649ms
Wrote to module_0001_01_06.ll
Wrote to module_0001_01_06.linked.ll
Wrote to module_0001_01_06.elf
Wrote to module_0001_01_06.asm
Pass "compile_bitcode" took 13.447234329s

This pass is the most complicated of the ones we currently have, but there are some low-hanging performance fruits

@vosen vosen marked this pull request as ready for review October 20, 2025 19:55
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.

1 participant