u/abionicin r/ProgrammingLanguages • Recommends
On “Resources on making a code optimizer”
First thing that I remembered matching your need is this Loop Optimization in LLVM talk, mainly due to its fundamental nature
link to this video
#llvm#loopoptimization#compilerpasses
18K subscribers • 23 videos on Hallway
Advanced. Deep dive for people who know the field.
7K views6 years ago2 recommendations
Systems programmingProgramming languagesCompilers and interpretersPerformance and optimization
LLVM developers introduce loop terminology and demonstrate how to write loop optimization passes using LLVM's infrastructure.
llvm.org/devmtg/2019-10/ — Writing Loop Optimizations in LLVM - Kit Barton, Ettore Tiotto, Hal Finkel, Michael Kruse, Johannes Doerfert Slides: Coming Soon — LLVM contains an evolving set of classes and tools specifically designed to interact with loops. The Loop and LoopInfo classes are being continually improved, as are supporting data structures such as the Data Dependence Graph (DDG) and Program Dependence Graph (PDG). The pass manager infrastructure (both New and Legacy pass managers) provide infrastructure to write both function passes and loop passes. However, putting all of these concepts together to write a functioning loop optimization pass can still be a somewhat daunting task. This tutorial will start by introducing basic terminology that is used within LLVM to describe loops (for example, many of the concepts introduced in reviews.llvm.org/D65164). It will then look at the Loop and LoopInfo classes, and go over the interfaces they have to work with loops. It will provide examples of how these classes can be used to implement different types of loop optimizations, using examples from both the Loop Fusion and Loop Distribution passes. It will discuss the differences between a function pass and a loop pass, including a discussion of the advantages and disadvantages of each one when writing loop optimizations. It will also provide guidance on when each type of pass should be used. Finally, it will go through many of the useful utility functions that need to be used in order to write a loop optimization efficiently (e.g., updating the dominator tree, updating Scalar Evolution, etc.). — Videos Filmed & Edited by Bash Films: BashFilms.comWhat people say. Recommended as a fundamental tutorial for learning how to write code optimizers and loop passes in LLVM.
u/abionicin r/ProgrammingLanguages • Recommends
On “Resources on making a code optimizer”
u/codetrotterin r/rust • Recommends
On “rustc/llvm lowkey blew my mind with what it did to this nested loop”