{"slug": "qbe", "name": "QBE", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 7, "commenters": 12, "warners": 0, "score": 6.65, "rising": -2.29, "first": "2026-01-03", "latest": "2026-10-14", "why": "QBE is a tiny project, but I think illustrates a better intermediate language design.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 7, "neutral": 2, "compare": 3, "warn": 0}, "spark": [0, 0, 1, 1, 0, 0, 3, 2, 0, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "QBE is a tiny project, but I think illustrates a better intermediate language design.", "kind": "", "icon": false, "domain": "c9x.me", "github_repo": null, "official_url": "https://c9x.me/compile/", "pricing": "", "aliases": ["QBE"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 774046912, "item_id": 48377932, "url": "https://news.ycombinator.com/item?id=48377932", "by": "s3graham", "date": "2026-06-02", "version": null, "stance": "recommend", "quote": "I personally went with QBE for my hobby project because of C-interop", "excerpt": "IR (https://github.com/dstogov/ir) is worth a look in this vein too. I personally went with QBE for my hobby project because of C-interop, but at least in my tests, I found IR much faster and better codegen than MIR. Neither of MIR or IR are friendly/easy though.", "context": "", "use_case": "hobby compiler backend", "switched_from": "", "story": "QBE \u2013 Compiler Back end: Version 1.3"}, {"id": 769084128, "item_id": 48067758, "url": "https://news.ycombinator.com/item?id=48067758", "by": "stevefolta", "date": "2026-05-08", "version": null, "stance": "recommend", "quote": "I love QBE, but it does have its limitations", "excerpt": "Looks like a new 1.3 release is coming very soon. I love QBE, but it does have its limitations: - It handles the ABIs for passing and returning structures in registers, but only with superfluous copies to and from the stack. - Can't generate debug info for data. This is probably due to lack of assembler support and/or complexity in the DWARF format. - The line number debug info directives are currently undocumented a", "context": "", "use_case": "compiler backend", "switched_from": "", "story": "QBE \u2013 Compiler Back End"}, {"id": 769048705, "item_id": 48065544, "url": "https://news.ycombinator.com/item?id=48065544", "by": "superdisk", "date": "2026-05-08", "version": null, "stance": "recommend", "quote": "QBE is a super simple project which is why adding a backend to it worked so well.", "excerpt": "The backend is only ~1300 lines. QBE is a super simple project which is why adding a backend to it worked so well. I just pointed Claude at the existing RISC-V backend for reference and it whipped up the MIPS one. It really does work, though there might be bugs I didn't run into. I compiled an Amiga MOD player, written in my language, to the N64 and it worked fine, if that gives you an idea of how stress tested it wa", "context": "", "use_case": "Compiler backend", "switched_from": "", "story": "QBE \u2013 Compiler Back End"}, {"id": 769002272, "item_id": 48062642, "url": "https://news.ycombinator.com/item?id=48062642", "by": "jasperry", "date": "2026-05-08", "version": null, "stance": "recommend", "quote": "it's a great lightweight alternative to LLVM", "excerpt": "Excited to see another project targeting the QBE back end, from what I can tell it's a great lightweight alternative to LLVM.", "context": "", "use_case": "compiler backend", "switched_from": "", "story": "Blaise \u2013 A modern self-hosting zero-legacy Object Pascal compiler targeting QBE"}, {"id": 753099232, "item_id": 47068702, "url": "https://news.ycombinator.com/item?id=47068702", "by": "pbohun", "date": "2026-02-18", "version": null, "stance": "recommend", "quote": "QBE is a tiny project, but I think illustrates a better intermediate language design.", "excerpt": "QBE is a tiny project, but I think illustrates a better intermediate language design. https://c9x.me/compile/", "context": "", "use_case": "", "switched_from": "", "story": "Ladybird: Closing this as we are no longer pursuing Swift adoption"}]}], "caveats": [], "who": [], "tags": [], "use_cases": ["compiler backend", "hobby compiler backend", "compiler backend ir"], "compared": [{"slug": "llvm", "name": "LLVM", "co": 4, "switched_from": 0, "switched_to": 0}, {"slug": "mir", "name": "Mir", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "gcc", "name": "GCC", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=48373442", "title": "QBE \u2013 Compiler Back end: Version 1.3", "mentions": 4}, {"url": "https://news.ycombinator.com/item?id=48059633", "title": "QBE \u2013 Compiler Back End", "mentions": 3}, {"url": "https://news.ycombinator.com/item?id=50069499", "title": "11 year old unsoundness bugs found in Rust borrow checker", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48679809", "title": "Zig \u2013 SPIR-V Backend Progress", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48042427", "title": "Show HN: I wrote a flight simulator in my own programming language", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48058644", "title": "Blaise \u2013 A modern self-hosting zero-legacy Object Pascal compiler targeting QBE", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {}, "2026-01": {"recommend": 1}, "2026-02": {"recommend": 1}, "2026-03": {}, "2026-04": {}, "2026-05": {"recommend": 3, "neutral": 2}, "2026-06": {"compare": 1, "recommend": 2}, "2026-07": {"compare": 1}, "2026-08": {}, "2026-09": {}, "2026-10": {"compare": 1}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 801495315, "item_id": 50093457, "url": "https://news.ycombinator.com/item?id=50093457", "by": "MaxBarraclough", "date": "2026-10-14", "version": null, "stance": "compare", "quote": "the cproc/qbe C compiler gets very roughly 50% of the performance of Clang/LLVM", "excerpt": "> That's a big gap I wouldn't say so. The gap between GCC and Clang/LLVM is bigger than that on some benchmarks, [0] although the gap between their overall performance (using geometric mean) is much less. [1] It's a very impressive result considering how much effort has gone into GCC. It highlights how compiler optimisation work can face diminishing returns. > the norm for releases being O2 if I understand correctly ", "context": "", "use_case": "", "switched_from": "", "story": "11 year old unsoundness bugs found in Rust borrow checker"}, {"id": 780299760, "item_id": 48768735, "url": "https://news.ycombinator.com/item?id=48768735", "by": "flohofwoe", "date": "2026-07-02", "version": null, "stance": "compare", "quote": "That doesn't sound like QBE wants to compete with LLVM when it comes to optimizations.", "excerpt": "First sentence on https://c9x.me/compile/: \"QBE is a compiler backend that aims to provide 70% of the performance of industrial optimizing compilers in 10% of the code.\" That doesn't sound like QBE wants to compete with LLVM when it comes to optimizations.", "context": "", "use_case": "Compiler backend", "switched_from": "", "story": "Zig \u2013 SPIR-V Backend Progress"}, {"id": 774051472, "item_id": 48378217, "url": "https://news.ycombinator.com/item?id=48378217", "by": "kreelman", "date": "2026-06-02", "version": null, "stance": "recommend", "quote": "", "excerpt": "The Blaise Pascal compiler uses QBE for it's backend compiler. https://github.com/graemeg/blaise Having Blaise work on Windows, could be interesting... Though of course only in the long tail of already built Delphi apps... that still have source.... that are reasonably written... that don't rely on now unsupported libraries... Hmmm... Ah yes. These may be some of the reasons people might not do Delphi as much anymore", "context": "", "use_case": "compiler backend", "switched_from": "", "story": "QBE \u2013 Compiler Back end: Version 1.3"}, {"id": 774047456, "item_id": 48377966, "url": "https://news.ycombinator.com/item?id=48377966", "by": "s3graham", "date": "2026-06-02", "version": null, "stance": "neutral", "quote": "I'd planned to use along-side qbe eventually", "excerpt": "I'm guessing you mean dwarf, but I started on a pdb library that I'd planned to use along-side qbe eventually. (The code currently lives in a jitting-C compiler https://scot.tg/2023/05/02/debugging-with-pdbs/ that uses dynasm directly though.)", "context": "", "use_case": "compiler backend", "switched_from": "", "story": "QBE \u2013 Compiler Back end: Version 1.3"}, {"id": 774046912, "item_id": 48377932, "url": "https://news.ycombinator.com/item?id=48377932", "by": "s3graham", "date": "2026-06-02", "version": null, "stance": "recommend", "quote": "I personally went with QBE for my hobby project because of C-interop", "excerpt": "IR (https://github.com/dstogov/ir) is worth a look in this vein too. I personally went with QBE for my hobby project because of C-interop, but at least in my tests, I found IR much faster and better codegen than MIR. Neither of MIR or IR are friendly/easy though.", "context": "", "use_case": "hobby compiler backend", "switched_from": "", "story": "QBE \u2013 Compiler Back end: Version 1.3"}, {"id": 774034496, "item_id": 48377156, "url": "https://news.ycombinator.com/item?id=48377156", "by": "torginus", "date": "2026-06-02", "version": null, "stance": "compare", "quote": "QBE being a bit more friendly and well documented, with MIR making faster code", "excerpt": "I love that there are compilers beside the big 2 with a simple API, and small enough codebase, that produce decent-enough code, but damn did I make an honest effort to crack the QBE source code, and it is just impenetrable, not only because the difficulty of the domain, but the code is just arcane. It was one of the projects that made me realize what the arcane wizened sages of olden C were capable of - C is not as m", "context": "", "use_case": "compiler backend", "switched_from": "", "story": "QBE \u2013 Compiler Back end: Version 1.3"}, {"id": 769250192, "item_id": 48078137, "url": "https://news.ycombinator.com/item?id=48078137", "by": "pizza_man", "date": "2026-05-09", "version": null, "stance": "neutral", "quote": "no one is writing QBE IR by hand", "excerpt": "Maybe if you looked at the actual compiler code you would see that the DbC features are used extensively throughout: https://github.com/spectrelang/spectre/blob/master/src/meta/docs.sx#L234 \"The bootstrap code is a nightmare\" And? It's autogenerated by the compiler, no one is writing QBE IR by hand. Not really sure what you expected.", "context": "", "use_case": "Compiler backend IR", "switched_from": "", "story": "Show HN: I wrote a flight simulator in my own programming language"}, {"id": 769084128, "item_id": 48067758, "url": "https://news.ycombinator.com/item?id=48067758", "by": "stevefolta", "date": "2026-05-08", "version": null, "stance": "recommend", "quote": "I love QBE, but it does have its limitations", "excerpt": "Looks like a new 1.3 release is coming very soon. I love QBE, but it does have its limitations: - It handles the ABIs for passing and returning structures in registers, but only with superfluous copies to and from the stack. - Can't generate debug info for data. This is probably due to lack of assembler support and/or complexity in the DWARF format. - The line number debug info directives are currently undocumented a", "context": "", "use_case": "compiler backend", "switched_from": "", "story": "QBE \u2013 Compiler Back End"}, {"id": 769080752, "item_id": 48067547, "url": "https://news.ycombinator.com/item?id=48067547", "by": "fweimer", "date": "2026-05-08", "version": null, "stance": "neutral", "quote": "It looks like it doesn't have native support for identifying GC roots", "excerpt": "IR description here: https://c9x.me/git/qbe.git/tree/doc/il.txt It looks like it doesn't have native support for identifying GC roots, so it's either conservative GC or explicit stack management. I would really like to see something that is (mostly) memory-safe and has string-as-bytes. It's a bit wild that people use Chez Scheme as a target IR for lack of better options.", "context": "", "use_case": "", "switched_from": "", "story": "QBE \u2013 Compiler Back End"}, {"id": 769048705, "item_id": 48065544, "url": "https://news.ycombinator.com/item?id=48065544", "by": "superdisk", "date": "2026-05-08", "version": null, "stance": "recommend", "quote": "QBE is a super simple project which is why adding a backend to it worked so well.", "excerpt": "The backend is only ~1300 lines. QBE is a super simple project which is why adding a backend to it worked so well. I just pointed Claude at the existing RISC-V backend for reference and it whipped up the MIPS one. It really does work, though there might be bugs I didn't run into. I compiled an Amiga MOD player, written in my language, to the N64 and it worked fine, if that gives you an idea of how stress tested it wa", "context": "", "use_case": "Compiler backend", "switched_from": "", "story": "QBE \u2013 Compiler Back End"}, {"id": 769002272, "item_id": 48062642, "url": "https://news.ycombinator.com/item?id=48062642", "by": "jasperry", "date": "2026-05-08", "version": null, "stance": "recommend", "quote": "it's a great lightweight alternative to LLVM", "excerpt": "Excited to see another project targeting the QBE back end, from what I can tell it's a great lightweight alternative to LLVM.", "context": "", "use_case": "compiler backend", "switched_from": "", "story": "Blaise \u2013 A modern self-hosting zero-legacy Object Pascal compiler targeting QBE"}, {"id": 753099232, "item_id": 47068702, "url": "https://news.ycombinator.com/item?id=47068702", "by": "pbohun", "date": "2026-02-18", "version": null, "stance": "recommend", "quote": "QBE is a tiny project, but I think illustrates a better intermediate language design.", "excerpt": "QBE is a tiny project, but I think illustrates a better intermediate language design. https://c9x.me/compile/", "context": "", "use_case": "", "switched_from": "", "story": "Ladybird: Closing this as we are no longer pursuing Swift adoption"}, {"id": 745536320, "item_id": 46596020, "url": "https://news.ycombinator.com/item?id=46596020", "by": "cardanome", "date": "2026-01-12", "version": null, "stance": "recommend", "quote": "QBE might be more to your liking", "excerpt": "QBE might be more to your liking: https://c9x.me/compile/ It is used in the Hare language", "context": "", "use_case": "", "switched_from": "", "story": "LLVM: The Bad Parts"}, {"id": 743694496, "item_id": 46480906, "url": "https://news.ycombinator.com/item?id=46480906", "by": "cardanome", "date": "2026-01-03", "version": null, "stance": "recommend", "quote": "it is radically simpler and easier to use", "excerpt": "That is why the Hare languages uses QBE instead: https://c9x.me/compile/ Sure it can't do all the optimizations LLVM can but it is radically simpler and easier to use.", "context": "", "use_case": "compiler backend", "switched_from": "", "story": "The C3 Programming Language"}]}