/
CT_00_040 - Improve Instruction Length Computations (GCC)

CT_00_040 - Improve Instruction Length Computations (GCC)

About

RISC-V's conditional branch instructions have limited range for their target.  When the target is out of range the compiler has to create a inverted conditional branch around an unconditional jump.


RIght now GCC's length computations ignore compressable instructions and as a result the computed distance between the conditional branch and its target is significantly inaccurate.  If we can conservatively determine if an instruction will be implemented as a compressed instruction, then we can account for that in the length computation.  That in turn will allow the compiler to statically determine that more conditional branches can directly reach their target and thus avoid the inverted branch around an unconditional jump sequence.  That should improve performance, but it's unclear by how much.


Stakeholders/Partners

RISE:

Ventana: Jeff Law


External:



Dependencies


Status

Development

MOVED


Development TimelineNA
Upstreaming

MOVED


Upstream Version





Contacts

Jeff Law (Ventana)


Dependencies

None



Updates

  • Folded into a different 1H2025 project 


 

  • New work item for 2H2024


Related content

2024-2H - Compilers and Toolchains Priorities
2024-2H - Compilers and Toolchains Priorities
Read with this
CT_00_003 -- Redundant Extension Elimination (GCC)
CT_00_003 -- Redundant Extension Elimination (GCC)
More like this
CT_00_037 -- Zicond with if-conversion improvements (GCC)
CT_00_037 -- Zicond with if-conversion improvements (GCC)
Read with this
CT_00_010 - Improve Long branch/jump support (GCC)
CT_00_010 - Improve Long branch/jump support (GCC)
More like this
2025-1H - Compilers and Toolchains Priorities
2025-1H - Compilers and Toolchains Priorities
Read with this
Project RP008_Toolchain - GCC SPEC2017 Optimization
Project RP008_Toolchain - GCC SPEC2017 Optimization
More like this