ml-compiler-opt VS llvm-project

Compare ml-compiler-opt vs llvm-project and see what are their differences.

ml-compiler-opt

Infrastructure for Machine Learning Guided Optimization (MLGO) in LLVM. (by google)

llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. (by llvm)
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
ml-compiler-opt llvm-project
7 398
666 31,398
2.3% 2.7%
9.1 10.0
7 days ago 4 days ago
Python LLVM
Apache License 2.0 GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

ml-compiler-opt

Posts with mentions or reviews of ml-compiler-opt. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-17.
  • Large Language Models for Compiler Optimization
    3 projects | news.ycombinator.com | 17 Sep 2023
    I did a bit of work on this last summer on (much) smaller models [1] and it was briefly discussed towards the end of last year's MLGO panel [2]. For heuristic replacements specifically, you might be able to glean some things (or just use interpretable models like decision trees), but something like a neural network works fundamentally differently than the existing heuristics, so you probably wouldn't see most of the performance gains. For just tuning heuristics, the usual practice is to make most of the parameters configurable and then use something like bayesian optimization to try and find an optimal set, and this is sometimes done as a baseline in pieces of ML-in-compiler research.

    1. https://github.com/google/ml-compiler-opt/pull/109

  • How to make smaller C and C++ binaries
    4 projects | news.ycombinator.com | 7 May 2023
    If you're using Clang/LLVM you can also enable ML inlining[1] (assuming you build from source) which can save up to around 7% if all goes well.

    There are also talks of work on just brute forcing the inlining for size problem for embedded releases for smallish applications. It's definitely feasible if the problem is important enough to you to throw some compute at it [2].

    1. https://github.com/google/ml-compiler-opt

    2. https://doi.org/10.1145/3503222.3507744

  • A code optimization Ai?
    1 project | /r/AskProgramming | 9 Jan 2023
    LLVM's inlining-for-size and register-allocation-for-performance optimizations are both implemented using machine learning models trained by Google.
  • Google AI Proposes ‘MLGO’: A Machine Learning Guided Compiler Optimization Python Framework
    1 project | /r/artificial | 10 Jul 2022
    Continue reading | Checkout the paper, github, demo and ref article.
  • Google ML Compiler Inlining Achieves 3-7% Reduction in Size
    4 projects | news.ycombinator.com | 6 Jul 2022
    Looks like they do have a pretrained model:

    https://github.com/google/ml-compiler-opt/releases/download/...

    The code will by default auto-download it during the build process. It's about 800 kbytes, which seems very reasonable for something that will reduce the generated code size by gigabytes for a large codebase.

llvm-project

Posts with mentions or reviews of llvm-project. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-03-10.
  • Performance of the Python 3.14 tail-call interpreter
    8 projects | news.ycombinator.com | 10 Mar 2025
    LLD has a new option "--randomize-section-padding" for this purpose: https://github.com/llvm/llvm-project/pull/117653
  • A Clang regression related to switch statements and inlining
    1 project | news.ycombinator.com | 26 Feb 2025
    Github issue:

    https://github.com/llvm/llvm-project/issues/127365

  • It is not a compiler error. It is never a compiler error (2017)
    4 projects | news.ycombinator.com | 23 Feb 2025
    The article is right: it is almost never a compiler bug. I have had that experience of reporting and being wrong. It sucks.

    On the other hand, I have a confirmed bug in Cland [1] and a non-rejected bug in GCC [2], so it does happen.

    [1]: https://github.com/llvm/llvm-project/issues/61133

    [2]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108448

  • OpenBSD Innovations
    5 projects | news.ycombinator.com | 22 Feb 2025
    Have been is the right word.

    This thread keeps having its goal posts moved around, first is was an example, then got the spotlight of being only about clang, then I pointed out about Apple/Google original purposes, then it was something else, and yet another one.

    Just head off to /r/cpp that is where hunches are coming from.

    Have you at very least filtered by C++ clang only related contributions instead of LLVM ones?

    Most likely not, only clicked here https://github.com/llvm/llvm-project/graphs/contributors and came right away to reply.

  • Falsehoods programmers believe about null pointers
    1 project | news.ycombinator.com | 31 Jan 2025
    I'm excited about -fbounds-safety coming soon: https://github.com/llvm/llvm-project/commit/64360899c76c
  • How Jane Street accidentally built a better build system for OCaml
    6 projects | news.ycombinator.com | 30 Jan 2025
    okay can you at least tell me how the architecture of https://github.com/llvm/llvm-project is "bad"?
  • The preview of -fbounds-safety is now accessible to the community
    1 project | news.ycombinator.com | 23 Jan 2025
    https://github.com/llvm/llvm-project/blob/main/clang/docs/Bo...
  • Clang getting more aggressive about optimizing undefined behavior
    1 project | news.ycombinator.com | 21 Jan 2025
  • Clang now more aggressively uses undefined behavior on pointer addition overflow
    1 project | news.ycombinator.com | 20 Jan 2025
  • Branchless UTF-8 Encoding
    2 projects | news.ycombinator.com | 17 Jan 2025
    Incidentally, this automatic branch-if-zero from LLVM is being improved.

    First of all, a recent LLVM patch apparently changes codegen to use CMOV instead of a branch:

    https://github.com/llvm/llvm-project/pull/102885

    Beyond that, Intel recently updated their manual to retroactively define the behavior of BSR/BSF on zero inputs: it leaves the destination register unmodified. This matches the AMD manual, and I suspect it matches the behavior of all existing x86-64 processors (but that will need to be tested, I guess).

    If so, you don't need either a branch or CMOV. Just set the register to 32 and then run BSR. If the value is zero, then BSR leaves the register unmodified and you get 32.

    Since this behavior is now guaranteed for future x86-64 processors, and assuming it is indeed compatible with all existing x86-64 processors, LLVM will no longer need the old path regardless of what it's compiling for.

    Note that if you're targeting a newer x86-64 version, LLVM will just emit TZCNT, which just does what you'd expect and returns 32 if the input is zero (or 64 for a 64-bit TZCNT). But as the blog post demonstrates, many people still build for baseline x86_64.

    (Intel does document one discrepancy between processors: "On some older processors, use of a 32-bit operand size may clear the upper 32 bits of a 64-bit destination while leaving the lower 32 bits unmodified.")

What are some alternatives?

When comparing ml-compiler-opt and llvm-project you can also consider the following projects:

LOGICGUIDE - Plug in and Play implementation of "Certified Reasoning with Language Models" that elevates model reasoning by 40%

zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

bloaty - Bloaty: a size profiler for binaries

gcc

capstone - Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.

cosmopolitan - build-once run-anywhere c library

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured