Where is the documentation for front-end to back-end communication

On and off over the last few months have spent time trying to find out what I need to know/acquire to generate IR from a new front-end. Sadly can’t find anything usable or authoritative. Rather becoming a deterent to putting the effort and investment into creating a front-end espcially after reading online comments about how one effectively has to resort to relying on operational semantics of the IR elements because there is no reference documentation. (It comes across as a matter of pride that there is no such documentation!)

Now I’m no slouch as an old style compiler writer (direct machine code emitted as syntax analysis occurs). Not too shabby at quality code generation either. These days I would rather spend my time working on front-ends and (language specific) run-time libraries than fighting how to use the IR.

You may want to start with the tutorials here: LLVM Tutorial: Table of Contents — LLVM 16.0.0git documentation

The Kaleidoscope tutorials do walk through LLVM IR generation: 3. Kaleidoscope: Code generation to LLVM IR — LLVM 16.0.0git documentation

Aside from those examples, the IR Language reference, and the IRBuilder API documentation are also probably good places to start.

Thanks. Those look to be useful first poke to reigniting my project. If these existed previously then I offer my apologises because despite what I thought at the time was a thorough search for such notes I never found them.