Mill Computing, Inc. › Forums › The Mill › Tools › Compilers › Member-independent form vs. member-specific optimizations, such as Mach 3? › Reply To: Member-independent form vs. member-specific optimizations, such as Mach 3?
If the compiler generates a member-independent intermediate form, is it left to the specializer to identify and make use of optimizations that depend on functional unit population and ordering?
Yes, this is how responsibilities are split between compiler and specializer.
The compiler targets an abstract Mill – infinite belt, etc – and serializes its AST to file for distribution. Its not actually a single AST, its a forest of candidate control-flow graphs so the compiler can provide alternatives for the specializers to choose between.
The scheduling of operations and scratch and such is performed by the specializer, which knows the parameters of the target Mill.
Whilst non-trivial to think about, the specializer’s scheduling isn’t really comparable to the heavyweight optimisations that a compiler makes. The specializer is very very fast, as it can be used in JIT as well as AOT generation.
I dug up this excellent post by Ivan that covers this in more detail: http://millcomputing.com/topic/introduction-to-the-mill-cpu-programming-model-2/#post-889