[Stackmap] Liveness Analysis Pass
authorJuergen Ributzka <juergen@apple.com>
Sat, 14 Dec 2013 06:53:06 +0000 (06:53 +0000)
committerJuergen Ributzka <juergen@apple.com>
Sat, 14 Dec 2013 06:53:06 +0000 (06:53 +0000)
commitaaecc0fc0898be1bdd0f5e6f67230cae559f61b8
treecf0d1f3e2dfe34a15ac348cf9a77a61bec741efe
parentcdeccb0c224f8c5863ef769c582b2f7c3cbb043c
[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
16 files changed:
include/llvm/CodeGen/MachineFrameInfo.h
include/llvm/CodeGen/MachineFunction.h
include/llvm/CodeGen/MachineOperand.h
include/llvm/CodeGen/Passes.h
include/llvm/CodeGen/StackMapLivenessAnalysis.h [new file with mode: 0644]
include/llvm/CodeGen/StackMaps.h
include/llvm/InitializePasses.h
lib/CodeGen/CMakeLists.txt
lib/CodeGen/CodeGen.cpp
lib/CodeGen/MachineInstr.cpp
lib/CodeGen/Passes.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/StackMapLivenessAnalysis.cpp [new file with mode: 0644]
lib/CodeGen/StackMaps.cpp
test/CodeGen/X86/stackmap-liveness.ll [new file with mode: 0644]
test/CodeGen/X86/stackmap.ll