Florian Klämpfl wrote 11 lines
I don't think it will ever be the sole FPC backend, for several reasons: a) I doubt LLVM will ever support all platforms we support (go32v2, OS/2, ...), and older platforms it does currently support (e.g. Mac OS X/ppc) will probably become unsupported in the future because of bitrot. Because it moves so fast and often breaks/redesigns internal APIs, it requires extremely dedicated platform maintainers to keep a platform tier 1 (which is another reason for not relying on LLVM as sole backend, unless we want to keep support for some old LLVM versions that did support that target around forever) b) our direct code generators will probably always be faster in terms of compilation speed, so they'll remain very useful even on supported platforms for debug/development builds c) some people (you :) are not really interested in working on LLVM support
And as far as interesting things to do are concerned: there will always be high level optimizations that we can do much better at the Pascal level (like the function devirtualization that's part of our WPO) than LLVM will ever be able to do, because we have much more semantic and high level information. Additionally, LLVM has several attributes you can add to annotate functions (has no globally visible side-effects, optimize for size), parameters (e.g. pointer passed as parameter is no longer valid after the function, such as shortstring value parameters of which we make a copy on the callee side), data locations (e.g. range metadata, for subrange types), etc. that you can tweak via FPC to make it generate the most optimal code.
Jonas