Fixpoint alloc_globals_rev {F V} (ge: Genv.t F V) (m: mem) (vl: list (ident * globdef F V))
{struct vl} : option mem :=
match vl with
| nil => Some m
| v :: vl' =>
match alloc_globals_rev ge m vl' with
| Some m' => Genv.alloc_global ge m' v
| None => None
end
end.

Lemma alloc_globals_rev_nextblock:
forall {F V} (ge: Genv.t F V) vl m, alloc_globals_rev ge empty vl = Some m ->
nextblock m = Z.to_pos(Z.succ (Zlength vl)).