Tag

LLVM

0 views collected around this technical thread.

ByteDance SYS Tech
ByteDance SYS Tech
Dec 27, 2024 · Backend Development

How ByteDance Tackled C++ Compilation Bottlenecks and Massive Binary Bloat

ByteDance's STE team dissected the severe compile‑time delays and oversized binary artifacts in their data‑center C++ applications, presenting root‑cause analyses, LLVM bug fixes, and a suite of optimization techniques that together cut build times by up to 50% and reduced binary size by over 80%.

C++CompilationLLVM
0 likes · 26 min read
How ByteDance Tackled C++ Compilation Bottlenecks and Massive Binary Bloat
DataFunSummit
DataFunSummit
Nov 7, 2024 · Backend Development

Understanding LLVM Instruction Scheduling Algorithms and Topological Sorting

This article explains the importance of instruction scheduling for modern CPU pipelines, describes dependency types, distinguishes dynamic and static scheduling, outlines LLVM's multiple scheduling phases and algorithms, and introduces the underlying topological‑sort technique used to improve compiler performance.

Compiler OptimizationInstruction SchedulingLLVM
0 likes · 10 min read
Understanding LLVM Instruction Scheduling Algorithms and Topological Sorting
Java Tech Enthusiast
Java Tech Enthusiast
Sep 15, 2024 · Fundamentals

How Source Code Is Transformed into Machine Instructions

A compiler transforms source code into executable machine instructions by first tokenizing the text into keywords, identifiers and literals, then parsing these tokens into an abstract syntax tree, generating and optimizing intermediate code, and finally assembling and linking the output for the target architecture or LLVM IR.

ASTCompilerLLVM
0 likes · 4 min read
How Source Code Is Transformed into Machine Instructions
Python Programming Learning Circle
Python Programming Learning Circle
Jul 2, 2024 · Fundamentals

Understanding Python 3.13 Copy‑and‑Patch JIT Compiler

The article explains how Python 3.13 introduces a copy‑and‑patch Just‑In‑Time (JIT) compiler that compiles bytecode to machine code on first execution, reuses it to boost performance, and leverages LLVM tools for efficient runtime code generation.

Copy-and-PatchJITLLVM
0 likes · 4 min read
Understanding Python 3.13 Copy‑and‑Patch JIT Compiler
Sohu Tech Products
Sohu Tech Products
Jan 24, 2024 · Databases

Optimizing Database Expression Evaluation with JIT Technology Using Gandiva

The article explains how database expression evaluation—especially in WHERE and SELECT clauses—can be dramatically accelerated by replacing interpreted AST traversal with Just‑In‑Time compilation using Apache Gandiva, which leverages LLVM to generate SIMD‑optimized machine code for Arrow columnar data, and discusses extensions such as timestamp, array, higher‑order functions, and UDF support.

Apache ArrowApache GandivaDatabase Optimization
0 likes · 17 min read
Optimizing Database Expression Evaluation with JIT Technology Using Gandiva
DataFunTalk
DataFunTalk
Jan 15, 2024 · Databases

Optimizing Database Expression Evaluation with JIT Compilation Using Gandiva

This article explains how Just‑In‑Time (JIT) compilation, particularly via the Gandiva expression compiler built on LLVM and Apache Arrow, can dramatically accelerate database expression evaluation by transforming abstract syntax trees into native vectorized code, addressing traditional interpretation bottlenecks and improving CPU‑bound query performance.

Apache ArrowDatabaseExpression Evaluation
0 likes · 17 min read
Optimizing Database Expression Evaluation with JIT Compilation Using Gandiva
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Aug 18, 2023 · Information Security

Shadow Call Stack (SCS) in Android: Mechanism, Requirements, and Implementation

Android’s Shadow Call Stack (SCS), silently enabled since Android R on AArch64 devices, stores return addresses in a protected register‑based stack separate from the regular stack, complementing stack canaries and requiring hardware support, while developers can activate it via -fsanitize=shadow-call-stack and avoid using X18 elsewhere.

Aarch64Android securityKernel
0 likes · 7 min read
Shadow Call Stack (SCS) in Android: Mechanism, Requirements, and Implementation
ByteDance SYS Tech
ByteDance SYS Tech
Jun 9, 2023 · Backend Development

Why Strict Aliasing Matters: Deep Dive into LLVM TBAA and TypeSanitizer

This article explains the Strict Aliasing Rule, how compilers use Type‑Based Alias Analysis (TBAA) for optimization, demonstrates LLVM’s metadata‑based implementation, introduces the TypeSanitizer tool for detecting aliasing violations, and offers practical guidance to avoid common pitfalls in C/C++ code.

Compiler OptimizationLLVMSanitizer
0 likes · 33 min read
Why Strict Aliasing Matters: Deep Dive into LLVM TBAA and TypeSanitizer
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Jun 5, 2023 · Fundamentals

Understanding Swift SIL and Method Dispatch Mechanisms

Swift inserts the high‑level SIL intermediate representation between source code and LLVM, exposing type declarations, method blocks, and virtual tables, while supporting three dispatch strategies—direct for value types and final methods, VTable for regular class methods, and Objective‑C message dispatch for @objc dynamic methods—crucial for debugging mixed Swift/Objective‑C and protocol‑extension behavior.

CompilerLLVMMethod Dispatch
0 likes · 20 min read
Understanding Swift SIL and Method Dispatch Mechanisms
DaTaobao Tech
DaTaobao Tech
Feb 6, 2023 · Frontend Development

WebAssembly Overview and Rust Development Guide

This article introduces WebAssembly’s efficient, safe, open standards and LLVM‑based compilation pipeline, then guides Rust developers through installing tools, writing and binding simple functions, optimizing performance and bundle size, and explores tooling, runtimes, real‑world use cases, current limitations, and future extensions such as WASI, SIMD, and threads.

Frontend DevelopmentLLVMWasm
0 likes · 30 min read
WebAssembly Overview and Rust Development Guide
Tencent Cloud Developer
Tencent Cloud Developer
Sep 5, 2022 · Fundamentals

Static Function Hooking in Objective-C Using LLVM Pass

The article presents a technique for static function hooking in Objective‑C by writing a custom LLVM Pass that modifies the intermediate representation during compilation to inject stub calls at chosen points inside a function, and details the required LLVM setup, Pass implementation, Clang integration, and Xcode configuration.

Compilation ProcessFunction HookingIR Modification
0 likes · 11 min read
Static Function Hooking in Objective-C Using LLVM Pass
High Availability Architecture
High Availability Architecture
May 25, 2022 · Backend Development

Minimizing Go Runtime, Building a Simple JIT Compiler, and Exploring Self‑Hosted Compilation

This article explores how to reduce Go's heavy runtime by replacing its entry point, demonstrates building a minimal Go runtime, implements a simple Python JIT compiler in Go, and shows how to create a self‑hosted Go compiler using LLVM IR, complete with code examples and optimizations.

CompilerGoJIT
0 likes · 20 min read
Minimizing Go Runtime, Building a Simple JIT Compiler, and Exploring Self‑Hosted Compilation
Tencent Cloud Developer
Tencent Cloud Developer
May 24, 2022 · Backend Development

Three Advanced Go Techniques: Minimal Runtime, JIT Compilation, and Bootstrap

The article demonstrates three advanced Go techniques—eliminating the standard runtime by custom entry points, building a simple Python JIT compiler that translates bytecode to optimized machine code, and bootstrapping the Go compiler itself via AST‑to‑LLVM translation—offering practical code examples that reveal compiler internals.

BootstrapCompilerGo
0 likes · 21 min read
Three Advanced Go Techniques: Minimal Runtime, JIT Compilation, and Bootstrap
Tencent Cloud Developer
Tencent Cloud Developer
Sep 29, 2021 · Fundamentals

Building a Simple LLVM-Based Compiler: Lexer, Parser, SSA, Optimizer, JIT and Mutable Variables

The tutorial walks through building a complete LLVM‑based Kaleidoscope compiler—from a tokenizing lexer and recursive‑descent parser, through AST construction, LLVM IR generation with SSA and phi nodes, optimization passes, JIT execution, and mutable variable handling via stack allocation—providing full C++ source examples.

CompilerJITKaleidoscope
0 likes · 47 min read
Building a Simple LLVM-Based Compiler: Lexer, Parser, SSA, Optimizer, JIT and Mutable Variables
ByteDance Terminal Technology
ByteDance Terminal Technology
Jul 28, 2021 · Backend Development

Investigating a Clang -Oz Optimization Bug that Triggers Memory Bloat in a Video Component

The article describes how enabling the aggressive size‑optimisation flag -Oz in Clang caused a video component to create numerous GLFramebuffer and CVPixelBuffer objects, leading to OOM crashes, and explains the underlying ARC and Machine Outliner interactions that exposed a compiler bug which was later fixed in LLVM.

ARCLLVMOptimization
0 likes · 11 min read
Investigating a Clang -Oz Optimization Bug that Triggers Memory Bloat in a Video Component
Sohu Tech Products
Sohu Tech Products
Dec 9, 2020 · Fundamentals

Instrumenting iOS SDKs with LLVM and SanitizerCoverage for BasicBlock‑Level Code Coverage

This article explains how to use LLVM and SanitizerCoverage to insert BasicBlock‑level instrumentation into iOS binaries such as the WeChat SDK, covering the theory of code‑coverage metrics, compilation steps, bitcode extraction, and a practical demo that visualizes runtime execution paths.

BasicBlockBinary AnalysisCode Coverage
0 likes · 17 min read
Instrumenting iOS SDKs with LLVM and SanitizerCoverage for BasicBlock‑Level Code Coverage
DataFunTalk
DataFunTalk
Aug 30, 2020 · Big Data

Large-Scale Recommendation System Feature Engineering and Optimization with Spark and FESQL

This article explains how large-scale recommendation systems rely on efficient feature engineering, describes the three-layer architecture (offline, stream, online), and details how Spark SQL and the LLVM‑optimized FESQL engine improve performance and ensure offline‑online feature consistency.

Big DataFESQLFeature Engineering
0 likes · 13 min read
Large-Scale Recommendation System Feature Engineering and Optimization with Spark and FESQL
Amap Tech
Amap Tech
Aug 28, 2020 · Fundamentals

Code Coverage Instrumentation Using LLVM and GCOV

The article explains how to instrument code for coverage using LLVM’s modular compiler infrastructure—adding compile‑time probes that generate .gcno files, runtime counters that produce .gcda files, and then parsing these with GCOV, while detailing LLVM IR, basic blocks, flow graphs, and extensions for custom plugins.

Code CoverageCompilerIR
0 likes · 17 min read
Code Coverage Instrumentation Using LLVM and GCOV
Sohu Tech Products
Sohu Tech Products
Jan 8, 2020 · Backend Development

Understanding Swift SIL: Exploring LLVM Backend and Protocol Extension Implementation

This article explains how Swift leverages LLVM's three‑stage compiler architecture and the Swift Intermediate Language (SIL) to implement protocol extensions, detailing the generation and analysis of SIL code, VTables, Witness Tables, and function calls to reveal the language's underlying compilation process.

CompilerLLVMProtocol Extension
0 likes · 12 min read
Understanding Swift SIL: Exploring LLVM Backend and Protocol Extension Implementation