diff options
author | Philip Reames <listmail@philipreames.com> | 2019-04-13 03:08:45 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2019-04-13 03:08:45 +0000 |
commit | eea989a909a3c963a1e99d7e75eb94f25d2bf9fb (patch) | |
tree | dbd673961a2cb4f6b48cd6092801e45a403ada3c /llvm/tools/llvm-readobj/StackMapPrinter.h | |
parent | f7acef9c88f771703335fc276f15008f703cb631 (diff) | |
download | bcm5719-llvm-eea989a909a3c963a1e99d7e75eb94f25d2bf9fb.tar.gz bcm5719-llvm-eea989a909a3c963a1e99d7e75eb94f25d2bf9fb.zip |
[StackMaps] Add location size to llvm-readobj -stackmap output
The size field of a location can be different for each entry, so it is useful to have this displayed in the output of llvm-readobj -stackmap. Below is an example of how the output would look:
Record ID: 2882400000, instruction offset: 16
3 locations:
#1: Constant 1, size: 8
#2: Constant 2, size: 8
#3: Constant 3, size: 8
0 live-outs: [ ]
Patch By: jacob.hughes@kcl.ac.uk (with heavy modification by me)
Differential Revision: https://reviews.llvm.org/D59169
llvm-svn: 358324
Diffstat (limited to 'llvm/tools/llvm-readobj/StackMapPrinter.h')
-rw-r--r-- | llvm/tools/llvm-readobj/StackMapPrinter.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/tools/llvm-readobj/StackMapPrinter.h b/llvm/tools/llvm-readobj/StackMapPrinter.h index c40e65a53a5..ef757564026 100644 --- a/llvm/tools/llvm-readobj/StackMapPrinter.h +++ b/llvm/tools/llvm-readobj/StackMapPrinter.h @@ -47,24 +47,24 @@ void prettyPrintStackMap(ScopedPrinter &W, const StackMapParserT &SMP) { OS << " #" << ++LocationIndex << ": "; switch (Loc.getKind()) { case StackMapParserT::LocationKind::Register: - OS << "Register R#" << Loc.getDwarfRegNum() << "\n"; + OS << "Register R#" << Loc.getDwarfRegNum(); break; case StackMapParserT::LocationKind::Direct: - OS << "Direct R#" << Loc.getDwarfRegNum() << " + " << Loc.getOffset() - << "\n"; + OS << "Direct R#" << Loc.getDwarfRegNum() << " + " << Loc.getOffset(); break; case StackMapParserT::LocationKind::Indirect: OS << "Indirect [R#" << Loc.getDwarfRegNum() << " + " << Loc.getOffset() - << "]\n"; + << "]"; break; case StackMapParserT::LocationKind::Constant: - OS << "Constant " << Loc.getSmallConstant() << "\n"; + OS << "Constant " << Loc.getSmallConstant(); break; case StackMapParserT::LocationKind::ConstantIndex: OS << "ConstantIndex #" << Loc.getConstantIndex() << " (" - << SMP.getConstant(Loc.getConstantIndex()).getValue() << ")\n"; + << SMP.getConstant(Loc.getConstantIndex()).getValue() << ")"; break; } + OS << ", size: " << Loc.getSizeInBytes() << "\n"; } raw_ostream &OS = W.startLine(); |