<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">If it's only used for TLS, we could give it a name that also refers to TLS to avoid confusion.<div class=""><br class=""></div><div class="">-- adrian<br class=""><div><blockquote type="cite" class=""><div class="">On Feb 8, 2017, at 9:34 AM, Petar Jovanovic <<a href="mailto:Petar.Jovanovic@imgtec.com" class="">Petar.Jovanovic@imgtec.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; direction: ltr; font-family: 'Times New Roman'; font-size: 12pt;" class=""><div class="">AFAICS, DIEExpr seems to be used for TLS values only today. So, if <span style="font-size: 12pt;" class="">someone decides to use it for different purposes, then this code may </span><span style="font-size: 12pt;" class="">need to be specialized.</span></div><div class="">As of the naming issue, the function that does the same thing in GCC <span style="font-size: 12pt;" class="">is called 'output_dwarf_dtprel'.</span></div><div class=""><br class=""></div><div style="font-family: 'Times New Roman'; font-size: 16px;" class=""><hr tabindex="-1" class=""><div id="divRpF37088" style="direction: ltr;" class=""><font face="Tahoma" size="2" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>David Blaikie [<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>]<br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Wednesday, February 08, 2017 5:36 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Simon Dardis; Petar Jovanovic; <a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>; Eric Christopher; Adrian Prantl; Aleksandar Beserminji<br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [llvm] r292624 - [mips] Fix debug information for __thread variable<br class=""></font><br class=""></div><div class=""></div><div class=""><div dir="ltr" class="">Is it used/usable for all values? I'm not entirely sure. The call looks pretty unconditional in a fairly generic place.<br class=""><br class="">The implementation looks to me like it only produces TLs values in <span style="color: rgb(33, 33, 33);" class="">MipsAsmPrinter::EmitDebugValue - maybe I'm misreading it? (the "DTP" bit in the calls inside the implementation sound thread-ish to me (also going off what the test case tests for, etc) even though I don't actually know what that acronym stands for)</span></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Feb 8, 2017 at 8:25 AM Simon Dardis <<a href="mailto:Simon.Dardis@imgtec.com" target="_blank" class="">Simon.Dardis@imgtec.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_msg"><div class="gmail_msg" style="direction: ltr; font-family: Tahoma; font-size: 10pt;"><div class="gmail_msg">+CCing original author.</div><div class="gmail_msg"><br class="gmail_msg"></div>When I reviewed the patch, it appeared to me that it was far too target specific to call the<div class="gmail_msg">change to the ASMPrinter EmitDebugThreadLocal because as far as I could see, no other</div><div class="gmail_msg">target required such directives.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Perhaps changing it to EmitTargetDebugValue along with updating the comment to reflect</div><div class="gmail_msg">that some targets have additional requirements for debug information?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Thanks,</div><div class="gmail_msg">Simon  <br class="gmail_msg"><div class="gmail_msg" style="font-family: 'Times New Roman'; font-size: 16px;"><hr class="gmail_msg"><div id="m_-4233283595468713949divRpF808567" class="gmail_msg" style="direction: ltr;"><font face="Tahoma" size="2" class="gmail_msg"><b class="gmail_msg">From:</b><span class="Apple-converted-space"> </span>David Blaikie [<a href="mailto:dblaikie@gmail.com" class="gmail_msg" target="_blank">dblaikie@gmail.com</a>]<br class="gmail_msg"><b class="gmail_msg">Sent:</b><span class="Apple-converted-space"> </span>08 February 2017 16:12<br class="gmail_msg"><b class="gmail_msg">To:</b><span class="Apple-converted-space"> </span>Petar Jovanovic;<span class="Apple-converted-space"> </span><a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a>; Eric Christopher; Adrian Prantl; Simon Dardis</font></div></div></div></div></div><div class="gmail_msg"><div class="gmail_msg" style="direction: ltr; font-family: Tahoma; font-size: 10pt;"><div class="gmail_msg"><div class="gmail_msg" style="font-family: 'Times New Roman'; font-size: 16px;"><div id="m_-4233283595468713949divRpF808567" class="gmail_msg" style="direction: ltr;"><font face="Tahoma" size="2" class="gmail_msg"><br class="gmail_msg"><b class="gmail_msg">Subject:</b><span class="Apple-converted-space"> </span>Re: [llvm] r292624 - [mips] Fix debug information for __thread variable<br class="gmail_msg"></font></div></div></div></div></div><div class="gmail_msg"><div class="gmail_msg" style="direction: ltr; font-family: Tahoma; font-size: 10pt;"><div class="gmail_msg"><div class="gmail_msg" style="font-family: 'Times New Roman'; font-size: 16px;"><div class="gmail_msg"></div><div class="gmail_msg"><div dir="ltr" class="gmail_msg">Simon: What's the motivation for that name, given the specific role the function appears to have (at least according to the doc comment)?<br class="gmail_msg"><br class="gmail_msg">Others (Adrian, mostly): Ideas/preferences?<br class="gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Wed, Feb 8, 2017 at 7:05 AM Petar Jovanovic <<a href="mailto:Petar.Jovanovic@imgtec.com" class="gmail_msg" target="_blank">Petar.Jovanovic@imgtec.com</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_msg"><div class="gmail_msg" style="direction: ltr; font-family: 'Times New Roman'; font-size: 12pt;"><div class="gmail_msg"><i class="gmail_msg">><span class="Apple-converted-space"> </span><span class="gmail_msg" style="font-size: 12pt;">Seems the 'EmitDebugValue' should probably have some mention of 'Thread' in it, given the comment describes this as specifically for thread locals?</span></i></div></div></div><div class="gmail_msg"><div class="gmail_msg" style="direction: ltr; font-family: 'Times New Roman'; font-size: 12pt;"><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I<span class="gmail_msg" style="font-size: 12pt;">n the original change (see [1]), this was named EmitDebugThreadLocal, </span><span class="gmail_msg" style="font-size: 12pt;">but one of the reviewers requested this to be renamed to EmitDebugValue.</span></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">[1]<span class="Apple-converted-space"> </span><a href="https://reviews.llvm.org/D28770?id=84545#inline-249536" class="gmail_msg" target="_blank">https://reviews.llvm.org/D28770?id=84545#inline-249536</a></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg" style="font-family: 'Times New Roman'; font-size: 16px;"><hr class="gmail_msg"><div id="m_-4233283595468713949m_-7580947159271247324divRpF788222" class="gmail_msg" style="direction: ltr;"><font face="Tahoma" size="2" class="gmail_msg"><b class="gmail_msg">From:</b><span class="Apple-converted-space"> </span>David Blaikie [<a href="mailto:dblaikie@gmail.com" class="gmail_msg" target="_blank">dblaikie@gmail.com</a>]<br class="gmail_msg"><b class="gmail_msg">Sent:</b><span class="Apple-converted-space"> </span>Monday, February 06, 2017 9:54 PM<br class="gmail_msg"><b class="gmail_msg">To:</b><span class="Apple-converted-space"> </span>Petar Jovanovic;<span class="Apple-converted-space"> </span><a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a>; Eric Christopher; Adrian Prantl<br class="gmail_msg"><b class="gmail_msg">Subject:</b><span class="Apple-converted-space"> </span>Re: [llvm] r292624 - [mips] Fix debug information for __thread variable<br class="gmail_msg"></font><br class="gmail_msg"></div></div></div></div></div><div class="gmail_msg"><div class="gmail_msg" style="direction: ltr; font-family: 'Times New Roman'; font-size: 12pt;"><div class="gmail_msg"><div class="gmail_msg" style="font-family: 'Times New Roman'; font-size: 16px;"><div class="gmail_msg"></div><div class="gmail_msg"><div dir="ltr" class="gmail_msg">Seems the 'EmitDebugValue' should probably have some mention of 'Thread' in it, given the comment describes this as specifically for thread locals?<br class="gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Fri, Jan 20, 2017 at 10:04 AM Petar Jovanovic via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">Author: petarj<br class="gmail_msg">Date: Fri Jan 20 11:53:30 2017<br class="gmail_msg">New Revision: 292624<br class="gmail_msg"><br class="gmail_msg">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=292624&view=rev" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=292624&view=rev</a><br class="gmail_msg">Log:<br class="gmail_msg">[mips] Fix debug information for __thread variable<br class="gmail_msg"><br class="gmail_msg">This patch fixes debug information for __thread variable on Mips<br class="gmail_msg">using .dtprelword and .dtpreldword directives.<br class="gmail_msg"><br class="gmail_msg">Patch by Aleksandar Beserminji.<br class="gmail_msg"><br class="gmail_msg">Differential Revision:<span class="Apple-converted-space"> </span><a href="http://reviews.llvm.org/D28770" rel="noreferrer" class="gmail_msg" target="_blank">http://reviews.llvm.org/D28770</a><br class="gmail_msg"><br class="gmail_msg">Added:<br class="gmail_msg">    llvm/trunk/test/DebugInfo/Mips/tls.ll<br class="gmail_msg">Modified:<br class="gmail_msg">    llvm/trunk/include/llvm/CodeGen/AsmPrinter.h<br class="gmail_msg">    llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br class="gmail_msg">    llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp<br class="gmail_msg">    llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp<br class="gmail_msg">    llvm/trunk/lib/Target/Mips/MipsAsmPrinter.h<br class="gmail_msg">    llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp<br class="gmail_msg">    llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h<br class="gmail_msg"><br class="gmail_msg">Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h<br class="gmail_msg">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=292624&r1=292623&r2=292624&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=292624&r1=292623&r2=292624&view=diff</a><br class="gmail_msg">==============================================================================<br class="gmail_msg">--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)<br class="gmail_msg">+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Fri Jan 20 11:53:30 2017<br class="gmail_msg">@@ -480,6 +480,12 @@ public:<br class="gmail_msg">   /// Get the value for DW_AT_APPLE_isa. Zero if no isa encoding specified.<br class="gmail_msg">   virtual unsigned getISAEncoding() { return 0; }<br class="gmail_msg"><br class="gmail_msg">+  /// Emit the directive and value for debug thread local expression<br class="gmail_msg">+  ///<br class="gmail_msg">+  /// \p Value - The value to emit.<br class="gmail_msg">+  /// \p Size - The size of the integer (in bytes) to emit.<br class="gmail_msg">+  virtual void EmitDebugValue(const MCExpr *Value, unsigned Size) const;<br class="gmail_msg">+<br class="gmail_msg">   //===------------------------------------------------------------------===//<br class="gmail_msg">   // Dwarf Lowering Routines<br class="gmail_msg">   //===------------------------------------------------------------------===//<br class="gmail_msg"><br class="gmail_msg">Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br class="gmail_msg">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=292624&r1=292623&r2=292624&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=292624&r1=292623&r2=292624&view=diff</a><br class="gmail_msg">==============================================================================<br class="gmail_msg">--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)<br class="gmail_msg">+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Fri Jan 20 11:53:30 2017<br class="gmail_msg">@@ -567,6 +567,15 @@ void AsmPrinter::EmitGlobalVariable(cons<br class="gmail_msg">   OutStreamer->AddBlankLine();<br class="gmail_msg"> }<br class="gmail_msg"><br class="gmail_msg">+/// Emit the directive and value for debug thread local expression<br class="gmail_msg">+///<br class="gmail_msg">+/// \p Value - The value to emit.<br class="gmail_msg">+/// \p Size - The size of the integer (in bytes) to emit.<br class="gmail_msg">+void AsmPrinter::EmitDebugValue(const MCExpr *Value,<br class="gmail_msg">+                                      unsigned Size) const {<br class="gmail_msg">+  OutStreamer->EmitValue(Value, Size);<br class="gmail_msg">+}<br class="gmail_msg">+<br class="gmail_msg"> /// EmitFunctionHeader - This method emits the header for the current<br class="gmail_msg"> /// function.<br class="gmail_msg"> void AsmPrinter::EmitFunctionHeader() {<br class="gmail_msg"><br class="gmail_msg">Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp<br class="gmail_msg">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp?rev=292624&r1=292623&r2=292624&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp?rev=292624&r1=292623&r2=292624&view=diff</a><br class="gmail_msg">==============================================================================<br class="gmail_msg">--- llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp (original)<br class="gmail_msg">+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp Fri Jan 20 11:53:30 2017<br class="gmail_msg">@@ -484,7 +484,7 @@ void DIEInteger::print(raw_ostream &O) c<br class="gmail_msg"> /// EmitValue - Emit expression value.<br class="gmail_msg"> ///<br class="gmail_msg"> void DIEExpr::EmitValue(const AsmPrinter *AP, dwarf::Form Form) const {<br class="gmail_msg">-  AP->OutStreamer->EmitValue(Expr, SizeOf(AP, Form));<br class="gmail_msg">+  AP->EmitDebugValue(Expr, SizeOf(AP, Form));<br class="gmail_msg"> }<br class="gmail_msg"><br class="gmail_msg"> /// SizeOf - Determine size of expression value in bytes.<br class="gmail_msg"><br class="gmail_msg">Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp<br class="gmail_msg">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=292624&r1=292623&r2=292624&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=292624&r1=292623&r2=292624&view=diff</a><br class="gmail_msg">==============================================================================<br class="gmail_msg">--- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp (original)<br class="gmail_msg">+++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp Fri Jan 20 11:53:30 2017<br class="gmail_msg">@@ -1037,6 +1037,22 @@ void MipsAsmPrinter::PrintDebugValueComm<br class="gmail_msg">   // TODO: implement<br class="gmail_msg"> }<br class="gmail_msg"><br class="gmail_msg">+// Emit .dtprelword or .dtpreldword directive<br class="gmail_msg">+// and value for debug thread local expression.<br class="gmail_msg">+void MipsAsmPrinter::EmitDebugValue(const MCExpr *Value,<br class="gmail_msg">+                                          unsigned Size) const {<br class="gmail_msg">+  switch (Size) {<br class="gmail_msg">+  case 4:<br class="gmail_msg">+    OutStreamer->EmitDTPRel32Value(Value);<br class="gmail_msg">+    break;<br class="gmail_msg">+  case 8:<br class="gmail_msg">+    OutStreamer->EmitDTPRel64Value(Value);<br class="gmail_msg">+    break;<br class="gmail_msg">+  default:<br class="gmail_msg">+    llvm_unreachable("Unexpected size of expression value.");<br class="gmail_msg">+  }<br class="gmail_msg">+}<br class="gmail_msg">+<br class="gmail_msg"> // Align all targets of indirect branches on bundle size.  Used only if target<br class="gmail_msg"> // is NaCl.<br class="gmail_msg"> void MipsAsmPrinter::NaClAlignIndirectJumpTargets(MachineFunction &MF) {<br class="gmail_msg"><br class="gmail_msg">Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.h<br class="gmail_msg">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.h?rev=292624&r1=292623&r2=292624&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.h?rev=292624&r1=292623&r2=292624&view=diff</a><br class="gmail_msg">==============================================================================<br class="gmail_msg">--- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.h (original)<br class="gmail_msg">+++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.h Fri Jan 20 11:53:30 2017<br class="gmail_msg">@@ -140,6 +140,7 @@ public:<br class="gmail_msg">   void EmitStartOfAsmFile(Module &M) override;<br class="gmail_msg">   void EmitEndOfAsmFile(Module &M) override;<br class="gmail_msg">   void PrintDebugValueComment(const MachineInstr *MI, raw_ostream &OS);<br class="gmail_msg">+  void EmitDebugValue(const MCExpr *Value, unsigned Size) const override;<br class="gmail_msg"> };<br class="gmail_msg"> }<br class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg">Modified: llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp<br class="gmail_msg">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp?rev=292624&r1=292623&r2=292624&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp?rev=292624&r1=292623&r2=292624&view=diff</a><br class="gmail_msg">==============================================================================<br class="gmail_msg">--- llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp (original)<br class="gmail_msg">+++ llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp Fri Jan 20 11:53:30 2017<br class="gmail_msg">@@ -148,3 +148,11 @@ MCSection *MipsTargetObjectFile::getSect<br class="gmail_msg">   // Otherwise, we work the same as ELF.<br class="gmail_msg">   return TargetLoweringObjectFileELF::getSectionForConstant(DL, Kind, C, Align);<br class="gmail_msg"> }<br class="gmail_msg">+<br class="gmail_msg">+const MCExpr *<br class="gmail_msg">+MipsTargetObjectFile::getDebugThreadLocalSymbol(const MCSymbol *Sym) const {<br class="gmail_msg">+  const MCExpr *Expr =<br class="gmail_msg">+      MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, getContext());<br class="gmail_msg">+  return MCBinaryExpr::createAdd(<br class="gmail_msg">+      Expr, MCConstantExpr::create(0x8000, getContext()), getContext());<br class="gmail_msg">+}<br class="gmail_msg"><br class="gmail_msg">Modified: llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h<br class="gmail_msg">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h?rev=292624&r1=292623&r2=292624&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h?rev=292624&r1=292623&r2=292624&view=diff</a><br class="gmail_msg">==============================================================================<br class="gmail_msg">--- llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h (original)<br class="gmail_msg">+++ llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h Fri Jan 20 11:53:30 2017<br class="gmail_msg">@@ -42,6 +42,8 @@ class MipsTargetMachine;<br class="gmail_msg">     MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind,<br class="gmail_msg">                                      const Constant *C,<br class="gmail_msg">                                      unsigned &Align) const override;<br class="gmail_msg">+    /// Describe a TLS variable address within debug info.<br class="gmail_msg">+    const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;<br class="gmail_msg">   };<br class="gmail_msg"> } // end namespace llvm<br class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg">Added: llvm/trunk/test/DebugInfo/Mips/tls.ll<br class="gmail_msg">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Mips/tls.ll?rev=292624&view=auto" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Mips/tls.ll?rev=292624&view=auto</a><br class="gmail_msg">==============================================================================<br class="gmail_msg">--- llvm/trunk/test/DebugInfo/Mips/tls.ll (added)<br class="gmail_msg">+++ llvm/trunk/test/DebugInfo/Mips/tls.ll Fri Jan 20 11:53:30 2017<br class="gmail_msg">@@ -0,0 +1,22 @@<br class="gmail_msg">+; RUN: llc -O0 -march=mips -mcpu=mips32r2 -filetype=asm < %s | FileCheck %s -check-prefix=CHECK-WORD<br class="gmail_msg">+; RUN: llc -O0 -march=mips64 -mcpu=mips64r2 -filetype=asm < %s | FileCheck %s -check-prefix=CHECK-DWORD<br class="gmail_msg">+<br class="gmail_msg">+@x = thread_local global i32 5, align 4, !dbg !0<br class="gmail_msg">+<br class="gmail_msg">+; CHECK-WORD: .dtprelword x+32768<br class="gmail_msg">+; CHECK-DWORD: .dtpreldword x+32768<br class="gmail_msg">+<br class="gmail_msg">+!<a href="http://llvm.dbg.cu/" rel="noreferrer" class="gmail_msg" target="_blank">llvm.dbg.cu</a><span class="Apple-converted-space"> </span>= !{!2}<br class="gmail_msg">+!llvm.module.flags = !{!7, !8}<br class="gmail_msg">+!llvm.ident = !{!9}<br class="gmail_msg">+<br class="gmail_msg">+!0 = !DIGlobalVariableExpression(var: !1)<br class="gmail_msg">+!1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)<br class="gmail_msg">+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 4.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)<br class="gmail_msg">+!3 = !DIFile(filename: "tls.c", directory: "/tmp")<br class="gmail_msg">+!4 = !{}<br class="gmail_msg">+!5 = !{!0}<br class="gmail_msg">+!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)<br class="gmail_msg">+!7 = !{i32 2, !"Dwarf Version", i32 4}<br class="gmail_msg">+!8 = !{i32 2, !"Debug Info Version", i32 3}<br class="gmail_msg">+!9 = !{!"clang version 4.0.0"}<br class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg">_______________________________________________<br class="gmail_msg">llvm-commits mailing list<br class="gmail_msg"><a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg"><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a></blockquote></div></div></div></div></div></div></div></blockquote></div></div></div></div></div></div></div></blockquote></div></div></div></div></div></blockquote></div><br class=""></div></body></html>