uweigand opened issue #4426:
In implementing SIMD support for s390x, I ran into an issue with the
MachInst::gen_constant
routine that all platforms currently have to define. In a platform that otherwise fully uses ISLE for code generation, having to implement thatgen_constant
routine is annoying, since to achive full performance, we'd really have to duplicate all the various ways to optimally generate each particular constant. Specifically vector constants, which I've now added, would have required significantly extending thegen_constant
routine.Looking at the sources, it appears
gen_constant
is now solely used by the commonput_value_in_regs
routine. I'm wondering if it wouldn't be better to handle constant rematerialization instead on the ISLE side, e.g. in the ISLEput_in_regs
constructor? That should hopefully allow backends to re-use the ISLE rules for constant emission they already have ...FYI @cfallin
akirilov-arm labeled issue #4426:
In implementing SIMD support for s390x, I ran into an issue with the
MachInst::gen_constant
routine that all platforms currently have to define. In a platform that otherwise fully uses ISLE for code generation, having to implement thatgen_constant
routine is annoying, since to achive full performance, we'd really have to duplicate all the various ways to optimally generate each particular constant. Specifically vector constants, which I've now added, would have required significantly extending thegen_constant
routine.Looking at the sources, it appears
gen_constant
is now solely used by the commonput_value_in_regs
routine. I'm wondering if it wouldn't be better to handle constant rematerialization instead on the ISLE side, e.g. in the ISLEput_in_regs
constructor? That should hopefully allow backends to re-use the ISLE rules for constant emission they already have ...FYI @cfallin
akirilov-arm labeled issue #4426:
In implementing SIMD support for s390x, I ran into an issue with the
MachInst::gen_constant
routine that all platforms currently have to define. In a platform that otherwise fully uses ISLE for code generation, having to implement thatgen_constant
routine is annoying, since to achive full performance, we'd really have to duplicate all the various ways to optimally generate each particular constant. Specifically vector constants, which I've now added, would have required significantly extending thegen_constant
routine.Looking at the sources, it appears
gen_constant
is now solely used by the commonput_value_in_regs
routine. I'm wondering if it wouldn't be better to handle constant rematerialization instead on the ISLE side, e.g. in the ISLEput_in_regs
constructor? That should hopefully allow backends to re-use the ISLE rules for constant emission they already have ...FYI @cfallin
fitzgen commented on issue #4426:
This makes sense to me; the current architecture is basically a left over of incremental migration to ISLE.
uweigand closed issue #4426:
In implementing SIMD support for s390x, I ran into an issue with the
MachInst::gen_constant
routine that all platforms currently have to define. In a platform that otherwise fully uses ISLE for code generation, having to implement thatgen_constant
routine is annoying, since to achive full performance, we'd really have to duplicate all the various ways to optimally generate each particular constant. Specifically vector constants, which I've now added, would have required significantly extending thegen_constant
routine.Looking at the sources, it appears
gen_constant
is now solely used by the commonput_value_in_regs
routine. I'm wondering if it wouldn't be better to handle constant rematerialization instead on the ISLE side, e.g. in the ISLEput_in_regs
constructor? That should hopefully allow backends to re-use the ISLE rules for constant emission they already have ...FYI @cfallin
Last updated: Nov 22 2024 at 16:03 UTC