diff options
author | Andrew Trick <atrick@apple.com> | 2013-10-31 22:11:56 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2013-10-31 22:11:56 +0000 |
commit | 3d74dea4bddc84d1881efc21eb5eefbddbfa9aed (patch) | |
tree | 76963fde5a977fb0fa931940c4db9351d916d0e4 /lib/Target/X86/X86AsmPrinter.h | |
parent | 53446e50a08451df106f76205c6081bf5a103c9f (diff) | |
download | external_llvm-3d74dea4bddc84d1881efc21eb5eefbddbfa9aed.zip external_llvm-3d74dea4bddc84d1881efc21eb5eefbddbfa9aed.tar.gz external_llvm-3d74dea4bddc84d1881efc21eb5eefbddbfa9aed.tar.bz2 |
Add support for stack map generation in the X86 backend.
Originally implemented by Lang Hames.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193811 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86AsmPrinter.h')
-rw-r--r-- | lib/Target/X86/X86AsmPrinter.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Target/X86/X86AsmPrinter.h b/lib/Target/X86/X86AsmPrinter.h index 6eed5ce..050c78d 100644 --- a/lib/Target/X86/X86AsmPrinter.h +++ b/lib/Target/X86/X86AsmPrinter.h @@ -16,6 +16,7 @@ #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/ValueTypes.h" +#include "llvm/CodeGen/StackMaps.h" #include "llvm/Support/Compiler.h" namespace llvm { @@ -24,9 +25,20 @@ class MCStreamer; class LLVM_LIBRARY_VISIBILITY X86AsmPrinter : public AsmPrinter { const X86Subtarget *Subtarget; + StackMaps SM; + + // Parses operands of PATCHPOINT and STACKMAP to produce stack map Location + // structures. Returns a result location and an iterator to the operand + // immediately following the operands consumed. + // + // This method is implemented in X86MCInstLower.cpp. + static std::pair<StackMaps::Location, MachineInstr::const_mop_iterator> + stackmapOperandParser(MachineInstr::const_mop_iterator MOI, + MachineInstr::const_mop_iterator MOE); + public: explicit X86AsmPrinter(TargetMachine &TM, MCStreamer &Streamer) - : AsmPrinter(TM, Streamer) { + : AsmPrinter(TM, Streamer), SM(*this, stackmapOperandParser) { Subtarget = &TM.getSubtarget<X86Subtarget>(); } |