On Sun, 3 May 2026, Jeffrey Law wrote:

> [discussion elided]

> So is part of the problem that rx exposes CC as a register prior to
> reloading?? Would it make more sense to defer it like some of the other ports
> do.? I'd have to review Eric B's document on CC0 transition, but it
> essentially mapped two paths.? One where CC shows up prior to allocation, the
> other after.? I've only had experience with "after" style ports (H8 for
> example).? The after style potentially can generate better code as no pass
> really has to worry about CC0 until after reload, but it does result in
> meaningful code duplication since everything has to be split post-reload to
> expose CC0.
> 
> jeff


I'll take this opportunity to offer my unsolicited opinion (of 
no consequence to this situation which seems resolved) that the 
"before" style is preferable: with that, the RTX semantics is 
constant and doesn't change mid-compilation with the setting of 
a certain variable, leading to bugs and confusion (QED).

There's the argument that several optimization passes still do 
"if (GET_CODE (PATTERN (insn)) == SET) ..." instead of "rtx set 
= single_set (insn); if (set) ..." so it'd matter for 
performance.  I've found that not to be the extent that it 
should be a factor for deciding on doing the "before" or "after" 
style.  Proof: the CRIS port got slightly improved performance 
after the CC0 conversion to "before" style.

brgds, H-P

Reply via email to