bjorn3 commented on Issue #1088:
The new backend framework doesn't use legalizations as much as the old framework.
cfallin commented on Issue #1088:
The AArch64 backend shows how these issues can be addressed in new-style backends. Specifically,
iconst
is lowered to one or several instructions depending on the value, so the backend can choose whatever synthesis strategy (constant pool, synthesizing from several parts, etc.) makes the most sense. Branches can be lowered to one or several instructions as necessary -- to the specific issue above regarding value widths supported bybrz
/brnz
, we could add widening instructions as needed in the lowering.
cfallin closed Issue #1088:
Hi,
In doing my MIPS64 port I found a couple of blockers that impede support for other RISC architectures as well.
iconst
can't load immediates larger than the instruction's slot; andbrz
brnz
and possibly other instructions can only operate on native-sized operands.How do we best implement constant materialization for RISC architectures, an arch-specific approach or a generic one with knowledge of things like
li/lui/shl/or
?As for the latter, I tried
widen
but it didn't work. I think that's becausebrz
and similar instructions is not "polymorphic" like with those namedfoo.iB
. How do I specify the correct widening behavior in this case?
Last updated: Dec 23 2024 at 12:05 UTC