HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
llvm-mirror
llvm
LLVM2013–2022
llvm-mirror / llvm · Archived

llvm

Project moved to: https://github.com/llvm/llvm-project

41Distinct people
49Mentions
1Explicit recommenders
4.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Project moved to: https://github.com/llvm/llvm-project

GitHub

Where it is used

The source check is incomplete. Verified examples will appear here.

What people are saying

I recommend the LLVM source code. I've worked a bit with it implementing toy compilers and using LLVM as a backend for generating x86/SPARC object code. Just compiling it is a…

palotasb used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 7:02:26 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year49 dated mentions

Observed mentions: 2013-08-09 06:19:32 UTC to 2022-10-16 10:06:36 UTC.

0369122013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 9 mentions; 2 submissions, 7 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 12 mentions; 0 submissions, 12 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC101
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC615
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC927
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC707
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC808
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC12012
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC303
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
The LLVM Compiler Infrastructure ================================ This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. Please see the documentation provided in docs/ for further assistance with LLVM, and in particular docs/GettingStarted.rst for getting started with LLVM and docs/README.txt for an overview of LLVM's documentation setup. If you are writing a package for LLVM, see docs/Packaging.rst for our suggestions.
Read the full README on GitHub

What Hacker News says

12 sources
But it is aided by tail-call optimization. Suppose you have a function as follows: int foo(int x) { if (test(x)) return C; return evaluate(x) + foo(adjust(x)); } I can turn that function into: int foo(int x) { int accum = C; for ( ; !test(x); x = adjust(x)) { accum += evaluate(x); } return accum; } In the case of fibonacci, that equates to: int fib(int x) { int accum = 1; for (; x > 1; x -= 2) { accum += fib(x - 1); } return accum; } We still turned the recursive call (or one of them, at least), into a while loop. And this idiom is recognized by both gcc and llvm. In fact. llvm has a test that specifically makes sure fib is transformed as thus: https://github.com/llvm-mirror/llvm/blob/30fa583f8430bfc7935...
In Recursive fibonacci benchmark using top languages on GitHub
This is definitely wrong :) Besides Richard, who is the code owner of the clang frontend , chandler is the #5 contributor to LLVM (see here https://github.com/llvm-mirror/llvm/graphs/contributors), and a quick trip to llvm-dev will tell you how much time he spends working on optimizations :) FWIW: The GCC folks i pinged were similarly unenamored with the idea of trying to elide allocation all the time. Personally, i've seen a bunch of these "required optimizations" over the years, and they rarely pan out without significant help. (IE required tail call optimization usually requires special marking/calling convention change, etc). Full disclosure: Chandler, Geoff, and Richard are in my org, and i am theoretically their boss's boss. I say theoretically because it's pretty meaningless - i'm not going to tell Richard how to do C++.
In C++ Core Coroutines Proposal [pdf]
The llvm compiler has it's optimization routines here: https://github.com/llvm-mirror/llvm/tree/master/lib/Transfor... You can play around with how it takes in llvm code to optimized llvm code by using the opt tool. Here's a basic example. $ cat test.c #include <stdio.h> int main() { for (int i = 0; i < 3; i++) { printf("hello world"); } } $ clang -c -S -emit-llvm test.c $ cat test.ll ** too long replacing with gist** https://gist.github.com/cwgreene/b6f33d40ad735a448ed15057d91fdbdc $ opt -S -print-before-all -O2 test.ll ** too long, replacing with gist** https://gist.github.com/cwgreene/99b3075dbfffae35a5745934ded217fb ** final result** @.str = private unnamed_addr constant [12 x i8] c"hello world\00", align 1 ; Function Attrs: nounwind uwtable define i32 @main() #0 { entry: %call = ta
Read the rest
il call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)) #2 %call.1 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)) #2 %call.2 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)) #2 ret i32 0 } The command `opt -S -print-before-all -O2` can be manually modified to specify exactly which compiler passes you want to see. You can run `opt --help` to see a list of all compiler passes. (you can figure out what code performs by looking at the * * * IR Dump Before `MODULE NAME` * * * and finding the associated logic in the Lib directory) In the case of llvm, the idea for them is they break the code into things called 'basic blocks' which, along with using Single Static Assignment, are more easily analyzed, transformed, and simplified.
In Oops, I Wrote a C++ Compiler
I'm not an expert in this field, also currently in learning mode. > You said you were working on another JIT - what was that? A JIT for a custom 32-bit RISC soft-CPU (FPGA). > Also, do you have any suggestions of another project/language to implement compiler for to gain some knowledge about writing optimizations, actual intepretation/compilation logic, etc? You could write another C compiler. Or a JIT for some scripting language. Lua is about as simple as it gets when it comes to JITtable scripting languages. Of course amazing http://luajit.org/ already exists. Existing CPUs and bytecode formats are also potentially good. In particular, other people might actually want to use a small WebAssembly (https://webassembly.org/) AOT/JIT compiler. I know I would. :) Some source code I've personally found educating on this topic: 1) Lots of easie
Read the rest
r stuff (ARM/x86 encoding, basic optimizations, etc.) can be found in JITting emulators, like Dolphin: (https://github.com/dolphin-emu/dolphin) 2) Web browser Javascript engines, like (https://github.com/v8/v8/tree/master/src). And of course LuaJIT. 3) Compiler codegen, like LLVM (https://github.com/llvm-mirror/llvm)
In Uefi-jitfuck – A JIT Brainfuck compiler running on x86_64 UEFI
Thanks. Unless something is escaping me, that's an optimizer bug. I'm pretty sure the ABI allows you to do whatever you want with the sret pointer, including passing it to another function to chain return for free. I guess you could say that RVO is more robust since it's implemented in the frontend and does not rely on finding the optimization after a fair amount of lowering. Edit: I don't have time to debug this but at least for llvm, I think this optimization should trigger in the optimizer's memcpy elimination pass ( https://github.com/llvm-mirror/llvm/blob/0818e789cb58fbf6b5e... ). However I don't see why clang could not simply apply the RVO logic to C code as well.
In One year of C
It is not, just take a look at the third party directory of chromium, where it tracks all its third party dependencies https://github.com/chromium/chromium/tree/master/third_party the main point of their build system gn (similar to bazel) is to have explicit and distribution independent control of all dependencies (typically tied to specific versions). LLVM basically has no system dependencies as well, instead it implements a lot of platform abstractions within the repository (https://github.com/llvm-mirror/llvm/tree/master/lib/Support), the remaining dependencies are mostly build dependencies such as python 2.7 and cmake. Same story for Cryengine (https://github.com/CRYTEK/CRYENGINE/tree/release/Code/Libs) and Unreal Engine (https://github.com/EpicGames/UnrealEngine/tree/release/Engin...). Linux distributions simply duplicate a lot of w
Read the rest
ork because they are based on a flawed and outdated distribution model, outdated because the main argument for shared libraries disappears with > 1 TB commodity hard drives. The approach taken by the projects above is also the only way to do cross platform development, simply because both Windows, macOS and Consoles don't have the concept of an operating system package manager. (If you are using homebrew for development on mac, you will run into a lot of trouble sooner or later).
In Build2, a Cargo-like dependency and build manager for C/C++

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.