DescriptionSubzero: Improve handling of alloca instructions of constant size.
PNaCl simplifies varargs calls by creating a known-size argument array with an alloca instruction, and passing the address of that argument array. These alloca instructions don't necessarily require use of a frame pointer, freeing up the frame pointer register for normal register allocation.
These varargs calls sometimes show up in cold paths of hot functions, so increasing the number of registers available to the register allocator can produce tangible gains.
This patch does a simple recognition of these alloca patterns, and on x86 doesn't force a frame pointer if all alloca instructions are suitable.
Future work is to avoid saving the alloca result as a local variable, and instead rematerialize the address as needed with respect to the stack or frame pointer.
BUG= none
R=jpp@chromium.org
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=55f931f65f307116c2def40c3b11ec93998a907e
Patch Set 1 #Patch Set 2 : Cleanup #Patch Set 3 : Apply x86-32 changes to x86-64 #
Total comments: 2
Patch Set 4 : Revert ARM changes #Patch Set 5 : Add a couple of basic tests #
Messages
Total messages: 6 (1 generated)
|