Hi,
looking at the RISCV code, it seems that there are several vendor-specific files
in config/riscv. For instance sifive-7.md and xiangshan.md. It seems these are
unconditionally included for all riscv targets. I guess then one doesn't end up
with some combinatorial explosion of possible riscv compilers. But it doesn't
seem scalable, given the one of the points of riscv is to add your own magic
pixie dust.
In my case, I have a port that also has a bunch of vendor-specific passes, which
have unfortunately been placed in the main gcc directory. They directly rely on
an API added to config/riscv. IMHO placing them in a vendor subdirectory of
config/riscv would seem cleaner. Then have config glue to include them in the
build under something like a --with-riscv-$vendor-extensions configure flag
Whether this port gets considered for upstreaming is unknown.
Anyway, I guess I'm suggesting that, for new code:
1) vendor-specific files get put in a config/riscv/$vendor subdirectory
2) configure-time options determine whether a specific vendor's bits are
included in the build.
$vendor names can be those used in the X$vendor$suffix ISA extension scheme
thoughts?
nathan
--
Nathan Sidwell