What kinds of optimizations could be available to a system that can integrate a semantic and systematic understanding of a chip, microarchitecture and high-level compiled languages on top of that?
I know we have e.g. VHDL but to marry that to a high level language compiler seems like it would open some new doors (maybe this has already been done and I’m just not aware).
Compilers have had detailed pipeline and memory hierarchy models available for decades. This is not a new thing in LLVM, the new thing is a language for describing a pipeline (which replaces an older description language).
Instruction generation and scheduling optimizations primarily.
I don't know if much higher level optimization is done, possibly some cache blocking? I don't think the limitation is the hardware description available so much as actually using that to make worthwhile optimizations.
Going the other direction, it might allow better optimizations of microarchitectures for known workloads by allowing description and simulation of alternative designs at a high level of abstraction.
I'm no expert (but I do work with this stuff regularly) and I realize this is gcc documentation vs llvm docs. Regardless, arm32/64 has a lot of optional instruction sets that may or may not be supported on a given processor as improvements have been made over time.
Number of variants to a large extent. Risc-V has a relatively few number of implementations that are about the same in terms of how they implement things. Aarch64 has a comparably huge number of implementations that have different pipeline descriptions, different extension APIs supported, etc. Aarch64 includes descriptors for everything from a low-end Cortex A53 designed back in 2012 to a a high-end Apple M2 that was released this year.
https://github.com/MPACT-ORG/llvm-project/blob/work/llvm/doc...