About

The ZiCondops extension provides a conditional zero primitive upon which subsets of conditional move and conditional arithmetic/logical operations can be implemented.   Transforming control flow into conditional operations can improve code performance by eliminating branch mispredict costs as well as reducing the load on the branch predictors.  The earlier in the optimizer pipeline these transformations are performed the more likely they are to expose secondary optimization opportunities as well since the transformations result in larger basic blocks (a fundamental unit of code most compiler optimizations work on).


This work consists of 4 subprojects:

  1. Basic ZICondops patterns in the RISC-V target description
    1. VRULL + Ventana + ESWIN
  2. Improvements to generate those patterns early in the RTL optimizer pipeline
    1. Ventana (primarily Raphael's work with bugfixing from Jeff) + ESWIN
  3. Fixes to cost model to enable more conditional move generatinon
  4. Improvements to the if-converter to consistently utilize the conditional zero primitive provided by ZICondops
    1. Mixed work from VRULL, Ventana & ESWIN


Evaluation of the initial implementation has indicated that idioms to implement 32 bit operations on rv64 are consistently not if-converted.  Improvements to capture those cases are in progress.

Stakeholders/Partners

RISE:

Ventana: 1 FTE (Christoph Muellner and Philipp Tomsich) for initial development

Ventana: 1 FTE, ~12 wks.  Raphael Zinsly. Revamped basic support in preparation for upstreaming, support for conditional 32bit ops, conditional move support early in the compiler optimization pipeline

Ventana: Jeff Law.  Integration of Raphael's work with upcoming changes from Philipp.

Rivos: Oversight & review. 

SiFive: Oversight

External:

VRULL: Philipp Tomsich.  Initial work under contract to Rivos and Ventana.  Ongoing updates

ESWIN: Submission of basic Zicond support, conditional move and limited improvements to ifcvt

Dependencies



Status


Development


Development TimelineNA
Upstreaming


Upstream Version





Contacts

Philip Tomsich (VRULL)

Raphael Zinsly (Ventana)

Jeff Law (Ventana)







Updates

 

 

 

 

 

 

 

– Dates on or before June 15 are approximate