LLVM Programmer's Manual
  1. Introduction
  2. General Information
  3. Helpful Hints for Common Operations
  4. The Core LLVM Class Hierarchy Reference

    Written by Chris Lattner, Dinakar Dhurjati, and Joel Stanley

Introduction
General Information
   The C++ Standard Template Library
   The isa<>, cast<> and dyn_cast<> templates
Helpful Hints for Common Operations
   Basic Inspection and Traversal Routines


Iterating over the
BasicBlocks in a Function


Iterating over the
Instructions in a BasicBlock


Iterating over the
Instructions in a Function


Turning an iterator into a class pointer (and vice-versa)


Finding call sites: a slightly more complex example


Iterating over def-use & use-def chains

   Making simple changes


Creating and inserting new Instructions