re2: memory diet part 2
Change program representation from Inst* graph
with forwarding pointers to contiguous array of Inst
with forwarding indices. Cuts sizeof(Inst) from 24 to 8 bytes,
fewer allocated objects, presumably better cache locality.
The SparseArray<Inst*> would now be SparseArray<int>
except that the instruction number was always the array index,
so the value is redundant. Use SparseSets instead, saving 60%
of the storage footprint due to SparseArrays.
Convert all back ends to use new program representation.
Free unused storage at end of IsOnePass (good for ~30%).
Build with -DNDEBUG by default, to disable DCHECKs.
Add obj/dbg/* target to Makefile to build in debug mode.
R=r
CC=re2-dev
http://codereview.appspot.com/1129043
10 files changed