2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
21 #include "hphp/runtime/vm/jit/block.h"
22 #include "hphp/runtime/vm/jit/phys-reg.h"
23 #include "hphp/runtime/vm/jit/state-vector.h"
24 #include "hphp/runtime/vm/jit/translator-runtime.h"
28 ///////////////////////////////////////////////////////////////////////////////
35 namespace irlower
{ struct IRLS
; }
37 ///////////////////////////////////////////////////////////////////////////////
39 // Native stack layout:
45 // | | ...up to kMaxSpillSlots
46 // | spill slots | <-- spill[1]
52 * Return the byte offset to a spill slot.
54 inline uint32_t slotOffset(uint32_t slot
) {
55 return slot
* sizeof(uint64_t);
59 * Return true if the offset of this spill slot is 16-byte aligned.
61 inline bool isSlotAligned(uint32_t slot
) {
65 const size_t kMaxSpillSlots
= 128;
68 * Return InvalidReg, or a specific register to force `tmp' to use.
70 PhysReg
forceAlloc(const SSATmp
& tmp
);
73 * Assign virtual registers to all SSATmps used or defined in reachable blocks.
75 void assignRegs(const IRUnit
& unit
, Vunit
& vunit
, irlower::IRLS
& state
,
76 const BlockList
& blocks
);
79 * Return the set of physical registers implicitly accessed (used or defined).
81 void getEffects(const Abi
& abi
, const Vinstr
& i
,
82 RegSet
& uses
, RegSet
& across
, RegSet
& defs
);
84 ///////////////////////////////////////////////////////////////////////////////