DescriptionSubzero: Use CFG-local arena allocation for relevant containers.
In particular, node lists for in and out edges of a CfgNode, and the live range segment list in a Variable. This is done by making the Cfg allocator globally available through TLS, and providing the STL containers with an allocator struct that uses this.
This also cleans up some other allocation-related issues:
* The allocator is now hung off the Cfg via a pointer, rather than being embedded into the Cfg. This allows a const Cfg pointer to be stored in TLS while still allowing its allocator to be mutated.
* Cfg is now created via a static create() method.
* The redundant Cfg::allocateInst<> methods are removed.
* The Variable::asType() method allocates a whole new Variable from the Cfg arena, rather than allocating it on the stack, removing the need for the move constructor in Variable and Operand. This is OK since asType() is only used for textual asm emission.
* The same 1MB arena allocator is now used by the assembler as well. The fact that it wasn't changed over to be the same as Cfg and GlobalContext was an oversight. (It turns out this adds ~3MB to the translator memory footprint, so that could be tuned later.)
BUG= none
R=jfb@chromium.org, jvoung@chromium.org
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=31c955905a2d861a944f1e0ca60cd9e4c6f1b37d
Patch Set 1 #Patch Set 2 : Disable asType() in the minimal build #
Total comments: 18
Patch Set 3 : Code review changes #
Total comments: 14
Patch Set 4 : Doc update #
Total comments: 4
Patch Set 5 : Typo fix #
Messages
Total messages: 10 (1 generated)
|