[PATCH] D32808: [mips][XRay] Use the base version of emitXRayTable
Simon Dardis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 4 04:17:06 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL302138: [mips][XRay] Use the base version of emitXRayTable (authored by sdardis).
Changed prior to commit:
https://reviews.llvm.org/D32808?vs=97659&id=97810#toc
Repository:
rL LLVM
https://reviews.llvm.org/D32808
Files:
llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
Index: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
===================================================================
--- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
+++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -81,7 +81,7 @@
AsmPrinter::runOnMachineFunction(MF);
- EmitXRayTable();
+ emitXRayTable();
return true;
}
@@ -1148,39 +1148,6 @@
recordSled(CurSled, MI, Kind);
}
-void MipsAsmPrinter::EmitXRayTable() {
- if (Sleds.empty())
- return;
- if (Subtarget->isTargetELF()) {
- auto PrevSection = OutStreamer->getCurrentSectionOnly();
- auto Fn = MF->getFunction();
- MCSection *Section;
-
- if (Fn->hasComdat())
- Section = OutContext.getELFSection("xray_instr_map", ELF::SHT_PROGBITS,
- ELF::SHF_ALLOC | ELF::SHF_GROUP, 0,
- Fn->getComdat()->getName());
- else
- Section =
- OutContext.getELFSection("xray_instr_map", ELF::SHT_PROGBITS,
- ELF::SHF_ALLOC, 0, CurrentFnSym->getName());
-
- OutStreamer->SwitchSection(Section);
- for (const auto &Sled : Sleds) {
- OutStreamer->EmitSymbolValue(Sled.Sled, Subtarget->isGP64bit() ? 8 : 4);
- OutStreamer->EmitSymbolValue(CurrentFnSym, Subtarget->isGP64bit() ? 8 : 4);
- auto Kind = static_cast<uint8_t>(Sled.Kind);
- OutStreamer->EmitBytes(
- StringRef(reinterpret_cast<const char *>(&Kind), 1));
- OutStreamer->EmitBytes(
- StringRef(reinterpret_cast<const char *>(&Sled.AlwaysInstrument), 1));
- OutStreamer->EmitZeros(Subtarget->isGP64bit() ? 14 : 6);
- }
- OutStreamer->SwitchSection(PrevSection);
- }
- Sleds.clear();
-}
-
void MipsAsmPrinter::LowerPATCHABLE_FUNCTION_ENTER(const MachineInstr &MI) {
EmitSled(MI, SledKind::FUNCTION_ENTER);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32808.97810.patch
Type: text/x-patch
Size: 1850 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170504/aebff0b5/attachment.bin>
More information about the llvm-commits
mailing list