Skip to content

Conversation

@LaurenIsACoder
Copy link
Contributor

No description provided.

Consolidate conditional compilation for la_profile_begin/end declarations
and definitions. Ensure functions are always called (as empty stubs when
CONFIG_LATX_PROFILER is off) and remove duplicate calls, keeping profiling
logic paired and consistent.

Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Move indirect jump handling logic from translator switch statement into
separate functions:

1. Add set_tb_jmp_indirect_label() helper function
2. Add generate_indirect_exit_stub() helper function

Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Added a helper function `next_in_same_tu()` to check if the next TB
belongs to the same TU. This function is intended to be called only
during the TU translation phase.

Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
1.Change generate_indirect_goto() from static to global visibility
2.Add parameters jirl_rd and next_tb to generalize the function

This refactoring allows the indirect goto generation logic to be reused
in multiple contexts, improving code flexibility and paving the way for future
optimizations.

Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
This patch introduces a shared exit stub mechanism for all TBs ending
with indirect jumps within a TU.

Key changes:
1. Create a common exit stub for indirect jump tails across all TBs
   in the same TU
2. Reduce instruction count per TB by consolidating indirect jump
   epilogues
3. Enable the jirl instruction in not taken path to be contiguous
   with next TB's code

Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
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