diff options
author | Andrew Trick <atrick@apple.com> | 2013-12-13 18:37:03 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2013-12-13 18:37:03 +0000 |
commit | 539e93120cdbb66f651fc55a810416f3175adc8f (patch) | |
tree | e845453b166d6f8b462ef306f7e9b0d7cede2bbf /include/llvm/CodeGen/MachineFunction.h | |
parent | edf1070ca74f7d646bce2c66db9f443d09e7d1d3 (diff) | |
download | llvm-539e93120cdbb66f651fc55a810416f3175adc8f.tar.gz llvm-539e93120cdbb66f651fc55a810416f3175adc8f.tar.bz2 llvm-539e93120cdbb66f651fc55a810416f3175adc8f.tar.xz |
Liveness Analysis Pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197254 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); |