One of the major advances in classical planning has been the development of Graphplan. Graphplan builds a layered structure called the planning graph, and then searches this structure backwards for a plan. Modern SAT and CSP approaches also use the planning graph but replace the regression search by a constrained-directed search. The planning graph uncovers implicit constraints in the problem that reduce the size of the search tree. Such constraints encode lower bounds on the number of time steps required for achieving the goal and account for the huge performance gap between Graphplan and its predecessors. Still, the form of local consistency underlying the construction of the planning graph is not well understood, being described by various authors as a limited form of negative binary resolution, k-consistency, or 2-j consistency. In this paper, we aim to shed light on this issue by showing that the computation of the planning graph corresponds exactly to the iterative computation of prime implicates of size one and two over the logical encodings of the planning problem. The correspondence between planning graphs and a precise form of knowledge compilation provides a well-founded basis for understanding and developing extensions of the planning graph to non-Strips settings, and suggests novel and effective forms of knowledge compilation in other contexts. In the paper we explore some of these extensions and relate planning graphs with bounded variable elimination algorithms as studied by Rina Dechter and others.