A deep dive into LLVM's optimization pipeline using two concrete C++ examples: modular increment and endianness conversion. Explores how passes like InstCombine, AggressiveInstCombine, DAGCombiner, and CodeGenPrepare interact, how pass ordering affects results, and how small source changes (using `[[assume]]`, templates,

26m read timeFrom hmpcabral.com
Post cover image
Table of contents
IntroductionCase 1: Modular incrementCase 2: Endianness conversionConclusionAppendix: other resources

Sort: