[CodeGen] Support custom format of stack maps
authorThan McIntosh <thanm@google.com>
Mon, 26 Nov 2018 18:43:48 +0000 (18:43 +0000)
committerThan McIntosh <thanm@google.com>
Mon, 26 Nov 2018 18:43:48 +0000 (18:43 +0000)
commit30c804bbb16f56f8633e9c7b44db593ae3c1a166
tree78de2cbcc36070943670f987ac5cf1db0ca9da92
parente8ad4b7124b5ff907b64b1b9e4f4a4203ac2d544
[CodeGen] Support custom format of stack maps

Summary:
Add a hook to the GCMetadataPrinter for emitting stack maps in
custom format. The hook will be called at stack map generation
time. The default stack map format is used if there is no hook.

For this to be useful a few data structures and accessors are
exposed from the StackMaps class, so the custom printer can
access the stack map data.

This patch authored by Cherry Zhang <cherryyz@google.com>.

Reviewers: thanm, apilipenko, reames

Reviewed By: reames

Subscribers: reames, apilipenko, nemanjai, javed.absar, kbarton, jsji, llvm-commits

Differential Revision: https://reviews.llvm.org/D53892

llvm-svn: 347584
llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/include/llvm/CodeGen/GCMetadataPrinter.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
llvm/lib/Target/X86/X86AsmPrinter.cpp