Will Dietz

@wdtz
212 Followers
230 Following
1.7K Posts

Where there's a Will there's a way.

PhD (Computer Science) @ UIUC

Tags (?):
#Academia #PhD
#Linux #NixOS
#Meow #ProtectorOfIntegers

wwwhttps://wdtz.org
GitHubhttps://github.com/dtzWill
birdsitehttps://twitter.com/wdtz
this message brought to you by a link to an old programming language wiki that has been resolving for 60 whole seconds with no end in sight
There needs to be some sort of Fae licensing scheme where you're free to use my code, of course, but if you use it in ways that displease me you will regret it and suffer consequences in an eldritch, mischievous and delightful-to-me manner.

TPDE Compiler Back-End Framework

https://arxiv.org/abs/2505.22610

"TPDE-LLVM: a standalone back-end for LLVM-IR, which compiles 10--20x faster than LLVM -O0 with similar code quality, usable as library (e.g., for JIT), as tool (tpde-llc), and integrated in Clang/Flang (with a patch)."

Holy cow! 🤯

Open Source on GitHub:
https://github.com/tpde2/tpde

#Performance #Compiler #LLVM

TPDE: A Fast Adaptable Compiler Back-End Framework

Fast machine code generation is especially important for fast start-up just-in-time compilation, where the compilation time is part of the end-to-end latency. However, widely used compiler frameworks like LLVM do not prioritize fast compilation and require an extra IR translation step increasing latency even further; and rolling a custom code generator is a substantial engineering effort, especially when targeting multiple architectures. Therefore, in this paper, we present TPDE, a compiler back-end framework that adapts to existing code representations in SSA form. Using an IR-specific adapter providing canonical access to IR data structures and a specification of the IR semantics, the framework performs one analysis pass and then performs the compilation in just a single pass, combining instruction selection, register allocation, and instruction encoding. The generated target instructions are primarily derived code written in high-level language through LLVM's Machine IR, easing portability to different architectures while enabling optimizations during code generation. To show the generality of our framework, we build a new back-end for LLVM from scratch targeting x86-64 and AArch64. Performance results on SPECint 2017 show that we can compile LLVM-IR 8--24x faster than LLVM -O0 while being on-par in terms of run-time performance. We also demonstrate the benefits of adapting to domain-specific IRs in JIT contexts, particularly WebAssembly and database query compilation, where avoiding the extra IR translation further reduces compilation latency.

arXiv.org

- and in this great operating system, unix, there shall be a system call named "kill"

- people will use it to kill processes?

- if only it was that simple.

undefined behavior is pretty well understood at this point, but a piece of the puzzle that has always been missing is "how well could a compiler like LLVM optimize, without leaning on UB"

here's a very cool new paper that takes a crack at answering this, for LLVM:

https://web.ist.utl.pt/nuno.lopes/pubs/ub-pldi25.pdf

Fil Pizlo wrote an interesting post about creating SSA: https://gist.github.com/pizlonator/cf1e72b8600b1437dda8153ea3fdb963

Highly recommended!

How I implement SSA form

How I implement SSA form. GitHub Gist: instantly share code, notes, and snippets.

Gist

hey, compiler folks, check this out

in Project Unnamed we have a way to automatically verify transformations using an SMT solver. we do this by collecting calls to replace-all-uses-with in a staging area, checking it while using the before-after correspondence to make the SMT query more tractable, then applying in bulk

if the query fails, we print the design with diff markup, which gets highlighted like the below

the verifier will also tell you which RAUW calls were illegal

how cool is this?

Ireland has one week left to do potentially the funniest thing of all time.

“The Design of a Self-Compiling C Transpiler Targeting POSIX Shell” (2024)
https://doi.org/10.1145/3687997.3695639

“We have developed pnut, a C to POSIX shell transpiler written in C that generates human-readable shell code. […] Together, pnut and the shell serve as the seed for a chain of builds that create increasingly capable compilers up to the most recent version of [GCC]”

(@monnier is among the authors 👋)

Cc: @janneke @stikonas

#bootstrapping #Guix

The Design of a Self-Compiling C Transpiler Targeting POSIX Shell | Proceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering

ACM Conferences