Relax more guards
commit97e2eac6a7a894797fab24c465c071089975daf5
authorGuilherme Ottoni <ottoni@fb.com>
Fri, 24 May 2013 01:08:30 +0000 (23 18:08 -0700)
committersgolemon <sgolemon@hiphop-ubuntu-12.04-64>
Mon, 3 Jun 2013 17:54:37 +0000 (3 10:54 -0700)
tree534b2f754e66f26f500e35cebcd41dbc4417b143
parent5a9d8751afd0b46bfc3b8e56048625776bbb4d69
Relax more guards

This diff significantly generalizes guard relaxation and adds support
for more bytecode instructions.  Before, only CGetL, SetL, RetC, and
RetV were able to relax their inputs, and only in limited ways,
e.g. if their outputs were not used or only used in specific ways.
The new approach follows how the input types flow into the output
types, thus allowing dependencies to be relaxed even if they feed a
chain of values through the tracelet.

This diff also add support for relaxing inputs for the following
bytecode instructions:
  - Pop*
  - FCall
  - FCallArray
  - AddElemC
  - ArrayIdx
  - SetS
  - SetG
  - ContPack
  - ContRetC
  - ContHandle

The spill area was also increased (from 16 to 32 cells) since relaxed
dependencies increase register pressure -- relaxed types are not
immediates that can be burned in and need to reside in registers
instead.
hphp/runtime/vm/translator/abi-x64.h
hphp/runtime/vm/translator/hopt/codegen.cpp
hphp/runtime/vm/translator/hopt/ir.cpp
hphp/runtime/vm/translator/hopt/irinstruction.h
hphp/runtime/vm/translator/hopt/linearscan.cpp
hphp/runtime/vm/translator/hopt/linearscan.h
hphp/runtime/vm/translator/translator-asm-helpers.S
hphp/runtime/vm/translator/translator-x64.cpp
hphp/runtime/vm/translator/translator.cpp
hphp/runtime/vm/translator/translator.h