[llvm] r351998 - Revert "[mips] Handle MipsMCExpr sub-expression for the MEK_DTPREL tag"

Amara Emerson via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 23 16:24:59 PST 2019


Author: aemerson
Date: Wed Jan 23 16:24:59 2019
New Revision: 351998

URL: http://llvm.org/viewvc/llvm-project?rev=351998&view=rev
Log:
Revert "[mips] Handle MipsMCExpr sub-expression for the MEK_DTPREL tag"

This reverts commit r351987 as it broke some bots.

Modified:
    llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
    llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp
    llvm/trunk/test/DebugInfo/Mips/dwarfdump-tls.ll

Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp?rev=351998&r1=351997&r2=351998&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp Wed Jan 23 16:24:59 2019
@@ -613,9 +613,8 @@ getExprOpValue(const MCExpr *Expr, Small
       llvm_unreachable("Unhandled fixup kind!");
       break;
     case MipsMCExpr::MEK_DTPREL:
-      // MEK_DTPREL is used for marking TLS DIEExpr only
-      // and contains a regular sub-expression.
-      return getExprOpValue(MipsExpr->getSubExpr(), Fixups, STI);
+      llvm_unreachable("MEK_DTPREL is used for TLS DIEExpr only");
+      break;
     case MipsMCExpr::MEK_CALL_HI16:
       FixupKind = Mips::fixup_Mips_CALL_HI16;
       break;

Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp?rev=351998&r1=351997&r2=351998&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp Wed Jan 23 16:24:59 2019
@@ -43,10 +43,8 @@ void MipsMCExpr::printImpl(raw_ostream &
     llvm_unreachable("MEK_None and MEK_Special are invalid");
     break;
   case MEK_DTPREL:
-    // MEK_DTPREL is used for marking TLS DIEExpr only
-    // and contains a regular sub-expression.
-    getSubExpr()->print(OS, MAI, true);
-    return;
+    llvm_unreachable("MEK_DTPREL is used for TLS DIEExpr only");
+    break;
   case MEK_CALL_HI16:
     OS << "%call_hi";
     break;
@@ -162,9 +160,7 @@ MipsMCExpr::evaluateAsRelocatableImpl(MC
     case MEK_Special:
       llvm_unreachable("MEK_None and MEK_Special are invalid");
     case MEK_DTPREL:
-      // MEK_DTPREL is used for marking TLS DIEExpr only
-      // and contains a regular sub-expression.
-      return getSubExpr()->evaluateAsRelocatable(Res, Layout, Fixup);
+      llvm_unreachable("MEK_DTPREL is used for TLS DIEExpr only");
     case MEK_DTPREL_HI:
     case MEK_DTPREL_LO:
     case MEK_GOT:
@@ -252,6 +248,9 @@ void MipsMCExpr::fixELFSymbolsInTLSFixup
   case MEK_Special:
     llvm_unreachable("MEK_None and MEK_Special are invalid");
     break;
+  case MEK_DTPREL:
+    llvm_unreachable("MEK_DTPREL is used for TLS DIEExpr only");
+    break;
   case MEK_CALL_HI16:
   case MEK_CALL_LO16:
   case MEK_GOT:
@@ -274,7 +273,6 @@ void MipsMCExpr::fixELFSymbolsInTLSFixup
     if (const MipsMCExpr *E = dyn_cast<const MipsMCExpr>(getSubExpr()))
       E->fixELFSymbolsInTLSFixups(Asm);
     break;
-  case MEK_DTPREL:
   case MEK_DTPREL_HI:
   case MEK_DTPREL_LO:
   case MEK_TLSLDM:

Modified: llvm/trunk/test/DebugInfo/Mips/dwarfdump-tls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Mips/dwarfdump-tls.ll?rev=351998&r1=351997&r2=351998&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Mips/dwarfdump-tls.ll (original)
+++ llvm/trunk/test/DebugInfo/Mips/dwarfdump-tls.ll Wed Jan 23 16:24:59 2019
@@ -1,34 +1,12 @@
-; RUN: llc -O0 -march=mips -mcpu=mips32r2 -filetype=obj \
-; RUN:     -split-dwarf-file=foo.dwo -o=%t-32.o < %s
+; RUN: llc -O0 -march=mips -mcpu=mips32r2 -filetype=obj -o=%t-32.o < %s
 ; RUN: llvm-dwarfdump %t-32.o 2>&1 | FileCheck %s
-; RUN: llc -O0 -march=mips64 -mcpu=mips64r2 -filetype=obj \
-; RUN:     -split-dwarf-file=foo.dwo -o=%t-64.o < %s
+; RUN: llc -O0 -march=mips64 -mcpu=mips64r2 -filetype=obj -o=%t-64.o < %s
 ; RUN: llvm-dwarfdump %t-64.o 2>&1 | FileCheck %s
 
-; RUN: llc -O0 -march=mips -mcpu=mips32r2 -filetype=asm \
-; RUN:     -split-dwarf-file=foo.dwo < %s | FileCheck -check-prefix=ASM32 %s
-; RUN: llc -O0 -march=mips64 -mcpu=mips64r2 -filetype=asm \
-; RUN:     -split-dwarf-file=foo.dwo < %s | FileCheck -check-prefix=ASM64 %s
-
 @x = thread_local global i32 5, align 4, !dbg !0
 
 ; CHECK-NOT: error: failed to compute relocation: R_MIPS_TLS_DTPREL
 
-; CHECK:      DW_AT_name      ("x")
-; CHECK-NEXT: DW_AT_type      (0x00000025 "int")
-; CHECK-NEXT: DW_AT_external  (true)
-; CHECK-NEXT: DW_AT_decl_file (0x01)
-; CHECK-NEXT: DW_AT_decl_line (1)
-; CHECK-NEXT: DW_AT_location  (DW_OP_GNU_const_index 0x0, DW_OP_GNU_push_tls_address)
-
-; ASM32:              .section        .debug_addr
-; ASM32-NEXT: $addr_table_base0:
-; ASM32-NEXT:         .4byte  x+32768
-
-; ASM64:              .section        .debug_addr
-; ASM64-NEXT: .Laddr_table_base0:
-; ASM64-NEXT:         .8byte  x+32768
-
 !llvm.dbg.cu = !{!2}
 !llvm.module.flags = !{!7, !8}
 




More information about the llvm-commits mailing list