Login
You're viewing the functional.cafe public feed.
  • Nov 9, 2026, 12:35 PM

    This is a rather odd request but
    Does anyone know of a kind of materials in the "guided tour of LLVM" style?

    Something focused on the backend side would be nice but even a more general one would be okay still~

    Looking for something structured like "there's X, Y, and Z phases, Y runs first before X and Y, and if you wanna do such and such you hook into this and that callbacks of Z"

    #AskFedi #LLVM

    💬 2🔄 6⭐ 1

Replies

  • 💬 0🔄 0⭐ 0
  • Nov 9, 2026, 12:38 PM
    @koakuma i haven't seen one. i'm not sure how useful it would be, either, since LLVM is basically apple's c++ compiler that sometimes helps julia too.

    gingerbill (odin bdfl) has commented about it. you /can/ try to use it as they documented it, but if you give it IR that isn't exactly clang-shaped, it will do stupid suboptimal things with it.
    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Nov 9, 2026, 12:58 PM

    @icedquinn > now its mostly just a way to get a language to amd64

    That "to amd64" (or rather, asm) part is where my core interest lies; I like to think that I'm being purely practical in the sense that there's a ton of software written already in one of the languages targeting LLVM and working on it is probably the best way I can use my limited time and energy to enable more stuff to run...

    And yes, I'm fully aware about the bureaucracy part, that's why I'm asking for a guide to navigate around it in the first place :)

    💬 0🔄 0⭐ 1
  • Nov 9, 2026, 1:42 PM

    @koakuma @icedquinn

    The best references I've seen are old developer meeting presentations. There are a few good backend workshop sessions that have the presentations online.

    One of the problems with LLVM is that there isn't very good back-end documentation and very few people work on more than one back end, so different back ends have a habit of solving the same problems in different ways.

    💬 1🔄 0⭐ 0
  • Nov 9, 2026, 2:29 PM

    @david_chisnall @icedquinn Oh yeah! Backend presentations are something I often watch too and those are valuable but nowadays I find myself stumbling into edge cases and I often feel lost~
    (For example, on how to convince LLVM to emit something that matches the super mindboggling way GCC lowers zero-sized structs on sparc64 :char_nachoneko_baa: )

    > One of the problems with LLVM is that there isn't very good back-end documentation

    I badly badly badly badly need good documentation but at the same time I'm also fully aware that I'm part of the problem here :haha:

    > and very few people work on more than one back end

    That the vast majority of backend touchers are employed by processor companies (I presume, under some sort of exclusivity contract?) probably doesn't help either...

    > so different back ends have a habit of solving the same problems in different ways.

    This too, yeah.
    Sometimes I try to look around to see what the other backends are doing but seems like everything's different so I ended up just mix-and-matching everything, but I dunno if it's a good way to work on it lololol

    💬 0🔄 0⭐ 0