diff options
author | Juergen Ributzka <juergen@apple.com> | 2013-12-14 06:53:06 +0000 |
---|---|---|
committer | Juergen Ributzka <juergen@apple.com> | 2013-12-14 06:53:06 +0000 |
commit | aaecc0fc0898be1bdd0f5e6f67230cae559f61b8 (patch) | |
tree | cf0d1f3e2dfe34a15ac348cf9a77a61bec741efe /include/llvm/CodeGen/MachineFunction.h | |
parent | cdeccb0c224f8c5863ef769c582b2f7c3cbb043c (diff) | |
download | llvm-aaecc0fc0898be1bdd0f5e6f67230cae559f61b8.tar.gz llvm-aaecc0fc0898be1bdd0f5e6f67230cae559f61b8.tar.bz2 llvm-aaecc0fc0898be1bdd0f5e6f67230cae559f61b8.tar.xz |
[Stackmap] Liveness Analysis Pass
This optional register liveness analysis pass can be enabled with either
-enable-stackmap-liveness, -enable-patchpoint-liveness, or both. The pass
traverses each basic block in a machine function. For each basic block the
instructions are processed in reversed order and if a patchpoint or stackmap
instruction is encountered the current live-out register set is encoded as a
register mask and attached to the instruction.
Later on during stackmap generation the live-out register mask is processed and
also emitted as part of the stackmap.
This information is optional and intended for optimization purposes only. This
will enable a client of the stackmap to reason about the registers it can use
and which registers need to be preserved.
Reviewed by Andy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 43b370cccf..09cc1e5dfb 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -426,6 +426,15 @@ public: OperandRecycler.deallocate(Cap, Array); } + /// \brief Allocate and initialize a register mask with @p NumRegister bits. + uint32_t *allocateRegisterMask(unsigned NumRegister) { + unsigned Size = (NumRegister + 31) / 32; + uint32_t *Mask = Allocator.Allocate<uint32_t>(Size); + for (unsigned i = 0; i != Size; ++i) + Mask[i] = 0; + return Mask; + } + /// allocateMemRefsArray - Allocate an array to hold MachineMemOperand /// pointers. This array is owned by the MachineFunction. MachineInstr::mmo_iterator allocateMemRefsArray(unsigned long Num); |