Remove support for parsing the "type i32" syntax for defining a numbered
authorChris Lattner <sabre@nondot.org>
Sun, 19 Jun 2011 00:03:46 +0000 (00:03 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 19 Jun 2011 00:03:46 +0000 (00:03 +0000)
top level type without a specified number.  This syntax isn't documented
and blocks forward progress.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133371 91177308-0d34-0410-b5e6-96231b3b80d8

30 files changed:
lib/AsmParser/LLParser.cpp
test/Analysis/ScalarEvolution/avoid-infinite-recursion-1.ll
test/Analysis/ScalarEvolution/pr3909.ll
test/Assembler/2002-04-04-PureVirtMethCall.ll [deleted file]
test/Assembler/2002-04-04-PureVirtMethCall2.ll [deleted file]
test/Assembler/2009-02-28-CastOpc.ll
test/Bitcode/metadata-2.ll
test/CodeGen/Blackfin/add-overflow.ll
test/CodeGen/Blackfin/many-args.ll
test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll
test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll
test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll
test/CodeGen/X86/2009-04-09-InlineAsmCrash.ll [deleted file]
test/CodeGen/X86/2009-04-12-FastIselOverflowCrash.ll
test/CodeGen/X86/2009-04-13-2AddrAssert-2.ll
test/CodeGen/X86/2009-04-29-RegAllocAssert.ll
test/CodeGen/X86/2009-06-04-VirtualLiveIn.ll
test/CodeGen/X86/2009-08-14-Win64MemoryIndirectArg.ll
test/CodeGen/X86/2009-09-19-earlyclobber.ll
test/CodeGen/X86/coalescer-cross.ll
test/CodeGen/X86/fast-isel-bail.ll
test/CodeGen/X86/fold-sext-trunc.ll
test/CodeGen/X86/inline-asm-q-regs.ll
test/Feature/forwardreftest.ll
test/Feature/opaquetypes.ll
test/Feature/testtype.ll
test/Feature/weak_constant.ll
test/Integer/opaquetypes_bt.ll [deleted file]
test/Transforms/ScalarRepl/2009-03-05-Aggre2Scalar-dbg.ll
test/Transforms/ScalarRepl/crash.ll

index 28ee499662ac06ef7a9e6e3ed64489271eb51d8c..7b7e785547e5efcf36d5e253913e608604749d23 100644 (file)
@@ -170,7 +170,6 @@ bool LLParser::ParseTopLevelEntities() {
     case lltok::kw_module:  if (ParseModuleAsm()) return true; break;
     case lltok::kw_target:  if (ParseTargetDefinition()) return true; break;
     case lltok::kw_deplibs: if (ParseDepLibs()) return true; break;
-    case lltok::kw_type:    if (ParseUnnamedType()) return true; break;
     case lltok::LocalVarID: if (ParseUnnamedType()) return true; break;
     case lltok::LocalVar:   if (ParseNamedType()) return true; break;
     case lltok::GlobalID:   if (ParseUnnamedGlobal()) return true; break;
@@ -291,24 +290,18 @@ bool LLParser::ParseDepLibs() {
 }
 
 /// ParseUnnamedType:
-///   ::= 'type' type
 ///   ::= LocalVarID '=' 'type' type
 bool LLParser::ParseUnnamedType() {
+  LocTy TypeLoc = Lex.getLoc();
   unsigned TypeID = NumberedTypes.size();
+  if (Lex.getUIntVal() != TypeID)
+    return Error(Lex.getLoc(), "type expected to be numbered '%" +
+                 Twine(TypeID) + "'");
+  Lex.Lex(); // eat LocalVarID;
 
-  // Handle the LocalVarID form.
-  if (Lex.getKind() == lltok::LocalVarID) {
-    if (Lex.getUIntVal() != TypeID)
-      return Error(Lex.getLoc(), "type expected to be numbered '%" +
-                   Twine(TypeID) + "'");
-    Lex.Lex(); // eat LocalVarID;
-
-    if (ParseToken(lltok::equal, "expected '=' after name"))
-      return true;
-  }
-
-  LocTy TypeLoc = Lex.getLoc();
-  if (ParseToken(lltok::kw_type, "expected 'type' after '='")) return true;
+  if (ParseToken(lltok::equal, "expected '=' after name") ||
+      ParseToken(lltok::kw_type, "expected 'type' after '='"))
+    return true;
 
   PATypeHolder Ty(Type::getVoidTy(Context));
   if (ParseType(Ty)) return true;
index 31b95e1470b231c5901a0934138bd8f427f66529..f61b667dcfa7506d6f92d6c1af77e1661608d390 100644 (file)
@@ -7,32 +7,32 @@ target triple = "x86_64-unknown-freebsd8.0"
 module asm ".ident\09\22$FreeBSD: head/sys/kern/vfs_subr.c 195285 2009-07-02 14:19:33Z jamie $\22"
 module asm ".section set_pcpu, \22aw\22, @progbits"
 module asm ".previous"
-       type <{ [40 x i8] }>            ; type %0
-       type <{ %struct.vm_object*, %struct.vm_object** }>              ; type %1
-       type <{ %struct.vm_object* }>           ; type %2
-       type <{ %struct.vm_page*, %struct.vm_page** }>          ; type %3
-       type <{ %struct.pv_entry*, %struct.pv_entry** }>                ; type %4
-       type <{ %struct.vm_reserv* }>           ; type %5
-       type <{ %struct.bufobj*, %struct.bufobj** }>            ; type %6
-       type <{ %struct.proc*, %struct.proc** }>                ; type %7
-       type <{ %struct.thread*, %struct.thread** }>            ; type %8
-       type <{ %struct.prison*, %struct.prison** }>            ; type %9
-       type <{ %struct.prison* }>              ; type %10
-       type <{ %struct.task* }>                ; type %11
-       type <{ %struct.osd*, %struct.osd** }>          ; type %12
-       type <{ %struct.proc* }>                ; type %13
-       type <{ %struct.ksiginfo*, %struct.ksiginfo** }>                ; type %14
-       type <{ %struct.pv_chunk*, %struct.pv_chunk** }>                ; type %15
-       type <{ %struct.pgrp*, %struct.pgrp** }>                ; type %16
-       type <{ %struct.knote*, %struct.knote** }>              ; type %17
-       type <{ %struct.ktr_request*, %struct.ktr_request** }>          ; type %18
-       type <{ %struct.mqueue_notifier* }>             ; type %19
-       type <{ %struct.turnstile* }>           ; type %20
-       type <{ %struct.namecache* }>           ; type %21
-       type <{ %struct.namecache*, %struct.namecache** }>              ; type %22
-       type <{ %struct.lockf*, %struct.lockf** }>              ; type %23
-       type <{ %struct.lockf_entry*, %struct.lockf_entry** }>          ; type %24
-       type <{ %struct.lockf_edge*, %struct.lockf_edge** }>            ; type %25
+       %0 = type <{ [40 x i8] }>               ; type %0
+       %1 = type <{ %struct.vm_object*, %struct.vm_object** }>         ; type %1
+       %2 = type <{ %struct.vm_object* }>              ; type %2
+       %3 = type <{ %struct.vm_page*, %struct.vm_page** }>             ; type %3
+       %4 = type <{ %struct.pv_entry*, %struct.pv_entry** }>           ; type %4
+       %5 = type <{ %struct.vm_reserv* }>              ; type %5
+       %6 = type <{ %struct.bufobj*, %struct.bufobj** }>               ; type %6
+       %7 = type <{ %struct.proc*, %struct.proc** }>           ; type %7
+       %8 = type <{ %struct.thread*, %struct.thread** }>               ; type %8
+       %9 = type <{ %struct.prison*, %struct.prison** }>               ; type %9
+       %10 = type <{ %struct.prison* }>                ; type %10
+       %11 = type <{ %struct.task* }>          ; type %11
+       %12 = type <{ %struct.osd*, %struct.osd** }>            ; type %12
+       %13 = type <{ %struct.proc* }>          ; type %13
+       %14 = type <{ %struct.ksiginfo*, %struct.ksiginfo** }>          ; type %14
+       %15 = type <{ %struct.pv_chunk*, %struct.pv_chunk** }>          ; type %15
+       %16 = type <{ %struct.pgrp*, %struct.pgrp** }>          ; type %16
+       %17 = type <{ %struct.knote*, %struct.knote** }>                ; type %17
+       %18 = type <{ %struct.ktr_request*, %struct.ktr_request** }>            ; type %18
+       %19 = type <{ %struct.mqueue_notifier* }>               ; type %19
+       %20 = type <{ %struct.turnstile* }>             ; type %20
+       %21 = type <{ %struct.namecache* }>             ; type %21
+       %22 = type <{ %struct.namecache*, %struct.namecache** }>                ; type %22
+       %23 = type <{ %struct.lockf*, %struct.lockf** }>                ; type %23
+       %24 = type <{ %struct.lockf_entry*, %struct.lockf_entry** }>            ; type %24
+       %25 = type <{ %struct.lockf_edge*, %struct.lockf_edge** }>              ; type %25
        %struct.__siginfo = type <{ i32, i32, i32, i32, i32, i32, i8*, %union.sigval, %0 }>
        %struct.__sigset = type <{ [4 x i32] }>
        %struct.acl = type <{ i32, i32, [4 x i32], [254 x %struct.acl_entry] }>
index 10e328ddf7e745a3831adf2fd3a640e0436c2311..cf7531d43224431af3f95f781d1d3bf66c371390 100644 (file)
@@ -2,8 +2,8 @@
 ; PR 3909
 
 
-       type { i32, %1* }               ; type %0
-       type { i32, i8* }               ; type %1
+       %0 = type { i32, %1* }          ; type %0
+       %1 = type { i32, i8* }          ; type %1
 
 define x86_stdcallcc i32 @_Dmain(%0 %unnamed) {
 entry:
diff --git a/test/Assembler/2002-04-04-PureVirtMethCall.ll b/test/Assembler/2002-04-04-PureVirtMethCall.ll
deleted file mode 100644 (file)
index 29aed55..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-; RUN: llvm-as %s -o /dev/null
-
-  type { { \2 *, \4 ** },
-         { \2 *, \4 ** }
-       }
-
diff --git a/test/Assembler/2002-04-04-PureVirtMethCall2.ll b/test/Assembler/2002-04-04-PureVirtMethCall2.ll
deleted file mode 100644 (file)
index a096899..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-; RUN: llvm-as %s -o /dev/null
-
-%t = type { { \2*, \2 },
-            { \2*, \2 }
-          }
index ee98d41bdf99dd220bf1912ce589a195db6cf00f..60356439d5f8aee544ca15406a8bb3bb8aa547df 100644 (file)
@@ -1,8 +1,7 @@
 ; RUN: llvm-as < %s | llvm-dis
 
-type i32
 
 define void @foo() {
-  bitcast %0* null to i32*
+  bitcast i32* null to i32*
   ret void
 }
index 1a59ce6f9dfbc2482cebecf93923d54d02abdad3..dbf46b06e1980d03237578a1222744bbd1b153a7 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llvm-as < %s | llvm-dis -o /dev/null
-       type { %object.ModuleInfo.__vtbl*, i8*, %"byte[]", %1, %"ClassInfo[]", i32, void ()*, void ()*, void ()*, i8*, void ()* }               ; type %0
-       type { i64, %object.ModuleInfo* }               ; type %1
-       type { i32, void ()* }          ; type %2
+       %0 = type { %object.ModuleInfo.__vtbl*, i8*, %"byte[]", %1, %"ClassInfo[]", i32, void ()*, void ()*, void ()*, i8*, void ()* }          ; type %0
+       %1 = type { i64, %object.ModuleInfo* }          ; type %1
+       %2 = type { i32, void ()* }             ; type %2
        %"ClassInfo[]" = type { i64, %object.ClassInfo** }
        %"Interface[]" = type { i64, %object.Interface* }
        %"ModuleInfo[]" = type { i64, %object.ModuleInfo** }
index e982e437d6871b77c2b568844bdb12e88294986b..8dcf3f84e9629777a15fb92221f918a514772747 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llc < %s -march=bfin -verify-machineinstrs > %t
 
-       type { i24, i1 }                ; type %0
+       %0 = type { i24, i1 }           ; type %0
 
 define i1 @func2(i24 zeroext %v1, i24 zeroext %v2) nounwind {
 entry:
index 8c52874e773b5efc39a632bb2f8744fb60191352..2df32ca354d84e0a1f6af3e6923ca10a41504cad 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llc < %s -march=bfin -verify-machineinstrs
 
-       type { i32, float, float, float, float, float, float, float, float, float, float }              ; type %0
+       %0 = type { i32, float, float, float, float, float, float, float, float, float, float }         ; type %0
        %struct..s_segment_inf = type { float, i32, i16, i16, float, float, i32, float, float }
 
 define i32 @main(i32 %argc.1, i8** %argv.1) {
index 41b30291baa289a58eb752ad720b6c50414ec349..0b56103271070b55e296c625ee6ce7fc0ab98b8c 100644 (file)
@@ -1,10 +1,10 @@
 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim
 
-       type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16)*, i32 }                ; type %0
-       type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16*)*, i32 }               ; type %1
-       type { void (%"struct.xalanc_1_8::FormatterToXML"*, %"struct.xalanc_1_8::XalanDOMString"*)*, i32 }              ; type %2
-       type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16*, i32, i32)*, i32 }             ; type %3
-       type { void (%"struct.xalanc_1_8::FormatterToXML"*)*, i32 }             ; type %4
+       %0 = type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16)*, i32 }           ; type %0
+       %1 = type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16*)*, i32 }          ; type %1
+       %2 = type { void (%"struct.xalanc_1_8::FormatterToXML"*, %"struct.xalanc_1_8::XalanDOMString"*)*, i32 }         ; type %2
+       %3 = type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16*, i32, i32)*, i32 }                ; type %3
+       %4 = type { void (%"struct.xalanc_1_8::FormatterToXML"*)*, i32 }                ; type %4
        %"struct.std::CharVectorType" = type { %"struct.std::_Vector_base<char,std::allocator<char> >" }
        %"struct.std::_Bit_const_iterator" = type { %"struct.std::_Bit_iterator_base" }
        %"struct.std::_Bit_iterator_base" = type { i32*, i32 }
index b8326373924fc69aa9480d28c0267fe4b6b0b80b..28ac28bbc550a800dd6123368f0373bda13c9c14 100644 (file)
@@ -1,10 +1,10 @@
 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim
 
-       type { %struct.GAP }            ; type %0
-       type { i16, i8, i8 }            ; type %1
-       type { [2 x i32], [2 x i32] }           ; type %2
-       type { %struct.rec* }           ; type %3
-       type { i8, i8, i16, i8, i8, i8, i8 }            ; type %4
+       %0 = type { %struct.GAP }               ; type %0
+       %1 = type { i16, i8, i8 }               ; type %1
+       %2 = type { [2 x i32], [2 x i32] }              ; type %2
+       %3 = type { %struct.rec* }              ; type %3
+       %4 = type { i8, i8, i16, i8, i8, i8, i8 }               ; type %4
        %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
        %struct.FILE_POS = type { i8, i8, i16, i32 }
        %struct.FIRST_UNION = type { %struct.FILE_POS }
index 02fad4b930c46478f3bc8d0294240a19d2c987ba..88accf8063edf00e39b791b3215318ce22d2309f 100644 (file)
@@ -1,11 +1,11 @@
 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim -O3
 
-       type { i16, i8, i8 }            ; type %0
-       type { [2 x i32], [2 x i32] }           ; type %1
-       type { %struct.GAP }            ; type %2
-       type { %struct.rec* }           ; type %3
-       type { i8, i8, i16, i8, i8, i8, i8 }            ; type %4
-       type { i8, i8, i8, i8 }         ; type %5
+       %0 = type { i16, i8, i8 }               ; type %0
+       %1 = type { [2 x i32], [2 x i32] }              ; type %1
+       %2 = type { %struct.GAP }               ; type %2
+       %3 = type { %struct.rec* }              ; type %3
+       %4 = type { i8, i8, i16, i8, i8, i8, i8 }               ; type %4
+       %5 = type { i8, i8, i8, i8 }            ; type %5
        %struct.COMPOSITE = type { i8, i16, i16 }
        %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
        %struct.FILE_POS = type { i8, i8, i16, i32 }
diff --git a/test/CodeGen/X86/2009-04-09-InlineAsmCrash.ll b/test/CodeGen/X86/2009-04-09-InlineAsmCrash.ll
deleted file mode 100644 (file)
index 97bbd93..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-; RUN: llc < %s 
-; rdar://6774324
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
-target triple = "i386-apple-darwin10.0"
-       type <{ i32, %1 }>              ; type %0
-       type <{ [216 x i8] }>           ; type %1
-       type <{ %3, %4*, %28*, i64, i32, %6, %6, i32, i32, i32, i32, void (i8*, i32)*, i8*, %29*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x i8*], i32, %30, i32, %24, %4*, %4*, i64, i64, i32, i32, void (i32, %2*)*, i32, i32, i32, i32, i32, i32, i32, i32, %24, i64, i64, i64, i64, i64, %21, i32, i32, %21, i32, %31*, %3, %33, %34, %9*, i32, i32, %3, %3, %35, %41*, %42*, %11, i32, i32, i32, i8, i8, i8, i8, %69*, %69, %9*, %9*, [11 x %61], %3, i8*, i32, i64, i64, i32, i32, i32, i64 }>           ; type %2
-       type <{ %3*, %3* }>             ; type %3
-       type <{ %3, i32, %2*, %2*, %2*, %5*, i32, i32, %21, i64, i64, i64, i32, %22, %9*, %6, %4*, %23 }>               ; type %4
-       type <{ %3, %3, %4*, %4*, i32, %6, %9*, %9*, %5*, %20* }>               ; type %5
-       type <{ %7, i16, i8, i8, %8 }>          ; type %6
-       type <{ i32 }>          ; type %7
-       type <{ i8*, i8*, [2 x i32], i16, i8, i8, i8*, i8, i8, i8, i8, i8* }>           ; type %8
-       type <{ %10, %13, %15, i32, i32, i32, i32, %9*, %9*, %16*, i32, %17*, i64, i32 }>               ; type %9
-       type <{ i32, i32, %11 }>                ; type %10
-       type <{ %12 }>          ; type %11
-       type <{ [12 x i8] }>            ; type %12
-       type <{ %14 }>          ; type %13
-       type <{ [40 x i8] }>            ; type %14
-       type <{ [4 x i8] }>             ; type %15
-       type <{ %15, %15 }>             ; type %16
-       type <{ %17*, %17*, %9*, i32, %18*, %19* }>             ; type %17
-       type opaque             ; type %18
-       type <{ i32, i32, %9*, %9*, i32, i32 }>         ; type %19
-       type <{ %5*, %20*, %20*, %20* }>                ; type %20
-       type <{ %3, %3*, void (i8*, i8*)*, i8*, i8*, i64 }>             ; type %21
-       type <{ i32, [4 x i32], i32, i32, [128 x %3] }>         ; type %22
-       type <{ %24, %24, %24, %24*, %24*, %24*, %25, %26, %27, i32, i32, i8* }>                ; type %23
-       type <{ i64, i32, i32, i32 }>           ; type %24
-       type <{ i32, i32 }>             ; type %25
-       type <{ i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32, i32 }>            ; type %26
-       type <{ [16 x %17*], i32 }>             ; type %27
-       type <{ i8, i8, i8, i8, %7, %3 }>               ; type %28
-       type <{ i32, %11*, i8*, i8*, %11* }>            ; type %29
-       type <{ i32, i32, i32, i32, i64 }>              ; type %30
-       type <{ %32*, %3, %3, i32, i32, i32, %5* }>             ; type %31
-       type opaque             ; type %32
-       type <{ [44 x i8] }>            ; type %33
-       type <{ %17* }>         ; type %34
-       type <{ %36, %36*, i32, [4 x %40], i32, i32, i64, i32 }>                ; type %35
-       type <{ i8*, %0*, %37*, i64, %39, i32, %39, %6, i64, i64, i8*, i32 }>           ; type %36
-       type <{ i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, %38 }>                ; type %37
-       type <{ i16, i16, i8, i8, i16, i32, i16, i16, i32, i16, i16, i32, i32, [8 x [8 x i16]], [8 x [16 x i16]], [96 x i8] }>          ; type %38
-       type <{ i8, i8, i8, i8, i8, i8, i8, i8 }>               ; type %39
-       type <{ i64 }>          ; type %40
-       type <{ %11, i32, i32, i32, %42*, %3, i8*, %3, %5*, %32*, i32, i32, i32, i32, i32, i32, i32, %59, %60, i64, i64, i32, %11, %9*, %9*, %9*, [11 x %61], %9*, %9*, %9*, %9*, %9*, [3 x %9*], %62*, %3, %3, i32, i32, %9*, %9*, i32, %67*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, %68*, [2 x i32], i64, i64, i32 }>            ; type %41
-       type <{ %43, %44, %47*, i64, i64, i64, i32, %11, %54, %46*, %46*, i32, i32, i32, i32, i32, i32, i32 }>          ; type %42
-       type <{ i16, i8, i8, i32, i32 }>                ; type %43
-       type <{ %45, i32, i32 }>                ; type %44
-       type <{ %46*, %46*, i64, i64 }>         ; type %45
-       type <{ %45, %15, i64, i8, i8, i8, i8, i16, i16 }>              ; type %46
-       type <{ i64*, i64, %48*, i32, i32, i32, %6, %53, i32, i64, i64*, i64*, %48*, %48*, %48*, i32 }>         ; type %47
-       type <{ %3, %43, i64, %49*, i32, i32, i32, i32, %48*, %48*, i64, %50*, i64, %52*, i32, i16, i16, i8, i8, i8, i8, %3, %3, i64, i32, i32, i32, i8*, i32, i8, i8, i8, i8, %3 }>            ; type %48
-       type <{ %3, %3, %49*, %48*, i64, i8, i8, i8, i8, i32, i8, i8, i8, i8 }>         ; type %49
-       type <{ i32, %51* }>            ; type %50
-       type <{ void (%50*)*, void (%50*)*, i32 (%50*, %52*, i32)*, i32 (%50*)*, i32 (%50*, i64, i32, i32, i32*)*, i32 (%50*, i64, i32, i64*, i32*, i32, i32, i32)*, i32 (%50*, i64, i32)*, i32 (%50*, i64, i64, i32)*, i32 (%50*, i64, i64, i32)*, i32 (%50*, i32)*, i32 (%50*)*, i8* }>               ; type %51
-       type <{ i32, %48* }>            ; type %52
-       type <{ i32, i32, i32 }>                ; type %53
-       type <{ %11, %55*, i32, %53, i64 }>             ; type %54
-       type <{ %3, i32, i32, i32, i32, i32, [64 x i8], %56 }>          ; type %55
-       type <{ %57, %58, %58 }>                ; type %56
-       type <{ i64, i64, i64, i64, i64 }>              ; type %57
-       type <{ i64, i64, i64, i64, i64, i64, i64, i64 }>               ; type %58
-       type <{ [2 x i32] }>            ; type %59
-       type <{ [8 x i32] }>            ; type %60
-       type <{ %9*, i32, i32, i32 }>           ; type %61
-       type <{ %11, i32, %11, i32, i32, %63*, i32, %64*, %65, i32, i32, i32, i32, %41* }>              ; type %62
-       type <{ %10*, i32, %15, %15 }>          ; type %63
-       type opaque             ; type %64
-       type <{ i32, %66*, %66*, %66**, %66*, %66** }>          ; type %65
-       type <{ %63, i32, %62*, %66*, %66* }>           ; type %66
-       type <{ i32, i32, [0 x %39] }>          ; type %67
-       type opaque             ; type %68
-       type <{ %69*, void (%69*, %2*)* }>              ; type %69
-       type <{ %70*, %2*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i32, i32, i32, i32, i32, i32, i32, %71, i32, i32, i64, i64, i64, %72, i8*, i8*, %73, %4*, %79*, %81*, %39*, %84, i32, i32, i32, i8*, i32, i32, i32, i32, i32, i32, i32, i64*, i32, i64*, i8*, i32, [256 x i32], i64, i64, %86, %77*, i64, i64, %88*, %2*, %2* }>           ; type %70
-       type <{ %3, i64, i32, i32 }>            ; type %71
-       type <{ i64, i64, i64 }>                ; type %72
-       type <{ %73*, %73*, %73*, %73*, %74*, %75*, %76*, %70*, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, [3 x %78*], i8*, i8* }>               ; type %73
-       type <{ %74*, %74*, %75*, %76*, %73*, i32, i32, i32, i32, i32, i8*, i8* }>              ; type %74
-       type <{ %75*, %73*, %74*, %76*, i32, i32, i32, i32, %78*, i8*, i8* }>           ; type %75
-       type <{ %76*, %73*, %74*, %75*, i32, i32, i32, i32, i8*, i8*, %77* }>           ; type %76
-       type opaque             ; type %77
-       type <{ %78*, %75*, i8, i8, i8, i8, i16, i16, i16, i8, i8, i32, [0 x %73*] }>           ; type %78
-       type <{ i32, i32, i32, [20 x %80] }>            ; type %79
-       type <{ i64*, i8* }>            ; type %80
-       type <{ [256 x %39], [19 x %39], i8, i8, i8, i8, i8, i8, i8, i8, %82, i8, i8, i8, i8, i8, i8, i8, i8, %82, %83 }>               ; type %81
-       type <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16 }>                ; type %82
-       type <{ [16 x i64], i64 }>              ; type %83
-       type <{ %82*, %85, %85, %39*, i32 }>            ; type %84
-       type <{ i16, %39* }>            ; type %85
-       type <{ %87, i8* }>             ; type %86
-       type <{ i32, i32, i32, i8, i8, i16, i32, i32, i32, i32, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>               ; type %87
-       type <{ i64, i64, i32, i32, i32, i32 }>         ; type %88
-       type <{ i32, i32, i32, i32, i32, i32, i32 }>            ; type %89
-@kernel_stack_size = external global i32               ; <i32*> [#uses=1]
-
-define void @test(%0*) nounwind {
-       %2 = tail call %2* asm sideeffect "mov %gs:${1:P},$0", "=r,i,~{dirflag},~{fpsr},~{flags}"(i32 ptrtoint (%2** getelementptr (%70* null, i32 0, i32 1) to i32)) nounwind          ; <%2*> [#uses=1]
-       %3 = getelementptr %2* %2, i32 0, i32 15                ; <i32*> [#uses=1]
-       %4 = load i32* %3               ; <i32> [#uses=2]
-       %5 = icmp eq i32 %4, 0          ; <i1> [#uses=1]
-       br i1 %5, label %47, label %6
-
-; <label>:6            ; preds = %1
-       %7 = load i32* @kernel_stack_size               ; <i32> [#uses=1]
-       %8 = add i32 %7, %4             ; <i32> [#uses=1]
-       %9 = inttoptr i32 %8 to %89*            ; <%89*> [#uses=12]
-       %10 = tail call %2* asm sideeffect "mov %gs:${1:P},$0", "=r,i,~{dirflag},~{fpsr},~{flags}"(i32 ptrtoint (%2** getelementptr (%70* null, i32 0, i32 1) to i32)) nounwind         ; <%2*> [#uses=1]
-       %11 = getelementptr %2* %10, i32 0, i32 65, i32 1               ; <%36**> [#uses=1]
-       %12 = load %36** %11            ; <%36*> [#uses=1]
-       %13 = getelementptr %36* %12, i32 0, i32 1              ; <%0**> [#uses=1]
-       %14 = load %0** %13             ; <%0*> [#uses=1]
-       %15 = icmp eq %0* %14, %0               ; <i1> [#uses=1]
-       br i1 %15, label %40, label %16
-
-; <label>:16           ; preds = %6
-       %17 = getelementptr %0* %0, i32 0, i32 1                ; <%1*> [#uses=1]
-       %18 = getelementptr %89* %9, i32 -1, i32 0              ; <i32*> [#uses=1]
-       %19 = getelementptr %0* %0, i32 0, i32 1, i32 0, i32 32         ; <i8*> [#uses=1]
-       %20 = bitcast i8* %19 to i32*           ; <i32*> [#uses=1]
-       %21 = load i32* %20             ; <i32> [#uses=1]
-       store i32 %21, i32* %18
-       %22 = getelementptr %89* %9, i32 -1, i32 1              ; <i32*> [#uses=1]
-       %23 = ptrtoint %1* %17 to i32           ; <i32> [#uses=1]
-       store i32 %23, i32* %22
-       %24 = getelementptr %89* %9, i32 -1, i32 2              ; <i32*> [#uses=1]
-       %25 = getelementptr %0* %0, i32 0, i32 1, i32 0, i32 24         ; <i8*> [#uses=1]
-       %26 = bitcast i8* %25 to i32*           ; <i32*> [#uses=1]
-       %27 = load i32* %26             ; <i32> [#uses=1]
-       store i32 %27, i32* %24
-       %28 = getelementptr %89* %9, i32 -1, i32 3              ; <i32*> [#uses=1]
-       %29 = getelementptr %0* %0, i32 0, i32 1, i32 0, i32 16         ; <i8*> [#uses=1]
-       %30 = bitcast i8* %29 to i32*           ; <i32*> [#uses=1]
-       %31 = load i32* %30             ; <i32> [#uses=1]
-       store i32 %31, i32* %28
-       %32 = getelementptr %89* %9, i32 -1, i32 4              ; <i32*> [#uses=1]
-       %33 = getelementptr %0* %0, i32 0, i32 1, i32 0, i32 20         ; <i8*> [#uses=1]
-       %34 = bitcast i8* %33 to i32*           ; <i32*> [#uses=1]
-       %35 = load i32* %34             ; <i32> [#uses=1]
-       store i32 %35, i32* %32
-       %36 = getelementptr %89* %9, i32 -1, i32 5              ; <i32*> [#uses=1]
-       %37 = getelementptr %0* %0, i32 0, i32 1, i32 0, i32 56         ; <i8*> [#uses=1]
-       %38 = bitcast i8* %37 to i32*           ; <i32*> [#uses=1]
-       %39 = load i32* %38             ; <i32> [#uses=1]
-       store i32 %39, i32* %36
-       ret void
-
-; <label>:40           ; preds = %6
-       %41 = getelementptr %89* %9, i32 -1, i32 0              ; <i32*> [#uses=1]
-       tail call void asm sideeffect "movl %ebx, $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %41) nounwind
-       %42 = getelementptr %89* %9, i32 -1, i32 1              ; <i32*> [#uses=1]
-       tail call void asm sideeffect "movl %esp, $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %42) nounwind
-       %43 = getelementptr %89* %9, i32 -1, i32 2              ; <i32*> [#uses=1]
-       tail call void asm sideeffect "movl %ebp, $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %43) nounwind
-       %44 = getelementptr %89* %9, i32 -1, i32 3              ; <i32*> [#uses=1]
-       tail call void asm sideeffect "movl %edi, $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %44) nounwind
-       %45 = getelementptr %89* %9, i32 -1, i32 4              ; <i32*> [#uses=1]
-       tail call void asm sideeffect "movl %esi, $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %45) nounwind
-       %46 = getelementptr %89* %9, i32 -1, i32 5              ; <i32*> [#uses=1]
-       tail call void asm sideeffect "movl $$1f, $0\0A1:", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %46) nounwind
-       ret void
-
-; <label>:47           ; preds = %1
-       ret void
-}
index 27f11cf6bc6ed9b388701a9b4e2ea1ecc014f432..b1222d1c0627a1a168d5f84edb61e68a85abef61 100644 (file)
@@ -2,7 +2,7 @@
 ; radr://6772169
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
 target triple = "x86_64-apple-darwin10"
-       type { i32, i1 }                ; type %0
+       %0 = type { i32, i1 }           ; type %0
 
 declare %0 @llvm.sadd.with.overflow.i32(i32, i32) nounwind
 
index ff8cf0ac229ec2576db91e09141cfa7ed9d5de7e..3d70b58686b18d08669c23d5c3c74d6694f988e9 100644 (file)
@@ -2,7 +2,7 @@
 ; rdar://6781755
 ; PR3934
 
-       type { i32, i32 }               ; type %0
+       %0 = type { i32, i32 }          ; type %0
 
 define void @bn_sqr_comba8(i32* nocapture %r, i32* %a) nounwind {
 entry:
index d1f9cf83307cd2a6789018299be023571b924840..e803d6b56369f4eceab5604588c4928457464c1d 100644 (file)
@@ -1,9 +1,9 @@
 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -disable-fp-elim -relocation-model=pic
 ; PR4099
 
-       type { [62 x %struct.Bitvec*] }         ; type %0
-       type { i8* }            ; type %1
-       type { double }         ; type %2
+       %0 = type { [62 x %struct.Bitvec*] }            ; type %0
+       %1 = type { i8* }               ; type %1
+       %2 = type { double }            ; type %2
        %struct..5sPragmaType = type { i8*, i32 }
        %struct.AggInfo = type { i8, i8, i32, %struct.ExprList*, i32, %struct.AggInfo_col*, i32, i32, i32, %struct.AggInfo_func*, i32, i32 }
        %struct.AggInfo_col = type { %struct.Table*, i32, i32, i32, i32, %struct.Expr* }
index 9415732de02570d6cde05e36858cf73534be6438..3dcc0d42e759694163b38771a8af0d8af498a9c3 100644 (file)
@@ -1,9 +1,9 @@
 ; RUN: llc < %s -march=x86
 
-       type { %struct.GAP }            ; type %0
-       type { i16, i8, i8 }            ; type %1
-       type { [2 x i32], [2 x i32] }           ; type %2
-       type { %struct.rec* }           ; type %3
+       %0 = type { %struct.GAP }               ; type %0
+       %1 = type { i16, i8, i8 }               ; type %1
+       %2 = type { [2 x i32], [2 x i32] }              ; type %2
+       %3 = type { %struct.rec* }              ; type %3
        %struct.FILE_POS = type { i8, i8, i16, i32 }
        %struct.FIRST_UNION = type { %struct.FILE_POS }
        %struct.FOURTH_UNION = type { %struct.STYLE }
index 6b0d6d9790de4ee3ca0b292555bd5151784b98de..bf668e304b2862adce3ba5a47d5bd67415737bff 100644 (file)
@@ -2,8 +2,8 @@
 target triple = "x86_64-mingw"
 
 ; ModuleID = 'mm.bc'
-       type opaque             ; type %0
-       type opaque             ; type %1
+       %0 = type opaque                ; type %0
+       %1 = type opaque                ; type %1
 
 define internal fastcc float @computeMipmappingRho(%0* %shaderExecutionStatePtr, i32 %index, <4 x float> %texCoord, <4 x float> %texCoordDX, <4 x float> %texCoordDY) readonly {
 indexCheckBlock:
index 4f44caea74c946067ba08d66c35ed0416bd7a66c..66f51180509f0159502f65732adb2becfd201ff0 100644 (file)
@@ -4,7 +4,7 @@
 ; Registers other than RAX, RCX are OK, but they must be different.
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
 target triple = "x86_64-apple-darwin10.0"
-       type { i64, i64 }               ; type %0
+       %0 = type { i64, i64 }          ; type %0
 
 define i64 @flsst(i64 %find) nounwind ssp {
 entry:
index 976db6479e090a982d3ea4af265f8c730b226a47..3f1fec131214f2ebae2bc06e14df0d592c3676d9 100644 (file)
@@ -5,8 +5,8 @@
 ; CHECK: os_clock
 ; CHECK-NOT: movaps
 
-       type { %struct.TValue }         ; type %0
-       type { %struct.L_Umaxalign, i32, %struct.Node* }                ; type %1
+       %0 = type { %struct.TValue }            ; type %0
+       %1 = type { %struct.L_Umaxalign, i32, %struct.Node* }           ; type %1
        %struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.TValue*, i32*, i32, i32 }
        %struct.GCObject = type { %struct.lua_State }
        %struct.L_Umaxalign = type { double }
index 9072c5c7b593706ab3ebb16b7b36180caec0414e..a485827be96d50d38955a73e4724368331985885 100644 (file)
@@ -3,7 +3,7 @@
 ; This file is for regression tests for cases where FastISel needs
 ; to gracefully bail out and let SelectionDAGISel take over.
 
-       type { i64, i8* }               ; type %0
+       %0 = type { i64, i8* }          ; type %0
 
 declare void @bar(%0)
 
index 2605123d6dd49457df87ff5418dc69f99498ff13..b453310608ec40c09ac4f87b83f4b9f20e0504ad 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llc < %s -march=x86-64 | grep movslq | count 1
 ; PR4050
 
-       type { i64 }            ; type %0
+       %0 = type { i64 }               ; type %0
        %struct.S1 = type { i16, i32 }
 @g_10 = external global %struct.S1             ; <%struct.S1*> [#uses=2]
 
index ab44206f8065a07864d374411c29bec62f5b8078..321fd30dbbf18597b07f6b652b89c3dbf66c7b0d 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llc < %s -march=x86-64
 ; rdar://7066579
 
-       type { i64, i64, i64, i64, i64 }                ; type %0
+       %0 = type { i64, i64, i64, i64, i64 }           ; type %0
 
 define void @t() nounwind {
 entry:
index 26d214ae88357fb34100851e0462ecda9fbf5534..6ca1be79e4617be8efc8a214d6ac997b0d09e21a 100644 (file)
@@ -4,9 +4,9 @@
 
 %myty = type i32 
 %myfn = type float (i32,double,i32,i16)
-type i32(%myfn*)
-type i32(i32)
-type i32(i32(i32)*)
+%0 = type i32(%myfn*)
+%1 = type i32(i32)
+%2 = type i32(i32(i32)*)
 
   %thisfuncty = type i32 (i32) *
 
index 6539c1a6e1ca015a11a2fbf528bd4f2438477c84..37fdf937f60d2de7f89369ea7f2e0ec0881f183d 100644 (file)
 %AAA = type { \2*, {\2*}, [12x{\2*}], {[1x{\2*}]} }
 
 ; Test numbered types
-type %CCC
-type %BBB
+%0 = type %CCC
+%1 = type %BBB
 %Composite = type { %0, %1 }
 
-; Test simple opaque type resolution...
-%intty = type i32
-
 ; Perform a simple forward reference...
 %ty1 = type { %ty2, i32 }
 %ty2 = type float
index 124aa090ec93bd5c0d4bd1f81545afdc966b215c..c5af72353a1dfd62bf79b18c85f33698a5f389eb 100644 (file)
@@ -11,8 +11,8 @@
 %fwd    = type %fwdref*
 
 ; same as above with unnamed types
-type { %1* }
-type %0* 
+%0 = type { %1* }
+%1 = type %0* 
 %test = type %1
 
 %test2 = type [2 x i32]
index 9025aaac797fce9a9de61675789aa3828ccd5666..fba7f12e1dee433aca5f56ee90c25f1daf5c90d4 100644 (file)
@@ -4,7 +4,7 @@
 ; RUN:   grep 7 %t | count 1
 ; RUN:   grep 9 %t | count 1
 
-       type { i32, i32 }               ; type %0
+       %0 = type { i32, i32 }          ; type %0
 @a = weak constant i32 undef           ; <i32*> [#uses=1]
 @b = weak constant i32 5               ; <i32*> [#uses=1]
 @c = weak constant %0 { i32 7, i32 9 }         ; <%0*> [#uses=1]
diff --git a/test/Integer/opaquetypes_bt.ll b/test/Integer/opaquetypes_bt.ll
deleted file mode 100644 (file)
index 5771342..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
-; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll
-
-; This test case is used to test opaque type processing, forward references,
-; and recursive types.  Oh my.
-; 
-
-%SQ1 = type { i31 }
-%SQ2 = type { %ITy }
-%ITy = type i31
-
-
-%CCC = type { \2* }
-%BBB = type { \2*, \2 * }
-%AAA = type { \2*, {\2*}, [12x{\2*}], {[1x{\2*}]} }
-
-; Test numbered types
-type %CCC
-type %BBB
-%Composite = type { %0, %1 }
-
-; Test simple opaque type resolution...
-%i31ty = type i31
-
-; Perform a simple forward reference...
-%ty1 = type { %ty2, i31 }
-%ty2 = type float
-
-; Do a recursive type...
-%list = type { %list * }
-%listp = type { %listp } *
-
-; Do two mutually recursive types...
-%TyA = type { %ty2, %TyB * }
-%TyB = type { double, %TyA * }
-
-; A complex recursive type...
-%Y = type { {%Y*}, %Y* }
-%Z = type { { %Z * }, [12x%Z] *, {{{ %Z * }}} }
-
-; More ridiculous test cases...
-%A = type [ 123x %A*]
-%M = type %M (%M, %M) *
-%P = type %P*
-
-; Recursive ptrs
-%u = type %v*
-%v = type %u*
-
-; Test the parser for unnamed recursive types...
-%P1 = type \1 *
-%Y1 = type { { \3 * }, \2 * }
-%Z1 = type { { \3 * }, [12x\3] *, { { { \5 * } } } }
-
-
-
-
index 50e7f9a08e6ac37fcd0b4dcc32eac9658d3fcd32..d71bcb9713beb99e0c7d04314a040e28ec3b93e9 100644 (file)
@@ -1,11 +1,11 @@
 ; RUN: opt < %s -scalarrepl -disable-output -stats |& grep "Number of aggregates converted to scalar"
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
 target triple = "i386-apple-darwin9.6"
-       type { }                ; type %0
-       type { i8*, i32, i32, i16, i16, %2, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %2, %3*, i32, [3 x i8], [1 x i8], %2, i32, i64 }            ; type %1
-       type { i8*, i32 }               ; type %2
-       type opaque             ; type %3
-       type { i32 }            ; type %4
+       %0 = type { }           ; type %0
+       %1 = type { i8*, i32, i32, i16, i16, %2, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %2, %3*, i32, [3 x i8], [1 x i8], %2, i32, i64 }               ; type %1
+       %2 = type { i8*, i32 }          ; type %2
+       %3 = type opaque                ; type %3
+       %4 = type { i32 }               ; type %4
        %llvm.dbg.anchor.type = type { i32, i32 }
        %llvm.dbg.basictype.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, i32 }
        %llvm.dbg.compile_unit.type = type { i32, %0*, i32, i8*, i8*, i8*, i1, i1, i8*, i32 }
index e06d0c1cd76bddbb4e9c44f1f7ba8b1c29a0ba17..cd4dc328e69ad5bccfcc90ac270454dbaa448376 100644 (file)
@@ -188,7 +188,7 @@ entry:
 
 
 ; rdar://6808691 - ZeroLengthMemSet
-        type <{ i32, i16, i8, i8, i64, i64, i16, [0 x i16] }>           
+        %0 = type <{ i32, i16, i8, i8, i64, i64, i16, [0 x i16] }>           
 
 define i32 @test9() {
 entry: