<div dir="ltr">This breaks some of our internal tests. I have reverted it for now in r312243. Will follow up with repro instructions.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 23, 2017 at 6:49 AM, Dean Michael Berris via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dberris<br>
Date: Tue Aug 22 21:49:41 2017<br>
New Revision: 311525<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=311525&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=311525&view=rev</a><br>
Log:<br>
[XRay][CodeGen] Use PIC-friendly code in XRay sleds; remove synthetic references in .text<br>
<br>
Summary:<br>
This change achieves two things:<br>
<br>
- Redefine the Custom Event handling instrumentation points emitted by<br>
the compiler to not require dynamic relocation of references to the<br>
__xray_CustomEvent trampoline.<br>
<br>
- Remove the synthetic reference we emit at the end of a function that<br>
we used to keep auxiliary sections alive in favour of SHF_LINK_ORDER<br>
associated with the section where the function is defined.<br>
<br>
To achieve the custom event handling change, we've had to introduce the<br>
concept of sled versioning -- this will need to be supported by the<br>
runtime to allow us to understand how to turn on/off the new version of<br>
the custom event handling sleds. That change has to land first before we<br>
change the way we write the sleds.<br>
<br>
To remove the synthetic reference, we rely on a relatively new linker<br>
feature that preserves the sections that are associated with each other.<br>
This allows us to limit the effects on the .text section of ELF<br>
binaries.<br>
<br>
Because we're still using absolute references that are resolved at<br>
runtime for the instrumentation map (and function index) maps, we mark<br>
these sections write-able. In the future we can re-define the entries in<br>
the map to use relative relocations instead that can be statically<br>
determined by the linker. That change will be a bit more invasive so we<br>
defer this for later.<br>
<br>
Depends on D36816.<br>
<br>
Reviewers: dblaikie, echristo, pcc<br>
<br>
Subscribers: llvm-commits<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D36615" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D36615</a><br>
<br>
Modified:<br>
llvm/trunk/include/llvm/<wbr>CodeGen/AsmPrinter.h<br>
llvm/trunk/lib/CodeGen/<wbr>AsmPrinter/AsmPrinter.cpp<br>
llvm/trunk/lib/Target/X86/<wbr>X86MCInstLower.cpp<br>
llvm/trunk/test/CodeGen/<wbr>AArch64/xray-attribute-<wbr>instrumentation.ll<br>
llvm/trunk/test/CodeGen/<wbr>AArch64/xray-tail-call-sled.ll<br>
llvm/trunk/test/CodeGen/ARM/<wbr>xray-armv6-attribute-<wbr>instrumentation.ll<br>
llvm/trunk/test/CodeGen/ARM/<wbr>xray-armv7-attribute-<wbr>instrumentation.ll<br>
llvm/trunk/test/CodeGen/Mips/<wbr>xray-section-group.ll<br>
llvm/trunk/test/CodeGen/X86/<wbr>xray-attribute-<wbr>instrumentation.ll<br>
llvm/trunk/test/CodeGen/X86/<wbr>xray-custom-log.ll<br>
llvm/trunk/test/CodeGen/X86/<wbr>xray-log-args.ll<br>
llvm/trunk/test/CodeGen/X86/<wbr>xray-loop-detection.ll<br>
llvm/trunk/test/CodeGen/X86/<wbr>xray-section-group.ll<br>
llvm/trunk/test/CodeGen/X86/<wbr>xray-tail-call-sled.ll<br>
<br>
Modified: llvm/trunk/include/llvm/<wbr>CodeGen/AsmPrinter.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/include/<wbr>llvm/CodeGen/AsmPrinter.h?rev=<wbr>311525&r1=311524&r2=311525&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/include/llvm/<wbr>CodeGen/AsmPrinter.h (original)<br>
+++ llvm/trunk/include/llvm/<wbr>CodeGen/AsmPrinter.h Tue Aug 22 21:49:41 2017<br>
@@ -235,13 +235,15 @@ public:<br>
<br>
// The table will contain these structs that point to the sled, the function<br>
// containing the sled, and what kind of sled (and whether they should always<br>
- // be instrumented).<br>
+ // be instrumented). We also use a version identifier that the runtime can use<br>
+ // to decide what to do with the sled, depending on the version of the sled.<br>
struct XRayFunctionEntry {<br>
const MCSymbol *Sled;<br>
const MCSymbol *Function;<br>
SledKind Kind;<br>
bool AlwaysInstrument;<br>
const class Function *Fn;<br>
+ uint8_t Version;<br>
<br>
void emit(int, MCStreamer *, const MCSymbol *) const;<br>
};<br>
@@ -249,8 +251,12 @@ public:<br>
// All the sleds to be emitted.<br>
SmallVector<XRayFunctionEntry, 4> Sleds;<br>
<br>
+ // A unique ID used for ELF sections associated with a particular function.<br>
+ unsigned XRayFnUniqueID = 0;<br>
+<br>
// Helper function to record a given XRay sled.<br>
- void recordSled(MCSymbol *Sled, const MachineInstr &MI, SledKind Kind);<br>
+ void recordSled(MCSymbol *Sled, const MachineInstr &MI, SledKind Kind,<br>
+ uint8_t Version = 0);<br>
<br>
/// Emit a table with all XRay instrumentation points.<br>
void emitXRayTable();<br>
<br>
Modified: llvm/trunk/lib/CodeGen/<wbr>AsmPrinter/AsmPrinter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/<wbr>CodeGen/AsmPrinter/AsmPrinter.<wbr>cpp?rev=311525&r1=311524&r2=<wbr>311525&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/CodeGen/<wbr>AsmPrinter/AsmPrinter.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/<wbr>AsmPrinter/AsmPrinter.cpp Tue Aug 22 21:49:41 2017<br>
@@ -2767,10 +2767,13 @@ void AsmPrinter::XRayFunctionEntry:<wbr>:emit<br>
Out->EmitSymbolValue(Sled, Bytes);<br>
Out->EmitSymbolValue(<wbr>CurrentFnSym, Bytes);<br>
auto Kind8 = static_cast<uint8_t>(Kind);<br>
- Out->EmitBytes(StringRef(<wbr>reinterpret_cast<const char *>(&Kind8), 1));<br>
- Out->EmitBytes(<br>
+ Out->EmitBinaryData(StringRef(<wbr>reinterpret_cast<const char *>(&Kind8), 1));<br>
+ Out->EmitBinaryData(<br>
StringRef(reinterpret_cast<<wbr>const char *>(&AlwaysInstrument), 1));<br>
- Out->EmitZeros(2 * Bytes - 2); // Pad the previous two entries<br>
+ Out->EmitBinaryData(StringRef(<wbr>reinterpret_cast<const char *>(&Version), 1));<br>
+ auto Padding = (4 * Bytes) - ((2 * Bytes) + 3);<br>
+ assert(Padding >= 0 && "Instrumentation map entry > 4 * Word Size");<br>
+ Out->EmitZeros(Padding);<br>
}<br>
<br>
void AsmPrinter::emitXRayTable() {<br>
@@ -2782,19 +2785,22 @@ void AsmPrinter::emitXRayTable() {<br>
MCSection *InstMap = nullptr;<br>
MCSection *FnSledIndex = nullptr;<br>
if (MF->getSubtarget().<wbr>getTargetTriple().<wbr>isOSBinFormatELF()) {<br>
+ auto Associated = dyn_cast<MCSymbolELF>(<wbr>PrevSection->getBeginSymbol())<wbr>;<br>
+ assert(Associated != nullptr);<br>
+ auto Flags = ELF::SHF_WRITE | ELF::SHF_ALLOC | ELF::SHF_LINK_ORDER;<br>
+ std::string GroupName;<br>
if (Fn->hasComdat()) {<br>
- InstMap = OutContext.getELFSection("<wbr>xray_instr_map", ELF::SHT_PROGBITS,<br>
- ELF::SHF_ALLOC | ELF::SHF_GROUP, 0,<br>
- Fn->getComdat()->getName());<br>
- FnSledIndex = OutContext.getELFSection("<wbr>xray_fn_idx", ELF::SHT_PROGBITS,<br>
- ELF::SHF_ALLOC | ELF::SHF_GROUP, 0,<br>
- Fn->getComdat()->getName());<br>
- } else {<br>
- InstMap = OutContext.getELFSection("<wbr>xray_instr_map", ELF::SHT_PROGBITS,<br>
- ELF::SHF_ALLOC);<br>
- FnSledIndex = OutContext.getELFSection("<wbr>xray_fn_idx", ELF::SHT_PROGBITS,<br>
- ELF::SHF_ALLOC);<br>
+ Flags |= ELF::SHF_GROUP;<br>
+ GroupName = Fn->getComdat()->getName();<br>
}<br>
+<br>
+ auto UniqueID = ++XRayFnUniqueID;<br>
+ InstMap =<br>
+ OutContext.getELFSection("<wbr>xray_instr_map", ELF::SHT_PROGBITS, Flags, 0,<br>
+ GroupName, UniqueID, Associated);<br>
+ FnSledIndex =<br>
+ OutContext.getELFSection("<wbr>xray_fn_idx", ELF::SHT_PROGBITS, Flags, 0,<br>
+ GroupName, UniqueID, Associated);<br>
} else if (MF->getSubtarget().<wbr>getTargetTriple().<wbr>isOSBinFormatMachO()) {<br>
InstMap = OutContext.getMachOSection("__<wbr>DATA", "xray_instr_map", 0,<br>
SectionKind::<wbr>getReadOnlyWithRel());<br>
@@ -2804,15 +2810,7 @@ void AsmPrinter::emitXRayTable() {<br>
llvm_unreachable("Unsupported target");<br>
}<br>
<br>
- // Before we switch over, we force a reference to a label inside the<br>
- // xray_fn_idx sections. This makes sure that the xray_fn_idx section is kept<br>
- // live by the linker if the function is not garbage-collected. Since this<br>
- // function is always called just before the function's end, we assume that<br>
- // this is happening after the last return instruction.<br>
auto WordSizeBytes = MAI->getCodePointerSize();<br>
- MCSymbol *IdxRef = OutContext.createTempSymbol("<wbr>xray_fn_idx_synth_", true);<br>
- OutStreamer-><wbr>EmitCodeAlignment(16);<br>
- OutStreamer->EmitSymbolValue(<wbr>IdxRef, WordSizeBytes, false);<br>
<br>
// Now we switch to the instrumentation map section. Because this is done<br>
// per-function, we are able to create an index entry that will represent the<br>
@@ -2831,15 +2829,14 @@ void AsmPrinter::emitXRayTable() {<br>
// pointers. This should work for both 32-bit and 64-bit platforms.<br>
OutStreamer->SwitchSection(<wbr>FnSledIndex);<br>
OutStreamer-><wbr>EmitCodeAlignment(2 * WordSizeBytes);<br>
- OutStreamer->EmitLabel(IdxRef)<wbr>;<br>
- OutStreamer->EmitSymbolValue(<wbr>SledsStart, WordSizeBytes);<br>
- OutStreamer->EmitSymbolValue(<wbr>SledsEnd, WordSizeBytes);<br>
+ OutStreamer->EmitSymbolValue(<wbr>SledsStart, WordSizeBytes, false);<br>
+ OutStreamer->EmitSymbolValue(<wbr>SledsEnd, WordSizeBytes, false);<br>
OutStreamer->SwitchSection(<wbr>PrevSection);<br>
Sleds.clear();<br>
}<br>
<br>
void AsmPrinter::recordSled(<wbr>MCSymbol *Sled, const MachineInstr &MI,<br>
- SledKind Kind) {<br>
+ SledKind Kind, uint8_t Version) {<br>
auto Fn = MI.getParent()->getParent()-><wbr>getFunction();<br>
auto Attr = Fn->getFnAttribute("function-<wbr>instrument");<br>
bool LogArgs = Fn->hasFnAttribute("xray-log-<wbr>args");<br>
@@ -2847,8 +2844,8 @@ void AsmPrinter::recordSled(<wbr>MCSymbol *Sl<br>
Attr.isStringAttribute() && Attr.getValueAsString() == "xray-always";<br>
if (Kind == SledKind::FUNCTION_ENTER && LogArgs)<br>
Kind = SledKind::LOG_ARGS_ENTER;<br>
- Sleds.emplace_back(<br>
- XRayFunctionEntry{ Sled, CurrentFnSym, Kind, AlwaysInstrument, Fn });<br>
+ Sleds.emplace_back(<wbr>XRayFunctionEntry{Sled, CurrentFnSym, Kind,<br>
+ AlwaysInstrument, Fn, Version});<br>
}<br>
<br>
uint16_t AsmPrinter::getDwarfVersion() const {<br>
<br>
Modified: llvm/trunk/lib/Target/X86/<wbr>X86MCInstLower.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/Target/<wbr>X86/X86MCInstLower.cpp?rev=<wbr>311525&r1=311524&r2=311525&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Target/X86/<wbr>X86MCInstLower.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/<wbr>X86MCInstLower.cpp Tue Aug 22 21:49:41 2017<br>
@@ -1047,20 +1047,20 @@ void X86AsmPrinter::LowerPATCHABLE_<wbr>EVENT<br>
// We want to emit the following pattern, which follows the x86 calling<br>
// convention to prepare for the trampoline call to be patched in.<br>
//<br>
- // <args placement according SysV64 calling convention><br>
// .p2align 1, ...<br>
// .Lxray_event_sled_N:<br>
- // jmp +N // jump across the call instruction<br>
- // callq __xray_CustomEvent // force relocation to symbol<br>
- // <args cleanup, jump to here><br>
- //<br>
- // The relative jump needs to jump forward 24 bytes:<br>
- // 10 (args) + 5 (nops) + 9 (cleanup)<br>
+ // jmp +N // jump across the instrumentation sled<br>
+ // ... // set up arguments in register<br>
+ // callq __xray_CustomEvent // force dependency to symbol<br>
+ // ...<br>
+ // <jump here><br>
//<br>
// After patching, it would look something like:<br>
//<br>
// nopw (2-byte nop)<br>
+ // ...<br>
// callq __xrayCustomEvent // already lowered<br>
+ // ...<br>
//<br>
// ---<br>
// First we emit the label and the jump.<br>
@@ -1072,49 +1072,55 @@ void X86AsmPrinter::LowerPATCHABLE_<wbr>EVENT<br>
// Use a two-byte `jmp`. This version of JMP takes an 8-bit relative offset as<br>
// an operand (computed as an offset from the jmp instruction).<br>
// FIXME: Find another less hacky way do force the relative jump.<br>
- OutStreamer->EmitBytes("\xeb\<wbr>x14");<br>
+ OutStreamer->EmitBinaryData("\<wbr>xeb\x0f");<br>
<br>
// The default C calling convention will place two arguments into %rcx and<br>
// %rdx -- so we only work with those.<br>
- unsigned UsedRegs[] = {X86::RDI, X86::RSI, X86::RAX};<br>
-<br>
- // Because we will use %rax, we preserve that across the call.<br>
- EmitAndCountInstruction(<wbr>MCInstBuilder(X86::PUSH64r).<wbr>addReg(X86::RAX));<br>
+ unsigned UsedRegs[] = {X86::RDI, X86::RSI};<br>
+ bool UsedMask[] = {false, false};<br>
<br>
- // Then we put the operands in the %rdi and %rsi registers.<br>
+ // Then we put the operands in the %rdi and %rsi registers. We spill the<br>
+ // values in the register before we clobber them, and mark them as used in<br>
+ // UsedMask. In case the arguments are already in the correct register, we use<br>
+ // emit nops appropriately sized to keep the sled the same size in every<br>
+ // situation.<br>
for (unsigned I = 0; I < MI.getNumOperands(); ++I)<br>
if (auto Op = MCIL.LowerMachineOperand(&MI, MI.getOperand(I))) {<br>
- if (Op->isImm())<br>
- EmitAndCountInstruction(<wbr>MCInstBuilder(X86::MOV64ri)<br>
+ assert(Op->isReg() && "Only support arguments in registers");<br>
+ if (Op->getReg() != UsedRegs[I]) {<br>
+ UsedMask[I] = true;<br>
+ EmitAndCountInstruction(<br>
+ MCInstBuilder(X86::PUSH64r).<wbr>addReg(UsedRegs[I]));<br>
+ EmitAndCountInstruction(<wbr>MCInstBuilder(X86::MOV64rr)<br>
.addReg(UsedRegs[I])<br>
- .addImm(Op->getImm()));<br>
- else if (Op->isReg()) {<br>
- if (Op->getReg() != UsedRegs[I])<br>
- EmitAndCountInstruction(<wbr>MCInstBuilder(X86::MOV64rr)<br>
- .addReg(UsedRegs[I])<br>
- .addReg(Op->getReg()));<br>
- else<br>
- EmitNops(*OutStreamer, 3, Subtarget->is64Bit(), getSubtargetInfo());<br>
+ .addReg(Op->getReg()));<br>
+ } else {<br>
+ EmitNops(*OutStreamer, 4, Subtarget->is64Bit(), getSubtargetInfo());<br>
}<br>
}<br>
<br>
// We emit a hard dependency on the __xray_CustomEvent symbol, which is the<br>
- // name of the trampoline to be implemented by the XRay runtime. We put this<br>
- // explicitly in the %rax register.<br>
+ // name of the trampoline to be implemented by the XRay runtime.<br>
auto TSym = OutContext.getOrCreateSymbol("<wbr>__xray_CustomEvent");<br>
MachineOperand TOp = MachineOperand::<wbr>CreateMCSymbol(TSym);<br>
- EmitAndCountInstruction(<wbr>MCInstBuilder(X86::MOV64ri)<br>
- .addReg(X86::RAX)<br>
- .addOperand(MCIL.<wbr>LowerSymbolOperand(TOp, TSym)));<br>
<br>
// Emit the call instruction.<br>
- EmitAndCountInstruction(<wbr>MCInstBuilder(X86::CALL64r).<wbr>addReg(X86::RAX));<br>
+ EmitAndCountInstruction(<wbr>MCInstBuilder(X86::<wbr>CALL64pcrel32)<br>
+ .addOperand(MCIL.<wbr>LowerSymbolOperand(TOp, TSym)));<br>
<br>
// Restore caller-saved and used registers.<br>
+ for (unsigned I = sizeof UsedMask; I-- > 0;)<br>
+ if (UsedMask[I])<br>
+ EmitAndCountInstruction(<wbr>MCInstBuilder(X86::POP64r).<wbr>addReg(UsedRegs[I]));<br>
+ else<br>
+ EmitNops(*OutStreamer, 1, Subtarget->is64Bit(), getSubtargetInfo());<br>
+<br>
OutStreamer->AddComment("xray custom event end.");<br>
- EmitAndCountInstruction(<wbr>MCInstBuilder(X86::POP64r).<wbr>addReg(X86::RAX));<br>
<br>
- recordSled(CurSled, MI, SledKind::CUSTOM_EVENT);<br>
+ // Record the sled version. Older versions of this sled were spelled<br>
+ // differently, so we let the runtime handle the different offsets we're<br>
+ // using.<br>
+ recordSled(CurSled, MI, SledKind::CUSTOM_EVENT, 1);<br>
}<br>
<br>
void X86AsmPrinter::LowerPATCHABLE_<wbr>FUNCTION_ENTER(const MachineInstr &MI,<br>
@@ -1125,7 +1131,6 @@ void X86AsmPrinter::LowerPATCHABLE_<wbr>FUNCT<br>
// .Lxray_sled_N:<br>
// jmp .tmpN<br>
// # 9 bytes worth of noops<br>
- // .tmpN<br>
//<br>
// We need the 9 bytes because at runtime, we'd be patching over the full 11<br>
// bytes with the following pattern:<br>
@@ -1136,14 +1141,12 @@ void X86AsmPrinter::LowerPATCHABLE_<wbr>FUNCT<br>
auto CurSled = OutContext.createTempSymbol("<wbr>xray_sled_", true);<br>
OutStreamer-><wbr>EmitCodeAlignment(2);<br>
OutStreamer->EmitLabel(<wbr>CurSled);<br>
- auto Target = OutContext.createTempSymbol();<br>
<br>
// Use a two-byte `jmp`. This version of JMP takes an 8-bit relative offset as<br>
// an operand (computed as an offset from the jmp instruction).<br>
// FIXME: Find another less hacky way do force the relative jump.<br>
OutStreamer->EmitBytes("\xeb\<wbr>x09");<br>
EmitNops(*OutStreamer, 9, Subtarget->is64Bit(), getSubtargetInfo());<br>
- OutStreamer->EmitLabel(Target)<wbr>;<br>
recordSled(CurSled, MI, SledKind::FUNCTION_ENTER);<br>
}<br>
<br>
<br>
Modified: llvm/trunk/test/CodeGen/<wbr>AArch64/xray-attribute-<wbr>instrumentation.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/xray-attribute-instrumentation.ll?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/AArch64/xray-<wbr>attribute-instrumentation.ll?<wbr>rev=311525&r1=311524&r2=<wbr>311525&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/<wbr>AArch64/xray-attribute-<wbr>instrumentation.ll (original)<br>
+++ llvm/trunk/test/CodeGen/<wbr>AArch64/xray-attribute-<wbr>instrumentation.ll Tue Aug 22 21:49:41 2017<br>
@@ -24,9 +24,7 @@ define i32 @foo() nounwind noinline uwta<br>
; CHECK-LABEL: Ltmp1:<br>
; CHECK-NEXT: ret<br>
}<br>
-; CHECK: .p2align 4<br>
-; CHECK-NEXT: .xword .Lxray_fn_idx_synth_0<br>
-; CHECK-NEXT: .section xray_instr_map,{{.*}}<br>
+; CHECK-LABEL: xray_instr_map<br>
; CHECK-LABEL: Lxray_sleds_start0<br>
; CHECK: .xword .Lxray_sled_0<br>
; CHECK: .xword .Lxray_sled_1<br>
<br>
Modified: llvm/trunk/test/CodeGen/<wbr>AArch64/xray-tail-call-sled.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/xray-tail-call-sled.ll?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/AArch64/xray-tail-<wbr>call-sled.ll?rev=311525&r1=<wbr>311524&r2=311525&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/<wbr>AArch64/xray-tail-call-sled.ll (original)<br>
+++ llvm/trunk/test/CodeGen/<wbr>AArch64/xray-tail-call-sled.ll Tue Aug 22 21:49:41 2017<br>
@@ -27,15 +27,12 @@ define i32 @callee() nounwind noinline u<br>
; CHECK-LABEL: .Ltmp1:<br>
; CHECK-NEXT: ret<br>
}<br>
-; CHECK: .p2align 4<br>
-; CHECK-NEXT: .xword .Lxray_fn_idx_synth_0<br>
-; CHECK-NEXT: .section xray_instr_map,{{.*}}<br>
+; CHECK-LABEL: xray_instr_map<br>
; CHECK-LABEL: Lxray_sleds_start0:<br>
; CHECK: .xword .Lxray_sled_0<br>
; CHECK: .xword .Lxray_sled_1<br>
; CHECK-LABEL: Lxray_sleds_end0:<br>
-; CHECK: .section xray_fn_idx,{{.*}}<br>
-; CHECK-LABEL: Lxray_fn_idx_synth_0:<br>
+; CHECK-LABEL: xray_fn_idx<br>
; CHECK: .xword .Lxray_sleds_start0<br>
; CHECK-NEXT: .xword .Lxray_sleds_end0<br>
<br>
@@ -66,14 +63,11 @@ define i32 @caller() nounwind noinline u<br>
; CHECK: b callee<br>
ret i32 %retval<br>
}<br>
-; CHECK: .p2align 4<br>
-; CHECK-NEXT: .xword .Lxray_fn_idx_synth_1<br>
-; CHECK-NEXT: .section xray_instr_map,{{.*}}<br>
+; CHECK-LABEL: xray_instr_map<br>
; CHECK-LABEL: Lxray_sleds_start1:<br>
; CHECK: .xword .Lxray_sled_2<br>
; CHECK: .xword .Lxray_sled_3<br>
; CHECK-LABEL: Lxray_sleds_end1:<br>
; CHECK: .section xray_fn_idx,{{.*}}<br>
-; CHECK-LABEL: Lxray_fn_idx_synth_1:<br>
; CHECK: .xword .Lxray_sleds_start1<br>
; CHECK-NEXT: .xword .Lxray_sleds_end1<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/<wbr>xray-armv6-attribute-<wbr>instrumentation.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/ARM/xray-armv6-<wbr>attribute-instrumentation.ll?<wbr>rev=311525&r1=311524&r2=<wbr>311525&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/ARM/<wbr>xray-armv6-attribute-<wbr>instrumentation.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/<wbr>xray-armv6-attribute-<wbr>instrumentation.ll Tue Aug 22 21:49:41 2017<br>
@@ -23,14 +23,11 @@ define i32 @foo() nounwind noinline uwta<br>
; CHECK-LABEL: Ltmp1:<br>
; CHECK-NEXT: bx lr<br>
}<br>
-; CHECK: .p2align 4<br>
-; CHECK-NEXT: .long {{.*}}Lxray_fn_idx_synth_0<br>
-; CHECK-NEXT: .section {{.*}}xray_instr_map{{.*}}<br>
+; CHECK-LABEL: xray_instr_map<br>
; CHECK-LABEL: Lxray_sleds_start0:<br>
; CHECK: .long {{.*}}Lxray_sled_0<br>
; CHECK: .long {{.*}}Lxray_sled_1<br>
; CHECK-LABEL: Lxray_sleds_end0:<br>
-; CHECK: .section {{.*}}xray_fn_idx{{.*}}<br>
-; CHECK-LABEL: Lxray_fn_idx_synth_0:<br>
+; CHECK-LABEL: xray_fn_idx<br>
; CHECK: .long {{.*}}Lxray_sleds_start0<br>
; CHECK-NEXT: .long {{.*}}Lxray_sleds_end0<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/<wbr>xray-armv7-attribute-<wbr>instrumentation.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/ARM/xray-armv7-<wbr>attribute-instrumentation.ll?<wbr>rev=311525&r1=311524&r2=<wbr>311525&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/ARM/<wbr>xray-armv7-attribute-<wbr>instrumentation.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/<wbr>xray-armv7-attribute-<wbr>instrumentation.ll Tue Aug 22 21:49:41 2017<br>
@@ -23,15 +23,12 @@ define i32 @foo() nounwind noinline uwta<br>
; CHECK-LABEL: Ltmp1:<br>
; CHECK-NEXT: bx lr<br>
}<br>
-; CHECK: .p2align 4<br>
-; CHECK-NEXT: .long {{.*}}Lxray_fn_idx_synth_0<br>
-; CHECK-NEXT: .section {{.*}}xray_instr_map{{.*}}<br>
+; CHECK-LABEL: xray_instr_map<br>
; CHECK-LABEL: Lxray_sleds_start0:<br>
; CHECK: .long {{.*}}Lxray_sled_0<br>
; CHECK: .long {{.*}}Lxray_sled_1<br>
; CHECK-LABEL: Lxray_sleds_end0:<br>
-; CHECK: .section {{.*}}xray_fn_idx{{.*}}<br>
-; CHECK-LABEL: Lxray_fn_idx_synth_0:<br>
+; CHECK-LABEL: xray_fn_idx<br>
; CHECK: .long {{.*}}xray_sleds_start0<br>
; CHECK-NEXT: .long {{.*}}xray_sleds_end0<br>
<br>
<br>
Modified: llvm/trunk/test/CodeGen/Mips/<wbr>xray-section-group.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/xray-section-group.ll?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/Mips/xray-section-<wbr>group.ll?rev=311525&r1=311524&<wbr>r2=311525&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/Mips/<wbr>xray-section-group.ll (original)<br>
+++ llvm/trunk/test/CodeGen/Mips/<wbr>xray-section-group.ll Tue Aug 22 21:49:41 2017<br>
@@ -14,7 +14,7 @@<br>
define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-<wbr>always" {<br>
; CHECK: .section .text.foo,"ax",@progbits<br>
ret i32 0<br>
-; CHECK: .section xray_instr_map,"a",@progbits<br>
+; CHECK: .section xray_instr_map,"awo",@<wbr>progbits,.text.foo,unique,1<br>
}<br>
<br>
; CHECK-OBJ: Section {<br>
@@ -24,7 +24,7 @@ $bar = comdat any<br>
define i32 @bar() nounwind noinline uwtable "function-instrument"="xray-<wbr>always" comdat($bar) {<br>
; CHECK: .section .text.bar,"axG",@progbits,bar,<wbr>comdat<br>
ret i32 1<br>
-; CHECK: .section xray_instr_map,"aG",@progbits,<wbr>bar,comdat<br>
+; CHECK: .section xray_instr_map,"aGwo",@<wbr>progbits,bar,comdat,.text.bar,<wbr>unique,2<br>
}<br>
<br>
; CHECK-OBJ: Section {<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/<wbr>xray-attribute-<wbr>instrumentation.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/xray-attribute-instrumentation.ll?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/X86/xray-attribute-<wbr>instrumentation.ll?rev=311525&<wbr>r1=311524&r2=311525&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/<wbr>xray-attribute-<wbr>instrumentation.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/<wbr>xray-attribute-<wbr>instrumentation.ll Tue Aug 22 21:49:41 2017<br>
@@ -1,27 +1,25 @@<br>
; RUN: llc -filetype=asm -o - -mtriple=x86_64-unknown-linux-<wbr>gnu < %s | FileCheck %s<br>
+; RUN: llc -filetype=asm -o - -mtriple=x86_64-unknown-linux-<wbr>gnu \<br>
+; RUN: -relocation-model=pic < %s | FileCheck %s<br>
; RUN: llc -filetype=asm -o - -mtriple=x86_64-darwin-unknown < %s | FileCheck %s<br>
<br>
define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-<wbr>always" {<br>
; CHECK: .p2align 1, 0x90<br>
; CHECK-LABEL: Lxray_sled_0:<br>
-; CHECK-NEXT: .ascii "\353\t"<br>
+; CHECK: .ascii "\353\t"<br>
; CHECK-NEXT: nopw 512(%rax,%rax)<br>
-; CHECK-LABEL: Ltmp0:<br>
ret i32 0<br>
; CHECK: .p2align 1, 0x90<br>
; CHECK-LABEL: Lxray_sled_1:<br>
-; CHECK-NEXT: retq<br>
+; CHECK: retq<br>
; CHECK-NEXT: nopw %cs:512(%rax,%rax)<br>
}<br>
-; CHECK: .p2align 4, 0x90<br>
-; CHECK-NEXT: .quad {{.*}}xray_fn_idx_synth_0<br>
-; CHECK-NEXT: .section {{.*}}xray_instr_map<br>
+; CHECK-LABEL: xray_instr_map<br>
; CHECK-LABEL: Lxray_sleds_start0:<br>
; CHECK: .quad {{.*}}xray_sled_0<br>
; CHECK: .quad {{.*}}xray_sled_1<br>
; CHECK-LABEL: Lxray_sleds_end0:<br>
-; CHECK: .section {{.*}}xray_fn_idx<br>
-; CHECK-LABEL: Lxray_fn_idx_synth_0:<br>
+; CHECK-LABEL: xray_fn_idx<br>
; CHECK: .quad {{.*}}xray_sleds_start0<br>
; CHECK-NEXT: .quad {{.*}}xray_sleds_end0<br>
<br>
@@ -31,9 +29,8 @@ define i32 @foo() nounwind noinline uwta<br>
define i32 @bar(i32 %i) nounwind noinline uwtable "function-instrument"="xray-<wbr>always" {<br>
; CHECK: .p2align 1, 0x90<br>
; CHECK-LABEL: Lxray_sled_2:<br>
-; CHECK-NEXT: .ascii "\353\t"<br>
+; CHECK: .ascii "\353\t"<br>
; CHECK-NEXT: nopw 512(%rax,%rax)<br>
-; CHECK-LABEL: Ltmp1:<br>
Test:<br>
%cond = icmp eq i32 %i, 0<br>
br i1 %cond, label %IsEqual, label %NotEqual<br>
@@ -41,24 +38,21 @@ IsEqual:<br>
ret i32 0<br>
; CHECK: .p2align 1, 0x90<br>
; CHECK-LABEL: Lxray_sled_3:<br>
-; CHECK-NEXT: retq<br>
+; CHECK: retq<br>
; CHECK-NEXT: nopw %cs:512(%rax,%rax)<br>
NotEqual:<br>
ret i32 1<br>
; CHECK: .p2align 1, 0x90<br>
; CHECK-LABEL: Lxray_sled_4:<br>
-; CHECK-NEXT: retq<br>
+; CHECK: retq<br>
; CHECK-NEXT: nopw %cs:512(%rax,%rax)<br>
}<br>
-; CHECK: .p2align 4, 0x90<br>
-; CHECK-NEXT: .quad {{.*}}xray_fn_idx_synth_1<br>
-; CHECK-NEXT: .section {{.*}}xray_instr_map<br>
+; CHECK-LABEL: xray_instr_map<br>
; CHECK-LABEL: Lxray_sleds_start1:<br>
; CHECK: .quad {{.*}}xray_sled_2<br>
; CHECK: .quad {{.*}}xray_sled_3<br>
; CHECK: .quad {{.*}}xray_sled_4<br>
; CHECK-LABEL: Lxray_sleds_end1:<br>
-; CHECK: .section {{.*}}xray_fn_idx<br>
-; CHECK-LABEL: Lxray_fn_idx_synth_1:<br>
+; CHECK-LABEL: xray_fn_idx<br>
; CHECK: .quad {{.*}}xray_sleds_start1<br>
; CHECK-NEXT: .quad {{.*}}xray_sleds_end1<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/<wbr>xray-custom-log.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/xray-custom-log.ll?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/X86/xray-custom-log.<wbr>ll?rev=311525&r1=311524&r2=<wbr>311525&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/<wbr>xray-custom-log.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/<wbr>xray-custom-log.ll Tue Aug 22 21:49:41 2017<br>
@@ -7,16 +7,17 @@ define i32 @fn() nounwind noinline uwtab<br>
%val = load i32, i32* %eventsize<br>
call void @llvm.xray.customevent(i8* %eventptr, i32 %val)<br>
; CHECK-LABEL: Lxray_event_sled_0:<br>
- ; CHECK-NEXT: .ascii "\353\024<br>
- ; CHECK-NEXT: pushq %rax<br>
+ ; CHECK: .byte 0xeb, 0x0f<br>
+ ; CHECK-NEXT: pushq %rdi<br>
; CHECK-NEXT: movq {{.*}}, %rdi<br>
+ ; CHECK-NEXT: pushq %rsi<br>
; CHECK-NEXT: movq {{.*}}, %rsi<br>
- ; CHECK-NEXT: movabsq $__xray_CustomEvent, %rax<br>
- ; CHECK-NEXT: callq *%rax<br>
- ; CHECK-NEXT: popq %rax<br>
+ ; CHECK-NEXT: callq __xray_CustomEvent<br>
+ ; CHECK-NEXT: popq %rsi<br>
+ ; CHECK-NEXT: popq %rdi<br>
ret i32 0<br>
}<br>
-; CHECK: .section {{.*}}xray_instr_map<br>
+; CHECK-LABEL: xray_instr_map<br>
; CHECK-LABEL: Lxray_sleds_start0:<br>
; CHECK: .quad {{.*}}xray_event_sled_0<br>
<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/<wbr>xray-log-args.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/xray-log-args.ll?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/X86/xray-log-args.ll?<wbr>rev=311525&r1=311524&r2=<wbr>311525&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/<wbr>xray-log-args.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/<wbr>xray-log-args.ll Tue Aug 22 21:49:41 2017<br>
@@ -7,29 +7,33 @@ define i32 @callee(i32 %arg) nounwind no<br>
ret i32 %arg<br>
}<br>
; CHECK-LABEL: Lxray_sleds_start0:<br>
-; CHECK: .quad {{\.?}}Lxray_sled_0<br>
-; CHECK: .quad {{_?}}callee<br>
-; CHECK: .byte 3<br>
-; CHECK: .byte 1<br>
-; CHECK: .{{(zero|space)}} 14<br>
-; CHECK: .quad {{\.?}}Lxray_sled_1<br>
-; CHECK: .quad {{_?}}callee<br>
-; CHECK: .byte 1<br>
-; CHECK: .byte 1<br>
-; CHECK: .{{(zero|space)}} 14<br>
+; CHECK: .quad {{\.?}}Lxray_sled_0<br>
+; CHECK: .quad {{_?}}callee<br>
+; CHECK: .byte 0x03<br>
+; CHECK: .byte 0x01<br>
+; CHECK: .byte 0x00<br>
+; CHECK: .{{(zero|space)}} 13<br>
+; CHECK: .quad {{\.?}}Lxray_sled_1<br>
+; CHECK: .quad {{_?}}callee<br>
+; CHECK: .byte 0x01<br>
+; CHECK: .byte 0x01<br>
+; CHECK: .byte 0x00<br>
+; CHECK: .{{(zero|space)}} 13<br>
<br>
define i32 @caller(i32 %arg) nounwind noinline uwtable "function-instrument"="xray-<wbr>always" "xray-log-args"="1" {<br>
%retval = tail call i32 @callee(i32 %arg)<br>
ret i32 %retval<br>
}<br>
; CHECK-LABEL: Lxray_sleds_start1:<br>
-; CHECK: .quad {{\.?}}Lxray_sled_2<br>
-; CHECK: .quad {{_?}}caller<br>
-; CHECK: .byte 3<br>
-; CHECK: .byte 1<br>
-; CHECK: .{{(zero|space)}} 14<br>
-; CHECK: .quad {{\.?}}Lxray_sled_3<br>
-; CHECK: .quad {{_?}}caller<br>
-; CHECK: .byte 2<br>
-; CHECK: .byte 1<br>
-; CHECK: .{{(zero|space)}} 14<br>
+; CHECK: .quad {{\.?}}Lxray_sled_2<br>
+; CHECK: .quad {{_?}}caller<br>
+; CHECK: .byte 0x03<br>
+; CHECK: .byte 0x01<br>
+; CHECK: .byte 0x00<br>
+; CHECK: .{{(zero|space)}} 13<br>
+; CHECK: .quad {{\.?}}Lxray_sled_3<br>
+; CHECK: .quad {{_?}}caller<br>
+; CHECK: .byte 0x02<br>
+; CHECK: .byte 0x01<br>
+; CHECK: .byte 0x00<br>
+; CHECK: .{{(zero|space)}} 13<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/<wbr>xray-loop-detection.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/xray-loop-detection.ll?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/X86/xray-loop-<wbr>detection.ll?rev=311525&r1=<wbr>311524&r2=311525&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/<wbr>xray-loop-detection.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/<wbr>xray-loop-detection.ll Tue Aug 22 21:49:41 2017<br>
@@ -19,5 +19,4 @@ Exit:<br>
; CHECK-LABEL: xray_sled_0:<br>
; CHECK-NEXT: .ascii "\353\t"<br>
; CHECK-NEXT: nopw 512(%rax,%rax)<br>
-; CHECK-LABEL: Ltmp0:<br>
<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/<wbr>xray-section-group.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/xray-section-group.ll?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/X86/xray-section-<wbr>group.ll?rev=311525&r1=311524&<wbr>r2=311525&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/<wbr>xray-section-group.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/<wbr>xray-section-group.ll Tue Aug 22 21:49:41 2017<br>
@@ -5,14 +5,14 @@<br>
define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-<wbr>always" {<br>
; CHECK: .section .text.foo,"ax",@progbits<br>
ret i32 0<br>
-; CHECK: .section xray_instr_map,"a",@progbits<br>
+; CHECK: .section xray_instr_map,"awo",@<wbr>progbits,.text.foo,unique,1<br>
}<br>
<br>
$bar = comdat any<br>
define i32 @bar() nounwind noinline uwtable "function-instrument"="xray-<wbr>always" comdat($bar) {<br>
; CHECK: .section .text.bar,"axG",@progbits,bar,<wbr>comdat<br>
ret i32 1<br>
-; CHECK: .section xray_instr_map,"aG",@progbits,<wbr>bar,comdat<br>
+; CHECK: .section xray_instr_map,"aGwo",@<wbr>progbits,bar,comdat,.text.bar,<wbr>unique,2<br>
}<br>
<br>
; CHECK-OBJ: section xray_instr_map:<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/<wbr>xray-tail-call-sled.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/xray-tail-call-sled.ll?rev=311525&r1=311524&r2=311525&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/X86/xray-tail-call-<wbr>sled.ll?rev=311525&r1=311524&<wbr>r2=311525&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/<wbr>xray-tail-call-sled.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/<wbr>xray-tail-call-sled.ll Tue Aug 22 21:49:41 2017<br>
@@ -4,49 +4,41 @@<br>
define i32 @callee() nounwind noinline uwtable "function-instrument"="xray-<wbr>always" {<br>
; CHECK: .p2align 1, 0x90<br>
; CHECK-LABEL: Lxray_sled_0:<br>
-; CHECK-NEXT: .ascii "\353\t"<br>
+; CHECK: .ascii "\353\t"<br>
; CHECK-NEXT: nopw 512(%rax,%rax)<br>
-; CHECK-LABEL: Ltmp0:<br>
ret i32 0<br>
; CHECK: .p2align 1, 0x90<br>
; CHECK-LABEL: Lxray_sled_1:<br>
-; CHECK-NEXT: retq<br>
+; CHECK: retq<br>
; CHECK-NEXT: nopw %cs:512(%rax,%rax)<br>
}<br>
-; CHECK: .p2align 4, 0x90<br>
-; CHECK-NEXT: .quad {{.*}}xray_fn_idx_synth_0{{.*}<wbr>}<br>
-; CHECK-NEXT: .section {{.*}}xray_instr_map<br>
+; CHECK-LABEL: xray_instr_map<br>
; CHECK-LABEL: Lxray_sleds_start0:<br>
; CHECK: .quad {{.*}}xray_sled_0<br>
; CHECK: .quad {{.*}}xray_sled_1<br>
; CHECK-LABEL: Lxray_sleds_end0:<br>
-; CHECK-NEXT: .section {{.*}}xray_fn_idx<br>
-; CHECK-LABEL: Lxray_fn_idx_synth_0:<br>
+; CHECK-LABEL: xray_fn_idx<br>
; CHECK: .quad {{.*}}xray_sleds_start0<br>
; CHECK-NEXT: .quad {{.*}}xray_sleds_end0<br>
<br>
define i32 @caller() nounwind noinline uwtable "function-instrument"="xray-<wbr>always" {<br>
; CHECK: .p2align 1, 0x90<br>
; CHECK-LABEL: Lxray_sled_2:<br>
-; CHECK-NEXT: .ascii "\353\t"<br>
+; CHECK: .ascii "\353\t"<br>
; CHECK-NEXT: nopw 512(%rax,%rax)<br>
-; CHECK-LABEL: Ltmp1:<br>
; CHECK: .p2align 1, 0x90<br>
; CHECK-LABEL: Lxray_sled_3:<br>
; CHECK-NEXT: .ascii "\353\t"<br>
; CHECK-NEXT: nopw 512(%rax,%rax)<br>
-; CHECK-LABEL: Ltmp2:<br>
%retval = tail call i32 @callee()<br>
; CHECK: jmp {{.*}}callee {{.*}}# TAILCALL<br>
ret i32 %retval<br>
}<br>
-; CHECK: .p2align 4, 0x90<br>
-; CHECK-NEXT: .quad {{.*}}xray_fn_idx_synth_1{{.*}<wbr>}<br>
+; CHECK-LABEL: xray_instr_map<br>
; CHECK-LABEL: Lxray_sleds_start1:<br>
; CHECK: .quad {{.*}}xray_sled_2<br>
; CHECK: .quad {{.*}}xray_sled_3<br>
; CHECK-LABEL: Lxray_sleds_end1:<br>
-; CHECK: .section {{.*}}xray_fn_idx<br>
-; CHECK-LABEL: Lxray_fn_idx_synth_1:<br>
+; CHECK-LABEL: xray_fn_idx<br>
; CHECK: .quad {{.*}}xray_sleds_start1<br>
; CHECK: .quad {{.*}}xray_sleds_end1<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>