aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorHongtao Yu <hoy@fb.com>2023-04-05 11:35:17 -0700
committerHongtao Yu <hoy@fb.com>2023-05-10 11:27:54 -0700
commit9849291dccee91001dbd0473943f6958413c74af (patch)
tree2ef2869b2ea3abfc84f24e35e34117af22de96f4 /llvm/lib/MC/MCStreamer.cpp
parent9272d0f07932d3b6804360cd6f3e754a07df4fb2 (diff)
downloadllvm-9849291dccee91001dbd0473943f6958413c74af.zip
llvm-9849291dccee91001dbd0473943f6958413c74af.tar.gz
llvm-9849291dccee91001dbd0473943f6958413c74af.tar.bz2
[PseudoProbe] Encode/Decode FS discriminator
Encoding FS discriminators for block probes. Decoding them correspondingly. The encoding/decoding of FS discriminators are conditional, only for probes with a non-zero discriminator. This saves encoding size, also ensures downwards-compatiblity. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D147651
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 8f29153..0cb0459 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -1105,7 +1105,7 @@ void MCStreamer::emitInstruction(const MCInst &Inst, const MCSubtargetInfo &) {
}
void MCStreamer::emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type,
- uint64_t Attr,
+ uint64_t Attr, uint64_t Discriminator,
const MCPseudoProbeInlineStack &InlineStack,
MCSymbol *FnSym) {
auto &Context = getContext();
@@ -1117,7 +1117,7 @@ void MCStreamer::emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type,
emitLabel(ProbeSym);
// Create a (local) probe entry with the symbol.
- MCPseudoProbe Probe(ProbeSym, Guid, Index, Type, Attr);
+ MCPseudoProbe Probe(ProbeSym, Guid, Index, Type, Attr, Discriminator);
// Add the probe entry to this section's entries.
Context.getMCPseudoProbeTable().getProbeSections().addPseudoProbe(
@@ -1196,7 +1196,7 @@ void MCStreamer::emitXCOFFRefDirective(const MCSymbol *Symbol) {
}
void MCStreamer::emitXCOFFExceptDirective(const MCSymbol *Symbol,
- const MCSymbol *Trap,
+ const MCSymbol *Trap,
unsigned Lang, unsigned Reason,
unsigned FunctionSize,
bool hasDebug) {