From isanbard at gmail.com Mon Jul 20 00:01:43 2009 From: isanbard at gmail.com (Bill Wendling) Date: Sun, 19 Jul 2009 22:01:43 -0700 Subject: [llvm-commits] [llvm] r76385 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPrinter/ lib/Target/CellSPU/AsmPrinter/ lib/Target/CppBackend/ lib/Target/IA64/AsmPrinter/ lib/Target/MSP430/ lib/Target/Mips/AsmPrinter/ lib/Target/PowerPC/AsmPrinter/ lib/Target/Sparc/AsmPrinter/ lib/Target/SystemZ/AsmPrinter/ lib/Target/X86/AsmPrinter/ lib/Target/XCore/ lib/Tr... In-Reply-To: <4A63F2AF.4040106@free.fr> References: <200907200103.n6K13chA025017@zion.cs.uiuc.edu> <4A63F2AF.4040106@free.fr> Message-ID: On Jul 19, 2009, at 9:29 PM, Duncan Sands wrote: > Hi Bill, > >> Add plumbing for the `linker_private' linkage type. This type is >> meant for >> "private" symbols which the assember shouldn't strip, but which the >> linker may >> remove after evaluation. This is mostly useful for Objective-C >> metadata. > > is it really necessary to have both "private" and "linker_private" > linkage? What's the difference between them exactly? > My understanding is that "private" allows the assembler to strip the symbols. But "linker_private" only allows the linker to strip the symbols (the assembler must assume that they're used). Basically, the linker uses a bunch of "l_OBJC_*" symbols (as opposed to "L_OBJC_*" symbols) when performing linking. Yes, it's really the difference between an 'l' and 'L' prefix on symbols. :-) -bw From clattner at apple.com Mon Jul 20 00:19:13 2009 From: clattner at apple.com (Chris Lattner) Date: Sun, 19 Jul 2009 22:19:13 -0700 Subject: [llvm-commits] [llvm] r76385 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPrinter/ lib/Target/CellSPU/AsmPrinter/ lib/Target/CppBackend/ lib/Target/IA64/AsmPrinter/ lib/Target/MSP430/ lib/Target/Mips/AsmPrinter/ lib/Target/PowerPC/AsmPrinter/ lib/Target/Sparc/AsmPrinter/ lib/Target/SystemZ/AsmPrinter/ lib/Target/X86/AsmPrinter/ lib/Target/XCore/ lib/Tr... In-Reply-To: References: <200907200103.n6K13chA025017@zion.cs.uiuc.edu> <4A63F2AF.4040106@free.fr> Message-ID: <71E41203-F38F-449A-BF98-EF5C1E486F28@apple.com> On Jul 19, 2009, at 10:01 PM, Bill Wendling wrote: > On Jul 19, 2009, at 9:29 PM, Duncan Sands wrote: > >> Hi Bill, >> >>> Add plumbing for the `linker_private' linkage type. This type is >>> meant for >>> "private" symbols which the assember shouldn't strip, but which the >>> linker may >>> remove after evaluation. This is mostly useful for Objective-C >>> metadata. >> >> is it really necessary to have both "private" and "linker_private" >> linkage? What's the difference between them exactly? >> > My understanding is that "private" allows the assembler to strip the > symbols. But "linker_private" only allows the linker to strip the > symbols (the assembler must assume that they're used). Basically, the > linker uses a bunch of "l_OBJC_*" symbols (as opposed to "L_OBJC_*" > symbols) when performing linking. Yes, it's really the difference > between an 'l' and 'L' prefix on symbols. :-) Right. Private linkage is discarded by the assembler, so they never make it into the .o file. linker_private is discarded by the linker, so it never makes it into the .exe/.dylib. I don't think there is a corresponding idea on ELF, so on ELF they two linkage types should be codegen'd the same way. -Chris From clattner at apple.com Mon Jul 20 00:34:41 2009 From: clattner at apple.com (Chris Lattner) Date: Sun, 19 Jul 2009 22:34:41 -0700 Subject: [llvm-commits] [llvm] r76385 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPrinter/ lib/Target/CellSPU/AsmPrinter/ lib/Target/CppBackend/ lib/Target/IA64/AsmPrinter/ lib/Target/MSP430/ lib/Target/Mips/AsmPrinter/ lib/Target/PowerPC/AsmPrinter/ lib/Target/Sparc/AsmPrinter/ lib/Target/SystemZ/AsmPrinter/ lib/Target/X86/AsmPrinter/ lib/Target/XCore/ lib/Tr... In-Reply-To: <200907200103.n6K13chA025017@zion.cs.uiuc.edu> References: <200907200103.n6K13chA025017@zion.cs.uiuc.edu> Message-ID: <12DC6FD1-6F78-4E5E-B3AC-9E7E4E1A3BE0@apple.com> On Jul 19, 2009, at 6:03 PM, Bill Wendling wrote: > Author: void > Date: Sun Jul 19 20:03:30 2009 > New Revision: 76385 > > URL: http://llvm.org/viewvc/llvm-project?rev=76385&view=rev > Log: > Add plumbing for the `linker_private' linkage type. This type is > meant for > "private" symbols which the assember shouldn't strip, but which the > linker may > remove after evaluation. This is mostly useful for Objective-C > metadata. > > This is plumbing, so we don't have a use of it yet. More to come, etc. Thanks for implementing this Bill. > +++ llvm/trunk/include/llvm-c/Core.h Sun Jul 19 20:03:30 2009 > @@ -141,6 +141,7 @@ > LLVMInternalLinkage, /**< Rename collisions when linking (static > functions) */ > LLVMPrivateLinkage, /**< Like Internal, but omit from symbol > table */ > + LLVMLinkerPrivateLinkage, /**< Like Private, but linker removes. */ > LLVMDLLImportLinkage, /**< Function to be imported from DLL */ > LLVMDLLExportLinkage, /**< Function to be accessible from DLL */ > LLVMExternalWeakLinkage,/**< ExternalWeak linkage description */ This changes the C ABI, which is not allowed, please add this to the end of the list. liblto may also need to be updated to handle this. > +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Sun Jul > 19 20:03:30 2009 > @@ -93,12 +93,15 @@ > void Init(const std::string &GV, Mangler *Mang) { > // Already initialized. > if (!Stub.empty()) return; > - Stub = Mang->makeNameProper(GV+"$stub", true); > - LazyPtr = Mang->makeNameProper(GV+"$lazy_ptr", true); > - SLP = Mang->makeNameProper(GV+"$slp", true); > - SCV = Mang->makeNameProper(GV+"$scv", true); > + Stub = Mang->makeNameProper(GV + "$stub", > + Mangler::PrivatePrefixTy); How about dropping "Ty" from the enum names? Thanks for doing this Bill! -Chris From sabre at nondot.org Mon Jul 20 00:55:22 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 05:55:22 -0000 Subject: [llvm-commits] [llvm] r76396 - /llvm/trunk/docs/LangRef.html Message-ID: <200907200555.n6K5tMsY001829@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 00:55:19 2009 New Revision: 76396 URL: http://llvm.org/viewvc/llvm-project?rev=76396&view=rev Log: document llvm.used and llvm.metadata. Stub out llvm.global_[cd]tors Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=76396&r1=76395&r2=76396&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Mon Jul 20 00:55:19 2009 @@ -91,6 +91,15 @@
  • Inline Assembler Expressions
  • +
  • Intrinsic Global Variables +
      +
    1. The 'llvm.used' Global Variable
    2. +
    3. The 'llvm.global_ctors' + Global Variable
    4. +
    5. The 'llvm.global_dtors' + Global Variable
    6. +
    +
  • Instruction Reference
    1. Terminator Instructions @@ -2150,6 +2159,76 @@ + + + + + +

      LLVM has a number of "magic" global variables that contain data that affect +code generation or other IR semantics. These are documented here. All globals +of this sort should have a section specified as "llvm.metadata". This section +and all globals that start with "llvm." are reserved for LLVM.

      + + + + +
      + +

      The @llvm.used global is an array with i8* element type which has appending linkage. This array contains a list of +pointers to global variables and functions which may optionally have a pointer +cast formed of bitcast or getelementptr. For example, a legal use of it is:

      + +
      +  @X = global i8 4
      +  @Y = global i32 123
      +
      +  @llvm.used = appending global [2 x i8*] [
      +     i8* @X,
      +     i8* bitcast (i32* @Y to i8*)
      +  ], section "llvm.metadata"
      +
      + +

      If a global variable appears in the @llvm.used list, then the +compiler, assembler, and linker are required to treat the symbol as if there is +a reference to the global that it cannot see. For example, if a variable has +internal linkage and no references other than that from the @llvm.used +list, it cannot be deleted. This is commonly used to represent references from +inline asms and other things the compiler cannot "see", and corresponds to +"attribute((used))" in GNU C.

      + +

      On some targets, the code generator must emit a directive to the assembler or +object file to prevent the assembler and linker from molesting the symbol.

      + +
      + + + + +
      + +

      TODO: Describe this.

      + +
      + + + + +
      + +

      TODO: Describe this.

      + +
      + + From sabre at nondot.org Mon Jul 20 01:05:50 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 06:05:50 -0000 Subject: [llvm-commits] [llvm] r76397 - /llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Message-ID: <200907200605.n6K65oCs002121@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 01:05:50 2009 New Revision: 76397 URL: http://llvm.org/viewvc/llvm-project?rev=76397&view=rev Log: use stripPointerCasts to simplify some code. Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp?rev=76397&r1=76396&r2=76397&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Mon Jul 20 01:05:50 2009 @@ -96,12 +96,10 @@ ConstantArray *InitList = dyn_cast(GV->getInitializer()); if (InitList == 0) return; - for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i) { - if (ConstantExpr *CE = dyn_cast(InitList->getOperand(i))) - if (CE->getOpcode() == Instruction::BitCast) - if (Function *F = dyn_cast(CE->getOperand(0))) - UsedFunctions.insert(F); - } + for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i) + if (Function *F = + dyn_cast(InitList->getOperand(i)->stripPointerCasts())) + UsedFunctions.insert(F); } //===-EH-------------------------------------------------------------------===// From evan.cheng at apple.com Mon Jul 20 01:10:07 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 20 Jul 2009 06:10:07 -0000 Subject: [llvm-commits] [llvm] r76398 - in /llvm/trunk: test/CodeGen/Thumb/asmprinter-bug.ll utils/TableGen/AsmWriterEmitter.cpp Message-ID: <200907200610.n6K6A7A7002243@zion.cs.uiuc.edu> Author: evancheng Date: Mon Jul 20 01:10:07 2009 New Revision: 76398 URL: http://llvm.org/viewvc/llvm-project?rev=76398&view=rev Log: Restore AsmWriterEmitter.cpp back to 74742. The recent changes broke Thumb. Added: llvm/trunk/test/CodeGen/Thumb/asmprinter-bug.ll Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Added: llvm/trunk/test/CodeGen/Thumb/asmprinter-bug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb/asmprinter-bug.ll?rev=76398&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Thumb/asmprinter-bug.ll (added) +++ llvm/trunk/test/CodeGen/Thumb/asmprinter-bug.ll Mon Jul 20 01:10:07 2009 @@ -0,0 +1,288 @@ +; RUN: llvm-as < %s | llc -mtriple=thumbv6-apple-darwin10 | grep rsbs | grep {#0} + + %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.__sFILEX = type opaque + %struct.__sbuf = type { i8*, i32 } + %struct.adpcm_state = type { i16, i8 } + at stepsizeTable = internal constant [89 x i32] [i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 16, i32 17, i32 19, i32 21, i32 23, i32 25, i32 28, i32 31, i32 34, i32 37, i32 41, i32 45, i32 50, i32 55, i32 60, i32 66, i32 73, i32 80, i32 88, i32 97, i32 107, i32 118, i32 130, i32 143, i32 157, i32 173, i32 190, i32 209, i32 230, i32 253, i32 279, i32 307, i32 337, i32 371, i32 408, i32 449, i32 494, i32 544, i32 598, i32 658, i32 724, i32 796, i32 876, i32 963, i32 1060, i32 1166, i32 1282, i32 1411, i32 1552, i32 1707, i32 1878, i32 2066, i32 2272, i32 2499, i32 2749, i32 3024, i32 3327, i32 3660, i32 4026, i32 4428, i32 4871, i32 5358, i32 5894, i32 6484, i32 7132, i32 7845, i32 8630, i32 9493, i32 10442, i32 11487, i32 12635, i32 13899, i32 15289, i32 16818, i32 18500, i32 20350, i32 22385, i32 24623, i32 27086, i32 29794, i32 32767] ; <[89 x i32]*> [#uses=4] + at indexTable = internal constant [16 x i32] [i32 -1, i32 -1, i32 -1, i32 -1, i32 2, i32 4, i32 6, i32 8, i32 -1, i32 -1, i32 -1, i32 -1, i32 2, i32 4, i32 6, i32 8] ; <[16 x i32]*> [#uses=2] + at abuf = common global [500 x i8] zeroinitializer ; <[500 x i8]*> [#uses=1] + at .str = private constant [11 x i8] c"input file\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[11 x i8]*> [#uses=1] + at sbuf = common global [1000 x i16] zeroinitializer ; <[1000 x i16]*> [#uses=1] + at state = common global %struct.adpcm_state zeroinitializer ; <%struct.adpcm_state*> [#uses=3] + at __stderrp = external global %struct.FILE* ; <%struct.FILE**> [#uses=1] + at .str1 = private constant [28 x i8] c"Final valprev=%d, index=%d\0A\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[28 x i8]*> [#uses=1] + +define arm_apcscc void @adpcm_coder(i16* nocapture %indata, i8* nocapture %outdata, i32 %len, %struct.adpcm_state* nocapture %state) nounwind { +entry: + %0 = getelementptr %struct.adpcm_state* %state, i32 0, i32 0 ; [#uses=2] + %1 = load i16* %0, align 2 ; [#uses=1] + %2 = sext i16 %1 to i32 ; [#uses=2] + %3 = getelementptr %struct.adpcm_state* %state, i32 0, i32 1 ; [#uses=2] + %4 = load i8* %3, align 2 ; [#uses=1] + %5 = sext i8 %4 to i32 ; [#uses=3] + %6 = getelementptr [89 x i32]* @stepsizeTable, i32 0, i32 %5 ; [#uses=1] + %7 = load i32* %6, align 4 ; [#uses=1] + %8 = icmp sgt i32 %len, 0 ; [#uses=1] + br i1 %8, label %bb, label %bb27 + +bb: ; preds = %bb25, %entry + %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb25 ] ; [#uses=2] + %outp.136 = phi i8* [ %outdata, %entry ], [ %outp.0, %bb25 ] ; [#uses=3] + %bufferstep.035 = phi i32 [ 1, %entry ], [ %tmp, %bb25 ] ; [#uses=3] + %outputbuffer.134 = phi i32 [ undef, %entry ], [ %outputbuffer.0, %bb25 ] ; [#uses=2] + %index.033 = phi i32 [ %5, %entry ], [ %index.2, %bb25 ] ; [#uses=1] + %valpred.132 = phi i32 [ %2, %entry ], [ %valpred.2, %bb25 ] ; [#uses=2] + %step.031 = phi i32 [ %7, %entry ], [ %36, %bb25 ] ; [#uses=5] + %inp.038 = getelementptr i16* %indata, i32 %indvar ; [#uses=1] + %9 = load i16* %inp.038, align 2 ; [#uses=1] + %10 = sext i16 %9 to i32 ; [#uses=1] + %11 = sub i32 %10, %valpred.132 ; [#uses=3] + %12 = icmp slt i32 %11, 0 ; [#uses=1] + %iftmp.1.0 = select i1 %12, i32 8, i32 0 ; [#uses=2] + %13 = sub i32 0, %11 ; [#uses=1] + %14 = icmp eq i32 %iftmp.1.0, 0 ; [#uses=2] + %. = select i1 %14, i32 %11, i32 %13 ; [#uses=2] + %15 = ashr i32 %step.031, 3 ; [#uses=1] + %16 = icmp slt i32 %., %step.031 ; [#uses=2] + %delta.0 = select i1 %16, i32 0, i32 4 ; [#uses=2] + %17 = select i1 %16, i32 0, i32 %step.031 ; [#uses=2] + %diff.1 = sub i32 %., %17 ; [#uses=2] + %18 = ashr i32 %step.031, 1 ; [#uses=2] + %19 = icmp slt i32 %diff.1, %18 ; [#uses=2] + %20 = or i32 %delta.0, 2 ; [#uses=1] + %21 = select i1 %19, i32 %delta.0, i32 %20 ; [#uses=1] + %22 = select i1 %19, i32 0, i32 %18 ; [#uses=2] + %diff.2 = sub i32 %diff.1, %22 ; [#uses=1] + %23 = ashr i32 %step.031, 2 ; [#uses=2] + %24 = icmp slt i32 %diff.2, %23 ; [#uses=2] + %25 = zext i1 %24 to i32 ; [#uses=1] + %26 = select i1 %24, i32 0, i32 %23 ; [#uses=1] + %vpdiff.0 = add i32 %17, %15 ; [#uses=1] + %vpdiff.1 = add i32 %vpdiff.0, %22 ; [#uses=1] + %vpdiff.2 = add i32 %vpdiff.1, %26 ; [#uses=2] + %tmp30 = sub i32 0, %vpdiff.2 ; [#uses=1] + %valpred.0.p = select i1 %14, i32 %vpdiff.2, i32 %tmp30 ; [#uses=1] + %valpred.0 = add i32 %valpred.0.p, %valpred.132 ; [#uses=3] + %27 = icmp sgt i32 %valpred.0, 32767 ; [#uses=1] + br i1 %27, label %bb18, label %bb16 + +bb16: ; preds = %bb + %28 = icmp slt i32 %valpred.0, -32768 ; [#uses=1] + br i1 %28, label %bb17, label %bb18 + +bb17: ; preds = %bb16 + br label %bb18 + +bb18: ; preds = %bb17, %bb16, %bb + %valpred.2 = phi i32 [ -32768, %bb17 ], [ 32767, %bb ], [ %valpred.0, %bb16 ] ; [#uses=2] + %delta.1 = or i32 %21, %iftmp.1.0 ; [#uses=1] + %delta.2 = or i32 %delta.1, %25 ; [#uses=1] + %29 = xor i32 %delta.2, 1 ; [#uses=3] + %30 = getelementptr [16 x i32]* @indexTable, i32 0, i32 %29 ; [#uses=1] + %31 = load i32* %30, align 4 ; [#uses=1] + %32 = add i32 %31, %index.033 ; [#uses=2] + %33 = icmp slt i32 %32, 0 ; [#uses=1] + %index.1 = select i1 %33, i32 0, i32 %32 ; [#uses=2] + %34 = icmp sgt i32 %index.1, 88 ; [#uses=1] + %index.2 = select i1 %34, i32 88, i32 %index.1 ; [#uses=3] + %35 = getelementptr [89 x i32]* @stepsizeTable, i32 0, i32 %index.2 ; [#uses=1] + %36 = load i32* %35, align 4 ; [#uses=1] + %37 = icmp eq i32 %bufferstep.035, 0 ; [#uses=1] + br i1 %37, label %bb24, label %bb23 + +bb23: ; preds = %bb18 + %38 = shl i32 %29, 4 ; [#uses=1] + %39 = and i32 %38, 240 ; [#uses=1] + br label %bb25 + +bb24: ; preds = %bb18 + %40 = trunc i32 %29 to i8 ; [#uses=1] + %41 = and i8 %40, 15 ; [#uses=1] + %42 = trunc i32 %outputbuffer.134 to i8 ; [#uses=1] + %43 = or i8 %41, %42 ; [#uses=1] + store i8 %43, i8* %outp.136, align 1 + %44 = getelementptr i8* %outp.136, i32 1 ; [#uses=1] + br label %bb25 + +bb25: ; preds = %bb24, %bb23 + %outputbuffer.0 = phi i32 [ %39, %bb23 ], [ %outputbuffer.134, %bb24 ] ; [#uses=2] + %outp.0 = phi i8* [ %outp.136, %bb23 ], [ %44, %bb24 ] ; [#uses=2] + %tmp = xor i32 %bufferstep.035, 1 ; [#uses=1] + %indvar.next = add i32 %indvar, 1 ; [#uses=2] + %exitcond = icmp eq i32 %indvar.next, %len ; [#uses=1] + br i1 %exitcond, label %bb26.bb27_crit_edge, label %bb + +bb26.bb27_crit_edge: ; preds = %bb25 + %phitmp44 = icmp eq i32 %bufferstep.035, 1 ; [#uses=1] + br label %bb27 + +bb27: ; preds = %bb26.bb27_crit_edge, %entry + %outp.1.lcssa = phi i8* [ %outp.0, %bb26.bb27_crit_edge ], [ %outdata, %entry ] ; [#uses=1] + %bufferstep.0.lcssa = phi i1 [ %phitmp44, %bb26.bb27_crit_edge ], [ false, %entry ] ; [#uses=1] + %outputbuffer.1.lcssa = phi i32 [ %outputbuffer.0, %bb26.bb27_crit_edge ], [ undef, %entry ] ; [#uses=1] + %index.0.lcssa = phi i32 [ %index.2, %bb26.bb27_crit_edge ], [ %5, %entry ] ; [#uses=1] + %valpred.1.lcssa = phi i32 [ %valpred.2, %bb26.bb27_crit_edge ], [ %2, %entry ] ; [#uses=1] + br i1 %bufferstep.0.lcssa, label %bb28, label %bb29 + +bb28: ; preds = %bb27 + %45 = trunc i32 %outputbuffer.1.lcssa to i8 ; [#uses=1] + store i8 %45, i8* %outp.1.lcssa, align 1 + br label %bb29 + +bb29: ; preds = %bb28, %bb27 + %46 = trunc i32 %valpred.1.lcssa to i16 ; [#uses=1] + store i16 %46, i16* %0, align 2 + %47 = trunc i32 %index.0.lcssa to i8 ; [#uses=1] + store i8 %47, i8* %3, align 2 + ret void +} + +define arm_apcscc void @adpcm_decoder(i8* nocapture %indata, i16* nocapture %outdata, i32 %len, %struct.adpcm_state* nocapture %state) nounwind { +entry: + %0 = getelementptr %struct.adpcm_state* %state, i32 0, i32 0 ; [#uses=2] + %1 = load i16* %0, align 2 ; [#uses=1] + %2 = sext i16 %1 to i32 ; [#uses=2] + %3 = getelementptr %struct.adpcm_state* %state, i32 0, i32 1 ; [#uses=2] + %4 = load i8* %3, align 2 ; [#uses=1] + %5 = sext i8 %4 to i32 ; [#uses=3] + %6 = getelementptr [89 x i32]* @stepsizeTable, i32 0, i32 %5 ; [#uses=1] + %7 = load i32* %6, align 4 ; [#uses=1] + %8 = icmp sgt i32 %len, 0 ; [#uses=1] + br i1 %8, label %bb, label %bb22 + +bb: ; preds = %bb20, %entry + %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb20 ] ; [#uses=2] + %inp.131 = phi i8* [ %indata, %entry ], [ %inp.0, %bb20 ] ; [#uses=3] + %bufferstep.028 = phi i32 [ 0, %entry ], [ %tmp, %bb20 ] ; [#uses=2] + %inputbuffer.127 = phi i32 [ undef, %entry ], [ %inputbuffer.0, %bb20 ] ; [#uses=2] + %index.026 = phi i32 [ %5, %entry ], [ %index.2, %bb20 ] ; [#uses=1] + %valpred.125 = phi i32 [ %2, %entry ], [ %valpred.2, %bb20 ] ; [#uses=1] + %step.024 = phi i32 [ %7, %entry ], [ %35, %bb20 ] ; [#uses=4] + %outp.030 = getelementptr i16* %outdata, i32 %indvar ; [#uses=1] + %9 = icmp eq i32 %bufferstep.028, 0 ; [#uses=1] + br i1 %9, label %bb2, label %bb3 + +bb2: ; preds = %bb + %10 = load i8* %inp.131, align 1 ; [#uses=1] + %11 = sext i8 %10 to i32 ; [#uses=2] + %12 = getelementptr i8* %inp.131, i32 1 ; [#uses=1] + %13 = ashr i32 %11, 4 ; [#uses=1] + br label %bb3 + +bb3: ; preds = %bb2, %bb + %inputbuffer.0 = phi i32 [ %11, %bb2 ], [ %inputbuffer.127, %bb ] ; [#uses=1] + %delta.0.in = phi i32 [ %13, %bb2 ], [ %inputbuffer.127, %bb ] ; [#uses=5] + %inp.0 = phi i8* [ %12, %bb2 ], [ %inp.131, %bb ] ; [#uses=1] + %delta.0 = and i32 %delta.0.in, 15 ; [#uses=1] + %tmp = xor i32 %bufferstep.028, 1 ; [#uses=1] + %14 = getelementptr [16 x i32]* @indexTable, i32 0, i32 %delta.0 ; [#uses=1] + %15 = load i32* %14, align 4 ; [#uses=1] + %16 = add i32 %15, %index.026 ; [#uses=2] + %17 = icmp slt i32 %16, 0 ; [#uses=1] + %index.1 = select i1 %17, i32 0, i32 %16 ; [#uses=2] + %18 = icmp sgt i32 %index.1, 88 ; [#uses=1] + %index.2 = select i1 %18, i32 88, i32 %index.1 ; [#uses=3] + %19 = and i32 %delta.0.in, 8 ; [#uses=1] + %20 = ashr i32 %step.024, 3 ; [#uses=1] + %21 = and i32 %delta.0.in, 4 ; [#uses=1] + %22 = icmp eq i32 %21, 0 ; [#uses=1] + %23 = select i1 %22, i32 0, i32 %step.024 ; [#uses=1] + %vpdiff.0 = add i32 %23, %20 ; [#uses=2] + %24 = and i32 %delta.0.in, 2 ; [#uses=1] + %25 = icmp eq i32 %24, 0 ; [#uses=1] + br i1 %25, label %bb11, label %bb10 + +bb10: ; preds = %bb3 + %26 = ashr i32 %step.024, 1 ; [#uses=1] + %27 = add i32 %vpdiff.0, %26 ; [#uses=1] + br label %bb11 + +bb11: ; preds = %bb10, %bb3 + %vpdiff.1 = phi i32 [ %27, %bb10 ], [ %vpdiff.0, %bb3 ] ; [#uses=2] + %28 = and i32 %delta.0.in, 1 ; [#uses=1] + %toBool = icmp eq i32 %28, 0 ; [#uses=1] + br i1 %toBool, label %bb13, label %bb12 + +bb12: ; preds = %bb11 + %29 = ashr i32 %step.024, 2 ; [#uses=1] + %30 = add i32 %vpdiff.1, %29 ; [#uses=1] + br label %bb13 + +bb13: ; preds = %bb12, %bb11 + %vpdiff.2 = phi i32 [ %30, %bb12 ], [ %vpdiff.1, %bb11 ] ; [#uses=2] + %31 = icmp eq i32 %19, 0 ; [#uses=1] + %tmp23 = sub i32 0, %vpdiff.2 ; [#uses=1] + %valpred.0.p = select i1 %31, i32 %vpdiff.2, i32 %tmp23 ; [#uses=1] + %valpred.0 = add i32 %valpred.0.p, %valpred.125 ; [#uses=3] + %32 = icmp sgt i32 %valpred.0, 32767 ; [#uses=1] + br i1 %32, label %bb20, label %bb18 + +bb18: ; preds = %bb13 + %33 = icmp slt i32 %valpred.0, -32768 ; [#uses=1] + br i1 %33, label %bb19, label %bb20 + +bb19: ; preds = %bb18 + br label %bb20 + +bb20: ; preds = %bb19, %bb18, %bb13 + %valpred.2 = phi i32 [ -32768, %bb19 ], [ 32767, %bb13 ], [ %valpred.0, %bb18 ] ; [#uses=3] + %34 = getelementptr [89 x i32]* @stepsizeTable, i32 0, i32 %index.2 ; [#uses=1] + %35 = load i32* %34, align 4 ; [#uses=1] + %36 = trunc i32 %valpred.2 to i16 ; [#uses=1] + store i16 %36, i16* %outp.030, align 2 + %indvar.next = add i32 %indvar, 1 ; [#uses=2] + %exitcond = icmp eq i32 %indvar.next, %len ; [#uses=1] + br i1 %exitcond, label %bb22, label %bb + +bb22: ; preds = %bb20, %entry + %index.0.lcssa = phi i32 [ %5, %entry ], [ %index.2, %bb20 ] ; [#uses=1] + %valpred.1.lcssa = phi i32 [ %2, %entry ], [ %valpred.2, %bb20 ] ; [#uses=1] + %37 = trunc i32 %valpred.1.lcssa to i16 ; [#uses=1] + store i16 %37, i16* %0, align 2 + %38 = trunc i32 %index.0.lcssa to i8 ; [#uses=1] + store i8 %38, i8* %3, align 2 + ret void +} + +define arm_apcscc i32 @main() nounwind { +entry: + br label %bb + +bb: ; preds = %bb3, %entry + %0 = tail call arm_apcscc i32 (...)* @read(i32 0, i8* getelementptr ([500 x i8]* @abuf, i32 0, i32 0), i32 500) nounwind ; [#uses=4] + %1 = icmp slt i32 %0, 0 ; [#uses=1] + br i1 %1, label %bb1, label %bb2 + +bb1: ; preds = %bb + tail call arm_apcscc void @perror(i8* getelementptr ([11 x i8]* @.str, i32 0, i32 0)) nounwind + ret i32 1 + +bb2: ; preds = %bb + %2 = icmp eq i32 %0, 0 ; [#uses=1] + br i1 %2, label %bb4, label %bb3 + +bb3: ; preds = %bb2 + %3 = shl i32 %0, 1 ; [#uses=1] + tail call arm_apcscc void @adpcm_decoder(i8* getelementptr ([500 x i8]* @abuf, i32 0, i32 0), i16* getelementptr ([1000 x i16]* @sbuf, i32 0, i32 0), i32 %3, %struct.adpcm_state* @state) nounwind + %4 = shl i32 %0, 2 ; [#uses=1] + %5 = tail call arm_apcscc i32 (...)* @write(i32 1, i16* getelementptr ([1000 x i16]* @sbuf, i32 0, i32 0), i32 %4) nounwind ; [#uses=0] + br label %bb + +bb4: ; preds = %bb2 + %6 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] + %7 = load i16* getelementptr (%struct.adpcm_state* @state, i32 0, i32 0), align 4 ; [#uses=1] + %8 = sext i16 %7 to i32 ; [#uses=1] + %9 = load i8* getelementptr (%struct.adpcm_state* @state, i32 0, i32 1), align 2 ; [#uses=1] + %10 = sext i8 %9 to i32 ; [#uses=1] + %11 = tail call arm_apcscc i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %6, i8* getelementptr ([28 x i8]* @.str1, i32 0, i32 0), i32 %8, i32 %10) nounwind ; [#uses=0] + ret i32 0 +} + +declare arm_apcscc i32 @read(...) + +declare arm_apcscc void @perror(i8* nocapture) nounwind + +declare arm_apcscc i32 @write(...) + +declare arm_apcscc i32 @fprintf(%struct.FILE* nocapture, i8* nocapture, ...) nounwind Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=76398&r1=76397&r2=76398&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Mon Jul 20 01:10:07 2009 @@ -259,6 +259,8 @@ LastEmitted = VarEnd; } } + + AddLiteralString("\\n"); } /// MatchesAllButOneOp - If this instruction is exactly identical to the @@ -355,6 +357,7 @@ } O << "\n"; } + O << " break;\n"; } @@ -382,12 +385,8 @@ Command = " " + Inst->Operands[0].getCode() + "\n"; // If this is the last operand, emit a return. - if (Inst->Operands.size() == 1) { - Command += " EmitComments(*MI);\n"; - // Print the final newline - Command += " O << \"\\n\";\n"; + if (Inst->Operands.size() == 1) Command += " return true;\n"; - } // Check to see if we already have 'Command' in UniqueOperandCommands. // If not, add it. @@ -453,12 +452,8 @@ std::string Command = " " + FirstInst->Operands[Op].getCode() + "\n"; // If this is the last operand, emit a return after the code. - if (FirstInst->Operands.size() == Op+1) { - Command += " EmitComments(*MI);\n"; - // Print the final newline - Command += " O << \"\\n\";\n"; + if (FirstInst->Operands.size() == Op+1) Command += " return true;\n"; - } UniqueOperandCommands[CommandIdx] += Command; InstOpsUsed[CommandIdx]++; @@ -569,11 +564,10 @@ // For the first operand check, add a default value for instructions with // just opcode strings to use. if (isFirst) { - // Do the post instruction processing and print the final newline - UniqueOperandCommands.push_back(" EmitComments(*MI);\n O << \"\\n\";\n return true;\n"); + UniqueOperandCommands.push_back(" return true;\n"); isFirst = false; } - + std::vector InstIdxs; std::vector NumInstOpsHandled; FindUniqueOperandCommands(UniqueOperandCommands, InstIdxs, @@ -745,9 +739,6 @@ EmitInstructions(Instructions, O); O << " }\n"; - O << " EmitComments(*MI);\n"; - // Print the final newline - O << " O << \"\\n\";\n"; O << " return true;\n"; } From sabre at nondot.org Mon Jul 20 01:14:25 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 06:14:25 -0000 Subject: [llvm-commits] [llvm] r76399 - in /llvm/trunk: docs/LangRef.html include/llvm/CodeGen/MachineModuleInfo.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/AsmPrinter/DwarfException.cpp lib/CodeGen/MachineModuleInfo.cpp lib/Transforms/IPO/Internalize.cpp lib/Transforms/IPO/StripSymbols.cpp test/CodeGen/X86/compiler_used.ll Message-ID: <200907200614.n6K6EQRh002372@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 01:14:25 2009 New Revision: 76399 URL: http://llvm.org/viewvc/llvm-project?rev=76399&view=rev Log: implement a new magic global "llvm.compiler.used" which is like llvm.used, but doesn't cause ".no_dead_strip" to be emitted on darwin. Added: llvm/trunk/test/CodeGen/X86/compiler_used.ll Modified: llvm/trunk/docs/LangRef.html llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp llvm/trunk/lib/Transforms/IPO/Internalize.cpp llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=76399&r1=76398&r2=76399&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Mon Jul 20 01:14:25 2009 @@ -94,6 +94,8 @@
    2. Intrinsic Global Variables
      1. The 'llvm.used' Global Variable
      2. +
      3. The 'llvm.compiler.used' + Global Variable
      4. The 'llvm.global_ctors' Global Variable
      5. The 'llvm.global_dtors' @@ -2168,8 +2170,9 @@

        LLVM has a number of "magic" global variables that contain data that affect code generation or other IR semantics. These are documented here. All globals -of this sort should have a section specified as "llvm.metadata". This section -and all globals that start with "llvm." are reserved for LLVM.

        +of this sort should have a section specified as "llvm.metadata". This +section and all globals that start with "llvm." are reserved for use +by LLVM.

        @@ -2208,6 +2211,24 @@ + +
        + +

        The @llvm.compiler.used directive is the same as the +@llvm.used directive, except that it only prevents the compiler from +touching the symbol. On targets that support it, this allows an intelligent +linker to optimize references to the symbol without being impeded as it would be +by @llvm.used.

        + +

        This is a rare construct that should only be used in rare circumstances, and +should not be exposed to source languages.

        + +
        + + + Modified: llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h?rev=76399&r1=76398&r2=76399&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h Mon Jul 20 01:14:25 2009 @@ -112,8 +112,9 @@ // common EH frames. std::vector Personalities; - // UsedFunctions - the functions in the llvm.used list in a more easily - // searchable format. + /// UsedFunctions - The functions in the @llvm.used list in a more easily + /// searchable format. This does not include the functions in + /// llvm.compiler.used. SmallPtrSet UsedFunctions; /// UsedDbgLabels - labels are used by debug info entries. @@ -240,9 +241,11 @@ return Personalities; } - // UsedFunctions - Return set of the functions in the llvm.used list. - const SmallPtrSet& getUsedFunctions() const { - return UsedFunctions; + /// isUsedFunction - Return true if the functions in the llvm.used list. This + /// does not return true for things in llvm.compiler.used unless they are also + /// in llvm.used. + bool isUsedFunction(const Function *F) { + return UsedFunctions.count(F); } /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=76399&r1=76398&r2=76399&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Jul 20 01:14:25 2009 @@ -466,13 +466,13 @@ /// special global used by LLVM. If so, emit it and return true, otherwise /// do nothing and return false. bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) { - if (GV->getName() == "llvm.used") { + if (GV->isName("llvm.used")) { if (TAI->getUsedDirective() != 0) // No need to emit this at all. EmitLLVMUsedList(GV->getInitializer()); return true; } - // Ignore debug and non-emitted data. + // Ignore debug and non-emitted data. This handles llvm.compiler.used. if (GV->getSection() == "llvm.metadata" || GV->hasAvailableExternallyLinkage()) return true; Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=76399&r1=76398&r2=76399&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Mon Jul 20 01:14:25 2009 @@ -229,7 +229,7 @@ // retains the function in this case, and there is code around that depends // on unused functions (calling undefined externals) being dead-stripped to // link correctly. Yes, there really is. - if (MMI->getUsedFunctions().count(EHFrameInfo.function)) + if (MMI->isUsedFunction(EHFrameInfo.function)) if (const char *UsedDirective = TAI->getUsedDirective()) O << UsedDirective << EHFrameInfo.FnName << "\n\n"; } Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp?rev=76399&r1=76398&r2=76399&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Mon Jul 20 01:14:25 2009 @@ -88,7 +88,8 @@ /// AnalyzeModule - Scan the module for global debug information. /// void MachineModuleInfo::AnalyzeModule(Module &M) { - // Insert functions in the llvm.used array into UsedFunctions. + // Insert functions in the llvm.used array (but not llvm.compiler.used) into + // UsedFunctions. GlobalVariable *GV = M.getGlobalVariable("llvm.used"); if (!GV || !GV->hasInitializer()) return; Modified: llvm/trunk/lib/Transforms/IPO/Internalize.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Internalize.cpp?rev=76399&r1=76398&r2=76399&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/Internalize.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/Internalize.cpp Mon Jul 20 01:14:25 2009 @@ -138,7 +138,9 @@ // Never internalize the llvm.used symbol. It is used to implement // attribute((used)). + // FIXME: Shouldn't this just filter on llvm.metadata section?? ExternalNames.insert("llvm.used"); + ExternalNames.insert("llvm.compiler.used"); // Never internalize anchors used by the machine module info, else the info // won't find them. (see MachineModuleInfo.) Modified: llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp?rev=76399&r1=76398&r2=76399&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp Mon Jul 20 01:14:25 2009 @@ -157,32 +157,26 @@ } /// Find values that are marked as llvm.used. -void findUsedValues(Module &M, - SmallPtrSet& llvmUsedValues) { - if (GlobalVariable *LLVMUsed = M.getGlobalVariable("llvm.used")) { - llvmUsedValues.insert(LLVMUsed); - // Collect values that are preserved as per explicit request. - // llvm.used is used to list these values. - if (ConstantArray *Inits = - dyn_cast(LLVMUsed->getInitializer())) { - for (unsigned i = 0, e = Inits->getNumOperands(); i != e; ++i) { - if (GlobalValue *GV = dyn_cast(Inits->getOperand(i))) - llvmUsedValues.insert(GV); - else if (ConstantExpr *CE = - dyn_cast(Inits->getOperand(i))) - if (CE->getOpcode() == Instruction::BitCast) - if (GlobalValue *GV = dyn_cast(CE->getOperand(0))) - llvmUsedValues.insert(GV); - } - } - } +static void findUsedValues(GlobalVariable *LLVMUsed, + SmallPtrSet &UsedValues) { + if (LLVMUsed == 0) return; + UsedValues.insert(LLVMUsed); + + ConstantArray *Inits = dyn_cast(LLVMUsed->getInitializer()); + if (Inits == 0) return; + + for (unsigned i = 0, e = Inits->getNumOperands(); i != e; ++i) + if (GlobalValue *GV = + dyn_cast(Inits->getOperand(i)->stripPointerCasts())) + UsedValues.insert(GV); } /// StripSymbolNames - Strip symbol names. bool StripSymbolNames(Module &M, bool PreserveDbgInfo) { SmallPtrSet llvmUsedValues; - findUsedValues(M, llvmUsedValues); + findUsedValues(M.getGlobalVariable("llvm.used"), llvmUsedValues); + findUsedValues(M.getGlobalVariable("llvm.compiler.used"), llvmUsedValues); for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) { @@ -210,7 +204,8 @@ bool StripDebugInfo(Module &M) { SmallPtrSet llvmUsedValues; - findUsedValues(M, llvmUsedValues); + findUsedValues(M.getGlobalVariable("llvm.used"), llvmUsedValues); + findUsedValues(M.getGlobalVariable("llvm.compiler.used"), llvmUsedValues); SmallVector CUs; SmallVector GVs; Added: llvm/trunk/test/CodeGen/X86/compiler_used.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/compiler_used.ll?rev=76399&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/compiler_used.ll (added) +++ llvm/trunk/test/CodeGen/X86/compiler_used.ll Mon Jul 20 01:14:25 2009 @@ -0,0 +1,9 @@ +; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin9 | grep no_dead_strip | count 1 +; We should have a .no_dead_strip directive for Z but not for X/Y. + + at X = internal global i8 4 + at Y = internal global i32 123 + at Z = internal global i8 4 + + at llvm.used = appending global [1 x i8*] [ i8* @Z ], section "llvm.metadata" + at llvm.compiler_used = appending global [2 x i8*] [ i8* @X, i8* bitcast (i32* @Y to i8*)], section "llvm.metadata" From baldrick at free.fr Mon Jul 20 01:29:33 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 06:29:33 -0000 Subject: [llvm-commits] [gcc-plugin] r76400 - /gcc-plugin/trunk/gcc-patches/extern-c.diff Message-ID: <200907200629.n6K6TXLY002889@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 01:29:33 2009 New Revision: 76400 URL: http://llvm.org/viewvc/llvm-project?rev=76400&view=rev Log: Yet more 'extern "C"' wrappers. Modified: gcc-plugin/trunk/gcc-patches/extern-c.diff Modified: gcc-plugin/trunk/gcc-patches/extern-c.diff URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/gcc-patches/extern-c.diff?rev=76400&r1=76399&r2=76400&view=diff ============================================================================== --- gcc-plugin/trunk/gcc-patches/extern-c.diff (original) +++ gcc-plugin/trunk/gcc-patches/extern-c.diff Mon Jul 20 01:29:33 2009 @@ -1,7 +1,7 @@ Index: gcc.fsf.master/gcc/flags.h =================================================================== ---- gcc.fsf.master.orig/gcc/flags.h 2009-07-16 06:29:31.411594330 +0200 -+++ gcc.fsf.master/gcc/flags.h 2009-07-16 14:18:26.386942015 +0200 +--- gcc.fsf.master.orig/gcc/flags.h 2009-07-20 07:06:07.888082273 +0200 ++++ gcc.fsf.master/gcc/flags.h 2009-07-20 07:06:41.568127963 +0200 @@ -26,6 +26,10 @@ #include "options.h" #include "real.h" @@ -13,7 +13,7 @@ enum debug_info_type { NO_DEBUG, /* Write no debug info. */ -@@ -398,4 +402,8 @@ +@@ -401,4 +405,8 @@ /* Whether to emit an overflow warning whose code is C. */ #define issue_strict_overflow_warning(c) (warn_strict_overflow >= (int) (c)) @@ -24,8 +24,8 @@ #endif /* ! GCC_FLAGS_H */ Index: gcc.fsf.master/gcc/opth-gen.awk =================================================================== ---- gcc.fsf.master.orig/gcc/opth-gen.awk 2009-07-16 06:29:31.375638464 +0200 -+++ gcc.fsf.master/gcc/opth-gen.awk 2009-07-16 14:18:26.411868822 +0200 +--- gcc.fsf.master.orig/gcc/opth-gen.awk 2009-07-20 07:03:59.825100430 +0200 ++++ gcc.fsf.master/gcc/opth-gen.awk 2009-07-20 07:06:41.572076368 +0200 @@ -66,6 +66,10 @@ print "#ifndef OPTIONS_H" print "#define OPTIONS_H" @@ -49,8 +49,8 @@ } Index: gcc.fsf.master/gcc/tree.h =================================================================== ---- gcc.fsf.master.orig/gcc/tree.h 2009-07-16 06:41:02.916597755 +0200 -+++ gcc.fsf.master/gcc/tree.h 2009-07-16 14:18:26.454840309 +0200 +--- gcc.fsf.master.orig/gcc/tree.h 2009-07-20 07:06:07.960172997 +0200 ++++ gcc.fsf.master/gcc/tree.h 2009-07-20 07:06:41.576076736 +0200 @@ -31,6 +31,10 @@ #include "alias.h" #include "options.h" @@ -62,7 +62,7 @@ /* Codes of tree nodes */ #define DEFTREECODE(SYM, STRING, TYPE, NARGS) SYM, -@@ -5293,4 +5297,8 @@ +@@ -5344,4 +5348,8 @@ for ((arg) = first_const_call_expr_arg ((call), &(iter)); (arg); \ (arg) = next_const_call_expr_arg (&(iter))) @@ -73,8 +73,8 @@ #endif /* GCC_TREE_H */ Index: gcc.fsf.master/gcc/tree-flow.h =================================================================== ---- gcc.fsf.master.orig/gcc/tree-flow.h 2009-07-16 06:41:02.956597999 +0200 -+++ gcc.fsf.master/gcc/tree-flow.h 2009-07-16 14:18:26.470942184 +0200 +--- gcc.fsf.master.orig/gcc/tree-flow.h 2009-07-20 07:04:00.009074849 +0200 ++++ gcc.fsf.master/gcc/tree-flow.h 2009-07-20 07:06:41.576076736 +0200 @@ -32,6 +32,10 @@ #include "ipa-reference.h" #include "tree-ssa-alias.h" @@ -97,8 +97,8 @@ #endif /* _TREE_FLOW_H */ Index: gcc.fsf.master/gcc/gimple.h =================================================================== ---- gcc.fsf.master.orig/gcc/gimple.h 2009-07-16 06:29:31.471600868 +0200 -+++ gcc.fsf.master/gcc/gimple.h 2009-07-16 14:18:26.490842575 +0200 +--- gcc.fsf.master.orig/gcc/gimple.h 2009-07-20 07:06:08.300077288 +0200 ++++ gcc.fsf.master/gcc/gimple.h 2009-07-20 07:06:41.580076966 +0200 @@ -30,6 +30,10 @@ #include "basic-block.h" #include "tree-ssa-operands.h" @@ -110,7 +110,7 @@ DEF_VEC_P(gimple); DEF_VEC_ALLOC_P(gimple,heap); DEF_VEC_ALLOC_P(gimple,gc); -@@ -4486,4 +4490,8 @@ +@@ -4485,4 +4489,8 @@ extern void dump_gimple_statistics (void); @@ -121,8 +121,8 @@ #endif /* GCC_GIMPLE_H */ Index: gcc.fsf.master/gcc/configure =================================================================== ---- gcc.fsf.master.orig/gcc/configure 2009-07-16 06:41:02.920597417 +0200 -+++ gcc.fsf.master/gcc/configure 2009-07-16 14:18:26.538840612 +0200 +--- gcc.fsf.master.orig/gcc/configure 2009-07-20 07:04:00.253070167 +0200 ++++ gcc.fsf.master/gcc/configure 2009-07-20 07:06:41.592072275 +0200 @@ -13982,6 +13982,10 @@ cat > plugin-version.h < plugin-version.h < Author: evancheng Date: Mon Jul 20 01:59:32 2009 New Revision: 76401 URL: http://llvm.org/viewvc/llvm-project?rev=76401&view=rev Log: Fix PR4567. Thumb1 target was using the wrong instruction to handle sp = sub fp, #c. Modified: llvm/trunk/lib/Target/ARM/README-Thumb.txt llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp Modified: llvm/trunk/lib/Target/ARM/README-Thumb.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/README-Thumb.txt?rev=76401&r1=76400&r2=76401&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/README-Thumb.txt (original) +++ llvm/trunk/lib/Target/ARM/README-Thumb.txt Mon Jul 20 01:59:32 2009 @@ -244,3 +244,7 @@ Make use of hi register variants of cmp: tCMPhir / tCMPZhir. //===---------------------------------------------------------------------===// + +Thumb1 immediate field sometimes keep pre-scaled values. See +Thumb1RegisterInfo::eliminateFrameIndex. This is inconsistent from ARM and +Thumb2. Modified: llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp?rev=76401&r1=76400&r2=76401&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp Mon Jul 20 01:59:32 2009 @@ -231,8 +231,16 @@ if (DestReg != BaseReg) DstNotEqBase = true; NumBits = 8; - Opc = isSub ? ARM::tSUBi8 : ARM::tADDi8; - NeedPred = NeedCC = true; + if (DestReg == ARM::SP) { + Opc = isSub ? ARM::tSUBspi : ARM::tADDspi; + assert(isMul4 && "Thumb sp inc / dec size must be multiple of 4!"); + NumBits = 7; + Scale = 4; + } else { + Opc = isSub ? ARM::tSUBi8 : ARM::tADDi8; + NumBits = 8; + NeedPred = NeedCC = true; + } isTwoAddr = true; } @@ -447,7 +455,7 @@ removeOperands(MI, i); MachineInstrBuilder MIB(&MI); AddDefaultPred(AddDefaultT1CC(MIB).addReg(FrameReg) - .addImm(Offset/Scale)); + .addImm(Offset / Scale)); } else { MI.getOperand(i).ChangeToRegister(FrameReg, false); MI.getOperand(i+1).ChangeToImmediate(Offset / Scale); From daniel at zuster.org Mon Jul 20 02:01:01 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 20 Jul 2009 07:01:01 -0000 Subject: [llvm-commits] [llvm] r76402 - /llvm/trunk/tools/bugpoint/bugpoint.cpp Message-ID: <200907200701.n6K711bo003903@zion.cs.uiuc.edu> Author: ddunbar Date: Mon Jul 20 02:01:01 2009 New Revision: 76402 URL: http://llvm.org/viewvc/llvm-project?rev=76402&view=rev Log: Add -std-{compile,link}-opts to bugpoint. - Sheesh. Modified: llvm/trunk/tools/bugpoint/bugpoint.cpp Modified: llvm/trunk/tools/bugpoint/bugpoint.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/bugpoint.cpp?rev=76402&r1=76401&r2=76402&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/bugpoint.cpp (original) +++ llvm/trunk/tools/bugpoint/bugpoint.cpp Mon Jul 20 02:01:01 2009 @@ -22,6 +22,7 @@ #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/PluginLoader.h" #include "llvm/Support/PrettyStackTrace.h" +#include "llvm/Support/StandardPasses.h" #include "llvm/System/Process.h" #include "llvm/System/Signals.h" #include "llvm/LinkAllVMCore.h" @@ -57,6 +58,14 @@ static cl::list PassList(cl::desc("Passes available:"), cl::ZeroOrMore); +static cl::opt +StandardCompileOpts("std-compile-opts", + cl::desc("Include the standard compile time optimizations")); + +static cl::opt +StandardLinkOpts("std-link-opts", + cl::desc("Include the standard link time optimizations")); + /// BugpointIsInterrupted - Set to true when the user presses ctrl-c. bool llvm::BugpointIsInterrupted = false; @@ -64,6 +73,20 @@ BugpointIsInterrupted = true; } +// Hack to capture a pass list. +namespace { + class AddToDriver : public PassManager { + BugDriver &D; + public: + AddToDriver(BugDriver &_D) : D(_D) {} + + virtual void add(Pass *P) { + const PassInfo *PI = P->getPassInfo(); + D.addPasses(&PI, &PI + 1); + } + }; +} + int main(int argc, char **argv) { llvm::sys::PrintStackTraceOnErrorSignal(); llvm::PrettyStackTraceProgram X(argc, argv); @@ -77,6 +100,23 @@ LLVMContext& Context = getGlobalContext(); BugDriver D(argv[0], AsChild, FindBugs, TimeoutValue, MemoryLimit, Context); if (D.addSources(InputFilenames)) return 1; + + AddToDriver PM(D); + if (StandardCompileOpts) { + createStandardModulePasses(&PM, 3, + /*OptimizeSize=*/ false, + /*UnitAtATime=*/ true, + /*UnrollLoops=*/ true, + /*SimplifyLibCalls=*/ true, + /*HaveExceptions=*/ true, + createFunctionInliningPass()); + } + + if (StandardLinkOpts) + createStandardLTOPasses(&PM, /*Internalize=*/false, + /*RunInliner=*/true, + /*VerifyEach=*/false); + D.addPasses(PassList.begin(), PassList.end()); // Bugpoint has the ability of generating a plethora of core files, so to From baldrick at free.fr Mon Jul 20 03:06:09 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 08:06:09 -0000 Subject: [llvm-commits] [gcc-plugin] r76403 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907200806.n6K86Cjk013857@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 03:05:30 2009 New Revision: 76403 URL: http://llvm.org/viewvc/llvm-project?rev=76403&view=rev Log: Copied from llvm-gcc revision 75868. Added: gcc-plugin/trunk/llvm-backend.cpp - copied unchanged from r75868, llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp From baldrick at free.fr Mon Jul 20 03:08:20 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 08:08:20 -0000 Subject: [llvm-commits] [gcc-plugin] r76404 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907200808.n6K88L8b013966@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 03:08:17 2009 New Revision: 76404 URL: http://llvm.org/viewvc/llvm-project?rev=76404&view=rev Log: Remove irrelevant comment. Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76404&r1=76403&r2=76404&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 03:08:17 2009 @@ -1,4 +1,3 @@ -/* LLVM LOCAL begin (ENTIRE FILE!) */ /* High-level LLVM backend interface Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. Contributed by Chris Lattner (sabre at nondot.org) @@ -1775,4 +1774,3 @@ const char* Name = IDENTIFIER_POINTER(DECL_ASSEMBLER_NAME(decl)); return (*Name==1) ? Name+1 : Name; } -/* LLVM LOCAL end (ENTIRE FILE!) */ From baldrick at free.fr Mon Jul 20 03:14:24 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 08:14:24 -0000 Subject: [llvm-commits] [gcc-plugin] r76405 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907200814.n6K8ER4x014151@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 03:14:09 2009 New Revision: 76405 URL: http://llvm.org/viewvc/llvm-project?rev=76405&view=rev Log: Normalize header inclusions. If anyone is wondering why they go in this order, the reason is that gcc poisons a bunch of routines (such as malloc), so if gcc headers are included too early then the compiler errors out on various llvm and system headers. Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76405&r1=76404&r2=76405&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 03:14:09 2009 @@ -19,9 +19,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "llvm-internal.h" -#include "llvm-debug.h" -#include "llvm-file-ostream.h" +// LLVM headers #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/LLVMContext.h" @@ -52,17 +50,24 @@ #include "llvm/Support/FormattedStream.h" #include "llvm/System/Program.h" +// System headers #include + +// GCC headers #undef VISIBILITY_HIDDEN -extern "C" { +#define IN_GCC + #include "config.h" +extern "C" { #include "system.h" +} #include "coretypes.h" -#include "flags.h" +#include "target.h" #include "tree.h" + +#include "flags.h" #include "diagnostic.h" #include "output.h" -#include "target.h" #include "toplev.h" #include "timevar.h" #include "tm.h" @@ -71,7 +76,12 @@ #include "langhooks.h" #include "cgraph.h" #include "params.h" -} + +// Plugin headers +#include "llvm-internal.h" +#include "llvm-debug.h" +#include "llvm-file-ostream.h" +#include "bits_and_bobs.h" // Non-zero if bytecode from PCH is successfully read. int flag_llvm_pch_read; From baldrick at free.fr Mon Jul 20 03:17:48 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 08:17:48 -0000 Subject: [llvm-commits] [gcc-plugin] r76406 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907200817.n6K8HoHo014238@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 03:17:46 2009 New Revision: 76406 URL: http://llvm.org/viewvc/llvm-project?rev=76406&view=rev Log: Comment out the gcc -> llvm mapping logic for the moment, since this will have to be done differently. Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76406&r1=76405&r2=76406&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 03:17:46 2009 @@ -124,203 +124,203 @@ static void createPerModuleOptimizationPasses(); static void destroyOptimizationPasses(); -//===----------------------------------------------------------------------===// -// Matching LLVM Values with GCC DECL trees -//===----------------------------------------------------------------------===// -// -// LLVMValues is a vector of LLVM Values. GCC tree nodes keep track of LLVM -// Values using this vector's index. It is easier to save and restore the index -// than the LLVM Value pointer while using PCH. - -// Collection of LLVM Values -static std::vector LLVMValues; -typedef DenseMap LLVMValuesMapTy; -static LLVMValuesMapTy LLVMValuesMap; - -/// LocalLLVMValueIDs - This is the set of local IDs we have in our mapping, -/// this allows us to efficiently identify and remove them. Local IDs are IDs -/// for values that are local to the current function being processed. These do -/// not need to go into the PCH file, but DECL_LLVM still needs a valid index -/// while converting the function. Using "Local IDs" allows the IDs for -/// function-local decls to be recycled after the function is done. -static std::vector LocalLLVMValueIDs; - -// Remember the LLVM value for GCC tree node. -void llvm_set_decl(tree Tr, Value *V) { - - // If there is not any value then do not add new LLVMValues entry. - // However clear Tr index if it is non zero. - if (!V) { - if (GET_DECL_LLVM_INDEX(Tr)) - SET_DECL_LLVM_INDEX(Tr, 0); - return; - } - - unsigned &ValueSlot = LLVMValuesMap[V]; - if (ValueSlot) { - // Already in map - SET_DECL_LLVM_INDEX(Tr, ValueSlot); - return; - } - - LLVMValues.push_back(V); - unsigned Index = LLVMValues.size(); - SET_DECL_LLVM_INDEX(Tr, Index); - LLVMValuesMap[V] = Index; - - // Remember local values. - if (!isa(V)) - LocalLLVMValueIDs.push_back(Index); -} - -// Return TRUE if there is a LLVM Value associate with GCC tree node. -bool llvm_set_decl_p(tree Tr) { - unsigned Index = GET_DECL_LLVM_INDEX(Tr); - if (Index == 0) - return false; - - return LLVMValues[Index - 1] != 0; -} - -// Get LLVM Value for the GCC tree node based on LLVMValues vector index. -// If there is not any value associated then use make_decl_llvm() to -// make LLVM value. When GCC tree node is initialized, it has 0 as the -// index value. This is why all recorded indices are offset by 1. -Value *llvm_get_decl(tree Tr) { - - unsigned Index = GET_DECL_LLVM_INDEX(Tr); - if (Index == 0) { - make_decl_llvm(Tr); - Index = GET_DECL_LLVM_INDEX(Tr); - - // If there was an error, we may have disabled creating LLVM values. - if (Index == 0) return 0; - } - assert((Index - 1) < LLVMValues.size() && "Invalid LLVM value index"); - assert(LLVMValues[Index - 1] && "Trying to use deleted LLVM value!"); - - return LLVMValues[Index - 1]; -} - -/// changeLLVMConstant - Replace Old with New everywhere, updating all maps -/// (except for AttributeAnnotateGlobals, which is a different kind of animal). -/// At this point we know that New is not in any of these maps. -void changeLLVMConstant(Constant *Old, Constant *New) { - assert(Old->use_empty() && "Old value has uses!"); - - if (AttributeUsedGlobals.count(Old)) { - AttributeUsedGlobals.remove(Old); - AttributeUsedGlobals.insert(New); - } - - for (unsigned i = 0, e = StaticCtors.size(); i != e; ++i) { - if (StaticCtors[i].first == Old) - StaticCtors[i].first = New; - } - - for (unsigned i = 0, e = StaticDtors.size(); i != e; ++i) { - if (StaticDtors[i].first == Old) - StaticDtors[i].first = New; - } - - assert(!LLVMValuesMap.count(New) && "New cannot be in the LLVMValues map!"); - - // Find Old in the table. - LLVMValuesMapTy::iterator I = LLVMValuesMap.find(Old); - if (I == LLVMValuesMap.end()) return; - - unsigned Idx = I->second-1; - assert(Idx < LLVMValues.size() && "Out of range index!"); - assert(LLVMValues[Idx] == Old && "Inconsistent LLVMValues mapping!"); - - LLVMValues[Idx] = New; - - // Remove the old value from the value map. - LLVMValuesMap.erase(I); - - // Insert the new value into the value map. We know that it can't already - // exist in the mapping. - if (New) - LLVMValuesMap[New] = Idx+1; -} - -// Read LLVM Types string table -void readLLVMValues() { - GlobalValue *V = TheModule->getNamedGlobal("llvm.pch.values"); - if (!V) - return; - - GlobalVariable *GV = cast(V); - ConstantStruct *ValuesFromPCH = cast(GV->getOperand(0)); - - for (unsigned i = 0; i < ValuesFromPCH->getNumOperands(); ++i) { - Value *Va = ValuesFromPCH->getOperand(i); - - if (!Va) { - // If V is empty then insert NULL to represent empty entries. - LLVMValues.push_back(Va); - continue; - } - if (ConstantArray *CA = dyn_cast(Va)) { - std::string Str = CA->getAsString(); - Va = TheModule->getValueSymbolTable().lookup(Str); - } - assert (Va != NULL && "Invalid Value in LLVMValues string table"); - LLVMValues.push_back(Va); - } - - // Now, llvm.pch.values is not required so remove it from the symbol table. - GV->eraseFromParent(); -} - -// GCC tree's uses LLVMValues vector's index to reach LLVM Values. -// Create a string table to hold these LLVM Values' names. This string -// table will be used to recreate LTypes vector after loading PCH. -void writeLLVMValues() { - if (LLVMValues.empty()) - return; - - LLVMContext &Context = getGlobalContext(); - - std::vector ValuesForPCH; - for (std::vector::iterator I = LLVMValues.begin(), - E = LLVMValues.end(); I != E; ++I) { - if (Constant *C = dyn_cast_or_null(*I)) - ValuesForPCH.push_back(C); - else - // Non constant values, e.g. arguments, are not at global scope. - // When PCH is read, only global scope values are used. - ValuesForPCH.push_back(Context.getNullValue(Type::Int32Ty)); - } - - // Create string table. - Constant *LLVMValuesTable = Context.getConstantStruct(ValuesForPCH, false); - - // Create variable to hold this string table. - new GlobalVariable(*TheModule, LLVMValuesTable->getType(), true, - GlobalValue::ExternalLinkage, - LLVMValuesTable, - "llvm.pch.values"); -} - -/// eraseLocalLLVMValues - drop all non-global values from the LLVM values map. -void eraseLocalLLVMValues() { - // Erase all the local values, these are stored in LocalLLVMValueIDs. - while (!LocalLLVMValueIDs.empty()) { - unsigned Idx = LocalLLVMValueIDs.back()-1; - LocalLLVMValueIDs.pop_back(); - - if (Value *V = LLVMValues[Idx]) { - assert(!isa(V) && "Found global value"); - LLVMValuesMap.erase(V); - } - - if (Idx == LLVMValues.size()-1) - LLVMValues.pop_back(); - else - LLVMValues[Idx] = 0; - } -} +//TODO//===----------------------------------------------------------------------===// +//TODO// Matching LLVM Values with GCC DECL trees +//TODO//===----------------------------------------------------------------------===// +//TODO// +//TODO// LLVMValues is a vector of LLVM Values. GCC tree nodes keep track of LLVM +//TODO// Values using this vector's index. It is easier to save and restore the index +//TODO// than the LLVM Value pointer while using PCH. +//TODO +//TODO// Collection of LLVM Values +//TODOstatic std::vector LLVMValues; +//TODOtypedef DenseMap LLVMValuesMapTy; +//TODOstatic LLVMValuesMapTy LLVMValuesMap; +//TODO +//TODO/// LocalLLVMValueIDs - This is the set of local IDs we have in our mapping, +//TODO/// this allows us to efficiently identify and remove them. Local IDs are IDs +//TODO/// for values that are local to the current function being processed. These do +//TODO/// not need to go into the PCH file, but DECL_LLVM still needs a valid index +//TODO/// while converting the function. Using "Local IDs" allows the IDs for +//TODO/// function-local decls to be recycled after the function is done. +//TODOstatic std::vector LocalLLVMValueIDs; +//TODO +//TODO// Remember the LLVM value for GCC tree node. +//TODOvoid llvm_set_decl(tree Tr, Value *V) { +//TODO +//TODO // If there is not any value then do not add new LLVMValues entry. +//TODO // However clear Tr index if it is non zero. +//TODO if (!V) { +//TODO if (GET_DECL_LLVM_INDEX(Tr)) +//TODO SET_DECL_LLVM_INDEX(Tr, 0); +//TODO return; +//TODO } +//TODO +//TODO unsigned &ValueSlot = LLVMValuesMap[V]; +//TODO if (ValueSlot) { +//TODO // Already in map +//TODO SET_DECL_LLVM_INDEX(Tr, ValueSlot); +//TODO return; +//TODO } +//TODO +//TODO LLVMValues.push_back(V); +//TODO unsigned Index = LLVMValues.size(); +//TODO SET_DECL_LLVM_INDEX(Tr, Index); +//TODO LLVMValuesMap[V] = Index; +//TODO +//TODO // Remember local values. +//TODO if (!isa(V)) +//TODO LocalLLVMValueIDs.push_back(Index); +//TODO} +//TODO +//TODO// Return TRUE if there is a LLVM Value associate with GCC tree node. +//TODObool llvm_set_decl_p(tree Tr) { +//TODO unsigned Index = GET_DECL_LLVM_INDEX(Tr); +//TODO if (Index == 0) +//TODO return false; +//TODO +//TODO return LLVMValues[Index - 1] != 0; +//TODO} +//TODO +//TODO// Get LLVM Value for the GCC tree node based on LLVMValues vector index. +//TODO// If there is not any value associated then use make_decl_llvm() to +//TODO// make LLVM value. When GCC tree node is initialized, it has 0 as the +//TODO// index value. This is why all recorded indices are offset by 1. +//TODOValue *llvm_get_decl(tree Tr) { +//TODO +//TODO unsigned Index = GET_DECL_LLVM_INDEX(Tr); +//TODO if (Index == 0) { +//TODO make_decl_llvm(Tr); +//TODO Index = GET_DECL_LLVM_INDEX(Tr); +//TODO +//TODO // If there was an error, we may have disabled creating LLVM values. +//TODO if (Index == 0) return 0; +//TODO } +//TODO assert((Index - 1) < LLVMValues.size() && "Invalid LLVM value index"); +//TODO assert(LLVMValues[Index - 1] && "Trying to use deleted LLVM value!"); +//TODO +//TODO return LLVMValues[Index - 1]; +//TODO} +//TODO +//TODO/// changeLLVMConstant - Replace Old with New everywhere, updating all maps +//TODO/// (except for AttributeAnnotateGlobals, which is a different kind of animal). +//TODO/// At this point we know that New is not in any of these maps. +//TODOvoid changeLLVMConstant(Constant *Old, Constant *New) { +//TODO assert(Old->use_empty() && "Old value has uses!"); +//TODO +//TODO if (AttributeUsedGlobals.count(Old)) { +//TODO AttributeUsedGlobals.remove(Old); +//TODO AttributeUsedGlobals.insert(New); +//TODO } +//TODO +//TODO for (unsigned i = 0, e = StaticCtors.size(); i != e; ++i) { +//TODO if (StaticCtors[i].first == Old) +//TODO StaticCtors[i].first = New; +//TODO } +//TODO +//TODO for (unsigned i = 0, e = StaticDtors.size(); i != e; ++i) { +//TODO if (StaticDtors[i].first == Old) +//TODO StaticDtors[i].first = New; +//TODO } +//TODO +//TODO assert(!LLVMValuesMap.count(New) && "New cannot be in the LLVMValues map!"); +//TODO +//TODO // Find Old in the table. +//TODO LLVMValuesMapTy::iterator I = LLVMValuesMap.find(Old); +//TODO if (I == LLVMValuesMap.end()) return; +//TODO +//TODO unsigned Idx = I->second-1; +//TODO assert(Idx < LLVMValues.size() && "Out of range index!"); +//TODO assert(LLVMValues[Idx] == Old && "Inconsistent LLVMValues mapping!"); +//TODO +//TODO LLVMValues[Idx] = New; +//TODO +//TODO // Remove the old value from the value map. +//TODO LLVMValuesMap.erase(I); +//TODO +//TODO // Insert the new value into the value map. We know that it can't already +//TODO // exist in the mapping. +//TODO if (New) +//TODO LLVMValuesMap[New] = Idx+1; +//TODO} +//TODO +//TODO// Read LLVM Types string table +//TODOvoid readLLVMValues() { +//TODO GlobalValue *V = TheModule->getNamedGlobal("llvm.pch.values"); +//TODO if (!V) +//TODO return; +//TODO +//TODO GlobalVariable *GV = cast(V); +//TODO ConstantStruct *ValuesFromPCH = cast(GV->getOperand(0)); +//TODO +//TODO for (unsigned i = 0; i < ValuesFromPCH->getNumOperands(); ++i) { +//TODO Value *Va = ValuesFromPCH->getOperand(i); +//TODO +//TODO if (!Va) { +//TODO // If V is empty then insert NULL to represent empty entries. +//TODO LLVMValues.push_back(Va); +//TODO continue; +//TODO } +//TODO if (ConstantArray *CA = dyn_cast(Va)) { +//TODO std::string Str = CA->getAsString(); +//TODO Va = TheModule->getValueSymbolTable().lookup(Str); +//TODO } +//TODO assert (Va != NULL && "Invalid Value in LLVMValues string table"); +//TODO LLVMValues.push_back(Va); +//TODO } +//TODO +//TODO // Now, llvm.pch.values is not required so remove it from the symbol table. +//TODO GV->eraseFromParent(); +//TODO} +//TODO +//TODO// GCC tree's uses LLVMValues vector's index to reach LLVM Values. +//TODO// Create a string table to hold these LLVM Values' names. This string +//TODO// table will be used to recreate LTypes vector after loading PCH. +//TODOvoid writeLLVMValues() { +//TODO if (LLVMValues.empty()) +//TODO return; +//TODO +//TODO LLVMContext &Context = getGlobalContext(); +//TODO +//TODO std::vector ValuesForPCH; +//TODO for (std::vector::iterator I = LLVMValues.begin(), +//TODO E = LLVMValues.end(); I != E; ++I) { +//TODO if (Constant *C = dyn_cast_or_null(*I)) +//TODO ValuesForPCH.push_back(C); +//TODO else +//TODO // Non constant values, e.g. arguments, are not at global scope. +//TODO // When PCH is read, only global scope values are used. +//TODO ValuesForPCH.push_back(Context.getNullValue(Type::Int32Ty)); +//TODO } +//TODO +//TODO // Create string table. +//TODO Constant *LLVMValuesTable = Context.getConstantStruct(ValuesForPCH, false); +//TODO +//TODO // Create variable to hold this string table. +//TODO new GlobalVariable(*TheModule, LLVMValuesTable->getType(), true, +//TODO GlobalValue::ExternalLinkage, +//TODO LLVMValuesTable, +//TODO "llvm.pch.values"); +//TODO} +//TODO +//TODO/// eraseLocalLLVMValues - drop all non-global values from the LLVM values map. +//TODOvoid eraseLocalLLVMValues() { +//TODO // Erase all the local values, these are stored in LocalLLVMValueIDs. +//TODO while (!LocalLLVMValueIDs.empty()) { +//TODO unsigned Idx = LocalLLVMValueIDs.back()-1; +//TODO LocalLLVMValueIDs.pop_back(); +//TODO +//TODO if (Value *V = LLVMValues[Idx]) { +//TODO assert(!isa(V) && "Found global value"); +//TODO LLVMValuesMap.erase(V); +//TODO } +//TODO +//TODO if (Idx == LLVMValues.size()-1) +//TODO LLVMValues.pop_back(); +//TODO else +//TODO LLVMValues[Idx] = 0; +//TODO } +//TODO} // Forward decl visibility style to global. From baldrick at free.fr Mon Jul 20 03:19:17 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 10:19:17 +0200 Subject: [llvm-commits] [llvm] r76385 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPrinter/ lib/Target/CellSPU/AsmPrinter/ lib/Target/CppBackend/ lib/Target/IA64/AsmPrinter/ lib/Target/MSP430/ lib/Target/Mips/AsmPrinter/ lib/Target/PowerPC/AsmPrinter/ lib/Target/Sparc/AsmPrinter/ lib/Target/SystemZ/AsmPrinter/ lib/Target/X86/AsmPrinter/ lib/Target/XCore/ lib/Tr... In-Reply-To: <71E41203-F38F-449A-BF98-EF5C1E486F28@apple.com> References: <200907200103.n6K13chA025017@zion.cs.uiuc.edu> <4A63F2AF.4040106@free.fr> <71E41203-F38F-449A-BF98-EF5C1E486F28@apple.com> Message-ID: <4A642885.8080607@free.fr> Hi Chris, > Right. Private linkage is discarded by the assembler, so they never > make it into the .o file. linker_private is discarded by the linker, > so it never makes it into the .exe/.dylib. I don't think there is a > corresponding idea on ELF, so on ELF they two linkage types should be > codegen'd the same way. I don't understand why you would want something to be discarded by the assembler/linker and not by the linker/assembler. Don't you want them both to throw pointless things away? Ciao, Duncan. From baldrick at free.fr Mon Jul 20 03:24:24 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 08:24:24 -0000 Subject: [llvm-commits] [gcc-plugin] r76407 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907200824.n6K8OTxl014473@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 03:24:10 2009 New Revision: 76407 URL: http://llvm.org/viewvc/llvm-project?rev=76407&view=rev Log: Copy initialization logic from llvm-plugin. Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76407&r1=76406&r2=76407&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 03:24:10 2009 @@ -76,6 +76,7 @@ #include "langhooks.h" #include "cgraph.h" #include "params.h" +#include "plugin-version.h" // Plugin headers #include "llvm-internal.h" @@ -353,35 +354,32 @@ #undef Declare2 } -void llvm_initialize_backend(void) { - // Initialize the LLVM backend. -#define DoInit2(TARG, MOD) LLVMInitialize ## TARG ## MOD() -#define DoInit(T, M) DoInit2(T, M) - DoInit(LLVM_TARGET_NAME, TargetInfo); - DoInit(LLVM_TARGET_NAME, Target); - DoInit(LLVM_TARGET_NAME, AsmPrinter); -#undef DoInit -#undef DoInit2 - - // Initialize LLVM options. +/// LazilyConfigureLLVM - Set LLVM configuration options, if not already set. +/// already created. +static void LazilyConfigureLLVM(void) { + static bool Configured = false; + if (Configured) + return; + + // Initialize LLVM command line options. std::vector Args; Args.push_back(progname); // program name - // Allow targets to specify PIC options and other stuff to the corresponding - // LLVM backends. -#ifdef LLVM_SET_RED_ZONE_FLAG - LLVM_SET_RED_ZONE_FLAG(flag_disable_red_zone) -#endif -#ifdef LLVM_SET_TARGET_OPTIONS - LLVM_SET_TARGET_OPTIONS(Args); -#endif -#ifdef LLVM_SET_MACHINE_OPTIONS - LLVM_SET_MACHINE_OPTIONS(Args); -#endif -#ifdef LLVM_SET_IMPLICIT_FLOAT - LLVM_SET_IMPLICIT_FLOAT(flag_no_implicit_float) -#endif - +//TODO // Allow targets to specify PIC options and other stuff to the corresponding +//TODO // LLVM backends. +//TODO#ifdef LLVM_SET_RED_ZONE_FLAG +//TODO LLVM_SET_RED_ZONE_FLAG(flag_disable_red_zone) +//TODO#endif +//TODO#ifdef LLVM_SET_TARGET_OPTIONS +//TODO LLVM_SET_TARGET_OPTIONS(Args); +//TODO#endif +//TODO#ifdef LLVM_SET_MACHINE_OPTIONS +//TODO LLVM_SET_MACHINE_OPTIONS(Args); +//TODO#endif +//TODO#ifdef LLVM_SET_IMPLICIT_FLOAT +//TODO LLVM_SET_IMPLICIT_FLOAT(flag_no_implicit_float) +//TODO#endif + if (time_report) Args.push_back("--time-passes"); if (fast_math_flags_set_p()) @@ -392,71 +390,84 @@ Args.push_back("--nozero-initialized-in-bss"); if (flag_debug_asm) Args.push_back("--asm-verbose"); - if (flag_debug_pass_structure) - Args.push_back("--debug-pass=Structure"); - if (flag_debug_pass_arguments) - Args.push_back("--debug-pass=Arguments"); +//TODO if (flag_debug_pass_structure) +//TODO Args.push_back("--debug-pass=Structure"); +//TODO if (flag_debug_pass_arguments) +//TODO Args.push_back("--debug-pass=Arguments"); if (optimize_size || optimize < 3) // Reduce inline limit. Default limit is 200. Args.push_back("--inline-threshold=50"); if (flag_unwind_tables) Args.push_back("--unwind-tables"); - // If there are options that should be passed through to the LLVM backend - // directly from the command line, do so now. This is mainly for debugging - // purposes, and shouldn't really be for general use. - std::vector ArgStrings; - - if (flag_limited_precision > 0) { - std::string Arg("--limit-float-precision="+utostr(flag_limited_precision)); - ArgStrings.push_back(Arg); - } - - if (flag_stack_protect > 0) { - std::string Arg("--stack-protector-buffer-size=" + - utostr(PARAM_VALUE(PARAM_SSP_BUFFER_SIZE))); - ArgStrings.push_back(Arg); - } - - for (unsigned i = 0, e = ArgStrings.size(); i != e; ++i) - Args.push_back(ArgStrings[i].c_str()); - - std::vector LLVM_Optns; // Avoid deallocation before opts parsed! - if (llvm_optns) { - SplitString(llvm_optns, LLVM_Optns); - for(unsigned i = 0, e = LLVM_Optns.size(); i != e; ++i) - Args.push_back(LLVM_Optns[i].c_str()); - } - +//TODO // If there are options that should be passed through to the LLVM backend +//TODO // directly from the command line, do so now. This is mainly for debugging +//TODO // purposes, and shouldn't really be for general use. +//TODO std::vector ArgStrings; +//TODO +//TODO if (flag_limited_precision > 0) { +//TODO std::string Arg("--limit-float-precision="+utostr(flag_limited_precision)); +//TODO ArgStrings.push_back(Arg); +//TODO } +//TODO +//TODO if (flag_stack_protect > 0) { +//TODO std::string Arg("--stack-protector-buffer-size=" + +//TODO utostr(PARAM_VALUE(PARAM_SSP_BUFFER_SIZE))); +//TODO ArgStrings.push_back(Arg); +//TODO } +//TODO +//TODO for (unsigned i = 0, e = ArgStrings.size(); i != e; ++i) +//TODO Args.push_back(ArgStrings[i].c_str()); +//TODO +//TODO std::vector LLVM_Optns; // Avoid deallocation before opts parsed! +//TODO if (llvm_optns) { +//TODO SplitString(llvm_optns, LLVM_Optns); +//TODO for(unsigned i = 0, e = LLVM_Optns.size(); i != e; ++i) +//TODO Args.push_back(LLVM_Optns[i].c_str()); +//TODO } + Args.push_back(0); // Null terminator. int pseudo_argc = Args.size()-1; - cl::ParseCommandLineOptions(pseudo_argc, (char**)&Args[0]); + llvm::cl::ParseCommandLineOptions(pseudo_argc, (char**)&Args[0]); + + Configured = true; +} + +/// LazilyInitializeModule - Create a module to output LLVM IR to, if it wasn't +/// already created. +static void LazilyInitializeModule(void) { + static bool Initialized = false; + if (Initialized) + return; + + LazilyConfigureLLVM; TheModule = new Module("", getGlobalContext()); // If the target wants to override the architecture, e.g. turning // powerpc-darwin-... into powerpc64-darwin-... when -m64 is enabled, do so // now. - std::string TargetTriple = TARGET_NAME; -#ifdef LLVM_OVERRIDE_TARGET_ARCH - std::string Arch = LLVM_OVERRIDE_TARGET_ARCH(); - if (!Arch.empty()) { - std::string::size_type DashPos = TargetTriple.find('-'); - if (DashPos != std::string::npos)// If we have a sane t-t, replace the arch. - TargetTriple = Arch + TargetTriple.substr(DashPos); - } -#endif -#ifdef LLVM_OVERRIDE_TARGET_VERSION - char *NewTriple; - bool OverRidden = LLVM_OVERRIDE_TARGET_VERSION(TargetTriple.c_str(), - &NewTriple); - if (OverRidden) - TargetTriple = std::string(NewTriple); -#endif + std::string TargetTriple = "x86_64-linux-gnu"; // FIXME! +//TODO std::string TargetTriple = TARGET_NAME; +//TODO#ifdef LLVM_OVERRIDE_TARGET_ARCH +//TODO std::string Arch = LLVM_OVERRIDE_TARGET_ARCH(); +//TODO if (!Arch.empty()) { +//TODO std::string::size_type DashPos = TargetTriple.find('-'); +//TODO if (DashPos != std::string::npos)// If we have a sane t-t, replace the arch. +//TODO TargetTriple = Arch + TargetTriple.substr(DashPos); +//TODO } +//TODO#endif +//TODO#ifdef LLVM_OVERRIDE_TARGET_VERSION +//TODO char *NewTriple; +//TODO bool OverRidden = LLVM_OVERRIDE_TARGET_VERSION(TargetTriple.c_str(), +//TODO &NewTriple); +//TODO if (OverRidden) +//TODO TargetTriple = std::string(NewTriple); +//TODO#endif TheModule->setTargetTriple(TargetTriple); - + TheTypeConverter = new TypeConverter(); - + // Create the TargetMachine we will be generating code with. // FIXME: Figure out how to select the target and pass down subtarget info. std::string Err; @@ -469,13 +480,13 @@ // Figure out the subtarget feature string we pass to the target. std::string FeatureStr; - // The target can set LLVM_SET_SUBTARGET_FEATURES to configure the LLVM - // backend. -#ifdef LLVM_SET_SUBTARGET_FEATURES - SubtargetFeatures Features; - LLVM_SET_SUBTARGET_FEATURES(Features); - FeatureStr = Features.getString(); -#endif +//TODO // The target can set LLVM_SET_SUBTARGET_FEATURES to configure the LLVM +//TODO // backend. +//TODO#ifdef LLVM_SET_SUBTARGET_FEATURES +//TODO SubtargetFeatures Features; +//TODO LLVM_SET_SUBTARGET_FEATURES(Features); +//TODO FeatureStr = Features.getString(); +//TODO#endif TheTarget = TME->createTargetMachine(*TheModule, FeatureStr); assert(TheTarget->getTargetData()->isBigEndian() == BYTES_BIG_ENDIAN); @@ -486,29 +497,38 @@ TheModule->setDataLayout(TheTarget->getTargetData()-> getStringRepresentation()); - if (optimize) - RegisterRegAlloc::setDefault(createLinearScanRegisterAllocator); - else - RegisterRegAlloc::setDefault(createLocalRegisterAllocator); - - // FIXME - Do not disable debug info while writing pch. - if (!flag_pch_file && - debug_info_level > DINFO_LEVEL_NONE) - TheDebugInfo = new DebugInfo(TheModule); -} - -/// Set backend options that may only be known at codegen time. -void performLateBackendInitialization(void) { - // The Ada front-end sets flag_exceptions only after processing the file. - ExceptionHandling = flag_exceptions; - for (Module::iterator I = TheModule->begin(), E = TheModule->end(); - I != E; ++I) - if (!I->isDeclaration()) { - if (flag_disable_red_zone) - I->addFnAttr(Attribute::NoRedZone); - if (flag_no_implicit_float) - I->addFnAttr(Attribute::NoImplicitFloat); - } +//TODO if (optimize) +//TODO RegisterRegAlloc::setDefault(createLinearScanRegisterAllocator); +//TODO else +//TODO RegisterRegAlloc::setDefault(createLocalRegisterAllocator); + +//TODO // FIXME - Do not disable debug info while writing pch. +//TODO if (!flag_pch_file && +//TODO debug_info_level > DINFO_LEVEL_NONE) +//TODO TheDebugInfo = new DebugInfo(TheModule); +//TODO} +//TODO +//TODO/// Set backend options that may only be known at codegen time. +//TODOvoid performLateBackendInitialization(void) { +//TODO // The Ada front-end sets flag_exceptions only after processing the file. +//TODO ExceptionHandling = flag_exceptions; +//TODO for (Module::iterator I = TheModule->begin(), E = TheModule->end(); +//TODO I != E; ++I) +//TODO if (!I->isDeclaration()) { +//TODO if (flag_disable_red_zone) +//TODO I->addFnAttr(Attribute::NoRedZone); +//TODO if (flag_no_implicit_float) +//TODO I->addFnAttr(Attribute::NoImplicitFloat); +//TODO } +//TODO} +//TODO +//TODOvoid llvm_lang_dependent_init(const char *Name) { +//TODO if (TheDebugInfo) +//TODO TheDebugInfo->Initialize(); +//TODO if (Name) +//TODO TheModule->setModuleIdentifier(Name); +//TODO} + Initialized = true; } void llvm_lang_dependent_init(const char *Name) { From baldrick at free.fr Mon Jul 20 03:31:04 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 08:31:04 -0000 Subject: [llvm-commits] [gcc-plugin] r76409 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907200831.n6K8V4XM014670@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 03:31:00 2009 New Revision: 76409 URL: http://llvm.org/viewvc/llvm-project?rev=76409&view=rev Log: Comment out a ton more of llvm-backend that won't work as is. Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76409&r1=76408&r2=76409&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 03:31:00 2009 @@ -81,7 +81,7 @@ // Plugin headers #include "llvm-internal.h" #include "llvm-debug.h" -#include "llvm-file-ostream.h" +//TODO#include "llvm-file-ostream.h" #include "bits_and_bobs.h" // Non-zero if bytecode from PCH is successfully read. @@ -538,285 +538,285 @@ TheModule->setModuleIdentifier(Name); } -oFILEstream *AsmOutStream = 0; -static formatted_raw_ostream *AsmOutRawStream = 0; -oFILEstream *AsmIntermediateOutStream = 0; - -/// Read bytecode from PCH file. Initialize TheModule and setup -/// LTypes vector. -void llvm_pch_read(const unsigned char *Buffer, unsigned Size) { - std::string ModuleName = TheModule->getModuleIdentifier(); - - delete TheModule; - delete TheDebugInfo; - - clearTargetBuiltinCache(); - - MemoryBuffer *MB = MemoryBuffer::getNewMemBuffer(Size, ModuleName.c_str()); - memcpy((char*)MB->getBufferStart(), Buffer, Size); - - std::string ErrMsg; - TheModule = ParseBitcodeFile(MB, getGlobalContext(), &ErrMsg); - delete MB; - - // FIXME - Do not disable debug info while writing pch. - if (!flag_pch_file && debug_info_level > DINFO_LEVEL_NONE) { - TheDebugInfo = new DebugInfo(TheModule); - TheDebugInfo->Initialize(); - } - - if (!TheModule) { - cerr << "Error reading bytecodes from PCH file\n"; - cerr << ErrMsg << "\n"; - exit(1); - } - - if (PerFunctionPasses || PerModulePasses) { - destroyOptimizationPasses(); - - // Don't run codegen, when we should output PCH - if (flag_pch_file) - llvm_pch_write_init(); - } - - // Read LLVM Types string table - readLLVMTypesStringTable(); - readLLVMValues(); - - flag_llvm_pch_read = 1; -} - -// Initialize PCH writing. -void llvm_pch_write_init(void) { - timevar_push(TV_LLVM_INIT); - AsmOutStream = new oFILEstream(asm_out_file); - // FIXME: disentangle ostream madness here. Kill off ostream and FILE. - AsmOutRawStream = - new formatted_raw_ostream(*new raw_os_ostream(*AsmOutStream), - formatted_raw_ostream::DELETE_STREAM); - AsmOutFile = new OStream(*AsmOutStream); - - PerModulePasses = new PassManager(); - PerModulePasses->add(new TargetData(*TheTarget->getTargetData())); - - // If writing to stdout, set binary mode. - if (asm_out_file == stdout) - sys::Program::ChangeStdoutToBinary(); - - // Emit an LLVM .bc file to the output. This is used when passed - // -emit-llvm -c to the GCC driver. - PerModulePasses->add(CreateBitcodeWriterPass(*AsmOutStream)); - - // Disable emission of .ident into the output file... which is completely - // wrong for llvm/.bc emission cases. - flag_no_ident = 1; - - flag_llvm_pch_read = 0; - - timevar_pop(TV_LLVM_INIT); -} - -static void destroyOptimizationPasses() { - delete PerFunctionPasses; - delete PerModulePasses; - delete CodeGenPasses; - - PerFunctionPasses = 0; - PerModulePasses = 0; - CodeGenPasses = 0; -} - -static void createPerFunctionOptimizationPasses() { - if (PerFunctionPasses) - return; - - // Create and set up the per-function pass manager. - // FIXME: Move the code generator to be function-at-a-time. - PerFunctionPasses = - new FunctionPassManager(new ExistingModuleProvider(TheModule)); - PerFunctionPasses->add(new TargetData(*TheTarget->getTargetData())); - - // In -O0 if checking is disabled, we don't even have per-function passes. - bool HasPerFunctionPasses = false; -#ifdef ENABLE_CHECKING - PerFunctionPasses->add(createVerifierPass()); - HasPerFunctionPasses = true; -#endif - - if (optimize > 0 && !DisableLLVMOptimizations) { - HasPerFunctionPasses = true; - PerFunctionPasses->add(createCFGSimplificationPass()); - if (optimize == 1) - PerFunctionPasses->add(createPromoteMemoryToRegisterPass()); - else - PerFunctionPasses->add(createScalarReplAggregatesPass()); - PerFunctionPasses->add(createInstructionCombiningPass()); - } - - // If there are no module-level passes that have to be run, we codegen as - // each function is parsed. - // FIXME: We can't figure this out until we know there are no always-inline - // functions. - // FIXME: This is disabled right now until bugs can be worked out. Reenable - // this for fast -O0 compiles! - if (!emit_llvm_bc && !emit_llvm && 0) { - FunctionPassManager *PM = PerFunctionPasses; - HasPerFunctionPasses = true; - - CodeGenOpt::Level OptLevel = CodeGenOpt::Default; - - switch (optimize) { - default: break; - case 0: OptLevel = CodeGenOpt::None; break; - case 3: OptLevel = CodeGenOpt::Aggressive; break; - } - - // Normal mode, emit a .s file by running the code generator. - // Note, this also adds codegenerator level optimization passes. - switch (TheTarget->addPassesToEmitFile(*PM, *AsmOutRawStream, - TargetMachine::AssemblyFile, - OptLevel)) { - default: - case FileModel::Error: - cerr << "Error interfacing to target machine!\n"; - exit(1); - case FileModel::AsmFile: - break; - } - - if (TheTarget->addPassesToEmitFileFinish(*PM, (MachineCodeEmitter *)0, - OptLevel)) { - cerr << "Error interfacing to target machine!\n"; - exit(1); - } - } - - if (HasPerFunctionPasses) { - PerFunctionPasses->doInitialization(); - } else { - delete PerFunctionPasses; - PerFunctionPasses = 0; - } -} - -static void createPerModuleOptimizationPasses() { - if (PerModulePasses) - // llvm_pch_write_init has already created the per module passes. - return; - - // FIXME: AT -O0/O1, we should stream out functions at a time. - PerModulePasses = new PassManager(); - PerModulePasses->add(new TargetData(*TheTarget->getTargetData())); - bool HasPerModulePasses = false; - - if (!DisableLLVMOptimizations) { - bool NeedAlwaysInliner = false; - llvm::Pass *InliningPass = 0; - if (flag_inline_trees > 1) { // respect -fno-inline-functions - InliningPass = createFunctionInliningPass(); // Inline small functions - } else { - // If full inliner is not run, check if always-inline is needed to handle - // functions that are marked as always_inline. - for (Module::iterator I = TheModule->begin(), E = TheModule->end(); - I != E; ++I) - if (I->hasFnAttr(Attribute::AlwaysInline)) { - NeedAlwaysInliner = true; - break; - } - - if (NeedAlwaysInliner) - InliningPass = createAlwaysInlinerPass(); // Inline always_inline funcs - } - - HasPerModulePasses = true; - createStandardModulePasses(PerModulePasses, optimize, - optimize_size || optimize < 3, - flag_unit_at_a_time, flag_unroll_loops, - !flag_no_simplify_libcalls, flag_exceptions, - InliningPass); - } - - if (emit_llvm_bc) { - // Emit an LLVM .bc file to the output. This is used when passed - // -emit-llvm -c to the GCC driver. - PerModulePasses->add(CreateBitcodeWriterPass(*AsmOutStream)); - HasPerModulePasses = true; - } else if (emit_llvm) { - // Emit an LLVM .ll file to the output. This is used when passed - // -emit-llvm -S to the GCC driver. - PerModulePasses->add(createPrintModulePass(AsmOutRawStream)); - HasPerModulePasses = true; - } else { - // If there are passes we have to run on the entire module, we do codegen - // as a separate "pass" after that happens. - // However if there are no module-level passes that have to be run, we - // codegen as each function is parsed. - // FIXME: This is disabled right now until bugs can be worked out. Reenable - // this for fast -O0 compiles! - if (PerModulePasses || 1) { - FunctionPassManager *PM = CodeGenPasses = - new FunctionPassManager(new ExistingModuleProvider(TheModule)); - PM->add(new TargetData(*TheTarget->getTargetData())); - - CodeGenOpt::Level OptLevel = CodeGenOpt::Default; - - switch (optimize) { - default: break; - case 0: OptLevel = CodeGenOpt::None; break; - case 3: OptLevel = CodeGenOpt::Aggressive; break; - } - - // Normal mode, emit a .s file by running the code generator. - // Note, this also adds codegenerator level optimization passes. - switch (TheTarget->addPassesToEmitFile(*PM, *AsmOutRawStream, - TargetMachine::AssemblyFile, - OptLevel)) { - default: - case FileModel::Error: - cerr << "Error interfacing to target machine!\n"; - exit(1); - case FileModel::AsmFile: - break; - } - - if (TheTarget->addPassesToEmitFileFinish(*PM, (MachineCodeEmitter *)0, - OptLevel)) { - cerr << "Error interfacing to target machine!\n"; - exit(1); - } - } - } - - if (!HasPerModulePasses) { - delete PerModulePasses; - PerModulePasses = 0; - } -} - -// llvm_asm_file_start - Start the .s file. -void llvm_asm_file_start(void) { - timevar_push(TV_LLVM_INIT); - AsmOutStream = new oFILEstream(asm_out_file); - // FIXME: disentangle ostream madness here. Kill off ostream and FILE. - AsmOutRawStream = - new formatted_raw_ostream(*new raw_os_ostream(*AsmOutStream), - formatted_raw_ostream::DELETE_STREAM); - AsmOutFile = new OStream(*AsmOutStream); - - flag_llvm_pch_read = 0; - - if (emit_llvm_bc || emit_llvm) - // Disable emission of .ident into the output file... which is completely - // wrong for llvm/.bc emission cases. - flag_no_ident = 1; - - // If writing to stdout, set binary mode. - if (asm_out_file == stdout) - sys::Program::ChangeStdoutToBinary(); +//TODOoFILEstream *AsmOutStream = 0; +//TODOstatic formatted_raw_ostream *AsmOutRawStream = 0; +//TODOoFILEstream *AsmIntermediateOutStream = 0; +//TODO +//TODO/// Read bytecode from PCH file. Initialize TheModule and setup +//TODO/// LTypes vector. +//TODOvoid llvm_pch_read(const unsigned char *Buffer, unsigned Size) { +//TODO std::string ModuleName = TheModule->getModuleIdentifier(); +//TODO +//TODO delete TheModule; +//TODO delete TheDebugInfo; +//TODO +//TODO clearTargetBuiltinCache(); +//TODO +//TODO MemoryBuffer *MB = MemoryBuffer::getNewMemBuffer(Size, ModuleName.c_str()); +//TODO memcpy((char*)MB->getBufferStart(), Buffer, Size); +//TODO +//TODO std::string ErrMsg; +//TODO TheModule = ParseBitcodeFile(MB, getGlobalContext(), &ErrMsg); +//TODO delete MB; +//TODO +//TODO // FIXME - Do not disable debug info while writing pch. +//TODO if (!flag_pch_file && debug_info_level > DINFO_LEVEL_NONE) { +//TODO TheDebugInfo = new DebugInfo(TheModule); +//TODO TheDebugInfo->Initialize(); +//TODO } +//TODO +//TODO if (!TheModule) { +//TODO cerr << "Error reading bytecodes from PCH file\n"; +//TODO cerr << ErrMsg << "\n"; +//TODO exit(1); +//TODO } +//TODO +//TODO if (PerFunctionPasses || PerModulePasses) { +//TODO destroyOptimizationPasses(); +//TODO +//TODO // Don't run codegen, when we should output PCH +//TODO if (flag_pch_file) +//TODO llvm_pch_write_init(); +//TODO } +//TODO +//TODO // Read LLVM Types string table +//TODO readLLVMTypesStringTable(); +//TODO readLLVMValues(); +//TODO +//TODO flag_llvm_pch_read = 1; +//TODO} +//TODO +//TODO// Initialize PCH writing. +//TODOvoid llvm_pch_write_init(void) { +//TODO timevar_push(TV_LLVM_INIT); +//TODO AsmOutStream = new oFILEstream(asm_out_file); +//TODO // FIXME: disentangle ostream madness here. Kill off ostream and FILE. +//TODO AsmOutRawStream = +//TODO new formatted_raw_ostream(*new raw_os_ostream(*AsmOutStream), +//TODO formatted_raw_ostream::DELETE_STREAM); +//TODO AsmOutFile = new OStream(*AsmOutStream); +//TODO +//TODO PerModulePasses = new PassManager(); +//TODO PerModulePasses->add(new TargetData(*TheTarget->getTargetData())); +//TODO +//TODO // If writing to stdout, set binary mode. +//TODO if (asm_out_file == stdout) +//TODO sys::Program::ChangeStdoutToBinary(); +//TODO +//TODO // Emit an LLVM .bc file to the output. This is used when passed +//TODO // -emit-llvm -c to the GCC driver. +//TODO PerModulePasses->add(CreateBitcodeWriterPass(*AsmOutStream)); +//TODO +//TODO // Disable emission of .ident into the output file... which is completely +//TODO // wrong for llvm/.bc emission cases. +//TODO flag_no_ident = 1; +//TODO +//TODO flag_llvm_pch_read = 0; +//TODO +//TODO timevar_pop(TV_LLVM_INIT); +//TODO} - AttributeUsedGlobals.clear(); - timevar_pop(TV_LLVM_INIT); -} +//TODOstatic void destroyOptimizationPasses() { +//TODO delete PerFunctionPasses; +//TODO delete PerModulePasses; +//TODO delete CodeGenPasses; +//TODO +//TODO PerFunctionPasses = 0; +//TODO PerModulePasses = 0; +//TODO CodeGenPasses = 0; +//TODO} +//TODO +//TODOstatic void createPerFunctionOptimizationPasses() { +//TODO if (PerFunctionPasses) +//TODO return; +//TODO +//TODO // Create and set up the per-function pass manager. +//TODO // FIXME: Move the code generator to be function-at-a-time. +//TODO PerFunctionPasses = +//TODO new FunctionPassManager(new ExistingModuleProvider(TheModule)); +//TODO PerFunctionPasses->add(new TargetData(*TheTarget->getTargetData())); +//TODO +//TODO // In -O0 if checking is disabled, we don't even have per-function passes. +//TODO bool HasPerFunctionPasses = false; +//TODO#ifdef ENABLE_CHECKING +//TODO PerFunctionPasses->add(createVerifierPass()); +//TODO HasPerFunctionPasses = true; +//TODO#endif +//TODO +//TODO if (optimize > 0 && !DisableLLVMOptimizations) { +//TODO HasPerFunctionPasses = true; +//TODO PerFunctionPasses->add(createCFGSimplificationPass()); +//TODO if (optimize == 1) +//TODO PerFunctionPasses->add(createPromoteMemoryToRegisterPass()); +//TODO else +//TODO PerFunctionPasses->add(createScalarReplAggregatesPass()); +//TODO PerFunctionPasses->add(createInstructionCombiningPass()); +//TODO } +//TODO +//TODO // If there are no module-level passes that have to be run, we codegen as +//TODO // each function is parsed. +//TODO // FIXME: We can't figure this out until we know there are no always-inline +//TODO // functions. +//TODO // FIXME: This is disabled right now until bugs can be worked out. Reenable +//TODO // this for fast -O0 compiles! +//TODO if (!emit_llvm_bc && !emit_llvm && 0) { +//TODO FunctionPassManager *PM = PerFunctionPasses; +//TODO HasPerFunctionPasses = true; +//TODO +//TODO CodeGenOpt::Level OptLevel = CodeGenOpt::Default; +//TODO +//TODO switch (optimize) { +//TODO default: break; +//TODO case 0: OptLevel = CodeGenOpt::None; break; +//TODO case 3: OptLevel = CodeGenOpt::Aggressive; break; +//TODO } +//TODO +//TODO // Normal mode, emit a .s file by running the code generator. +//TODO // Note, this also adds codegenerator level optimization passes. +//TODO switch (TheTarget->addPassesToEmitFile(*PM, *AsmOutRawStream, +//TODO TargetMachine::AssemblyFile, +//TODO OptLevel)) { +//TODO default: +//TODO case FileModel::Error: +//TODO cerr << "Error interfacing to target machine!\n"; +//TODO exit(1); +//TODO case FileModel::AsmFile: +//TODO break; +//TODO } +//TODO +//TODO if (TheTarget->addPassesToEmitFileFinish(*PM, (MachineCodeEmitter *)0, +//TODO OptLevel)) { +//TODO cerr << "Error interfacing to target machine!\n"; +//TODO exit(1); +//TODO } +//TODO } +//TODO +//TODO if (HasPerFunctionPasses) { +//TODO PerFunctionPasses->doInitialization(); +//TODO } else { +//TODO delete PerFunctionPasses; +//TODO PerFunctionPasses = 0; +//TODO } +//TODO} +//TODO +//TODOstatic void createPerModuleOptimizationPasses() { +//TODO if (PerModulePasses) +//TODO // llvm_pch_write_init has already created the per module passes. +//TODO return; +//TODO +//TODO // FIXME: AT -O0/O1, we should stream out functions at a time. +//TODO PerModulePasses = new PassManager(); +//TODO PerModulePasses->add(new TargetData(*TheTarget->getTargetData())); +//TODO bool HasPerModulePasses = false; +//TODO +//TODO if (!DisableLLVMOptimizations) { +//TODO bool NeedAlwaysInliner = false; +//TODO llvm::Pass *InliningPass = 0; +//TODO if (flag_inline_trees > 1) { // respect -fno-inline-functions +//TODO InliningPass = createFunctionInliningPass(); // Inline small functions +//TODO } else { +//TODO // If full inliner is not run, check if always-inline is needed to handle +//TODO // functions that are marked as always_inline. +//TODO for (Module::iterator I = TheModule->begin(), E = TheModule->end(); +//TODO I != E; ++I) +//TODO if (I->hasFnAttr(Attribute::AlwaysInline)) { +//TODO NeedAlwaysInliner = true; +//TODO break; +//TODO } +//TODO +//TODO if (NeedAlwaysInliner) +//TODO InliningPass = createAlwaysInlinerPass(); // Inline always_inline funcs +//TODO } +//TODO +//TODO HasPerModulePasses = true; +//TODO createStandardModulePasses(PerModulePasses, optimize, +//TODO optimize_size || optimize < 3, +//TODO flag_unit_at_a_time, flag_unroll_loops, +//TODO !flag_no_simplify_libcalls, flag_exceptions, +//TODO InliningPass); +//TODO } +//TODO +//TODO if (emit_llvm_bc) { +//TODO // Emit an LLVM .bc file to the output. This is used when passed +//TODO // -emit-llvm -c to the GCC driver. +//TODO PerModulePasses->add(CreateBitcodeWriterPass(*AsmOutStream)); +//TODO HasPerModulePasses = true; +//TODO } else if (emit_llvm) { +//TODO // Emit an LLVM .ll file to the output. This is used when passed +//TODO // -emit-llvm -S to the GCC driver. +//TODO PerModulePasses->add(createPrintModulePass(AsmOutRawStream)); +//TODO HasPerModulePasses = true; +//TODO } else { +//TODO // If there are passes we have to run on the entire module, we do codegen +//TODO // as a separate "pass" after that happens. +//TODO // However if there are no module-level passes that have to be run, we +//TODO // codegen as each function is parsed. +//TODO // FIXME: This is disabled right now until bugs can be worked out. Reenable +//TODO // this for fast -O0 compiles! +//TODO if (PerModulePasses || 1) { +//TODO FunctionPassManager *PM = CodeGenPasses = +//TODO new FunctionPassManager(new ExistingModuleProvider(TheModule)); +//TODO PM->add(new TargetData(*TheTarget->getTargetData())); +//TODO +//TODO CodeGenOpt::Level OptLevel = CodeGenOpt::Default; +//TODO +//TODO switch (optimize) { +//TODO default: break; +//TODO case 0: OptLevel = CodeGenOpt::None; break; +//TODO case 3: OptLevel = CodeGenOpt::Aggressive; break; +//TODO } +//TODO +//TODO // Normal mode, emit a .s file by running the code generator. +//TODO // Note, this also adds codegenerator level optimization passes. +//TODO switch (TheTarget->addPassesToEmitFile(*PM, *AsmOutRawStream, +//TODO TargetMachine::AssemblyFile, +//TODO OptLevel)) { +//TODO default: +//TODO case FileModel::Error: +//TODO cerr << "Error interfacing to target machine!\n"; +//TODO exit(1); +//TODO case FileModel::AsmFile: +//TODO break; +//TODO } +//TODO +//TODO if (TheTarget->addPassesToEmitFileFinish(*PM, (MachineCodeEmitter *)0, +//TODO OptLevel)) { +//TODO cerr << "Error interfacing to target machine!\n"; +//TODO exit(1); +//TODO } +//TODO } +//TODO } +//TODO +//TODO if (!HasPerModulePasses) { +//TODO delete PerModulePasses; +//TODO PerModulePasses = 0; +//TODO } +//TODO} +//TODO +//TODO// llvm_asm_file_start - Start the .s file. +//TODOvoid llvm_asm_file_start(void) { +//TODO timevar_push(TV_LLVM_INIT); +//TODO AsmOutStream = new oFILEstream(asm_out_file); +//TODO // FIXME: disentangle ostream madness here. Kill off ostream and FILE. +//TODO AsmOutRawStream = +//TODO new formatted_raw_ostream(*new raw_os_ostream(*AsmOutStream), +//TODO formatted_raw_ostream::DELETE_STREAM); +//TODO AsmOutFile = new OStream(*AsmOutStream); +//TODO +//TODO flag_llvm_pch_read = 0; +//TODO +//TODO if (emit_llvm_bc || emit_llvm) +//TODO // Disable emission of .ident into the output file... which is completely +//TODO // wrong for llvm/.bc emission cases. +//TODO flag_no_ident = 1; +//TODO +//TODO // If writing to stdout, set binary mode. +//TODO if (asm_out_file == stdout) +//TODO sys::Program::ChangeStdoutToBinary(); +//TODO +//TODO AttributeUsedGlobals.clear(); +//TODO timevar_pop(TV_LLVM_INIT); +//TODO} /// ConvertStructorsList - Convert a list of static ctors/dtors to an /// initializer suitable for the llvm.global_[cd]tors globals. @@ -847,174 +847,174 @@ Array, Name); } -// llvm_asm_file_end - Finish the .s file. -void llvm_asm_file_end(void) { - timevar_push(TV_LLVM_PERFILE); - LLVMContext &Context = getGlobalContext(); - - performLateBackendInitialization(); - createPerFunctionOptimizationPasses(); - - if (flag_pch_file) { - writeLLVMTypesStringTable(); - writeLLVMValues(); - } - - // Add an llvm.global_ctors global if needed. - if (!StaticCtors.empty()) - CreateStructorsList(StaticCtors, "llvm.global_ctors"); - // Add an llvm.global_dtors global if needed. - if (!StaticDtors.empty()) - CreateStructorsList(StaticDtors, "llvm.global_dtors"); - - if (!AttributeUsedGlobals.empty()) { - std::vector AUGs; - const Type *SBP= Context.getPointerTypeUnqual(Type::Int8Ty); - for (SmallSetVector::iterator AI = AttributeUsedGlobals.begin(), - AE = AttributeUsedGlobals.end(); AI != AE; ++AI) { - Constant *C = *AI; - AUGs.push_back(TheFolder->CreateBitCast(C, SBP)); - } - - ArrayType *AT = Context.getArrayType(SBP, AUGs.size()); - Constant *Init = Context.getConstantArray(AT, AUGs); - GlobalValue *gv = new GlobalVariable(*TheModule, AT, false, - GlobalValue::AppendingLinkage, Init, - "llvm.used"); - gv->setSection("llvm.metadata"); - AttributeUsedGlobals.clear(); - } - - // Add llvm.global.annotations - if (!AttributeAnnotateGlobals.empty()) { - Constant *Array = Context.getConstantArray( - Context.getArrayType(AttributeAnnotateGlobals[0]->getType(), - AttributeAnnotateGlobals.size()), - AttributeAnnotateGlobals); - GlobalValue *gv = new GlobalVariable(*TheModule, Array->getType(), false, - GlobalValue::AppendingLinkage, Array, - "llvm.global.annotations"); - gv->setSection("llvm.metadata"); - AttributeAnnotateGlobals.clear(); - } - - // Finish off the per-function pass. - if (PerFunctionPasses) - PerFunctionPasses->doFinalization(); - - // Emit intermediate file before module level optimization passes are run. - if (flag_debug_llvm_module_opt) { - - static PassManager *IntermediatePM = new PassManager(); - IntermediatePM->add(new TargetData(*TheTarget->getTargetData())); - - char asm_intermediate_out_filename[MAXPATHLEN]; - strcpy(&asm_intermediate_out_filename[0], asm_file_name); - strcat(&asm_intermediate_out_filename[0],".0"); - FILE *asm_intermediate_out_file = fopen(asm_intermediate_out_filename, "w+b"); - AsmIntermediateOutStream = new oFILEstream(asm_intermediate_out_file); - AsmIntermediateOutFile = new OStream(*AsmIntermediateOutStream); - raw_ostream *AsmIntermediateRawOutStream = - new raw_os_ostream(*AsmIntermediateOutStream); - if (emit_llvm_bc) - IntermediatePM->add(CreateBitcodeWriterPass(*AsmIntermediateOutStream)); - if (emit_llvm) - IntermediatePM->add(createPrintModulePass(AsmIntermediateRawOutStream)); - IntermediatePM->run(*TheModule); - AsmIntermediateRawOutStream->flush(); - delete AsmIntermediateRawOutStream; - AsmIntermediateRawOutStream = 0; - AsmIntermediateOutStream->flush(); - fflush(asm_intermediate_out_file); - delete AsmIntermediateOutStream; - AsmIntermediateOutStream = 0; - delete AsmIntermediateOutFile; - AsmIntermediateOutFile = 0; - } - - // Run module-level optimizers, if any are present. - createPerModuleOptimizationPasses(); - if (PerModulePasses) - PerModulePasses->run(*TheModule); - - // Run the code generator, if present. - if (CodeGenPasses) { - CodeGenPasses->doInitialization(); - for (Module::iterator I = TheModule->begin(), E = TheModule->end(); - I != E; ++I) - if (!I->isDeclaration()) - CodeGenPasses->run(*I); - CodeGenPasses->doFinalization(); - } - - AsmOutRawStream->flush(); - AsmOutStream->flush(); - fflush(asm_out_file); - delete AsmOutRawStream; - AsmOutRawStream = 0; - delete AsmOutStream; - AsmOutStream = 0; - delete AsmOutFile; - AsmOutFile = 0; - timevar_pop(TV_LLVM_PERFILE); -} - -// llvm_call_llvm_shutdown - Release LLVM global state. -void llvm_call_llvm_shutdown(void) { - llvm_shutdown(); -} - -// llvm_emit_code_for_current_function - Top level interface for emitting a -// function to the .s file. -void llvm_emit_code_for_current_function(tree fndecl) { - if (cfun->nonlocal_goto_save_area) - sorry("%Jnon-local gotos not supported by LLVM", fndecl); - - if (errorcount || sorrycount) { - TREE_ASM_WRITTEN(fndecl) = 1; - return; // Do not process broken code. - } - timevar_push(TV_LLVM_FUNCS); - - // Convert the AST to raw/ugly LLVM code. - Function *Fn; - { - TreeToLLVM Emitter(fndecl); - enum symbol_visibility vis = DECL_VISIBILITY (fndecl); - - if (vis != VISIBILITY_DEFAULT) - // "asm_out.visibility" emits an important warning if we're using a - // visibility that's not supported by the target. - targetm.asm_out.visibility(fndecl, vis); - - Fn = Emitter.EmitFunction(); - } - -#if 0 - if (dump_file) { - fprintf (dump_file, - "\n\n;;\n;; Full LLVM generated for this function:\n;;\n"); - Fn->dump(); - } -#endif - - performLateBackendInitialization(); - createPerFunctionOptimizationPasses(); - - if (PerFunctionPasses) - PerFunctionPasses->run(*Fn); - - // TODO: Nuke the .ll code for the function at -O[01] if we don't want to - // inline it or something else. - - // There's no need to defer outputting this function any more; we - // know we want to output it. - DECL_DEFER_OUTPUT(fndecl) = 0; - - // Finally, we have written out this function! - TREE_ASM_WRITTEN(fndecl) = 1; - timevar_pop(TV_LLVM_FUNCS); -} +//TODO// llvm_asm_file_end - Finish the .s file. +//TODOvoid llvm_asm_file_end(void) { +//TODO timevar_push(TV_LLVM_PERFILE); +//TODO LLVMContext &Context = getGlobalContext(); +//TODO +//TODO performLateBackendInitialization(); +//TODO createPerFunctionOptimizationPasses(); +//TODO +//TODO if (flag_pch_file) { +//TODO writeLLVMTypesStringTable(); +//TODO writeLLVMValues(); +//TODO } +//TODO +//TODO // Add an llvm.global_ctors global if needed. +//TODO if (!StaticCtors.empty()) +//TODO CreateStructorsList(StaticCtors, "llvm.global_ctors"); +//TODO // Add an llvm.global_dtors global if needed. +//TODO if (!StaticDtors.empty()) +//TODO CreateStructorsList(StaticDtors, "llvm.global_dtors"); +//TODO +//TODO if (!AttributeUsedGlobals.empty()) { +//TODO std::vector AUGs; +//TODO const Type *SBP= Context.getPointerTypeUnqual(Type::Int8Ty); +//TODO for (SmallSetVector::iterator AI = AttributeUsedGlobals.begin(), +//TODO AE = AttributeUsedGlobals.end(); AI != AE; ++AI) { +//TODO Constant *C = *AI; +//TODO AUGs.push_back(TheFolder->CreateBitCast(C, SBP)); +//TODO } +//TODO +//TODO ArrayType *AT = Context.getArrayType(SBP, AUGs.size()); +//TODO Constant *Init = Context.getConstantArray(AT, AUGs); +//TODO GlobalValue *gv = new GlobalVariable(*TheModule, AT, false, +//TODO GlobalValue::AppendingLinkage, Init, +//TODO "llvm.used"); +//TODO gv->setSection("llvm.metadata"); +//TODO AttributeUsedGlobals.clear(); +//TODO } +//TODO +//TODO // Add llvm.global.annotations +//TODO if (!AttributeAnnotateGlobals.empty()) { +//TODO Constant *Array = Context.getConstantArray( +//TODO Context.getArrayType(AttributeAnnotateGlobals[0]->getType(), +//TODO AttributeAnnotateGlobals.size()), +//TODO AttributeAnnotateGlobals); +//TODO GlobalValue *gv = new GlobalVariable(*TheModule, Array->getType(), false, +//TODO GlobalValue::AppendingLinkage, Array, +//TODO "llvm.global.annotations"); +//TODO gv->setSection("llvm.metadata"); +//TODO AttributeAnnotateGlobals.clear(); +//TODO } +//TODO +//TODO // Finish off the per-function pass. +//TODO if (PerFunctionPasses) +//TODO PerFunctionPasses->doFinalization(); +//TODO +//TODO // Emit intermediate file before module level optimization passes are run. +//TODO if (flag_debug_llvm_module_opt) { +//TODO +//TODO static PassManager *IntermediatePM = new PassManager(); +//TODO IntermediatePM->add(new TargetData(*TheTarget->getTargetData())); +//TODO +//TODO char asm_intermediate_out_filename[MAXPATHLEN]; +//TODO strcpy(&asm_intermediate_out_filename[0], asm_file_name); +//TODO strcat(&asm_intermediate_out_filename[0],".0"); +//TODO FILE *asm_intermediate_out_file = fopen(asm_intermediate_out_filename, "w+b"); +//TODO AsmIntermediateOutStream = new oFILEstream(asm_intermediate_out_file); +//TODO AsmIntermediateOutFile = new OStream(*AsmIntermediateOutStream); +//TODO raw_ostream *AsmIntermediateRawOutStream = +//TODO new raw_os_ostream(*AsmIntermediateOutStream); +//TODO if (emit_llvm_bc) +//TODO IntermediatePM->add(CreateBitcodeWriterPass(*AsmIntermediateOutStream)); +//TODO if (emit_llvm) +//TODO IntermediatePM->add(createPrintModulePass(AsmIntermediateRawOutStream)); +//TODO IntermediatePM->run(*TheModule); +//TODO AsmIntermediateRawOutStream->flush(); +//TODO delete AsmIntermediateRawOutStream; +//TODO AsmIntermediateRawOutStream = 0; +//TODO AsmIntermediateOutStream->flush(); +//TODO fflush(asm_intermediate_out_file); +//TODO delete AsmIntermediateOutStream; +//TODO AsmIntermediateOutStream = 0; +//TODO delete AsmIntermediateOutFile; +//TODO AsmIntermediateOutFile = 0; +//TODO } +//TODO +//TODO // Run module-level optimizers, if any are present. +//TODO createPerModuleOptimizationPasses(); +//TODO if (PerModulePasses) +//TODO PerModulePasses->run(*TheModule); +//TODO +//TODO // Run the code generator, if present. +//TODO if (CodeGenPasses) { +//TODO CodeGenPasses->doInitialization(); +//TODO for (Module::iterator I = TheModule->begin(), E = TheModule->end(); +//TODO I != E; ++I) +//TODO if (!I->isDeclaration()) +//TODO CodeGenPasses->run(*I); +//TODO CodeGenPasses->doFinalization(); +//TODO } +//TODO +//TODO AsmOutRawStream->flush(); +//TODO AsmOutStream->flush(); +//TODO fflush(asm_out_file); +//TODO delete AsmOutRawStream; +//TODO AsmOutRawStream = 0; +//TODO delete AsmOutStream; +//TODO AsmOutStream = 0; +//TODO delete AsmOutFile; +//TODO AsmOutFile = 0; +//TODO timevar_pop(TV_LLVM_PERFILE); +//TODO} +//TODO +//TODO// llvm_call_llvm_shutdown - Release LLVM global state. +//TODOvoid llvm_call_llvm_shutdown(void) { +//TODO llvm_shutdown(); +//TODO} +//TODO +//TODO// llvm_emit_code_for_current_function - Top level interface for emitting a +//TODO// function to the .s file. +//TODOvoid llvm_emit_code_for_current_function(tree fndecl) { +//TODO if (cfun->nonlocal_goto_save_area) +//TODO sorry("%Jnon-local gotos not supported by LLVM", fndecl); +//TODO +//TODO if (errorcount || sorrycount) { +//TODO TREE_ASM_WRITTEN(fndecl) = 1; +//TODO return; // Do not process broken code. +//TODO } +//TODO timevar_push(TV_LLVM_FUNCS); +//TODO +//TODO // Convert the AST to raw/ugly LLVM code. +//TODO Function *Fn; +//TODO { +//TODO TreeToLLVM Emitter(fndecl); +//TODO enum symbol_visibility vis = DECL_VISIBILITY (fndecl); +//TODO +//TODO if (vis != VISIBILITY_DEFAULT) +//TODO // "asm_out.visibility" emits an important warning if we're using a +//TODO // visibility that's not supported by the target. +//TODO targetm.asm_out.visibility(fndecl, vis); +//TODO +//TODO Fn = Emitter.EmitFunction(); +//TODO } +//TODO +//TODO#if 0 +//TODO if (dump_file) { +//TODO fprintf (dump_file, +//TODO "\n\n;;\n;; Full LLVM generated for this function:\n;;\n"); +//TODO Fn->dump(); +//TODO } +//TODO#endif +//TODO +//TODO performLateBackendInitialization(); +//TODO createPerFunctionOptimizationPasses(); +//TODO +//TODO if (PerFunctionPasses) +//TODO PerFunctionPasses->run(*Fn); +//TODO +//TODO // TODO: Nuke the .ll code for the function at -O[01] if we don't want to +//TODO // inline it or something else. +//TODO +//TODO // There's no need to defer outputting this function any more; we +//TODO // know we want to output it. +//TODO DECL_DEFER_OUTPUT(fndecl) = 0; +//TODO +//TODO // Finally, we have written out this function! +//TODO TREE_ASM_WRITTEN(fndecl) = 1; +//TODO timevar_pop(TV_LLVM_FUNCS); +//TODO} // emit_alias_to_llvm - Given decl and target emit alias to target. void emit_alias_to_llvm(tree decl, tree target, tree target_decl) { @@ -1025,7 +1025,7 @@ LLVMContext &Context = getGlobalContext(); - timevar_push(TV_LLVM_GLOBALS); +//TODO timevar_push(TV_LLVM_GLOBALS); // Get or create LLVM global for our alias. GlobalValue *V = cast(DECL_LLVM(decl)); @@ -1067,7 +1067,7 @@ assert(0 && "Unsuported global value"); } else { error ("%J%qD aliased to undefined symbol %qs", decl, decl, AliaseeName); - timevar_pop(TV_LLVM_GLOBALS); +//TODO timevar_pop(TV_LLVM_GLOBALS); return; } } @@ -1076,7 +1076,7 @@ GlobalValue::LinkageTypes Linkage; // A weak alias has TREE_PUBLIC set but not the other bits. - if (DECL_LLVM_PRIVATE(decl)) + if (false)//FIXME DECL_LLVM_PRIVATE(decl)) Linkage = GlobalValue::PrivateLinkage; else if (DECL_WEAK(decl)) // The user may have explicitly asked for weak linkage - ignore flag_odr. @@ -1095,7 +1095,7 @@ V->replaceAllUsesWith(Context.getConstantExprBitCast(GA, V->getType())); else if (!V->use_empty()) { error ("%J Alias %qD used with invalid type!", decl, decl); - timevar_pop(TV_LLVM_GLOBALS); +//TODO timevar_pop(TV_LLVM_GLOBALS); return; } @@ -1112,7 +1112,7 @@ TREE_ASM_WRITTEN(decl) = 1; - timevar_pop(TV_LLVM_GLOBALS); +//TODO timevar_pop(TV_LLVM_GLOBALS); return; } @@ -1287,7 +1287,7 @@ LLVMContext &Context = getGlobalContext(); - timevar_push(TV_LLVM_GLOBALS); +//TODO timevar_push(TV_LLVM_GLOBALS); // Get or create the global variable now. GlobalVariable *GV = cast(DECL_LLVM(decl)); @@ -1341,7 +1341,7 @@ // Set the linkage. GlobalValue::LinkageTypes Linkage = GV->getLinkage(); if (CODE_CONTAINS_STRUCT (TREE_CODE (decl), TS_DECL_WITH_VIS) - && DECL_LLVM_PRIVATE(decl)) { + && false) {// FIXME DECL_LLVM_PRIVATE(decl)) { Linkage = GlobalValue::PrivateLinkage; } else if (!TREE_PUBLIC(decl)) { Linkage = GlobalValue::InternalLinkage; @@ -1437,7 +1437,7 @@ } TREE_ASM_WRITTEN(decl) = 1; - timevar_pop(TV_LLVM_GLOBALS); +//TODO timevar_pop(TV_LLVM_GLOBALS); } @@ -1526,7 +1526,7 @@ return; } - timevar_push(TV_LLVM_GLOBALS); +//TODO timevar_push(TV_LLVM_GLOBALS); const char *Name = ""; if (DECL_NAME(decl)) @@ -1702,7 +1702,7 @@ SET_DECL_LLVM(decl, GV); } - timevar_pop(TV_LLVM_GLOBALS); +//TODO timevar_pop(TV_LLVM_GLOBALS); } /// llvm_get_decl_name - Used by varasm.c, returns the specified declaration's From baldrick at free.fr Mon Jul 20 03:34:24 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 08:34:24 -0000 Subject: [llvm-commits] [gcc-plugin] r76410 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907200834.n6K8YPdg014759@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 03:34:20 2009 New Revision: 76410 URL: http://llvm.org/viewvc/llvm-project?rev=76410&view=rev Log: Remove some objc logic that is unlikely to ever make sense in the plugin context. Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76410&r1=76409&r2=76410&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 03:34:20 2009 @@ -1425,16 +1425,8 @@ // No debug info for globals when optimization is on. While this is // something that would be accurate and useful to a user, it currently // affects some optimizations that, e.g., count uses. - if (TheDebugInfo && !optimize) { - const char *Name = GV->getName().c_str(); - const char LPrefix[] = "\01L_OBJC_"; - const char lPrefix[] = "\01l_OBJC_"; - - if (flag_objc_abi == -1 || flag_objc_abi == 0 || - (strncmp(Name, LPrefix, sizeof(LPrefix) - 1) != 0 && - strncmp(Name, lPrefix, sizeof(lPrefix) - 1) != 0)) - TheDebugInfo->EmitGlobalVariable(GV, decl); - } + if (TheDebugInfo && !optimize) + TheDebugInfo->EmitGlobalVariable(GV, decl); TREE_ASM_WRITTEN(decl) = 1; //TODO timevar_pop(TV_LLVM_GLOBALS); From baldrick at free.fr Mon Jul 20 03:37:17 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 08:37:17 -0000 Subject: [llvm-commits] [gcc-plugin] r76411 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907200837.n6K8bI1o014840@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 03:37:16 2009 New Revision: 76411 URL: http://llvm.org/viewvc/llvm-project?rev=76411&view=rev Log: We definitely will need some functionality like this for debugging, but it will have to wait till later. Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76411&r1=76410&r2=76411&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 03:37:16 2009 @@ -1764,29 +1764,28 @@ string); } - -// print_llvm - Print the specified LLVM chunk like an operand, called by -// print-tree.c for tree dumps. -// -void print_llvm(FILE *file, void *LLVM) { - oFILEstream FS(file); - FS << "LLVM: "; - WriteAsOperand(FS, (Value*)LLVM, true, TheModule); -} - -// print_llvm_type - Print the specified LLVM type symbolically, called by -// print-tree.c for tree dumps. -// -void print_llvm_type(FILE *file, void *LLVM) { - oFILEstream FS(file); - FS << "LLVM: "; - - // FIXME: oFILEstream can probably be removed in favor of a new raw_ostream - // adaptor which would be simpler and more efficient. In the meantime, just - // adapt the adaptor. - raw_os_ostream RO(FS); - WriteTypeSymbolic(RO, (const Type*)LLVM, TheModule); -} +//FIXME// print_llvm - Print the specified LLVM chunk like an operand, called by +//FIXME// print-tree.c for tree dumps. +//FIXME// +//FIXMEvoid print_llvm(FILE *file, void *LLVM) { +//FIXME oFILEstream FS(file); +//FIXME FS << "LLVM: "; +//FIXME WriteAsOperand(FS, (Value*)LLVM, true, TheModule); +//FIXME} +//FIXME +//FIXME// print_llvm_type - Print the specified LLVM type symbolically, called by +//FIXME// print-tree.c for tree dumps. +//FIXME// +//FIXMEvoid print_llvm_type(FILE *file, void *LLVM) { +//FIXME oFILEstream FS(file); +//FIXME FS << "LLVM: "; +//FIXME +//FIXME // FIXME: oFILEstream can probably be removed in favor of a new raw_ostream +//FIXME // adaptor which would be simpler and more efficient. In the meantime, just +//FIXME // adapt the adaptor. +//FIXME raw_os_ostream RO(FS); +//FIXME WriteTypeSymbolic(RO, (const Type*)LLVM, TheModule); +//FIXME} // Get a register name given its decl. In 4.2 unlike 4.0 these names // have been run through set_user_assembler_name which means they may From baldrick at free.fr Mon Jul 20 03:40:16 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 08:40:16 -0000 Subject: [llvm-commits] [gcc-plugin] r76412 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907200840.n6K8eIuw014933@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 03:40:10 2009 New Revision: 76412 URL: http://llvm.org/viewvc/llvm-project?rev=76412&view=rev Log: For the moment, all target stuff is completely broken in the plugin. Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76412&r1=76411&r2=76412&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 03:40:10 2009 @@ -340,19 +340,19 @@ } } -#ifndef LLVM_TARGET_NAME -#error LLVM_TARGET_NAME macro not specified by GCC backend -#endif - -namespace llvm { -#define Declare2(TARG, MOD) extern "C" void LLVMInitialize ## TARG ## MOD() -#define Declare(T, M) Declare2(T, M) - Declare(LLVM_TARGET_NAME, TargetInfo); - Declare(LLVM_TARGET_NAME, Target); - Declare(LLVM_TARGET_NAME, AsmPrinter); -#undef Declare -#undef Declare2 -} +//TODO#ifndef LLVM_TARGET_NAME +//TODO#error LLVM_TARGET_NAME macro not specified by GCC backend +//TODO#endif +//TODO +//TODOnamespace llvm { +//TODO#define Declare2(TARG, MOD) extern "C" void LLVMInitialize ## TARG ## MOD() +//TODO#define Declare(T, M) Declare2(T, M) +//TODO Declare(LLVM_TARGET_NAME, TargetInfo); +//TODO Declare(LLVM_TARGET_NAME, Target); +//TODO Declare(LLVM_TARGET_NAME, AsmPrinter); +//TODO#undef Declare +//TODO#undef Declare2 +//TODO} /// LazilyConfigureLLVM - Set LLVM configuration options, if not already set. /// already created. From baldrick at free.fr Mon Jul 20 03:50:47 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 08:50:47 -0000 Subject: [llvm-commits] [gcc-plugin] r76413 - in /gcc-plugin/trunk: Makefile llvm-backend.cpp llvm-plugin.cpp Message-ID: <200907200850.n6K8otEq015214@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 03:50:24 2009 New Revision: 76413 URL: http://llvm.org/viewvc/llvm-project?rev=76413&view=rev Log: Remove plugin logic to llvm-backend, now that this compiles. Removed: gcc-plugin/trunk/llvm-plugin.cpp Modified: gcc-plugin/trunk/Makefile gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/Makefile?rev=76413&r1=76412&r2=76413&view=diff ============================================================================== --- gcc-plugin/trunk/Makefile (original) +++ gcc-plugin/trunk/Makefile Mon Jul 20 03:50:24 2009 @@ -1,4 +1,4 @@ -PLUGIN_SOURCE_FILES=llvm-convert.cpp llvm-debug.cpp llvm-plugin.cpp llvm-types.cpp +PLUGIN_SOURCE_FILES=llvm-convert.cpp llvm-backend.cpp llvm-debug.cpp llvm-types.cpp PLUGIN_OBJECT_FILES=$(patsubst %.cpp,%.o,$(PLUGIN_SOURCE_FILES)) #GCCPLUGIN_DIR:=$(shell $(GCC) -print-file-name=plugin) @@ -15,7 +15,7 @@ -I${GCCSOURCE_DIR}/libcpp/include -I${GCCSOURCE_DIR}/libdecnumber \ -I${GCCOBJECT_DIR}/libdecnumber -LDFLAGS+=$(shell llvm-config --ldflags) $(shell llvm-config --libs core target) +LDFLAGS+=$(shell llvm-config --ldflags) $(shell llvm-config --libs analysis core target) llvm.so: $(PLUGIN_OBJECT_FILES) $(CXX) -shared $^ -o $@ ${LDFLAGS} Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76413&r1=76412&r2=76413&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 03:50:24 2009 @@ -65,18 +65,23 @@ #include "target.h" #include "tree.h" -#include "flags.h" +#include "cgraph.h" #include "diagnostic.h" -#include "output.h" -#include "toplev.h" -#include "timevar.h" -#include "tm.h" +#include "flags.h" #include "function.h" -#include "tree-inline.h" +#include "gcc-plugin.h" +extern "C" { +#include "intl.h" +} #include "langhooks.h" -#include "cgraph.h" +#include "output.h" #include "params.h" #include "plugin-version.h" +#include "tm.h" +#include "toplev.h" +#include "tree-inline.h" +#include "tree-flow.h" +#include "tree-pass.h" // Plugin headers #include "llvm-internal.h" @@ -1795,3 +1800,205 @@ const char* Name = IDENTIFIER_POINTER(DECL_ASSEMBLER_NAME(decl)); return (*Name==1) ? Name+1 : Name; } + + +//===----------------------------------------------------------------------===// +// Plugin interface +//===----------------------------------------------------------------------===// + +// This plugin's code is licensed under the GPLv2. The LLVM libraries use +// the GPL compatible University of Illinois/NCSA Open Source License. +int plugin_is_GPL_compatible; // This plugin is GPL compatible. + +/// execute_emit_llvm - Turn a gimple function into LLVM IR. +static unsigned int +execute_emit_llvm (void) +{ +//TODO Don't want to use sorry at this stage... +//TODO if (cfun->nonlocal_goto_save_area) +//TODO sorry("%Jnon-local gotos not supported by LLVM", fndecl); + +//TODO Do we want to do this? Will the warning set sorry_count etc? +//TODO enum symbol_visibility vis = DECL_VISIBILITY (current_function_decl); +//TODO +//TODO if (vis != VISIBILITY_DEFAULT) +//TODO // "asm_out.visibility" emits an important warning if we're using a +//TODO // visibility that's not supported by the target. +//TODO targetm.asm_out.visibility(current_function_decl, vis); + + // There's no need to defer outputting this function any more; we + // know we want to output it. + DECL_DEFER_OUTPUT(current_function_decl) = 0; + + // Convert the AST to raw/ugly LLVM code. +//FIXME TreeToLLVM Emitter(current_function_decl); +cout << "Yo!\n"; + +//TODO#if 0 +//TODO if (dump_file) { +//TODO fprintf (dump_file, +//TODO "\n\n;;\n;; Full LLVM generated for this function:\n;;\n"); +//TODO Fn->dump(); +//TODO } +//TODO#endif +//TODO +//TODO performLateBackendInitialization(); +//TODO createPerFunctionOptimizationPasses(); +//TODO +//TODO if (PerFunctionPasses) +//TODO PerFunctionPasses->run(*Fn); +//TODO +//TODO // TODO: Nuke the .ll code for the function at -O[01] if we don't want to +//TODO // inline it or something else. + + // Finally, we have written out this function! + TREE_ASM_WRITTEN(current_function_decl) = 1; + + execute_free_datastructures (); + return 0; +} + +/// pass_emit_llvm - RTL pass that turns gimple functions into LLVM IR. +static struct rtl_opt_pass pass_emit_llvm = +{ + { + RTL_PASS, + "emit_llvm", /* name */ + NULL, /* gate */ + execute_emit_llvm, /* execute */ + NULL, /* sub */ + NULL, /* next */ + 0, /* static_pass_number */ + TV_EXPAND, /* tv_id */ + PROP_gimple_lcf | PROP_gimple_leh | + PROP_gimple_lomp | PROP_cfg, /* properties_required */ + 0, /* properties_provided */ + PROP_ssa | PROP_trees, /* properties_destroyed */ + TODO_dump_func | TODO_verify_flow + | TODO_verify_stmts, /* todo_flags_start */ + TODO_ggc_collect /* todo_flags_finish */ + } +}; + + +/// gate_null - Gate method for a pass that does nothing. +static bool +gate_null (void) +{ + return false; +} + + +/// pass_gimple_null - Gimple pass that does nothing. +static struct gimple_opt_pass pass_gimple_null = +{ + { + GIMPLE_PASS, + NULL, /* name */ + gate_null, /* gate */ + NULL, /* execute */ + NULL, /* sub */ + NULL, /* next */ + 0, /* static_pass_number */ + TV_NONE, /* tv_id */ + 0, /* properties_required */ + 0, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + 0 /* todo_flags_finish */ + } +}; + +/// pass_rtl_null - RTL pass that does nothing. +static struct rtl_opt_pass pass_rtl_null = +{ + { + RTL_PASS, + NULL, /* name */ + gate_null, /* gate */ + NULL, /* execute */ + NULL, /* sub */ + NULL, /* next */ + 0, /* static_pass_number */ + TV_NONE, /* tv_id */ + 0, /* properties_required */ + 0, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + 0 /* todo_flags_finish */ + } +}; + +/// plugin_init - The initialization routine called by GCC. Defined in +/// gcc-plugin.h. +int plugin_init (struct plugin_name_args *plugin_info, + struct plugin_gcc_version *version) { + const char *plugin_name = plugin_info->base_name; + bool disable_gcc_optimizations = true; + struct plugin_pass pass_info; + + // Check that the running gcc is the same as the gcc we were built against. + // If not, refuse to load. This seems wise when developing against a fast + // moving gcc tree. + // TODO: Make the check milder if doing a "release build". + if (!plugin_default_version_check (version, &gcc_version)) { + // TODO: calling a gcc routine when there is a version mismatch is + // dangerous. On the other hand, failing without an explanation is + // obscure. Could send a message to std::cerr instead, but bypassing + // the gcc error reporting and translating mechanism is kind of sucky. + error(G_("plugin %qs: gcc version mismatch"), plugin_name); + return 1; + } + + // Process any plugin arguments. + { + int argc = plugin_info->argc; + struct plugin_argument *argv = plugin_info->argv; + + for (int i = 0; i < argc; ++i) { + if (!strcmp (argv[i].key, "enable-gcc-optzns")) { + if (argv[i].value) + warning (0, G_("option '-fplugin-arg-%s-%s=%s' ignored" + " (superfluous '=%s')"), + plugin_name, argv[i].key, argv[i].value, argv[i].value); + else + disable_gcc_optimizations = false; + } else { + warning (0, G_("plugin %qs: unrecognized argument %qs ignored"), + plugin_name, argv[i].key); + } + } + } + + // Replace rtl expansion with gimple to LLVM conversion. + pass_info.pass = &pass_emit_llvm.pass; + pass_info.reference_pass_name = "expand"; + pass_info.ref_pass_instance_number = 0; + pass_info.pos_op = PASS_POS_REPLACE; + register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info); + + // Turn off all rtl passes. + pass_info.pass = &pass_gimple_null.pass; + pass_info.reference_pass_name = "*rest_of_compilation"; + pass_info.ref_pass_instance_number = 0; + pass_info.pos_op = PASS_POS_REPLACE; + register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info); + + pass_info.pass = &pass_rtl_null.pass; + pass_info.reference_pass_name = "*clean_state"; + pass_info.ref_pass_instance_number = 0; + pass_info.pos_op = PASS_POS_REPLACE; + register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info); + + if (disable_gcc_optimizations) { + // Turn off all gcc optimization passes. + // TODO: figure out a good way of turning off ipa passes. + pass_info.pass = &pass_gimple_null.pass; + pass_info.reference_pass_name = "*all_optimizations"; + pass_info.ref_pass_instance_number = 0; + pass_info.pos_op = PASS_POS_REPLACE; + register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info); + } + + return 0; +} Removed: gcc-plugin/trunk/llvm-plugin.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-plugin.cpp?rev=76412&view=auto ============================================================================== --- gcc-plugin/trunk/llvm-plugin.cpp (original) +++ gcc-plugin/trunk/llvm-plugin.cpp (removed) @@ -1,438 +0,0 @@ -/* LLVM plugin for gcc - Copyright (C) 2009 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 2, or (at your option) any later -version. - -GCC is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not see -. */ - -// LLVM headers -#include "llvm/LLVMContext.h" -#include "llvm/Module.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Support/IRBuilder.h" -#include "llvm/Support/TargetFolder.h" -#include "llvm/Target/TargetData.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetRegistry.h" - -// System headers -#include -#include - -// GCC headers -#undef VISIBILITY_HIDDEN -#define IN_GCC - -extern "C" { -#include "intl.h" -} -#include "gcc-plugin.h" -#include "plugin-version.h" -#include "coretypes.h" -#include "target.h" -#include "flags.h" -#include "toplev.h" -#include "tree.h" -#include "tree-flow.h" -#include "tree-pass.h" - -// Plugin headers -#include "llvm-internal.h" - -using namespace llvm; - -// This plugin's code is licensed under the GPLv2. The LLVM libraries use -// the GPL compatible University of Illinois/NCSA Open Source License. -int plugin_is_GPL_compatible; // This plugin is GPL compatible. - - -// Global state for emitting LLVM IR. -DebugInfo *TheDebugInfo = 0; -TargetFolder *TheFolder = 0; -Module *TheModule = 0; -TargetMachine *TheTarget = 0; -TypeConverter *TheTypeConverter = 0; - -SmallSetVector AttributeUsedGlobals; - -/// LazilyConfigureLLVM - Set LLVM configuration options, if not already set. -/// already created. -static void LazilyConfigureLLVM(void) { - static bool Configured = false; - if (Configured) - return; - - // Initialize LLVM command line options. - std::vector Args; - Args.push_back(progname); // program name - -//TODO // Allow targets to specify PIC options and other stuff to the corresponding -//TODO // LLVM backends. -//TODO#ifdef LLVM_SET_RED_ZONE_FLAG -//TODO LLVM_SET_RED_ZONE_FLAG(flag_disable_red_zone) -//TODO#endif -//TODO#ifdef LLVM_SET_TARGET_OPTIONS -//TODO LLVM_SET_TARGET_OPTIONS(Args); -//TODO#endif -//TODO#ifdef LLVM_SET_MACHINE_OPTIONS -//TODO LLVM_SET_MACHINE_OPTIONS(Args); -//TODO#endif -//TODO#ifdef LLVM_SET_IMPLICIT_FLOAT -//TODO LLVM_SET_IMPLICIT_FLOAT(flag_no_implicit_float) -//TODO#endif - - if (time_report) - Args.push_back("--time-passes"); - if (fast_math_flags_set_p()) - Args.push_back("--enable-unsafe-fp-math"); - if (!flag_omit_frame_pointer) - Args.push_back("--disable-fp-elim"); - if (!flag_zero_initialized_in_bss) - Args.push_back("--nozero-initialized-in-bss"); - if (flag_debug_asm) - Args.push_back("--asm-verbose"); -//TODO if (flag_debug_pass_structure) -//TODO Args.push_back("--debug-pass=Structure"); -//TODO if (flag_debug_pass_arguments) -//TODO Args.push_back("--debug-pass=Arguments"); - if (optimize_size || optimize < 3) - // Reduce inline limit. Default limit is 200. - Args.push_back("--inline-threshold=50"); - if (flag_unwind_tables) - Args.push_back("--unwind-tables"); - -//TODO // If there are options that should be passed through to the LLVM backend -//TODO // directly from the command line, do so now. This is mainly for debugging -//TODO // purposes, and shouldn't really be for general use. -//TODO std::vector ArgStrings; -//TODO -//TODO if (flag_limited_precision > 0) { -//TODO std::string Arg("--limit-float-precision="+utostr(flag_limited_precision)); -//TODO ArgStrings.push_back(Arg); -//TODO } -//TODO -//TODO if (flag_stack_protect > 0) { -//TODO std::string Arg("--stack-protector-buffer-size=" + -//TODO utostr(PARAM_VALUE(PARAM_SSP_BUFFER_SIZE))); -//TODO ArgStrings.push_back(Arg); -//TODO } -//TODO -//TODO for (unsigned i = 0, e = ArgStrings.size(); i != e; ++i) -//TODO Args.push_back(ArgStrings[i].c_str()); -//TODO -//TODO std::vector LLVM_Optns; // Avoid deallocation before opts parsed! -//TODO if (llvm_optns) { -//TODO SplitString(llvm_optns, LLVM_Optns); -//TODO for(unsigned i = 0, e = LLVM_Optns.size(); i != e; ++i) -//TODO Args.push_back(LLVM_Optns[i].c_str()); -//TODO } - - Args.push_back(0); // Null terminator. - int pseudo_argc = Args.size()-1; - llvm::cl::ParseCommandLineOptions(pseudo_argc, (char**)&Args[0]); - - Configured = true; -} - -/// LazilyInitializeModule - Create a module to output LLVM IR to, if it wasn't -/// already created. -static void LazilyInitializeModule(void) { - static bool Initialized = false; - if (Initialized) - return; - - LazilyConfigureLLVM; - - TheModule = new Module("", getGlobalContext()); - - // If the target wants to override the architecture, e.g. turning - // powerpc-darwin-... into powerpc64-darwin-... when -m64 is enabled, do so - // now. - std::string TargetTriple = "x86_64-linux-gnu"; // FIXME! -//TODO std::string TargetTriple = TARGET_NAME; -//TODO#ifdef LLVM_OVERRIDE_TARGET_ARCH -//TODO std::string Arch = LLVM_OVERRIDE_TARGET_ARCH(); -//TODO if (!Arch.empty()) { -//TODO std::string::size_type DashPos = TargetTriple.find('-'); -//TODO if (DashPos != std::string::npos)// If we have a sane t-t, replace the arch. -//TODO TargetTriple = Arch + TargetTriple.substr(DashPos); -//TODO } -//TODO#endif -//TODO#ifdef LLVM_OVERRIDE_TARGET_VERSION -//TODO char *NewTriple; -//TODO bool OverRidden = LLVM_OVERRIDE_TARGET_VERSION(TargetTriple.c_str(), -//TODO &NewTriple); -//TODO if (OverRidden) -//TODO TargetTriple = std::string(NewTriple); -//TODO#endif - TheModule->setTargetTriple(TargetTriple); - - TheTypeConverter = new TypeConverter(); - - // Create the TargetMachine we will be generating code with. - // FIXME: Figure out how to select the target and pass down subtarget info. - std::string Err; - const Target *TME = - TargetRegistry::getClosestStaticTargetForModule(*TheModule, Err); - if (!TME) { - cerr << "Did not get a target machine! Triplet is " << TargetTriple << '\n'; - exit(1); - } - - // Figure out the subtarget feature string we pass to the target. - std::string FeatureStr; -//TODO // The target can set LLVM_SET_SUBTARGET_FEATURES to configure the LLVM -//TODO // backend. -//TODO#ifdef LLVM_SET_SUBTARGET_FEATURES -//TODO SubtargetFeatures Features; -//TODO LLVM_SET_SUBTARGET_FEATURES(Features); -//TODO FeatureStr = Features.getString(); -//TODO#endif - TheTarget = TME->createTargetMachine(*TheModule, FeatureStr); - assert(TheTarget->getTargetData()->isBigEndian() == BYTES_BIG_ENDIAN); - - TheFolder = new TargetFolder(TheTarget->getTargetData(), getGlobalContext()); - - // Install information about target datalayout stuff into the module for - // optimizer use. - TheModule->setDataLayout(TheTarget->getTargetData()-> - getStringRepresentation()); - -//TODO if (optimize) -//TODO RegisterRegAlloc::setDefault(createLinearScanRegisterAllocator); -//TODO else -//TODO RegisterRegAlloc::setDefault(createLocalRegisterAllocator); - -//TODO // FIXME - Do not disable debug info while writing pch. -//TODO if (!flag_pch_file && -//TODO debug_info_level > DINFO_LEVEL_NONE) -//TODO TheDebugInfo = new DebugInfo(TheModule); -//TODO} -//TODO -//TODO/// Set backend options that may only be known at codegen time. -//TODOvoid performLateBackendInitialization(void) { -//TODO // The Ada front-end sets flag_exceptions only after processing the file. -//TODO ExceptionHandling = flag_exceptions; -//TODO for (Module::iterator I = TheModule->begin(), E = TheModule->end(); -//TODO I != E; ++I) -//TODO if (!I->isDeclaration()) { -//TODO if (flag_disable_red_zone) -//TODO I->addFnAttr(Attribute::NoRedZone); -//TODO if (flag_no_implicit_float) -//TODO I->addFnAttr(Attribute::NoImplicitFloat); -//TODO } -//TODO} -//TODO -//TODOvoid llvm_lang_dependent_init(const char *Name) { -//TODO if (TheDebugInfo) -//TODO TheDebugInfo->Initialize(); -//TODO if (Name) -//TODO TheModule->setModuleIdentifier(Name); -//TODO} - Initialized = true; -} - -/// execute_emit_llvm - Turn a gimple function into LLVM IR. -static unsigned int -execute_emit_llvm (void) -{ -//TODO Don't want to use sorry at this stage... -//TODO if (cfun->nonlocal_goto_save_area) -//TODO sorry("%Jnon-local gotos not supported by LLVM", fndecl); - -//TODO Do we want to do this? Will the warning set sorry_count etc? -//TODO enum symbol_visibility vis = DECL_VISIBILITY (current_function_decl); -//TODO -//TODO if (vis != VISIBILITY_DEFAULT) -//TODO // "asm_out.visibility" emits an important warning if we're using a -//TODO // visibility that's not supported by the target. -//TODO targetm.asm_out.visibility(current_function_decl, vis); - - // There's no need to defer outputting this function any more; we - // know we want to output it. - DECL_DEFER_OUTPUT(current_function_decl) = 0; - - // Convert the AST to raw/ugly LLVM code. -//FIXME TreeToLLVM Emitter(current_function_decl); -cout << "Yo!\n"; - -//TODO#if 0 -//TODO if (dump_file) { -//TODO fprintf (dump_file, -//TODO "\n\n;;\n;; Full LLVM generated for this function:\n;;\n"); -//TODO Fn->dump(); -//TODO } -//TODO#endif -//TODO -//TODO performLateBackendInitialization(); -//TODO createPerFunctionOptimizationPasses(); -//TODO -//TODO if (PerFunctionPasses) -//TODO PerFunctionPasses->run(*Fn); -//TODO -//TODO // TODO: Nuke the .ll code for the function at -O[01] if we don't want to -//TODO // inline it or something else. - - // Finally, we have written out this function! - TREE_ASM_WRITTEN(current_function_decl) = 1; - - execute_free_datastructures (); - return 0; -} - -/// pass_emit_llvm - RTL pass that turns gimple functions into LLVM IR. -static struct rtl_opt_pass pass_emit_llvm = -{ - { - RTL_PASS, - "emit_llvm", /* name */ - NULL, /* gate */ - execute_emit_llvm, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - TV_EXPAND, /* tv_id */ - PROP_gimple_lcf | PROP_gimple_leh | - PROP_gimple_lomp | PROP_cfg, /* properties_required */ - 0, /* properties_provided */ - PROP_ssa | PROP_trees, /* properties_destroyed */ - TODO_dump_func | TODO_verify_flow - | TODO_verify_stmts, /* todo_flags_start */ - TODO_ggc_collect /* todo_flags_finish */ - } -}; - - -/// gate_null - Gate method for a pass that does nothing. -static bool -gate_null (void) -{ - return false; -} - - -/// pass_gimple_null - Gimple pass that does nothing. -static struct gimple_opt_pass pass_gimple_null = -{ - { - GIMPLE_PASS, - NULL, /* name */ - gate_null, /* gate */ - NULL, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - TV_NONE, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - 0 /* todo_flags_finish */ - } -}; - -/// pass_rtl_null - RTL pass that does nothing. -static struct rtl_opt_pass pass_rtl_null = -{ - { - RTL_PASS, - NULL, /* name */ - gate_null, /* gate */ - NULL, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - TV_NONE, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - 0 /* todo_flags_finish */ - } -}; - -/// plugin_init - The initialization routine called by GCC. Defined in -/// gcc-plugin.h. -int plugin_init (struct plugin_name_args *plugin_info, - struct plugin_gcc_version *version) { - const char *plugin_name = plugin_info->base_name; - bool disable_gcc_optimizations = true; - struct plugin_pass pass_info; - - // Check that the running gcc is the same as the gcc we were built against. - // If not, refuse to load. This seems wise when developing against a fast - // moving gcc tree. - // TODO: Make the check milder if doing a "release build". - if (!plugin_default_version_check (version, &gcc_version)) { - // TODO: calling a gcc routine when there is a version mismatch is - // dangerous. On the other hand, failing without an explanation is - // obscure. Could send a message to std::cerr instead, but bypassing - // the gcc error reporting and translating mechanism is kind of sucky. - error(G_("plugin %qs: gcc version mismatch"), plugin_name); - return 1; - } - - // Process any plugin arguments. - { - int argc = plugin_info->argc; - struct plugin_argument *argv = plugin_info->argv; - - for (int i = 0; i < argc; ++i) { - if (!strcmp (argv[i].key, "enable-gcc-optzns")) { - if (argv[i].value) - warning (0, G_("option '-fplugin-arg-%s-%s=%s' ignored" - " (superfluous '=%s')"), - plugin_name, argv[i].key, argv[i].value, argv[i].value); - else - disable_gcc_optimizations = false; - } else { - warning (0, G_("plugin %qs: unrecognized argument %qs ignored"), - plugin_name, argv[i].key); - } - } - } - - // Replace rtl expansion with gimple to LLVM conversion. - pass_info.pass = &pass_emit_llvm.pass; - pass_info.reference_pass_name = "expand"; - pass_info.ref_pass_instance_number = 0; - pass_info.pos_op = PASS_POS_REPLACE; - register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info); - - // Turn off all rtl passes. - pass_info.pass = &pass_gimple_null.pass; - pass_info.reference_pass_name = "*rest_of_compilation"; - pass_info.ref_pass_instance_number = 0; - pass_info.pos_op = PASS_POS_REPLACE; - register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info); - - pass_info.pass = &pass_rtl_null.pass; - pass_info.reference_pass_name = "*clean_state"; - pass_info.ref_pass_instance_number = 0; - pass_info.pos_op = PASS_POS_REPLACE; - register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info); - - if (disable_gcc_optimizations) { - // Turn off all gcc optimization passes. - // TODO: figure out a good way of turning off ipa passes. - pass_info.pass = &pass_gimple_null.pass; - pass_info.reference_pass_name = "*all_optimizations"; - pass_info.ref_pass_instance_number = 0; - pass_info.pos_op = PASS_POS_REPLACE; - register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info); - } - - return 0; -} From bruno.cardoso at gmail.com Mon Jul 20 03:52:07 2009 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Mon, 20 Jul 2009 08:52:07 -0000 Subject: [llvm-commits] [llvm] r76414 - in /llvm/trunk: include/llvm/Target/TargetELFWriterInfo.h lib/CodeGen/ELFWriter.cpp lib/CodeGen/ELFWriter.h lib/Target/X86/X86ELFWriterInfo.cpp lib/Target/X86/X86ELFWriterInfo.h Message-ID: <200907200852.n6K8q9ZQ015283@zion.cs.uiuc.edu> Author: bruno Date: Mon Jul 20 03:52:02 2009 New Revision: 76414 URL: http://llvm.org/viewvc/llvm-project?rev=76414&view=rev Log: For PC relative relocations where symbols are defined in the same section they are referenced, ignore the relocation entry and patch the relocatable field with the computed symbol offset directly Modified: llvm/trunk/include/llvm/Target/TargetELFWriterInfo.h llvm/trunk/lib/CodeGen/ELFWriter.cpp llvm/trunk/lib/CodeGen/ELFWriter.h llvm/trunk/lib/Target/X86/X86ELFWriterInfo.cpp llvm/trunk/lib/Target/X86/X86ELFWriterInfo.h Modified: llvm/trunk/include/llvm/Target/TargetELFWriterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetELFWriterInfo.h?rev=76414&r1=76413&r2=76414&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetELFWriterInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetELFWriterInfo.h Mon Jul 20 03:52:02 2009 @@ -105,16 +105,25 @@ /// ELF relocation entry. virtual bool hasRelocationAddend() const = 0; - /// getAddendForRelTy - Gets the addend value for an ELF relocation entry - /// based on the target relocation type. If addend is not used returns 0. + /// getDefaultAddendForRelTy - Gets the default addend value for a + /// relocation entry based on the target ELF relocation type. virtual long int getDefaultAddendForRelTy(unsigned RelTy) const = 0; /// getRelTySize - Returns the size of relocatable field in bits virtual unsigned getRelocationTySize(unsigned RelTy) const = 0; + /// isPCRelativeRel - True if the relocation type is pc relative + virtual bool isPCRelativeRel(unsigned RelTy) const = 0; + /// getJumpTableRelocationTy - Returns the machine relocation type used /// to reference a jumptable. virtual unsigned getAbsoluteLabelMachineRelTy() const = 0; + + /// computeRelocation - Some relocatable fields could be relocated + /// directly, avoiding the emission of a relocation symbol, compute the + /// final relocation value for this symbol. + virtual long int computeRelocation(unsigned SymOffset, unsigned RelOffset, + unsigned RelTy) const = 0; }; } // end llvm namespace Modified: llvm/trunk/lib/CodeGen/ELFWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ELFWriter.cpp?rev=76414&r1=76413&r2=76414&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/ELFWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/ELFWriter.cpp Mon Jul 20 03:52:02 2009 @@ -145,7 +145,7 @@ return false; } -/// Get jump table section on the section name returned by TAI +// Get jump table section on the section name returned by TAI ELFSection &ELFWriter::getJumpTableSection() { unsigned Align = TM.getTargetData()->getPointerABIAlignment(); return getSection(TAI->getJumpTableDataSection(), @@ -153,7 +153,7 @@ ELFSection::SHF_ALLOC, Align); } -/// Get a constant pool section based on the section name returned by TAI +// Get a constant pool section based on the section name returned by TAI ELFSection &ELFWriter::getConstantPoolSection(MachineConstantPoolEntry &CPE) { std::string CstPoolName = TAI->SelectSectionForMachineConst(CPE.getType())->getName(); @@ -163,6 +163,19 @@ CPE.getAlignment()); } +// Return the relocation section of section 'S'. 'RelA' is true +// if the relocation section contains entries with addends. +ELFSection &ELFWriter::getRelocSection(ELFSection &S) { + unsigned SectionHeaderTy = TEW->hasRelocationAddend() ? + ELFSection::SHT_RELA : ELFSection::SHT_REL; + std::string RelSName(".rel"); + if (TEW->hasRelocationAddend()) + RelSName.append("a"); + RelSName.append(S.getName()); + + return getSection(RelSName, SectionHeaderTy, 0, TEW->getPrefELFAlignment()); +} + // getGlobalELFVisibility - Returns the ELF specific visibility type unsigned ELFWriter::getGlobalELFVisibility(const GlobalValue *GV) { switch (GV->getVisibility()) { @@ -474,20 +487,32 @@ return false; } +// RelocateField - Patch relocatable field with 'Offset' in 'BO' +// using a 'Value' of known 'Size' +void ELFWriter::RelocateField(BinaryObject &BO, uint32_t Offset, + int64_t Value, unsigned Size) { + if (Size == 32) + BO.fixWord32(Value, Offset); + else if (Size == 64) + BO.fixWord64(Value, Offset); + else + llvm_unreachable("don't know howto patch relocatable field"); +} + /// EmitRelocations - Emit relocations void ELFWriter::EmitRelocations() { + // True if the target uses the relocation entry to hold the addend, + // otherwise the addend is written directly to the relocatable field. + bool HasRelA = TEW->hasRelocationAddend(); + // Create Relocation sections for each section which needs it. for (unsigned i=0, e=SectionList.size(); i != e; ++i) { ELFSection &S = *SectionList[i]; // This section does not have relocations if (!S.hasRelocations()) continue; - - // Get the relocation section for section 'S' - bool HasRelA = TEW->hasRelocationAddend(); - ELFSection &RelSec = getRelocSection(S.getName(), HasRelA, - TEW->getPrefELFAlignment()); + ELFSection &RelSec = getRelocSection(S); // 'Link' - Section hdr idx of the associated symbol table // 'Info' - Section hdr idx of the section to which the relocation applies @@ -502,18 +527,15 @@ MRE = Relos.end(); MRI != MRE; ++MRI) { MachineRelocation &MR = *MRI; - // Holds the relocatable field address as an offset from the - // beginning of the section where it lives - unsigned Offset = MR.getMachineCodeOffset(); + // Relocatable field offset from the section start + unsigned RelOffset = MR.getMachineCodeOffset(); // Symbol index in the symbol table unsigned SymIdx = 0; - // Target specific ELF relocation type + // Target specific relocation field type and size unsigned RelType = TEW->getRelocationType(MR.getRelocationType()); - - // Constant addend used to compute the value to be stored - // into the relocatable field + unsigned RelTySize = TEW->getRelocationTySize(RelType); int64_t Addend = 0; // There are several machine relocations types, and each one of @@ -533,29 +555,33 @@ } else { // Get the symbol index for the section symbol unsigned SectionIdx = MR.getConstantVal(); + SymIdx = SectionList[SectionIdx]->getSymbolTableIndex(); + Addend = (uint64_t)MR.getResultPointer(); + + // For pc relative relocations where symbols are defined in the same + // section they are referenced, ignore the relocation entry and patch + // the relocatable field with the symbol offset directly. + if (S.SectionIdx == SectionIdx && TEW->isPCRelativeRel(RelType)) { + int64_t Value = TEW->computeRelocation(Addend, RelOffset, RelType); + RelocateField(S, RelOffset, Value, RelTySize); + continue; + } // Handle Jump Table Index relocation if ((SectionIdx == getJumpTableSection().SectionIdx) && - TEW->hasCustomJumpTableIndexRelTy()) + TEW->hasCustomJumpTableIndexRelTy()) { RelType = TEW->getJumpTableIndexRelTy(); - - SymIdx = SectionList[SectionIdx]->getSymbolTableIndex(); - Addend = (uint64_t)MR.getResultPointer(); + RelTySize = TEW->getRelocationTySize(RelType); + } } // The target without addend on the relocation symbol must be // patched in the relocation place itself to contain the addend - if (!HasRelA) { - if (TEW->getRelocationTySize(RelType) == 32) - S.fixWord32(Addend, Offset); - else if (TEW->getRelocationTySize(RelType) == 64) - S.fixWord64(Addend, Offset); - else - llvm_unreachable("don't know howto patch relocatable field"); - } + if (!HasRelA) + RelocateField(S, RelOffset, Addend, RelTySize); // Get the relocation entry and emit to the relocation section - ELFRelocation Rel(Offset, SymIdx, RelType, HasRelA, Addend); + ELFRelocation Rel(RelOffset, SymIdx, RelType, HasRelA, Addend); EmitRelocation(RelSec, Rel, HasRelA); } } Modified: llvm/trunk/lib/CodeGen/ELFWriter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ELFWriter.h?rev=76414&r1=76413&r2=76414&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/ELFWriter.h (original) +++ llvm/trunk/lib/CodeGen/ELFWriter.h Mon Jul 20 03:52:02 2009 @@ -171,18 +171,6 @@ ELFSection::SHF_EXECINSTR | ELFSection::SHF_ALLOC); } - /// Return the relocation section of section 'S'. 'RelA' is true - /// if the relocation section contains entries with addends. - ELFSection &getRelocSection(std::string SName, bool RelA, unsigned Align) { - std::string RelSName(".rel"); - unsigned SHdrTy = RelA ? ELFSection::SHT_RELA : ELFSection::SHT_REL; - - if (RelA) RelSName.append("a"); - RelSName.append(SName); - - return getSection(RelSName, SHdrTy, 0, Align); - } - ELFSection &getNonExecStackSection() { return getSection(".note.GNU-stack", ELFSection::SHT_PROGBITS, 0, 1); } @@ -215,6 +203,7 @@ ELFSection &getJumpTableSection(); ELFSection &getConstantPoolSection(MachineConstantPoolEntry &CPE); + ELFSection &getRelocSection(ELFSection &S); // Helpers for obtaining ELF specific info. unsigned getGlobalELFBinding(const GlobalValue *GV); @@ -244,6 +233,8 @@ void EmitSymbolTable(); void EmitStringTable(); void OutputSectionsAndSectionTable(); + void RelocateField(BinaryObject &BO, uint32_t Offset, int64_t Value, + unsigned Size); unsigned SortSymbols(); }; } Modified: llvm/trunk/lib/Target/X86/X86ELFWriterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ELFWriterInfo.cpp?rev=76414&r1=76413&r2=76414&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ELFWriterInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ELFWriterInfo.cpp Mon Jul 20 03:52:02 2009 @@ -103,8 +103,44 @@ return 0; } +bool X86ELFWriterInfo::isPCRelativeRel(unsigned RelTy) const { + if (is64Bit) { + switch(RelTy) { + case R_X86_64_PC32: + return true; + case R_X86_64_32: + case R_X86_64_32S: + case R_X86_64_64: + return false; + default: + llvm_unreachable("unknown x86_64 relocation type"); + } + } else { + switch(RelTy) { + case R_386_PC32: + return true; + case R_386_32: + return false; + default: + llvm_unreachable("unknown x86 relocation type"); + } + } + return 0; +} + unsigned X86ELFWriterInfo::getAbsoluteLabelMachineRelTy() const { return is64Bit ? X86::reloc_absolute_dword : X86::reloc_absolute_word; } +long int X86ELFWriterInfo::computeRelocation(unsigned SymOffset, + unsigned RelOffset, + unsigned RelTy) const { + + if (RelTy == R_X86_64_PC32 || RelTy == R_386_PC32) + return SymOffset - (RelOffset + 4); + else + assert("computeRelocation unknown for this relocation type"); + + return 0; +} Modified: llvm/trunk/lib/Target/X86/X86ELFWriterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ELFWriterInfo.h?rev=76414&r1=76413&r2=76414&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ELFWriterInfo.h (original) +++ llvm/trunk/lib/Target/X86/X86ELFWriterInfo.h Mon Jul 20 03:52:02 2009 @@ -59,16 +59,25 @@ /// for a jump table index. virtual unsigned getJumpTableIndexRelTy() const { return R_X86_64_32S; } - /// getAddendForRelTy - Gets the addend value for an ELF relocation entry - /// based on the target relocation type + /// getDefaultAddendForRelTy - Gets the default addend value for a + /// relocation entry based on the target ELF relocation type. virtual long int getDefaultAddendForRelTy(unsigned RelTy) const; /// getRelTySize - Returns the size of relocatable field in bits virtual unsigned getRelocationTySize(unsigned RelTy) const; + /// isPCRelativeRel - True if the relocation type is pc relative + virtual bool isPCRelativeRel(unsigned RelTy) const; + /// getJumpTableRelocationTy - Returns the machine relocation type used /// to reference a jumptable. virtual unsigned getAbsoluteLabelMachineRelTy() const; + + /// computeRelocation - Some relocatable fields could be relocated + /// directly, avoiding the relocation symbol emission, compute the + /// final relocation value for this symbol. + virtual long int computeRelocation(unsigned SymOffset, unsigned RelOffset, + unsigned RelTy) const; }; } // end llvm namespace From baldrick at free.fr Mon Jul 20 03:56:30 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 08:56:30 -0000 Subject: [llvm-commits] [gcc-plugin] r76415 - in /gcc-plugin/trunk: Makefile bits_and_bobs.cpp Message-ID: <200907200856.n6K8uWco015409@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 03:56:14 2009 New Revision: 76415 URL: http://llvm.org/viewvc/llvm-project?rev=76415&view=rev Log: Add a fake implementation of some rather vital functions. With this, the plugin now builds and can be loaded into gcc. So we are back to the "Yo!" printing stage, only this time it takes a 17MB plugin to do it :) Added: gcc-plugin/trunk/bits_and_bobs.cpp Modified: gcc-plugin/trunk/Makefile Modified: gcc-plugin/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/Makefile?rev=76415&r1=76414&r2=76415&view=diff ============================================================================== --- gcc-plugin/trunk/Makefile (original) +++ gcc-plugin/trunk/Makefile Mon Jul 20 03:56:14 2009 @@ -1,4 +1,4 @@ -PLUGIN_SOURCE_FILES=llvm-convert.cpp llvm-backend.cpp llvm-debug.cpp llvm-types.cpp +PLUGIN_SOURCE_FILES=llvm-convert.cpp llvm-backend.cpp llvm-debug.cpp llvm-types.cpp bits_and_bobs.cpp PLUGIN_OBJECT_FILES=$(patsubst %.cpp,%.o,$(PLUGIN_SOURCE_FILES)) #GCCPLUGIN_DIR:=$(shell $(GCC) -print-file-name=plugin) Added: gcc-plugin/trunk/bits_and_bobs.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/bits_and_bobs.cpp?rev=76415&view=auto ============================================================================== --- gcc-plugin/trunk/bits_and_bobs.cpp (added) +++ gcc-plugin/trunk/bits_and_bobs.cpp Mon Jul 20 03:56:14 2009 @@ -0,0 +1,47 @@ +// LLVM headers +#include "llvm/Constant.h" +#include "llvm/Value.h" + +// GCC headers +#undef VISIBILITY_HIDDEN +#define IN_GCC + +#include "config.h" +extern "C" { +#include "system.h" +} +#include "coretypes.h" +#include "target.h" +#include "tree.h" + +using namespace llvm; + +bool flag_odr = false; + +void llvm_set_decl (tree t, Value *V) { +abort(); +} + +Value *llvm_get_decl(tree t) { +abort(); +} + +bool llvm_set_decl_p(tree t) { +abort(); +} + +void eraseLocalLLVMValues() { +abort(); +} + +void changeLLVMConstant(Constant *Old, Constant *New) { +abort(); +} + +const Type *llvm_set_type(tree Tr, const Type *Ty) { +abort(); +} + +const Type *llvm_get_type(unsigned Index) { +abort(); +} From baldrick at free.fr Mon Jul 20 05:05:34 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 10:05:34 -0000 Subject: [llvm-commits] [gcc-plugin] r76416 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907201005.n6KA5ckT022553@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 05:05:09 2009 New Revision: 76416 URL: http://llvm.org/viewvc/llvm-project?rev=76416&view=rev Log: Initialize the target as x86 for the moment. Actually do something with functions rather than just printing Yo! Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76416&r1=76415&r2=76416&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 05:05:09 2009 @@ -43,6 +43,7 @@ #include "llvm/Transforms/IPO.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringMap.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/StandardPasses.h" @@ -345,19 +346,22 @@ } } -//TODO#ifndef LLVM_TARGET_NAME -//TODO#error LLVM_TARGET_NAME macro not specified by GCC backend -//TODO#endif -//TODO -//TODOnamespace llvm { -//TODO#define Declare2(TARG, MOD) extern "C" void LLVMInitialize ## TARG ## MOD() -//TODO#define Declare(T, M) Declare2(T, M) -//TODO Declare(LLVM_TARGET_NAME, TargetInfo); -//TODO Declare(LLVM_TARGET_NAME, Target); -//TODO Declare(LLVM_TARGET_NAME, AsmPrinter); -//TODO#undef Declare -//TODO#undef Declare2 -//TODO} +// FIXME: For the moment, all the world's an x86 +#define LLVM_TARGET_NAME X86 + +#ifndef LLVM_TARGET_NAME +#error LLVM_TARGET_NAME macro not specified by GCC backend +#endif + +namespace llvm { +#define Declare2(TARG, MOD) extern "C" void LLVMInitialize ## TARG ## MOD() +#define Declare(T, M) Declare2(T, M) + Declare(LLVM_TARGET_NAME, TargetInfo); + Declare(LLVM_TARGET_NAME, Target); + Declare(LLVM_TARGET_NAME, AsmPrinter); +#undef Declare +#undef Declare2 +} /// LazilyConfigureLLVM - Set LLVM configuration options, if not already set. /// already created. @@ -366,6 +370,15 @@ if (Configured) return; + // Initialize the LLVM backend. +#define DoInit2(TARG, MOD) LLVMInitialize ## TARG ## MOD() +#define DoInit(T, M) DoInit2(T, M) + DoInit(LLVM_TARGET_NAME, TargetInfo); + DoInit(LLVM_TARGET_NAME, Target); + DoInit(LLVM_TARGET_NAME, AsmPrinter); +#undef DoInit +#undef DoInit2 + // Initialize LLVM command line options. std::vector Args; Args.push_back(progname); // program name @@ -478,20 +491,18 @@ std::string Err; const Target *TME = TargetRegistry::getClosestStaticTargetForModule(*TheModule, Err); - if (!TME) { - cerr << "Did not get a target machine! Triplet is " << TargetTriple << '\n'; - exit(1); - } + if (!TME) + llvm_report_error(Err); // Figure out the subtarget feature string we pass to the target. std::string FeatureStr; -//TODO // The target can set LLVM_SET_SUBTARGET_FEATURES to configure the LLVM -//TODO // backend. -//TODO#ifdef LLVM_SET_SUBTARGET_FEATURES -//TODO SubtargetFeatures Features; -//TODO LLVM_SET_SUBTARGET_FEATURES(Features); -//TODO FeatureStr = Features.getString(); -//TODO#endif + // The target can set LLVM_SET_SUBTARGET_FEATURES to configure the LLVM + // backend. +#ifdef LLVM_SET_SUBTARGET_FEATURES + SubtargetFeatures Features; + LLVM_SET_SUBTARGET_FEATURES(Features); + FeatureStr = Features.getString(); +#endif TheTarget = TME->createTargetMachine(*TheModule, FeatureStr); assert(TheTarget->getTargetData()->isBigEndian() == BYTES_BIG_ENDIAN); @@ -1814,6 +1825,8 @@ static unsigned int execute_emit_llvm (void) { + LazilyInitializeModule(); + //TODO Don't want to use sorry at this stage... //TODO if (cfun->nonlocal_goto_save_area) //TODO sorry("%Jnon-local gotos not supported by LLVM", fndecl); @@ -1831,8 +1844,7 @@ DECL_DEFER_OUTPUT(current_function_decl) = 0; // Convert the AST to raw/ugly LLVM code. -//FIXME TreeToLLVM Emitter(current_function_decl); -cout << "Yo!\n"; + TreeToLLVM Emitter(current_function_decl); //TODO#if 0 //TODO if (dump_file) { From baldrick at free.fr Mon Jul 20 05:11:34 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 10:11:34 -0000 Subject: [llvm-commits] [gcc-plugin] r76417 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907201011.n6KABbWL022754@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 05:11:13 2009 New Revision: 76417 URL: http://llvm.org/viewvc/llvm-project?rev=76417&view=rev Log: Call LazilyConfigureLLVM, rather than taking its address. Spotted by Edwin. Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76417&r1=76416&r2=76417&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 05:11:13 2009 @@ -458,7 +458,7 @@ if (Initialized) return; - LazilyConfigureLLVM; + LazilyConfigureLLVM(); TheModule = new Module("", getGlobalContext()); From baldrick at free.fr Mon Jul 20 05:15:10 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 10:15:10 -0000 Subject: [llvm-commits] [gcc-plugin] r76418 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907201015.n6KAFB2H022893@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 05:15:03 2009 New Revision: 76418 URL: http://llvm.org/viewvc/llvm-project?rev=76418&view=rev Log: The inliner is not linked in for the moment, so turn off this inliner option. Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76418&r1=76417&r2=76418&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 05:15:03 2009 @@ -412,9 +412,9 @@ //TODO Args.push_back("--debug-pass=Structure"); //TODO if (flag_debug_pass_arguments) //TODO Args.push_back("--debug-pass=Arguments"); - if (optimize_size || optimize < 3) - // Reduce inline limit. Default limit is 200. - Args.push_back("--inline-threshold=50"); +//TODO if (optimize_size || optimize < 3) +//TODO // Reduce inline limit. Default limit is 200. +//TODO Args.push_back("--inline-threshold=50"); if (flag_unwind_tables) Args.push_back("--unwind-tables"); From baldrick at free.fr Mon Jul 20 05:21:22 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 10:21:22 -0000 Subject: [llvm-commits] [gcc-plugin] r76421 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907201021.n6KALN5A023131@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 05:21:18 2009 New Revision: 76421 URL: http://llvm.org/viewvc/llvm-project?rev=76421&view=rev Log: Turn on function emission. This immediately crashes due to various methods that are implemented as abort. Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76421&r1=76420&r2=76421&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Mon Jul 20 05:21:18 2009 @@ -1845,6 +1845,7 @@ // Convert the AST to raw/ugly LLVM code. TreeToLLVM Emitter(current_function_decl); + Function *Fn = Emitter.EmitFunction(); //TODO#if 0 //TODO if (dump_file) { From andrewl at lenharth.org Mon Jul 20 05:49:36 2009 From: andrewl at lenharth.org (Andrew Lenharth) Date: Mon, 20 Jul 2009 05:49:36 -0500 Subject: [llvm-commits] [llvm] r76353 - in /llvm/trunk/lib/Target/Alpha: Alpha.td AlphaCallingConv.td AlphaISelDAGToDAG.cpp AlphaISelLowering.cpp AlphaISelLowering.h In-Reply-To: <200907190111.n6J1BWjP009675@zion.cs.uiuc.edu> References: <200907190111.n6J1BWjP009675@zion.cs.uiuc.edu> Message-ID: <85dfcd7f0907200349v363c0c12nfc66b453d4b0091@mail.gmail.com> On Sat, Jul 18, 2009 at 8:11 PM, Eli Friedman wrote: > Author: efriedma > Date: Sat Jul 18 20:11:32 2009 > New Revision: 76353 > > URL: http://llvm.org/viewvc/llvm-project?rev=76353&view=rev > Log: > Switch Alpha over to the new call lowering style. ?New code mostly > copied from the SystemZ target. ?I don't think this causes any > significant changes to the output (I compared the assembly, and the > results appeared to be essentially unchanged), although I don't actually > have an Alpha to test on. > > I would appreciate if anyone with the appropriate hardware could test > this. I'm not sure if that includes anyone subscribed to llvm-commits, > though. It does, though the test machines are down after a power loss and I haven't reboot them. I'll try to get the alpha builder bot back up this week. Andrew > > Added: > ? ?llvm/trunk/lib/Target/Alpha/AlphaCallingConv.td > Modified: > ? ?llvm/trunk/lib/Target/Alpha/Alpha.td > ? ?llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp > ? ?llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp > ? ?llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h > > Modified: llvm/trunk/lib/Target/Alpha/Alpha.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/Alpha.td?rev=76353&r1=76352&r2=76353&view=diff > > ============================================================================== > --- llvm/trunk/lib/Target/Alpha/Alpha.td (original) > +++ llvm/trunk/lib/Target/Alpha/Alpha.td Sat Jul 18 20:11:32 2009 > @@ -30,6 +30,12 @@ > ?include "AlphaRegisterInfo.td" > > ?//===----------------------------------------------------------------------===// > +// Calling Convention Description > +//===----------------------------------------------------------------------===// > + > +include "AlphaCallingConv.td" > + > +//===----------------------------------------------------------------------===// > ?// Schedule Description > ?//===----------------------------------------------------------------------===// > > > Added: llvm/trunk/lib/Target/Alpha/AlphaCallingConv.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaCallingConv.td?rev=76353&view=auto > > ============================================================================== > --- llvm/trunk/lib/Target/Alpha/AlphaCallingConv.td (added) > +++ llvm/trunk/lib/Target/Alpha/AlphaCallingConv.td Sat Jul 18 20:11:32 2009 > @@ -0,0 +1,37 @@ > +//===- AlphaCallingConv.td - Calling Conventions for Alpha -*- tablegen -*-===// > +// > +// ? ? ? ? ? ? ? ? ? ? The LLVM Compiler Infrastructure > +// > +// This file is distributed under the University of Illinois Open Source > +// License. See LICENSE.TXT for details. > +// > +//===----------------------------------------------------------------------===// > +// This describes the calling conventions for Alpha architecture. > +//===----------------------------------------------------------------------===// > + > +//===----------------------------------------------------------------------===// > +// Alpha Return Value Calling Convention > +//===----------------------------------------------------------------------===// > +def RetCC_Alpha : CallingConv<[ > + ?// i64 is returned in register R0 > + ?CCIfType<[i64], CCAssignToReg<[R0]>>, > + > + ?// f32 / f64 are returned in F0/F1 > + ?CCIfType<[f32, f64], CCAssignToReg<[F0, F1]>> > +]>; > + > +//===----------------------------------------------------------------------===// > +// Alpha Argument Calling Conventions > +//===----------------------------------------------------------------------===// > +def CC_Alpha : CallingConv<[ > + ?// The first 6 arguments are passed in registers, whether integer or > + ?// floating-point > + ?CCIfType<[i64], CCAssignToRegWithShadow<[R16, R17, R18, R19, R20, R21], > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[F16, F17, F18, F19, F20, F21]>>, > + > + ?CCIfType<[f32, f64], CCAssignToRegWithShadow<[F16, F17, F18, F19, F20, F21], > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [R16, R17, R18, R19, R20, R21]>>, > + > + ?// Stack slots are 8 bytes in size and 8-byte aligned. > + ?CCIfType<[i64, f32, f64], CCAssignToStack<8, 8>> > +]>; > > Modified: llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp?rev=76353&r1=76352&r2=76353&view=diff > > ============================================================================== > --- llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp (original) > +++ llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Sat Jul 18 20:11:32 2009 > @@ -446,55 +446,9 @@ > ? SDNode *N = Op.getNode(); > ? SDValue Chain = N->getOperand(0); > ? SDValue Addr = N->getOperand(1); > - ?SDValue InFlag(0,0); ?// Null incoming flag value. > + ?SDValue InFlag = N->getOperand(N->getNumOperands() - 1); > ? DebugLoc dl = N->getDebugLoc(); > > - ? std::vector CallOperands; > - ? std::vector TypeOperands; > - > - ? //grab the arguments > - ? for(int i = 2, e = N->getNumOperands(); i < e; ++i) { > - ? ? TypeOperands.push_back(N->getOperand(i).getValueType()); > - ? ? CallOperands.push_back(N->getOperand(i)); > - ? } > - ? int count = N->getNumOperands() - 2; > - > - ? static const unsigned args_int[] = {Alpha::R16, Alpha::R17, Alpha::R18, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Alpha::R19, Alpha::R20, Alpha::R21}; > - ? static const unsigned args_float[] = {Alpha::F16, Alpha::F17, Alpha::F18, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Alpha::F19, Alpha::F20, Alpha::F21}; > - > - ? for (int i = 6; i < count; ++i) { > - ? ? unsigned Opc = Alpha::WTF; > - ? ? if (TypeOperands[i].isInteger()) { > - ? ? ? Opc = Alpha::STQ; > - ? ? } else if (TypeOperands[i] == MVT::f32) { > - ? ? ? Opc = Alpha::STS; > - ? ? } else if (TypeOperands[i] == MVT::f64) { > - ? ? ? Opc = Alpha::STT; > - ? ? } else > - ? ? ? llvm_unreachable("Unknown operand"); > - > - ? ? SDValue Ops[] = { CallOperands[i], ?getI64Imm((i - 6) * 8), > - ? ? ? ? ? ? ? ? ? ? ? CurDAG->getCopyFromReg(Chain, dl, Alpha::R30, MVT::i64), > - ? ? ? ? ? ? ? ? ? ? ? Chain }; > - ? ? Chain = SDValue(CurDAG->getTargetNode(Opc, dl, MVT::Other, Ops, 4), 0); > - ? } > - ? for (int i = 0; i < std::min(6, count); ++i) { > - ? ? if (TypeOperands[i].isInteger()) { > - ? ? ? Chain = CurDAG->getCopyToReg(Chain, dl, args_int[i], > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?CallOperands[i], InFlag); > - ? ? ? InFlag = Chain.getValue(1); > - ? ? } else if (TypeOperands[i] == MVT::f32 || TypeOperands[i] == MVT::f64) { > - ? ? ? Chain = CurDAG->getCopyToReg(Chain, dl, args_float[i], > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?CallOperands[i], InFlag); > - ? ? ? InFlag = Chain.getValue(1); > - ? ? } else > - ? ? ? llvm_unreachable("Unknown operand"); > - ? } > - > - ? // Finally, once everything is in registers to pass to the call, emit the > - ? // call itself. > ? ?if (Addr.getOpcode() == AlphaISD::GPRelLo) { > ? ? ?SDValue GOT = SDValue(getGlobalBaseReg(), 0); > ? ? ?Chain = CurDAG->getCopyToReg(Chain, dl, Alpha::R29, GOT, InFlag); > @@ -510,31 +464,8 @@ > ? ?} > ? ?InFlag = Chain.getValue(1); > > - ? std::vector CallResults; > - > - ? switch (N->getValueType(0).getSimpleVT()) { > - ? default: llvm_unreachable("Unexpected ret value!"); > - ? ? case MVT::Other: break; > - ? case MVT::i64: > - ? ? Chain = CurDAG->getCopyFromReg(Chain, dl, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Alpha::R0, MVT::i64, InFlag).getValue(1); > - ? ? CallResults.push_back(Chain.getValue(0)); > - ? ? break; > - ? case MVT::f32: > - ? ? Chain = CurDAG->getCopyFromReg(Chain, dl, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Alpha::F0, MVT::f32, InFlag).getValue(1); > - ? ? CallResults.push_back(Chain.getValue(0)); > - ? ? break; > - ? case MVT::f64: > - ? ? Chain = CurDAG->getCopyFromReg(Chain, dl, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Alpha::F0, MVT::f64, InFlag).getValue(1); > - ? ? CallResults.push_back(Chain.getValue(0)); > - ? ? break; > - ? } > - > - ? CallResults.push_back(Chain); > - ? for (unsigned i = 0, e = CallResults.size(); i != e; ++i) > - ? ? ReplaceUses(Op.getValue(i), CallResults[i]); > + ?ReplaceUses(Op.getValue(0), Chain); > + ?ReplaceUses(Op.getValue(1), InFlag); > ?} > > > > Modified: llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp?rev=76353&r1=76352&r2=76353&view=diff > > ============================================================================== > --- llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp (original) > +++ llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp Sat Jul 18 20:11:32 2009 > @@ -13,12 +13,14 @@ > > ?#include "AlphaISelLowering.h" > ?#include "AlphaTargetMachine.h" > +#include "llvm/CodeGen/CallingConvLower.h" > ?#include "llvm/CodeGen/MachineFrameInfo.h" > ?#include "llvm/CodeGen/MachineFunction.h" > ?#include "llvm/CodeGen/MachineInstrBuilder.h" > ?#include "llvm/CodeGen/MachineRegisterInfo.h" > ?#include "llvm/CodeGen/SelectionDAG.h" > ?#include "llvm/CodeGen/MachineRegisterInfo.h" > +#include "llvm/CodeGen/PseudoSourceValue.h" > ?#include "llvm/Constants.h" > ?#include "llvm/Function.h" > ?#include "llvm/Module.h" > @@ -223,6 +225,174 @@ > ?// //#define GP ? ?$29 > ?// //#define SP ? ?$30 > > +#include "AlphaGenCallingConv.inc" > + > +SDValue AlphaTargetLowering::LowerCALL(SDValue Op, SelectionDAG &DAG) { > + ?CallSDNode *TheCall = cast(Op.getNode()); > + ?SDValue Chain ?= TheCall->getChain(); > + ?SDValue Callee = TheCall->getCallee(); > + ?bool isVarArg ?= TheCall->isVarArg(); > + ?DebugLoc dl = Op.getDebugLoc(); > + ?MachineFunction &MF = DAG.getMachineFunction(); > + ?unsigned CC = MF.getFunction()->getCallingConv(); > + > + ?// Analyze operands of the call, assigning locations to each operand. > + ?SmallVector ArgLocs; > + ?CCState CCInfo(CC, isVarArg, getTargetMachine(), ArgLocs, DAG.getContext()); > + > + ?CCInfo.AnalyzeCallOperands(TheCall, CC_Alpha); > + > + ? ?// Get a count of how many bytes are to be pushed on the stack. > + ?unsigned NumBytes = CCInfo.getNextStackOffset(); > + > + ?Chain = DAG.getCALLSEQ_START(Chain, DAG.getConstant(NumBytes, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?getPointerTy(), true)); > + > + ?SmallVector, 4> RegsToPass; > + ?SmallVector MemOpChains; > + ?SDValue StackPtr; > + > + ?// Walk the register/memloc assignments, inserting copies/loads. > + ?for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { > + ? ?CCValAssign &VA = ArgLocs[i]; > + > + ? ?// Arguments start after the 5 first operands of ISD::CALL > + ? ?SDValue Arg = TheCall->getArg(i); > + > + ? ?// Promote the value if needed. > + ? ?switch (VA.getLocInfo()) { > + ? ? ?default: assert(0 && "Unknown loc info!"); > + ? ? ?case CCValAssign::Full: break; > + ? ? ?case CCValAssign::SExt: > + ? ? ? ?Arg = DAG.getNode(ISD::SIGN_EXTEND, dl, VA.getLocVT(), Arg); > + ? ? ? ?break; > + ? ? ?case CCValAssign::ZExt: > + ? ? ? ?Arg = DAG.getNode(ISD::ZERO_EXTEND, dl, VA.getLocVT(), Arg); > + ? ? ? ?break; > + ? ? ?case CCValAssign::AExt: > + ? ? ? ?Arg = DAG.getNode(ISD::ANY_EXTEND, dl, VA.getLocVT(), Arg); > + ? ? ? ?break; > + ? ?} > + > + ? ?// Arguments that can be passed on register must be kept at RegsToPass > + ? ?// vector > + ? ?if (VA.isRegLoc()) { > + ? ? ?RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg)); > + ? ?} else { > + ? ? ?assert(VA.isMemLoc()); > + > + ? ? ?if (StackPtr.getNode() == 0) > + ? ? ? ?StackPtr = DAG.getCopyFromReg(Chain, dl, Alpha::R30, MVT::i64); > + > + ? ? ?SDValue PtrOff = DAG.getNode(ISD::ADD, dl, getPointerTy(), > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? StackPtr, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? DAG.getIntPtrConstant(VA.getLocMemOffset())); > + > + ? ? ?MemOpChains.push_back(DAG.getStore(Chain, dl, Arg, PtrOff, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? PseudoSourceValue::getStack(), 0)); > + ? ?} > + ?} > + > + ?// Transform all store nodes into one single node because all store nodes are > + ?// independent of each other. > + ?if (!MemOpChains.empty()) > + ? ?Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, > + ? ? ? ? ? ? ? ? ? ? ? ?&MemOpChains[0], MemOpChains.size()); > + > + ?// Build a sequence of copy-to-reg nodes chained together with token chain and > + ?// flag operands which copy the outgoing args into registers. ?The InFlag in > + ?// necessary since all emited instructions must be stuck together. > + ?SDValue InFlag; > + ?for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i) { > + ? ?Chain = DAG.getCopyToReg(Chain, dl, RegsToPass[i].first, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? RegsToPass[i].second, InFlag); > + ? ?InFlag = Chain.getValue(1); > + ?} > + > + ?// Returns a chain & a flag for retval copy to use. > + ?SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); > + ?SmallVector Ops; > + ?Ops.push_back(Chain); > + ?Ops.push_back(Callee); > + > + ?// Add argument registers to the end of the list so that they are > + ?// known live into the call. > + ?for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i) > + ? ?Ops.push_back(DAG.getRegister(RegsToPass[i].first, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?RegsToPass[i].second.getValueType())); > + > + ?if (InFlag.getNode()) > + ? ?Ops.push_back(InFlag); > + > + ?Chain = DAG.getNode(AlphaISD::CALL, dl, NodeTys, &Ops[0], Ops.size()); > + ?InFlag = Chain.getValue(1); > + > + ?// Create the CALLSEQ_END node. > + ?Chain = DAG.getCALLSEQ_END(Chain, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? DAG.getConstant(NumBytes, getPointerTy(), true), > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? DAG.getConstant(0, getPointerTy(), true), > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? InFlag); > + ?InFlag = Chain.getValue(1); > + > + ?// Handle result values, copying them out of physregs into vregs that we > + ?// return. > + ?return SDValue(LowerCallResult(Chain, InFlag, TheCall, CC, DAG), > + ? ? ? ? ? ? ? ? Op.getResNo()); > +} > + > +/// LowerCallResult - Lower the result values of an ISD::CALL into the > +/// appropriate copies out of appropriate physical registers. ?This assumes that > +/// Chain/InFlag are the input chain/flag to use, and that TheCall is the call > +/// being lowered. Returns a SDNode with the same number of values as the > +/// ISD::CALL. > +SDNode* > +AlphaTargetLowering::LowerCallResult(SDValue Chain, SDValue InFlag, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? CallSDNode *TheCall, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? unsigned CallingConv, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? SelectionDAG &DAG) { > + ?bool isVarArg = TheCall->isVarArg(); > + ?DebugLoc dl = TheCall->getDebugLoc(); > + > + ?// Assign locations to each value returned by this call. > + ?SmallVector RVLocs; > + ?CCState CCInfo(CallingConv, isVarArg, getTargetMachine(), RVLocs, > + ? ? ? ? ? ? ? ? DAG.getContext()); > + > + ?CCInfo.AnalyzeCallResult(TheCall, RetCC_Alpha); > + ?SmallVector ResultVals; > + > + ?// Copy all of the result registers out of their specified physreg. > + ?for (unsigned i = 0; i != RVLocs.size(); ++i) { > + ? ?CCValAssign &VA = RVLocs[i]; > + > + ? ?Chain = DAG.getCopyFromReg(Chain, dl, VA.getLocReg(), > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? VA.getLocVT(), InFlag).getValue(1); > + ? ?SDValue RetValue = Chain.getValue(0); > + ? ?InFlag = Chain.getValue(2); > + > + ? ?// If this is an 8/16/32-bit value, it is really passed promoted to 64 > + ? ?// bits. Insert an assert[sz]ext to capture this, then truncate to the > + ? ?// right size. > + ? ?if (VA.getLocInfo() == CCValAssign::SExt) > + ? ? ?RetValue = DAG.getNode(ISD::AssertSext, dl, VA.getLocVT(), RetValue, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? DAG.getValueType(VA.getValVT())); > + ? ?else if (VA.getLocInfo() == CCValAssign::ZExt) > + ? ? ?RetValue = DAG.getNode(ISD::AssertZext, dl, VA.getLocVT(), RetValue, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? DAG.getValueType(VA.getValVT())); > + > + ? ?if (VA.getLocInfo() != CCValAssign::Full) > + ? ? ?RetValue = DAG.getNode(ISD::TRUNCATE, dl, VA.getValVT(), RetValue); > + > + ? ?ResultVals.push_back(RetValue); > + ?} > + > + ?ResultVals.push_back(Chain); > + > + ?// Merge everything together with a MERGE_VALUES node. > + ?return DAG.getNode(ISD::MERGE_VALUES, dl, TheCall->getVTList(), > + ? ? ? ? ? ? ? ? ? ? &ResultVals[0], ResultVals.size()).getNode(); > +} > + > ?static SDValue LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int &VarArgsBase, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int &VarArgsOffset) { > @@ -365,85 +535,6 @@ > ? ? ? ? ? ? ? ? ? ? ?MVT::Other, Copy, Copy.getValue(1)); > ?} > > -std::pair > -AlphaTargetLowering::LowerCallTo(SDValue Chain, const Type *RetTy, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bool RetSExt, bool RetZExt, bool isVarArg, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bool isInreg, unsigned NumFixedArgs, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? unsigned CallingConv, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bool isTailCall, SDValue Callee, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ArgListTy &Args, SelectionDAG &DAG, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? DebugLoc dl) { > - ?int NumBytes = 0; > - ?if (Args.size() > 6) > - ? ?NumBytes = (Args.size() - 6) * 8; > - > - ?Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(NumBytes, true)); > - ?std::vector args_to_use; > - ?for (unsigned i = 0, e = Args.size(); i != e; ++i) > - ?{ > - ? ?switch (getValueType(Args[i].Ty).getSimpleVT()) { > - ? ?default: llvm_unreachable("Unexpected ValueType for argument!"); > - ? ?case MVT::i1: > - ? ?case MVT::i8: > - ? ?case MVT::i16: > - ? ?case MVT::i32: > - ? ? ?// Promote the integer to 64 bits. ?If the input type is signed use a > - ? ? ?// sign extend, otherwise use a zero extend. > - ? ? ?if (Args[i].isSExt) > - ? ? ? ?Args[i].Node = DAG.getNode(ISD::SIGN_EXTEND, dl, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? MVT::i64, Args[i].Node); > - ? ? ?else if (Args[i].isZExt) > - ? ? ? ?Args[i].Node = DAG.getNode(ISD::ZERO_EXTEND, dl, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? MVT::i64, Args[i].Node); > - ? ? ?else > - ? ? ? ?Args[i].Node = DAG.getNode(ISD::ANY_EXTEND, dl, MVT::i64, Args[i].Node); > - ? ? ?break; > - ? ?case MVT::i64: > - ? ?case MVT::f64: > - ? ?case MVT::f32: > - ? ? ?break; > - ? ?} > - ? ?args_to_use.push_back(Args[i].Node); > - ?} > - > - ?std::vector RetVals; > - ?MVT RetTyVT = getValueType(RetTy); > - ?MVT ActualRetTyVT = RetTyVT; > - ?if (RetTyVT.getSimpleVT() >= MVT::i1 && RetTyVT.getSimpleVT() <= MVT::i32) > - ? ?ActualRetTyVT = MVT::i64; > - > - ?if (RetTyVT != MVT::isVoid) > - ? ?RetVals.push_back(ActualRetTyVT); > - ?RetVals.push_back(MVT::Other); > - > - ?std::vector Ops; > - ?Ops.push_back(Chain); > - ?Ops.push_back(Callee); > - ?Ops.insert(Ops.end(), args_to_use.begin(), args_to_use.end()); > - ?SDValue TheCall = DAG.getNode(AlphaISD::CALL, dl, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?RetVals, &Ops[0], Ops.size()); > - ?Chain = TheCall.getValue(RetTyVT != MVT::isVoid); > - ?Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, true), > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? DAG.getIntPtrConstant(0, true), SDValue()); > - ?SDValue RetVal = TheCall; > - > - ?if (RetTyVT != ActualRetTyVT) { > - ? ?ISD::NodeType AssertKind = ISD::DELETED_NODE; > - ? ?if (RetSExt) > - ? ? ?AssertKind = ISD::AssertSext; > - ? ?else if (RetZExt) > - ? ? ?AssertKind = ISD::AssertZext; > - > - ? ?if (AssertKind != ISD::DELETED_NODE) > - ? ? ?RetVal = DAG.getNode(AssertKind, dl, MVT::i64, RetVal, > - ? ? ? ? ? ? ? ? ? ? ? ? ? DAG.getValueType(RetTyVT)); > - > - ? ?RetVal = DAG.getNode(ISD::TRUNCATE, dl, RetTyVT, RetVal); > - ?} > - > - ?return std::make_pair(RetVal, Chain); > -} > - > ?void AlphaTargetLowering::LowerVAARG(SDNode *N, SDValue &Chain, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?SDValue &DataPtr, SelectionDAG &DAG) { > ? Chain = N->getOperand(0); > @@ -482,7 +573,7 @@ > ? case ISD::FORMAL_ARGUMENTS: return LowerFORMAL_ARGUMENTS(Op, DAG, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?VarArgsBase, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?VarArgsOffset); > - > + ?case ISD::CALL: return LowerCALL(Op, DAG); > ? case ISD::RET: return LowerRET(Op,DAG); > ? case ISD::JumpTable: return LowerJumpTable(Op, DAG); > > > Modified: llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h?rev=76353&r1=76352&r2=76353&view=diff > > ============================================================================== > --- llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h (original) > +++ llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h Sat Jul 18 20:11:32 2009 > @@ -82,13 +82,9 @@ > ? ? // Friendly names for dumps > ? ? const char *getTargetNodeName(unsigned Opcode) const; > > - ? ?/// LowerCallTo - This hook lowers an abstract call to a function into an > - ? ?/// actual call. > - ? ?virtual std::pair > - ? ?LowerCallTo(SDValue Chain, const Type *RetTy, bool RetSExt, bool RetZExt, > - ? ? ? ? ? ? ? ?bool isVarArg, bool isInreg, unsigned NumFixedArgs, unsigned CC, > - ? ? ? ? ? ? ? ?bool isTailCall, SDValue Callee, ArgListTy &Args, > - ? ? ? ? ? ? ? ?SelectionDAG &DAG, DebugLoc dl); > + ? ?SDValue LowerCALL(SDValue Op, SelectionDAG &DAG); > + ? ?SDNode *LowerCallResult(SDValue Chain, SDValue InFlag, CallSDNode *TheCall, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?unsigned CallingConv, SelectionDAG &DAG); > > ? ? ConstraintType getConstraintType(const std::string &Constraint) const; > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From eli.friedman at gmail.com Mon Jul 20 07:42:37 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 20 Jul 2009 05:42:37 -0700 Subject: [llvm-commits] [llvm] r76385 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPr Message-ID: On Mon, Jul 20, 2009 at 1:19 AM, Duncan Sands wrote: > Hi Chris, > >> Right. ?Private linkage is discarded by the assembler, so they never >> make it into the .o file. ?linker_private is discarded by the linker, >> so it never makes it into the .exe/.dylib. ?I don't think there is a >> corresponding idea on ELF, so on ELF they two linkage types should be >> codegen'd the same way. > > I don't understand why you would want something to be discarded by > the assembler/linker and not by the linker/assembler. ?Don't you > want them both to throw pointless things away? I've stopped questioning anything that has to do with Apple's linker... it has all sorts of strange quirks. -Eli From criswell at cs.uiuc.edu Mon Jul 20 09:23:17 2009 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 20 Jul 2009 09:23:17 -0500 Subject: [llvm-commits] CVS: llvm-www/Users.html Message-ID: <200907201423.n6KENHKA004874@maute.cs.uiuc.edu> Changes in directory llvm-www: Users.html updated: 1.53 -> 1.54 --- Log message: Added Mono to the list of LLVM Users. --- Diffs of the changes: (+8 -1) Users.html | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletion(-) Index: llvm-www/Users.html diff -u llvm-www/Users.html:1.53 llvm-www/Users.html:1.54 --- llvm-www/Users.html:1.53 Thu Jul 9 21:30:50 2009 +++ llvm-www/Users.html Mon Jul 20 09:21:44 2009 @@ -434,6 +434,13 @@ Unladen Swallow A faster implementation of Python. + + + + + Mono + Mono has an option to use LLVM for JIT compilation. +
        @@ -448,6 +455,6 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!">
        LLVM Development List
        - Last modified: $Date: 2009/07/10 02:30:50 $ + Last modified: $Date: 2009/07/20 14:21:44 $ From eli.friedman at gmail.com Mon Jul 20 09:50:16 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 20 Jul 2009 14:50:16 -0000 Subject: [llvm-commits] [llvm] r76422 - /llvm/trunk/examples/Kaleidoscope/toy.cpp Message-ID: <200907201450.n6KEoJO4032028@zion.cs.uiuc.edu> Author: efriedma Date: Mon Jul 20 09:50:07 2009 New Revision: 76422 URL: http://llvm.org/viewvc/llvm-project?rev=76422&view=rev Log: PR4591: Make sure to initialize the pass manager before using it. Modified: llvm/trunk/examples/Kaleidoscope/toy.cpp Modified: llvm/trunk/examples/Kaleidoscope/toy.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/toy.cpp?rev=76422&r1=76421&r2=76422&view=diff ============================================================================== --- llvm/trunk/examples/Kaleidoscope/toy.cpp (original) +++ llvm/trunk/examples/Kaleidoscope/toy.cpp Mon Jul 20 09:50:07 2009 @@ -1125,6 +1125,8 @@ // Simplify the control flow graph (deleting unreachable blocks, etc). OurFPM.add(createCFGSimplificationPass()); + OurFPM.doInitialization(); + // Set the global so the code gen can use this. TheFPM = &OurFPM; From clattner at apple.com Mon Jul 20 10:22:22 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 08:22:22 -0700 Subject: [llvm-commits] [llvm] r76422 - /llvm/trunk/examples/Kaleidoscope/toy.cpp In-Reply-To: <200907201450.n6KEoJO4032028@zion.cs.uiuc.edu> References: <200907201450.n6KEoJO4032028@zion.cs.uiuc.edu> Message-ID: <57988AED-2CC0-4F07-9CE5-A67DB77B07B3@apple.com> On Jul 20, 2009, at 7:50 AM, Eli Friedman wrote: > Author: efriedma > Date: Mon Jul 20 09:50:07 2009 > New Revision: 76422 > > URL: http://llvm.org/viewvc/llvm-project?rev=76422&view=rev > Log: > PR4591: Make sure to initialize the pass manager before using it. Why is this needed? Isn't the FunctionPassManager calling doInit on all the passes in it before they start? -Chris > > > Modified: > llvm/trunk/examples/Kaleidoscope/toy.cpp > > Modified: llvm/trunk/examples/Kaleidoscope/toy.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/toy.cpp?rev=76422&r1=76421&r2=76422&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/examples/Kaleidoscope/toy.cpp (original) > +++ llvm/trunk/examples/Kaleidoscope/toy.cpp Mon Jul 20 09:50:07 2009 > @@ -1125,6 +1125,8 @@ > // Simplify the control flow graph (deleting unreachable blocks, > etc). > OurFPM.add(createCFGSimplificationPass()); > > + OurFPM.doInitialization(); > + > // Set the global so the code gen can use this. > TheFPM = &OurFPM; > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From clattner at apple.com Mon Jul 20 10:29:24 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 08:29:24 -0700 Subject: [llvm-commits] [llvm] r76385 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPrinter/ lib/Target/CellSPU/AsmPrinter/ lib/Target/CppBackend/ lib/Target/IA64/AsmPrinter/ lib/Target/MSP430/ lib/Target/Mips/AsmPrinter/ lib/Target/PowerPC/AsmPrinter/ lib/Target/Sparc/AsmPrinter/ lib/Target/SystemZ/AsmPrinter/ lib/Target/X86/AsmPrinter/ lib/Target/XCore/ lib/Tr... In-Reply-To: <4A642885.8080607@free.fr> References: <200907200103.n6K13chA025017@zion.cs.uiuc.edu> <4A63F2AF.4040106@free.fr> <71E41203-F38F-449A-BF98-EF5C1E486F28@apple.com> <4A642885.8080607@free.fr> Message-ID: On Jul 20, 2009, at 1:19 AM, Duncan Sands wrote: > Hi Chris, > >> Right. Private linkage is discarded by the assembler, so they never >> make it into the .o file. linker_private is discarded by the linker, >> so it never makes it into the .exe/.dylib. I don't think there is a >> corresponding idea on ELF, so on ELF they two linkage types should be >> codegen'd the same way. > > I don't understand why you would want something to be discarded by > the assembler/linker and not by the linker/assembler. Don't you > want them both to throw pointless things away? This is needed for weird ObjC metadata stuff. The basic issue with linkerprivate is that all labels that exist in the .o file end up defining boundaries between "atoms" that the linker works with. The linker then dead code strips and reorders at the boundary of these labels. Since Private labels are discarded before they make it to the .o file, the linker doesn't see them. However, we don't want these labels to make it into the .exe file etc. Some more information is here: http://developer.apple.com/documentation/DeveloperTools/Reference/Assembler/040-Assembler_Directives/asm_directives.html#/ /apple_ref/doc/uid/TP30000823-DontLinkElementID_6 This is a similar deal with the llvm.compiler.used thing I just added: The basic idea is that the linker *knows* the layout of various objc metadata sections, so it can do various optimizations etc. However, it doesn't do these if they are marked no-dead-strip, because it (reasonably) assumes that there is something weird going on. llvm.compiler.used prevents the compiler from molesting the metadata, but allows the linker to eliminate duplicate info, etc. -Chris From evan.cheng at apple.com Mon Jul 20 10:33:14 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 20 Jul 2009 15:33:14 -0000 Subject: [llvm-commits] [llvm] r76423 - /llvm/trunk/test/FrontendC++/2009-07-15-LineNumbers.cpp Message-ID: <200907201533.n6KFXFGK000935@zion.cs.uiuc.edu> Author: evancheng Date: Mon Jul 20 10:33:09 2009 New Revision: 76423 URL: http://llvm.org/viewvc/llvm-project?rev=76423&view=rev Log: xfail for now. Modified: llvm/trunk/test/FrontendC++/2009-07-15-LineNumbers.cpp Modified: llvm/trunk/test/FrontendC++/2009-07-15-LineNumbers.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC%2B%2B/2009-07-15-LineNumbers.cpp?rev=76423&r1=76422&r2=76423&view=diff ============================================================================== --- llvm/trunk/test/FrontendC++/2009-07-15-LineNumbers.cpp (original) +++ llvm/trunk/test/FrontendC++/2009-07-15-LineNumbers.cpp Mon Jul 20 10:33:09 2009 @@ -2,6 +2,7 @@ // print line numbers in asm. // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \ // RUN: llc --disable-fp-elim -f -O0 -relocation-model=pic | grep {# SrcLine 25} +// XFAIL: * #include From david_goodwin at apple.com Mon Jul 20 10:55:49 2009 From: david_goodwin at apple.com (David Goodwin) Date: Mon, 20 Jul 2009 15:55:49 -0000 Subject: [llvm-commits] [llvm] r76424 - /llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Message-ID: <200907201555.n6KFtoVg001548@zion.cs.uiuc.edu> Author: david_goodwin Date: Mon Jul 20 10:55:39 2009 New Revision: 76424 URL: http://llvm.org/viewvc/llvm-project?rev=76424&view=rev Log: Use t2LDRri12 for frame index loads. Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp?rev=76424&r1=76423&r2=76424&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Mon Jul 20 10:55:39 2009 @@ -596,8 +596,17 @@ bool ARMDAGToDAGISel::SelectT2AddrModeImm12(SDValue Op, SDValue N, SDValue &Base, SDValue &OffImm) { // Match simple R + imm12 operands. - if (N.getOpcode() != ISD::ADD) + + // Match frame index... + if (N.getOpcode() != ISD::ADD) { + if (N.getOpcode() == ISD::FrameIndex) { + int FI = cast(N)->getIndex(); + Base = CurDAG->getTargetFrameIndex(FI, TLI.getPointerTy()); + OffImm = CurDAG->getTargetConstant(0, MVT::i32); + return true; + } return false; + } if (ConstantSDNode *RHS = dyn_cast(N.getOperand(1))) { int RHSC = (int)RHS->getZExtValue(); @@ -686,8 +695,7 @@ if (N.getOpcode() != ISD::ADD && N.getOpcode() != ISD::SUB) { Base = N; if (N.getOpcode() == ISD::FrameIndex) { - int FI = cast(N)->getIndex(); - Base = CurDAG->getTargetFrameIndex(FI, TLI.getPointerTy()); + return false; // we want to select t2LDRri12 instead } else if (N.getOpcode() == ARMISD::Wrapper) { Base = N.getOperand(0); if (Base.getOpcode() == ISD::TargetConstantPool) From dag at cray.com Mon Jul 20 11:05:46 2009 From: dag at cray.com (David Greene) Date: Mon, 20 Jul 2009 11:05:46 -0500 Subject: [llvm-commits] LLVM Verilog Backend In-Reply-To: <6a8523d60907181601m37a50c62t8ff9c5be8e658aca@mail.gmail.com> References: <9b38093e0907180422m57244b21n5d5a50368f84db71@mail.gmail.com> <6a8523d60907181601m37a50c62t8ff9c5be8e658aca@mail.gmail.com> Message-ID: <200907201105.47405.dag@cray.com> On Saturday 18 July 2009 18:01, Daniel Dunbar wrote: > > Oh, I see what you mean... I wasn't really considering it carefully. > > How about "always indent namespaces, don't define functions inside a > > namespace"? > > Yeah, I like that rule. Small inlines functions in classes are > probably an exception, since its a lot more work to duplicate the > function declaration outside the namespace. I'll second this. Makes a lot of sense to me. -Dave From bob.wilson at apple.com Mon Jul 20 11:06:26 2009 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 20 Jul 2009 09:06:26 -0700 Subject: [llvm-commits] [llvm] r76422 - /llvm/trunk/examples/Kaleidoscope/toy.cpp In-Reply-To: <57988AED-2CC0-4F07-9CE5-A67DB77B07B3@apple.com> References: <200907201450.n6KEoJO4032028@zion.cs.uiuc.edu> <57988AED-2CC0-4F07-9CE5-A67DB77B07B3@apple.com> Message-ID: On Jul 20, 2009, at 8:22 AM, Chris Lattner wrote: > > On Jul 20, 2009, at 7:50 AM, Eli Friedman wrote: > >> Author: efriedma >> Date: Mon Jul 20 09:50:07 2009 >> New Revision: 76422 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=76422&view=rev >> Log: >> PR4591: Make sure to initialize the pass manager before using it. > > Why is this needed? Isn't the FunctionPassManager calling doInit on > all the passes in it before they start? No, it doesn't. I ran into the same problem in llc on Friday (http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090713/081666.html ). The FunctionPassManager does the initialization if you call it for a Module but not for individual Functions. From dag at cray.com Mon Jul 20 11:06:56 2009 From: dag at cray.com (David Greene) Date: Mon, 20 Jul 2009 11:06:56 -0500 Subject: [llvm-commits] [llvm] r76423 - /llvm/trunk/test/FrontendC++/2009-07-15-LineNumbers.cpp In-Reply-To: <200907201533.n6KFXFGK000935@zion.cs.uiuc.edu> References: <200907201533.n6KFXFGK000935@zion.cs.uiuc.edu> Message-ID: <200907201106.56948.dag@cray.com> On Monday 20 July 2009 10:33, Evan Cheng wrote: > Author: evancheng > Date: Mon Jul 20 10:33:09 2009 > New Revision: 76423 > > URL: http://llvm.org/viewvc/llvm-project?rev=76423&view=rev > Log: > xfail for now. Why? It should work. -Dave From evan.cheng at apple.com Mon Jul 20 11:11:33 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 20 Jul 2009 09:11:33 -0700 Subject: [llvm-commits] [llvm] r76423 - /llvm/trunk/test/FrontendC++/2009-07-15-LineNumbers.cpp In-Reply-To: <200907201106.56948.dag@cray.com> References: <200907201533.n6KFXFGK000935@zion.cs.uiuc.edu> <200907201106.56948.dag@cray.com> Message-ID: <015B0FF7-EA1E-4981-9F55-0377833DBC78@apple.com> See r76398. I've reverted your recent tablegen changes since it broke Thumb backend. I've sent you a private email of the details. Evan On Jul 20, 2009, at 9:06 AM, David Greene wrote: > On Monday 20 July 2009 10:33, Evan Cheng wrote: >> Author: evancheng >> Date: Mon Jul 20 10:33:09 2009 >> New Revision: 76423 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=76423&view=rev >> Log: >> xfail for now. > > Why? It should work. > > -Dave > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From greened at obbligato.org Mon Jul 20 11:16:12 2009 From: greened at obbligato.org (David Greene) Date: Mon, 20 Jul 2009 16:16:12 -0000 Subject: [llvm-commits] [llvm] r76425 - in /llvm/trunk: include/llvm/Support/Debug.h lib/Support/Debug.cpp Message-ID: <200907201616.n6KGGEwd002126@zion.cs.uiuc.edu> Author: greened Date: Mon Jul 20 11:16:06 2009 New Revision: 76425 URL: http://llvm.org/viewvc/llvm-project?rev=76425&view=rev Log: Hide the DOUT static variable behind a function interface. Modified: llvm/trunk/include/llvm/Support/Debug.h llvm/trunk/lib/Support/Debug.cpp Modified: llvm/trunk/include/llvm/Support/Debug.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Debug.h?rev=76425&r1=76424&r2=76425&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/Debug.h (original) +++ llvm/trunk/include/llvm/Support/Debug.h Mon Jul 20 11:16:06 2009 @@ -61,6 +61,11 @@ do { if (DebugFlag && isCurrentDebugType(DEBUG_TYPE)) { X; } } while (0) #endif +/// getNullOutputStream - Return a null string that does not output +/// anything. This hides the static variable from other modules. +/// +OStream &getNullOutputStream(); + /// getErrorOutputStream - Returns the error output stream (std::cerr). This /// places the std::c* I/O streams into one .cpp file and relieves the whole /// program from having to have hundreds of static c'tor/d'tors for them. @@ -68,8 +73,7 @@ OStream &getErrorOutputStream(const char *DebugType); #ifdef NDEBUG -static llvm::OStream NullStream(0); -#define DOUT llvm::NullStream +#define DOUT llvm::getNullOutputStream() #else #define DOUT llvm::getErrorOutputStream(DEBUG_TYPE) #endif Modified: llvm/trunk/lib/Support/Debug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Debug.cpp?rev=76425&r1=76424&r2=76425&view=diff ============================================================================== --- llvm/trunk/lib/Support/Debug.cpp (original) +++ llvm/trunk/lib/Support/Debug.cpp Mon Jul 20 11:16:06 2009 @@ -64,6 +64,14 @@ #endif } +/// getNullOutputStream - Return a null string that does not output +/// anything. This hides the static variable from other modules. +/// +OStream &llvm::getNullOutputStream() { + static llvm::OStream NullStream(0); + return NullStream; +} + // getErrorOutputStream - Returns the error output stream (std::cerr). This // places the std::c* I/O streams into one .cpp file and relieves the whole // program from having to have hundreds of static c'tor/d'tors for them. From mai4 at uiuc.edu Mon Jul 20 11:16:52 2009 From: mai4 at uiuc.edu (Haohui Mai) Date: Mon, 20 Jul 2009 16:16:52 -0000 Subject: [llvm-commits] [poolalloc] r76426 - in /poolalloc/trunk: include/poolalloc/PoolAllocate.h lib/DSA/Steensgaard.cpp lib/PoolAllocate/PAMultipleGlobalPool.cpp Message-ID: <200907201616.n6KGGqKG002167@zion.cs.uiuc.edu> Author: mai4 Date: Mon Jul 20 11:16:52 2009 New Revision: 76426 URL: http://llvm.org/viewvc/llvm-project?rev=76426&view=rev Log: 1. A global might have DSNode in both the result graph and the globals graph, which should be placed in the same pool in PAMultiGlobalPool. 2. Add a print() method for debugging. 3. Revert the deprecated flag. Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h poolalloc/trunk/lib/DSA/Steensgaard.cpp poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/PoolAllocate.h?rev=76426&r1=76425&r2=76426&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original) +++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Mon Jul 20 11:16:52 2009 @@ -187,7 +187,7 @@ PoolAllocate (bool passAllArguments, bool SAFECode = true, - intptr_t IDp = (intptr_t) (&ID)) __attribute__((__deprecated__)) + intptr_t IDp = (intptr_t) (&ID)) : ModulePass((intptr_t)IDp), PassAllArguments(passAllArguments) { @@ -511,10 +511,11 @@ void ProcessFunctionBodySimple(Function& F, TargetData & TD); /// Mapping between DSNodes and Pool descriptors. For this pass, it is a /// one-to-one relationship. - DenseMap PoolMap; + typedef DenseMap PoolMapTy; + PoolMapTy PoolMap; void generatePool(unsigned RecSize, unsigned Align, Module& M, BasicBlock * InsertAtEnd, const DSNode * Node); - + Module * currentModule; public: static char ID; PoolAllocateMultipleGlobalPool(bool passAllArgs=false, bool SAFECode = true) @@ -527,7 +528,8 @@ virtual Value * getGlobalPool (const DSNode * Node); virtual Value * getPool (const DSNode * N, Function & F); - + virtual void print(std::ostream &OS, const Module * M) const; + virtual void dump() const; }; } Modified: poolalloc/trunk/lib/DSA/Steensgaard.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Steensgaard.cpp?rev=76426&r1=76425&r2=76426&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Steensgaard.cpp (original) +++ poolalloc/trunk/lib/DSA/Steensgaard.cpp Mon Jul 20 11:16:52 2009 @@ -134,7 +134,7 @@ // Remove any nodes that are dead after all of the merging we have done... - ResultGraph->removeDeadNodes(DSGraph::KeepUnreachableGlobals); + ResultGraph->removeDeadNodes(DSGraph::RemoveUnreachableGlobals); print(DOUT, &M); return false; Modified: poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp?rev=76426&r1=76425&r2=76426&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp Mon Jul 20 11:16:52 2009 @@ -79,6 +79,7 @@ } bool PoolAllocateMultipleGlobalPool::runOnModule(Module &M) { + currentModule = &M; if (M.begin() == M.end()) return false; Graphs = &getAnalysis(); assert (Graphs && "No DSA pass available!\n"); @@ -350,7 +351,15 @@ DSGraph * GG = DS->getGlobalsGraph(); for(DSGraph::node_const_iterator I = GG->node_begin(), E = GG->node_end(); I != E; ++I) { - generatePool(I->getSize(), Align, M, BB, I); + if (I->globals_begin() != I->globals_end()) { + const GlobalValue * GV = *(I->globals_begin()); + DSNodeHandle NH = G->getNodeForValue(GV); + if (!NH.isNull()) { + PoolMap[&*I] = PoolMap[NH.getNode()]; + } else { + generatePool(I->getSize(), Align, M, BB, I); + } + } } ReturnInst::Create(BB); @@ -393,4 +402,16 @@ return getGlobalPool(N); } +void +PoolAllocateMultipleGlobalPool::print(std::ostream &OS, const Module * M) const { + for (PoolMapTy::const_iterator I = PoolMap.begin(), E = PoolMap.end(); I != E; ++I) { + OS << I->first << " -> " << I->second->getName() << "\n"; + } +} + +void +PoolAllocateMultipleGlobalPool::dump() const { + print (std::cerr, currentModule); +} + PoolAllocateMultipleGlobalPool::~PoolAllocateMultipleGlobalPool() {} From daniel at zuster.org Mon Jul 20 11:50:16 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 20 Jul 2009 16:50:16 -0000 Subject: [llvm-commits] [llvm] r76427 - /llvm/trunk/include/llvm/Support/Debug.h Message-ID: <200907201650.n6KGoHLk003310@zion.cs.uiuc.edu> Author: ddunbar Date: Mon Jul 20 11:50:16 2009 New Revision: 76427 URL: http://llvm.org/viewvc/llvm-project?rev=76427&view=rev Log: Fix comment. Modified: llvm/trunk/include/llvm/Support/Debug.h Modified: llvm/trunk/include/llvm/Support/Debug.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Debug.h?rev=76427&r1=76426&r2=76427&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/Debug.h (original) +++ llvm/trunk/include/llvm/Support/Debug.h Mon Jul 20 11:50:16 2009 @@ -18,8 +18,8 @@ // can specify '-debug-only=foo' to enable JUST the debug information for the // foo class. // -// When compiling in release mode, the -debug-* options and all code in DEBUG() -// statements disappears, so it does not effect the runtime of the code. +// When compiling without assertions, the -debug-* options and all code in +// DEBUG() statements disappears, so it does not effect the runtime of the code. // //===----------------------------------------------------------------------===// From clattner at apple.com Mon Jul 20 11:51:24 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 09:51:24 -0700 Subject: [llvm-commits] [llvm] r76422 - /llvm/trunk/examples/Kaleidoscope/toy.cpp In-Reply-To: References: <200907201450.n6KEoJO4032028@zion.cs.uiuc.edu> <57988AED-2CC0-4F07-9CE5-A67DB77B07B3@apple.com> Message-ID: On Jul 20, 2009, at 9:06 AM, Bob Wilson wrote: > > On Jul 20, 2009, at 8:22 AM, Chris Lattner wrote: > >> >> On Jul 20, 2009, at 7:50 AM, Eli Friedman wrote: >> >>> Author: efriedma >>> Date: Mon Jul 20 09:50:07 2009 >>> New Revision: 76422 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=76422&view=rev >>> Log: >>> PR4591: Make sure to initialize the pass manager before using it. >> >> Why is this needed? Isn't the FunctionPassManager calling doInit on >> all the passes in it before they start? > > No, it doesn't. I ran into the same problem in llc on Friday (http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090713/081666.html > ). > > The FunctionPassManager does the initialization if you call it for a > Module but not for individual Functions. That seems bad, we should fix it in FunctionPassManager, not in all the clients. -Chris From devang.patel at gmail.com Mon Jul 20 12:08:22 2009 From: devang.patel at gmail.com (Devang Patel) Date: Mon, 20 Jul 2009 10:08:22 -0700 Subject: [llvm-commits] [llvm] r76422 - /llvm/trunk/examples/Kaleidoscope/toy.cpp In-Reply-To: References: <200907201450.n6KEoJO4032028@zion.cs.uiuc.edu> <57988AED-2CC0-4F07-9CE5-A67DB77B07B3@apple.com> Message-ID: <352a1fb20907201008v5f72facr3ac81a98245d36ec@mail.gmail.com> On Mon, Jul 20, 2009 at 9:51 AM, Chris Lattner wrote: > > On Jul 20, 2009, at 9:06 AM, Bob Wilson wrote: > >> >> On Jul 20, 2009, at 8:22 AM, Chris Lattner wrote: >> >>> >>> On Jul 20, 2009, at 7:50 AM, Eli Friedman wrote: >>> >>>> Author: efriedma >>>> Date: Mon Jul 20 09:50:07 2009 >>>> New Revision: 76422 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=76422&view=rev >>>> Log: >>>> PR4591: Make sure to initialize the pass manager before using it. >>> >>> Why is this needed? ?Isn't the FunctionPassManager calling doInit on >>> all the passes in it before they start? >> >> No, it doesn't. ?I ran into the same problem in llc on Friday (http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090713/081666.html >> ). >> >> The FunctionPassManager does the initialization if you call it for a >> Module but not for individual Functions. > > That seems bad, we should fix it in FunctionPassManager, not in all > the clients. It is not a good idea to use doInitialization() as a "constructor" of respective PM object. The new Context work is expecting this, which is bad. See r74724's feedback. doInitialization() gives all passes a chance to collect required information before PM runs all passes. It is not meant to initialization PM object. All function passes are allowed to implement doInitialization(Module &M). They do not implement doInitialization(Function &F), so it does no make sense to ask FunctionPassManager to run doInitialization(Function &F). - Devang From sabre at nondot.org Mon Jul 20 12:12:46 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 17:12:46 -0000 Subject: [llvm-commits] [llvm] r76431 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/Target/PIC16/PIC16TargetAsmInfo.cpp lib/Target/PIC16/PIC16TargetAsmInfo.h Message-ID: <200907201712.n6KHCksA004769@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 12:12:46 2009 New Revision: 76431 URL: http://llvm.org/viewvc/llvm-project?rev=76431&view=rev Log: rename TargetAsmInfo::getASDirective -> getDataASDirective Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=76431&r1=76430&r2=76431&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Mon Jul 20 12:12:46 2009 @@ -305,11 +305,10 @@ const char *Data32bitsDirective; // Defaults to "\t.long\t" const char *Data64bitsDirective; // Defaults to "\t.quad\t" - /// getASDirective - Targets can override it to provide different data - /// directives for various sizes and non-default address spaces. - virtual const char *getASDirective(unsigned size, - unsigned AS) const { - assert(AS > 0 && "Dont know the directives for default addr space"); + /// getDataASDirective - Return the directive that should be used to emit + /// data of the specified size to the specified numeric address space. + virtual const char *getDataASDirective(unsigned Size, unsigned AS) const { + assert(AS != 0 && "Don't know the directives for default addr space"); return NULL; } @@ -631,16 +630,16 @@ // Data directive accessors // const char *getData8bitsDirective(unsigned AS = 0) const { - return AS == 0 ? Data8bitsDirective : getASDirective(8, AS); + return AS == 0 ? Data8bitsDirective : getDataASDirective(8, AS); } const char *getData16bitsDirective(unsigned AS = 0) const { - return AS == 0 ? Data16bitsDirective : getASDirective(16, AS); + return AS == 0 ? Data16bitsDirective : getDataASDirective(16, AS); } const char *getData32bitsDirective(unsigned AS = 0) const { - return AS == 0 ? Data32bitsDirective : getASDirective(32, AS); + return AS == 0 ? Data32bitsDirective : getDataASDirective(32, AS); } const char *getData64bitsDirective(unsigned AS = 0) const { - return AS == 0 ? Data64bitsDirective : getASDirective(64, AS); + return AS == 0 ? Data64bitsDirective : getDataASDirective(64, AS); } Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp?rev=76431&r1=76430&r2=76431&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp Mon Jul 20 12:12:46 2009 @@ -54,25 +54,21 @@ HasSingleParameterDotFile = false; } -const char *PIC16TargetAsmInfo::getRomDirective(unsigned size) const -{ - if (size == 8) - return RomData8bitsDirective; - else if (size == 16) - return RomData16bitsDirective; - else if (size == 32) - return RomData32bitsDirective; - else - return NULL; +const char *PIC16TargetAsmInfo::getRomDirective(unsigned Size) const { + switch (Size) { + case 8: return RomData8bitsDirective; + case 16: return RomData16bitsDirective; + case 32: return RomData32bitsDirective; + default: return NULL; + } } -const char *PIC16TargetAsmInfo::getASDirective(unsigned size, - unsigned AS) const { +const char *PIC16TargetAsmInfo:: +getDataASDirective(unsigned Size, unsigned AS) const { if (AS == PIC16ISD::ROM_SPACE) - return getRomDirective(size); - else - return NULL; + return getRomDirective(Size); + return NULL; } const Section * Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h?rev=76431&r1=76430&r2=76431&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h Mon Jul 20 12:12:46 2009 @@ -58,7 +58,7 @@ const char *RomData16bitsDirective; const char *RomData32bitsDirective; const char *getRomDirective(unsigned size) const; - virtual const char *getASDirective(unsigned size, unsigned AS) const; + virtual const char *getDataASDirective(unsigned size, unsigned AS) const; const Section *getBSSSectionForGlobal(const GlobalVariable *GV) const; const Section *getIDATASectionForGlobal(const GlobalVariable *GV) const; const Section *getSectionForAuto(const GlobalVariable *GV) const; From david_goodwin at apple.com Mon Jul 20 12:15:03 2009 From: david_goodwin at apple.com (David Goodwin) Date: Mon, 20 Jul 2009 17:15:03 -0000 Subject: [llvm-commits] [llvm] r76432 - /llvm/trunk/tools/bugpoint/ToolRunner.cpp Message-ID: <200907201715.n6KHF4cI004847@zion.cs.uiuc.edu> Author: david_goodwin Date: Mon Jul 20 12:15:03 2009 New Revision: 76432 URL: http://llvm.org/viewvc/llvm-project?rev=76432&view=rev Log: For remote execution, must cd to the executable directory since the exe expects to find a dylib in the CWD ('.'). Modified: llvm/trunk/tools/bugpoint/ToolRunner.cpp Modified: llvm/trunk/tools/bugpoint/ToolRunner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ToolRunner.cpp?rev=76432&r1=76431&r2=76432&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/ToolRunner.cpp (original) +++ llvm/trunk/tools/bugpoint/ToolRunner.cpp Mon Jul 20 12:15:03 2009 @@ -688,7 +688,6 @@ std::vector ProgramArgs; - std::string Exec; if (RemoteClientPath.isEmpty()) ProgramArgs.push_back(OutputBinary.c_str()); else { @@ -704,10 +703,12 @@ ProgramArgs.push_back(RemoteExtra.c_str()); } - // Full path to the binary + // Full path to the binary. We need to cd to the exec directory because + // there is a dylib there that the exec expects to find in the CWD char* env_pwd = getenv("PWD"); + std::string Exec = "cd "; Exec += env_pwd; - Exec += "/"; + Exec += "; ./"; Exec += OutputBinary.c_str(); ProgramArgs.push_back(Exec.c_str()); } From sabre at nondot.org Mon Jul 20 12:23:00 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 17:23:00 -0000 Subject: [llvm-commits] [llvm] r76433 - /llvm/trunk/include/llvm/Target/TargetMachine.h Message-ID: <200907201723.n6KHN0nF005080@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 12:23:00 2009 New Revision: 76433 URL: http://llvm.org/viewvc/llvm-project?rev=76433&view=rev Log: remove dead forward decl Modified: llvm/trunk/include/llvm/Target/TargetMachine.h Modified: llvm/trunk/include/llvm/Target/TargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=76433&r1=76432&r2=76433&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetMachine.h (original) +++ llvm/trunk/include/llvm/Target/TargetMachine.h Mon Jul 20 12:23:00 2009 @@ -32,7 +32,6 @@ class JITCodeEmitter; class ObjectCodeEmitter; class TargetRegisterInfo; -class Module; class PassManagerBase; class PassManager; class Pass; From baldrick at free.fr Mon Jul 20 12:27:45 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 17:27:45 -0000 Subject: [llvm-commits] [gcc-plugin] r76434 - in /gcc-plugin/trunk: Makefile llvm-cache.c llvm-cache.h Message-ID: <200907201727.n6KHRjE0005219@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 12:27:45 2009 New Revision: 76434 URL: http://llvm.org/viewvc/llvm-project?rev=76434&view=rev Log: Add a generic mechanism for associating a void* with a gcc tree. The point is that if the tree is garbage collected then the map entry is auto removed. Well, it would be if the garbage collector new about the new GTY type - leave that for later. Added: gcc-plugin/trunk/llvm-cache.c gcc-plugin/trunk/llvm-cache.h Modified: gcc-plugin/trunk/Makefile Modified: gcc-plugin/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/Makefile?rev=76434&r1=76433&r2=76434&view=diff ============================================================================== --- gcc-plugin/trunk/Makefile (original) +++ gcc-plugin/trunk/Makefile Mon Jul 20 12:27:45 2009 @@ -1,21 +1,21 @@ -PLUGIN_SOURCE_FILES=llvm-convert.cpp llvm-backend.cpp llvm-debug.cpp llvm-types.cpp bits_and_bobs.cpp -PLUGIN_OBJECT_FILES=$(patsubst %.cpp,%.o,$(PLUGIN_SOURCE_FILES)) +C_SOURCE_FILES=llvm-cache.c +CPP_SOURCE_FILES=llvm-convert.cpp llvm-backend.cpp llvm-debug.cpp llvm-types.cpp bits_and_bobs.cpp +PLUGIN_OBJECT_FILES=$(C_SOURCE_FILES:.c=.o) $(CPP_SOURCE_FILES:.cpp=.o) #GCCPLUGIN_DIR:=$(shell $(GCC) -print-file-name=plugin) GCCSOURCE_DIR=/home/duncan/tmp/gcc.fsf.master GCCOBJECT_DIR=/home/duncan/tmp/gcc.fsf.master-objects -#CXXFLAGS+=-I$(GCCPLUGINS_DIR)/include -fPIC -O2 +#CFLAGS+=-I$(GCCPLUGINS_DIR)/include -fPIC -O2 -CXXFLAGS+=-Werror -fPIC -g -O2 -CXXFLAGS+=$(shell llvm-config --cppflags) -CXXFLAGS+=\ - -I${GCCOBJECT_DIR}/gcc -I${GCCOBJECT_DIR}/gcc/include \ - -I${GCCSOURCE_DIR}/gcc -I${GCCSOURCE_DIR}/include \ - -I${GCCSOURCE_DIR}/libcpp/include -I${GCCSOURCE_DIR}/libdecnumber \ - -I${GCCOBJECT_DIR}/libdecnumber +CFLAGS+=-Werror -fPIC -g -O2 +CFLAGS+= -I${GCCOBJECT_DIR}/gcc -I${GCCOBJECT_DIR}/gcc/include \ + -I${GCCSOURCE_DIR}/gcc -I${GCCSOURCE_DIR}/include \ + -I${GCCSOURCE_DIR}/libcpp/include -I${GCCSOURCE_DIR}/libdecnumber \ + -I${GCCOBJECT_DIR}/libdecnumber +CXXFLAGS+=$(CFLAGS) $(shell llvm-config --cppflags) -LDFLAGS+=$(shell llvm-config --ldflags) $(shell llvm-config --libs analysis core target) +LDFLAGS+=$(shell llvm-config --ldflags) $(shell llvm-config --libs analysis core target x86) llvm.so: $(PLUGIN_OBJECT_FILES) $(CXX) -shared $^ -o $@ ${LDFLAGS} Added: gcc-plugin/trunk/llvm-cache.c URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-cache.c?rev=76434&view=auto ============================================================================== --- gcc-plugin/trunk/llvm-cache.c (added) +++ gcc-plugin/trunk/llvm-cache.c Mon Jul 20 12:27:45 2009 @@ -0,0 +1,89 @@ +/* Caching values "in" trees +Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +Contributed by Chris Lattner (sabre at nondot.org) + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ + +//===----------------------------------------------------------------------===// +// This code lets you to associate a void* with a tree, as if it were cached +// inside the tree: if the tree is garbage collected and reallocated, then the +// cached value will have been cleared. +//===----------------------------------------------------------------------===// + +// Plugin headers +#include "llvm-cache.h" + +// GCC headers +#include "hashtab.h" + +#include "stdio.h" //QQ + +#define tree_llvm_map_eq tree_map_base_eq +#define tree_llvm_map_hash tree_map_base_hash +#define tree_llvm_map_marked_p tree_map_base_marked_p + +static int debugging_tree_llvm_map_marked_p (const void *p) {//QQ + printf("debugging_ggc call for %p\n", p); + return tree_map_base_marked_p(p); +} + +static GTY ((if_marked ("debugging_tree_llvm_map_marked_p"), + param_is (struct tree_llvm_map))) + htab_t llvm_cache; + +bool llvm_has_cached (union tree_node *t) { + struct tree_map_base in; + + if (!llvm_cache) + return false; + + in.from = t; + return htab_find (llvm_cache, &in) != NULL; +} + +const void *llvm_get_cached (union tree_node *t) { + struct tree_llvm_map *h; + struct tree_map_base in; + + if (!llvm_cache) + return NULL; + + in.from = t; + h = (struct tree_llvm_map *) htab_find (llvm_cache, &in); + return h ? h->val : NULL; +} + +const void *llvm_set_cached (union tree_node *t, const void *val) { + struct tree_llvm_map **slot; + struct tree_map_base in; + + if (!llvm_cache) + llvm_cache = htab_create_ggc (1024, tree_llvm_map_hash, tree_llvm_map_eq, NULL); + + in.from = t; + + slot = (struct tree_llvm_map **) htab_find_slot (llvm_cache, &in, INSERT); + gcc_assert(slot); + + if (!*slot) { + *slot = GGC_NEW (struct tree_llvm_map); + (*slot)->base.from = t; + } + + (*slot)->val = val; +} Added: gcc-plugin/trunk/llvm-cache.h URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-cache.h?rev=76434&view=auto ============================================================================== --- gcc-plugin/trunk/llvm-cache.h (added) +++ gcc-plugin/trunk/llvm-cache.h Mon Jul 20 12:27:45 2009 @@ -0,0 +1,61 @@ +/* Caching values "in" trees +Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +Contributed by Chris Lattner (sabre at nondot.org) + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ + +//===----------------------------------------------------------------------===// +// This code lets you to associate a void* with a tree, as if it were cached +// inside the tree: if the tree is garbage collected and reallocated, then the +// cached value will have been cleared. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CACHE_H +#define LLVM_CACHE_H + +#define IN_GCC + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "ggc.h" +#include "target.h" +#include "tree.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct GTY(()) tree_llvm_map { + struct tree_map_base base; + const void *val; +}; + +extern bool llvm_has_cached (union tree_node *); + +extern const void *llvm_get_cached (union tree_node *); + +extern const void *llvm_set_cached (union tree_node *, const void *); + +extern void llvm_init_cache (void); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* LLVM_CACHE_H */ From gohman at apple.com Mon Jul 20 12:43:31 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 20 Jul 2009 17:43:31 -0000 Subject: [llvm-commits] [llvm] r76437 - in /llvm/trunk: include/llvm/Operator.h lib/Analysis/BasicAliasAnalysis.cpp lib/Analysis/ScalarEvolution.cpp lib/Transforms/Scalar/InstructionCombining.cpp lib/VMCore/Constants.cpp lib/VMCore/Instructions.cpp lib/VMCore/Value.cpp test/CodeGen/X86/iv-users-in-other-loops.ll test/Transforms/IndVarSimplify/max-pointer.ll test/Transforms/InstCombine/add2.ll test/Transforms/InstCombine/add3.ll test/Transforms/InstCombine/cast_ptr.ll Message-ID: <200907201743.n6KHhVnj005680@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 12:43:30 2009 New Revision: 76437 URL: http://llvm.org/viewvc/llvm-project?rev=76437&view=rev Log: Revert the addition of hasNoPointerOverflow to GEPOperator. Getelementptrs that are defined to wrap are virtually useless to optimization, and getelementptrs that are undefined on any kind of overflow are too restrictive -- it's difficult to ensure that all intermediate addresses are within bounds. I'm going to take a different approach. Remove a few optimizations that depended on this flag. Added: llvm/trunk/test/Transforms/InstCombine/add3.ll (contents, props changed) - copied, changed from r76422, llvm/trunk/test/Transforms/InstCombine/add2.ll Modified: llvm/trunk/include/llvm/Operator.h llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp llvm/trunk/lib/Analysis/ScalarEvolution.cpp llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp llvm/trunk/lib/VMCore/Constants.cpp llvm/trunk/lib/VMCore/Instructions.cpp llvm/trunk/lib/VMCore/Value.cpp llvm/trunk/test/CodeGen/X86/iv-users-in-other-loops.ll llvm/trunk/test/Transforms/IndVarSimplify/max-pointer.ll llvm/trunk/test/Transforms/InstCombine/add2.ll llvm/trunk/test/Transforms/InstCombine/cast_ptr.ll Modified: llvm/trunk/include/llvm/Operator.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Operator.h?rev=76437&r1=76436&r2=76437&view=diff ============================================================================== --- llvm/trunk/include/llvm/Operator.h (original) +++ llvm/trunk/include/llvm/Operator.h Mon Jul 20 12:43:30 2009 @@ -171,24 +171,6 @@ return true; } - /// hasNoPointerOverflow - Return true if this GetElementPtr is known to - /// never have overflow in the pointer addition portions of its effective - /// computation. GetElementPtr computation involves several phases; - /// overflow can be considered to occur in index typecasting, array index - /// scaling, and the addition of the base pointer with offsets. This flag - /// only applies to the last of these. The operands are added to the base - /// pointer one at a time from left to right. This function returns false - /// if any of these additions results in an address value which is not - /// known to be within the allocated address space that the base pointer - /// points into, or within one element (of the original allocation) past - /// the end. - bool hasNoPointerOverflow() const { - return SubclassOptionalData & (1 << 0); - } - void setHasNoPointerOverflow(bool B) { - SubclassOptionalData = (SubclassOptionalData & ~(1 << 0)) | (B << 0); - } - // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const GEPOperator *) { return true; } static inline bool classof(const GetElementPtrInst *) { return true; } Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=76437&r1=76436&r2=76437&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Mon Jul 20 12:43:30 2009 @@ -38,13 +38,8 @@ // Useful predicates //===----------------------------------------------------------------------===// -static const User *isGEP(const Value *V) { - if (const GEPOperator *GEP = dyn_cast(V)) - // For the purposes of BasicAliasAnalysis, if the GEP has overflow it - // could do crazy things. - if (GEP->hasNoPointerOverflow()) - return GEP; - return 0; +static const GEPOperator *isGEP(const Value *V) { + return dyn_cast(V); } static const Value *GetGEPOperands(const Value *V, Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=76437&r1=76436&r2=76437&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Jul 20 12:43:30 2009 @@ -2938,15 +2938,10 @@ return getSCEV(U->getOperand(0)); break; - case Instruction::IntToPtr: - if (!TD) break; // Without TD we can't analyze pointers. - return getTruncateOrZeroExtend(getSCEV(U->getOperand(0)), - TD->getIntPtrType()); - - case Instruction::PtrToInt: - if (!TD) break; // Without TD we can't analyze pointers. - return getTruncateOrZeroExtend(getSCEV(U->getOperand(0)), - U->getType()); + // It's tempting to handle inttoptr and ptrtoint, however this can + // lead to pointer expressions which cannot be expanded to GEPs + // (because they may overflow). For now, the only pointer-typed + // expressions we handle are GEPs and address literals. case Instruction::GetElementPtr: if (!TD) break; // Without TD we can't analyze pointers. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=76437&r1=76436&r2=76437&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon Jul 20 12:43:30 2009 @@ -2276,31 +2276,6 @@ return R; } - // add (cast *A to intptrtype) B -> - // cast (GEP (cast *A to i8*) B) --> intptrtype - { - CastInst *CI = dyn_cast(LHS); - Value *Other = RHS; - if (!CI) { - CI = dyn_cast(RHS); - Other = LHS; - } - if (CI && CI->getType()->isSized() && - (CI->getType()->getScalarSizeInBits() == - TD->getIntPtrType()->getPrimitiveSizeInBits()) - && isa(CI->getOperand(0)->getType())) { - unsigned AS = - cast(CI->getOperand(0)->getType())->getAddressSpace(); - Value *I2 = InsertBitCastBefore(CI->getOperand(0), - Context->getPointerType(Type::Int8Ty, AS), I); - GetElementPtrInst *GEP = GetElementPtrInst::Create(I2, Other, "ctg2"); - // A GEP formed from an arbitrary add may overflow. - cast(GEP)->setHasNoPointerOverflow(false); - I2 = InsertNewInstBefore(GEP, I); - return new PtrToIntInst(I2, CI->getType()); - } - } - // add (select X 0 (sub n A)) A --> select X A n { SelectInst *SI = dyn_cast(LHS); @@ -8914,65 +8889,7 @@ if (Instruction *I = commonCastTransforms(CI)) return I; - - const Type *DestPointee = cast(CI.getType())->getElementType(); - if (!DestPointee->isSized()) return 0; - // If this is inttoptr(add (ptrtoint x), cst), try to turn this into a GEP. - ConstantInt *Cst; - Value *X; - if (match(CI.getOperand(0), m_Add(m_Cast(m_Value(X)), - m_ConstantInt(Cst)), *Context)) { - // If the source and destination operands have the same type, see if this - // is a single-index GEP. - if (X->getType() == CI.getType()) { - // Get the size of the pointee type. - uint64_t Size = TD->getTypeAllocSize(DestPointee); - - // Convert the constant to intptr type. - APInt Offset = Cst->getValue(); - Offset.sextOrTrunc(TD->getPointerSizeInBits()); - - // If Offset is evenly divisible by Size, we can do this xform. - if (Size && !APIntOps::srem(Offset, APInt(Offset.getBitWidth(), Size))){ - Offset = APIntOps::sdiv(Offset, APInt(Offset.getBitWidth(), Size)); - GetElementPtrInst *GEP = - GetElementPtrInst::Create(X, Context->getConstantInt(Offset)); - // A gep synthesized from inttoptr+add+ptrtoint must be assumed to - // potentially overflow, in the absense of further analysis. - cast(GEP)->setHasNoPointerOverflow(false); - return GEP; - } - } - // TODO: Could handle other cases, e.g. where add is indexing into field of - // struct etc. - } else if (CI.getOperand(0)->hasOneUse() && - match(CI.getOperand(0), m_Add(m_Value(X), - m_ConstantInt(Cst)), *Context)) { - // Otherwise, if this is inttoptr(add x, cst), try to turn this into an - // "inttoptr+GEP" instead of "add+intptr". - - // Get the size of the pointee type. - uint64_t Size = TD->getTypeAllocSize(DestPointee); - - // Convert the constant to intptr type. - APInt Offset = Cst->getValue(); - Offset.sextOrTrunc(TD->getPointerSizeInBits()); - - // If Offset is evenly divisible by Size, we can do this xform. - if (Size && !APIntOps::srem(Offset, APInt(Offset.getBitWidth(), Size))){ - Offset = APIntOps::sdiv(Offset, APInt(Offset.getBitWidth(), Size)); - - Instruction *P = InsertNewInstBefore(new IntToPtrInst(X, CI.getType(), - "tmp"), CI); - GetElementPtrInst *GEP = - GetElementPtrInst::Create(P, Context->getConstantInt(Offset), "tmp"); - // A gep synthesized from inttoptr+add+ptrtoint must be assumed to - // potentially overflow, in the absense of further analysis. - cast(GEP)->setHasNoPointerOverflow(false); - return GEP; - } - } return 0; } Modified: llvm/trunk/lib/VMCore/Constants.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=76437&r1=76436&r2=76437&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Constants.cpp (original) +++ llvm/trunk/lib/VMCore/Constants.cpp Mon Jul 20 12:43:30 2009 @@ -475,11 +475,8 @@ static GetElementPtrConstantExpr *Create(Constant *C, const std::vector&IdxList, const Type *DestTy) { - GetElementPtrConstantExpr *Result = new(IdxList.size() + 1) - GetElementPtrConstantExpr(C, IdxList, DestTy); - // Getelementptr defaults to having no pointer overflow. - cast(Result)->setHasNoPointerOverflow(true); - return Result; + return + new(IdxList.size() + 1) GetElementPtrConstantExpr(C, IdxList, DestTy); } /// Transparently provide more efficient getOperand methods. DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); Modified: llvm/trunk/lib/VMCore/Instructions.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=76437&r1=76436&r2=76437&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Instructions.cpp (original) +++ llvm/trunk/lib/VMCore/Instructions.cpp Mon Jul 20 12:43:30 2009 @@ -1023,9 +1023,6 @@ OL[i+1] = Idx[i]; setName(Name); - - // GetElementPtr instructions have undefined results on overflow by default. - cast(this)->setHasNoPointerOverflow(true); } void GetElementPtrInst::init(Value *Ptr, Value *Idx, const std::string &Name) { @@ -1035,9 +1032,6 @@ OL[1] = Idx; setName(Name); - - // GetElementPtr instructions have undefined results on overflow by default. - cast(this)->setHasNoPointerOverflow(true); } GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI) @@ -1049,10 +1043,6 @@ Use *GEPIOL = GEPI.OperandList; for (unsigned i = 0, E = NumOperands; i != E; ++i) OL[i] = GEPIOL[i]; - - // Transfer the hasNoPointerOverflow() value from the original GEPI. - cast(this) - ->setHasNoPointerOverflow(cast(GEPI).hasNoPointerOverflow()); } GetElementPtrInst::GetElementPtrInst(Value *Ptr, Value *Idx, Modified: llvm/trunk/lib/VMCore/Value.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Value.cpp?rev=76437&r1=76436&r2=76437&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Value.cpp (original) +++ llvm/trunk/lib/VMCore/Value.cpp Mon Jul 20 12:43:30 2009 @@ -363,8 +363,6 @@ unsigned MaxLookup = 6; do { if (GEPOperator *GEP = dyn_cast(V)) { - if (!GEP->hasNoPointerOverflow()) - return V; V = GEP->getPointerOperand(); } else if (Operator::getOpcode(V) == Instruction::BitCast) { V = cast(V)->getOperand(0); Modified: llvm/trunk/test/CodeGen/X86/iv-users-in-other-loops.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/iv-users-in-other-loops.ll?rev=76437&r1=76436&r2=76437&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/iv-users-in-other-loops.ll (original) +++ llvm/trunk/test/CodeGen/X86/iv-users-in-other-loops.ll Mon Jul 20 12:43:30 2009 @@ -3,8 +3,8 @@ ; RUN: grep dec %t | count 2 ; RUN: grep addq %t | count 13 ; RUN: not grep addb %t -; RUN: grep leaq %t | count 8 -; RUN: grep leal %t | count 4 +; RUN: grep leaq %t | count 9 +; RUN: grep leal %t | count 3 ; RUN: grep movq %t | count 5 ; IV users in each of the loops from other loops shouldn't cause LSR Modified: llvm/trunk/test/Transforms/IndVarSimplify/max-pointer.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/max-pointer.ll?rev=76437&r1=76436&r2=76437&view=diff ============================================================================== --- llvm/trunk/test/Transforms/IndVarSimplify/max-pointer.ll (original) +++ llvm/trunk/test/Transforms/IndVarSimplify/max-pointer.ll Mon Jul 20 12:43:30 2009 @@ -22,58 +22,6 @@ ret void } -define void @bar(i8* %str1Ptr, i64 %s, i8* %inLastBytePtr) nounwind { -entry: - %str2Ptr = inttoptr i64 %s to i8* - %0 = icmp ult i8* %str2Ptr, %str1Ptr ; [#uses=1] - %str2Ptr_addr.0 = select i1 %0, i8* %str1Ptr, i8* %str2Ptr ; [#uses=1] - br label %bb2 - -bb2: ; preds = %bb2, %entry - %str2Ptr_addr.1 = phi i8* [ %str2Ptr_addr.0, %entry ], [ %1, %bb2 ] ; [#uses=1] - %1 = getelementptr i8* %str2Ptr_addr.1, i64 1 ; [#uses=2] - %2 = icmp ult i8* %1, %inLastBytePtr ; [#uses=0] - br i1 false, label %bb2, label %return - -return: ; preds = %bb2 - ret void -} - -define void @qux(i64 %t, i64 %s, i8* %inLastBytePtr) nounwind { -entry: - %str1Ptr = inttoptr i64 %t to i8* - %str2Ptr = inttoptr i64 %s to i8* - %0 = icmp ult i8* %str2Ptr, %str1Ptr ; [#uses=1] - %str2Ptr_addr.0 = select i1 %0, i8* %str1Ptr, i8* %str2Ptr ; [#uses=1] - br label %bb2 - -bb2: ; preds = %bb2, %entry - %str2Ptr_addr.1 = phi i8* [ %str2Ptr_addr.0, %entry ], [ %1, %bb2 ] ; [#uses=1] - %1 = getelementptr i8* %str2Ptr_addr.1, i64 1 ; [#uses=2] - %2 = icmp ult i8* %1, %inLastBytePtr ; [#uses=0] - br i1 false, label %bb2, label %return - -return: ; preds = %bb2 - ret void -} - -define void @vor(i64 %t, i8* %str2Ptr, i8* %inLastBytePtr) nounwind { -entry: - %str1Ptr = inttoptr i64 %t to i8* - %0 = icmp ult i8* %str2Ptr, %str1Ptr ; [#uses=1] - %str2Ptr_addr.0 = select i1 %0, i8* %str1Ptr, i8* %str2Ptr ; [#uses=1] - br label %bb2 - -bb2: ; preds = %bb2, %entry - %str2Ptr_addr.1 = phi i8* [ %str2Ptr_addr.0, %entry ], [ %1, %bb2 ] ; [#uses=1] - %1 = getelementptr i8* %str2Ptr_addr.1, i64 1 ; [#uses=2] - %2 = icmp ult i8* %1, %inLastBytePtr ; [#uses=0] - br i1 false, label %bb2, label %return - -return: ; preds = %bb2 - ret void -} - define void @sfoo(i8* %str1Ptr, i8* %str2Ptr, i8* %inLastBytePtr) nounwind { entry: %0 = icmp slt i8* %str2Ptr, %str1Ptr ; [#uses=1] @@ -89,57 +37,3 @@ return: ; preds = %bb2 ret void } - -define void @sbar(i8* %str1Ptr, i64 %s, i8* %inLastBytePtr) nounwind { -entry: - %str2Ptr = inttoptr i64 %s to i8* - %0 = icmp slt i8* %str2Ptr, %str1Ptr ; [#uses=1] - %str2Ptr_addr.0 = select i1 %0, i8* %str1Ptr, i8* %str2Ptr ; [#uses=1] - br label %bb2 - -bb2: ; preds = %bb2, %entry - %str2Ptr_addr.1 = phi i8* [ %str2Ptr_addr.0, %entry ], [ %1, %bb2 ] ; [#uses=1] - %1 = getelementptr i8* %str2Ptr_addr.1, i64 1 ; [#uses=2] - %2 = icmp slt i8* %1, %inLastBytePtr ; [#uses=0] - br i1 false, label %bb2, label %return - -return: ; preds = %bb2 - ret void -} - -define void @squx(i64 %t, i64 %s, i8* %inLastBytePtr) nounwind { -entry: - %str1Ptr = inttoptr i64 %t to i8* - %str2Ptr = inttoptr i64 %s to i8* - %0 = icmp slt i8* %str2Ptr, %str1Ptr ; [#uses=1] - %str2Ptr_addr.0 = select i1 %0, i8* %str1Ptr, i8* %str2Ptr ; [#uses=1] - br label %bb2 - -bb2: ; preds = %bb2, %entry - %str2Ptr_addr.1 = phi i8* [ %str2Ptr_addr.0, %entry ], [ %1, %bb2 ] ; [#uses=1] - %1 = getelementptr i8* %str2Ptr_addr.1, i64 1 ; [#uses=2] - %2 = icmp slt i8* %1, %inLastBytePtr ; [#uses=0] - br i1 false, label %bb2, label %return - -return: ; preds = %bb2 - ret void -} - -define void @svor(i64 %t, i8* %str2Ptr, i8* %inLastBytePtr) nounwind { -entry: - %str1Ptr = inttoptr i64 %t to i8* - %0 = icmp slt i8* %str2Ptr, %str1Ptr ; [#uses=1] - %str2Ptr_addr.0 = select i1 %0, i8* %str1Ptr, i8* %str2Ptr ; [#uses=1] - br label %bb2 - -bb2: ; preds = %bb2, %entry - %str2Ptr_addr.1 = phi i8* [ %str2Ptr_addr.0, %entry ], [ %1, %bb2 ] ; [#uses=1] - %1 = getelementptr i8* %str2Ptr_addr.1, i64 1 ; [#uses=2] - %2 = icmp slt i8* %1, %inLastBytePtr ; [#uses=0] - br i1 false, label %bb2, label %return - -return: ; preds = %bb2 - ret void -} - - Modified: llvm/trunk/test/Transforms/InstCombine/add2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/add2.ll?rev=76437&r1=76436&r2=76437&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/add2.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/add2.ll Mon Jul 20 12:43:30 2009 @@ -1,9 +1,4 @@ -; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \ -; RUN: grep -v OK | not grep add - -;; Target triple for gep raising case below. -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 = "i686-apple-darwin8" +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep add define i64 @test1(i64 %A, i32 %B) { %tmp12 = zext i32 %B to i64 @@ -13,23 +8,6 @@ ret i64 %tmp6 } -; PR1795 -define void @test2(i32 %.val24) { -EntryBlock: - add i32 %.val24, -12 - inttoptr i32 %0 to i32* - store i32 1, i32* %1 - add i32 %.val24, -16 - inttoptr i32 %2 to i32* - getelementptr i32* %3, i32 1 - load i32* %4 - tail call i32 @callee( i32 %5 ) - ret void -} - -declare i32 @callee(i32) - - define i32 @test3(i32 %A) { %B = and i32 %A, 7 %C = and i32 %A, 32 Copied: llvm/trunk/test/Transforms/InstCombine/add3.ll (from r76422, llvm/trunk/test/Transforms/InstCombine/add2.ll) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/add3.ll?p2=llvm/trunk/test/Transforms/InstCombine/add3.ll&p1=llvm/trunk/test/Transforms/InstCombine/add2.ll&r1=76422&r2=76437&rev=76437&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/add2.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/add3.ll Mon Jul 20 12:43:30 2009 @@ -1,18 +1,9 @@ -; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \ -; RUN: grep -v OK | not grep add +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep inttoptr | count 2 ;; Target triple for gep raising case below. 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 = "i686-apple-darwin8" -define i64 @test1(i64 %A, i32 %B) { - %tmp12 = zext i32 %B to i64 - %tmp3 = shl i64 %tmp12, 32 - %tmp5 = add i64 %tmp3, %A - %tmp6 = and i64 %tmp5, 123 - ret i64 %tmp6 -} - ; PR1795 define void @test2(i32 %.val24) { EntryBlock: @@ -28,19 +19,3 @@ } declare i32 @callee(i32) - - -define i32 @test3(i32 %A) { - %B = and i32 %A, 7 - %C = and i32 %A, 32 - %F = add i32 %B, %C - ret i32 %F -} - -define i32 @test4(i32 %A) { - %B = and i32 %A, 128 - %C = lshr i32 %A, 30 - %F = add i32 %B, %C - ret i32 %F -} - Propchange: llvm/trunk/test/Transforms/InstCombine/add3.ll ------------------------------------------------------------------------------ cvs2svn:cvs-rev = 1.2 Propchange: llvm/trunk/test/Transforms/InstCombine/add3.ll ------------------------------------------------------------------------------ svn:eol-style = native Propchange: llvm/trunk/test/Transforms/InstCombine/add3.ll ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: llvm/trunk/test/Transforms/InstCombine/add3.ll ------------------------------------------------------------------------------ svn:mergeinfo = Modified: llvm/trunk/test/Transforms/InstCombine/cast_ptr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/cast_ptr.ll?rev=76437&r1=76436&r2=76437&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/cast_ptr.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/cast_ptr.ll Mon Jul 20 12:43:30 2009 @@ -1,8 +1,15 @@ ; Tests to make sure elimination of casts is working correctly -; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | FileCheck %s target datalayout = "p:32:32" +; This shouldn't convert to getelementptr because the relationship +; between the arithmetic and the layout of allocated memory is +; entirely unknown. +; CHECK: @test1 +; CHECK: ptrtoint +; CHECK: add +; CHECK: inttoptr define i8* @test1(i8* %t) { %tmpc = ptrtoint i8* %t to i32 ; [#uses=1] %tmpa = add i32 %tmpc, 32 ; [#uses=1] @@ -10,6 +17,9 @@ ret i8* %tv } +; These casts should be folded away. +; CHECK: @test2 +; CHECK: icmp eq i8* %a, %b define i1 @test2(i8* %a, i8* %b) { %tmpa = ptrtoint i8* %a to i32 ; [#uses=1] %tmpb = ptrtoint i8* %b to i32 ; [#uses=1] From gohman at apple.com Mon Jul 20 12:44:17 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 20 Jul 2009 17:44:17 -0000 Subject: [llvm-commits] [llvm] r76438 - /llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Message-ID: <200907201744.n6KHiHeq005714@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 12:44:17 2009 New Revision: 76438 URL: http://llvm.org/viewvc/llvm-project?rev=76438&view=rev Log: Update this comment. Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=76438&r1=76437&r2=76438&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Mon Jul 20 12:44:17 2009 @@ -215,13 +215,11 @@ /// expandAddToGEP - Expand a SCEVAddExpr with a pointer type into a GEP /// instead of using ptrtoint+arithmetic+inttoptr. This helps -/// BasicAliasAnalysis analyze the result. However, it suffers from the -/// underlying bug described in PR2831. Addition in LLVM currently always -/// has two's complement wrapping guaranteed. However, the semantics for -/// getelementptr overflow are ambiguous. In the common case though, this -/// expansion gets used when a GEP in the original code has been converted -/// into integer arithmetic, in which case the resulting code will be no -/// more undefined than it was originally. +/// BasicAliasAnalysis analyze the result. +/// +/// Design note: This depends on ScalarEvolution not recognizing inttoptr +/// and ptrtoint operators, as they may introduce pointer arithmetic +/// which may not be safely converted into getelementptr. /// /// Design note: It might seem desirable for this function to be more /// loop-aware. If some of the indices are loop-invariant while others From sabre at nondot.org Mon Jul 20 12:47:48 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 17:47:48 -0000 Subject: [llvm-commits] [llvm] r76439 - /llvm/trunk/include/llvm/Target/TargetAsmInfo.h Message-ID: <200907201747.n6KHlmcF005895@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 12:47:48 2009 New Revision: 76439 URL: http://llvm.org/viewvc/llvm-project?rev=76439&view=rev Log: add some fixme's and cleanups. TargetAsmInfo shouldn't depend on VMCore eventually. Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=76439&r1=76438&r2=76439&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Mon Jul 20 12:47:48 2009 @@ -566,12 +566,14 @@ /// call to be explicit llvm code if it wants to. This is useful for /// turning simple inline asms into LLVM intrinsics, which gives the /// compiler more information about the behavior of the code. +// FIXME: Move this to TargetLowering. virtual bool ExpandInlineAsm(CallInst *CI) const { return false; } /// emitUsedDirectiveFor - This hook allows targets to selectively decide /// not to emit the UsedDirective for some symbols in llvm.used. +// FIXME: REMOVE this (rdar://7071300) virtual bool emitUsedDirectiveFor(const GlobalValue *GV, Mangler *Mang) const { return (GV!=0); @@ -586,6 +588,7 @@ /// SectionKindForGlobal - This hook allows the target to select proper /// section kind used for global emission. +// FIXME: Eliminate this. virtual SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const; @@ -598,36 +601,37 @@ /// SectionFlagsForGlobal - This hook allows the target to select proper /// section flags either for given global or for section. +// FIXME: Eliminate this. virtual unsigned SectionFlagsForGlobal(const GlobalValue *GV = NULL, const char* name = NULL) const; /// SectionForGlobal - This hooks returns proper section name for given /// global with all necessary flags and marks. +// FIXME: Eliminate this. virtual const Section* SectionForGlobal(const GlobalValue *GV) const; // Helper methods for SectionForGlobal +// FIXME: Eliminate this. virtual std::string UniqueSectionForGlobal(const GlobalValue* GV, SectionKind::Kind kind) const; - const std::string& getSectionFlags(unsigned Flags) const; + const std::string &getSectionFlags(unsigned Flags) const; virtual std::string printSectionFlags(unsigned flags) const { return ""; } +// FIXME: Eliminate this. virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; - virtual const Section* SelectSectionForMachineConst(const Type *Ty) const; /// getSLEB128Size - Compute the number of bytes required for a signed /// leb128 value. - static unsigned getSLEB128Size(int Value); /// getULEB128Size - Compute the number of bytes required for an unsigned /// leb128 value. - static unsigned getULEB128Size(unsigned Value); - // Data directive accessors + // Data directive accessors. // const char *getData8bitsDirective(unsigned AS = 0) const { return AS == 0 ? Data8bitsDirective : getDataASDirective(8, AS); From gohman at apple.com Mon Jul 20 12:51:11 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 20 Jul 2009 17:51:11 -0000 Subject: [llvm-commits] [llvm] r76440 - /llvm/trunk/include/llvm/Operator.h Message-ID: <200907201751.n6KHpBo0006249@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 12:51:10 2009 New Revision: 76440 URL: http://llvm.org/viewvc/llvm-project?rev=76440&view=rev Log: Drop UDivOperator and introduce SDivOperator. Thanks to Chris for noticing this. Modified: llvm/trunk/include/llvm/Operator.h Modified: llvm/trunk/include/llvm/Operator.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Operator.h?rev=76440&r1=76439&r2=76440&view=diff ============================================================================== --- llvm/trunk/include/llvm/Operator.h (original) +++ llvm/trunk/include/llvm/Operator.h Mon Jul 20 12:51:10 2009 @@ -100,9 +100,9 @@ } }; -/// UDivOperator - An Operator with opcode Instruction::UDiv. +/// SDivOperator - An Operator with opcode Instruction::SDiv. /// -class UDivOperator : public Operator { +class SDivOperator : public Operator { public: /// isExact - Test whether this division is known to be exact, with /// zero remainder. @@ -114,12 +114,12 @@ } // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const UDivOperator *) { return true; } + static inline bool classof(const SDivOperator *) { return true; } static inline bool classof(const ConstantExpr *CE) { - return CE->getOpcode() == Instruction::UDiv; + return CE->getOpcode() == Instruction::SDiv; } static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::UDiv; + return I->getOpcode() == Instruction::SDiv; } static inline bool classof(const Value *V) { return (isa(V) && classof(cast(V))) || From sabre at nondot.org Mon Jul 20 12:51:36 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 17:51:36 -0000 Subject: [llvm-commits] [llvm] r76441 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h Message-ID: <200907201751.n6KHpbHN006273@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 12:51:36 2009 New Revision: 76441 URL: http://llvm.org/viewvc/llvm-project?rev=76441&view=rev Log: Copy ExpandInlineAsm to TargetLowering from TargetAsmInfo. Modified: llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=76441&r1=76440&r2=76441&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Mon Jul 20 12:51:36 2009 @@ -1270,6 +1270,15 @@ // Inline Asm Support hooks // + /// ExpandInlineAsm - This hook allows the target to expand an inline asm + /// call to be explicit llvm code if it wants to. This is useful for + /// turning simple inline asms into LLVM intrinsics, which gives the + /// compiler more information about the behavior of the code. + // FIXME: Move this to TargetLowering. + virtual bool ExpandInlineAsm(CallInst *CI) const { + return false; + } + enum ConstraintType { C_Register, // Constraint represents specific register(s). C_RegisterClass, // Constraint represents any of register(s) in class. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=76441&r1=76440&r2=76441&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Jul 20 12:51:36 2009 @@ -22,6 +22,7 @@ #include "llvm/GlobalAlias.h" #include "llvm/GlobalVariable.h" #include "llvm/Function.h" +#include "llvm/Instructions.h" #include "llvm/Intrinsics.h" #include "llvm/LLVMContext.h" #include "llvm/ADT/BitVector.h" @@ -8658,6 +8659,100 @@ // X86 Inline Assembly Support //===----------------------------------------------------------------------===// +static bool LowerToBSwap(CallInst *CI) { + // FIXME: this should verify that we are targetting a 486 or better. If not, + // we will turn this bswap into something that will be lowered to logical ops + // instead of emitting the bswap asm. For now, we don't support 486 or lower + // so don't worry about this. + + // Verify this is a simple bswap. + if (CI->getNumOperands() != 2 || + CI->getType() != CI->getOperand(1)->getType() || + !CI->getType()->isInteger()) + return false; + + const IntegerType *Ty = dyn_cast(CI->getType()); + if (!Ty || Ty->getBitWidth() % 16 != 0) + return false; + + // Okay, we can do this xform, do so now. + const Type *Tys[] = { Ty }; + Module *M = CI->getParent()->getParent()->getParent(); + Constant *Int = Intrinsic::getDeclaration(M, Intrinsic::bswap, Tys, 1); + + Value *Op = CI->getOperand(1); + Op = CallInst::Create(Int, Op, CI->getName(), CI); + + CI->replaceAllUsesWith(Op); + CI->eraseFromParent(); + return true; +} + +bool X86TargetLowering::ExpandInlineAsm(CallInst *CI) const { + InlineAsm *IA = cast(CI->getCalledValue()); + std::vector Constraints = IA->ParseConstraints(); + + std::string AsmStr = IA->getAsmString(); + + // TODO: should remove alternatives from the asmstring: "foo {a|b}" -> "foo a" + std::vector AsmPieces; + SplitString(AsmStr, AsmPieces, "\n"); // ; as separator? + + switch (AsmPieces.size()) { + default: return false; + case 1: + AsmStr = AsmPieces[0]; + AsmPieces.clear(); + SplitString(AsmStr, AsmPieces, " \t"); // Split with whitespace. + + // bswap $0 + if (AsmPieces.size() == 2 && + (AsmPieces[0] == "bswap" || + AsmPieces[0] == "bswapq" || + AsmPieces[0] == "bswapl") && + (AsmPieces[1] == "$0" || + AsmPieces[1] == "${0:q}")) { + // No need to check constraints, nothing other than the equivalent of + // "=r,0" would be valid here. + return LowerToBSwap(CI); + } + // rorw $$8, ${0:w} --> llvm.bswap.i16 + if (CI->getType() == Type::Int16Ty && + AsmPieces.size() == 3 && + AsmPieces[0] == "rorw" && + AsmPieces[1] == "$$8," && + AsmPieces[2] == "${0:w}" && + IA->getConstraintString() == "=r,0,~{dirflag},~{fpsr},~{flags},~{cc}") { + return LowerToBSwap(CI); + } + break; + case 3: + if (CI->getType() == Type::Int64Ty && Constraints.size() >= 2 && + Constraints[0].Codes.size() == 1 && Constraints[0].Codes[0] == "A" && + Constraints[1].Codes.size() == 1 && Constraints[1].Codes[0] == "0") { + // bswap %eax / bswap %edx / xchgl %eax, %edx -> llvm.bswap.i64 + std::vector Words; + SplitString(AsmPieces[0], Words, " \t"); + if (Words.size() == 2 && Words[0] == "bswap" && Words[1] == "%eax") { + Words.clear(); + SplitString(AsmPieces[1], Words, " \t"); + if (Words.size() == 2 && Words[0] == "bswap" && Words[1] == "%edx") { + Words.clear(); + SplitString(AsmPieces[2], Words, " \t,"); + if (Words.size() == 3 && Words[0] == "xchgl" && Words[1] == "%eax" && + Words[2] == "%edx") { + return LowerToBSwap(CI); + } + } + } + } + break; + } + return false; +} + + + /// getConstraintType - Given a constraint letter, return the type of /// constraint it is for this target. X86TargetLowering::ConstraintType Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=76441&r1=76440&r2=76441&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Mon Jul 20 12:51:36 2009 @@ -420,6 +420,8 @@ SDValue getReturnAddressFrameIndex(SelectionDAG &DAG); + virtual bool ExpandInlineAsm(CallInst *CI) const; + ConstraintType getConstraintType(const std::string &Constraint) const; std::vector From sabre at nondot.org Mon Jul 20 12:52:52 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 17:52:52 -0000 Subject: [llvm-commits] [llvm] r76442 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Message-ID: <200907201752.n6KHqrBB006353@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 12:52:52 2009 New Revision: 76442 URL: http://llvm.org/viewvc/llvm-project?rev=76442&view=rev Log: use ExpandInlineAsm on TargetLowering instead of TargetAsmInfo. Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=76442&r1=76441&r2=76442&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Mon Jul 20 12:52:52 2009 @@ -23,10 +23,8 @@ #include "llvm/IntrinsicInst.h" #include "llvm/LLVMContext.h" #include "llvm/Pass.h" -#include "llvm/Target/TargetAsmInfo.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetLowering.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/Transforms/Utils/AddrModeMatcher.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Utils/Local.h" @@ -859,18 +857,16 @@ } else if (CallInst *CI = dyn_cast(I)) { // If we found an inline asm expession, and if the target knows how to // lower it to normal LLVM code, do so now. - if (TLI && isa(CI->getCalledValue())) - if (const TargetAsmInfo *TAI = - TLI->getTargetMachine().getTargetAsmInfo()) { - if (TAI->ExpandInlineAsm(CI)) { - BBI = BB.begin(); - // Avoid processing instructions out of order, which could cause - // reuse before a value is defined. - SunkAddrs.clear(); - } else - // Sink address computing for memory operands into the block. - MadeChange |= OptimizeInlineAsmInst(I, &(*CI), SunkAddrs); - } + if (TLI && isa(CI->getCalledValue())) { + if (TLI->ExpandInlineAsm(CI)) { + BBI = BB.begin(); + // Avoid processing instructions out of order, which could cause + // reuse before a value is defined. + SunkAddrs.clear(); + } else + // Sink address computing for memory operands into the block. + MadeChange |= OptimizeInlineAsmInst(I, &(*CI), SunkAddrs); + } } } From sabre at nondot.org Mon Jul 20 12:57:41 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 17:57:41 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r76444 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Message-ID: <200907201757.n6KHvgrw006578@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 12:57:40 2009 New Revision: 76444 URL: http://llvm.org/viewvc/llvm-project?rev=76444&view=rev Log: use ExpandInlineAsm from TargetLowering instead of TargetAsmInfo. Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=76444&r1=76443&r2=76444&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon Jul 20 12:57:40 2009 @@ -39,6 +39,8 @@ #include "llvm/System/Host.h" #include "llvm/Support/MathExtras.h" #include "llvm/Target/TargetAsmInfo.h" +#undef RET +#include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/StringExtras.h" @@ -4589,8 +4591,8 @@ // Give the backend a chance to upgrade the inline asm to LLVM code. This // handles some common cases that LLVM has intrinsics for, e.g. x86 bswap -> // llvm.bswap. - if (const TargetAsmInfo *TAI = TheTarget->getTargetAsmInfo()) - TAI->ExpandInlineAsm(CV); + if (const TargetLowering *TLI = TheTarget->getTargetLowering()) + TLI->ExpandInlineAsm(CV); if (NumChoices>1) FreeConstTupleStrings(ReplacementStrings, NumInputs+NumOutputs); From sabre at nondot.org Mon Jul 20 12:59:33 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 17:59:33 -0000 Subject: [llvm-commits] [llvm] r76445 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/Target/X86/X86TargetAsmInfo.cpp lib/Target/X86/X86TargetAsmInfo.h Message-ID: <200907201759.n6KHxXLv006644@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 12:59:32 2009 New Revision: 76445 URL: http://llvm.org/viewvc/llvm-project?rev=76445&view=rev Log: remove TargetAsmInfo::ExpandInlineAsm Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=76445&r1=76444&r2=76445&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Mon Jul 20 12:59:32 2009 @@ -562,15 +562,6 @@ /// length. virtual unsigned getInlineAsmLength(const char *Str) const; - /// ExpandInlineAsm - This hook allows the target to expand an inline asm - /// call to be explicit llvm code if it wants to. This is useful for - /// turning simple inline asms into LLVM intrinsics, which gives the - /// compiler more information about the behavior of the code. -// FIXME: Move this to TargetLowering. - virtual bool ExpandInlineAsm(CallInst *CI) const { - return false; - } - /// emitUsedDirectiveFor - This hook allows targets to selectively decide /// not to emit the UsedDirective for some symbols in llvm.used. // FIXME: REMOVE this (rdar://7071300) Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp?rev=76445&r1=76444&r2=76445&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp Mon Jul 20 12:59:32 2009 @@ -333,99 +333,5 @@ SectionEndDirectiveSuffix = "\tends\n"; } -template -bool X86TargetAsmInfo::LowerToBSwap(CallInst *CI) const { - // FIXME: this should verify that we are targetting a 486 or better. If not, - // we will turn this bswap into something that will be lowered to logical ops - // instead of emitting the bswap asm. For now, we don't support 486 or lower - // so don't worry about this. - - // Verify this is a simple bswap. - if (CI->getNumOperands() != 2 || - CI->getType() != CI->getOperand(1)->getType() || - !CI->getType()->isInteger()) - return false; - - const IntegerType *Ty = dyn_cast(CI->getType()); - if (!Ty || Ty->getBitWidth() % 16 != 0) - return false; - - // Okay, we can do this xform, do so now. - const Type *Tys[] = { Ty }; - Module *M = CI->getParent()->getParent()->getParent(); - Constant *Int = Intrinsic::getDeclaration(M, Intrinsic::bswap, Tys, 1); - - Value *Op = CI->getOperand(1); - Op = CallInst::Create(Int, Op, CI->getName(), CI); - - CI->replaceAllUsesWith(Op); - CI->eraseFromParent(); - return true; -} - -template -bool X86TargetAsmInfo::ExpandInlineAsm(CallInst *CI) const { - InlineAsm *IA = cast(CI->getCalledValue()); - std::vector Constraints = IA->ParseConstraints(); - - std::string AsmStr = IA->getAsmString(); - - // TODO: should remove alternatives from the asmstring: "foo {a|b}" -> "foo a" - std::vector AsmPieces; - SplitString(AsmStr, AsmPieces, "\n"); // ; as separator? - - switch (AsmPieces.size()) { - default: return false; - case 1: - AsmStr = AsmPieces[0]; - AsmPieces.clear(); - SplitString(AsmStr, AsmPieces, " \t"); // Split with whitespace. - - // bswap $0 - if (AsmPieces.size() == 2 && - (AsmPieces[0] == "bswap" || - AsmPieces[0] == "bswapq" || - AsmPieces[0] == "bswapl") && - (AsmPieces[1] == "$0" || - AsmPieces[1] == "${0:q}")) { - // No need to check constraints, nothing other than the equivalent of - // "=r,0" would be valid here. - return LowerToBSwap(CI); - } - // rorw $$8, ${0:w} --> llvm.bswap.i16 - if (CI->getType() == Type::Int16Ty && - AsmPieces.size() == 3 && - AsmPieces[0] == "rorw" && - AsmPieces[1] == "$$8," && - AsmPieces[2] == "${0:w}" && - IA->getConstraintString() == "=r,0,~{dirflag},~{fpsr},~{flags},~{cc}") { - return LowerToBSwap(CI); - } - break; - case 3: - if (CI->getType() == Type::Int64Ty && Constraints.size() >= 2 && - Constraints[0].Codes.size() == 1 && Constraints[0].Codes[0] == "A" && - Constraints[1].Codes.size() == 1 && Constraints[1].Codes[0] == "0") { - // bswap %eax / bswap %edx / xchgl %eax, %edx -> llvm.bswap.i64 - std::vector Words; - SplitString(AsmPieces[0], Words, " \t"); - if (Words.size() == 2 && Words[0] == "bswap" && Words[1] == "%eax") { - Words.clear(); - SplitString(AsmPieces[1], Words, " \t"); - if (Words.size() == 2 && Words[0] == "bswap" && Words[1] == "%edx") { - Words.clear(); - SplitString(AsmPieces[2], Words, " \t,"); - if (Words.size() == 3 && Words[0] == "xchgl" && Words[1] == "%eax" && - Words[2] == "%edx") { - return LowerToBSwap(CI); - } - } - } - } - break; - } - return false; -} - // Instantiate default implementation. TEMPLATE_INSTANTIATION(class X86TargetAsmInfo); Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h?rev=76445&r1=76444&r2=76445&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h (original) +++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h Mon Jul 20 12:59:32 2009 @@ -26,18 +26,10 @@ template struct X86TargetAsmInfo : public BaseTAI { - explicit X86TargetAsmInfo(const X86TargetMachine &TM): - BaseTAI(TM) { - const X86Subtarget *Subtarget = &TM.getSubtarget(); - + explicit X86TargetAsmInfo(const X86TargetMachine &TM) : BaseTAI(TM) { BaseTAI::AsmTransCBE = x86_asm_table; - BaseTAI::AssemblerDialect = Subtarget->getAsmFlavor(); + BaseTAI::AssemblerDialect =TM.getSubtarget().getAsmFlavor(); } - - virtual bool ExpandInlineAsm(CallInst *CI) const; - - private: - bool LowerToBSwap(CallInst *CI) const; }; typedef X86TargetAsmInfo X86GenericTargetAsmInfo; From isanbard at gmail.com Mon Jul 20 13:22:23 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 20 Jul 2009 11:22:23 -0700 Subject: [llvm-commits] [llvm] r76385 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPr Message-ID: <16e5fdf90907201122u55ce1136ybde0afe91ef88842@mail.gmail.com> On Sun, Jul 19, 2009 at 10:34 PM, Chris Lattner wrote: > > On Jul 19, 2009, at 6:03 PM, Bill Wendling wrote: > >> Author: void >> Date: Sun Jul 19 20:03:30 2009 >> New Revision: 76385 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=76385&view=rev >> Log: >> Add plumbing for the `linker_private' linkage type. This type is >> meant for >> "private" symbols which the assember shouldn't strip, but which the >> linker may >> remove after evaluation. This is mostly useful for Objective-C >> metadata. >> >> This is plumbing, so we don't have a use of it yet. More to come, etc. > > Thanks for implementing this Bill. > >> +++ llvm/trunk/include/llvm-c/Core.h Sun Jul 19 20:03:30 2009 >> @@ -141,6 +141,7 @@ >> ? LLVMInternalLinkage, ? ?/**< Rename collisions when linking (static >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?functions) */ >> ? LLVMPrivateLinkage, ? ? /**< Like Internal, but omit from symbol >> table */ >> + ?LLVMLinkerPrivateLinkage, /**< Like Private, but linker removes. */ >> ? LLVMDLLImportLinkage, ? /**< Function to be imported from DLL */ >> ? LLVMDLLExportLinkage, ? /**< Function to be accessible from DLL */ >> ? LLVMExternalWeakLinkage,/**< ExternalWeak linkage description */ > > This changes the C ABI, which is not allowed, please add this to the > end of the list. ?liblto may also need to be updated to handle this. > Oops...Okay. >> +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Sun Jul >> 19 20:03:30 2009 >> @@ -93,12 +93,15 @@ >> ? ? ? void Init(const std::string &GV, Mangler *Mang) { >> ? ? ? ? // Already initialized. >> ? ? ? ? if (!Stub.empty()) return; >> - ? ? ? ?Stub = Mang->makeNameProper(GV+"$stub", true); >> - ? ? ? ?LazyPtr = Mang->makeNameProper(GV+"$lazy_ptr", true); >> - ? ? ? ?SLP = Mang->makeNameProper(GV+"$slp", true); >> - ? ? ? ?SCV = Mang->makeNameProper(GV+"$scv", true); >> + ? ? ? ?Stub = Mang->makeNameProper(GV + "$stub", >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Mangler::PrivatePrefixTy); > > How about dropping "Ty" from the enum names? > I'm not good at naming these things, but unfortunately there are already variables in the Mangler class named "PrivatePrefix" etc. I'll try to think of something better... -bw From baldrick at free.fr Mon Jul 20 13:22:44 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 18:22:44 -0000 Subject: [llvm-commits] [gcc-plugin] r76446 - in /gcc-plugin/trunk: bits_and_bobs.cpp bits_and_bobs.h llvm-types.cpp Message-ID: <200907201822.n6KIMi2N007643@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 13:22:43 2009 New Revision: 76446 URL: http://llvm.org/viewvc/llvm-project?rev=76446&view=rev Log: Associate llvm types to gcc type trees using the cache. There's no good way right now to handle switching from one LLVM type to another, but with this we can at least make progress on other fronts. Modified: gcc-plugin/trunk/bits_and_bobs.cpp gcc-plugin/trunk/bits_and_bobs.h gcc-plugin/trunk/llvm-types.cpp Modified: gcc-plugin/trunk/bits_and_bobs.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/bits_and_bobs.cpp?rev=76446&r1=76445&r2=76446&view=diff ============================================================================== --- gcc-plugin/trunk/bits_and_bobs.cpp (original) +++ gcc-plugin/trunk/bits_and_bobs.cpp Mon Jul 20 13:22:43 2009 @@ -38,10 +38,6 @@ abort(); } -const Type *llvm_set_type(tree Tr, const Type *Ty) { -abort(); -} - -const Type *llvm_get_type(unsigned Index) { +void llvmEraseLType(const Type *Ty) { abort(); } Modified: gcc-plugin/trunk/bits_and_bobs.h URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/bits_and_bobs.h?rev=76446&r1=76445&r2=76446&view=diff ============================================================================== --- gcc-plugin/trunk/bits_and_bobs.h (original) +++ gcc-plugin/trunk/bits_and_bobs.h Mon Jul 20 13:22:43 2009 @@ -26,10 +26,9 @@ #define SET_TYPE_LLVM(NODE, TYPE) (const Type *)llvm_set_type(NODE, TYPE) -extern const Type *llvm_get_type(unsigned Index); +extern const Type *llvm_get_type(tree Tr); -#define GET_TYPE_LLVM(NODE) \ - (const Type *)llvm_get_type( 0 ) +#define GET_TYPE_LLVM(NODE) (const Type *)llvm_get_type(NODE) // emit_global_to_llvm - Emit the specified VAR_DECL to LLVM as a global // variable. @@ -38,4 +37,6 @@ extern bool flag_odr; +void llvmEraseLType(const Type *); + #endif Modified: gcc-plugin/trunk/llvm-types.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-types.cpp?rev=76446&r1=76445&r2=76446&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-types.cpp (original) +++ gcc-plugin/trunk/llvm-types.cpp Mon Jul 20 13:22:43 2009 @@ -52,115 +52,130 @@ // Plugin headers #include "llvm-abi.h" +#include "llvm-cache.h" #include "bits_and_bobs.h" +static LLVMContext &Context = getGlobalContext(); + //===----------------------------------------------------------------------===// // Matching LLVM types with GCC trees //===----------------------------------------------------------------------===// -// -// LTypes is a vector of LLVM types. GCC tree nodes keep track of LLVM types -// using this vector's index. It is easier to save and restore the index than -// the LLVM type pointer while usig PCH. STL vector does not provide fast -// searching mechanism which is required to remove LLVM Type entry when type is -// refined and replaced by another LLVM Type. This is achieved by maintaining -// a map. - -// Collection of LLVM Types -static std::vector LTypes; -typedef DenseMap LTypesMapTy; -static LTypesMapTy LTypesMap; - -static LLVMContext &Context = getGlobalContext(); - -// Erase type from LTypes vector -static void llvmEraseLType(const Type *Ty) { - LTypesMapTy::iterator I = LTypesMap.find(Ty); +// GET_TYPE_LLVM/SET_TYPE_LLVM - Associate an LLVM type with each TREE type. +// These are lazily computed by ConvertType. - if (I != LTypesMap.end()) { - // It is OK to clear this entry instead of removing this entry - // to avoid re-indexing of other entries. - LTypes[ LTypesMap[Ty] - 1] = NULL; - LTypesMap.erase(I); - } +const Type *llvm_set_type(tree Tr, const Type *Ty) { + assert(TYPE_P(Tr) && "Expected a gcc type!"); + return (const Type *)llvm_set_cached(Tr, Ty); } -// Read LLVM Types string table -void readLLVMTypesStringTable() { - - GlobalValue *V = TheModule->getNamedGlobal("llvm.pch.types"); - if (!V) - return; - - // Value *GV = TheModule->getValueSymbolTable().lookup("llvm.pch.types"); - GlobalVariable *GV = cast(V); - ConstantStruct *LTypesNames = cast(GV->getOperand(0)); - - for (unsigned i = 0; i < LTypesNames->getNumOperands(); ++i) { - const Type *Ty = NULL; - - if (ConstantArray *CA = - dyn_cast(LTypesNames->getOperand(i))) { - std::string Str = CA->getAsString(); - Ty = TheModule->getTypeByName(Str); - assert (Ty != NULL && "Invalid Type in LTypes string table"); - } - // If V is not a string then it is empty. Insert NULL to represent - // empty entries. - LTypes.push_back(Ty); - } - - // Now, llvm.pch.types value is not required so remove it from the symbol - // table. - GV->eraseFromParent(); +const Type *llvm_get_type(tree Tr) { + assert(TYPE_P(Tr) && "Expected a gcc type!"); + return (const Type *)llvm_get_cached(Tr); } - -// GCC tree's uses LTypes vector's index to reach LLVM types. -// Create a string table to hold these LLVM types' names. This string -// table will be used to recreate LTypes vector after loading PCH. -void writeLLVMTypesStringTable() { - - if (LTypes.empty()) - return; - - std::vector LTypesNames; - std::map < const Type *, std::string > TypeNameMap; - - // Collect Type Names in advance. - const TypeSymbolTable &ST = TheModule->getTypeSymbolTable(); - TypeSymbolTable::const_iterator TI = ST.begin(); - for (; TI != ST.end(); ++TI) { - TypeNameMap[TI->second] = TI->first; - } - - // Populate LTypesNames vector. - for (std::vector::iterator I = LTypes.begin(), - E = LTypes.end(); I != E; ++I) { - const Type *Ty = *I; - - // Give names to nameless types. - if (Ty && TypeNameMap[Ty].empty()) { - std::string NewName = - TheModule->getTypeSymbolTable().getUniqueName("llvm.fe.ty"); - TheModule->addTypeName(NewName, Ty); - TypeNameMap[*I] = NewName; - } - - const std::string &TypeName = TypeNameMap[*I]; - LTypesNames.push_back(Context.getConstantArray(TypeName, false)); - } - - // Create string table. - Constant *LTypesNameTable = Context.getConstantStruct(LTypesNames, false); - - // Create variable to hold this string table. - GlobalVariable *GV = new GlobalVariable(*TheModule, - LTypesNameTable->getType(), true, - GlobalValue::ExternalLinkage, - LTypesNameTable, - "llvm.pch.types"); -} +// +//TODO// LTypes is a vector of LLVM types. GCC tree nodes keep track of LLVM types +//TODO// using this vector's index. It is easier to save and restore the index than +//TODO// the LLVM type pointer while usig PCH. STL vector does not provide fast +//TODO// searching mechanism which is required to remove LLVM Type entry when type is +//TODO// refined and replaced by another LLVM Type. This is achieved by maintaining +//TODO// a map. +//TODO +//TODO// Collection of LLVM Types +//TODOstatic std::vector LTypes; +//TODOtypedef DenseMap LTypesMapTy; +//TODOstatic LTypesMapTy LTypesMap; +//TODO +//TODO// Erase type from LTypes vector +//TODOstatic void llvmEraseLType(const Type *Ty) { +//TODO +//TODO LTypesMapTy::iterator I = LTypesMap.find(Ty); +//TODO +//TODO if (I != LTypesMap.end()) { +//TODO // It is OK to clear this entry instead of removing this entry +//TODO // to avoid re-indexing of other entries. +//TODO LTypes[ LTypesMap[Ty] - 1] = NULL; +//TODO LTypesMap.erase(I); +//TODO } +//TODO} +//TODO +//TODO// Read LLVM Types string table +//TODOvoid readLLVMTypesStringTable() { +//TODO +//TODO GlobalValue *V = TheModule->getNamedGlobal("llvm.pch.types"); +//TODO if (!V) +//TODO return; +//TODO +//TODO // Value *GV = TheModule->getValueSymbolTable().lookup("llvm.pch.types"); +//TODO GlobalVariable *GV = cast(V); +//TODO ConstantStruct *LTypesNames = cast(GV->getOperand(0)); +//TODO +//TODO for (unsigned i = 0; i < LTypesNames->getNumOperands(); ++i) { +//TODO const Type *Ty = NULL; +//TODO +//TODO if (ConstantArray *CA = +//TODO dyn_cast(LTypesNames->getOperand(i))) { +//TODO std::string Str = CA->getAsString(); +//TODO Ty = TheModule->getTypeByName(Str); +//TODO assert (Ty != NULL && "Invalid Type in LTypes string table"); +//TODO } +//TODO // If V is not a string then it is empty. Insert NULL to represent +//TODO // empty entries. +//TODO LTypes.push_back(Ty); +//TODO } +//TODO +//TODO // Now, llvm.pch.types value is not required so remove it from the symbol +//TODO // table. +//TODO GV->eraseFromParent(); +//TODO} +//TODO +//TODO +//TODO// GCC tree's uses LTypes vector's index to reach LLVM types. +//TODO// Create a string table to hold these LLVM types' names. This string +//TODO// table will be used to recreate LTypes vector after loading PCH. +//TODOvoid writeLLVMTypesStringTable() { +//TODO +//TODO if (LTypes.empty()) +//TODO return; +//TODO +//TODO std::vector LTypesNames; +//TODO std::map < const Type *, std::string > TypeNameMap; +//TODO +//TODO // Collect Type Names in advance. +//TODO const TypeSymbolTable &ST = TheModule->getTypeSymbolTable(); +//TODO TypeSymbolTable::const_iterator TI = ST.begin(); +//TODO for (; TI != ST.end(); ++TI) { +//TODO TypeNameMap[TI->second] = TI->first; +//TODO } +//TODO +//TODO // Populate LTypesNames vector. +//TODO for (std::vector::iterator I = LTypes.begin(), +//TODO E = LTypes.end(); I != E; ++I) { +//TODO const Type *Ty = *I; +//TODO +//TODO // Give names to nameless types. +//TODO if (Ty && TypeNameMap[Ty].empty()) { +//TODO std::string NewName = +//TODO TheModule->getTypeSymbolTable().getUniqueName("llvm.fe.ty"); +//TODO TheModule->addTypeName(NewName, Ty); +//TODO TypeNameMap[*I] = NewName; +//TODO } +//TODO +//TODO const std::string &TypeName = TypeNameMap[*I]; +//TODO LTypesNames.push_back(Context.getConstantArray(TypeName, false)); +//TODO } +//TODO +//TODO // Create string table. +//TODO Constant *LTypesNameTable = Context.getConstantStruct(LTypesNames, false); +//TODO +//TODO // Create variable to hold this string table. +//TODO GlobalVariable *GV = new GlobalVariable(*TheModule, +//TODO LTypesNameTable->getType(), true, +//TODO GlobalValue::ExternalLinkage, +//TODO LTypesNameTable, +//TODO "llvm.pch.types"); +//TODO} //===----------------------------------------------------------------------===// // Recursive Type Handling Code and Data From isanbard at gmail.com Mon Jul 20 13:22:53 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 20 Jul 2009 18:22:53 -0000 Subject: [llvm-commits] [llvm] r76447 - /llvm/trunk/include/llvm-c/Core.h Message-ID: <200907201822.n6KIMr7Z007662@zion.cs.uiuc.edu> Author: void Date: Mon Jul 20 13:22:52 2009 New Revision: 76447 URL: http://llvm.org/viewvc/llvm-project?rev=76447&view=rev Log: Put new enum at end of list to avoid changing ABI. Modified: llvm/trunk/include/llvm-c/Core.h Modified: llvm/trunk/include/llvm-c/Core.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=76447&r1=76446&r2=76447&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/Core.h (original) +++ llvm/trunk/include/llvm-c/Core.h Mon Jul 20 13:22:52 2009 @@ -141,13 +141,13 @@ LLVMInternalLinkage, /**< Rename collisions when linking (static functions) */ LLVMPrivateLinkage, /**< Like Internal, but omit from symbol table */ - LLVMLinkerPrivateLinkage, /**< Like Private, but linker removes. */ LLVMDLLImportLinkage, /**< Function to be imported from DLL */ LLVMDLLExportLinkage, /**< Function to be accessible from DLL */ LLVMExternalWeakLinkage,/**< ExternalWeak linkage description */ LLVMGhostLinkage, /**< Stand-in functions for streaming fns from bitcode */ - LLVMCommonLinkage /**< Tentative definitions */ + LLVMCommonLinkage, /**< Tentative definitions */ + LLVMLinkerPrivateLinkage /**< Like Private, but linker removes. */ } LLVMLinkage; typedef enum { From baldrick at free.fr Mon Jul 20 13:24:22 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Jul 2009 18:24:22 -0000 Subject: [llvm-commits] [gcc-plugin] r76448 - /gcc-plugin/trunk/llvm-cache.h Message-ID: <200907201824.n6KIONKP007713@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 20 13:24:22 2009 New Revision: 76448 URL: http://llvm.org/viewvc/llvm-project?rev=76448&view=rev Log: Add a note so as not to forget about telling the garbage collector about this new type. Modified: gcc-plugin/trunk/llvm-cache.h Modified: gcc-plugin/trunk/llvm-cache.h URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-cache.h?rev=76448&r1=76447&r2=76448&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-cache.h (original) +++ gcc-plugin/trunk/llvm-cache.h Mon Jul 20 13:24:22 2009 @@ -45,6 +45,7 @@ struct tree_map_base base; const void *val; }; +/* FIXME: Need to use gengtype and tell the GC about this. */ extern bool llvm_has_cached (union tree_node *); From dgregor at apple.com Mon Jul 20 13:30:25 2009 From: dgregor at apple.com (Douglas Gregor) Date: Mon, 20 Jul 2009 18:30:25 -0000 Subject: [llvm-commits] [llvm] r76449 - /llvm/trunk/CMakeLists.txt Message-ID: <200907201830.n6KIUQ3e008080@zion.cs.uiuc.edu> Author: dgregor Date: Mon Jul 20 13:30:25 2009 New Revision: 76449 URL: http://llvm.org/viewvc/llvm-project?rev=76449&view=rev Log: Build FileCheck from with CMake Modified: llvm/trunk/CMakeLists.txt Modified: llvm/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=76449&r1=76448&r2=76449&view=diff ============================================================================== --- llvm/trunk/CMakeLists.txt (original) +++ llvm/trunk/CMakeLists.txt Mon Jul 20 13:30:25 2009 @@ -260,6 +260,8 @@ add_subdirectory(lib/Analysis/IPA) add_subdirectory(lib/MC) +add_subdirectory(utils/FileCheck) + set(LLVM_ENUM_ASM_PRINTERS "") set(LLVM_ENUM_ASM_PARSERS "") foreach(t ${LLVM_TARGETS_TO_BUILD}) From clattner at apple.com Mon Jul 20 13:33:18 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 11:33:18 -0700 Subject: [llvm-commits] [llvm] r76385 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPr In-Reply-To: <16e5fdf90907201122u55ce1136ybde0afe91ef88842@mail.gmail.com> References: <16e5fdf90907201122u55ce1136ybde0afe91ef88842@mail.gmail.com> Message-ID: <3EFA515F-9209-47F0-B081-E2807C51F7C6@apple.com> On Jul 20, 2009, at 11:22 AM, Bill Wendling wrote: >>> >>> +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Sun Jul >>> 19 20:03:30 2009 >>> @@ -93,12 +93,15 @@ >>> void Init(const std::string &GV, Mangler *Mang) { >>> // Already initialized. >>> if (!Stub.empty()) return; >>> - Stub = Mang->makeNameProper(GV+"$stub", true); >>> - LazyPtr = Mang->makeNameProper(GV+"$lazy_ptr", true); >>> - SLP = Mang->makeNameProper(GV+"$slp", true); >>> - SCV = Mang->makeNameProper(GV+"$scv", true); >>> + Stub = Mang->makeNameProper(GV + "$stub", >>> + Mangler::PrivatePrefixTy); >> >> How about dropping "Ty" from the enum names? >> > I'm not good at naming these things, but unfortunately there are > already variables in the Mangler class named "PrivatePrefix" etc. I'll > try to think of something better... How about "Private" then? That's even better I think. -Chris From clattner at apple.com Mon Jul 20 13:33:46 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 11:33:46 -0700 Subject: [llvm-commits] [llvm] r76447 - /llvm/trunk/include/llvm-c/Core.h In-Reply-To: <200907201822.n6KIMr7Z007662@zion.cs.uiuc.edu> References: <200907201822.n6KIMr7Z007662@zion.cs.uiuc.edu> Message-ID: <2D108AB1-39DD-4C60-8AA0-623B0F5DEB5C@apple.com> On Jul 20, 2009, at 11:22 AM, Bill Wendling wrote: > Author: void > Date: Mon Jul 20 13:22:52 2009 > New Revision: 76447 > > URL: http://llvm.org/viewvc/llvm-project?rev=76447&view=rev > Log: > Put new enum at end of list to avoid changing ABI. Just to verify: is there code in the C api's that maps from the C++ numbering to the C numbering? -Chris > > Modified: > llvm/trunk/include/llvm-c/Core.h > > Modified: llvm/trunk/include/llvm-c/Core.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=76447&r1=76446&r2=76447&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/include/llvm-c/Core.h (original) > +++ llvm/trunk/include/llvm-c/Core.h Mon Jul 20 13:22:52 2009 > @@ -141,13 +141,13 @@ > LLVMInternalLinkage, /**< Rename collisions when linking (static > functions) */ > LLVMPrivateLinkage, /**< Like Internal, but omit from symbol > table */ > - LLVMLinkerPrivateLinkage, /**< Like Private, but linker removes. */ > LLVMDLLImportLinkage, /**< Function to be imported from DLL */ > LLVMDLLExportLinkage, /**< Function to be accessible from DLL */ > LLVMExternalWeakLinkage,/**< ExternalWeak linkage description */ > LLVMGhostLinkage, /**< Stand-in functions for streaming fns > from > bitcode */ > - LLVMCommonLinkage /**< Tentative definitions */ > + LLVMCommonLinkage, /**< Tentative definitions */ > + LLVMLinkerPrivateLinkage /**< Like Private, but linker removes. */ > } LLVMLinkage; > > typedef enum { > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From isanbard at gmail.com Mon Jul 20 13:46:18 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 20 Jul 2009 11:46:18 -0700 Subject: [llvm-commits] [llvm] r76447 - /llvm/trunk/include/llvm-c/Core.h In-Reply-To: <2D108AB1-39DD-4C60-8AA0-623B0F5DEB5C@apple.com> References: <200907201822.n6KIMr7Z007662@zion.cs.uiuc.edu> <2D108AB1-39DD-4C60-8AA0-623B0F5DEB5C@apple.com> Message-ID: <16e5fdf90907201146k72094499gfa6d3a296eb7f2da@mail.gmail.com> On Mon, Jul 20, 2009 at 11:33 AM, Chris Lattner wrote: > > On Jul 20, 2009, at 11:22 AM, Bill Wendling wrote: > >> Author: void >> Date: Mon Jul 20 13:22:52 2009 >> New Revision: 76447 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=76447&view=rev >> Log: >> Put new enum at end of list to avoid changing ABI. > > Just to verify: is there code in the C api's that maps from the C++ > numbering to the C numbering? > I've never looked at the C APIs. . . -bw From daniel at zuster.org Mon Jul 20 13:55:05 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 20 Jul 2009 18:55:05 -0000 Subject: [llvm-commits] [llvm] r76453 - in /llvm/trunk: include/llvm/MC/MCAsmParser.h include/llvm/Target/TargetAsmParser.h lib/MC/CMakeLists.txt lib/MC/MCAsmParser.cpp lib/Target/X86/AsmParser/X86AsmParser.cpp tools/llvm-mc/AsmParser.cpp tools/llvm-mc/AsmParser.h tools/llvm-mc/llvm-mc.cpp Message-ID: <200907201855.n6KIt51B008933@zion.cs.uiuc.edu> Author: ddunbar Date: Mon Jul 20 13:55:04 2009 New Revision: 76453 URL: http://llvm.org/viewvc/llvm-project?rev=76453&view=rev Log: Add MCAsmParser interface. - This provides the AsmParser interface to the target specific assembly parsers. Added: llvm/trunk/include/llvm/MC/MCAsmParser.h llvm/trunk/lib/MC/MCAsmParser.cpp Modified: llvm/trunk/include/llvm/Target/TargetAsmParser.h llvm/trunk/lib/MC/CMakeLists.txt llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp llvm/trunk/tools/llvm-mc/AsmParser.cpp llvm/trunk/tools/llvm-mc/AsmParser.h llvm/trunk/tools/llvm-mc/llvm-mc.cpp Added: llvm/trunk/include/llvm/MC/MCAsmParser.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmParser.h?rev=76453&view=auto ============================================================================== --- llvm/trunk/include/llvm/MC/MCAsmParser.h (added) +++ llvm/trunk/include/llvm/MC/MCAsmParser.h Mon Jul 20 13:55:04 2009 @@ -0,0 +1,33 @@ +//===-- llvm/MC/MCAsmParser.h - Abstract Asm Parser Interface ---*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_MC_MCASMPARSER_H +#define LLVM_MC_MCASMPARSER_H + +namespace llvm { +class MCAsmParser; +class MCInst; +class Target; +class TargetAsmParser; + +/// MCAsmParser - Generic assembler parser interface, for use by target specific +/// assembly parsers. +class MCAsmParser { + MCAsmParser(const MCAsmParser &); // DO NOT IMPLEMENT + void operator=(const MCAsmParser &); // DO NOT IMPLEMENT +protected: // Can only create subclasses. + MCAsmParser(); + +public: + virtual ~MCAsmParser(); +}; + +} // End llvm namespace + +#endif Modified: llvm/trunk/include/llvm/Target/TargetAsmParser.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmParser.h?rev=76453&r1=76452&r2=76453&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetAsmParser.h (original) +++ llvm/trunk/include/llvm/Target/TargetAsmParser.h Mon Jul 20 13:55:04 2009 @@ -11,6 +11,8 @@ #define LLVM_TARGET_TARGETPARSER_H namespace llvm { +class MCAsmParser; +class MCInst; class Target; /// TargetAsmParser - Generic interface to target specific assembly parsers. @@ -27,6 +29,21 @@ virtual ~TargetAsmParser(); const Target &getTarget() const { return TheTarget; } + + /// ParseInstruction - Parse one assembly instruction. + /// + /// The parser is positioned following the instruction name. The target + /// specific instruction parser should parse the entire instruction and + /// construct the appropriate MCInst, or emit an error. On success, the entire + /// line should be parsed up to and including the end-of-statement token. On + /// failure, the parser is not required to read to the end of the line. + // + /// \param AP - The current parser object. + /// \param Name - The instruction name. + /// \param Inst [out] - On success, the parsed instruction. + /// \return True on failure. + virtual bool ParseInstruction(MCAsmParser &AP, const char *Name, + MCInst &Inst) = 0; }; } // End llvm namespace Modified: llvm/trunk/lib/MC/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/CMakeLists.txt?rev=76453&r1=76452&r2=76453&view=diff ============================================================================== --- llvm/trunk/lib/MC/CMakeLists.txt (original) +++ llvm/trunk/lib/MC/CMakeLists.txt Mon Jul 20 13:55:04 2009 @@ -1,4 +1,5 @@ add_llvm_library(LLVMMC + MCAsmParser.cpp MCAsmStreamer.cpp MCContext.cpp MCStreamer.cpp Added: llvm/trunk/lib/MC/MCAsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmParser.cpp?rev=76453&view=auto ============================================================================== --- llvm/trunk/lib/MC/MCAsmParser.cpp (added) +++ llvm/trunk/lib/MC/MCAsmParser.cpp Mon Jul 20 13:55:04 2009 @@ -0,0 +1,18 @@ +//===-- MCAsmParser.cpp - Abstract Asm Parser Interface -------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm/MC/MCAsmParser.h" + +using namespace llvm; + +MCAsmParser::MCAsmParser() { +} + +MCAsmParser::~MCAsmParser() { +} Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=76453&r1=76452&r2=76453&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Mon Jul 20 13:55:04 2009 @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "X86.h" +#include "llvm/MC/MCAsmParser.h" #include "llvm/Target/TargetRegistry.h" #include "llvm/Target/TargetAsmParser.h" using namespace llvm; @@ -17,6 +18,9 @@ class X86ATTAsmParser : public TargetAsmParser { public: explicit X86ATTAsmParser(const Target &); + + virtual bool ParseInstruction(MCAsmParser &AP, const char *Name, + MCInst &Inst); }; } @@ -26,6 +30,11 @@ { } +bool X86ATTAsmParser::ParseInstruction(MCAsmParser &AP, const char *Name, + MCInst &Inst) { + return true; +} + namespace { TargetAsmParser *createAsmParser(const Target &T) { return new X86ATTAsmParser(T); Modified: llvm/trunk/tools/llvm-mc/AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmParser.cpp?rev=76453&r1=76452&r2=76453&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/AsmParser.cpp (original) +++ llvm/trunk/tools/llvm-mc/AsmParser.cpp Mon Jul 20 13:55:04 2009 @@ -20,6 +20,7 @@ #include "llvm/MC/MCSymbol.h" #include "llvm/Support/SourceMgr.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Target/TargetAsmParser.h" using namespace llvm; void AsmParser::Warning(SMLoc L, const char *Msg) { @@ -548,7 +549,8 @@ } MCInst Inst; - if (ParseX86InstOperands(IDVal, Inst)) + if (ParseX86InstOperands(IDVal, Inst) && + getTargetParser().ParseInstruction(*this, IDVal, Inst)) return true; if (Lexer.isNot(asmtok::EndOfStatement)) Modified: llvm/trunk/tools/llvm-mc/AsmParser.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmParser.h?rev=76453&r1=76452&r2=76453&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/AsmParser.h (original) +++ llvm/trunk/tools/llvm-mc/AsmParser.h Mon Jul 20 13:55:04 2009 @@ -15,6 +15,7 @@ #define ASMPARSER_H #include "AsmLexer.h" +#include "llvm/MC/MCAsmParser.h" #include "llvm/MC/MCStreamer.h" namespace llvm { @@ -24,7 +25,7 @@ class MCStreamer; class MCValue; -class AsmParser { +class AsmParser : MCAsmParser { public: struct X86Operand; @@ -32,14 +33,19 @@ AsmLexer Lexer; MCContext &Ctx; MCStreamer &Out; + TargetAsmParser &TargetParser; public: - AsmParser(SourceMgr &SM, MCContext &ctx, MCStreamer &OutStr) - : Lexer(SM), Ctx(ctx), Out(OutStr) {} + AsmParser(SourceMgr &_SM, MCContext &_Ctx, MCStreamer &_Out, + TargetAsmParser &_TargetParser) + : Lexer(_SM), Ctx(_Ctx), Out(_Out), TargetParser(_TargetParser) {} ~AsmParser() {} bool Run(); +public: + TargetAsmParser &getTargetParser() const { return TargetParser; } + private: bool ParseStatement(); Modified: llvm/trunk/tools/llvm-mc/llvm-mc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/llvm-mc.cpp?rev=76453&r1=76452&r2=76453&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/llvm-mc.cpp (original) +++ llvm/trunk/tools/llvm-mc/llvm-mc.cpp Mon Jul 20 13:55:04 2009 @@ -186,9 +186,10 @@ OwningPtr Str(createAsmStreamer(Ctx, outs())); // FIXME: Target hook & command line option for initial section. - Str.get()->SwitchSection(Ctx.GetSection("__TEXT,__text,regular,pure_instructions")); + Str.get()->SwitchSection(Ctx.GetSection("__TEXT,__text," + "regular,pure_instructions")); - AsmParser Parser(SrcMgr, Ctx, *Str.get()); + AsmParser Parser(SrcMgr, Ctx, *Str.get(), *TAP); return Parser.Run(); } From dpatel at apple.com Mon Jul 20 14:00:09 2009 From: dpatel at apple.com (Devang Patel) Date: Mon, 20 Jul 2009 19:00:09 -0000 Subject: [llvm-commits] [llvm] r76455 - in /llvm/trunk/lib/AsmParser: LLParser.cpp LLParser.h Message-ID: <200907201900.n6KJ09GX009159@zion.cs.uiuc.edu> Author: dpatel Date: Mon Jul 20 14:00:08 2009 New Revision: 76455 URL: http://llvm.org/viewvc/llvm-project?rev=76455&view=rev Log: Refactor metadata parsing routines into separate functions. Modified: llvm/trunk/lib/AsmParser/LLParser.cpp llvm/trunk/lib/AsmParser/LLParser.h Modified: llvm/trunk/lib/AsmParser/LLParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=76455&r1=76454&r2=76455&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/LLParser.cpp (original) +++ llvm/trunk/lib/AsmParser/LLParser.cpp Mon Jul 20 14:00:08 2009 @@ -365,6 +365,47 @@ return ParseAlias(Name, NameLoc, Visibility); } +// MDString: +// ::= '!' STRINGCONSTANT +bool LLParser::ParseMDString(Constant *&MDS) { + std::string Str; + if (ParseStringConstant(Str)) return true; + MDS = Context.getMDString(Str.data(), Str.data() + Str.size()); + return false; +} + +// MDNode: +// ::= '!' MDNodeNumber +bool LLParser::ParseMDNode(Constant *&Node) { + // !{ ..., !42, ... } + unsigned MID = 0; + if (ParseUInt32(MID)) return true; + + // Check existing MDNode. + std::map::iterator I = MetadataCache.find(MID); + if (I != MetadataCache.end()) { + Node = I->second; + return false; + } + + // Check known forward references. + std::map >::iterator + FI = ForwardRefMDNodes.find(MID); + if (FI != ForwardRefMDNodes.end()) { + Node = FI->second.first; + return false; + } + + // Create MDNode forward reference + SmallVector Elts; + std::string FwdRefName = "llvm.mdnode.fwdref." + utostr(MID); + Elts.push_back(Context.getMDString(FwdRefName)); + MDNode *FwdNode = Context.getMDNode(Elts.data(), Elts.size()); + ForwardRefMDNodes[MID] = std::make_pair(FwdNode, Lex.getLoc()); + Node = FwdNode; + return false; +} + /// ParseStandaloneMetadata: /// !42 = !{...} bool LLParser::ParseStandaloneMetadata() { @@ -1647,36 +1688,12 @@ // Standalone metadata reference // !{ ..., !42, ... } - unsigned MID = 0; - if (!ParseUInt32(MID)) { - std::map::iterator I = MetadataCache.find(MID); - if (I != MetadataCache.end()) - ID.ConstantVal = I->second; - else { - std::map >::iterator - FI = ForwardRefMDNodes.find(MID); - if (FI != ForwardRefMDNodes.end()) - ID.ConstantVal = FI->second.first; - else { - // Create MDNode forward reference - SmallVector Elts; - std::string FwdRefName = "llvm.mdnode.fwdref." + utostr(MID); - Elts.push_back(Context.getMDString(FwdRefName)); - MDNode *FwdNode = Context.getMDNode(Elts.data(), Elts.size()); - ForwardRefMDNodes[MID] = std::make_pair(FwdNode, Lex.getLoc()); - ID.ConstantVal = FwdNode; - } - } - + if (!ParseMDNode(ID.ConstantVal)) return false; - } - + // MDString: // ::= '!' STRINGCONSTANT - std::string Str; - if (ParseStringConstant(Str)) return true; - - ID.ConstantVal = Context.getMDString(Str.data(), Str.data() + Str.size()); + if (ParseMDString(ID.ConstantVal)) return true; return false; } case lltok::APSInt: Modified: llvm/trunk/lib/AsmParser/LLParser.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.h?rev=76455&r1=76454&r2=76455&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/LLParser.h (original) +++ llvm/trunk/lib/AsmParser/LLParser.h Mon Jul 20 14:00:08 2009 @@ -147,6 +147,8 @@ bool HasLinkage, unsigned Visibility); bool ParseAlias(const std::string &Name, LocTy Loc, unsigned Visibility); bool ParseStandaloneMetadata(); + bool ParseMDString(Constant *&S); + bool ParseMDNode(Constant *&N); // Type Parsing. bool ParseType(PATypeHolder &Result, bool AllowVoid = false); From isanbard at gmail.com Mon Jul 20 14:41:27 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 20 Jul 2009 19:41:27 -0000 Subject: [llvm-commits] [llvm] r76456 - in /llvm/trunk: include/llvm/Support/Mangler.h lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp lib/VMCore/Mangler.cpp Message-ID: <200907201941.n6KJfRLp010488@zion.cs.uiuc.edu> Author: void Date: Mon Jul 20 14:41:27 2009 New Revision: 76456 URL: http://llvm.org/viewvc/llvm-project?rev=76456&view=rev Log: Rename Mangler linkage enums to something less gross. Modified: llvm/trunk/include/llvm/Support/Mangler.h llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp llvm/trunk/lib/VMCore/Mangler.cpp Modified: llvm/trunk/include/llvm/Support/Mangler.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Mangler.h?rev=76456&r1=76455&r2=76456&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/Mangler.h (original) +++ llvm/trunk/include/llvm/Support/Mangler.h Mon Jul 20 14:41:27 2009 @@ -27,9 +27,9 @@ class Mangler { public: enum ManglerPrefixTy { - DefaultPrefixTy, ///< Emit default string before each symbol. - PrivatePrefixTy, ///< Emit "private" prefix before each symbol. - LinkerPrivatePrefixTy ///< Emit "linker private" prefix before each symbol. + Default, ///< Emit default string before each symbol. + Private, ///< Emit "private" prefix before each symbol. + LinkerPrivate ///< Emit "linker private" prefix before each symbol. }; private: @@ -103,7 +103,7 @@ /// from getValueName. /// std::string makeNameProper(const std::string &x, - ManglerPrefixTy PrefixTy = DefaultPrefixTy); + ManglerPrefixTy PrefixTy = Mangler::Default); }; } // End llvm namespace Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=76456&r1=76455&r2=76456&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Mon Jul 20 14:41:27 2009 @@ -93,14 +93,10 @@ void Init(const std::string &GV, Mangler *Mang) { // Already initialized. if (!Stub.empty()) return; - Stub = Mang->makeNameProper(GV + "$stub", - Mangler::PrivatePrefixTy); - LazyPtr = Mang->makeNameProper(GV + "$lazy_ptr", - Mangler::PrivatePrefixTy); - SLP = Mang->makeNameProper(GV + "$slp", - Mangler::PrivatePrefixTy); - SCV = Mang->makeNameProper(GV + "$scv", - Mangler::PrivatePrefixTy); + Stub = Mang->makeNameProper(GV + "$stub", Mangler::Private); + LazyPtr = Mang->makeNameProper(GV + "$lazy_ptr", Mangler::Private); + SLP = Mang->makeNameProper(GV + "$slp", Mangler::Private); + SCV = Mang->makeNameProper(GV + "$scv", Mangler::Private); } }; Modified: llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp?rev=76456&r1=76455&r2=76456&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp Mon Jul 20 14:41:27 2009 @@ -71,11 +71,11 @@ // Already initialized. if (!Stub.empty()) return; Stub = Mang->makeNameProper(GV + "$stub", - Mangler::PrivatePrefixTy); + Mangler::Private); LazyPtr = Mang->makeNameProper(GV + "$lazy_ptr", - Mangler::PrivatePrefixTy); + Mangler::Private); AnonSymbol = Mang->makeNameProper(GV + "$stub$tmp", - Mangler::PrivatePrefixTy); + Mangler::Private); } }; Modified: llvm/trunk/lib/VMCore/Mangler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Mangler.cpp?rev=76456&r1=76455&r2=76456&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Mangler.cpp (original) +++ llvm/trunk/lib/VMCore/Mangler.cpp Mon Jul 20 14:41:27 2009 @@ -60,9 +60,9 @@ if (NeedPrefix) { Result = Prefix + Result; - if (PrefixTy == PrivatePrefixTy) + if (PrefixTy == Mangler::Private) Result = PrivatePrefix + Result; - else if (PrefixTy == LinkerPrivatePrefixTy) + else if (PrefixTy == Mangler::LinkerPrivate) Result = LinkerPrivatePrefix + Result; } @@ -98,9 +98,9 @@ Result = Prefix + X; - if (PrefixTy == PrivatePrefixTy) + if (PrefixTy == Mangler::Private) Result = PrivatePrefix + Result; - else if (PrefixTy == LinkerPrivatePrefixTy) + else if (PrefixTy == Mangler::LinkerPrivate) Result = LinkerPrivatePrefix + Result; return Result; @@ -121,9 +121,9 @@ if (NeedPrefix) { Result = Prefix + Result; - if (PrefixTy == PrivatePrefixTy) + if (PrefixTy == Mangler::Private) Result = PrivatePrefix + Result; - else if (PrefixTy == LinkerPrivatePrefixTy) + else if (PrefixTy == Mangler::LinkerPrivate) Result = LinkerPrivatePrefix + Result; } @@ -142,8 +142,8 @@ "Intrinsic functions cannot be mangled by Mangler"); ManglerPrefixTy PrefixTy = - (GV->hasPrivateLinkage() || ForcePrivate) ? PrivatePrefixTy : - GV->hasLinkerPrivateLinkage() ? LinkerPrivatePrefixTy : DefaultPrefixTy; + (GV->hasPrivateLinkage() || ForcePrivate) ? Mangler::Private : + GV->hasLinkerPrivateLinkage() ? Mangler::LinkerPrivate : Mangler::Default; if (GV->hasName()) return makeNameProper(GV->getName() + Suffix, PrefixTy); From eli.friedman at gmail.com Mon Jul 20 14:45:16 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 20 Jul 2009 19:45:16 -0000 Subject: [llvm-commits] [llvm] r76457 - /llvm/trunk/include/llvm/Target/TargetLowering.h Message-ID: <200907201945.n6KJjGr4010609@zion.cs.uiuc.edu> Author: efriedma Date: Mon Jul 20 14:45:16 2009 New Revision: 76457 URL: http://llvm.org/viewvc/llvm-project?rev=76457&view=rev Log: Remove FIXME that was already fixed. Modified: llvm/trunk/include/llvm/Target/TargetLowering.h Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=76457&r1=76456&r2=76457&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Mon Jul 20 14:45:16 2009 @@ -1274,7 +1274,6 @@ /// call to be explicit llvm code if it wants to. This is useful for /// turning simple inline asms into LLVM intrinsics, which gives the /// compiler more information about the behavior of the code. - // FIXME: Move this to TargetLowering. virtual bool ExpandInlineAsm(CallInst *CI) const { return false; } From isanbard at gmail.com Mon Jul 20 14:45:23 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 20 Jul 2009 12:45:23 -0700 Subject: [llvm-commits] [llvm] r76447 - /llvm/trunk/include/llvm-c/Core.h In-Reply-To: <16e5fdf90907201146k72094499gfa6d3a296eb7f2da@mail.gmail.com> References: <200907201822.n6KIMr7Z007662@zion.cs.uiuc.edu> <2D108AB1-39DD-4C60-8AA0-623B0F5DEB5C@apple.com> <16e5fdf90907201146k72094499gfa6d3a296eb7f2da@mail.gmail.com> Message-ID: <16e5fdf90907201245i55a5cf03u49e866135974009c@mail.gmail.com> On Mon, Jul 20, 2009 at 11:46 AM, Bill Wendling wrote: > On Mon, Jul 20, 2009 at 11:33 AM, Chris Lattner wrote: >> >> On Jul 20, 2009, at 11:22 AM, Bill Wendling wrote: >> >>> Author: void >>> Date: Mon Jul 20 13:22:52 2009 >>> New Revision: 76447 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=76447&view=rev >>> Log: >>> Put new enum at end of list to avoid changing ABI. >> >> Just to verify: is there code in the C api's that maps from the C++ >> numbering to the C numbering? >> Okay. There isn't a "map" from C APIs to C++ numbering. It does a static_cast of the GlobalValue::LinkageTypes to the equivalent C enum type. I'm still checking the LTO stuff, but I didn't see any uses of LLVMLinkage anywhere other than in VMUtils/Core.cpp. -bw From evan.cheng at apple.com Mon Jul 20 14:47:55 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 20 Jul 2009 19:47:55 -0000 Subject: [llvm-commits] [llvm] r76458 - in /llvm/trunk: lib/CodeGen/SimpleRegisterCoalescing.cpp lib/Target/X86/X86RegisterInfo.cpp test/CodeGen/Thumb/2009-07-19-SPDecBug.ll test/CodeGen/X86/2009-07-20-CoalescerBug.ll Message-ID: <200907201947.n6KJltWg010694@zion.cs.uiuc.edu> Author: evancheng Date: Mon Jul 20 14:47:55 2009 New Revision: 76458 URL: http://llvm.org/viewvc/llvm-project?rev=76458&view=rev Log: Fix some sub-reg coalescing bugs where the coalescer wasn't updating the resulting interval's register class. Added: llvm/trunk/test/CodeGen/Thumb/2009-07-19-SPDecBug.ll llvm/trunk/test/CodeGen/X86/2009-07-20-CoalescerBug.ll Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=76458&r1=76457&r2=76458&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original) +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Mon Jul 20 14:47:55 2009 @@ -614,15 +614,17 @@ return false; if (TID.getNumDefs() != 1) return false; - // Make sure the copy destination register class fits the instruction - // definition register class. The mismatch can happen as a result of earlier - // extract_subreg, insert_subreg, subreg_to_reg coalescing. - const TargetRegisterClass *RC = getInstrOperandRegClass(tri_, TID, 0); - if (TargetRegisterInfo::isVirtualRegister(DstReg)) { - if (mri_->getRegClass(DstReg) != RC) + if (DefMI->getOpcode() != TargetInstrInfo::IMPLICIT_DEF) { + // Make sure the copy destination register class fits the instruction + // definition register class. The mismatch can happen as a result of earlier + // extract_subreg, insert_subreg, subreg_to_reg coalescing. + const TargetRegisterClass *RC = getInstrOperandRegClass(tri_, TID, 0); + if (TargetRegisterInfo::isVirtualRegister(DstReg)) { + if (mri_->getRegClass(DstReg) != RC) + return false; + } else if (!RC->contains(DstReg)) return false; - } else if (!RC->contains(DstReg)) - return false; + } unsigned DefIdx = li_->getDefIndex(CopyIdx); const LiveRange *DLR= li_->getInterval(DstReg).getLiveRangeContaining(DefIdx); @@ -1378,13 +1380,17 @@ } } if (SubIdx) { - if (isInsSubReg || isSubRegToReg) { - if (!DstIsPhys && !SrcIsPhys) { + if (!DstIsPhys && !SrcIsPhys) { + if (isInsSubReg || isSubRegToReg) { NewRC = tri_->getMatchingSuperRegClass(DstRC, SrcRC, SubIdx); - if (!NewRC) - return false; + } else // extract_subreg { + NewRC = tri_->getMatchingSuperRegClass(SrcRC, DstRC, SubIdx); } + if (!NewRC) { + DOUT << "\t Conflicting sub-register indices.\n"; + return false; // Not coalescable } + unsigned LargeReg = isExtSubReg ? SrcReg : DstReg; unsigned SmallReg = isExtSubReg ? DstReg : SrcReg; unsigned Limit= allocatableRCRegs_[mri_->getRegClass(SmallReg)].count(); Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=76458&r1=76457&r2=76458&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Mon Jul 20 14:47:55 2009 @@ -161,69 +161,84 @@ case 1: // 8-bit if (B == &X86::GR8RegClass) { - if (A == &X86::GR64RegClass) - return &X86::GR64RegClass; - else if (A == &X86::GR32RegClass) - return &X86::GR32RegClass; - else if (A == &X86::GR16RegClass) - return &X86::GR16RegClass; + if (A->getSize() == 2 || A->getSize() == 4 || A->getSize() == 8) + return A; } else if (B == &X86::GR8_ABCD_LRegClass || B == &X86::GR8_ABCD_HRegClass) { - if (A == &X86::GR64RegClass || A == &X86::GR64_ABCDRegClass) + if (A == &X86::GR64RegClass || A == &X86::GR64_ABCDRegClass || + A == &X86::GR64_NOREXRegClass) return &X86::GR64_ABCDRegClass; - else if (A == &X86::GR32RegClass || A == &X86::GR32_ABCDRegClass) + else if (A == &X86::GR32RegClass || A == &X86::GR32_ABCDRegClass || + A == &X86::GR32_NOREXRegClass) return &X86::GR32_ABCDRegClass; - else if (A == &X86::GR16RegClass || A == &X86::GR16_ABCDRegClass) + else if (A == &X86::GR16RegClass || A == &X86::GR16_ABCDRegClass || + A == &X86::GR16_NOREXRegClass) return &X86::GR16_ABCDRegClass; } else if (B == &X86::GR8_NOREXRegClass) { if (A == &X86::GR64RegClass || A == &X86::GR64_NOREXRegClass) return &X86::GR64_NOREXRegClass; + else if (A == &X86::GR64_ABCDRegClass) + return &X86::GR64_ABCDRegClass; else if (A == &X86::GR32RegClass || A == &X86::GR32_NOREXRegClass) return &X86::GR32_NOREXRegClass; + else if (A == &X86::GR32_ABCDRegClass) + return &X86::GR32_ABCDRegClass; else if (A == &X86::GR16RegClass || A == &X86::GR16_NOREXRegClass) return &X86::GR16_NOREXRegClass; + else if (A == &X86::GR16_ABCDRegClass) + return &X86::GR16_ABCDRegClass; } break; case 2: // 8-bit hi if (B == &X86::GR8_ABCD_HRegClass) { - if (A == &X86::GR64RegClass || A == &X86::GR64_ABCDRegClass) + if (A == &X86::GR64RegClass || A == &X86::GR64_ABCDRegClass || + A == &X86::GR64_NOREXRegClass) return &X86::GR64_ABCDRegClass; - else if (A == &X86::GR32RegClass || A == &X86::GR32_ABCDRegClass) + else if (A == &X86::GR32RegClass || A == &X86::GR32_ABCDRegClass || + A == &X86::GR32_NOREXRegClass) return &X86::GR32_ABCDRegClass; - else if (A == &X86::GR16RegClass || A == &X86::GR16_ABCDRegClass) + else if (A == &X86::GR16RegClass || A == &X86::GR16_ABCDRegClass || + A == &X86::GR16_NOREXRegClass) return &X86::GR16_ABCDRegClass; } break; case 3: // 16-bit if (B == &X86::GR16RegClass) { - if (A == &X86::GR64RegClass) - return &X86::GR64RegClass; - else if (A == &X86::GR32RegClass) - return &X86::GR32RegClass; + if (A->getSize() == 4 || A->getSize() == 8) + return A; } else if (B == &X86::GR16_ABCDRegClass) { - if (A == &X86::GR64RegClass || A == &X86::GR64_ABCDRegClass) + if (A == &X86::GR64RegClass || A == &X86::GR64_ABCDRegClass || + A == &X86::GR64_NOREXRegClass) return &X86::GR64_ABCDRegClass; - else if (A == &X86::GR32RegClass || A == &X86::GR32_ABCDRegClass) + else if (A == &X86::GR32RegClass || A == &X86::GR32_ABCDRegClass || + A == &X86::GR32_NOREXRegClass) return &X86::GR32_ABCDRegClass; } else if (B == &X86::GR16_NOREXRegClass) { if (A == &X86::GR64RegClass || A == &X86::GR64_NOREXRegClass) return &X86::GR64_NOREXRegClass; - else if (A == &X86::GR64RegClass || A == &X86::GR64_ABCDRegClass) + else if (A == &X86::GR64_ABCDRegClass) + return &X86::GR64_ABCDRegClass; + else if (A == &X86::GR32RegClass || A == &X86::GR32_NOREXRegClass) + return &X86::GR32_NOREXRegClass; + else if (A == &X86::GR32_ABCDRegClass) return &X86::GR64_ABCDRegClass; } break; case 4: // 32-bit if (B == &X86::GR32RegClass) { - if (A == &X86::GR64RegClass) - return &X86::GR64RegClass; + if (A->getSize() == 8) + return A; } else if (B == &X86::GR32_ABCDRegClass) { - if (A == &X86::GR64RegClass || A == &X86::GR64_ABCDRegClass) + if (A == &X86::GR64RegClass || A == &X86::GR64_ABCDRegClass || + A == &X86::GR64_NOREXRegClass) return &X86::GR64_ABCDRegClass; } else if (B == &X86::GR32_NOREXRegClass) { if (A == &X86::GR64RegClass || A == &X86::GR64_NOREXRegClass) return &X86::GR64_NOREXRegClass; + else if (A == &X86::GR64_ABCDRegClass) + return &X86::GR64_ABCDRegClass; } break; } Added: llvm/trunk/test/CodeGen/Thumb/2009-07-19-SPDecBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb/2009-07-19-SPDecBug.ll?rev=76458&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Thumb/2009-07-19-SPDecBug.ll (added) +++ llvm/trunk/test/CodeGen/Thumb/2009-07-19-SPDecBug.ll Mon Jul 20 14:47:55 2009 @@ -0,0 +1,33 @@ +; RUN: llvm-as < %s | llc -mtriple=thumbv6-elf | not grep "subs sp" +; PR4567 + +define arm_apcscc i8* @__gets_chk(i8* %s, i32 %slen) nounwind { +entry: + br i1 undef, label %bb, label %bb1 + +bb: ; preds = %entry + ret i8* undef + +bb1: ; preds = %entry + br i1 undef, label %bb3, label %bb2 + +bb2: ; preds = %bb1 + %0 = alloca i8, i32 undef, align 4 ; [#uses=0] + br label %bb4 + +bb3: ; preds = %bb1 + %1 = malloc i8, i32 undef ; [#uses=0] + br label %bb4 + +bb4: ; preds = %bb3, %bb2 + br i1 undef, label %bb5, label %bb6 + +bb5: ; preds = %bb4 + %2 = call arm_apcscc i8* @gets(i8* %s) nounwind ; [#uses=1] + ret i8* %2 + +bb6: ; preds = %bb4 + unreachable +} + +declare arm_apcscc i8* @gets(i8*) nounwind Added: llvm/trunk/test/CodeGen/X86/2009-07-20-CoalescerBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-07-20-CoalescerBug.ll?rev=76458&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-07-20-CoalescerBug.ll (added) +++ llvm/trunk/test/CodeGen/X86/2009-07-20-CoalescerBug.ll Mon Jul 20 14:47:55 2009 @@ -0,0 +1,165 @@ +; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin10 +; PR4587 +; rdar://7072590 + + %struct.re_pattern_buffer = type <{ i8*, i64, i64, i64, i8*, i64, i64, i8, i8, i8, i8, i8, i8, i8, i8 }> + +define fastcc i32 @regex_compile(i8* %pattern, i64 %size, i64 %syntax, %struct.re_pattern_buffer* nocapture %bufp) nounwind ssp { +entry: + br i1 undef, label %return, label %if.end + +if.end: ; preds = %entry + %tmp35 = getelementptr %struct.re_pattern_buffer* %bufp, i64 0, i32 3 ; [#uses=1] + store i64 %syntax, i64* %tmp35 + store i32 undef, i32* undef + br i1 undef, label %if.then66, label %if.end102 + +if.then66: ; preds = %if.end + br i1 false, label %if.else, label %if.then70 + +if.then70: ; preds = %if.then66 + %call74 = call i8* @xrealloc(i8* undef, i64 32) nounwind ssp ; [#uses=0] + unreachable + +if.else: ; preds = %if.then66 + br i1 false, label %do.body86, label %if.end99 + +do.body86: ; preds = %if.else + br i1 false, label %do.end, label %if.then90 + +if.then90: ; preds = %do.body86 + unreachable + +do.end: ; preds = %do.body86 + ret i32 12 + +if.end99: ; preds = %if.else + br label %if.end102 + +if.end102: ; preds = %if.end99, %if.end + br label %while.body + +while.body: ; preds = %if.end1126, %sw.bb532, %while.body, %if.end102 + %laststart.2 = phi i8* [ null, %if.end102 ], [ %laststart.7.ph, %if.end1126 ], [ %laststart.2, %sw.bb532 ], [ %laststart.2, %while.body ] ; [#uses=6] + %b.1 = phi i8* [ undef, %if.end102 ], [ %ctg29688, %if.end1126 ], [ %b.1, %sw.bb532 ], [ %b.1, %while.body ] ; [#uses=5] + br i1 undef, label %while.body, label %if.end127 + +if.end127: ; preds = %while.body + switch i32 undef, label %sw.bb532 [ + i32 123, label %handle_interval + i32 92, label %do.body3527 + ] + +sw.bb532: ; preds = %if.end127 + br i1 undef, label %while.body, label %if.end808 + +if.end808: ; preds = %sw.bb532 + br i1 undef, label %while.cond1267.preheader, label %if.then811 + +while.cond1267.preheader: ; preds = %if.end808 + br i1 false, label %return, label %if.end1294 + +if.then811: ; preds = %if.end808 + %call817 = call fastcc i8* @skip_one_char(i8* %laststart.2) ssp ; [#uses=0] + br i1 undef, label %cond.end834, label %lor.lhs.false827 + +lor.lhs.false827: ; preds = %if.then811 + br label %cond.end834 + +cond.end834: ; preds = %lor.lhs.false827, %if.then811 + br i1 undef, label %land.lhs.true838, label %while.cond979.preheader + +land.lhs.true838: ; preds = %cond.end834 + br i1 undef, label %if.then842, label %while.cond979.preheader + +if.then842: ; preds = %land.lhs.true838 + %conv851 = trunc i64 undef to i32 ; [#uses=1] + br label %while.cond979.preheader + +while.cond979.preheader: ; preds = %if.then842, %land.lhs.true838, %cond.end834 + %startoffset.0.ph = phi i32 [ 0, %cond.end834 ], [ 0, %land.lhs.true838 ], [ %conv851, %if.then842 ] ; [#uses=2] + %laststart.7.ph = phi i8* [ %laststart.2, %cond.end834 ], [ %laststart.2, %land.lhs.true838 ], [ %laststart.2, %if.then842 ] ; [#uses=3] + %b.4.ph = phi i8* [ %b.1, %cond.end834 ], [ %b.1, %land.lhs.true838 ], [ %b.1, %if.then842 ] ; [#uses=3] + %ctg29688 = getelementptr i8* %b.4.ph, i64 6 ; [#uses=1] + br label %while.cond979 + +while.cond979: ; preds = %if.end1006, %while.cond979.preheader + %cmp991 = icmp ugt i64 undef, 0 ; [#uses=1] + br i1 %cmp991, label %do.body994, label %while.end1088 + +do.body994: ; preds = %while.cond979 + br i1 undef, label %return, label %if.end1006 + +if.end1006: ; preds = %do.body994 + %cmp1014 = icmp ugt i64 undef, 32768 ; [#uses=1] + %storemerge10953 = select i1 %cmp1014, i64 32768, i64 undef ; [#uses=1] + store i64 %storemerge10953, i64* undef + br i1 false, label %return, label %while.cond979 + +while.end1088: ; preds = %while.cond979 + br i1 undef, label %if.then1091, label %if.else1101 + +if.then1091: ; preds = %while.end1088 + store i8 undef, i8* undef + %idx.ext1132.pre = zext i32 %startoffset.0.ph to i64 ; [#uses=1] + %add.ptr1133.pre = getelementptr i8* %laststart.7.ph, i64 %idx.ext1132.pre ; [#uses=1] + %sub.ptr.lhs.cast1135.pre = ptrtoint i8* %add.ptr1133.pre to i64 ; [#uses=1] + br label %if.end1126 + +if.else1101: ; preds = %while.end1088 + %cond1109 = select i1 undef, i32 18, i32 14 ; [#uses=1] + %idx.ext1112 = zext i32 %startoffset.0.ph to i64 ; [#uses=1] + %add.ptr1113 = getelementptr i8* %laststart.7.ph, i64 %idx.ext1112 ; [#uses=2] + %sub.ptr.rhs.cast1121 = ptrtoint i8* %add.ptr1113 to i64 ; [#uses=1] + call fastcc void @insert_op1(i32 %cond1109, i8* %add.ptr1113, i32 undef, i8* %b.4.ph) ssp + br label %if.end1126 + +if.end1126: ; preds = %if.else1101, %if.then1091 + %sub.ptr.lhs.cast1135.pre-phi = phi i64 [ %sub.ptr.rhs.cast1121, %if.else1101 ], [ %sub.ptr.lhs.cast1135.pre, %if.then1091 ] ; [#uses=1] + %add.ptr1128 = getelementptr i8* %b.4.ph, i64 3 ; [#uses=1] + %sub.ptr.rhs.cast1136 = ptrtoint i8* %add.ptr1128 to i64 ; [#uses=1] + %sub.ptr.sub1137 = sub i64 %sub.ptr.lhs.cast1135.pre-phi, %sub.ptr.rhs.cast1136 ; [#uses=1] + %sub.ptr.sub11378527 = trunc i64 %sub.ptr.sub1137 to i32 ; [#uses=1] + %conv1139 = add i32 %sub.ptr.sub11378527, -3 ; [#uses=1] + store i8 undef, i8* undef + %shr10.i8599 = lshr i32 %conv1139, 8 ; [#uses=1] + %conv6.i8600 = trunc i32 %shr10.i8599 to i8 ; [#uses=1] + store i8 %conv6.i8600, i8* undef + br label %while.body + +if.end1294: ; preds = %while.cond1267.preheader + ret i32 12 + +do.body3527: ; preds = %if.end127 + br i1 undef, label %do.end3536, label %if.then3531 + +if.then3531: ; preds = %do.body3527 + unreachable + +do.end3536: ; preds = %do.body3527 + ret i32 5 + +handle_interval: ; preds = %if.end127 + br i1 undef, label %do.body4547, label %cond.false4583 + +do.body4547: ; preds = %handle_interval + br i1 undef, label %do.end4556, label %if.then4551 + +if.then4551: ; preds = %do.body4547 + unreachable + +do.end4556: ; preds = %do.body4547 + ret i32 9 + +cond.false4583: ; preds = %handle_interval + unreachable + +return: ; preds = %if.end1006, %do.body994, %while.cond1267.preheader, %entry + ret i32 undef +} + +declare i8* @xrealloc(i8*, i64) ssp + +declare fastcc i8* @skip_one_char(i8*) nounwind readonly ssp + +declare fastcc void @insert_op1(i32, i8*, i32, i8*) nounwind ssp From dalej at apple.com Mon Jul 20 15:00:06 2009 From: dalej at apple.com (Dale Johannesen) Date: Mon, 20 Jul 2009 20:00:06 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r76459 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Message-ID: <200907202000.n6KK06RI011116@zion.cs.uiuc.edu> Author: johannes Date: Mon Jul 20 15:00:06 2009 New Revision: 76459 URL: http://llvm.org/viewvc/llvm-project?rev=76459&view=rev Log: Remove unnecessary, and unstable, reference. PR 4575. Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=76459&r1=76458&r2=76459&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Mon Jul 20 15:00:06 2009 @@ -1696,7 +1696,7 @@ static tree FixBaseClassField(tree Field) { tree oldTy = TREE_TYPE(Field); - tree &newTy = BaseTypesMap[oldTy]; + tree newTy = BaseTypesMap[oldTy]; // If already in table, reuse. if (!newTy) { newTy = copy_node(oldTy); @@ -1763,7 +1763,7 @@ static tree FixLessAlignedClassField(tree Field) { tree oldTy = TREE_TYPE(Field); std::pair p = std::make_pair(oldTy, DECL_ALIGN(Field)); - tree &newTy = LessAlignedTypesMap[p]; + tree newTy = LessAlignedTypesMap[p]; // If already in table, reuse. if (!newTy) { newTy = copy_node(oldTy); From clattner at apple.com Mon Jul 20 15:01:14 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 13:01:14 -0700 Subject: [llvm-commits] [llvm] r76447 - /llvm/trunk/include/llvm-c/Core.h In-Reply-To: <16e5fdf90907201245i55a5cf03u49e866135974009c@mail.gmail.com> References: <200907201822.n6KIMr7Z007662@zion.cs.uiuc.edu> <2D108AB1-39DD-4C60-8AA0-623B0F5DEB5C@apple.com> <16e5fdf90907201146k72094499gfa6d3a296eb7f2da@mail.gmail.com> <16e5fdf90907201245i55a5cf03u49e866135974009c@mail.gmail.com> Message-ID: <40C8CEE7-ED6F-4D77-8661-FB1B9C35F13B@apple.com> On Jul 20, 2009, at 12:45 PM, Bill Wendling wrote: > On Mon, Jul 20, 2009 at 11:46 AM, Bill Wendling > wrote: >> On Mon, Jul 20, 2009 at 11:33 AM, Chris Lattner >> wrote: >>> >>> On Jul 20, 2009, at 11:22 AM, Bill Wendling wrote: >>> >>>> Author: void >>>> Date: Mon Jul 20 13:22:52 2009 >>>> New Revision: 76447 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=76447&view=rev >>>> Log: >>>> Put new enum at end of list to avoid changing ABI. >>> >>> Just to verify: is there code in the C api's that maps from the C++ >>> numbering to the C numbering? >>> > Okay. There isn't a "map" from C APIs to C++ numbering. It does a > static_cast of the GlobalValue::LinkageTypes to the equivalent C enum > type. Ok, instead of doing a static cast, do a switch() on one value and have each case map over. > I'm still checking the LTO stuff, but I didn't see any uses of > LLVMLinkage anywhere other than in VMUtils/Core.cpp. Right, but does LTO handle privatelinkage? If so, it might need to be updated to support the new linkage form (maybe not). -Chris From daniel at zuster.org Mon Jul 20 15:01:54 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 20 Jul 2009 20:01:54 -0000 Subject: [llvm-commits] [llvm] r76460 - in /llvm/trunk: include/llvm/MC/MCAsmLexer.h include/llvm/MC/MCAsmParser.h lib/MC/CMakeLists.txt lib/MC/MCAsmLexer.cpp lib/Target/X86/AsmParser/X86AsmParser.cpp tools/llvm-mc/AsmLexer.h tools/llvm-mc/AsmParser.h Message-ID: <200907202001.n6KK1tu8011214@zion.cs.uiuc.edu> Author: ddunbar Date: Mon Jul 20 15:01:54 2009 New Revision: 76460 URL: http://llvm.org/viewvc/llvm-project?rev=76460&view=rev Log: Add MCAsmLexer interface. - This provides the AsmLexer interface to the target specific assembly parsers. Added: llvm/trunk/include/llvm/MC/MCAsmLexer.h llvm/trunk/lib/MC/MCAsmLexer.cpp Modified: llvm/trunk/include/llvm/MC/MCAsmParser.h llvm/trunk/lib/MC/CMakeLists.txt llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp llvm/trunk/tools/llvm-mc/AsmLexer.h llvm/trunk/tools/llvm-mc/AsmParser.h Added: llvm/trunk/include/llvm/MC/MCAsmLexer.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmLexer.h?rev=76460&view=auto ============================================================================== --- llvm/trunk/include/llvm/MC/MCAsmLexer.h (added) +++ llvm/trunk/include/llvm/MC/MCAsmLexer.h Mon Jul 20 15:01:54 2009 @@ -0,0 +1,32 @@ +//===-- llvm/MC/MCAsmLexer.h - Abstract Asm Lexer Interface -----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_MC_MCASMLEXER_H +#define LLVM_MC_MCASMLEXER_H + +namespace llvm { +class MCAsmLexer; +class MCInst; +class Target; + +/// MCAsmLexer - Generic assembler lexer interface, for use by target specific +/// assembly lexers. +class MCAsmLexer { + MCAsmLexer(const MCAsmLexer &); // DO NOT IMPLEMENT + void operator=(const MCAsmLexer &); // DO NOT IMPLEMENT +protected: // Can only create subclasses. + MCAsmLexer(); + +public: + virtual ~MCAsmLexer(); +}; + +} // End llvm namespace + +#endif Modified: llvm/trunk/include/llvm/MC/MCAsmParser.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmParser.h?rev=76460&r1=76459&r2=76460&view=diff ============================================================================== --- llvm/trunk/include/llvm/MC/MCAsmParser.h (original) +++ llvm/trunk/include/llvm/MC/MCAsmParser.h Mon Jul 20 15:01:54 2009 @@ -11,10 +11,7 @@ #define LLVM_MC_MCASMPARSER_H namespace llvm { -class MCAsmParser; -class MCInst; -class Target; -class TargetAsmParser; +class MCAsmLexer; /// MCAsmParser - Generic assembler parser interface, for use by target specific /// assembly parsers. @@ -26,6 +23,8 @@ public: virtual ~MCAsmParser(); + + virtual MCAsmLexer &getLexer() = 0; }; } // End llvm namespace Modified: llvm/trunk/lib/MC/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/CMakeLists.txt?rev=76460&r1=76459&r2=76460&view=diff ============================================================================== --- llvm/trunk/lib/MC/CMakeLists.txt (original) +++ llvm/trunk/lib/MC/CMakeLists.txt Mon Jul 20 15:01:54 2009 @@ -1,4 +1,5 @@ add_llvm_library(LLVMMC + MCAsmLexer.cpp MCAsmParser.cpp MCAsmStreamer.cpp MCContext.cpp Added: llvm/trunk/lib/MC/MCAsmLexer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmLexer.cpp?rev=76460&view=auto ============================================================================== --- llvm/trunk/lib/MC/MCAsmLexer.cpp (added) +++ llvm/trunk/lib/MC/MCAsmLexer.cpp Mon Jul 20 15:01:54 2009 @@ -0,0 +1,18 @@ +//===-- MCAsmLexer.cpp - Abstract Asm Lexer Interface ---------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm/MC/MCAsmLexer.h" + +using namespace llvm; + +MCAsmLexer::MCAsmLexer() { +} + +MCAsmLexer::~MCAsmLexer() { +} Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=76460&r1=76459&r2=76460&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Mon Jul 20 15:01:54 2009 @@ -8,21 +8,29 @@ //===----------------------------------------------------------------------===// #include "X86.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/MC/MCAsmParser.h" #include "llvm/Target/TargetRegistry.h" #include "llvm/Target/TargetAsmParser.h" using namespace llvm; namespace { + struct X86Operand { + }; -class X86ATTAsmParser : public TargetAsmParser { - public: - explicit X86ATTAsmParser(const Target &); - - virtual bool ParseInstruction(MCAsmParser &AP, const char *Name, - MCInst &Inst); -}; - + class X86ATTAsmParser : public TargetAsmParser { + bool ParseOperand(X86Operand &Op); + + bool MatchInstruction(const char *Name, + llvm::SmallVector &Operands, + MCInst &Inst); + + public: + explicit X86ATTAsmParser(const Target &); + + virtual bool ParseInstruction(MCAsmParser &AP, const char *Name, + MCInst &Inst); + }; } X86ATTAsmParser::X86ATTAsmParser(const Target &T) @@ -30,9 +38,25 @@ { } +bool X86ATTAsmParser::ParseOperand(X86Operand &Op) { + return true; +} + +bool +X86ATTAsmParser::MatchInstruction(const char *Name, + llvm::SmallVector &Operands, + MCInst &Inst) { + return false; +} + bool X86ATTAsmParser::ParseInstruction(MCAsmParser &AP, const char *Name, MCInst &Inst) { - return true; + MCAsmLexer &Lexer = AP.getLexer(); + llvm::SmallVector Operands; + (void) Lexer; + (void) Operands; + + return MatchInstruction(Name, Operands, Inst); } namespace { Modified: llvm/trunk/tools/llvm-mc/AsmLexer.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmLexer.h?rev=76460&r1=76459&r2=76460&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/AsmLexer.h (original) +++ llvm/trunk/tools/llvm-mc/AsmLexer.h Mon Jul 20 15:01:54 2009 @@ -14,6 +14,7 @@ #ifndef ASMLEXER_H #define ASMLEXER_H +#include "llvm/MC/MCAsmLexer.h" #include "llvm/Support/DataTypes.h" #include #include @@ -52,7 +53,7 @@ } /// AsmLexer - Lexer class for assembly files. -class AsmLexer { +class AsmLexer : public MCAsmLexer { SourceMgr &SrcMgr; const char *CurPtr; Modified: llvm/trunk/tools/llvm-mc/AsmParser.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmParser.h?rev=76460&r1=76459&r2=76460&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/AsmParser.h (original) +++ llvm/trunk/tools/llvm-mc/AsmParser.h Mon Jul 20 15:01:54 2009 @@ -24,6 +24,7 @@ class MCInst; class MCStreamer; class MCValue; +class TargetAsmParser; class AsmParser : MCAsmParser { public: @@ -46,6 +47,8 @@ public: TargetAsmParser &getTargetParser() const { return TargetParser; } + virtual MCAsmLexer &getLexer() { return Lexer; } + private: bool ParseStatement(); From gohman at apple.com Mon Jul 20 15:18:28 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 20 Jul 2009 13:18:28 -0700 Subject: [llvm-commits] LLVM Verilog Backend In-Reply-To: <9b38093e0907180422m57244b21n5d5a50368f84db71@mail.gmail.com> References: <9b38093e0907180422m57244b21n5d5a50368f84db71@mail.gmail.com> Message-ID: On Jul 18, 2009, at 4:22 AM, Nadav wrote: > Hello, > > My name is Nadav Rotem and I am a PhD student at Haifa University. > In my research (in High-level Synthesis), I developed a Verilog > backend for LLVM that I would like to contribute to LLVM. The > Verilog Backend is documented in an academic paper [1]. An on-line > web interface is available [2]. > > I attached the code to this email. The code compiles with LLVM 2.5; > I only included the Backend itself. I did not include the > preliminary transformation passes, the driver scripts and the test > cases. Hello, Are you planning to contribute the transformation passes and/or other components, or just this backend? Is this backend usable without these other parts? Do you have any tests, or any examples, that can be used to demonstrate this backend? Thanks, Dan From enderby at apple.com Mon Jul 20 15:25:37 2009 From: enderby at apple.com (Kevin Enderby) Date: Mon, 20 Jul 2009 20:25:37 -0000 Subject: [llvm-commits] [llvm] r76462 - in /llvm/trunk: include/llvm/MC/MCStreamer.h lib/MC/MCAsmStreamer.cpp test/MC/AsmParser/directive_dump_and_load.s tools/llvm-mc/AsmParser.cpp tools/llvm-mc/AsmParser.h Message-ID: <200907202025.n6KKPbjx012028@zion.cs.uiuc.edu> Author: enderby Date: Mon Jul 20 15:25:37 2009 New Revision: 76462 URL: http://llvm.org/viewvc/llvm-project?rev=76462&view=rev Log: Removed the DumpSymbolsandMacros and LoadSymbolsandMacros MCStreamer API as the parsing of the .dump and .load should be done in the assembly parser and not have any need for an MCStreamer API. Changed the code for now so these just produce an error saying these specific directives are not yet implemented since they are likely no longer used and may never need to be implemented. Removed: llvm/trunk/test/MC/AsmParser/directive_dump_and_load.s Modified: llvm/trunk/include/llvm/MC/MCStreamer.h llvm/trunk/lib/MC/MCAsmStreamer.cpp llvm/trunk/tools/llvm-mc/AsmParser.cpp llvm/trunk/tools/llvm-mc/AsmParser.h Modified: llvm/trunk/include/llvm/MC/MCStreamer.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=76462&r1=76461&r2=76462&view=diff ============================================================================== --- llvm/trunk/include/llvm/MC/MCStreamer.h (original) +++ llvm/trunk/include/llvm/MC/MCStreamer.h Mon Jul 20 15:25:37 2009 @@ -162,18 +162,6 @@ /// @param AbortReason - The reason assembly is terminated, if non-NULL. virtual void AbortAssembly(const char *AbortReason) = 0; - /// DumpSymbolsandMacros - Dump to the specified file in @param FileName all - /// symbols and macros at this point in the assembly. - /// - /// @param FileName - The file to dump the symbols and macros into. - virtual void DumpSymbolsandMacros(const char *FileName) = 0; - - /// LoadSymbolsandMacros - Load from the specified file in @param FileName - /// symbols and macros into the assembler at this point in the assembly. - /// - /// @param FileName - The file to load the symbols and macros from. - virtual void LoadSymbolsandMacros(const char *FileName) = 0; - /// @} /// @name Generating Data /// @{ Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=76462&r1=76461&r2=76462&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Mon Jul 20 15:25:37 2009 @@ -57,10 +57,6 @@ virtual void AbortAssembly(const char *AbortReason = NULL); - virtual void DumpSymbolsandMacros(const char *FileName); - - virtual void LoadSymbolsandMacros(const char *FileName); - virtual void EmitBytes(const char *Data, unsigned Length); virtual void EmitValue(const MCValue &Value, unsigned Size); @@ -144,14 +140,6 @@ } -void MCAsmStreamer::DumpSymbolsandMacros(const char *FileName) { - OS << ".dump" << ' ' << FileName << '\n'; -} - -void MCAsmStreamer::LoadSymbolsandMacros(const char *FileName) { - OS << ".load" << ' ' << FileName << '\n'; -} - void MCAsmStreamer::EmitAssignment(MCSymbol *Symbol, const MCValue &Value, bool MakeAbsolute) { assert(!Symbol->getSection() && "Cannot assign to a label!"); Removed: llvm/trunk/test/MC/AsmParser/directive_dump_and_load.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/directive_dump_and_load.s?rev=76461&view=auto ============================================================================== --- llvm/trunk/test/MC/AsmParser/directive_dump_and_load.s (original) +++ llvm/trunk/test/MC/AsmParser/directive_dump_and_load.s (removed) @@ -1,8 +0,0 @@ -# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s - -# CHECK: TEST0: -# CHECK: .dump "somefile" -# CHECK: .load "jack and jill" -TEST0: - .dump "somefile" - .load "jack and jill" Modified: llvm/trunk/tools/llvm-mc/AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmParser.cpp?rev=76462&r1=76461&r2=76462&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/AsmParser.cpp (original) +++ llvm/trunk/tools/llvm-mc/AsmParser.cpp Mon Jul 20 15:25:37 2009 @@ -539,9 +539,9 @@ if (!strcmp(IDVal, ".include")) return ParseDirectiveInclude(); if (!strcmp(IDVal, ".dump")) - return ParseDirectiveDarwinDumpOrLoad(/*IsDump=*/true); + return ParseDirectiveDarwinDumpOrLoad(IDLoc, /*IsDump=*/true); if (!strcmp(IDVal, ".load")) - return ParseDirectiveDarwinDumpOrLoad(/*IsLoad=*/false); + return ParseDirectiveDarwinDumpOrLoad(IDLoc, /*IsLoad=*/false); Warning(IDLoc, "ignoring directive for now"); EatToEndOfStatement(); @@ -1197,11 +1197,11 @@ /// ParseDirectiveDarwinDumpOrLoad /// ::= ( .dump | .load ) "filename" -bool AsmParser::ParseDirectiveDarwinDumpOrLoad(bool IsDump) { +bool AsmParser::ParseDirectiveDarwinDumpOrLoad(SMLoc IDLoc, bool IsDump) { if (Lexer.isNot(asmtok::String)) return TokError("expected string in '.dump' or '.load' directive"); - const char *Str = Lexer.getCurStrVal(); + Lexer.getCurStrVal(); Lexer.Lex(); @@ -1210,10 +1210,12 @@ Lexer.Lex(); + // FIXME: If/when .dump and .load are implemented they will be done in the + // the assembly parser and not have any need for an MCStreamer API. if (IsDump) - Out.DumpSymbolsandMacros(Str); + Warning(IDLoc, "ignoring directive .dump for now"); else - Out.LoadSymbolsandMacros(Str); + Warning(IDLoc, "ignoring directive .load for now"); return false; } Modified: llvm/trunk/tools/llvm-mc/AsmParser.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmParser.h?rev=76462&r1=76461&r2=76462&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/AsmParser.h (original) +++ llvm/trunk/tools/llvm-mc/AsmParser.h Mon Jul 20 15:25:37 2009 @@ -127,7 +127,7 @@ // Darwin specific ".subsections_via_symbols" bool ParseDirectiveDarwinSubsectionsViaSymbols(); // Darwin specific .dump and .load - bool ParseDirectiveDarwinDumpOrLoad(bool IsDump); + bool ParseDirectiveDarwinDumpOrLoad(SMLoc IDLoc, bool IsDump); bool ParseDirectiveAbort(); // ".abort" bool ParseDirectiveInclude(); // ".include" From sabre at nondot.org Mon Jul 20 15:25:57 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 20:25:57 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r76463 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Message-ID: <200907202025.n6KKPwBl012050@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 15:25:57 2009 New Revision: 76463 URL: http://llvm.org/viewvc/llvm-project?rev=76463&view=rev Log: rearrange #includes so that macros from GCC headers don't interfere with llvm headers. Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=76463&r1=76462&r2=76463&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon Jul 20 15:25:57 2009 @@ -25,9 +25,6 @@ //===----------------------------------------------------------------------===// #include "llvm/ValueSymbolTable.h" -#include "llvm-abi.h" -#include "llvm-internal.h" -#include "llvm-debug.h" #include "llvm/CallingConv.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" @@ -39,7 +36,6 @@ #include "llvm/System/Host.h" #include "llvm/Support/MathExtras.h" #include "llvm/Target/TargetAsmInfo.h" -#undef RET #include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" @@ -47,6 +43,10 @@ #include "llvm/ADT/DenseMap.h" #include +#include "llvm-abi.h" +#include "llvm-internal.h" +#include "llvm-debug.h" + extern "C" { #include "config.h" #include "system.h" From gohman at apple.com Mon Jul 20 15:32:43 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 20 Jul 2009 20:32:43 -0000 Subject: [llvm-commits] [llvm] r76464 - /llvm/trunk/include/llvm/Operator.h Message-ID: <200907202032.n6KKWhBv012261@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 15:32:43 2009 New Revision: 76464 URL: http://llvm.org/viewvc/llvm-project?rev=76464&view=rev Log: Clarify that OverflowingBinaryOperator is not used for SDiv, even though SDiv is a binary operation that can overflow. Modified: llvm/trunk/include/llvm/Operator.h Modified: llvm/trunk/include/llvm/Operator.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Operator.h?rev=76464&r1=76463&r2=76464&view=diff ============================================================================== --- llvm/trunk/include/llvm/Operator.h (original) +++ llvm/trunk/include/llvm/Operator.h Mon Jul 20 15:32:43 2009 @@ -61,7 +61,8 @@ }; /// OverflowingBinaryOperator - Utility class for integer arithmetic operators -/// which may exhibit overflow - Add, Sub, and Mul. +/// which may exhibit overflow - Add, Sub, and Mul. It does not include SDiv, +/// despite that operator having the potential for overflow. /// class OverflowingBinaryOperator : public Operator { public: From isanbard at gmail.com Mon Jul 20 15:33:27 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 20 Jul 2009 13:33:27 -0700 Subject: [llvm-commits] [llvm] r76447 - /llvm/trunk/include/llvm-c/Core.h In-Reply-To: <40C8CEE7-ED6F-4D77-8661-FB1B9C35F13B@apple.com> References: <200907201822.n6KIMr7Z007662@zion.cs.uiuc.edu> <2D108AB1-39DD-4C60-8AA0-623B0F5DEB5C@apple.com> <16e5fdf90907201146k72094499gfa6d3a296eb7f2da@mail.gmail.com> <16e5fdf90907201245i55a5cf03u49e866135974009c@mail.gmail.com> <40C8CEE7-ED6F-4D77-8661-FB1B9C35F13B@apple.com> Message-ID: <16e5fdf90907201333v71efc45i7af985cac42669ba@mail.gmail.com> On Mon, Jul 20, 2009 at 1:01 PM, Chris Lattner wrote: > > Ok, instead of doing a static cast, do a switch() on one value and > have each case map over. > Okay. :) > Right, but does LTO handle privatelinkage? ?If so, it might need to be > updated to support the new linkage form (maybe not). > I did a global grep on "PrivateLinkage" and didn't find anything in the LTO code... -bw From isanbard at gmail.com Mon Jul 20 15:34:46 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 20 Jul 2009 20:34:46 -0000 Subject: [llvm-commits] [llvm] r76465 - /llvm/trunk/lib/VMCore/Core.cpp Message-ID: <200907202034.n6KKYkDF012330@zion.cs.uiuc.edu> Author: void Date: Mon Jul 20 15:34:46 2009 New Revision: 76465 URL: http://llvm.org/viewvc/llvm-project?rev=76465&view=rev Log: Change the casting of linkage types into a map. This makes this much more robust as it no longer depends upon two different enums being kept in sync with each other. Modified: llvm/trunk/lib/VMCore/Core.cpp Modified: llvm/trunk/lib/VMCore/Core.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Core.cpp?rev=76465&r1=76464&r2=76465&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Core.cpp (original) +++ llvm/trunk/lib/VMCore/Core.cpp Mon Jul 20 15:34:46 2009 @@ -697,12 +697,97 @@ } LLVMLinkage LLVMGetLinkage(LLVMValueRef Global) { - return static_cast(unwrap(Global)->getLinkage()); + switch (unwrap(Global)->getLinkage()) { + default: + assert(false && "Unhandled Linkage Type."); + case GlobalValue::ExternalLinkage: + return LLVMExternalLinkage; + case GlobalValue::AvailableExternallyLinkage: + return LLVMAvailableExternallyLinkage; + case GlobalValue::LinkOnceAnyLinkage: + return LLVMLinkOnceAnyLinkage; + case GlobalValue::LinkOnceODRLinkage: + return LLVMLinkOnceODRLinkage; + case GlobalValue::WeakAnyLinkage: + return LLVMWeakAnyLinkage; + case GlobalValue::WeakODRLinkage: + return LLVMWeakODRLinkage; + case GlobalValue::AppendingLinkage: + return LLVMAppendingLinkage; + case GlobalValue::InternalLinkage: + return LLVMInternalLinkage; + case GlobalValue::PrivateLinkage: + return LLVMPrivateLinkage; + case GlobalValue::LinkerPrivateLinkage: + return LLVMLinkerPrivateLinkage; + case GlobalValue::DLLImportLinkage: + return LLVMDLLImportLinkage; + case GlobalValue::DLLExportLinkage: + return LLVMDLLExportLinkage; + case GlobalValue::ExternalWeakLinkage: + return LLVMExternalWeakLinkage; + case GlobalValue::GhostLinkage: + return LLVMGhostLinkage; + case GlobalValue::CommonLinkage: + return LLVMCommonLinkage; + } + + // Should never get here. + return static_cast(0); } void LLVMSetLinkage(LLVMValueRef Global, LLVMLinkage Linkage) { - unwrap(Global) - ->setLinkage(static_cast(Linkage)); + GlobalValue *GV = unwrap(Global); + + switch (Linkage) { + default: + assert(false && "Unhandled Linkage Type."); + case LLVMExternalLinkage: + GV->setLinkage(GlobalValue::ExternalLinkage); + break; + case LLVMAvailableExternallyLinkage: + GV->setLinkage(GlobalValue::AvailableExternallyLinkage); + break; + case LLVMLinkOnceAnyLinkage: + GV->setLinkage(GlobalValue::LinkOnceAnyLinkage); + break; + case LLVMLinkOnceODRLinkage: + GV->setLinkage(GlobalValue::LinkOnceODRLinkage); + break; + case LLVMWeakAnyLinkage: + GV->setLinkage(GlobalValue::WeakAnyLinkage); + break; + case LLVMWeakODRLinkage: + GV->setLinkage(GlobalValue::WeakODRLinkage); + break; + case LLVMAppendingLinkage: + GV->setLinkage(GlobalValue::AppendingLinkage); + break; + case LLVMInternalLinkage: + GV->setLinkage(GlobalValue::InternalLinkage); + break; + case LLVMPrivateLinkage: + GV->setLinkage(GlobalValue::PrivateLinkage); + break; + case LLVMLinkerPrivateLinkage: + GV->setLinkage(GlobalValue::LinkerPrivateLinkage); + break; + case LLVMDLLImportLinkage: + GV->setLinkage(GlobalValue::DLLImportLinkage); + break; + case LLVMDLLExportLinkage: + GV->setLinkage(GlobalValue::DLLExportLinkage); + break; + case LLVMExternalWeakLinkage: + GV->setLinkage(GlobalValue::ExternalWeakLinkage); + break; + case LLVMGhostLinkage: + GV->setLinkage(GlobalValue::GhostLinkage); + break; + case LLVMCommonLinkage: + GV->setLinkage(GlobalValue::CommonLinkage); + break; + } } const char *LLVMGetSection(LLVMValueRef Global) { From isanbard at gmail.com Mon Jul 20 16:00:18 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 20 Jul 2009 14:00:18 -0700 Subject: [llvm-commits] [llvm] r76385 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPr In-Reply-To: References: Message-ID: <16e5fdf90907201400h3745db43q659e574fb3259eed@mail.gmail.com> On Mon, Jul 20, 2009 at 5:42 AM, Eli Friedman wrote: > On Mon, Jul 20, 2009 at 1:19 AM, Duncan Sands wrote: >> Hi Chris, >> >>> Right. ?Private linkage is discarded by the assembler, so they never >>> make it into the .o file. ?linker_private is discarded by the linker, >>> so it never makes it into the .exe/.dylib. ?I don't think there is a >>> corresponding idea on ELF, so on ELF they two linkage types should be >>> codegen'd the same way. >> >> I don't understand why you would want something to be discarded by >> the assembler/linker and not by the linker/assembler. ?Don't you >> want them both to throw pointless things away? > > I've stopped questioning anything that has to do with Apple's > linker... it has all sorts of strange quirks. > I have too. :-) -bw From evan.cheng at apple.com Mon Jul 20 16:16:08 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 20 Jul 2009 21:16:08 -0000 Subject: [llvm-commits] [llvm] r76472 - in /llvm/trunk: lib/CodeGen/TwoAddressInstructionPass.cpp test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll Message-ID: <200907202116.n6KLG8ZW013756@zion.cs.uiuc.edu> Author: evancheng Date: Mon Jul 20 16:16:08 2009 New Revision: 76472 URL: http://llvm.org/viewvc/llvm-project?rev=76472&view=rev Log: Use TII->findCommutedOpIndices to find the commute operands (rather than guessing). Added: llvm/trunk/test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=76472&r1=76471&r2=76472&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original) +++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Mon Jul 20 16:16:08 2009 @@ -879,10 +879,14 @@ // so, swap the B and C operands. This makes the live ranges of A // and C joinable. // FIXME: This code also works for A := B op C instructions. - if (TID.isCommutable() && mi->getNumOperands() >= 3) { - assert(mi->getOperand(3-si).isReg() && - "Not a proper commutative instruction!"); - unsigned regC = mi->getOperand(3-si).getReg(); + unsigned SrcOp1, SrcOp2; + if (TID.isCommutable() && mi->getNumOperands() >= 3 && + TII->findCommutedOpIndices(mi, SrcOp1, SrcOp2)) { + unsigned regC = 0; + if (si == SrcOp1) + regC = mi->getOperand(SrcOp2).getReg(); + else if (si == SrcOp2) + regC = mi->getOperand(SrcOp1).getReg(); if (isKilled(*mi, regC, MRI, TII)) { if (CommuteInstruction(mi, mbbi, regB, regC, Dist)) { ++NumCommuted; Added: llvm/trunk/test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll?rev=76472&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll (added) +++ llvm/trunk/test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll Mon Jul 20 16:16:08 2009 @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc -mtriple=thumbv6-apple-darwin10 + + at Time.2535 = external global i64 ; [#uses=2] + +define arm_apcscc i64 @millisecs() nounwind { +entry: + %0 = load i64* @Time.2535, align 4 ; [#uses=2] + %1 = add i64 %0, 1 ; [#uses=1] + store i64 %1, i64* @Time.2535, align 4 + ret i64 %0 +} From gohman at apple.com Mon Jul 20 16:19:08 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 20 Jul 2009 21:19:08 -0000 Subject: [llvm-commits] [llvm] r76475 - in /llvm/trunk: include/llvm/Bitcode/LLVMBitCodes.h lib/AsmParser/LLLexer.cpp lib/AsmParser/LLParser.cpp lib/AsmParser/LLToken.h lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Writer/BitcodeWriter.cpp lib/VMCore/AsmWriter.cpp test/Assembler/flags-plain.ll test/Assembler/flags-reversed.ll test/Assembler/flags-signed.ll test/Assembler/flags-unsigned.ll test/Assembler/flags.ll Message-ID: <200907202119.n6KLJ8DK013888@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 16:19:07 2009 New Revision: 76475 URL: http://llvm.org/viewvc/llvm-project?rev=76475&view=rev Log: Assembly and Bitcode support for unsigned/signed overflow flags and exact sdiv flags. Added: llvm/trunk/test/Assembler/flags-plain.ll llvm/trunk/test/Assembler/flags-reversed.ll llvm/trunk/test/Assembler/flags-signed.ll llvm/trunk/test/Assembler/flags-unsigned.ll llvm/trunk/test/Assembler/flags.ll Modified: llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h llvm/trunk/lib/AsmParser/LLLexer.cpp llvm/trunk/lib/AsmParser/LLParser.cpp llvm/trunk/lib/AsmParser/LLToken.h llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/trunk/lib/VMCore/AsmWriter.cpp Modified: llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h?rev=76475&r1=76474&r2=76475&view=diff ============================================================================== --- llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h (original) +++ llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h Mon Jul 20 16:19:07 2009 @@ -171,6 +171,18 @@ BINOP_XOR = 12 }; + /// OverflowingBinaryOperatorOptionalFlags - Flags for serializing + /// OverflowingBinaryOperator's SubclassOptionalData contents. + enum OverflowingBinaryOperatorOptionalFlags { + OBO_NO_UNSIGNED_OVERFLOW = 0, + OBO_NO_SIGNED_OVERFLOW = 1 + }; + + /// SDivOperatorOptionalFlags - Flags for serializing SDivOperator's + /// SubclassOptionalData contents. + enum SDivOperatorOptionalFlags { + SDIV_EXACT = 0 + }; // The function body block (FUNCTION_BLOCK_ID) describes function bodies. It // can contain a constant block (CONSTANTS_BLOCK_ID). Modified: llvm/trunk/lib/AsmParser/LLLexer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLLexer.cpp?rev=76475&r1=76474&r2=76475&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/LLLexer.cpp (original) +++ llvm/trunk/lib/AsmParser/LLLexer.cpp Mon Jul 20 16:19:07 2009 @@ -501,6 +501,9 @@ KEYWORD(deplibs); KEYWORD(datalayout); KEYWORD(volatile); + KEYWORD(signed); + KEYWORD(unsigned); + KEYWORD(exact); KEYWORD(align); KEYWORD(addrspace); KEYWORD(section); Modified: llvm/trunk/lib/AsmParser/LLParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=76475&r1=76474&r2=76475&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/LLParser.cpp (original) +++ llvm/trunk/lib/AsmParser/LLParser.cpp Mon Jul 20 16:19:07 2009 @@ -21,6 +21,7 @@ #include "llvm/LLVMContext.h" #include "llvm/MDNode.h" #include "llvm/Module.h" +#include "llvm/Operator.h" #include "llvm/ValueSymbolTable.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/StringExtras.h" @@ -2041,6 +2042,49 @@ ID.Kind = ValID::t_Constant; return false; } + case lltok::kw_signed: { + Lex.Lex(); + bool AlsoUnsigned = EatIfPresent(lltok::kw_unsigned); + if (Lex.getKind() != lltok::kw_add && + Lex.getKind() != lltok::kw_sub && + Lex.getKind() != lltok::kw_mul) + return TokError("expected 'add', 'sub', or 'mul'"); + bool Result = LLParser::ParseValID(ID); + if (!Result) { + cast(ID.ConstantVal) + ->setHasNoSignedOverflow(true); + if (AlsoUnsigned) + cast(ID.ConstantVal) + ->setHasNoUnsignedOverflow(true); + } + return Result; + } + case lltok::kw_unsigned: { + Lex.Lex(); + bool AlsoSigned = EatIfPresent(lltok::kw_signed); + if (Lex.getKind() != lltok::kw_add && + Lex.getKind() != lltok::kw_sub && + Lex.getKind() != lltok::kw_mul) + return TokError("expected 'add', 'sub', or 'mul'"); + bool Result = LLParser::ParseValID(ID); + if (!Result) { + cast(ID.ConstantVal) + ->setHasNoUnsignedOverflow(true); + if (AlsoSigned) + cast(ID.ConstantVal) + ->setHasNoSignedOverflow(true); + } + return Result; + } + case lltok::kw_exact: { + Lex.Lex(); + if (Lex.getKind() != lltok::kw_sdiv) + return TokError("expected 'sdiv'"); + bool Result = LLParser::ParseValID(ID); + if (!Result) + cast(ID.ConstantVal)->setIsExact(true); + return Result; + } } Lex.Lex(); @@ -2558,6 +2602,50 @@ return ParseStore(Inst, PFS, true); else return TokError("expected 'load' or 'store'"); + case lltok::kw_signed: { + bool AlsoUnsigned = EatIfPresent(lltok::kw_unsigned); + if (Lex.getKind() == lltok::kw_add || + Lex.getKind() == lltok::kw_sub || + Lex.getKind() == lltok::kw_mul) { + Lex.Lex(); + KeywordVal = Lex.getUIntVal(); + bool Result = ParseArithmetic(Inst, PFS, KeywordVal, 0); + if (!Result) { + cast(Inst)->setHasNoSignedOverflow(true); + if (AlsoUnsigned) + cast(Inst)->setHasNoUnsignedOverflow(true); + } + return Result; + } + return TokError("expected 'add', 'sub', or 'mul'"); + } + case lltok::kw_unsigned: { + bool AlsoSigned = EatIfPresent(lltok::kw_signed); + if (Lex.getKind() == lltok::kw_add || + Lex.getKind() == lltok::kw_sub || + Lex.getKind() == lltok::kw_mul) { + Lex.Lex(); + KeywordVal = Lex.getUIntVal(); + bool Result = ParseArithmetic(Inst, PFS, KeywordVal, 1); + if (!Result) { + cast(Inst)->setHasNoUnsignedOverflow(true); + if (AlsoSigned) + cast(Inst)->setHasNoSignedOverflow(true); + } + return Result; + } + return TokError("expected 'add', 'sub', or 'mul'"); + } + case lltok::kw_exact: + if (Lex.getKind() == lltok::kw_sdiv) { + Lex.Lex(); + KeywordVal = Lex.getUIntVal(); + bool Result = ParseArithmetic(Inst, PFS, KeywordVal, 1); + if (!Result) + cast(Inst)->setIsExact(true); + return Result; + } + return TokError("expected 'udiv'"); case lltok::kw_getresult: return ParseGetResult(Inst, PFS); case lltok::kw_getelementptr: return ParseGetElementPtr(Inst, PFS); case lltok::kw_extractvalue: return ParseExtractValue(Inst, PFS); Modified: llvm/trunk/lib/AsmParser/LLToken.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLToken.h?rev=76475&r1=76474&r2=76475&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/LLToken.h (original) +++ llvm/trunk/lib/AsmParser/LLToken.h Mon Jul 20 16:19:07 2009 @@ -51,6 +51,9 @@ kw_deplibs, kw_datalayout, kw_volatile, + kw_signed, + kw_unsigned, + kw_exact, kw_align, kw_addrspace, kw_section, Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=76475&r1=76474&r2=76475&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original) +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Mon Jul 20 16:19:07 2009 @@ -20,6 +20,7 @@ #include "llvm/LLVMContext.h" #include "llvm/MDNode.h" #include "llvm/Module.h" +#include "llvm/Operator.h" #include "llvm/AutoUpgrade.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" @@ -747,6 +748,18 @@ return false; } +static void SetOptimizationFlags(Value *V, uint64_t Flags) { + if (OverflowingBinaryOperator *OBO = + dyn_cast(V)) { + if (Flags & (1 << bitc::OBO_NO_SIGNED_OVERFLOW)) + OBO->setHasNoSignedOverflow(true); + if (Flags & (1 << bitc::OBO_NO_UNSIGNED_OVERFLOW)) + OBO->setHasNoUnsignedOverflow(true); + } else if (SDivOperator *Div = dyn_cast(V)) { + if (Flags & (1 << bitc::SDIV_EXACT)) + Div->setIsExact(true); + } +} bool BitcodeReader::ParseConstants() { if (Stream.EnterSubBlock(bitc::CONSTANTS_BLOCK_ID)) @@ -778,7 +791,8 @@ // Read a record. Record.clear(); Value *V = 0; - switch (Stream.ReadRecord(Code, Record)) { + unsigned BitCode = Stream.ReadRecord(Code, Record); + switch (BitCode) { default: // Default behavior: unknown constant case bitc::CST_CODE_UNDEF: // UNDEF V = Context.getUndef(CurTy); @@ -899,6 +913,8 @@ Constant *RHS = ValueList.getConstantFwdRef(Record[2], CurTy); V = Context.getConstantExpr(Opc, LHS, RHS); } + if (Record.size() >= 4) + SetOptimizationFlags(V, Record[3]); break; } case bitc::CST_CODE_CE_CAST: { // CE_CAST: [opcode, opty, opval] @@ -1451,7 +1467,8 @@ // Read a record. Record.clear(); Instruction *I = 0; - switch (Stream.ReadRecord(Code, Record)) { + unsigned BitCode = Stream.ReadRecord(Code, Record); + switch (BitCode) { default: // Default behavior: reject return Error("Unknown instruction"); case bitc::FUNC_CODE_DECLAREBLOCKS: // DECLAREBLOCKS: [nblocks] @@ -1469,12 +1486,14 @@ Value *LHS, *RHS; if (getValueTypePair(Record, OpNum, NextValueNo, LHS) || getValue(Record, OpNum, LHS->getType(), RHS) || - OpNum+1 != Record.size()) + OpNum+1 > Record.size()) return Error("Invalid BINOP record"); - int Opc = GetDecodedBinaryOpcode(Record[OpNum], LHS->getType()); + int Opc = GetDecodedBinaryOpcode(Record[OpNum++], LHS->getType()); if (Opc == -1) return Error("Invalid BINOP record"); I = BinaryOperator::Create((Instruction::BinaryOps)Opc, LHS, RHS); + if (OpNum < Record.size()) + SetOptimizationFlags(I, Record[3]); break; } case bitc::FUNC_CODE_INST_CAST: { // CAST: [opval, opty, destty, castopc] Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=76475&r1=76474&r2=76475&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original) +++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Mon Jul 20 16:19:07 2009 @@ -21,6 +21,7 @@ #include "llvm/Instructions.h" #include "llvm/MDNode.h" #include "llvm/Module.h" +#include "llvm/Operator.h" #include "llvm/TypeSymbolTable.h" #include "llvm/ValueSymbolTable.h" #include "llvm/Support/ErrorHandling.h" @@ -50,6 +51,7 @@ // FUNCTION_BLOCK abbrev id's. FUNCTION_INST_LOAD_ABBREV = bitc::FIRST_APPLICATION_ABBREV, FUNCTION_INST_BINOP_ABBREV, + FUNCTION_INST_BINOP_FLAGS_ABBREV, FUNCTION_INST_CAST_ABBREV, FUNCTION_INST_RET_VOID_ABBREV, FUNCTION_INST_RET_VAL_ABBREV, @@ -454,6 +456,22 @@ } } +static uint64_t GetOptimizationFlags(const Value *V) { + uint64_t Flags = 0; + + if (const OverflowingBinaryOperator *OBO = + dyn_cast(V)) { + if (OBO->hasNoSignedOverflow()) + Flags |= 1 << bitc::OBO_NO_SIGNED_OVERFLOW; + if (OBO->hasNoUnsignedOverflow()) + Flags |= 1 << bitc::OBO_NO_UNSIGNED_OVERFLOW; + } else if (const SDivOperator *Div = dyn_cast(V)) { + if (Div->isExact()) + Flags |= 1 << bitc::SDIV_EXACT; + } + + return Flags; +} static void WriteConstants(unsigned FirstVal, unsigned LastVal, const ValueEnumerator &VE, @@ -641,6 +659,9 @@ Record.push_back(GetEncodedBinaryOpcode(CE->getOpcode())); Record.push_back(VE.getValueID(C->getOperand(0))); Record.push_back(VE.getValueID(C->getOperand(1))); + uint64_t Flags = GetOptimizationFlags(CE); + if (Flags != 0) + Record.push_back(Flags); } break; case Instruction::GetElementPtr: @@ -778,6 +799,12 @@ AbbrevToUse = FUNCTION_INST_BINOP_ABBREV; Vals.push_back(VE.getValueID(I.getOperand(1))); Vals.push_back(GetEncodedBinaryOpcode(I.getOpcode())); + uint64_t Flags = GetOptimizationFlags(&I); + if (Flags != 0) { + if (AbbrevToUse == FUNCTION_INST_BINOP_ABBREV) + AbbrevToUse = FUNCTION_INST_BINOP_FLAGS_ABBREV; + Vals.push_back(Flags); + } } break; @@ -1225,6 +1252,17 @@ Abbv) != FUNCTION_INST_BINOP_ABBREV) llvm_unreachable("Unexpected abbrev ordering!"); } + { // INST_BINOP_FLAGS abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_BINOP)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // LHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // RHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // opc + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7)); // flags + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_BINOP_FLAGS_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } { // INST_CAST abbrev for FUNCTION_BLOCK. BitCodeAbbrev *Abbv = new BitCodeAbbrev(); Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_CAST)); Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=76475&r1=76474&r2=76475&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/AsmWriter.cpp (original) +++ llvm/trunk/lib/VMCore/AsmWriter.cpp Mon Jul 20 16:19:07 2009 @@ -23,6 +23,7 @@ #include "llvm/InlineAsm.h" #include "llvm/Instruction.h" #include "llvm/Instructions.h" +#include "llvm/Operator.h" #include "llvm/MDNode.h" #include "llvm/Module.h" #include "llvm/ValueSymbolTable.h" @@ -851,6 +852,19 @@ } } +static void WriteOptimizationInfo(raw_ostream &Out, const User *U) { + if (const OverflowingBinaryOperator *OBO = + dyn_cast(U)) { + if (OBO->hasNoUnsignedOverflow()) + Out << "unsigned "; + if (OBO->hasNoSignedOverflow()) + Out << "signed "; + } else if (const SDivOperator *Div = dyn_cast(U)) { + if (Div->isExact()) + Out << "exact "; + } +} + static void WriteConstantInt(raw_ostream &Out, const Constant *CV, TypePrinting &TypePrinter, SlotTracker *Machine) { if (const ConstantInt *CI = dyn_cast(CV)) { @@ -1062,6 +1076,7 @@ } if (const ConstantExpr *CE = dyn_cast(CV)) { + WriteOptimizationInfo(Out, CE); Out << CE->getOpcodeName(); if (CE->isCompare()) Out << ' ' << getPredicateText(CE->getPredicate()); @@ -1682,6 +1697,9 @@ Out << "tail "; } + // Print out optimization information. + WriteOptimizationInfo(Out, &I); + // Print out the opcode... Out << I.getOpcodeName(); Added: llvm/trunk/test/Assembler/flags-plain.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/flags-plain.ll?rev=76475&view=auto ============================================================================== --- llvm/trunk/test/Assembler/flags-plain.ll (added) +++ llvm/trunk/test/Assembler/flags-plain.ll Mon Jul 20 16:19:07 2009 @@ -0,0 +1,23 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s + + at addr = external global i64 + +define i64 @add_plain_ce() { +; CHECK: ret i64 add (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 add (i64 ptrtoint (i64* @addr to i64), i64 91) +} + +define i64 @sub_plain_ce() { +; CHECK: ret i64 sub (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 sub (i64 ptrtoint (i64* @addr to i64), i64 91) +} + +define i64 @mul_plain_ce() { +; CHECK: ret i64 mul (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 mul (i64 ptrtoint (i64* @addr to i64), i64 91) +} + +define i64 @sdiv_plain_ce() { +; CHECK: ret i64 sdiv (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 sdiv (i64 ptrtoint (i64* @addr to i64), i64 91) +} Added: llvm/trunk/test/Assembler/flags-reversed.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/flags-reversed.ll?rev=76475&view=auto ============================================================================== --- llvm/trunk/test/Assembler/flags-reversed.ll (added) +++ llvm/trunk/test/Assembler/flags-reversed.ll Mon Jul 20 16:19:07 2009 @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s + + at addr = external global i64 + +define i64 @add_both_reversed_ce() { +; CHECK: ret i64 unsigned signed add (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 signed unsigned add (i64 ptrtoint (i64* @addr to i64), i64 91) +} + +define i64 @sub_both_reversed_ce() { +; CHECK: ret i64 unsigned signed sub (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 signed unsigned sub (i64 ptrtoint (i64* @addr to i64), i64 91) +} + +define i64 @mul_both_reversed_ce() { +; CHECK: ret i64 unsigned signed mul (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 signed unsigned mul (i64 ptrtoint (i64* @addr to i64), i64 91) +} Added: llvm/trunk/test/Assembler/flags-signed.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/flags-signed.ll?rev=76475&view=auto ============================================================================== --- llvm/trunk/test/Assembler/flags-signed.ll (added) +++ llvm/trunk/test/Assembler/flags-signed.ll Mon Jul 20 16:19:07 2009 @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s + + at addr = external global i64 + +define i64 @add_signed_ce() { +; CHECK: ret i64 signed add (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 signed add (i64 ptrtoint (i64* @addr to i64), i64 91) +} + +define i64 @sub_signed_ce() { +; CHECK: ret i64 signed sub (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 signed sub (i64 ptrtoint (i64* @addr to i64), i64 91) +} + +define i64 @mul_signed_ce() { +; CHECK: ret i64 signed mul (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 signed mul (i64 ptrtoint (i64* @addr to i64), i64 91) +} Added: llvm/trunk/test/Assembler/flags-unsigned.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/flags-unsigned.ll?rev=76475&view=auto ============================================================================== --- llvm/trunk/test/Assembler/flags-unsigned.ll (added) +++ llvm/trunk/test/Assembler/flags-unsigned.ll Mon Jul 20 16:19:07 2009 @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s + + at addr = external global i64 + +define i64 @add_unsigned_ce() { +; CHECK: ret i64 unsigned add (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 unsigned add (i64 ptrtoint (i64* @addr to i64), i64 91) +} + +define i64 @sub_unsigned_ce() { +; CHECK: ret i64 unsigned sub (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 unsigned sub (i64 ptrtoint (i64* @addr to i64), i64 91) +} + +define i64 @mul_unsigned_ce() { +; CHECK: ret i64 unsigned mul (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 unsigned mul (i64 ptrtoint (i64* @addr to i64), i64 91) +} Added: llvm/trunk/test/Assembler/flags.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/flags.ll?rev=76475&view=auto ============================================================================== --- llvm/trunk/test/Assembler/flags.ll (added) +++ llvm/trunk/test/Assembler/flags.ll Mon Jul 20 16:19:07 2009 @@ -0,0 +1,125 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s + + at addr = external global i64 + +define i64 @add_signed(i64 %x, i64 %y) { +; CHECK: %z = signed add i64 %x, %y + %z = signed add i64 %x, %y + ret i64 %z +} + +define i64 @sub_signed(i64 %x, i64 %y) { +; CHECK: %z = signed sub i64 %x, %y + %z = signed sub i64 %x, %y + ret i64 %z +} + +define i64 @mul_signed(i64 %x, i64 %y) { +; CHECK: %z = signed mul i64 %x, %y + %z = signed mul i64 %x, %y + ret i64 %z +} + +define i64 @add_unsigned(i64 %x, i64 %y) { +; CHECK: %z = unsigned add i64 %x, %y + %z = unsigned add i64 %x, %y + ret i64 %z +} + +define i64 @sub_unsigned(i64 %x, i64 %y) { +; CHECK: %z = unsigned sub i64 %x, %y + %z = unsigned sub i64 %x, %y + ret i64 %z +} + +define i64 @mul_unsigned(i64 %x, i64 %y) { +; CHECK: %z = unsigned mul i64 %x, %y + %z = unsigned mul i64 %x, %y + ret i64 %z +} + +define i64 @add_plain(i64 %x, i64 %y) { +; CHECK: %z = add i64 %x, %y + %z = add i64 %x, %y + ret i64 %z +} + +define i64 @sub_plain(i64 %x, i64 %y) { +; CHECK: %z = sub i64 %x, %y + %z = sub i64 %x, %y + ret i64 %z +} + +define i64 @mul_plain(i64 %x, i64 %y) { +; CHECK: %z = mul i64 %x, %y + %z = mul i64 %x, %y + ret i64 %z +} + +define i64 @add_both(i64 %x, i64 %y) { +; CHECK: %z = unsigned signed add i64 %x, %y + %z = unsigned signed add i64 %x, %y + ret i64 %z +} + +define i64 @sub_both(i64 %x, i64 %y) { +; CHECK: %z = unsigned signed sub i64 %x, %y + %z = unsigned signed sub i64 %x, %y + ret i64 %z +} + +define i64 @mul_both(i64 %x, i64 %y) { +; CHECK: %z = unsigned signed mul i64 %x, %y + %z = unsigned signed mul i64 %x, %y + ret i64 %z +} + +define i64 @add_both_reversed(i64 %x, i64 %y) { +; CHECK: %z = unsigned signed add i64 %x, %y + %z = signed unsigned add i64 %x, %y + ret i64 %z +} + +define i64 @sub_both_reversed(i64 %x, i64 %y) { +; CHECK: %z = unsigned signed sub i64 %x, %y + %z = signed unsigned sub i64 %x, %y + ret i64 %z +} + +define i64 @mul_both_reversed(i64 %x, i64 %y) { +; CHECK: %z = unsigned signed mul i64 %x, %y + %z = signed unsigned mul i64 %x, %y + ret i64 %z +} + +define i64 @sdiv_exact(i64 %x, i64 %y) { +; CHECK: %z = exact sdiv i64 %x, %y + %z = exact sdiv i64 %x, %y + ret i64 %z +} + +define i64 @sdiv_plain(i64 %x, i64 %y) { +; CHECK: %z = sdiv i64 %x, %y + %z = sdiv i64 %x, %y + ret i64 %z +} + +define i64 @add_both_ce() { +; CHECK: ret i64 unsigned signed add (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 signed unsigned add (i64 ptrtoint (i64* @addr to i64), i64 91) +} + +define i64 @sub_both_ce() { +; CHECK: ret i64 unsigned signed sub (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 signed unsigned sub (i64 ptrtoint (i64* @addr to i64), i64 91) +} + +define i64 @mul_both_ce() { +; CHECK: ret i64 unsigned signed mul (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 unsigned signed mul (i64 ptrtoint (i64* @addr to i64), i64 91) +} + +define i64 @sdiv_exact_ce() { +; CHECK: ret i64 exact sdiv (i64 ptrtoint (i64* @addr to i64), i64 91) + ret i64 exact sdiv (i64 ptrtoint (i64* @addr to i64), i64 91) +} From mai4 at uiuc.edu Mon Jul 20 16:24:10 2009 From: mai4 at uiuc.edu (Haohui Mai) Date: Mon, 20 Jul 2009 21:24:10 -0000 Subject: [llvm-commits] [poolalloc] r76477 - /poolalloc/trunk/lib/DSA/Steensgaard.cpp Message-ID: <200907202124.n6KLOAhA014130@zion.cs.uiuc.edu> Author: mai4 Date: Mon Jul 20 16:24:09 2009 New Revision: 76477 URL: http://llvm.org/viewvc/llvm-project?rev=76477&view=rev Log: Merge globals into the result graph at the final stage of steensgaard DSA, just like what BU does. Modified: poolalloc/trunk/lib/DSA/Steensgaard.cpp Modified: poolalloc/trunk/lib/DSA/Steensgaard.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Steensgaard.cpp?rev=76477&r1=76476&r2=76477&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Steensgaard.cpp (original) +++ poolalloc/trunk/lib/DSA/Steensgaard.cpp Mon Jul 20 16:24:09 2009 @@ -62,9 +62,9 @@ GlobalsGraph = new DSGraph(GG, GG->getGlobalECs()); // Create a new, empty, graph... - ResultGraph = new DSGraph(GlobalECs, getTargetData()); + ResultGraph = new DSGraph(GG->getGlobalECs(), getTargetData()); ResultGraph->setGlobalsGraph(GlobalsGraph); -// ResultGraph->spliceFrom(DS->getGlobalsGraph()); + // ResultGraph->spliceFrom(DS->getGlobalsGraph()); // Loop over the rest of the module, merging graphs for non-external functions @@ -134,7 +134,25 @@ // Remove any nodes that are dead after all of the merging we have done... - ResultGraph->removeDeadNodes(DSGraph::RemoveUnreachableGlobals); + ResultGraph->removeDeadNodes(DSGraph::KeepUnreachableGlobals); + + GlobalsGraph->removeTriviallyDeadNodes(true); + GlobalsGraph->maskIncompleteMarkers(); + + // Mark external globals incomplete. + GlobalsGraph->markIncompleteNodes(DSGraph::IgnoreGlobals); + + formGlobalECs(); + + // Clone the global nodes into this graph. + ReachabilityCloner RC(ResultGraph, GlobalsGraph, + DSGraph::DontCloneCallNodes | + DSGraph::DontCloneAuxCallNodes); + for (DSScalarMap::global_iterator I = GlobalsGraph->getScalarMap().global_begin(), + E = GlobalsGraph->getScalarMap().global_end(); I != E; ++I) + if (isa(*I)) + RC.getClonedNH(GlobalsGraph->getNodeForValue(*I)); + print(DOUT, &M); return false; From rnk at mit.edu Mon Jul 20 16:26:31 2009 From: rnk at mit.edu (Reid Kleckner) Date: Mon, 20 Jul 2009 14:26:31 -0700 Subject: [llvm-commits] Changes to BumpPtrAllocator so it can be used for JITed function stubs and globals Message-ID: <9a9942200907201426m3ca80fe0n86cd5b03ff0041a5@mail.gmail.com> This parameterizes the BumpPtrAllocator over a slab allocation strategy. It defaults to using malloc, and there should be no functional changes to other code. It passes make check. These changes are needed so I don't have to write a second bump allocator in the JIT memory manager, which can't use malloc since the memory must be marked executable. Please review! Thanks, Reid -------------- next part -------------- A non-text attachment was scrubbed... Name: Allocator.diff Type: text/x-diff Size: 12174 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090720/edcaf89f/attachment.bin From isanbard at gmail.com Mon Jul 20 16:30:28 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 20 Jul 2009 21:30:28 -0000 Subject: [llvm-commits] [llvm] r76479 - in /llvm/trunk/lib: CodeGen/AsmPrinter/AsmPrinter.cpp Target/MSP430/MSP430AsmPrinter.cpp Target/Mips/AsmPrinter/MipsAsmPrinter.cpp Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp Message-ID: <200907202130.n6KLUS2c014383@zion.cs.uiuc.edu> Author: void Date: Mon Jul 20 16:30:28 2009 New Revision: 76479 URL: http://llvm.org/viewvc/llvm-project?rev=76479&view=rev Log: Pass in the unfortunately named "LessPrivatePrefix" for the "LinkerPrivatePrefix". It seems to have been used in only one place before I started this "linker_private" business. I'm thinking that a rename is in order... Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=76479&r1=76478&r2=76479&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Jul 20 16:30:28 2009 @@ -154,7 +154,8 @@ } bool AsmPrinter::doInitialization(Module &M) { - Mang = new Mangler(M, TAI->getGlobalPrefix(), TAI->getPrivateGlobalPrefix()); + Mang = new Mangler(M, TAI->getGlobalPrefix(), TAI->getPrivateGlobalPrefix(), + TAI->getLessPrivateGlobalPrefix()); if (TAI->doesAllowQuotesInName()) Mang->setUseQuotes(true); Modified: llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp?rev=76479&r1=76478&r2=76479&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp Mon Jul 20 16:30:28 2009 @@ -82,7 +82,8 @@ } bool MSP430AsmPrinter::doInitialization(Module &M) { - Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix()); + Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), + TAI->getLessPrivateGlobalPrefix()); return false; // success } Modified: llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp?rev=76479&r1=76478&r2=76479&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp Mon Jul 20 16:30:28 2009 @@ -451,7 +451,8 @@ bool MipsAsmPrinter:: doInitialization(Module &M) { - Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix()); + Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), + TAI->getLessPrivateGlobalPrefix()); // Tell the assembler which ABI we are using O << "\t.section .mdebug." << emitCurrentABIString() << '\n'; Modified: llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp?rev=76479&r1=76478&r2=76479&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp Mon Jul 20 16:30:28 2009 @@ -223,7 +223,8 @@ } bool SparcAsmPrinter::doInitialization(Module &M) { - Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix()); + Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), + TAI->getLessPrivateGlobalPrefix()); return false; // success } Modified: llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp?rev=76479&r1=76478&r2=76479&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp Mon Jul 20 16:30:28 2009 @@ -92,7 +92,8 @@ } bool SystemZAsmPrinter::doInitialization(Module &M) { - Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix()); + Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), + TAI->getLessPrivateGlobalPrefix()); return false; // success } From isanbard at gmail.com Mon Jul 20 16:38:26 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 20 Jul 2009 21:38:26 -0000 Subject: [llvm-commits] [llvm] r76480 - in /llvm/trunk/lib: CodeGen/MachOWriter.cpp Target/DarwinTargetAsmInfo.cpp Message-ID: <200907202138.n6KLcQrQ014616@zion.cs.uiuc.edu> Author: void Date: Mon Jul 20 16:38:26 2009 New Revision: 76480 URL: http://llvm.org/viewvc/llvm-project?rev=76480&view=rev Log: Simplify the code in DarwinTargetAsmInfo::emitUsedDirectiveFor so that humans can understand it. Modified: llvm/trunk/lib/CodeGen/MachOWriter.cpp llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Modified: llvm/trunk/lib/CodeGen/MachOWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachOWriter.cpp?rev=76480&r1=76479&r2=76480&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachOWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/MachOWriter.cpp Mon Jul 20 16:38:26 2009 @@ -774,4 +774,3 @@ } } // end namespace llvm - Modified: llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp?rev=76480&r1=76479&r2=76480&view=diff ============================================================================== --- llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Mon Jul 20 16:38:26 2009 @@ -107,23 +107,23 @@ /// emitUsedDirectiveFor - On Darwin, internally linked data beginning with /// the PrivateGlobalPrefix or the LessPrivateGlobalPrefix does not have the /// directive emitted (this occurs in ObjC metadata). -bool -DarwinTargetAsmInfo::emitUsedDirectiveFor(const GlobalValue* GV, - Mangler *Mang) const { - if (GV==0) - return false; +bool DarwinTargetAsmInfo::emitUsedDirectiveFor(const GlobalValue* GV, + Mangler *Mang) const { + if (!GV) return false; - /// FIXME: WHAT IS THIS? - - if (GV->hasLocalLinkage() && !isa(GV) && - ((strlen(getPrivateGlobalPrefix()) != 0 && - Mang->getMangledName(GV).substr(0,strlen(getPrivateGlobalPrefix())) == - getPrivateGlobalPrefix()) || - (strlen(getLessPrivateGlobalPrefix()) != 0 && - Mang->getMangledName(GV).substr(0, - strlen(getLessPrivateGlobalPrefix())) == - getLessPrivateGlobalPrefix()))) - return false; + // Check whether the mangled name has the "Private" or "LessPrivate" prefix. + if (GV->hasLocalLinkage() && !isa(GV)) { + const std::string &Name = Mang->getMangledName(GV); + const char *PGPrefix = getPrivateGlobalPrefix(); + const char *LPGPrefix = getLessPrivateGlobalPrefix(); + unsigned PGPLen = strlen(PGPrefix); + unsigned LPGPLen = strlen(LPGPrefix); + + if ((PGPLen != 0 && Name.substr(0, PGPLen) == PGPrefix) || + (LPGPLen != 0 && Name.substr(0, LPGPLen) == LPGPrefix)) + return false; + } + return true; } From criswell at uiuc.edu Mon Jul 20 16:42:26 2009 From: criswell at uiuc.edu (John Criswell) Date: Mon, 20 Jul 2009 21:42:26 -0000 Subject: [llvm-commits] [poolalloc] r76482 - in /poolalloc/trunk/lib/PoolAllocate: PAMultipleGlobalPool.cpp PASimple.cpp PoolAllocate.cpp Message-ID: <200907202142.n6KLgSCa014768@zion.cs.uiuc.edu> Author: criswell Date: Mon Jul 20 16:42:23 2009 New Revision: 76482 URL: http://llvm.org/viewvc/llvm-project?rev=76482&view=rev Log: The Context field of the Pass class isn't being initialized correctly. Initialize it explicitly via the global context. Modified: poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp poolalloc/trunk/lib/PoolAllocate/PASimple.cpp poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Modified: poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp?rev=76482&r1=76481&r2=76482&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp Mon Jul 20 16:42:23 2009 @@ -81,6 +81,12 @@ bool PoolAllocateMultipleGlobalPool::runOnModule(Module &M) { currentModule = &M; if (M.begin() == M.end()) return false; + + // + // Get the context from the global context. + // + Context = &getGlobalContext(); + Graphs = &getAnalysis(); assert (Graphs && "No DSA pass available!\n"); Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=76482&r1=76481&r2=76482&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Mon Jul 20 16:42:23 2009 @@ -104,6 +104,11 @@ bool PoolAllocateSimple::runOnModule(Module &M) { if (M.begin() == M.end()) return false; + // + // Get the context from the global context. + // + Context = &getGlobalContext(); + // Get the Target Data information and the Graphs if (CompleteDSA) { Graphs = &getAnalysis(); Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=76482&r1=76481&r2=76482&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Mon Jul 20 16:42:23 2009 @@ -111,6 +111,11 @@ CurModule = &M; // + // Get the context from the global context. + // + Context = &getGlobalContext(); + + // // Get references to the DSA information. For SAFECode, we need Top-Down // DSA. For Automatic Pool Allocation only, we need Bottom-Up DSA. In all // cases, we need to use the Equivalence-Class version of DSA. From evan.cheng at apple.com Mon Jul 20 16:43:16 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 20 Jul 2009 14:43:16 -0700 Subject: [llvm-commits] [unladen-swallow] Re: Patch to allow the JITMemoryManager to allocate more blocks of memory In-Reply-To: <9a9942200907171125x50c2d277w6a330ee7bccf3566@mail.gmail.com> References: <9a9942200906231656r3fd098c6r9e3e53dffe7cf790@mail.gmail.com> <9a9942200906231659x2b73f65ap51207eb5eef56129@mail.gmail.com> <9a9942200906231705m4ec42d3drabd014f740867f28@mail.gmail.com> <718901DE-2AFB-4323-8204-4674B5F46B62@apple.com> <9a9942200907131657t37928039s53b674b52b62f191@mail.gmail.com> <2E6DAD9B-FED4-4A40-81ED-A2C81B4BDEF9@apple.com> <9a9942200907141139u2964c566r3e8e020968f74f49@mail.gmail.com> <9a9942200907171125x50c2d277w6a330ee7bccf3566@mail.gmail.com> Message-ID: <7BCCBD81-CCEC-4D62-864C-1FDA47225020@apple.com> On Jul 17, 2009, at 11:25 AM, Reid Kleckner wrote: > Here is the updated patch. I will commit the changes to > Support/Allocator.(h|cpp) as a separate patch, but I assume you'll > want to review all the changes here. It passes make check, modulo 7 > failures that look related to my old version of llvm-gcc. Looks good to me. I'll let someone else review the Allocator changes. Thanks, Evan > > Reid > > On Wed, Jul 15, 2009 at 10:41 PM, Evan Cheng > wrote: >> >> >> On Jul 14, 2009, at 11:39 AM, Reid Kleckner wrote: >> >>> On Mon, Jul 13, 2009 at 10:37 PM, Evan Cheng >>> wrote: >>>> >>>> Hi Reid, >>>> >>>> Thanks. A couple of comments. >>>> >>>> Can you change CheckInvariants() to return true / false and the >>>> error >>>> message by reference instead? >>> >>> Sure. That's nice because it makes the ostream deconstructor will >>> automatically flush things, whereas it didn't before. >>> >>>> + /// BumpAllocator - This is a simple memory allocator that >>>> simply >>>> bumps a >>>> + /// pointer forwards across a slab of memory until it runs >>>> out, at >>>> which >>>> + /// point it allocates a new slab. If the size of an >>>> allocation is >>>> above >>>> a >>>> + /// certain threshold, the allocator allocates a separate slab >>>> for it, >>>> to >>>> + /// avoid wasted space. We use this class to allocate >>>> function stubs >>>> and >>>> + /// global data structures. >>>> + class BumpAllocator { >>>> >>>> Is there a reason not to use the BumpPtrAllocator in Support/ >>>> Allocator.h? >>> >>> That allocator uses malloc. One of the things I was trying to do is >>> get all the code and globals laid out contiguously in memory by >>> using >>> the NearBlock parameter of sys::Memory::AllocateRWX. That isn't >>> particularly reliable, and it's not even supported on Windows. It >>> would still be nice to get all slab allocation centralized through >>> the >>> memory manager instead of through malloc, though. >>> >>> I could parameterize the allocator in Support to use either malloc >>> or >>> the JITMemoryManager, or I could just use mine or the one in Support >>> wholesale. Which would you prefer? >> >> How about changing the allocator in Support to use AllocateRWX? On >> Windows, >> can it fallback to malloc? >> >> Evan >>> >>>> + for (MemoryRangeHeader *Hdr = (MemoryRangeHeader*)Start, >>>> *LastHdr = >>>> NULL; >>>> + Start <= (char*)Hdr && (char*)Hdr < End; >>>> + Hdr = &Hdr->getBlockAfter()) { >>>> + if (Hdr->ThisAllocated == 0) { >>>> >>>> How about "if (!Hdr->ThisAllocated) continue;" to reduce >>>> indentation. >>>> Thanks, >>> >>> That can't be done, since the 'if' doesn't cover the entire body of >>> the for loop. I did notice that the 'else if' clause will never >>> execute because ThisAllocated is a one bit field, so I dropped that. >>> >>> Thanks for the review, >>> Reid >>> < >>> JITMemoryManager.diff >>> >_______________________________________________ >>> llvm-commits mailing list >>> llvm-commits at cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> >> > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From evan.cheng at apple.com Mon Jul 20 16:43:57 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 20 Jul 2009 14:43:57 -0700 Subject: [llvm-commits] [PATCH] Call MCE.processDebugLoc from the remaining Targets' emitters In-Reply-To: <0016e64642628b3689046eda1969@google.com> References: <0016e64642628b3689046eda1969@google.com> Message-ID: <905F33A6-07CF-413E-94CD-FD4D27C6B9BD@apple.com> Looks good. Evan On Jul 16, 2009, at 3:21 PM, jyasskin at gmail.com wrote: > Reviewers: , > > Description: > r76102 added the MachineCodeEmitter::processDebugLoc call and called > it > from the X86 Emitter. This patch extends that to the ARM, Alpha, and > PPC emitters, which I think is all of the targets that can write to a > MachineCodeEmitter. > > Please review this at http://codereview.appspot.com/95062 > > Affected files: > M lib/Target/ARM/ARMCodeEmitter.cpp > M lib/Target/Alpha/AlphaCodeEmitter.cpp > M lib/Target/PowerPC/PPCCodeEmitter.cpp > > > Index: lib/Target/PowerPC/PPCCodeEmitter.cpp > =================================================================== > --- lib/Target/PowerPC/PPCCodeEmitter.cpp (revision 76100) > +++ lib/Target/PowerPC/PPCCodeEmitter.cpp (working copy) > @@ -133,6 +133,7 @@ > > for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); > I != E; > ++I){ > const MachineInstr &MI = *I; > + MCE.processDebugLoc(MI.getDebugLoc()); > switch (MI.getOpcode()) { > default: > MCE.emitWordBE(getBinaryCodeForInstr(MI)); > @@ -275,4 +276,3 @@ > } > > #include "PPCGenCodeEmitter.inc" > - > Index: lib/Target/ARM/ARMCodeEmitter.cpp > =================================================================== > --- lib/Target/ARM/ARMCodeEmitter.cpp (revision 76100) > +++ lib/Target/ARM/ARMCodeEmitter.cpp (working copy) > @@ -337,6 +337,8 @@ > void Emitter::emitInstruction(const MachineInstr &MI) { > DOUT << "JIT: " << (void*)MCE.getCurrentPCValue() << ":\t" << MI; > > + MCE.processDebugLoc(MI.getDebugLoc()); > + > NumEmitted++; // Keep track of the # of mi's emitted > switch (MI.getDesc().TSFlags & ARMII::FormMask) { > default: { > @@ -1422,4 +1424,3 @@ > } > > #include "ARMGenCodeEmitter.inc" > - > Index: lib/Target/Alpha/AlphaCodeEmitter.cpp > =================================================================== > --- lib/Target/Alpha/AlphaCodeEmitter.cpp (revision 76100) > +++ lib/Target/Alpha/AlphaCodeEmitter.cpp (working copy) > @@ -72,8 +72,6 @@ > return "Alpha Machine Code Emitter"; > } > > - void emitInstruction(const MachineInstr &MI); > - > private: > void emitBasicBlock(MachineBasicBlock &MBB); > }; > @@ -118,6 +116,7 @@ > for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); > I != E; ++I) { > const MachineInstr &MI = *I; > + MCE.processDebugLoc(MI.getDebugLoc()); > switch(MI.getOpcode()) { > default: > MCE.emitWordLE(getBinaryCodeForInstr(*I)); > @@ -245,5 +244,3 @@ > } > > #include "AlphaGenCodeEmitter.inc" > - > - > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From evan.cheng at apple.com Mon Jul 20 16:46:42 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 20 Jul 2009 21:46:42 -0000 Subject: [llvm-commits] [llvm] r76485 - /llvm/trunk/test/CodeGen/ARM/2009-07-18-RewriterBug.ll Message-ID: <200907202146.n6KLkho2015172@zion.cs.uiuc.edu> Author: evancheng Date: Mon Jul 20 16:46:42 2009 New Revision: 76485 URL: http://llvm.org/viewvc/llvm-project?rev=76485&view=rev Log: Forgot this test earlier. Added: llvm/trunk/test/CodeGen/ARM/2009-07-18-RewriterBug.ll Added: llvm/trunk/test/CodeGen/ARM/2009-07-18-RewriterBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2009-07-18-RewriterBug.ll?rev=76485&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/ARM/2009-07-18-RewriterBug.ll (added) +++ llvm/trunk/test/CodeGen/ARM/2009-07-18-RewriterBug.ll Mon Jul 20 16:46:42 2009 @@ -0,0 +1,1323 @@ +; RUN: llvm-as < %s | llc -mtriple=armv6-apple-darwin10 -mattr=+vfp2 | grep fcmpezd | count 13 + + %struct.EDGE_PAIR = type { %struct.edge_rec*, %struct.edge_rec* } + %struct.VEC2 = type { double, double, double } + %struct.VERTEX = type { %struct.VEC2, %struct.VERTEX*, %struct.VERTEX* } + %struct.edge_rec = type { %struct.VERTEX*, %struct.edge_rec*, i32, i8* } + at avail_edge = internal global %struct.edge_rec* null ; <%struct.edge_rec**> [#uses=6] + at _2E_str7 = internal constant [21 x i8] c"ERROR: Only 1 point!\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[21 x i8]*> [#uses=1] + at llvm.used = appending global [1 x i8*] [i8* bitcast (void (%struct.EDGE_PAIR*, %struct.VERTEX*, %struct.VERTEX*)* @build_delaunay to i8*)], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] + +define arm_apcscc void @build_delaunay(%struct.EDGE_PAIR* noalias nocapture sret %agg.result, %struct.VERTEX* %tree, %struct.VERTEX* %extra) nounwind { +entry: + %delright = alloca %struct.EDGE_PAIR, align 8 ; <%struct.EDGE_PAIR*> [#uses=3] + %delleft = alloca %struct.EDGE_PAIR, align 8 ; <%struct.EDGE_PAIR*> [#uses=3] + %0 = icmp eq %struct.VERTEX* %tree, null ; [#uses=1] + br i1 %0, label %bb8, label %bb + +bb: ; preds = %entry + %1 = getelementptr %struct.VERTEX* %tree, i32 0, i32 2 ; <%struct.VERTEX**> [#uses=1] + %2 = load %struct.VERTEX** %1, align 4 ; <%struct.VERTEX*> [#uses=2] + %3 = icmp eq %struct.VERTEX* %2, null ; [#uses=1] + br i1 %3, label %bb7, label %bb1.i + +bb1.i: ; preds = %bb1.i, %bb + %tree_addr.0.i = phi %struct.VERTEX* [ %5, %bb1.i ], [ %tree, %bb ] ; <%struct.VERTEX*> [#uses=3] + %4 = getelementptr %struct.VERTEX* %tree_addr.0.i, i32 0, i32 1 ; <%struct.VERTEX**> [#uses=1] + %5 = load %struct.VERTEX** %4, align 4 ; <%struct.VERTEX*> [#uses=2] + %6 = icmp eq %struct.VERTEX* %5, null ; [#uses=1] + br i1 %6, label %get_low.exit, label %bb1.i + +get_low.exit: ; preds = %bb1.i + call arm_apcscc void @build_delaunay(%struct.EDGE_PAIR* noalias sret %delright, %struct.VERTEX* %2, %struct.VERTEX* %extra) nounwind + %7 = getelementptr %struct.VERTEX* %tree, i32 0, i32 1 ; <%struct.VERTEX**> [#uses=1] + %8 = load %struct.VERTEX** %7, align 4 ; <%struct.VERTEX*> [#uses=1] + call arm_apcscc void @build_delaunay(%struct.EDGE_PAIR* noalias sret %delleft, %struct.VERTEX* %8, %struct.VERTEX* %tree) nounwind + %9 = getelementptr %struct.EDGE_PAIR* %delleft, i32 0, i32 0 ; <%struct.edge_rec**> [#uses=1] + %10 = load %struct.edge_rec** %9, align 8 ; <%struct.edge_rec*> [#uses=2] + %11 = getelementptr %struct.EDGE_PAIR* %delleft, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %12 = load %struct.edge_rec** %11, align 4 ; <%struct.edge_rec*> [#uses=1] + %13 = getelementptr %struct.EDGE_PAIR* %delright, i32 0, i32 0 ; <%struct.edge_rec**> [#uses=1] + %14 = load %struct.edge_rec** %13, align 8 ; <%struct.edge_rec*> [#uses=1] + %15 = getelementptr %struct.EDGE_PAIR* %delright, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %16 = load %struct.edge_rec** %15, align 4 ; <%struct.edge_rec*> [#uses=2] + br label %bb.i + +bb.i: ; preds = %bb4.i, %get_low.exit + %rdi_addr.0.i = phi %struct.edge_rec* [ %14, %get_low.exit ], [ %72, %bb4.i ] ; <%struct.edge_rec*> [#uses=2] + %ldi_addr.1.i = phi %struct.edge_rec* [ %12, %get_low.exit ], [ %ldi_addr.0.i, %bb4.i ] ; <%struct.edge_rec*> [#uses=3] + %17 = getelementptr %struct.edge_rec* %rdi_addr.0.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %18 = load %struct.VERTEX** %17, align 4 ; <%struct.VERTEX*> [#uses=3] + %19 = ptrtoint %struct.edge_rec* %ldi_addr.1.i to i32 ; [#uses=1] + %20 = getelementptr %struct.VERTEX* %18, i32 0, i32 0, i32 0 ; [#uses=1] + %21 = load double* %20, align 4 ; [#uses=3] + %22 = getelementptr %struct.VERTEX* %18, i32 0, i32 0, i32 1 ; [#uses=1] + %23 = load double* %22, align 4 ; [#uses=3] + br label %bb2.i + +bb1.i1: ; preds = %bb2.i + %24 = ptrtoint %struct.edge_rec* %ldi_addr.0.i to i32 ; [#uses=2] + %25 = add i32 %24, 48 ; [#uses=1] + %26 = and i32 %25, 63 ; [#uses=1] + %27 = and i32 %24, -64 ; [#uses=1] + %28 = or i32 %26, %27 ; [#uses=1] + %29 = inttoptr i32 %28 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %30 = getelementptr %struct.edge_rec* %29, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %31 = load %struct.edge_rec** %30, align 4 ; <%struct.edge_rec*> [#uses=1] + %32 = ptrtoint %struct.edge_rec* %31 to i32 ; [#uses=2] + %33 = add i32 %32, 16 ; [#uses=1] + %34 = and i32 %33, 63 ; [#uses=1] + %35 = and i32 %32, -64 ; [#uses=1] + %36 = or i32 %34, %35 ; [#uses=2] + %37 = inttoptr i32 %36 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + br label %bb2.i + +bb2.i: ; preds = %bb1.i1, %bb.i + %ldi_addr.1.pn.i = phi %struct.edge_rec* [ %ldi_addr.1.i, %bb.i ], [ %37, %bb1.i1 ] ; <%struct.edge_rec*> [#uses=1] + %.pn6.in.in.i = phi i32 [ %19, %bb.i ], [ %36, %bb1.i1 ] ; [#uses=1] + %ldi_addr.0.i = phi %struct.edge_rec* [ %ldi_addr.1.i, %bb.i ], [ %37, %bb1.i1 ] ; <%struct.edge_rec*> [#uses=4] + %.pn6.in.i = xor i32 %.pn6.in.in.i, 32 ; [#uses=1] + %.pn6.i = inttoptr i32 %.pn6.in.i to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %t1.0.in.i = getelementptr %struct.edge_rec* %ldi_addr.1.pn.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %t2.0.in.i = getelementptr %struct.edge_rec* %.pn6.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %t1.0.i = load %struct.VERTEX** %t1.0.in.i ; <%struct.VERTEX*> [#uses=2] + %t2.0.i = load %struct.VERTEX** %t2.0.in.i ; <%struct.VERTEX*> [#uses=2] + %38 = getelementptr %struct.VERTEX* %t1.0.i, i32 0, i32 0, i32 0 ; [#uses=1] + %39 = load double* %38, align 4 ; [#uses=3] + %40 = getelementptr %struct.VERTEX* %t1.0.i, i32 0, i32 0, i32 1 ; [#uses=1] + %41 = load double* %40, align 4 ; [#uses=3] + %42 = getelementptr %struct.VERTEX* %t2.0.i, i32 0, i32 0, i32 0 ; [#uses=1] + %43 = load double* %42, align 4 ; [#uses=1] + %44 = getelementptr %struct.VERTEX* %t2.0.i, i32 0, i32 0, i32 1 ; [#uses=1] + %45 = load double* %44, align 4 ; [#uses=1] + %46 = fsub double %39, %21 ; [#uses=1] + %47 = fsub double %45, %23 ; [#uses=1] + %48 = fmul double %46, %47 ; [#uses=1] + %49 = fsub double %43, %21 ; [#uses=1] + %50 = fsub double %41, %23 ; [#uses=1] + %51 = fmul double %49, %50 ; [#uses=1] + %52 = fsub double %48, %51 ; [#uses=1] + %53 = fcmp ogt double %52, 0.000000e+00 ; [#uses=1] + br i1 %53, label %bb1.i1, label %bb3.i + +bb3.i: ; preds = %bb2.i + %54 = ptrtoint %struct.edge_rec* %rdi_addr.0.i to i32 ; [#uses=1] + %55 = xor i32 %54, 32 ; [#uses=3] + %56 = inttoptr i32 %55 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %57 = getelementptr %struct.edge_rec* %56, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %58 = load %struct.VERTEX** %57, align 4 ; <%struct.VERTEX*> [#uses=2] + %59 = getelementptr %struct.VERTEX* %58, i32 0, i32 0, i32 0 ; [#uses=1] + %60 = load double* %59, align 4 ; [#uses=1] + %61 = getelementptr %struct.VERTEX* %58, i32 0, i32 0, i32 1 ; [#uses=1] + %62 = load double* %61, align 4 ; [#uses=1] + %63 = fsub double %60, %39 ; [#uses=1] + %64 = fsub double %23, %41 ; [#uses=1] + %65 = fmul double %63, %64 ; [#uses=1] + %66 = fsub double %21, %39 ; [#uses=1] + %67 = fsub double %62, %41 ; [#uses=1] + %68 = fmul double %66, %67 ; [#uses=1] + %69 = fsub double %65, %68 ; [#uses=1] + %70 = fcmp ogt double %69, 0.000000e+00 ; [#uses=1] + br i1 %70, label %bb4.i, label %bb5.i + +bb4.i: ; preds = %bb3.i + %71 = getelementptr %struct.edge_rec* %56, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %72 = load %struct.edge_rec** %71, align 4 ; <%struct.edge_rec*> [#uses=1] + br label %bb.i + +bb5.i: ; preds = %bb3.i + %73 = add i32 %55, 48 ; [#uses=1] + %74 = and i32 %73, 63 ; [#uses=1] + %75 = and i32 %55, -64 ; [#uses=1] + %76 = or i32 %74, %75 ; [#uses=1] + %77 = inttoptr i32 %76 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %78 = getelementptr %struct.edge_rec* %77, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %79 = load %struct.edge_rec** %78, align 4 ; <%struct.edge_rec*> [#uses=1] + %80 = ptrtoint %struct.edge_rec* %79 to i32 ; [#uses=2] + %81 = add i32 %80, 16 ; [#uses=1] + %82 = and i32 %81, 63 ; [#uses=1] + %83 = and i32 %80, -64 ; [#uses=1] + %84 = or i32 %82, %83 ; [#uses=1] + %85 = inttoptr i32 %84 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %86 = getelementptr %struct.edge_rec* %ldi_addr.0.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %87 = load %struct.VERTEX** %86, align 4 ; <%struct.VERTEX*> [#uses=1] + %88 = call arm_apcscc %struct.edge_rec* @alloc_edge() nounwind ; <%struct.edge_rec*> [#uses=6] + %89 = getelementptr %struct.edge_rec* %88, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=4] + store %struct.edge_rec* %88, %struct.edge_rec** %89, align 4 + %90 = getelementptr %struct.edge_rec* %88, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=2] + store %struct.VERTEX* %18, %struct.VERTEX** %90, align 4 + %91 = ptrtoint %struct.edge_rec* %88 to i32 ; [#uses=5] + %92 = add i32 %91, 16 ; [#uses=2] + %93 = inttoptr i32 %92 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %94 = add i32 %91, 48 ; [#uses=1] + %95 = inttoptr i32 %94 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %96 = getelementptr %struct.edge_rec* %93, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %95, %struct.edge_rec** %96, align 4 + %97 = add i32 %91, 32 ; [#uses=1] + %98 = inttoptr i32 %97 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=3] + %99 = getelementptr %struct.edge_rec* %98, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %98, %struct.edge_rec** %99, align 4 + %100 = getelementptr %struct.edge_rec* %98, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + store %struct.VERTEX* %87, %struct.VERTEX** %100, align 4 + %101 = getelementptr %struct.edge_rec* %95, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %93, %struct.edge_rec** %101, align 4 + %102 = load %struct.edge_rec** %89, align 4 ; <%struct.edge_rec*> [#uses=1] + %103 = ptrtoint %struct.edge_rec* %102 to i32 ; [#uses=2] + %104 = add i32 %103, 16 ; [#uses=1] + %105 = and i32 %104, 63 ; [#uses=1] + %106 = and i32 %103, -64 ; [#uses=1] + %107 = or i32 %105, %106 ; [#uses=1] + %108 = inttoptr i32 %107 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %109 = getelementptr %struct.edge_rec* %85, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %110 = load %struct.edge_rec** %109, align 4 ; <%struct.edge_rec*> [#uses=1] + %111 = ptrtoint %struct.edge_rec* %110 to i32 ; [#uses=2] + %112 = add i32 %111, 16 ; [#uses=1] + %113 = and i32 %112, 63 ; [#uses=1] + %114 = and i32 %111, -64 ; [#uses=1] + %115 = or i32 %113, %114 ; [#uses=1] + %116 = inttoptr i32 %115 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %117 = getelementptr %struct.edge_rec* %116, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %118 = load %struct.edge_rec** %117, align 4 ; <%struct.edge_rec*> [#uses=1] + %119 = getelementptr %struct.edge_rec* %108, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %120 = load %struct.edge_rec** %119, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %118, %struct.edge_rec** %119, align 4 + store %struct.edge_rec* %120, %struct.edge_rec** %117, align 4 + %121 = load %struct.edge_rec** %89, align 4 ; <%struct.edge_rec*> [#uses=1] + %122 = load %struct.edge_rec** %109, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %121, %struct.edge_rec** %109, align 4 + store %struct.edge_rec* %122, %struct.edge_rec** %89, align 4 + %123 = xor i32 %91, 32 ; [#uses=1] + %124 = inttoptr i32 %123 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=3] + %125 = getelementptr %struct.edge_rec* %124, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %126 = load %struct.edge_rec** %125, align 4 ; <%struct.edge_rec*> [#uses=1] + %127 = ptrtoint %struct.edge_rec* %126 to i32 ; [#uses=2] + %128 = add i32 %127, 16 ; [#uses=1] + %129 = and i32 %128, 63 ; [#uses=1] + %130 = and i32 %127, -64 ; [#uses=1] + %131 = or i32 %129, %130 ; [#uses=1] + %132 = inttoptr i32 %131 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %133 = getelementptr %struct.edge_rec* %ldi_addr.0.i, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %134 = load %struct.edge_rec** %133, align 4 ; <%struct.edge_rec*> [#uses=1] + %135 = ptrtoint %struct.edge_rec* %134 to i32 ; [#uses=2] + %136 = add i32 %135, 16 ; [#uses=1] + %137 = and i32 %136, 63 ; [#uses=1] + %138 = and i32 %135, -64 ; [#uses=1] + %139 = or i32 %137, %138 ; [#uses=1] + %140 = inttoptr i32 %139 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %141 = getelementptr %struct.edge_rec* %140, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %142 = load %struct.edge_rec** %141, align 4 ; <%struct.edge_rec*> [#uses=1] + %143 = getelementptr %struct.edge_rec* %132, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %144 = load %struct.edge_rec** %143, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %142, %struct.edge_rec** %143, align 4 + store %struct.edge_rec* %144, %struct.edge_rec** %141, align 4 + %145 = load %struct.edge_rec** %125, align 4 ; <%struct.edge_rec*> [#uses=1] + %146 = load %struct.edge_rec** %133, align 4 ; <%struct.edge_rec*> [#uses=2] + store %struct.edge_rec* %145, %struct.edge_rec** %133, align 4 + store %struct.edge_rec* %146, %struct.edge_rec** %125, align 4 + %147 = and i32 %92, 63 ; [#uses=1] + %148 = and i32 %91, -64 ; [#uses=1] + %149 = or i32 %147, %148 ; [#uses=1] + %150 = inttoptr i32 %149 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %151 = getelementptr %struct.edge_rec* %150, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %152 = load %struct.edge_rec** %151, align 4 ; <%struct.edge_rec*> [#uses=1] + %153 = ptrtoint %struct.edge_rec* %152 to i32 ; [#uses=2] + %154 = add i32 %153, 16 ; [#uses=1] + %155 = and i32 %154, 63 ; [#uses=1] + %156 = and i32 %153, -64 ; [#uses=1] + %157 = or i32 %155, %156 ; [#uses=1] + %158 = inttoptr i32 %157 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %159 = load %struct.VERTEX** %90, align 4 ; <%struct.VERTEX*> [#uses=1] + %160 = getelementptr %struct.edge_rec* %124, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %161 = load %struct.VERTEX** %160, align 4 ; <%struct.VERTEX*> [#uses=1] + %162 = getelementptr %struct.edge_rec* %16, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %163 = load %struct.VERTEX** %162, align 4 ; <%struct.VERTEX*> [#uses=1] + %164 = icmp eq %struct.VERTEX* %163, %159 ; [#uses=1] + %rdo_addr.0.i = select i1 %164, %struct.edge_rec* %88, %struct.edge_rec* %16 ; <%struct.edge_rec*> [#uses=3] + %165 = getelementptr %struct.edge_rec* %10, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %166 = load %struct.VERTEX** %165, align 4 ; <%struct.VERTEX*> [#uses=1] + %167 = icmp eq %struct.VERTEX* %166, %161 ; [#uses=1] + %ldo_addr.0.ph.i = select i1 %167, %struct.edge_rec* %124, %struct.edge_rec* %10 ; <%struct.edge_rec*> [#uses=3] + br label %bb9.i + +bb9.i: ; preds = %bb25.i, %bb24.i, %bb5.i + %lcand.2.i = phi %struct.edge_rec* [ %146, %bb5.i ], [ %lcand.1.i, %bb24.i ], [ %739, %bb25.i ] ; <%struct.edge_rec*> [#uses=5] + %rcand.2.i = phi %struct.edge_rec* [ %158, %bb5.i ], [ %666, %bb24.i ], [ %rcand.1.i, %bb25.i ] ; <%struct.edge_rec*> [#uses=5] + %basel.0.i = phi %struct.edge_rec* [ %88, %bb5.i ], [ %595, %bb24.i ], [ %716, %bb25.i ] ; <%struct.edge_rec*> [#uses=2] + %168 = getelementptr %struct.edge_rec* %lcand.2.i, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %169 = load %struct.edge_rec** %168, align 4 ; <%struct.edge_rec*> [#uses=3] + %170 = getelementptr %struct.edge_rec* %basel.0.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=3] + %171 = load %struct.VERTEX** %170, align 4 ; <%struct.VERTEX*> [#uses=4] + %172 = ptrtoint %struct.edge_rec* %basel.0.i to i32 ; [#uses=3] + %173 = xor i32 %172, 32 ; [#uses=1] + %174 = inttoptr i32 %173 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %175 = getelementptr %struct.edge_rec* %174, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=3] + %176 = load %struct.VERTEX** %175, align 4 ; <%struct.VERTEX*> [#uses=3] + %177 = ptrtoint %struct.edge_rec* %169 to i32 ; [#uses=1] + %178 = xor i32 %177, 32 ; [#uses=1] + %179 = inttoptr i32 %178 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %180 = getelementptr %struct.edge_rec* %179, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %181 = load %struct.VERTEX** %180, align 4 ; <%struct.VERTEX*> [#uses=2] + %182 = getelementptr %struct.VERTEX* %171, i32 0, i32 0, i32 0 ; [#uses=2] + %183 = load double* %182, align 4 ; [#uses=2] + %184 = getelementptr %struct.VERTEX* %171, i32 0, i32 0, i32 1 ; [#uses=2] + %185 = load double* %184, align 4 ; [#uses=2] + %186 = getelementptr %struct.VERTEX* %181, i32 0, i32 0, i32 0 ; [#uses=1] + %187 = load double* %186, align 4 ; [#uses=1] + %188 = getelementptr %struct.VERTEX* %181, i32 0, i32 0, i32 1 ; [#uses=1] + %189 = load double* %188, align 4 ; [#uses=1] + %190 = getelementptr %struct.VERTEX* %176, i32 0, i32 0, i32 0 ; [#uses=1] + %191 = load double* %190, align 4 ; [#uses=2] + %192 = getelementptr %struct.VERTEX* %176, i32 0, i32 0, i32 1 ; [#uses=1] + %193 = load double* %192, align 4 ; [#uses=2] + %194 = fsub double %183, %191 ; [#uses=1] + %195 = fsub double %189, %193 ; [#uses=1] + %196 = fmul double %194, %195 ; [#uses=1] + %197 = fsub double %187, %191 ; [#uses=1] + %198 = fsub double %185, %193 ; [#uses=1] + %199 = fmul double %197, %198 ; [#uses=1] + %200 = fsub double %196, %199 ; [#uses=1] + %201 = fcmp ogt double %200, 0.000000e+00 ; [#uses=1] + br i1 %201, label %bb10.i, label %bb13.i + +bb10.i: ; preds = %bb9.i + %202 = getelementptr %struct.VERTEX* %171, i32 0, i32 0, i32 2 ; [#uses=1] + %avail_edge.promoted25 = load %struct.edge_rec** @avail_edge ; <%struct.edge_rec*> [#uses=1] + br label %bb12.i + +bb11.i: ; preds = %bb12.i + %203 = ptrtoint %struct.edge_rec* %lcand.0.i to i32 ; [#uses=3] + %204 = add i32 %203, 16 ; [#uses=1] + %205 = and i32 %204, 63 ; [#uses=1] + %206 = and i32 %203, -64 ; [#uses=3] + %207 = or i32 %205, %206 ; [#uses=1] + %208 = inttoptr i32 %207 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %209 = getelementptr %struct.edge_rec* %208, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %210 = load %struct.edge_rec** %209, align 4 ; <%struct.edge_rec*> [#uses=1] + %211 = ptrtoint %struct.edge_rec* %210 to i32 ; [#uses=2] + %212 = add i32 %211, 16 ; [#uses=1] + %213 = and i32 %212, 63 ; [#uses=1] + %214 = and i32 %211, -64 ; [#uses=1] + %215 = or i32 %213, %214 ; [#uses=1] + %216 = inttoptr i32 %215 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %217 = getelementptr %struct.edge_rec* %lcand.0.i, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %218 = load %struct.edge_rec** %217, align 4 ; <%struct.edge_rec*> [#uses=1] + %219 = ptrtoint %struct.edge_rec* %218 to i32 ; [#uses=2] + %220 = add i32 %219, 16 ; [#uses=1] + %221 = and i32 %220, 63 ; [#uses=1] + %222 = and i32 %219, -64 ; [#uses=1] + %223 = or i32 %221, %222 ; [#uses=1] + %224 = inttoptr i32 %223 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %225 = getelementptr %struct.edge_rec* %216, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %226 = load %struct.edge_rec** %225, align 4 ; <%struct.edge_rec*> [#uses=1] + %227 = ptrtoint %struct.edge_rec* %226 to i32 ; [#uses=2] + %228 = add i32 %227, 16 ; [#uses=1] + %229 = and i32 %228, 63 ; [#uses=1] + %230 = and i32 %227, -64 ; [#uses=1] + %231 = or i32 %229, %230 ; [#uses=1] + %232 = inttoptr i32 %231 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %233 = getelementptr %struct.edge_rec* %232, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %234 = load %struct.edge_rec** %233, align 4 ; <%struct.edge_rec*> [#uses=1] + %235 = getelementptr %struct.edge_rec* %224, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %236 = load %struct.edge_rec** %235, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %234, %struct.edge_rec** %235, align 4 + store %struct.edge_rec* %236, %struct.edge_rec** %233, align 4 + %237 = load %struct.edge_rec** %217, align 4 ; <%struct.edge_rec*> [#uses=1] + %238 = load %struct.edge_rec** %225, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %237, %struct.edge_rec** %225, align 4 + store %struct.edge_rec* %238, %struct.edge_rec** %217, align 4 + %239 = xor i32 %203, 32 ; [#uses=2] + %240 = add i32 %239, 16 ; [#uses=1] + %241 = and i32 %240, 63 ; [#uses=1] + %242 = or i32 %241, %206 ; [#uses=1] + %243 = inttoptr i32 %242 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %244 = getelementptr %struct.edge_rec* %243, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %245 = load %struct.edge_rec** %244, align 4 ; <%struct.edge_rec*> [#uses=1] + %246 = ptrtoint %struct.edge_rec* %245 to i32 ; [#uses=2] + %247 = add i32 %246, 16 ; [#uses=1] + %248 = and i32 %247, 63 ; [#uses=1] + %249 = and i32 %246, -64 ; [#uses=1] + %250 = or i32 %248, %249 ; [#uses=1] + %251 = inttoptr i32 %250 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %252 = inttoptr i32 %239 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %253 = getelementptr %struct.edge_rec* %252, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %254 = load %struct.edge_rec** %253, align 4 ; <%struct.edge_rec*> [#uses=1] + %255 = ptrtoint %struct.edge_rec* %254 to i32 ; [#uses=2] + %256 = add i32 %255, 16 ; [#uses=1] + %257 = and i32 %256, 63 ; [#uses=1] + %258 = and i32 %255, -64 ; [#uses=1] + %259 = or i32 %257, %258 ; [#uses=1] + %260 = inttoptr i32 %259 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %261 = getelementptr %struct.edge_rec* %251, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %262 = load %struct.edge_rec** %261, align 4 ; <%struct.edge_rec*> [#uses=1] + %263 = ptrtoint %struct.edge_rec* %262 to i32 ; [#uses=2] + %264 = add i32 %263, 16 ; [#uses=1] + %265 = and i32 %264, 63 ; [#uses=1] + %266 = and i32 %263, -64 ; [#uses=1] + %267 = or i32 %265, %266 ; [#uses=1] + %268 = inttoptr i32 %267 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %269 = getelementptr %struct.edge_rec* %268, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %270 = load %struct.edge_rec** %269, align 4 ; <%struct.edge_rec*> [#uses=1] + %271 = getelementptr %struct.edge_rec* %260, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %272 = load %struct.edge_rec** %271, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %270, %struct.edge_rec** %271, align 4 + store %struct.edge_rec* %272, %struct.edge_rec** %269, align 4 + %273 = load %struct.edge_rec** %253, align 4 ; <%struct.edge_rec*> [#uses=1] + %274 = load %struct.edge_rec** %261, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %273, %struct.edge_rec** %261, align 4 + store %struct.edge_rec* %274, %struct.edge_rec** %253, align 4 + %275 = inttoptr i32 %206 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %276 = getelementptr %struct.edge_rec* %275, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %avail_edge.tmp.026, %struct.edge_rec** %276, align 4 + %277 = getelementptr %struct.edge_rec* %t.0.i, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %278 = load %struct.edge_rec** %277, align 4 ; <%struct.edge_rec*> [#uses=2] + %.pre.i = load double* %182, align 4 ; [#uses=1] + %.pre22.i = load double* %184, align 4 ; [#uses=1] + br label %bb12.i + +bb12.i: ; preds = %bb11.i, %bb10.i + %avail_edge.tmp.026 = phi %struct.edge_rec* [ %avail_edge.promoted25, %bb10.i ], [ %275, %bb11.i ] ; <%struct.edge_rec*> [#uses=2] + %279 = phi double [ %.pre22.i, %bb11.i ], [ %185, %bb10.i ] ; [#uses=3] + %280 = phi double [ %.pre.i, %bb11.i ], [ %183, %bb10.i ] ; [#uses=3] + %lcand.0.i = phi %struct.edge_rec* [ %lcand.2.i, %bb10.i ], [ %t.0.i, %bb11.i ] ; <%struct.edge_rec*> [#uses=3] + %t.0.i = phi %struct.edge_rec* [ %169, %bb10.i ], [ %278, %bb11.i ] ; <%struct.edge_rec*> [#uses=4] + %.pn5.in.in.in.i = phi %struct.edge_rec* [ %lcand.2.i, %bb10.i ], [ %t.0.i, %bb11.i ] ; <%struct.edge_rec*> [#uses=1] + %.pn4.in.in.in.i = phi %struct.edge_rec* [ %169, %bb10.i ], [ %278, %bb11.i ] ; <%struct.edge_rec*> [#uses=1] + %lcand.2.pn.i = phi %struct.edge_rec* [ %lcand.2.i, %bb10.i ], [ %t.0.i, %bb11.i ] ; <%struct.edge_rec*> [#uses=1] + %.pn5.in.in.i = ptrtoint %struct.edge_rec* %.pn5.in.in.in.i to i32 ; [#uses=1] + %.pn4.in.in.i = ptrtoint %struct.edge_rec* %.pn4.in.in.in.i to i32 ; [#uses=1] + %.pn5.in.i = xor i32 %.pn5.in.in.i, 32 ; [#uses=1] + %.pn4.in.i = xor i32 %.pn4.in.in.i, 32 ; [#uses=1] + %.pn5.i = inttoptr i32 %.pn5.in.i to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %.pn4.i = inttoptr i32 %.pn4.in.i to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %v1.0.in.i = getelementptr %struct.edge_rec* %.pn5.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %v2.0.in.i = getelementptr %struct.edge_rec* %.pn4.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %v3.0.in.i = getelementptr %struct.edge_rec* %lcand.2.pn.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %v1.0.i = load %struct.VERTEX** %v1.0.in.i ; <%struct.VERTEX*> [#uses=3] + %v2.0.i = load %struct.VERTEX** %v2.0.in.i ; <%struct.VERTEX*> [#uses=3] + %v3.0.i = load %struct.VERTEX** %v3.0.in.i ; <%struct.VERTEX*> [#uses=3] + %281 = load double* %202, align 4 ; [#uses=3] + %282 = getelementptr %struct.VERTEX* %v1.0.i, i32 0, i32 0, i32 0 ; [#uses=1] + %283 = load double* %282, align 4 ; [#uses=1] + %284 = fsub double %283, %280 ; [#uses=2] + %285 = getelementptr %struct.VERTEX* %v1.0.i, i32 0, i32 0, i32 1 ; [#uses=1] + %286 = load double* %285, align 4 ; [#uses=1] + %287 = fsub double %286, %279 ; [#uses=2] + %288 = getelementptr %struct.VERTEX* %v1.0.i, i32 0, i32 0, i32 2 ; [#uses=1] + %289 = load double* %288, align 4 ; [#uses=1] + %290 = getelementptr %struct.VERTEX* %v2.0.i, i32 0, i32 0, i32 0 ; [#uses=1] + %291 = load double* %290, align 4 ; [#uses=1] + %292 = fsub double %291, %280 ; [#uses=2] + %293 = getelementptr %struct.VERTEX* %v2.0.i, i32 0, i32 0, i32 1 ; [#uses=1] + %294 = load double* %293, align 4 ; [#uses=1] + %295 = fsub double %294, %279 ; [#uses=2] + %296 = getelementptr %struct.VERTEX* %v2.0.i, i32 0, i32 0, i32 2 ; [#uses=1] + %297 = load double* %296, align 4 ; [#uses=1] + %298 = getelementptr %struct.VERTEX* %v3.0.i, i32 0, i32 0, i32 0 ; [#uses=1] + %299 = load double* %298, align 4 ; [#uses=1] + %300 = fsub double %299, %280 ; [#uses=2] + %301 = getelementptr %struct.VERTEX* %v3.0.i, i32 0, i32 0, i32 1 ; [#uses=1] + %302 = load double* %301, align 4 ; [#uses=1] + %303 = fsub double %302, %279 ; [#uses=2] + %304 = getelementptr %struct.VERTEX* %v3.0.i, i32 0, i32 0, i32 2 ; [#uses=1] + %305 = load double* %304, align 4 ; [#uses=1] + %306 = fsub double %289, %281 ; [#uses=1] + %307 = fmul double %292, %303 ; [#uses=1] + %308 = fmul double %295, %300 ; [#uses=1] + %309 = fsub double %307, %308 ; [#uses=1] + %310 = fmul double %306, %309 ; [#uses=1] + %311 = fsub double %297, %281 ; [#uses=1] + %312 = fmul double %300, %287 ; [#uses=1] + %313 = fmul double %303, %284 ; [#uses=1] + %314 = fsub double %312, %313 ; [#uses=1] + %315 = fmul double %311, %314 ; [#uses=1] + %316 = fadd double %315, %310 ; [#uses=1] + %317 = fsub double %305, %281 ; [#uses=1] + %318 = fmul double %284, %295 ; [#uses=1] + %319 = fmul double %287, %292 ; [#uses=1] + %320 = fsub double %318, %319 ; [#uses=1] + %321 = fmul double %317, %320 ; [#uses=1] + %322 = fadd double %321, %316 ; [#uses=1] + %323 = fcmp ogt double %322, 0.000000e+00 ; [#uses=1] + br i1 %323, label %bb11.i, label %bb13.loopexit.i + +bb13.loopexit.i: ; preds = %bb12.i + store %struct.edge_rec* %avail_edge.tmp.026, %struct.edge_rec** @avail_edge + %.pre23.i = load %struct.VERTEX** %170, align 4 ; <%struct.VERTEX*> [#uses=1] + %.pre24.i = load %struct.VERTEX** %175, align 4 ; <%struct.VERTEX*> [#uses=1] + br label %bb13.i + +bb13.i: ; preds = %bb13.loopexit.i, %bb9.i + %324 = phi %struct.VERTEX* [ %.pre24.i, %bb13.loopexit.i ], [ %176, %bb9.i ] ; <%struct.VERTEX*> [#uses=4] + %325 = phi %struct.VERTEX* [ %.pre23.i, %bb13.loopexit.i ], [ %171, %bb9.i ] ; <%struct.VERTEX*> [#uses=3] + %lcand.1.i = phi %struct.edge_rec* [ %lcand.0.i, %bb13.loopexit.i ], [ %lcand.2.i, %bb9.i ] ; <%struct.edge_rec*> [#uses=3] + %326 = ptrtoint %struct.edge_rec* %rcand.2.i to i32 ; [#uses=2] + %327 = add i32 %326, 16 ; [#uses=1] + %328 = and i32 %327, 63 ; [#uses=1] + %329 = and i32 %326, -64 ; [#uses=1] + %330 = or i32 %328, %329 ; [#uses=1] + %331 = inttoptr i32 %330 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %332 = getelementptr %struct.edge_rec* %331, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %333 = load %struct.edge_rec** %332, align 4 ; <%struct.edge_rec*> [#uses=1] + %334 = ptrtoint %struct.edge_rec* %333 to i32 ; [#uses=2] + %335 = add i32 %334, 16 ; [#uses=1] + %336 = and i32 %335, 63 ; [#uses=1] + %337 = and i32 %334, -64 ; [#uses=1] + %338 = or i32 %336, %337 ; [#uses=3] + %339 = xor i32 %338, 32 ; [#uses=1] + %340 = inttoptr i32 %339 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %341 = getelementptr %struct.edge_rec* %340, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %342 = load %struct.VERTEX** %341, align 4 ; <%struct.VERTEX*> [#uses=2] + %343 = getelementptr %struct.VERTEX* %325, i32 0, i32 0, i32 0 ; [#uses=1] + %344 = load double* %343, align 4 ; [#uses=1] + %345 = getelementptr %struct.VERTEX* %325, i32 0, i32 0, i32 1 ; [#uses=1] + %346 = load double* %345, align 4 ; [#uses=1] + %347 = getelementptr %struct.VERTEX* %342, i32 0, i32 0, i32 0 ; [#uses=1] + %348 = load double* %347, align 4 ; [#uses=1] + %349 = getelementptr %struct.VERTEX* %342, i32 0, i32 0, i32 1 ; [#uses=1] + %350 = load double* %349, align 4 ; [#uses=1] + %351 = getelementptr %struct.VERTEX* %324, i32 0, i32 0, i32 0 ; [#uses=2] + %352 = load double* %351, align 4 ; [#uses=3] + %353 = getelementptr %struct.VERTEX* %324, i32 0, i32 0, i32 1 ; [#uses=2] + %354 = load double* %353, align 4 ; [#uses=3] + %355 = fsub double %344, %352 ; [#uses=1] + %356 = fsub double %350, %354 ; [#uses=1] + %357 = fmul double %355, %356 ; [#uses=1] + %358 = fsub double %348, %352 ; [#uses=1] + %359 = fsub double %346, %354 ; [#uses=1] + %360 = fmul double %358, %359 ; [#uses=1] + %361 = fsub double %357, %360 ; [#uses=1] + %362 = fcmp ogt double %361, 0.000000e+00 ; [#uses=1] + br i1 %362, label %bb14.i, label %bb17.i + +bb14.i: ; preds = %bb13.i + %363 = getelementptr %struct.VERTEX* %324, i32 0, i32 0, i32 2 ; [#uses=1] + %avail_edge.promoted = load %struct.edge_rec** @avail_edge ; <%struct.edge_rec*> [#uses=1] + br label %bb16.i + +bb15.i: ; preds = %bb16.i + %364 = ptrtoint %struct.edge_rec* %rcand.0.i to i32 ; [#uses=3] + %365 = add i32 %364, 16 ; [#uses=1] + %366 = and i32 %365, 63 ; [#uses=1] + %367 = and i32 %364, -64 ; [#uses=3] + %368 = or i32 %366, %367 ; [#uses=1] + %369 = inttoptr i32 %368 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %370 = getelementptr %struct.edge_rec* %369, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %371 = load %struct.edge_rec** %370, align 4 ; <%struct.edge_rec*> [#uses=1] + %372 = ptrtoint %struct.edge_rec* %371 to i32 ; [#uses=2] + %373 = add i32 %372, 16 ; [#uses=1] + %374 = and i32 %373, 63 ; [#uses=1] + %375 = and i32 %372, -64 ; [#uses=1] + %376 = or i32 %374, %375 ; [#uses=1] + %377 = inttoptr i32 %376 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %378 = getelementptr %struct.edge_rec* %rcand.0.i, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %379 = load %struct.edge_rec** %378, align 4 ; <%struct.edge_rec*> [#uses=1] + %380 = ptrtoint %struct.edge_rec* %379 to i32 ; [#uses=2] + %381 = add i32 %380, 16 ; [#uses=1] + %382 = and i32 %381, 63 ; [#uses=1] + %383 = and i32 %380, -64 ; [#uses=1] + %384 = or i32 %382, %383 ; [#uses=1] + %385 = inttoptr i32 %384 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %386 = getelementptr %struct.edge_rec* %377, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %387 = load %struct.edge_rec** %386, align 4 ; <%struct.edge_rec*> [#uses=1] + %388 = ptrtoint %struct.edge_rec* %387 to i32 ; [#uses=2] + %389 = add i32 %388, 16 ; [#uses=1] + %390 = and i32 %389, 63 ; [#uses=1] + %391 = and i32 %388, -64 ; [#uses=1] + %392 = or i32 %390, %391 ; [#uses=1] + %393 = inttoptr i32 %392 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %394 = getelementptr %struct.edge_rec* %393, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %395 = load %struct.edge_rec** %394, align 4 ; <%struct.edge_rec*> [#uses=1] + %396 = getelementptr %struct.edge_rec* %385, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %397 = load %struct.edge_rec** %396, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %395, %struct.edge_rec** %396, align 4 + store %struct.edge_rec* %397, %struct.edge_rec** %394, align 4 + %398 = load %struct.edge_rec** %378, align 4 ; <%struct.edge_rec*> [#uses=1] + %399 = load %struct.edge_rec** %386, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %398, %struct.edge_rec** %386, align 4 + store %struct.edge_rec* %399, %struct.edge_rec** %378, align 4 + %400 = xor i32 %364, 32 ; [#uses=2] + %401 = add i32 %400, 16 ; [#uses=1] + %402 = and i32 %401, 63 ; [#uses=1] + %403 = or i32 %402, %367 ; [#uses=1] + %404 = inttoptr i32 %403 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %405 = getelementptr %struct.edge_rec* %404, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %406 = load %struct.edge_rec** %405, align 4 ; <%struct.edge_rec*> [#uses=1] + %407 = ptrtoint %struct.edge_rec* %406 to i32 ; [#uses=2] + %408 = add i32 %407, 16 ; [#uses=1] + %409 = and i32 %408, 63 ; [#uses=1] + %410 = and i32 %407, -64 ; [#uses=1] + %411 = or i32 %409, %410 ; [#uses=1] + %412 = inttoptr i32 %411 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %413 = inttoptr i32 %400 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %414 = getelementptr %struct.edge_rec* %413, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %415 = load %struct.edge_rec** %414, align 4 ; <%struct.edge_rec*> [#uses=1] + %416 = ptrtoint %struct.edge_rec* %415 to i32 ; [#uses=2] + %417 = add i32 %416, 16 ; [#uses=1] + %418 = and i32 %417, 63 ; [#uses=1] + %419 = and i32 %416, -64 ; [#uses=1] + %420 = or i32 %418, %419 ; [#uses=1] + %421 = inttoptr i32 %420 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %422 = getelementptr %struct.edge_rec* %412, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %423 = load %struct.edge_rec** %422, align 4 ; <%struct.edge_rec*> [#uses=1] + %424 = ptrtoint %struct.edge_rec* %423 to i32 ; [#uses=2] + %425 = add i32 %424, 16 ; [#uses=1] + %426 = and i32 %425, 63 ; [#uses=1] + %427 = and i32 %424, -64 ; [#uses=1] + %428 = or i32 %426, %427 ; [#uses=1] + %429 = inttoptr i32 %428 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %430 = getelementptr %struct.edge_rec* %429, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %431 = load %struct.edge_rec** %430, align 4 ; <%struct.edge_rec*> [#uses=1] + %432 = getelementptr %struct.edge_rec* %421, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %433 = load %struct.edge_rec** %432, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %431, %struct.edge_rec** %432, align 4 + store %struct.edge_rec* %433, %struct.edge_rec** %430, align 4 + %434 = load %struct.edge_rec** %414, align 4 ; <%struct.edge_rec*> [#uses=1] + %435 = load %struct.edge_rec** %422, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %434, %struct.edge_rec** %422, align 4 + store %struct.edge_rec* %435, %struct.edge_rec** %414, align 4 + %436 = inttoptr i32 %367 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %437 = getelementptr %struct.edge_rec* %436, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %avail_edge.tmp.0, %struct.edge_rec** %437, align 4 + %438 = add i32 %t.1.in.i, 16 ; [#uses=1] + %439 = and i32 %438, 63 ; [#uses=1] + %440 = and i32 %t.1.in.i, -64 ; [#uses=1] + %441 = or i32 %439, %440 ; [#uses=1] + %442 = inttoptr i32 %441 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %443 = getelementptr %struct.edge_rec* %442, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %444 = load %struct.edge_rec** %443, align 4 ; <%struct.edge_rec*> [#uses=1] + %445 = ptrtoint %struct.edge_rec* %444 to i32 ; [#uses=2] + %446 = add i32 %445, 16 ; [#uses=1] + %447 = and i32 %446, 63 ; [#uses=1] + %448 = and i32 %445, -64 ; [#uses=1] + %449 = or i32 %447, %448 ; [#uses=2] + %.pre25.i = load double* %351, align 4 ; [#uses=1] + %.pre26.i = load double* %353, align 4 ; [#uses=1] + br label %bb16.i + +bb16.i: ; preds = %bb15.i, %bb14.i + %avail_edge.tmp.0 = phi %struct.edge_rec* [ %avail_edge.promoted, %bb14.i ], [ %436, %bb15.i ] ; <%struct.edge_rec*> [#uses=2] + %450 = phi double [ %.pre26.i, %bb15.i ], [ %354, %bb14.i ] ; [#uses=3] + %451 = phi double [ %.pre25.i, %bb15.i ], [ %352, %bb14.i ] ; [#uses=3] + %rcand.0.i = phi %struct.edge_rec* [ %rcand.2.i, %bb14.i ], [ %t.1.i, %bb15.i ] ; <%struct.edge_rec*> [#uses=3] + %t.1.in.i = phi i32 [ %338, %bb14.i ], [ %449, %bb15.i ] ; [#uses=3] + %.pn3.in.in.i = phi i32 [ %338, %bb14.i ], [ %449, %bb15.i ] ; [#uses=1] + %.pn.in.in.in.i = phi %struct.edge_rec* [ %rcand.2.i, %bb14.i ], [ %t.1.i, %bb15.i ] ; <%struct.edge_rec*> [#uses=1] + %rcand.2.pn.i = phi %struct.edge_rec* [ %rcand.2.i, %bb14.i ], [ %t.1.i, %bb15.i ] ; <%struct.edge_rec*> [#uses=1] + %t.1.i = inttoptr i32 %t.1.in.i to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=3] + %.pn.in.in.i = ptrtoint %struct.edge_rec* %.pn.in.in.in.i to i32 ; [#uses=1] + %.pn3.in.i = xor i32 %.pn3.in.in.i, 32 ; [#uses=1] + %.pn.in.i = xor i32 %.pn.in.in.i, 32 ; [#uses=1] + %.pn3.i = inttoptr i32 %.pn3.in.i to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %.pn.i = inttoptr i32 %.pn.in.i to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %v1.1.in.i = getelementptr %struct.edge_rec* %.pn3.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %v2.1.in.i = getelementptr %struct.edge_rec* %.pn.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %v3.1.in.i = getelementptr %struct.edge_rec* %rcand.2.pn.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %v1.1.i = load %struct.VERTEX** %v1.1.in.i ; <%struct.VERTEX*> [#uses=3] + %v2.1.i = load %struct.VERTEX** %v2.1.in.i ; <%struct.VERTEX*> [#uses=3] + %v3.1.i = load %struct.VERTEX** %v3.1.in.i ; <%struct.VERTEX*> [#uses=3] + %452 = load double* %363, align 4 ; [#uses=3] + %453 = getelementptr %struct.VERTEX* %v1.1.i, i32 0, i32 0, i32 0 ; [#uses=1] + %454 = load double* %453, align 4 ; [#uses=1] + %455 = fsub double %454, %451 ; [#uses=2] + %456 = getelementptr %struct.VERTEX* %v1.1.i, i32 0, i32 0, i32 1 ; [#uses=1] + %457 = load double* %456, align 4 ; [#uses=1] + %458 = fsub double %457, %450 ; [#uses=2] + %459 = getelementptr %struct.VERTEX* %v1.1.i, i32 0, i32 0, i32 2 ; [#uses=1] + %460 = load double* %459, align 4 ; [#uses=1] + %461 = getelementptr %struct.VERTEX* %v2.1.i, i32 0, i32 0, i32 0 ; [#uses=1] + %462 = load double* %461, align 4 ; [#uses=1] + %463 = fsub double %462, %451 ; [#uses=2] + %464 = getelementptr %struct.VERTEX* %v2.1.i, i32 0, i32 0, i32 1 ; [#uses=1] + %465 = load double* %464, align 4 ; [#uses=1] + %466 = fsub double %465, %450 ; [#uses=2] + %467 = getelementptr %struct.VERTEX* %v2.1.i, i32 0, i32 0, i32 2 ; [#uses=1] + %468 = load double* %467, align 4 ; [#uses=1] + %469 = getelementptr %struct.VERTEX* %v3.1.i, i32 0, i32 0, i32 0 ; [#uses=1] + %470 = load double* %469, align 4 ; [#uses=1] + %471 = fsub double %470, %451 ; [#uses=2] + %472 = getelementptr %struct.VERTEX* %v3.1.i, i32 0, i32 0, i32 1 ; [#uses=1] + %473 = load double* %472, align 4 ; [#uses=1] + %474 = fsub double %473, %450 ; [#uses=2] + %475 = getelementptr %struct.VERTEX* %v3.1.i, i32 0, i32 0, i32 2 ; [#uses=1] + %476 = load double* %475, align 4 ; [#uses=1] + %477 = fsub double %460, %452 ; [#uses=1] + %478 = fmul double %463, %474 ; [#uses=1] + %479 = fmul double %466, %471 ; [#uses=1] + %480 = fsub double %478, %479 ; [#uses=1] + %481 = fmul double %477, %480 ; [#uses=1] + %482 = fsub double %468, %452 ; [#uses=1] + %483 = fmul double %471, %458 ; [#uses=1] + %484 = fmul double %474, %455 ; [#uses=1] + %485 = fsub double %483, %484 ; [#uses=1] + %486 = fmul double %482, %485 ; [#uses=1] + %487 = fadd double %486, %481 ; [#uses=1] + %488 = fsub double %476, %452 ; [#uses=1] + %489 = fmul double %455, %466 ; [#uses=1] + %490 = fmul double %458, %463 ; [#uses=1] + %491 = fsub double %489, %490 ; [#uses=1] + %492 = fmul double %488, %491 ; [#uses=1] + %493 = fadd double %492, %487 ; [#uses=1] + %494 = fcmp ogt double %493, 0.000000e+00 ; [#uses=1] + br i1 %494, label %bb15.i, label %bb17.loopexit.i + +bb17.loopexit.i: ; preds = %bb16.i + store %struct.edge_rec* %avail_edge.tmp.0, %struct.edge_rec** @avail_edge + %.pre27.i = load %struct.VERTEX** %170, align 4 ; <%struct.VERTEX*> [#uses=1] + %.pre28.i = load %struct.VERTEX** %175, align 4 ; <%struct.VERTEX*> [#uses=1] + br label %bb17.i + +bb17.i: ; preds = %bb17.loopexit.i, %bb13.i + %495 = phi %struct.VERTEX* [ %.pre28.i, %bb17.loopexit.i ], [ %324, %bb13.i ] ; <%struct.VERTEX*> [#uses=3] + %496 = phi %struct.VERTEX* [ %.pre27.i, %bb17.loopexit.i ], [ %325, %bb13.i ] ; <%struct.VERTEX*> [#uses=3] + %rcand.1.i = phi %struct.edge_rec* [ %rcand.0.i, %bb17.loopexit.i ], [ %rcand.2.i, %bb13.i ] ; <%struct.edge_rec*> [#uses=3] + %497 = ptrtoint %struct.edge_rec* %lcand.1.i to i32 ; [#uses=1] + %498 = xor i32 %497, 32 ; [#uses=1] + %499 = inttoptr i32 %498 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %500 = getelementptr %struct.edge_rec* %499, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %501 = load %struct.VERTEX** %500, align 4 ; <%struct.VERTEX*> [#uses=4] + %502 = getelementptr %struct.VERTEX* %496, i32 0, i32 0, i32 0 ; [#uses=1] + %503 = load double* %502, align 4 ; [#uses=1] + %504 = getelementptr %struct.VERTEX* %496, i32 0, i32 0, i32 1 ; [#uses=1] + %505 = load double* %504, align 4 ; [#uses=1] + %506 = getelementptr %struct.VERTEX* %501, i32 0, i32 0, i32 0 ; [#uses=1] + %507 = load double* %506, align 4 ; [#uses=2] + %508 = getelementptr %struct.VERTEX* %501, i32 0, i32 0, i32 1 ; [#uses=1] + %509 = load double* %508, align 4 ; [#uses=2] + %510 = getelementptr %struct.VERTEX* %495, i32 0, i32 0, i32 0 ; [#uses=1] + %511 = load double* %510, align 4 ; [#uses=3] + %512 = getelementptr %struct.VERTEX* %495, i32 0, i32 0, i32 1 ; [#uses=1] + %513 = load double* %512, align 4 ; [#uses=3] + %514 = fsub double %503, %511 ; [#uses=2] + %515 = fsub double %509, %513 ; [#uses=1] + %516 = fmul double %514, %515 ; [#uses=1] + %517 = fsub double %507, %511 ; [#uses=1] + %518 = fsub double %505, %513 ; [#uses=2] + %519 = fmul double %517, %518 ; [#uses=1] + %520 = fsub double %516, %519 ; [#uses=1] + %521 = fcmp ogt double %520, 0.000000e+00 ; [#uses=2] + %522 = ptrtoint %struct.edge_rec* %rcand.1.i to i32 ; [#uses=3] + %523 = xor i32 %522, 32 ; [#uses=1] + %524 = inttoptr i32 %523 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %525 = getelementptr %struct.edge_rec* %524, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %526 = load %struct.VERTEX** %525, align 4 ; <%struct.VERTEX*> [#uses=4] + %527 = getelementptr %struct.VERTEX* %526, i32 0, i32 0, i32 0 ; [#uses=1] + %528 = load double* %527, align 4 ; [#uses=4] + %529 = getelementptr %struct.VERTEX* %526, i32 0, i32 0, i32 1 ; [#uses=1] + %530 = load double* %529, align 4 ; [#uses=4] + %531 = fsub double %530, %513 ; [#uses=1] + %532 = fmul double %514, %531 ; [#uses=1] + %533 = fsub double %528, %511 ; [#uses=1] + %534 = fmul double %533, %518 ; [#uses=1] + %535 = fsub double %532, %534 ; [#uses=1] + %536 = fcmp ogt double %535, 0.000000e+00 ; [#uses=2] + %537 = or i1 %536, %521 ; [#uses=1] + br i1 %537, label %bb21.i, label %do_merge.exit + +bb21.i: ; preds = %bb17.i + %538 = getelementptr %struct.edge_rec* %lcand.1.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %539 = load %struct.VERTEX** %538, align 4 ; <%struct.VERTEX*> [#uses=3] + %540 = getelementptr %struct.edge_rec* %rcand.1.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %541 = load %struct.VERTEX** %540, align 4 ; <%struct.VERTEX*> [#uses=3] + br i1 %521, label %bb22.i, label %bb24.i + +bb22.i: ; preds = %bb21.i + br i1 %536, label %bb23.i, label %bb25.i + +bb23.i: ; preds = %bb22.i + %542 = getelementptr %struct.VERTEX* %526, i32 0, i32 0, i32 2 ; [#uses=1] + %543 = load double* %542, align 4 ; [#uses=3] + %544 = fsub double %507, %528 ; [#uses=2] + %545 = fsub double %509, %530 ; [#uses=2] + %546 = getelementptr %struct.VERTEX* %501, i32 0, i32 0, i32 2 ; [#uses=1] + %547 = load double* %546, align 4 ; [#uses=1] + %548 = getelementptr %struct.VERTEX* %539, i32 0, i32 0, i32 0 ; [#uses=1] + %549 = load double* %548, align 4 ; [#uses=1] + %550 = fsub double %549, %528 ; [#uses=2] + %551 = getelementptr %struct.VERTEX* %539, i32 0, i32 0, i32 1 ; [#uses=1] + %552 = load double* %551, align 4 ; [#uses=1] + %553 = fsub double %552, %530 ; [#uses=2] + %554 = getelementptr %struct.VERTEX* %539, i32 0, i32 0, i32 2 ; [#uses=1] + %555 = load double* %554, align 4 ; [#uses=1] + %556 = getelementptr %struct.VERTEX* %541, i32 0, i32 0, i32 0 ; [#uses=1] + %557 = load double* %556, align 4 ; [#uses=1] + %558 = fsub double %557, %528 ; [#uses=2] + %559 = getelementptr %struct.VERTEX* %541, i32 0, i32 0, i32 1 ; [#uses=1] + %560 = load double* %559, align 4 ; [#uses=1] + %561 = fsub double %560, %530 ; [#uses=2] + %562 = getelementptr %struct.VERTEX* %541, i32 0, i32 0, i32 2 ; [#uses=1] + %563 = load double* %562, align 4 ; [#uses=1] + %564 = fsub double %547, %543 ; [#uses=1] + %565 = fmul double %550, %561 ; [#uses=1] + %566 = fmul double %553, %558 ; [#uses=1] + %567 = fsub double %565, %566 ; [#uses=1] + %568 = fmul double %564, %567 ; [#uses=1] + %569 = fsub double %555, %543 ; [#uses=1] + %570 = fmul double %558, %545 ; [#uses=1] + %571 = fmul double %561, %544 ; [#uses=1] + %572 = fsub double %570, %571 ; [#uses=1] + %573 = fmul double %569, %572 ; [#uses=1] + %574 = fadd double %573, %568 ; [#uses=1] + %575 = fsub double %563, %543 ; [#uses=1] + %576 = fmul double %544, %553 ; [#uses=1] + %577 = fmul double %545, %550 ; [#uses=1] + %578 = fsub double %576, %577 ; [#uses=1] + %579 = fmul double %575, %578 ; [#uses=1] + %580 = fadd double %579, %574 ; [#uses=1] + %581 = fcmp ogt double %580, 0.000000e+00 ; [#uses=1] + br i1 %581, label %bb24.i, label %bb25.i + +bb24.i: ; preds = %bb23.i, %bb21.i + %582 = add i32 %522, 48 ; [#uses=1] + %583 = and i32 %582, 63 ; [#uses=1] + %584 = and i32 %522, -64 ; [#uses=1] + %585 = or i32 %583, %584 ; [#uses=1] + %586 = inttoptr i32 %585 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %587 = getelementptr %struct.edge_rec* %586, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %588 = load %struct.edge_rec** %587, align 4 ; <%struct.edge_rec*> [#uses=1] + %589 = ptrtoint %struct.edge_rec* %588 to i32 ; [#uses=2] + %590 = add i32 %589, 16 ; [#uses=1] + %591 = and i32 %590, 63 ; [#uses=1] + %592 = and i32 %589, -64 ; [#uses=1] + %593 = or i32 %591, %592 ; [#uses=1] + %594 = inttoptr i32 %593 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %595 = call arm_apcscc %struct.edge_rec* @alloc_edge() nounwind ; <%struct.edge_rec*> [#uses=5] + %596 = getelementptr %struct.edge_rec* %595, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=4] + store %struct.edge_rec* %595, %struct.edge_rec** %596, align 4 + %597 = getelementptr %struct.edge_rec* %595, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + store %struct.VERTEX* %526, %struct.VERTEX** %597, align 4 + %598 = ptrtoint %struct.edge_rec* %595 to i32 ; [#uses=5] + %599 = add i32 %598, 16 ; [#uses=1] + %600 = inttoptr i32 %599 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %601 = add i32 %598, 48 ; [#uses=1] + %602 = inttoptr i32 %601 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %603 = getelementptr %struct.edge_rec* %600, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %602, %struct.edge_rec** %603, align 4 + %604 = add i32 %598, 32 ; [#uses=1] + %605 = inttoptr i32 %604 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=3] + %606 = getelementptr %struct.edge_rec* %605, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %605, %struct.edge_rec** %606, align 4 + %607 = getelementptr %struct.edge_rec* %605, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + store %struct.VERTEX* %495, %struct.VERTEX** %607, align 4 + %608 = getelementptr %struct.edge_rec* %602, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %600, %struct.edge_rec** %608, align 4 + %609 = load %struct.edge_rec** %596, align 4 ; <%struct.edge_rec*> [#uses=1] + %610 = ptrtoint %struct.edge_rec* %609 to i32 ; [#uses=2] + %611 = add i32 %610, 16 ; [#uses=1] + %612 = and i32 %611, 63 ; [#uses=1] + %613 = and i32 %610, -64 ; [#uses=1] + %614 = or i32 %612, %613 ; [#uses=1] + %615 = inttoptr i32 %614 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %616 = getelementptr %struct.edge_rec* %594, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %617 = load %struct.edge_rec** %616, align 4 ; <%struct.edge_rec*> [#uses=1] + %618 = ptrtoint %struct.edge_rec* %617 to i32 ; [#uses=2] + %619 = add i32 %618, 16 ; [#uses=1] + %620 = and i32 %619, 63 ; [#uses=1] + %621 = and i32 %618, -64 ; [#uses=1] + %622 = or i32 %620, %621 ; [#uses=1] + %623 = inttoptr i32 %622 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %624 = getelementptr %struct.edge_rec* %623, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %625 = load %struct.edge_rec** %624, align 4 ; <%struct.edge_rec*> [#uses=1] + %626 = getelementptr %struct.edge_rec* %615, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %627 = load %struct.edge_rec** %626, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %625, %struct.edge_rec** %626, align 4 + store %struct.edge_rec* %627, %struct.edge_rec** %624, align 4 + %628 = load %struct.edge_rec** %596, align 4 ; <%struct.edge_rec*> [#uses=1] + %629 = load %struct.edge_rec** %616, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %628, %struct.edge_rec** %616, align 4 + store %struct.edge_rec* %629, %struct.edge_rec** %596, align 4 + %630 = xor i32 %598, 32 ; [#uses=2] + %631 = inttoptr i32 %630 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %632 = getelementptr %struct.edge_rec* %631, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %633 = load %struct.edge_rec** %632, align 4 ; <%struct.edge_rec*> [#uses=1] + %634 = ptrtoint %struct.edge_rec* %633 to i32 ; [#uses=2] + %635 = add i32 %634, 16 ; [#uses=1] + %636 = and i32 %635, 63 ; [#uses=1] + %637 = and i32 %634, -64 ; [#uses=1] + %638 = or i32 %636, %637 ; [#uses=1] + %639 = inttoptr i32 %638 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %640 = getelementptr %struct.edge_rec* %174, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %641 = load %struct.edge_rec** %640, align 4 ; <%struct.edge_rec*> [#uses=1] + %642 = ptrtoint %struct.edge_rec* %641 to i32 ; [#uses=2] + %643 = add i32 %642, 16 ; [#uses=1] + %644 = and i32 %643, 63 ; [#uses=1] + %645 = and i32 %642, -64 ; [#uses=1] + %646 = or i32 %644, %645 ; [#uses=1] + %647 = inttoptr i32 %646 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %648 = getelementptr %struct.edge_rec* %647, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %649 = load %struct.edge_rec** %648, align 4 ; <%struct.edge_rec*> [#uses=1] + %650 = getelementptr %struct.edge_rec* %639, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %651 = load %struct.edge_rec** %650, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %649, %struct.edge_rec** %650, align 4 + store %struct.edge_rec* %651, %struct.edge_rec** %648, align 4 + %652 = load %struct.edge_rec** %632, align 4 ; <%struct.edge_rec*> [#uses=1] + %653 = load %struct.edge_rec** %640, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %652, %struct.edge_rec** %640, align 4 + store %struct.edge_rec* %653, %struct.edge_rec** %632, align 4 + %654 = add i32 %630, 48 ; [#uses=1] + %655 = and i32 %654, 63 ; [#uses=1] + %656 = and i32 %598, -64 ; [#uses=1] + %657 = or i32 %655, %656 ; [#uses=1] + %658 = inttoptr i32 %657 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %659 = getelementptr %struct.edge_rec* %658, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %660 = load %struct.edge_rec** %659, align 4 ; <%struct.edge_rec*> [#uses=1] + %661 = ptrtoint %struct.edge_rec* %660 to i32 ; [#uses=2] + %662 = add i32 %661, 16 ; [#uses=1] + %663 = and i32 %662, 63 ; [#uses=1] + %664 = and i32 %661, -64 ; [#uses=1] + %665 = or i32 %663, %664 ; [#uses=1] + %666 = inttoptr i32 %665 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + br label %bb9.i + +bb25.i: ; preds = %bb23.i, %bb22.i + %667 = add i32 %172, 16 ; [#uses=1] + %668 = and i32 %667, 63 ; [#uses=1] + %669 = and i32 %172, -64 ; [#uses=1] + %670 = or i32 %668, %669 ; [#uses=1] + %671 = inttoptr i32 %670 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %672 = getelementptr %struct.edge_rec* %671, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %673 = load %struct.edge_rec** %672, align 4 ; <%struct.edge_rec*> [#uses=1] + %674 = ptrtoint %struct.edge_rec* %673 to i32 ; [#uses=2] + %675 = add i32 %674, 16 ; [#uses=1] + %676 = and i32 %675, 63 ; [#uses=1] + %677 = and i32 %674, -64 ; [#uses=1] + %678 = or i32 %676, %677 ; [#uses=1] + %679 = inttoptr i32 %678 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %680 = call arm_apcscc %struct.edge_rec* @alloc_edge() nounwind ; <%struct.edge_rec*> [#uses=4] + %681 = getelementptr %struct.edge_rec* %680, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=5] + store %struct.edge_rec* %680, %struct.edge_rec** %681, align 4 + %682 = getelementptr %struct.edge_rec* %680, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + store %struct.VERTEX* %501, %struct.VERTEX** %682, align 4 + %683 = ptrtoint %struct.edge_rec* %680 to i32 ; [#uses=4] + %684 = add i32 %683, 16 ; [#uses=1] + %685 = inttoptr i32 %684 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %686 = add i32 %683, 48 ; [#uses=1] + %687 = inttoptr i32 %686 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %688 = getelementptr %struct.edge_rec* %685, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %687, %struct.edge_rec** %688, align 4 + %689 = add i32 %683, 32 ; [#uses=1] + %690 = inttoptr i32 %689 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=3] + %691 = getelementptr %struct.edge_rec* %690, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %690, %struct.edge_rec** %691, align 4 + %692 = getelementptr %struct.edge_rec* %690, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + store %struct.VERTEX* %496, %struct.VERTEX** %692, align 4 + %693 = getelementptr %struct.edge_rec* %687, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %685, %struct.edge_rec** %693, align 4 + %694 = load %struct.edge_rec** %681, align 4 ; <%struct.edge_rec*> [#uses=1] + %695 = ptrtoint %struct.edge_rec* %694 to i32 ; [#uses=2] + %696 = add i32 %695, 16 ; [#uses=1] + %697 = and i32 %696, 63 ; [#uses=1] + %698 = and i32 %695, -64 ; [#uses=1] + %699 = or i32 %697, %698 ; [#uses=1] + %700 = inttoptr i32 %699 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %701 = getelementptr %struct.edge_rec* %499, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %702 = load %struct.edge_rec** %701, align 4 ; <%struct.edge_rec*> [#uses=1] + %703 = ptrtoint %struct.edge_rec* %702 to i32 ; [#uses=2] + %704 = add i32 %703, 16 ; [#uses=1] + %705 = and i32 %704, 63 ; [#uses=1] + %706 = and i32 %703, -64 ; [#uses=1] + %707 = or i32 %705, %706 ; [#uses=1] + %708 = inttoptr i32 %707 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %709 = getelementptr %struct.edge_rec* %708, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %710 = load %struct.edge_rec** %709, align 4 ; <%struct.edge_rec*> [#uses=1] + %711 = getelementptr %struct.edge_rec* %700, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %712 = load %struct.edge_rec** %711, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %710, %struct.edge_rec** %711, align 4 + store %struct.edge_rec* %712, %struct.edge_rec** %709, align 4 + %713 = load %struct.edge_rec** %681, align 4 ; <%struct.edge_rec*> [#uses=1] + %714 = load %struct.edge_rec** %701, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %713, %struct.edge_rec** %701, align 4 + store %struct.edge_rec* %714, %struct.edge_rec** %681, align 4 + %715 = xor i32 %683, 32 ; [#uses=1] + %716 = inttoptr i32 %715 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %717 = getelementptr %struct.edge_rec* %716, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %718 = load %struct.edge_rec** %717, align 4 ; <%struct.edge_rec*> [#uses=1] + %719 = ptrtoint %struct.edge_rec* %718 to i32 ; [#uses=2] + %720 = add i32 %719, 16 ; [#uses=1] + %721 = and i32 %720, 63 ; [#uses=1] + %722 = and i32 %719, -64 ; [#uses=1] + %723 = or i32 %721, %722 ; [#uses=1] + %724 = inttoptr i32 %723 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %725 = getelementptr %struct.edge_rec* %679, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %726 = load %struct.edge_rec** %725, align 4 ; <%struct.edge_rec*> [#uses=1] + %727 = ptrtoint %struct.edge_rec* %726 to i32 ; [#uses=2] + %728 = add i32 %727, 16 ; [#uses=1] + %729 = and i32 %728, 63 ; [#uses=1] + %730 = and i32 %727, -64 ; [#uses=1] + %731 = or i32 %729, %730 ; [#uses=1] + %732 = inttoptr i32 %731 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %733 = getelementptr %struct.edge_rec* %732, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %734 = load %struct.edge_rec** %733, align 4 ; <%struct.edge_rec*> [#uses=1] + %735 = getelementptr %struct.edge_rec* %724, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %736 = load %struct.edge_rec** %735, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %734, %struct.edge_rec** %735, align 4 + store %struct.edge_rec* %736, %struct.edge_rec** %733, align 4 + %737 = load %struct.edge_rec** %717, align 4 ; <%struct.edge_rec*> [#uses=1] + %738 = load %struct.edge_rec** %725, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %737, %struct.edge_rec** %725, align 4 + store %struct.edge_rec* %738, %struct.edge_rec** %717, align 4 + %739 = load %struct.edge_rec** %681, align 4 ; <%struct.edge_rec*> [#uses=1] + br label %bb9.i + +do_merge.exit: ; preds = %bb17.i + %740 = getelementptr %struct.edge_rec* %ldo_addr.0.ph.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %741 = load %struct.VERTEX** %740, align 4 ; <%struct.VERTEX*> [#uses=1] + %742 = icmp eq %struct.VERTEX* %741, %tree_addr.0.i ; [#uses=1] + br i1 %742, label %bb5.loopexit, label %bb2 + +bb2: ; preds = %bb2, %do_merge.exit + %ldo.07 = phi %struct.edge_rec* [ %747, %bb2 ], [ %ldo_addr.0.ph.i, %do_merge.exit ] ; <%struct.edge_rec*> [#uses=1] + %743 = ptrtoint %struct.edge_rec* %ldo.07 to i32 ; [#uses=1] + %744 = xor i32 %743, 32 ; [#uses=1] + %745 = inttoptr i32 %744 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %746 = getelementptr %struct.edge_rec* %745, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %747 = load %struct.edge_rec** %746, align 4 ; <%struct.edge_rec*> [#uses=3] + %748 = getelementptr %struct.edge_rec* %747, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %749 = load %struct.VERTEX** %748, align 4 ; <%struct.VERTEX*> [#uses=1] + %750 = icmp eq %struct.VERTEX* %749, %tree_addr.0.i ; [#uses=1] + br i1 %750, label %bb5.loopexit, label %bb2 + +bb4: ; preds = %bb5.loopexit, %bb4 + %rdo.05 = phi %struct.edge_rec* [ %755, %bb4 ], [ %rdo_addr.0.i, %bb5.loopexit ] ; <%struct.edge_rec*> [#uses=1] + %751 = getelementptr %struct.edge_rec* %rdo.05, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %752 = load %struct.edge_rec** %751, align 4 ; <%struct.edge_rec*> [#uses=1] + %753 = ptrtoint %struct.edge_rec* %752 to i32 ; [#uses=1] + %754 = xor i32 %753, 32 ; [#uses=1] + %755 = inttoptr i32 %754 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=3] + %756 = getelementptr %struct.edge_rec* %755, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %757 = load %struct.VERTEX** %756, align 4 ; <%struct.VERTEX*> [#uses=1] + %758 = icmp eq %struct.VERTEX* %757, %extra ; [#uses=1] + br i1 %758, label %bb6, label %bb4 + +bb5.loopexit: ; preds = %bb2, %do_merge.exit + %ldo.0.lcssa = phi %struct.edge_rec* [ %ldo_addr.0.ph.i, %do_merge.exit ], [ %747, %bb2 ] ; <%struct.edge_rec*> [#uses=1] + %759 = getelementptr %struct.edge_rec* %rdo_addr.0.i, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %760 = load %struct.VERTEX** %759, align 4 ; <%struct.VERTEX*> [#uses=1] + %761 = icmp eq %struct.VERTEX* %760, %extra ; [#uses=1] + br i1 %761, label %bb6, label %bb4 + +bb6: ; preds = %bb5.loopexit, %bb4 + %rdo.0.lcssa = phi %struct.edge_rec* [ %rdo_addr.0.i, %bb5.loopexit ], [ %755, %bb4 ] ; <%struct.edge_rec*> [#uses=1] + %tmp16 = ptrtoint %struct.edge_rec* %ldo.0.lcssa to i32 ; [#uses=1] + %tmp4 = ptrtoint %struct.edge_rec* %rdo.0.lcssa to i32 ; [#uses=1] + br label %bb15 + +bb7: ; preds = %bb + %762 = getelementptr %struct.VERTEX* %tree, i32 0, i32 1 ; <%struct.VERTEX**> [#uses=1] + %763 = load %struct.VERTEX** %762, align 4 ; <%struct.VERTEX*> [#uses=4] + %764 = icmp eq %struct.VERTEX* %763, null ; [#uses=1] + %765 = call arm_apcscc %struct.edge_rec* @alloc_edge() nounwind ; <%struct.edge_rec*> [#uses=5] + %766 = getelementptr %struct.edge_rec* %765, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=4] + store %struct.edge_rec* %765, %struct.edge_rec** %766, align 4 + %767 = getelementptr %struct.edge_rec* %765, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=3] + br i1 %764, label %bb10, label %bb11 + +bb8: ; preds = %entry + %768 = call arm_apcscc i32 @puts(i8* getelementptr ([21 x i8]* @_2E_str7, i32 0, i32 0)) nounwind ; [#uses=0] + call arm_apcscc void @exit(i32 -1) noreturn nounwind + unreachable + +bb10: ; preds = %bb7 + store %struct.VERTEX* %tree, %struct.VERTEX** %767, align 4 + %769 = ptrtoint %struct.edge_rec* %765 to i32 ; [#uses=5] + %770 = add i32 %769, 16 ; [#uses=1] + %771 = inttoptr i32 %770 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %772 = add i32 %769, 48 ; [#uses=1] + %773 = inttoptr i32 %772 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %774 = getelementptr %struct.edge_rec* %771, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %773, %struct.edge_rec** %774, align 4 + %775 = add i32 %769, 32 ; [#uses=1] + %776 = inttoptr i32 %775 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=3] + %777 = getelementptr %struct.edge_rec* %776, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %776, %struct.edge_rec** %777, align 4 + %778 = getelementptr %struct.edge_rec* %776, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + store %struct.VERTEX* %extra, %struct.VERTEX** %778, align 4 + %779 = getelementptr %struct.edge_rec* %773, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %771, %struct.edge_rec** %779, align 4 + %780 = xor i32 %769, 32 ; [#uses=1] + br label %bb15 + +bb11: ; preds = %bb7 + store %struct.VERTEX* %763, %struct.VERTEX** %767, align 4 + %781 = ptrtoint %struct.edge_rec* %765 to i32 ; [#uses=6] + %782 = add i32 %781, 16 ; [#uses=1] + %783 = inttoptr i32 %782 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %784 = add i32 %781, 48 ; [#uses=1] + %785 = inttoptr i32 %784 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %786 = getelementptr %struct.edge_rec* %783, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %785, %struct.edge_rec** %786, align 4 + %787 = add i32 %781, 32 ; [#uses=1] + %788 = inttoptr i32 %787 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=3] + %789 = getelementptr %struct.edge_rec* %788, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %788, %struct.edge_rec** %789, align 4 + %790 = getelementptr %struct.edge_rec* %788, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + store %struct.VERTEX* %tree, %struct.VERTEX** %790, align 4 + %791 = getelementptr %struct.edge_rec* %785, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %783, %struct.edge_rec** %791, align 4 + %792 = call arm_apcscc %struct.edge_rec* @alloc_edge() nounwind ; <%struct.edge_rec*> [#uses=4] + %793 = getelementptr %struct.edge_rec* %792, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=4] + store %struct.edge_rec* %792, %struct.edge_rec** %793, align 4 + %794 = getelementptr %struct.edge_rec* %792, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + store %struct.VERTEX* %tree, %struct.VERTEX** %794, align 4 + %795 = ptrtoint %struct.edge_rec* %792 to i32 ; [#uses=5] + %796 = add i32 %795, 16 ; [#uses=1] + %797 = inttoptr i32 %796 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %798 = add i32 %795, 48 ; [#uses=2] + %799 = inttoptr i32 %798 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %800 = getelementptr %struct.edge_rec* %797, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %799, %struct.edge_rec** %800, align 4 + %801 = add i32 %795, 32 ; [#uses=1] + %802 = inttoptr i32 %801 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=3] + %803 = getelementptr %struct.edge_rec* %802, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %802, %struct.edge_rec** %803, align 4 + %804 = getelementptr %struct.edge_rec* %802, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + store %struct.VERTEX* %extra, %struct.VERTEX** %804, align 4 + %805 = getelementptr %struct.edge_rec* %799, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %797, %struct.edge_rec** %805, align 4 + %806 = xor i32 %781, 32 ; [#uses=1] + %807 = inttoptr i32 %806 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %808 = getelementptr %struct.edge_rec* %807, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %809 = load %struct.edge_rec** %808, align 4 ; <%struct.edge_rec*> [#uses=1] + %810 = ptrtoint %struct.edge_rec* %809 to i32 ; [#uses=2] + %811 = add i32 %810, 16 ; [#uses=1] + %812 = and i32 %811, 63 ; [#uses=1] + %813 = and i32 %810, -64 ; [#uses=1] + %814 = or i32 %812, %813 ; [#uses=1] + %815 = inttoptr i32 %814 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %816 = load %struct.edge_rec** %793, align 4 ; <%struct.edge_rec*> [#uses=1] + %817 = ptrtoint %struct.edge_rec* %816 to i32 ; [#uses=2] + %818 = add i32 %817, 16 ; [#uses=1] + %819 = and i32 %818, 63 ; [#uses=1] + %820 = and i32 %817, -64 ; [#uses=1] + %821 = or i32 %819, %820 ; [#uses=1] + %822 = inttoptr i32 %821 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %823 = getelementptr %struct.edge_rec* %822, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %824 = load %struct.edge_rec** %823, align 4 ; <%struct.edge_rec*> [#uses=1] + %825 = getelementptr %struct.edge_rec* %815, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %826 = load %struct.edge_rec** %825, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %824, %struct.edge_rec** %825, align 4 + store %struct.edge_rec* %826, %struct.edge_rec** %823, align 4 + %827 = load %struct.edge_rec** %808, align 4 ; <%struct.edge_rec*> [#uses=1] + %828 = load %struct.edge_rec** %793, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %827, %struct.edge_rec** %793, align 4 + store %struct.edge_rec* %828, %struct.edge_rec** %808, align 4 + %829 = xor i32 %795, 32 ; [#uses=3] + %830 = inttoptr i32 %829 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %831 = getelementptr %struct.edge_rec* %830, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + %832 = load %struct.VERTEX** %831, align 4 ; <%struct.VERTEX*> [#uses=1] + %833 = and i32 %798, 63 ; [#uses=1] + %834 = and i32 %795, -64 ; [#uses=1] + %835 = or i32 %833, %834 ; [#uses=1] + %836 = inttoptr i32 %835 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %837 = getelementptr %struct.edge_rec* %836, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %838 = load %struct.edge_rec** %837, align 4 ; <%struct.edge_rec*> [#uses=1] + %839 = ptrtoint %struct.edge_rec* %838 to i32 ; [#uses=2] + %840 = add i32 %839, 16 ; [#uses=1] + %841 = and i32 %840, 63 ; [#uses=1] + %842 = and i32 %839, -64 ; [#uses=1] + %843 = or i32 %841, %842 ; [#uses=1] + %844 = inttoptr i32 %843 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %845 = load %struct.VERTEX** %767, align 4 ; <%struct.VERTEX*> [#uses=1] + %846 = call arm_apcscc %struct.edge_rec* @alloc_edge() nounwind ; <%struct.edge_rec*> [#uses=4] + %847 = getelementptr %struct.edge_rec* %846, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=7] + store %struct.edge_rec* %846, %struct.edge_rec** %847, align 4 + %848 = getelementptr %struct.edge_rec* %846, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + store %struct.VERTEX* %832, %struct.VERTEX** %848, align 4 + %849 = ptrtoint %struct.edge_rec* %846 to i32 ; [#uses=6] + %850 = add i32 %849, 16 ; [#uses=2] + %851 = inttoptr i32 %850 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %852 = add i32 %849, 48 ; [#uses=1] + %853 = inttoptr i32 %852 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %854 = getelementptr %struct.edge_rec* %851, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %853, %struct.edge_rec** %854, align 4 + %855 = add i32 %849, 32 ; [#uses=1] + %856 = inttoptr i32 %855 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=3] + %857 = getelementptr %struct.edge_rec* %856, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %856, %struct.edge_rec** %857, align 4 + %858 = getelementptr %struct.edge_rec* %856, i32 0, i32 0 ; <%struct.VERTEX**> [#uses=1] + store %struct.VERTEX* %845, %struct.VERTEX** %858, align 4 + %859 = getelementptr %struct.edge_rec* %853, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %851, %struct.edge_rec** %859, align 4 + %860 = load %struct.edge_rec** %847, align 4 ; <%struct.edge_rec*> [#uses=1] + %861 = ptrtoint %struct.edge_rec* %860 to i32 ; [#uses=2] + %862 = add i32 %861, 16 ; [#uses=1] + %863 = and i32 %862, 63 ; [#uses=1] + %864 = and i32 %861, -64 ; [#uses=1] + %865 = or i32 %863, %864 ; [#uses=1] + %866 = inttoptr i32 %865 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %867 = getelementptr %struct.edge_rec* %844, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %868 = load %struct.edge_rec** %867, align 4 ; <%struct.edge_rec*> [#uses=1] + %869 = ptrtoint %struct.edge_rec* %868 to i32 ; [#uses=2] + %870 = add i32 %869, 16 ; [#uses=1] + %871 = and i32 %870, 63 ; [#uses=1] + %872 = and i32 %869, -64 ; [#uses=1] + %873 = or i32 %871, %872 ; [#uses=1] + %874 = inttoptr i32 %873 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %875 = getelementptr %struct.edge_rec* %874, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %876 = load %struct.edge_rec** %875, align 4 ; <%struct.edge_rec*> [#uses=1] + %877 = getelementptr %struct.edge_rec* %866, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %878 = load %struct.edge_rec** %877, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %876, %struct.edge_rec** %877, align 4 + store %struct.edge_rec* %878, %struct.edge_rec** %875, align 4 + %879 = load %struct.edge_rec** %847, align 4 ; <%struct.edge_rec*> [#uses=1] + %880 = load %struct.edge_rec** %867, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %879, %struct.edge_rec** %867, align 4 + store %struct.edge_rec* %880, %struct.edge_rec** %847, align 4 + %881 = xor i32 %849, 32 ; [#uses=3] + %882 = inttoptr i32 %881 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %883 = getelementptr %struct.edge_rec* %882, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=6] + %884 = load %struct.edge_rec** %883, align 4 ; <%struct.edge_rec*> [#uses=1] + %885 = ptrtoint %struct.edge_rec* %884 to i32 ; [#uses=2] + %886 = add i32 %885, 16 ; [#uses=1] + %887 = and i32 %886, 63 ; [#uses=1] + %888 = and i32 %885, -64 ; [#uses=1] + %889 = or i32 %887, %888 ; [#uses=1] + %890 = inttoptr i32 %889 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %891 = load %struct.edge_rec** %766, align 4 ; <%struct.edge_rec*> [#uses=1] + %892 = ptrtoint %struct.edge_rec* %891 to i32 ; [#uses=2] + %893 = add i32 %892, 16 ; [#uses=1] + %894 = and i32 %893, 63 ; [#uses=1] + %895 = and i32 %892, -64 ; [#uses=1] + %896 = or i32 %894, %895 ; [#uses=1] + %897 = inttoptr i32 %896 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %898 = getelementptr %struct.edge_rec* %897, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %899 = load %struct.edge_rec** %898, align 4 ; <%struct.edge_rec*> [#uses=1] + %900 = getelementptr %struct.edge_rec* %890, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %901 = load %struct.edge_rec** %900, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %899, %struct.edge_rec** %900, align 4 + store %struct.edge_rec* %901, %struct.edge_rec** %898, align 4 + %902 = load %struct.edge_rec** %883, align 4 ; <%struct.edge_rec*> [#uses=1] + %903 = load %struct.edge_rec** %766, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %902, %struct.edge_rec** %766, align 4 + store %struct.edge_rec* %903, %struct.edge_rec** %883, align 4 + %904 = getelementptr %struct.VERTEX* %763, i32 0, i32 0, i32 0 ; [#uses=1] + %905 = load double* %904, align 4 ; [#uses=2] + %906 = getelementptr %struct.VERTEX* %763, i32 0, i32 0, i32 1 ; [#uses=1] + %907 = load double* %906, align 4 ; [#uses=2] + %908 = getelementptr %struct.VERTEX* %extra, i32 0, i32 0, i32 0 ; [#uses=1] + %909 = load double* %908, align 4 ; [#uses=3] + %910 = getelementptr %struct.VERTEX* %extra, i32 0, i32 0, i32 1 ; [#uses=1] + %911 = load double* %910, align 4 ; [#uses=3] + %912 = getelementptr %struct.VERTEX* %tree, i32 0, i32 0, i32 0 ; [#uses=1] + %913 = load double* %912, align 4 ; [#uses=3] + %914 = getelementptr %struct.VERTEX* %tree, i32 0, i32 0, i32 1 ; [#uses=1] + %915 = load double* %914, align 4 ; [#uses=3] + %916 = fsub double %905, %913 ; [#uses=1] + %917 = fsub double %911, %915 ; [#uses=1] + %918 = fmul double %916, %917 ; [#uses=1] + %919 = fsub double %909, %913 ; [#uses=1] + %920 = fsub double %907, %915 ; [#uses=1] + %921 = fmul double %919, %920 ; [#uses=1] + %922 = fsub double %918, %921 ; [#uses=1] + %923 = fcmp ogt double %922, 0.000000e+00 ; [#uses=1] + br i1 %923, label %bb15, label %bb13 + +bb13: ; preds = %bb11 + %924 = fsub double %905, %909 ; [#uses=1] + %925 = fsub double %915, %911 ; [#uses=1] + %926 = fmul double %924, %925 ; [#uses=1] + %927 = fsub double %913, %909 ; [#uses=1] + %928 = fsub double %907, %911 ; [#uses=1] + %929 = fmul double %927, %928 ; [#uses=1] + %930 = fsub double %926, %929 ; [#uses=1] + %931 = fcmp ogt double %930, 0.000000e+00 ; [#uses=1] + br i1 %931, label %bb15, label %bb14 + +bb14: ; preds = %bb13 + %932 = and i32 %850, 63 ; [#uses=1] + %933 = and i32 %849, -64 ; [#uses=3] + %934 = or i32 %932, %933 ; [#uses=1] + %935 = inttoptr i32 %934 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %936 = getelementptr %struct.edge_rec* %935, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %937 = load %struct.edge_rec** %936, align 4 ; <%struct.edge_rec*> [#uses=1] + %938 = ptrtoint %struct.edge_rec* %937 to i32 ; [#uses=2] + %939 = add i32 %938, 16 ; [#uses=1] + %940 = and i32 %939, 63 ; [#uses=1] + %941 = and i32 %938, -64 ; [#uses=1] + %942 = or i32 %940, %941 ; [#uses=1] + %943 = inttoptr i32 %942 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %944 = load %struct.edge_rec** %847, align 4 ; <%struct.edge_rec*> [#uses=1] + %945 = ptrtoint %struct.edge_rec* %944 to i32 ; [#uses=2] + %946 = add i32 %945, 16 ; [#uses=1] + %947 = and i32 %946, 63 ; [#uses=1] + %948 = and i32 %945, -64 ; [#uses=1] + %949 = or i32 %947, %948 ; [#uses=1] + %950 = inttoptr i32 %949 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %951 = getelementptr %struct.edge_rec* %943, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %952 = load %struct.edge_rec** %951, align 4 ; <%struct.edge_rec*> [#uses=1] + %953 = ptrtoint %struct.edge_rec* %952 to i32 ; [#uses=2] + %954 = add i32 %953, 16 ; [#uses=1] + %955 = and i32 %954, 63 ; [#uses=1] + %956 = and i32 %953, -64 ; [#uses=1] + %957 = or i32 %955, %956 ; [#uses=1] + %958 = inttoptr i32 %957 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %959 = getelementptr %struct.edge_rec* %958, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %960 = load %struct.edge_rec** %959, align 4 ; <%struct.edge_rec*> [#uses=1] + %961 = getelementptr %struct.edge_rec* %950, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %962 = load %struct.edge_rec** %961, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %960, %struct.edge_rec** %961, align 4 + store %struct.edge_rec* %962, %struct.edge_rec** %959, align 4 + %963 = load %struct.edge_rec** %847, align 4 ; <%struct.edge_rec*> [#uses=1] + %964 = load %struct.edge_rec** %951, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %963, %struct.edge_rec** %951, align 4 + store %struct.edge_rec* %964, %struct.edge_rec** %847, align 4 + %965 = add i32 %881, 16 ; [#uses=1] + %966 = and i32 %965, 63 ; [#uses=1] + %967 = or i32 %966, %933 ; [#uses=1] + %968 = inttoptr i32 %967 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %969 = getelementptr %struct.edge_rec* %968, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + %970 = load %struct.edge_rec** %969, align 4 ; <%struct.edge_rec*> [#uses=1] + %971 = ptrtoint %struct.edge_rec* %970 to i32 ; [#uses=2] + %972 = add i32 %971, 16 ; [#uses=1] + %973 = and i32 %972, 63 ; [#uses=1] + %974 = and i32 %971, -64 ; [#uses=1] + %975 = or i32 %973, %974 ; [#uses=1] + %976 = inttoptr i32 %975 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %977 = load %struct.edge_rec** %883, align 4 ; <%struct.edge_rec*> [#uses=1] + %978 = ptrtoint %struct.edge_rec* %977 to i32 ; [#uses=2] + %979 = add i32 %978, 16 ; [#uses=1] + %980 = and i32 %979, 63 ; [#uses=1] + %981 = and i32 %978, -64 ; [#uses=1] + %982 = or i32 %980, %981 ; [#uses=1] + %983 = inttoptr i32 %982 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %984 = getelementptr %struct.edge_rec* %976, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=3] + %985 = load %struct.edge_rec** %984, align 4 ; <%struct.edge_rec*> [#uses=1] + %986 = ptrtoint %struct.edge_rec* %985 to i32 ; [#uses=2] + %987 = add i32 %986, 16 ; [#uses=1] + %988 = and i32 %987, 63 ; [#uses=1] + %989 = and i32 %986, -64 ; [#uses=1] + %990 = or i32 %988, %989 ; [#uses=1] + %991 = inttoptr i32 %990 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=1] + %992 = getelementptr %struct.edge_rec* %991, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %993 = load %struct.edge_rec** %992, align 4 ; <%struct.edge_rec*> [#uses=1] + %994 = getelementptr %struct.edge_rec* %983, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=2] + %995 = load %struct.edge_rec** %994, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %993, %struct.edge_rec** %994, align 4 + store %struct.edge_rec* %995, %struct.edge_rec** %992, align 4 + %996 = load %struct.edge_rec** %883, align 4 ; <%struct.edge_rec*> [#uses=1] + %997 = load %struct.edge_rec** %984, align 4 ; <%struct.edge_rec*> [#uses=1] + store %struct.edge_rec* %996, %struct.edge_rec** %984, align 4 + store %struct.edge_rec* %997, %struct.edge_rec** %883, align 4 + %998 = inttoptr i32 %933 to %struct.edge_rec* ; <%struct.edge_rec*> [#uses=2] + %999 = load %struct.edge_rec** @avail_edge, align 4 ; <%struct.edge_rec*> [#uses=1] + %1000 = getelementptr %struct.edge_rec* %998, i32 0, i32 1 ; <%struct.edge_rec**> [#uses=1] + store %struct.edge_rec* %999, %struct.edge_rec** %1000, align 4 + store %struct.edge_rec* %998, %struct.edge_rec** @avail_edge, align 4 + br label %bb15 + +bb15: ; preds = %bb14, %bb13, %bb11, %bb10, %bb6 + %retval.1.0 = phi i32 [ %780, %bb10 ], [ %829, %bb13 ], [ %829, %bb14 ], [ %tmp4, %bb6 ], [ %849, %bb11 ] ; [#uses=1] + %retval.0.0 = phi i32 [ %769, %bb10 ], [ %781, %bb13 ], [ %781, %bb14 ], [ %tmp16, %bb6 ], [ %881, %bb11 ] ; [#uses=1] + %agg.result162 = bitcast %struct.EDGE_PAIR* %agg.result to i64* ; [#uses=1] + %1001 = zext i32 %retval.0.0 to i64 ; [#uses=1] + %1002 = zext i32 %retval.1.0 to i64 ; [#uses=1] + %1003 = shl i64 %1002, 32 ; [#uses=1] + %1004 = or i64 %1003, %1001 ; [#uses=1] + store i64 %1004, i64* %agg.result162, align 4 + ret void +} + +declare arm_apcscc i32 @puts(i8* nocapture) nounwind + +declare arm_apcscc void @exit(i32) noreturn nounwind + +declare arm_apcscc %struct.edge_rec* @alloc_edge() nounwind From gohman at apple.com Mon Jul 20 16:48:58 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 20 Jul 2009 14:48:58 -0700 Subject: [llvm-commits] [llvm] r76385 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPrinter/ lib/Target/CellSPU/AsmPrinter/ lib/Target/CppBackend/ lib/Target/IA64/AsmPrinter/ lib/Target/MSP430/ lib/Target/Mips/AsmPrinter/ lib/Target/PowerPC/AsmPrinter/ lib/Target/Sparc/AsmPrinter/ lib/Target/SystemZ/AsmPrinter/ lib/Target/X86/AsmPrinter/ lib/Target/XCore/ lib/Tr... In-Reply-To: <71E41203-F38F-449A-BF98-EF5C1E486F28@apple.com> References: <200907200103.n6K13chA025017@zion.cs.uiuc.edu> <4A63F2AF.4040106@free.fr> <71E41203-F38F-449A-BF98-EF5C1E486F28@apple.com> Message-ID: <2C2BB6A9-FD06-460B-A3F7-0D0245BFDE7D@apple.com> On Jul 19, 2009, at 10:19 PM, Chris Lattner wrote: > > Right. Private linkage is discarded by the assembler, so they never > make it into the .o file. linker_private is discarded by the linker, > so it never makes it into the .exe/.dylib. I don't think there is a > corresponding idea on ELF, so on ELF they two linkage types should be > codegen'd the same way. How is linker_private different from ELF's hidden visibility? Dan From clattner at apple.com Mon Jul 20 17:00:30 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 15:00:30 -0700 Subject: [llvm-commits] [llvm] r76385 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPrinter/ lib/Target/CellSPU/AsmPrinter/ lib/Target/CppBackend/ lib/Target/IA64/AsmPrinter/ lib/Target/MSP430/ lib/Target/Mips/AsmPrinter/ lib/Target/PowerPC/AsmPrinter/ lib/Target/Sparc/AsmPrinter/ lib/Target/SystemZ/AsmPrinter/ lib/Target/X86/AsmPrinter/ lib/Target/XCore/ lib/Tr... In-Reply-To: <2C2BB6A9-FD06-460B-A3F7-0D0245BFDE7D@apple.com> References: <200907200103.n6K13chA025017@zion.cs.uiuc.edu> <4A63F2AF.4040106@free.fr> <71E41203-F38F-449A-BF98-EF5C1E486F28@apple.com> <2C2BB6A9-FD06-460B-A3F7-0D0245BFDE7D@apple.com> Message-ID: <09258B86-3848-4942-A479-BEC8B20BE435@apple.com> On Jul 20, 2009, at 2:48 PM, Dan Gohman wrote: > > On Jul 19, 2009, at 10:19 PM, Chris Lattner wrote: >> >> Right. Private linkage is discarded by the assembler, so they never >> make it into the .o file. linker_private is discarded by the linker, >> so it never makes it into the .exe/.dylib. I don't think there is a >> corresponding idea on ELF, so on ELF they two linkage types should be >> codegen'd the same way. > > How is linker_private different from ELF's hidden visibility? They are orthogonal concepts. -Chris From greened at obbligato.org Mon Jul 20 17:02:59 2009 From: greened at obbligato.org (David Greene) Date: Mon, 20 Jul 2009 22:02:59 -0000 Subject: [llvm-commits] [llvm] r76486 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/Target/TargetAsmInfo.cpp test/CodeGen/PIC16/ test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll test/CodeGen/PIC16/dg.exp test/CodeGen/Thumb/2009-07-17-PR4566-thumb.ll test/FrontendC++/2009-07-15-LineNumbers.cpp utils/TableGen/AsmWriterEmitter.cpp Message-ID: <200907202203.n6KM30rr015714@zion.cs.uiuc.edu> Author: greened Date: Mon Jul 20 17:02:59 2009 New Revision: 76486 URL: http://llvm.org/viewvc/llvm-project?rev=76486&view=rev Log: Re-apply 75490, 75806 and 76177 with fixes and tests. Efficiency comes next. Added: llvm/trunk/test/CodeGen/PIC16/ llvm/trunk/test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll llvm/trunk/test/CodeGen/PIC16/dg.exp llvm/trunk/test/CodeGen/Thumb/2009-07-17-PR4566-thumb.ll Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h llvm/trunk/lib/Target/TargetAsmInfo.cpp llvm/trunk/test/FrontendC++/2009-07-15-LineNumbers.cpp llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=76486&r1=76485&r2=76486&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Mon Jul 20 17:02:59 2009 @@ -222,6 +222,14 @@ /// assembler. const char *CommentString; // Defaults to "#" + /// FirstOperandColumn - The output column where the first operand + /// should be printed + unsigned FirstOperandColumn; // Defaults to 0 (ignored) + + /// MaxOperandLength - The maximum length of any printed asm + /// operand + unsigned MaxOperandLength; // Defaults to 0 (ignored) + /// GlobalPrefix - If this is set to a non-empty string, it is prepended /// onto all global symbols. This is often used for "_" or ".". const char *GlobalPrefix; // Defaults to "" @@ -691,6 +699,9 @@ const char *getCommentString() const { return CommentString; } + unsigned getOperandColumn(int operand) const { + return FirstOperandColumn + (MaxOperandLength+1)*(operand-1); + } const char *getGlobalPrefix() const { return GlobalPrefix; } Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=76486&r1=76485&r2=76486&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Mon Jul 20 17:02:59 2009 @@ -45,6 +45,8 @@ SeparatorChar = ';'; CommentColumn = 60; CommentString = "#"; + FirstOperandColumn = 0; + MaxOperandLength = 0; GlobalPrefix = ""; PrivateGlobalPrefix = "."; LessPrivateGlobalPrefix = ""; Added: llvm/trunk/test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll?rev=76486&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll (added) +++ llvm/trunk/test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll Mon Jul 20 17:02:59 2009 @@ -0,0 +1,29 @@ +; RUN: llvm-as < %s | llc -march=pic16 | grep {movf \\+ at i + 0, \\+W} + +target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8-f32:32:32" +target triple = "pic16-" + at i = global i32 -10, align 1 ; [#uses=1] + at j = global i32 -20, align 1 ; [#uses=1] + at pc = global i8* inttoptr (i64 160 to i8*), align 1 ; [#uses=3] + at main.auto.k = internal global i32 0 ; [#uses=2] + +define void @main() nounwind { +entry: + %tmp = load i32* @i ; [#uses=1] + %tmp1 = load i32* @j ; [#uses=1] + %add = add i32 %tmp, %tmp1 ; [#uses=1] + store i32 %add, i32* @main.auto.k + %tmp2 = load i32* @main.auto.k ; [#uses=1] + %add3 = add i32 %tmp2, 32 ; [#uses=1] + %conv = trunc i32 %add3 to i8 ; [#uses=1] + %tmp4 = load i8** @pc ; [#uses=1] + store i8 %conv, i8* %tmp4 + %tmp5 = load i8** @pc ; [#uses=1] + %tmp6 = load i8* %tmp5 ; [#uses=1] + %conv7 = sext i8 %tmp6 to i16 ; [#uses=1] + %sub = sub i16 %conv7, 1 ; [#uses=1] + %conv8 = trunc i16 %sub to i8 ; [#uses=1] + %tmp9 = load i8** @pc ; [#uses=1] + store i8 %conv8, i8* %tmp9 + ret void +} Added: llvm/trunk/test/CodeGen/PIC16/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PIC16/dg.exp?rev=76486&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/PIC16/dg.exp (added) +++ llvm/trunk/test/CodeGen/PIC16/dg.exp Mon Jul 20 17:02:59 2009 @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if { [llvm_supports_target PIC16] } { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] +} Added: llvm/trunk/test/CodeGen/Thumb/2009-07-17-PR4566-thumb.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb/2009-07-17-PR4566-thumb.ll?rev=76486&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Thumb/2009-07-17-PR4566-thumb.ll (added) +++ llvm/trunk/test/CodeGen/Thumb/2009-07-17-PR4566-thumb.ll Mon Jul 20 17:02:59 2009 @@ -0,0 +1,2891 @@ +; RUN: llvm-as < %s | llc -march=thumb | grep {rsbs \\+r\[0-9\]\\+, \\+r\[0-9\]\\+, \\+#0} + +target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32" +target triple = "thumbv6-elf" + type { i32 } ; type %0 + %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 } + %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8*, i32 } + %llvm.dbg.composite.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, { }*, { }*, i32 } + %llvm.dbg.derivedtype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, { }* } + %llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1 } + %struct.anon = type { %struct.dwarf_fde* } + %struct.dwarf_cie = type <{ i32, i32, i8, [0 x i8], [3 x i8] }> + %struct.dwarf_eh_bases = type { i8*, i8*, i8* } + %struct.dwarf_fde = type <{ i32, i32, [0 x i8] }> + %struct.fde_accumulator = type { %struct.fde_vector*, %struct.fde_vector* } + %struct.fde_vector = type { i8*, i32, [0 x %struct.dwarf_fde*] } + %struct.object = type { i8*, i8*, i8*, %struct.anon, %0, %struct.object* } + at .str = internal constant [17 x i8] c"unwind-dw2-fde.c\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at .str1 = internal constant [61 x i8] c"/home/asl/proj/llvm/llvm-gcc-4.2/build_arm/gcc/../../src/gcc\00", section "llvm.metadata" ; <[61 x i8]*> [#uses=1] + at .str2 = internal constant [52 x i8] c"4.2.1 (Based on Apple Inc. build 5646) (LLVM build)\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] + at llvm.dbg.compile_unit = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([17 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 true, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str3 = internal constant [14 x i8] c"unsigned char\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str3, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 8, i64 8, i64 0, i32 0, i32 8 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] + at llvm.dbg.derivedtype = internal constant %llvm.dbg.derivedtype.type { i32 458790, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 8, i64 8, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype4 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str5 = internal constant [13 x i8] c"unsigned int\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.basictype6 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str5, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 7 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] + at .str7 = internal constant [9 x i8] c"unwind.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at .str8 = internal constant [57 x i8] c"/home/asl/proj/llvm/llvm-gcc-4.2/build_arm/gcc/./include\00", section "llvm.metadata" ; <[57 x i8]*> [#uses=1] + at llvm.dbg.compile_unit9 = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([9 x i8]* @.str7, i32 0, i32 0), i8* getelementptr ([57 x i8]* @.str8, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str10 = internal constant [13 x i8] c"_Unwind_Word\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype11 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str10, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit9 to { }*), i32 47, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype12 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype11 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype4 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype4 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype12 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str13 = internal constant [12 x i8] c"unwind-pe.h\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.compile_unit14 = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([12 x i8]* @.str13, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str15 = internal constant [13 x i8] c"read_uleb128\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.subprogram = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str15, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str15, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str15, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*), i32 134, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str16 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] + at llvm.dbg.basictype17 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str16, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] + at .str18 = internal constant [12 x i8] c"coretypes.h\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.compile_unit19 = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([12 x i8]* @.str18, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str20 = internal constant [8 x i8] c"wchar_t\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype21 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str20, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit19 to { }*), i32 72, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str22 = internal constant [14 x i8] c"_Unwind_Sword\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype23 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str22, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit9 to { }*), i32 51, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype21 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype24 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype23 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array25 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype4 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype4 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype24 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite26 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array25 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str27 = internal constant [13 x i8] c"read_sleb128\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.subprogram28 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str27, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str27, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str27, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*), i32 156, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite26 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str29 = internal constant [17 x i8] c"unwind-dw2-fde.h\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.compile_unit30 = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([17 x i8]* @.str29, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str31 = internal constant [10 x i8] c"dwarf_cie\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at .str33 = internal constant [12 x i8] c"_Unwind_Ptr\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype34 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str33, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit9 to { }*), i32 53, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype11 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str35 = internal constant [21 x i8] c"_Unwind_Internal_Ptr\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] + at llvm.dbg.derivedtype36 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([21 x i8]* @.str35, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit9 to { }*), i32 59, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype34 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype37 = internal constant %llvm.dbg.derivedtype.type { i32 458790, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype36 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str38 = internal constant [6 x i8] c"uword\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype39 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str38, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 114, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype37 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str40 = internal constant [7 x i8] c"length\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype41 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str40, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 142, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype39 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str42 = internal constant [15 x i8] c"_Unwind_Action\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype43 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str42, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit9 to { }*), i32 115, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype23 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype44 = internal constant %llvm.dbg.derivedtype.type { i32 458790, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype43 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str45 = internal constant [6 x i8] c"sword\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype46 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str45, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 113, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str47 = internal constant [7 x i8] c"CIE_id\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype48 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str47, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 143, i64 32, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype46 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str49 = internal constant [6 x i8] c"ubyte\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype50 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str49, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 141, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str51 = internal constant [8 x i8] c"version\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype52 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str51, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 144, i64 8, i64 8, i64 64, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype50 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array53 = internal constant [0 x { }*] zeroinitializer, section "llvm.metadata" ; <[0 x { }*]*> [#uses=1] + at llvm.dbg.composite54 = internal constant %llvm.dbg.composite.type { i32 458753, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 8, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), { }* bitcast ([0 x { }*]* @llvm.dbg.array53 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str55 = internal constant [13 x i8] c"augmentation\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype56 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str55, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 145, i64 0, i64 8, i64 72, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite54 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array57 = internal constant [4 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype41 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype48 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype52 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype56 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] + at llvm.dbg.composite58 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str31, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 141, i64 96, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array57 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype59 = internal constant %llvm.dbg.derivedtype.type { i32 458790, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 96, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite58 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype60 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype59 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str61 = internal constant [10 x i8] c"dwarf_fde\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype63 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str40, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 151, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype39 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str64 = internal constant [10 x i8] c"CIE_delta\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype65 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str64, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 152, i64 32, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype46 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str67 = internal constant [9 x i8] c"pc_begin\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype68 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str67, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 153, i64 0, i64 8, i64 64, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite54 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array69 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype63 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype65 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype68 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite70 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str61, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 43, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array69 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype71 = internal constant %llvm.dbg.derivedtype.type { i32 458790, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 64, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite70 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype72 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype71 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array73 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype60 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype72 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite74 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array73 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str75 = internal constant [8 x i8] c"get_cie\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.subprogram76 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str75, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str75, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str75, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 162, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite74 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str77 = internal constant [4 x i8] c"fde\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] + at llvm.dbg.derivedtype78 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str77, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 162, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype71 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype79 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str77, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 162, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype78 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype80 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype79 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array81 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite82 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array81 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str83 = internal constant [9 x i8] c"next_fde\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.subprogram84 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str83, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str83, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str83, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 168, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite82 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=0] + at .str85 = internal constant [7 x i8] c"object\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype87 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* null }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype88 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str67, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 48, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str89 = internal constant [6 x i8] c"tbase\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype90 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str89, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 49, i64 32, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str91 = internal constant [6 x i8] c"dbase\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype92 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str91, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 50, i64 32, i64 32, i64 64, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str94 = internal constant [7 x i8] c"single\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype95 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str94, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 52, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype72 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype96 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite70 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype97 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype96 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str98 = internal constant [6 x i8] c"array\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype99 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str98, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 53, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype97 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str100 = internal constant [11 x i8] c"fde_vector\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at .str103 = internal constant [10 x i8] c"orig_data\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype104 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str103, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 41, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str105 = internal constant [18 x i8] c"long unsigned int\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.basictype106 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str105, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 7 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] + at .str107 = internal constant [9 x i8] c"stddef.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.compile_unit108 = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([9 x i8]* @.str107, i32 0, i32 0), i8* getelementptr ([57 x i8]* @.str8, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str109 = internal constant [7 x i8] c"size_t\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype110 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str109, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit108 to { }*), i32 326, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype106 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str111 = internal constant [6 x i8] c"count\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype112 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str111, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 42, i64 32, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype110 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.composite113 = internal constant %llvm.dbg.composite.type { i32 458753, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype72 to { }*), { }* bitcast ([0 x { }*]* @llvm.dbg.array53 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype114 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str98, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 43, i64 0, i64 32, i64 64, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite113 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array115 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype104 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype112 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype114 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite116 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str100, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 40, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array115 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype117 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite116 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str118 = internal constant [5 x i8] c"sort\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.derivedtype119 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([5 x i8]* @.str118, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 54, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype117 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array120 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype95 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype99 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype119 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite121 = internal constant %llvm.dbg.composite.type { i32 458775, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 51, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array120 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str122 = internal constant [2 x i8] c"u\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] + at llvm.dbg.derivedtype123 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str122, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 55, i64 32, i64 32, i64 96, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite121 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str126 = internal constant [7 x i8] c"sorted\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype127 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str126, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 59, i64 1, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype106 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str128 = internal constant [11 x i8] c"from_array\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype129 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str128, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 60, i64 1, i64 32, i64 1, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype106 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str130 = internal constant [15 x i8] c"mixed_encoding\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype131 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str130, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 61, i64 1, i64 32, i64 2, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype106 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str132 = internal constant [9 x i8] c"encoding\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype133 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str132, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 62, i64 8, i64 32, i64 3, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype106 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype134 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str111, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 65, i64 21, i64 32, i64 11, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype106 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array135 = internal constant [5 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype127 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype129 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype131 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype133 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype134 to { }*)], section "llvm.metadata" ; <[5 x { }*]*> [#uses=1] + at llvm.dbg.composite136 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 58, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([5 x { }*]* @llvm.dbg.array135 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str137 = internal constant [2 x i8] c"b\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] + at llvm.dbg.derivedtype138 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str137, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 66, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite136 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str139 = internal constant [2 x i8] c"i\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] + at llvm.dbg.derivedtype140 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str139, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 67, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype110 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array141 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype138 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype140 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite142 = internal constant %llvm.dbg.composite.type { i32 458775, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 57, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array141 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str143 = internal constant [2 x i8] c"s\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] + at llvm.dbg.derivedtype144 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str143, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 68, i64 32, i64 32, i64 128, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite142 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype145 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite149 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str146 = internal constant [5 x i8] c"next\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.derivedtype147 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([5 x i8]* @.str146, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 74, i64 32, i64 32, i64 160, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array148 = internal constant [6 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype88 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype90 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype92 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype123 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype144 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype147 to { }*)], section "llvm.metadata" ; <[6 x { }*]*> [#uses=1] + at llvm.dbg.composite149 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str85, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 47, i64 192, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([6 x { }*]* @llvm.dbg.array148 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.array151 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite152 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array151 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str153 = internal constant [9 x i8] c"last_fde\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.subprogram154 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str153, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str153, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str153, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 176, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite152 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str155 = internal constant [6 x i8] c"saddr\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype156 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str155, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 116, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype46 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype157 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str45, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 113, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype156 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str158 = internal constant [14 x i8] c"gthr-single.h\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.compile_unit159 = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([14 x i8]* @.str158, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str160 = internal constant [18 x i8] c"__gthread_mutex_t\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.derivedtype161 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str160, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit159 to { }*), i32 35, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype157 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype162 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype161 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array163 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype162 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite164 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array163 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str165 = internal constant [21 x i8] c"__gthread_mutex_lock\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] + at llvm.dbg.subprogram166 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([21 x i8]* @.str165, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str165, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str165, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit159 to { }*), i32 220, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite164 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str167 = internal constant [23 x i8] c"__gthread_mutex_unlock\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] + at llvm.dbg.subprogram168 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([23 x i8]* @.str167, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str167, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str167, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit159 to { }*), i32 232, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite164 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array169 = internal constant [5 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*)], section "llvm.metadata" ; <[5 x { }*]*> [#uses=1] + at llvm.dbg.composite170 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([5 x { }*]* @llvm.dbg.array169 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str171 = internal constant [28 x i8] c"__register_frame_info_bases\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] + at llvm.dbg.subprogram172 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([28 x i8]* @.str171, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str171, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str171, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 80, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite170 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at unseen_objects = internal global %struct.object* null ; <%struct.object**> [#uses=15] + at llvm.dbg.array173 = internal constant [3 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite174 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array173 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str175 = internal constant [22 x i8] c"__register_frame_info\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] + at llvm.dbg.subprogram176 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([22 x i8]* @.str175, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str175, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str175, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 106, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite174 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str179 = internal constant [34 x i8] c"__register_frame_info_table_bases\00", section "llvm.metadata" ; <[34 x i8]*> [#uses=1] + at llvm.dbg.subprogram180 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([34 x i8]* @.str179, i32 0, i32 0), i8* getelementptr ([34 x i8]* @.str179, i32 0, i32 0), i8* getelementptr ([34 x i8]* @.str179, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 130, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite170 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str183 = internal constant [28 x i8] c"__register_frame_info_table\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] + at llvm.dbg.subprogram184 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([28 x i8]* @.str183, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str183, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str183, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 150, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite174 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array185 = internal constant [4 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] + at llvm.dbg.composite186 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array185 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str187 = internal constant [22 x i8] c"fde_unencoded_compare\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] + at llvm.dbg.subprogram188 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([22 x i8]* @.str187, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str187, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str187, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 325, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite186 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str189 = internal constant [16 x i8] c"fde_accumulator\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at .str191 = internal constant [7 x i8] c"linear\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype192 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str191, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 389, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype117 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str193 = internal constant [8 x i8] c"erratic\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype194 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str193, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 390, i64 32, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype117 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array195 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype192 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype194 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite196 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str189, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 388, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array195 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype197 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite196 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array198 = internal constant [3 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype197 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite199 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array198 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str200 = internal constant [11 x i8] c"fde_insert\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.subprogram201 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str200, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str200, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str200, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 414, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite199 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=0] + at llvm.dbg.derivedtype202 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite186 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str203 = internal constant [14 x i8] c"fde_compare_t\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype204 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str203, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 388, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype202 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array205 = internal constant [5 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype204 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype117 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype117 to { }*)], section "llvm.metadata" ; <[5 x { }*]*> [#uses=1] + at llvm.dbg.composite206 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([5 x { }*]* @llvm.dbg.array205 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str207 = internal constant [10 x i8] c"fde_split\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.subprogram208 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str207, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str207, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str207, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 434, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite206 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at marker.2702 = internal global %struct.dwarf_fde* null ; <%struct.dwarf_fde**> [#uses=2] + at llvm.dbg.derivedtype209 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array210 = internal constant [6 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype204 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype209 to { }*), { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*)], section "llvm.metadata" ; <[6 x { }*]*> [#uses=1] + at llvm.dbg.composite211 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([6 x { }*]* @llvm.dbg.array210 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str212 = internal constant [15 x i8] c"frame_downheap\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.subprogram213 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str212, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str212, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str212, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 480, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite211 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array214 = internal constant [4 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype204 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype117 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] + at llvm.dbg.composite215 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array214 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str216 = internal constant [15 x i8] c"frame_heapsort\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.subprogram217 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str216, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str216, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str216, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 506, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite215 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str218 = internal constant [10 x i8] c"fde_merge\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.subprogram219 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str218, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str218, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str218, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 538, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite206 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array220 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite221 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array220 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str222 = internal constant [29 x i8] c"binary_search_unencoded_fdes\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] + at llvm.dbg.subprogram223 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([29 x i8]* @.str222, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str222, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str222, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 840, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite221 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array224 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to { }*), { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite225 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array224 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str226 = internal constant [22 x i8] c"size_of_encoded_value\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] + at llvm.dbg.subprogram227 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([22 x i8]* @.str226, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str226, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str226, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*), i32 75, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite225 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array228 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype34 to { }*), { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite229 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array228 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str230 = internal constant [17 x i8] c"base_from_object\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.subprogram231 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str230, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str230, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str230, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 241, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite229 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.derivedtype232 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype34 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array233 = internal constant [5 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype4 to { }*), { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype34 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype4 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype232 to { }*)], section "llvm.metadata" ; <[5 x { }*]*> [#uses=1] + at llvm.dbg.composite234 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([5 x { }*]* @llvm.dbg.array233 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str235 = internal constant [29 x i8] c"read_encoded_value_with_base\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] + at llvm.dbg.subprogram236 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([29 x i8]* @.str235, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str235, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str235, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*), i32 185, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite234 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array237 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype60 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite238 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array237 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str239 = internal constant [17 x i8] c"get_cie_encoding\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.subprogram240 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str239, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str239, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str239, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 266, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite238 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array241 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype110 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite242 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array241 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str243 = internal constant [26 x i8] c"classify_object_over_fdes\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] + at llvm.dbg.subprogram244 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([26 x i8]* @.str243, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str243, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str243, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 599, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite242 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array245 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype72 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite246 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array245 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str247 = internal constant [17 x i8] c"get_fde_encoding\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.subprogram248 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str247, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str247, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str247, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 311, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite246 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array249 = internal constant [4 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype197 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] + at llvm.dbg.composite250 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array249 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str251 = internal constant [9 x i8] c"add_fdes\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.subprogram252 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str251, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str251, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str251, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 654, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite250 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str253 = internal constant [28 x i8] c"fde_single_encoding_compare\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] + at llvm.dbg.subprogram254 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([28 x i8]* @.str253, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str253, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str253, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 338, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite186 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str255 = internal constant [27 x i8] c"fde_mixed_encoding_compare\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] + at llvm.dbg.subprogram256 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([27 x i8]* @.str255, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str255, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str255, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 354, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite186 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str257 = internal constant [34 x i8] c"binary_search_mixed_encoding_fdes\00", section "llvm.metadata" ; <[34 x i8]*> [#uses=1] + at llvm.dbg.subprogram258 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([34 x i8]* @.str257, i32 0, i32 0), i8* getelementptr ([34 x i8]* @.str257, i32 0, i32 0), i8* getelementptr ([34 x i8]* @.str257, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 897, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite221 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str259 = internal constant [35 x i8] c"binary_search_single_encoding_fdes\00", section "llvm.metadata" ; <[35 x i8]*> [#uses=1] + at llvm.dbg.subprogram260 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([35 x i8]* @.str259, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str259, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str259, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 867, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite221 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array261 = internal constant [4 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] + at llvm.dbg.composite262 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array261 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str263 = internal constant [19 x i8] c"linear_search_fdes\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.subprogram264 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str263, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str263, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str263, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 771, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite262 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array265 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype197 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype110 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite266 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array265 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str267 = internal constant [15 x i8] c"start_fde_sort\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.subprogram268 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str267, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str267, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str267, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 395, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite266 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array269 = internal constant [2 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite270 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array269 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str271 = internal constant [23 x i8] c"__register_frame_table\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] + at llvm.dbg.subprogram272 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([23 x i8]* @.str271, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str271, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str271, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 156, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite270 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str273 = internal constant [17 x i8] c"__register_frame\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.subprogram274 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str273, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str273, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str273, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 112, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite270 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array275 = internal constant [4 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype197 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype110 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] + at llvm.dbg.composite276 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array275 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str277 = internal constant [13 x i8] c"end_fde_sort\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.subprogram278 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str277, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str277, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str277, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 564, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite276 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.array279 = internal constant [2 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite280 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array279 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str281 = internal constant [12 x i8] c"init_object\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.subprogram282 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str281, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str281, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str281, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 717, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite280 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str283 = internal constant [14 x i8] c"search_object\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.subprogram284 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str283, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str283, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str283, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 928, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite221 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str285 = internal constant [15 x i8] c"dwarf_eh_bases\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype287 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str89, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 93, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype288 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str91, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 94, i64 32, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str289 = internal constant [5 x i8] c"func\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.derivedtype290 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([5 x i8]* @.str289, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 95, i64 32, i64 32, i64 64, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array291 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype287 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype288 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype290 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite292 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str285, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 92, i64 96, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array291 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype293 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite292 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array294 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype293 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite295 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array294 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str296 = internal constant [17 x i8] c"_Unwind_Find_FDE\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.subprogram297 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str296, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str296, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str296, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 972, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite295 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at seen_objects = internal global %struct.object* null ; <%struct.object**> [#uses=3] + at llvm.dbg.array298 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite299 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array298 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str300 = internal constant [30 x i8] c"__deregister_frame_info_bases\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] + at llvm.dbg.subprogram301 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([30 x i8]* @.str300, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str300, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str300, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 175, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite299 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str302 = internal constant [24 x i8] c"__deregister_frame_info\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] + at llvm.dbg.subprogram303 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([24 x i8]* @.str302, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str302, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str302, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 223, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite299 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str304 = internal constant [19 x i8] c"__deregister_frame\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.subprogram305 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str304, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 229, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite270 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + +define arm_apcscc void @__register_frame_info_bases(i8* %begin, %struct.object* %ob, i8* %tbase, i8* %dbase) nounwind { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram172 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 82, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = icmp eq i8* %begin, null ; [#uses=1] + br i1 %0, label %return, label %bb + +bb: ; preds = %entry + %1 = bitcast i8* %begin to i32* ; [#uses=1] + %2 = load i32* %1, align 4 ; [#uses=1] + %3 = icmp eq i32 %2, 0 ; [#uses=1] + br i1 %3, label %return, label %bb1 + +bb1: ; preds = %bb + tail call void @llvm.dbg.stoppoint(i32 85, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = getelementptr %struct.object* %ob, i32 0, i32 0 ; [#uses=1] + store i8* inttoptr (i64 4294967295 to i8*), i8** %4, align 4 + tail call void @llvm.dbg.stoppoint(i32 86, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %5 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + store i8* %tbase, i8** %5, align 4 + tail call void @llvm.dbg.stoppoint(i32 87, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %6 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + store i8* %dbase, i8** %6, align 4 + tail call void @llvm.dbg.stoppoint(i32 88, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %7 = bitcast i8* %begin to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] + %8 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] + store %struct.dwarf_fde* %7, %struct.dwarf_fde** %8, align 4 + tail call void @llvm.dbg.stoppoint(i32 90, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %9 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=1] + store i32 2040, i32* %9 + tail call void @llvm.dbg.stoppoint(i32 96, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 98, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + %10 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=1] + %11 = getelementptr %struct.object* %ob, i32 0, i32 5 ; <%struct.object**> [#uses=1] + store %struct.object* %10, %struct.object** %11, align 4 + tail call void @llvm.dbg.stoppoint(i32 99, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + store %struct.object* %ob, %struct.object** @unseen_objects, align 4 + tail call void @llvm.dbg.stoppoint(i32 101, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 233, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit159 to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram172 to { }*)) + ret void + +return: ; preds = %bb, %entry + tail call void @llvm.dbg.stoppoint(i32 101, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + ret void +} + +declare void @llvm.dbg.func.start({ }*) nounwind readnone + +declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind readnone + +declare void @llvm.dbg.region.end({ }*) nounwind readnone + +define internal arm_apcscc i8* @read_sleb128(i8* %p, i32* nocapture %val) nounwind { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram28 to { }*)) + br label %bb + +bb: ; preds = %bb, %entry + %indvar = phi i32 [ 0, %entry ], [ %tmp, %bb ] ; [#uses=3] + %result.0 = phi i32 [ 0, %entry ], [ %4, %bb ] ; [#uses=1] + %shift.0 = mul i32 %indvar, 7 ; [#uses=2] + %tmp12 = add i32 %shift.0, 7 ; [#uses=2] + %tmp = add i32 %indvar, 1 ; [#uses=2] + %scevgep = getelementptr i8* %p, i32 %tmp ; [#uses=1] + %p_addr.0 = getelementptr i8* %p, i32 %indvar ; [#uses=1] + %0 = load i8* %p_addr.0, align 1 ; [#uses=2] + %1 = zext i8 %0 to i32 ; [#uses=2] + %2 = and i32 %1, 127 ; [#uses=1] + %3 = shl i32 %2, %shift.0 ; [#uses=1] + %4 = or i32 %3, %result.0 ; [#uses=4] + %5 = icmp slt i8 %0, 0 ; [#uses=1] + br i1 %5, label %bb, label %bb1 + +bb1: ; preds = %bb + tail call void @llvm.dbg.stoppoint(i32 171, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %6 = icmp ugt i32 %tmp12, 31 ; [#uses=1] + br i1 %6, label %bb4, label %bb2 + +bb2: ; preds = %bb1 + %7 = and i32 %1, 64 ; [#uses=1] + %8 = icmp eq i32 %7, 0 ; [#uses=1] + br i1 %8, label %bb4, label %bb3 + +bb3: ; preds = %bb2 + tail call void @llvm.dbg.stoppoint(i32 172, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %9 = shl i32 1, %tmp12 ; [#uses=1] + %10 = sub i32 0, %9 ; [#uses=1] + %11 = or i32 %4, %10 ; [#uses=1] + br label %bb4 + +bb4: ; preds = %bb3, %bb2, %bb1 + %result.1 = phi i32 [ %11, %bb3 ], [ %4, %bb1 ], [ %4, %bb2 ] ; [#uses=1] + tail call void @llvm.dbg.stoppoint(i32 174, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + store i32 %result.1, i32* %val, align 4 + tail call void @llvm.dbg.stoppoint(i32 175, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram28 to { }*)) + ret i8* %scevgep +} + +define arm_apcscc void @__register_frame_info(i8* %begin, %struct.object* %ob) nounwind { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram176 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 107, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram172 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 82, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = icmp eq i8* %begin, null ; [#uses=1] + br i1 %0, label %__register_frame_info_bases.exit, label %bb.i + +bb.i: ; preds = %entry + %1 = bitcast i8* %begin to i32* ; [#uses=1] + %2 = load i32* %1, align 4 ; [#uses=1] + %3 = icmp eq i32 %2, 0 ; [#uses=1] + br i1 %3, label %__register_frame_info_bases.exit, label %bb1.i + +bb1.i: ; preds = %bb.i + tail call void @llvm.dbg.stoppoint(i32 85, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = getelementptr %struct.object* %ob, i32 0, i32 0 ; [#uses=1] + store i8* inttoptr (i64 4294967295 to i8*), i8** %4, align 4 + tail call void @llvm.dbg.stoppoint(i32 86, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %5 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + store i8* null, i8** %5, align 4 + tail call void @llvm.dbg.stoppoint(i32 87, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %6 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + store i8* null, i8** %6, align 4 + tail call void @llvm.dbg.stoppoint(i32 88, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %7 = bitcast i8* %begin to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] + %8 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] + store %struct.dwarf_fde* %7, %struct.dwarf_fde** %8, align 4 + tail call void @llvm.dbg.stoppoint(i32 90, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %9 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=1] + store i32 2040, i32* %9 + tail call void @llvm.dbg.stoppoint(i32 96, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 98, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + %10 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=1] + %11 = getelementptr %struct.object* %ob, i32 0, i32 5 ; <%struct.object**> [#uses=1] + store %struct.object* %10, %struct.object** %11, align 4 + tail call void @llvm.dbg.stoppoint(i32 99, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + store %struct.object* %ob, %struct.object** @unseen_objects, align 4 + tail call void @llvm.dbg.stoppoint(i32 101, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 233, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit159 to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram176 to { }*)) + ret void + +__register_frame_info_bases.exit: ; preds = %bb.i, %entry + tail call void @llvm.dbg.stoppoint(i32 108, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram172 to { }*)) + ret void +} + +define arm_apcscc void @__register_frame_info_table_bases(i8* %begin, %struct.object* %ob, i8* %tbase, i8* %dbase) nounwind { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram180 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 131, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = getelementptr %struct.object* %ob, i32 0, i32 0 ; [#uses=1] + store i8* inttoptr (i64 4294967295 to i8*), i8** %0, align 4 + tail call void @llvm.dbg.stoppoint(i32 132, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %1 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + store i8* %tbase, i8** %1, align 4 + tail call void @llvm.dbg.stoppoint(i32 133, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %2 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + store i8* %dbase, i8** %2, align 4 + tail call void @llvm.dbg.stoppoint(i32 134, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] + %.c = bitcast i8* %begin to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] + store %struct.dwarf_fde* %.c, %struct.dwarf_fde** %3 + tail call void @llvm.dbg.stoppoint(i32 137, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=1] + store i32 2042, i32* %4 + tail call void @llvm.dbg.stoppoint(i32 140, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 142, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + %5 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=1] + %6 = getelementptr %struct.object* %ob, i32 0, i32 5 ; <%struct.object**> [#uses=1] + store %struct.object* %5, %struct.object** %6, align 4 + tail call void @llvm.dbg.stoppoint(i32 143, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + store %struct.object* %ob, %struct.object** @unseen_objects, align 4 + tail call void @llvm.dbg.stoppoint(i32 145, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 146, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram180 to { }*)) + ret void +} + +define arm_apcscc void @__register_frame_info_table(i8* %begin, %struct.object* %ob) nounwind { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram184 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 151, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram180 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 131, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = getelementptr %struct.object* %ob, i32 0, i32 0 ; [#uses=1] + store i8* inttoptr (i64 4294967295 to i8*), i8** %0, align 4 + tail call void @llvm.dbg.stoppoint(i32 132, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %1 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + store i8* null, i8** %1, align 4 + tail call void @llvm.dbg.stoppoint(i32 133, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %2 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + store i8* null, i8** %2, align 4 + tail call void @llvm.dbg.stoppoint(i32 134, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] + %.c.i = bitcast i8* %begin to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] + store %struct.dwarf_fde* %.c.i, %struct.dwarf_fde** %3 + tail call void @llvm.dbg.stoppoint(i32 137, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=1] + store i32 2042, i32* %4 + tail call void @llvm.dbg.stoppoint(i32 140, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 142, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + %5 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=1] + %6 = getelementptr %struct.object* %ob, i32 0, i32 5 ; <%struct.object**> [#uses=1] + store %struct.object* %5, %struct.object** %6, align 4 + tail call void @llvm.dbg.stoppoint(i32 143, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + store %struct.object* %ob, %struct.object** @unseen_objects, align 4 + tail call void @llvm.dbg.stoppoint(i32 145, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 146, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 152, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram180 to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram184 to { }*)) + ret void +} + +define internal arm_apcscc i32 @fde_unencoded_compare(%struct.object* nocapture %ob, %struct.dwarf_fde* nocapture %x, %struct.dwarf_fde* nocapture %y) nounwind readonly { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram188 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 326, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = getelementptr %struct.dwarf_fde* %x, i32 0, i32 2 ; <[0 x i8]*> [#uses=1] + %1 = bitcast [0 x i8]* %0 to i32* ; [#uses=1] + %2 = load i32* %1, align 4 ; [#uses=2] + tail call void @llvm.dbg.stoppoint(i32 327, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = getelementptr %struct.dwarf_fde* %y, i32 0, i32 2 ; <[0 x i8]*> [#uses=1] + %4 = bitcast [0 x i8]* %3 to i32* ; [#uses=1] + %5 = load i32* %4, align 4 ; [#uses=2] + tail call void @llvm.dbg.stoppoint(i32 329, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %6 = icmp ugt i32 %2, %5 ; [#uses=1] + br i1 %6, label %bb4, label %bb1 + +bb1: ; preds = %entry + tail call void @llvm.dbg.stoppoint(i32 331, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %7 = icmp ult i32 %2, %5 ; [#uses=1] + %retval = select i1 %7, i32 -1, i32 0 ; [#uses=1] + ret i32 %retval + +bb4: ; preds = %entry + tail call void @llvm.dbg.stoppoint(i32 333, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + ret i32 1 +} + +define internal arm_apcscc void @frame_downheap(%struct.object* %ob, i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* nocapture %fde_compare, %struct.dwarf_fde** nocapture %a, i32 %lo, i32 %hi) { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram213 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 483, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + br label %bb5 + +bb: ; preds = %bb5 + %0 = add i32 %j.1, 1 ; [#uses=2] + %1 = icmp slt i32 %0, %hi ; [#uses=1] + br i1 %1, label %bb1, label %bb3 + +bb1: ; preds = %bb + %2 = getelementptr %struct.dwarf_fde** %a, i32 %j.1 ; <%struct.dwarf_fde**> [#uses=1] + %3 = load %struct.dwarf_fde** %2, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %4 = getelementptr %struct.dwarf_fde** %a, i32 %0 ; <%struct.dwarf_fde**> [#uses=1] + %5 = load %struct.dwarf_fde** %4, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %6 = tail call arm_apcscc i32 %fde_compare(%struct.object* %ob, %struct.dwarf_fde* %3, %struct.dwarf_fde* %5) ; [#uses=1] + %.lobit = lshr i32 %6, 31 ; [#uses=1] + %.j.1 = add i32 %.lobit, %j.1 ; [#uses=1] + br label %bb3 + +bb3: ; preds = %bb1, %bb + %j.0 = phi i32 [ %.j.1, %bb1 ], [ %j.1, %bb ] ; [#uses=3] + %7 = getelementptr %struct.dwarf_fde** %a, i32 %i.0 ; <%struct.dwarf_fde**> [#uses=3] + %8 = load %struct.dwarf_fde** %7, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %9 = getelementptr %struct.dwarf_fde** %a, i32 %j.0 ; <%struct.dwarf_fde**> [#uses=3] + %10 = load %struct.dwarf_fde** %9, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %11 = tail call arm_apcscc i32 %fde_compare(%struct.object* %ob, %struct.dwarf_fde* %8, %struct.dwarf_fde* %10) ; [#uses=1] + %12 = icmp slt i32 %11, 0 ; [#uses=1] + br i1 %12, label %bb4, label %return + +bb4: ; preds = %bb3 + %13 = load %struct.dwarf_fde** %7, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %14 = load %struct.dwarf_fde** %9, align 4 ; <%struct.dwarf_fde*> [#uses=1] + store %struct.dwarf_fde* %14, %struct.dwarf_fde** %7, align 4 + store %struct.dwarf_fde* %13, %struct.dwarf_fde** %9, align 4 + br label %bb5 + +bb5: ; preds = %bb4, %entry + %j.1.in.in = phi i32 [ %lo, %entry ], [ %j.0, %bb4 ] ; [#uses=1] + %i.0 = phi i32 [ %lo, %entry ], [ %j.0, %bb4 ] ; [#uses=1] + %j.1.in = shl i32 %j.1.in.in, 1 ; [#uses=1] + %j.1 = or i32 %j.1.in, 1 ; [#uses=5] + %15 = icmp slt i32 %j.1, %hi ; [#uses=1] + br i1 %15, label %bb, label %return + +return: ; preds = %bb5, %bb3 + tail call void @llvm.dbg.stoppoint(i32 498, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram213 to { }*)) + ret void +} + +define internal arm_apcscc void @frame_heapsort(%struct.object* %ob, i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* nocapture %fde_compare, %struct.fde_vector* nocapture %erratic) { +entry: + %erratic15 = bitcast %struct.fde_vector* %erratic to i8* ; [#uses=1] + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram217 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 510, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = getelementptr %struct.fde_vector* %erratic, i32 0, i32 2, i32 0 ; <%struct.dwarf_fde**> [#uses=4] + tail call void @llvm.dbg.stoppoint(i32 514, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %1 = getelementptr %struct.fde_vector* %erratic, i32 0, i32 1 ; [#uses=1] + %2 = load i32* %1, align 4 ; [#uses=4] + tail call void @llvm.dbg.stoppoint(i32 520, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = lshr i32 %2, 1 ; [#uses=2] + %m.010 = add i32 %3, -1 ; [#uses=2] + %4 = icmp slt i32 %m.010, 0 ; [#uses=1] + br i1 %4, label %bb4.loopexit, label %bb.nph12 + +bb.nph12: ; preds = %entry + %tmp25 = add i32 %3, -2 ; [#uses=1] + br label %bb + +bb: ; preds = %bb, %bb.nph12 + %indvar21 = phi i32 [ 0, %bb.nph12 ], [ %indvar.next22, %bb ] ; [#uses=3] + %m.011 = sub i32 %m.010, %indvar21 ; [#uses=1] + tail call arm_apcscc void @frame_downheap(%struct.object* %ob, i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* %fde_compare, %struct.dwarf_fde** %0, i32 %m.011, i32 %2) + %m.0 = sub i32 %tmp25, %indvar21 ; [#uses=1] + %5 = icmp slt i32 %m.0, 0 ; [#uses=1] + %indvar.next22 = add i32 %indvar21, 1 ; [#uses=1] + br i1 %5, label %bb4.loopexit, label %bb + +bb.nph: ; preds = %bb4.loopexit + %tmp17 = shl i32 %2, 2 ; [#uses=1] + %tmp18 = add i32 %tmp17, 4 ; [#uses=1] + br label %bb3 + +bb3: ; preds = %bb3, %bb.nph + %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb3 ] ; [#uses=3] + %m.18 = sub i32 %m.17, %indvar ; [#uses=1] + %tmp16 = mul i32 %indvar, -4 ; [#uses=1] + %tmp19 = add i32 %tmp16, %tmp18 ; [#uses=1] + %scevgep = getelementptr i8* %erratic15, i32 %tmp19 ; [#uses=1] + %scevgep20 = bitcast i8* %scevgep to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=2] + %6 = load %struct.dwarf_fde** %0, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %7 = load %struct.dwarf_fde** %scevgep20, align 4 ; <%struct.dwarf_fde*> [#uses=1] + store %struct.dwarf_fde* %7, %struct.dwarf_fde** %0, align 4 + store %struct.dwarf_fde* %6, %struct.dwarf_fde** %scevgep20, align 4 + tail call arm_apcscc void @frame_downheap(%struct.object* %ob, i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* %fde_compare, %struct.dwarf_fde** %0, i32 0, i32 %m.18) + %indvar.next = add i32 %indvar, 1 ; [#uses=2] + %exitcond = icmp eq i32 %indvar.next, %m.17 ; [#uses=1] + br i1 %exitcond, label %return, label %bb3 + +bb4.loopexit: ; preds = %bb, %entry + %m.17 = add i32 %2, -1 ; [#uses=3] + tail call void @llvm.dbg.stoppoint(i32 526, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %8 = icmp sgt i32 %m.17, 0 ; [#uses=1] + br i1 %8, label %bb.nph, label %return + +return: ; preds = %bb4.loopexit, %bb3 + tail call void @llvm.dbg.stoppoint(i32 532, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram217 to { }*)) + ret void +} + +define internal arm_apcscc i32 @size_of_encoded_value(i8 zeroext %encoding) nounwind { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram227 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 76, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %0 = icmp eq i8 %encoding, -1 ; [#uses=1] + br i1 %0, label %bb7, label %bb1 + +bb1: ; preds = %entry + tail call void @llvm.dbg.stoppoint(i32 79, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %1 = zext i8 %encoding to i32 ; [#uses=1] + %2 = and i32 %1, 7 ; [#uses=1] + switch i32 %2, label %bb6 [ + i32 0, label %bb7 + i32 2, label %bb3 + i32 3, label %bb7 + i32 4, label %bb5 + ] + +bb3: ; preds = %bb1 + tail call void @llvm.dbg.stoppoint(i32 84, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram227 to { }*)) + ret i32 2 + +bb5: ; preds = %bb1 + tail call void @llvm.dbg.stoppoint(i32 88, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + ret i32 8 + +bb6: ; preds = %bb1 + tail call void @llvm.dbg.stoppoint(i32 90, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + tail call arm_apcscc void @abort() noreturn nounwind + unreachable + +bb7: ; preds = %bb1, %bb1, %entry + %.0 = phi i32 [ 0, %entry ], [ 4, %bb1 ], [ 4, %bb1 ] ; [#uses=1] + tail call void @llvm.dbg.stoppoint(i32 90, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + ret i32 %.0 +} + +declare arm_apcscc void @abort() noreturn nounwind + +define internal arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %encoding, i32 %base, i8* %p, i32* nocapture %val) nounwind { +entry: + %tmp = alloca i32, align 4 ; [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram236 to { }*)) + call void @llvm.dbg.stoppoint(i32 200, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %0 = icmp eq i8 %encoding, 80 ; [#uses=1] + br i1 %0, label %bb, label %bb2 + +bb: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 203, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %ctg2 = getelementptr i8* %p, i32 3 ; [#uses=1] + %1 = ptrtoint i8* %ctg2 to i32 ; [#uses=1] + %2 = and i32 %1, -4 ; [#uses=2] + call void @llvm.dbg.stoppoint(i32 204, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %3 = inttoptr i32 %2 to i32* ; [#uses=1] + %4 = load i32* %3, align 4 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 205, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %tmp21 = inttoptr i32 %2 to i8* ; [#uses=1] + %5 = getelementptr i8* %tmp21, i32 4 ; [#uses=1] + br label %bb19 + +bb2: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 209, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %6 = zext i8 %encoding to i32 ; [#uses=2] + %7 = and i32 %6, 15 ; [#uses=1] + switch i32 %7, label %bb12 [ + i32 0, label %bb3 + i32 1, label %bb.i + i32 2, label %bb6 + i32 3, label %bb7 + i32 4, label %bb8 + i32 9, label %bb5 + i32 10, label %bb9 + i32 11, label %bb10 + i32 12, label %bb11 + ] + +bb3: ; preds = %bb2 + call void @llvm.dbg.stoppoint(i32 212, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %8 = bitcast i8* %p to i8** ; [#uses=1] + %9 = load i8** %8, align 1 ; [#uses=1] + %10 = ptrtoint i8* %9 to i32 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 213, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %11 = getelementptr i8* %p, i32 4 ; [#uses=1] + br label %bb13 + +bb.i: ; preds = %bb.i, %bb2 + %indvar.i = phi i32 [ 0, %bb2 ], [ %18, %bb.i ] ; [#uses=3] + %result.0.i = phi i32 [ 0, %bb2 ], [ %16, %bb.i ] ; [#uses=1] + %p_addr.0.i = getelementptr i8* %p, i32 %indvar.i ; [#uses=1] + %shift.0.i = mul i32 %indvar.i, 7 ; [#uses=1] + %12 = load i8* %p_addr.0.i, align 1 ; [#uses=2] + %13 = zext i8 %12 to i32 ; [#uses=1] + %14 = and i32 %13, 127 ; [#uses=1] + %15 = shl i32 %14, %shift.0.i ; [#uses=1] + %16 = or i32 %15, %result.0.i ; [#uses=2] + %17 = icmp slt i8 %12, 0 ; [#uses=1] + %18 = add i32 %indvar.i, 1 ; [#uses=2] + br i1 %17, label %bb.i, label %read_uleb128.exit + +read_uleb128.exit: ; preds = %bb.i + %scevgep.i = getelementptr i8* %p, i32 %18 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 220, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) + br label %bb13 + +bb5: ; preds = %bb2 + call void @llvm.dbg.stoppoint(i32 227, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %19 = call arm_apcscc i8* @read_sleb128(i8* %p, i32* %tmp) ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 228, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %20 = load i32* %tmp, align 4 ; [#uses=1] + br label %bb13 + +bb6: ; preds = %bb2 + call void @llvm.dbg.stoppoint(i32 233, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %21 = bitcast i8* %p to i16* ; [#uses=1] + %22 = load i16* %21, align 1 ; [#uses=1] + %23 = zext i16 %22 to i32 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 234, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %24 = getelementptr i8* %p, i32 2 ; [#uses=1] + br label %bb13 + +bb7: ; preds = %bb2 + call void @llvm.dbg.stoppoint(i32 237, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %25 = bitcast i8* %p to i32* ; [#uses=1] + %26 = load i32* %25, align 1 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 238, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %27 = getelementptr i8* %p, i32 4 ; [#uses=1] + br label %bb13 + +bb8: ; preds = %bb2 + call void @llvm.dbg.stoppoint(i32 241, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %28 = bitcast i8* %p to i64* ; [#uses=1] + %29 = load i64* %28, align 1 ; [#uses=1] + %30 = trunc i64 %29 to i32 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %31 = getelementptr i8* %p, i32 8 ; [#uses=1] + br label %bb13 + +bb9: ; preds = %bb2 + call void @llvm.dbg.stoppoint(i32 246, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %32 = bitcast i8* %p to i16* ; [#uses=1] + %33 = load i16* %32, align 1 ; [#uses=1] + %34 = sext i16 %33 to i32 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 247, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %35 = getelementptr i8* %p, i32 2 ; [#uses=1] + br label %bb13 + +bb10: ; preds = %bb2 + call void @llvm.dbg.stoppoint(i32 250, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %36 = bitcast i8* %p to i32* ; [#uses=1] + %37 = load i32* %36, align 1 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 251, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %38 = getelementptr i8* %p, i32 4 ; [#uses=1] + br label %bb13 + +bb11: ; preds = %bb2 + call void @llvm.dbg.stoppoint(i32 254, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %39 = bitcast i8* %p to i64* ; [#uses=1] + %40 = load i64* %39, align 1 ; [#uses=1] + %41 = trunc i64 %40 to i32 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %42 = getelementptr i8* %p, i32 8 ; [#uses=1] + br label %bb13 + +bb12: ; preds = %bb2 + call void @llvm.dbg.stoppoint(i32 259, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + call arm_apcscc void @abort() noreturn nounwind + unreachable + +bb13: ; preds = %bb11, %bb10, %bb9, %bb8, %bb7, %bb6, %bb5, %read_uleb128.exit, %bb3 + %p_addr.1 = phi i8* [ %42, %bb11 ], [ %38, %bb10 ], [ %35, %bb9 ], [ %19, %bb5 ], [ %31, %bb8 ], [ %27, %bb7 ], [ %24, %bb6 ], [ %scevgep.i, %read_uleb128.exit ], [ %11, %bb3 ] ; [#uses=3] + %result.1 = phi i32 [ %41, %bb11 ], [ %37, %bb10 ], [ %34, %bb9 ], [ %20, %bb5 ], [ %30, %bb8 ], [ %26, %bb7 ], [ %23, %bb6 ], [ %16, %read_uleb128.exit ], [ %10, %bb3 ] ; [#uses=3] + call void @llvm.dbg.stoppoint(i32 262, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %43 = icmp eq i32 %result.1, 0 ; [#uses=1] + br i1 %43, label %bb19, label %bb14 + +bb14: ; preds = %bb13 + call void @llvm.dbg.stoppoint(i32 264, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %44 = and i32 %6, 112 ; [#uses=1] + %45 = icmp eq i32 %44, 16 ; [#uses=1] + br i1 %45, label %bb15, label %bb17 + +bb15: ; preds = %bb14 + %46 = ptrtoint i8* %p to i32 ; [#uses=1] + br label %bb17 + +bb17: ; preds = %bb15, %bb14 + %iftmp.9.0 = phi i32 [ %46, %bb15 ], [ %base, %bb14 ] ; [#uses=1] + %47 = add i32 %iftmp.9.0, %result.1 ; [#uses=2] + call void @llvm.dbg.stoppoint(i32 266, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %48 = icmp slt i8 %encoding, 0 ; [#uses=1] + br i1 %48, label %bb18, label %bb19 + +bb18: ; preds = %bb17 + call void @llvm.dbg.stoppoint(i32 267, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + %49 = inttoptr i32 %47 to i32* ; [#uses=1] + %50 = load i32* %49, align 4 ; [#uses=1] + br label %bb19 + +bb19: ; preds = %bb18, %bb17, %bb13, %bb + %p_addr.0 = phi i8* [ %5, %bb ], [ %p_addr.1, %bb18 ], [ %p_addr.1, %bb13 ], [ %p_addr.1, %bb17 ] ; [#uses=1] + %result.0 = phi i32 [ %4, %bb ], [ %50, %bb18 ], [ %result.1, %bb13 ], [ %47, %bb17 ] ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 271, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + store i32 %result.0, i32* %val, align 4 + call void @llvm.dbg.stoppoint(i32 272, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram236 to { }*)) + ret i8* %p_addr.0 +} + +define internal arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %cie) nounwind { +entry: + %cie37 = bitcast %struct.dwarf_cie* %cie to i8* ; [#uses=1] + %stmp = alloca i32, align 4 ; [#uses=1] + %dummy = alloca i32, align 4 ; [#uses=1] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram240 to { }*)) + call void @llvm.dbg.stoppoint(i32 272, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = getelementptr %struct.dwarf_cie* %cie, i32 0, i32 3, i32 0 ; [#uses=2] + call void @llvm.dbg.stoppoint(i32 273, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %1 = load i8* %0, align 1 ; [#uses=1] + %2 = icmp eq i8 %1, 122 ; [#uses=1] + br i1 %2, label %bb1, label %bb13 + +bb1: ; preds = %entry + %3 = call arm_apcscc i32 @strlen(i8* %0) nounwind readonly ; [#uses=2] + call void @llvm.dbg.stoppoint(i32 277, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp38 = add i32 %3, 10 ; [#uses=1] + br label %bb.i + +bb.i: ; preds = %bb.i, %bb1 + %indvar.i = phi i32 [ 0, %bb1 ], [ %6, %bb.i ] ; [#uses=3] + %tmp39 = add i32 %indvar.i, %tmp38 ; [#uses=1] + %p_addr.0.i = getelementptr i8* %cie37, i32 %tmp39 ; [#uses=1] + %4 = load i8* %p_addr.0.i, align 1 ; [#uses=1] + %5 = icmp slt i8 %4, 0 ; [#uses=1] + %6 = add i32 %indvar.i, 1 ; [#uses=1] + br i1 %5, label %bb.i, label %read_uleb128.exit + +read_uleb128.exit: ; preds = %bb.i + call void @llvm.dbg.stoppoint(i32 276, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) + %.sum40 = add i32 %indvar.i, %3 ; [#uses=1] + %.sum31 = add i32 %.sum40, 2 ; [#uses=1] + %scevgep.i = getelementptr %struct.dwarf_cie* %cie, i32 0, i32 3, i32 %.sum31 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 278, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) + %7 = call arm_apcscc i8* @read_sleb128(i8* %scevgep.i, i32* %stmp) ; [#uses=3] + call void @llvm.dbg.stoppoint(i32 279, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %8 = getelementptr %struct.dwarf_cie* %cie, i32 0, i32 2 ; [#uses=1] + %9 = load i8* %8, align 1 ; [#uses=1] + %10 = icmp eq i8 %9, 1 ; [#uses=1] + br i1 %10, label %bb2, label %bb.i20 + +bb2: ; preds = %read_uleb128.exit + call void @llvm.dbg.stoppoint(i32 280, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %11 = getelementptr i8* %7, i32 1 ; [#uses=1] + br label %bb.i28 + +bb.i20: ; preds = %bb.i20, %read_uleb128.exit + %indvar.i15 = phi i32 [ 0, %read_uleb128.exit ], [ %14, %bb.i20 ] ; [#uses=2] + %p_addr.0.i18 = getelementptr i8* %7, i32 %indvar.i15 ; [#uses=1] + %12 = load i8* %p_addr.0.i18, align 1 ; [#uses=1] + %13 = icmp slt i8 %12, 0 ; [#uses=1] + %14 = add i32 %indvar.i15, 1 ; [#uses=2] + br i1 %13, label %bb.i20, label %read_uleb128.exit22 + +read_uleb128.exit22: ; preds = %bb.i20 + %scevgep.i21 = getelementptr i8* %7, i32 %14 ; [#uses=1] + tail call void @llvm.dbg.stoppoint(i32 149, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + br label %bb.i28 + +bb.i28: ; preds = %bb.i28, %read_uleb128.exit22, %bb2 + %p.0.ph = phi i8* [ %11, %bb2 ], [ %scevgep.i21, %read_uleb128.exit22 ], [ %p.0.ph, %bb.i28 ] ; [#uses=3] + %indvar.i23 = phi i32 [ 0, %read_uleb128.exit22 ], [ 0, %bb2 ], [ %17, %bb.i28 ] ; [#uses=2] + %p_addr.0.i26 = getelementptr i8* %p.0.ph, i32 %indvar.i23 ; [#uses=1] + %15 = load i8* %p_addr.0.i26, align 1 ; [#uses=1] + %16 = icmp slt i8 %15, 0 ; [#uses=1] + %17 = add i32 %indvar.i23, 1 ; [#uses=2] + br i1 %16, label %bb.i28, label %read_uleb128.exit30 + +read_uleb128.exit30: ; preds = %bb.i28 + %scevgep.i29 = getelementptr i8* %p.0.ph, i32 %17 ; [#uses=1] + tail call void @llvm.dbg.stoppoint(i32 149, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) + br label %bb5 + +bb5: ; preds = %bb5.backedge, %read_uleb128.exit30 + %indvar = phi i32 [ 1, %read_uleb128.exit30 ], [ %phitmp, %bb5.backedge ] ; [#uses=2] + %p.2 = phi i8* [ %scevgep.i29, %read_uleb128.exit30 ], [ %p.2.be, %bb5.backedge ] ; [#uses=4] + %aug.0 = getelementptr %struct.dwarf_cie* %cie, i32 0, i32 4, i32 %indvar ; [#uses=1] + %18 = load i8* %aug.0, align 1 ; [#uses=1] + switch i8 %18, label %bb13 [ + i8 82, label %bb6 + i8 80, label %bb8 + i8 76, label %bb10 + ] + +bb6: ; preds = %bb5 + call void @llvm.dbg.stoppoint(i32 290, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %19 = load i8* %p.2, align 1 ; [#uses=1] + %20 = zext i8 %19 to i32 ; [#uses=1] + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram240 to { }*)) + ret i32 %20 + +bb8: ; preds = %bb5 + %21 = load i8* %p.2, align 1 ; [#uses=1] + %22 = and i8 %21, 127 ; [#uses=1] + %23 = getelementptr i8* %p.2, i32 1 ; [#uses=1] + %24 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %22, i32 0, i8* %23, i32* %dummy) ; [#uses=1] + br label %bb5.backedge + +bb10: ; preds = %bb5 + %25 = getelementptr i8* %p.2, i32 1 ; [#uses=1] + br label %bb5.backedge + +bb5.backedge: ; preds = %bb10, %bb8 + %p.2.be = phi i8* [ %24, %bb8 ], [ %25, %bb10 ] ; [#uses=1] + %phitmp = add i32 %indvar, 1 ; [#uses=1] + br label %bb5 + +bb13: ; preds = %bb5, %entry + call void @llvm.dbg.stoppoint(i32 305, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + ret i32 0 +} + +declare arm_apcscc i32 @strlen(i8* nocapture) nounwind readonly + +define internal arm_apcscc i32 @classify_object_over_fdes(%struct.object* nocapture %ob, %struct.dwarf_fde* %this_fde) nounwind { +entry: + %pc_begin = alloca i32, align 4 ; [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram244 to { }*)) + call void @llvm.dbg.stoppoint(i32 603, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = getelementptr %struct.object* %ob, i32 0, i32 0 ; [#uses=2] + %1 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=3] + %2 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + %3 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + br label %bb13 + +bb: ; preds = %bb13 + %4 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 1 ; [#uses=2] + %5 = load i32* %4, align 1 ; [#uses=2] + %6 = icmp eq i32 %5, 0 ; [#uses=1] + br i1 %6, label %bb12, label %bb1 + +bb1: ; preds = %bb + %7 = bitcast i32* %4 to i8* ; [#uses=1] + %8 = sub i32 0, %5 ; [#uses=1] + %9 = getelementptr i8* %7, i32 %8 ; [#uses=1] + %10 = bitcast i8* %9 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=5] + %11 = icmp eq %struct.dwarf_cie* %10, %last_cie.2 ; [#uses=1] + br i1 %11, label %bb6, label %bb2 + +bb2: ; preds = %bb1 + %12 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %10) ; [#uses=7] + %13 = trunc i32 %12 to i8 ; [#uses=1] + %14 = icmp eq i8 %13, -1 ; [#uses=1] + br i1 %14, label %base_from_object.exit, label %bb1.i + +bb1.i: ; preds = %bb2 + %15 = and i32 %12, 112 ; [#uses=1] + switch i32 %15, label %bb5.i [ + i32 0, label %base_from_object.exit + i32 16, label %base_from_object.exit + i32 32, label %bb3.i + i32 48, label %bb4.i + i32 80, label %base_from_object.exit + ] + +bb3.i: ; preds = %bb1.i + %16 = load i8** %2, align 4 ; [#uses=1] + %17 = ptrtoint i8* %16 to i32 ; [#uses=1] + br label %base_from_object.exit + +bb4.i: ; preds = %bb1.i + %18 = load i8** %3, align 4 ; [#uses=1] + %19 = ptrtoint i8* %18 to i32 ; [#uses=1] + br label %base_from_object.exit + +bb5.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 605, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to { }*)) + call void @llvm.dbg.stoppoint(i32 616, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) + call void @llvm.dbg.stoppoint(i32 617, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) + call void @llvm.dbg.stoppoint(i32 621, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call arm_apcscc void @abort() noreturn nounwind + unreachable + +base_from_object.exit: ; preds = %bb4.i, %bb3.i, %bb1.i, %bb1.i, %bb1.i, %bb2 + %20 = phi i32 [ %19, %bb4.i ], [ %17, %bb3.i ], [ 0, %bb2 ], [ 0, %bb1.i ], [ 0, %bb1.i ], [ 0, %bb1.i ] ; [#uses=3] + %21 = load i32* %1 ; [#uses=4] + %22 = and i32 %21, 2040 ; [#uses=1] + %23 = icmp eq i32 %22, 2040 ; [#uses=1] + br i1 %23, label %bb3, label %bb4 + +bb3: ; preds = %base_from_object.exit + %24 = shl i32 %12, 3 ; [#uses=1] + %25 = and i32 %24, 2040 ; [#uses=1] + %26 = and i32 %21, -2041 ; [#uses=1] + %27 = or i32 %26, %25 ; [#uses=1] + store i32 %27, i32* %1 + br label %bb6 + +bb4: ; preds = %base_from_object.exit + %28 = lshr i32 %21, 3 ; [#uses=1] + %29 = and i32 %28, 255 ; [#uses=1] + %30 = icmp eq i32 %29, %12 ; [#uses=1] + br i1 %30, label %bb6, label %bb5 + +bb5: ; preds = %bb4 + %31 = or i32 %21, 4 ; [#uses=1] + store i32 %31, i32* %1 + br label %bb6 + +bb6: ; preds = %bb5, %bb4, %bb3, %bb1 + %base.0 = phi i32 [ %20, %bb3 ], [ %20, %bb5 ], [ %base.2, %bb1 ], [ %20, %bb4 ] ; [#uses=4] + %encoding.0 = phi i32 [ %12, %bb3 ], [ %12, %bb5 ], [ %encoding.2, %bb1 ], [ %12, %bb4 ] ; [#uses=4] + %last_cie.0 = phi %struct.dwarf_cie* [ %10, %bb3 ], [ %10, %bb5 ], [ %last_cie.2, %bb1 ], [ %10, %bb4 ] ; <%struct.dwarf_cie*> [#uses=3] + %32 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 2, i32 0 ; [#uses=1] + %33 = trunc i32 %encoding.0 to i8 ; [#uses=2] + %34 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %33, i32 %base.0, i8* %32, i32* %pc_begin) ; [#uses=0] + %35 = call arm_apcscc i32 @size_of_encoded_value(i8 zeroext %33) ; [#uses=2] + %36 = icmp ugt i32 %35, 3 ; [#uses=1] + br i1 %36, label %bb9, label %bb7 + +bb7: ; preds = %bb6 + %37 = shl i32 %35, 3 ; [#uses=1] + %38 = shl i32 1, %37 ; [#uses=1] + %39 = add i32 %38, -1 ; [#uses=1] + br label %bb9 + +bb9: ; preds = %bb7, %bb6 + %mask.0 = phi i32 [ %39, %bb7 ], [ -1, %bb6 ] ; [#uses=1] + %40 = load i32* %pc_begin, align 4 ; [#uses=2] + %41 = and i32 %40, %mask.0 ; [#uses=1] + %42 = icmp eq i32 %41, 0 ; [#uses=1] + br i1 %42, label %bb12, label %bb10 + +bb10: ; preds = %bb9 + %43 = add i32 %count.1, 1 ; [#uses=2] + %44 = load i8** %0, align 4 ; [#uses=1] + %45 = inttoptr i32 %40 to i8* ; [#uses=2] + %46 = icmp ugt i8* %44, %45 ; [#uses=1] + br i1 %46, label %bb11, label %bb12 + +bb11: ; preds = %bb10 + store i8* %45, i8** %0, align 4 + br label %bb12 + +bb12: ; preds = %bb11, %bb10, %bb9, %bb + %base.1 = phi i32 [ %base.0, %bb11 ], [ %base.2, %bb ], [ %base.0, %bb9 ], [ %base.0, %bb10 ] ; [#uses=1] + %encoding.1 = phi i32 [ %encoding.0, %bb11 ], [ %encoding.2, %bb ], [ %encoding.0, %bb9 ], [ %encoding.0, %bb10 ] ; [#uses=1] + %count.0 = phi i32 [ %43, %bb11 ], [ %count.1, %bb ], [ %count.1, %bb9 ], [ %43, %bb10 ] ; [#uses=1] + %last_cie.1 = phi %struct.dwarf_cie* [ %last_cie.0, %bb11 ], [ %last_cie.2, %bb ], [ %last_cie.0, %bb9 ], [ %last_cie.0, %bb10 ] ; <%struct.dwarf_cie*> [#uses=1] + %47 = bitcast %struct.dwarf_fde* %this_fde_addr.0 to i8* ; [#uses=1] + %48 = load i32* %51, align 1 ; [#uses=1] + %.sum.i = add i32 %48, 4 ; [#uses=1] + %49 = getelementptr i8* %47, i32 %.sum.i ; [#uses=1] + %50 = bitcast i8* %49 to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] + br label %bb13 + +bb13: ; preds = %bb12, %entry + %base.2 = phi i32 [ 0, %entry ], [ %base.1, %bb12 ] ; [#uses=2] + %encoding.2 = phi i32 [ 0, %entry ], [ %encoding.1, %bb12 ] ; [#uses=2] + %count.1 = phi i32 [ 0, %entry ], [ %count.0, %bb12 ] ; [#uses=4] + %this_fde_addr.0 = phi %struct.dwarf_fde* [ %this_fde, %entry ], [ %50, %bb12 ] ; <%struct.dwarf_fde*> [#uses=4] + %last_cie.2 = phi %struct.dwarf_cie* [ null, %entry ], [ %last_cie.1, %bb12 ] ; <%struct.dwarf_cie*> [#uses=3] + %51 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 0 ; [#uses=2] + %52 = load i32* %51, align 1 ; [#uses=1] + %53 = icmp eq i32 %52, 0 ; [#uses=1] + br i1 %53, label %bb14, label %bb + +bb14: ; preds = %bb13 + call void @llvm.dbg.stoppoint(i32 605, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to { }*)) + call void @llvm.dbg.stoppoint(i32 649, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram244 to { }*)) + ret i32 %count.1 +} + +define internal arm_apcscc void @add_fdes(%struct.object* nocapture %ob, %struct.fde_accumulator* nocapture %accu, %struct.dwarf_fde* %this_fde) nounwind { +entry: + %pc_begin = alloca i32, align 4 ; [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram252 to { }*)) + call void @llvm.dbg.stoppoint(i32 656, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=2] + %1 = load i32* %0 ; [#uses=1] + %2 = lshr i32 %1, 3 ; [#uses=3] + %3 = and i32 %2, 255 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 657, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = trunc i32 %2 to i8 ; [#uses=1] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %5 = icmp eq i8 %4, -1 ; [#uses=1] + br i1 %5, label %bb12.preheader, label %bb1.i + +bb1.i: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %6 = and i32 %2, 112 ; [#uses=1] + switch i32 %6, label %bb5.i [ + i32 0, label %bb12.preheader + i32 16, label %bb12.preheader + i32 32, label %bb3.i + i32 48, label %bb4.i + i32 80, label %bb12.preheader + ] + +bb12.preheader: ; preds = %bb4.i, %bb3.i, %bb1.i, %bb1.i, %bb1.i, %entry + %base.2.ph = phi i32 [ %15, %bb4.i ], [ %12, %bb3.i ], [ 0, %entry ], [ 0, %bb1.i ], [ 0, %bb1.i ], [ 0, %bb1.i ] ; [#uses=1] + %7 = getelementptr %struct.fde_accumulator* %accu, i32 0, i32 0 ; <%struct.fde_vector**> [#uses=1] + %8 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + %9 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + br label %bb12 + +bb3.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %10 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + %11 = load i8** %10, align 4 ; [#uses=1] + %12 = ptrtoint i8* %11 to i32 ; [#uses=1] + br label %bb12.preheader + +bb4.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %13 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + %14 = load i8** %13, align 4 ; [#uses=1] + %15 = ptrtoint i8* %14 to i32 ; [#uses=1] + br label %bb12.preheader + +bb5.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call arm_apcscc void @abort() noreturn nounwind + unreachable + +bb: ; preds = %bb12 + %16 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 1 ; [#uses=2] + %17 = load i32* %16, align 1 ; [#uses=2] + %18 = icmp eq i32 %17, 0 ; [#uses=1] + br i1 %18, label %bb11, label %bb1 + +bb1: ; preds = %bb + %19 = load i32* %0 ; [#uses=1] + %20 = and i32 %19, 4 ; [#uses=1] + %21 = icmp eq i32 %20, 0 ; [#uses=1] + br i1 %21, label %bb4, label %bb2 + +bb2: ; preds = %bb1 + %22 = bitcast i32* %16 to i8* ; [#uses=1] + %23 = sub i32 0, %17 ; [#uses=1] + %24 = getelementptr i8* %22, i32 %23 ; [#uses=1] + %25 = bitcast i8* %24 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=8] + %26 = icmp eq %struct.dwarf_cie* %25, %last_cie.2 ; [#uses=1] + br i1 %26, label %bb4, label %bb3 + +bb3: ; preds = %bb2 + %27 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %25) ; [#uses=8] + %28 = trunc i32 %27 to i8 ; [#uses=1] + %29 = icmp eq i8 %28, -1 ; [#uses=1] + br i1 %29, label %bb4, label %bb1.i14 + +bb1.i14: ; preds = %bb3 + %30 = and i32 %27, 112 ; [#uses=1] + switch i32 %30, label %bb5.i17 [ + i32 0, label %bb4 + i32 16, label %bb4 + i32 32, label %bb3.i15 + i32 48, label %bb4.i16 + i32 80, label %bb4 + ] + +bb3.i15: ; preds = %bb1.i14 + %31 = load i8** %8, align 4 ; [#uses=1] + %32 = ptrtoint i8* %31 to i32 ; [#uses=1] + br label %bb4 + +bb4.i16: ; preds = %bb1.i14 + %33 = load i8** %9, align 4 ; [#uses=1] + %34 = ptrtoint i8* %33 to i32 ; [#uses=1] + br label %bb4 + +bb5.i17: ; preds = %bb1.i14 + call void @llvm.dbg.stoppoint(i32 659, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to { }*)) + call void @llvm.dbg.stoppoint(i32 671, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) + call void @llvm.dbg.stoppoint(i32 672, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) + call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call arm_apcscc void @abort() noreturn nounwind + unreachable + +bb4: ; preds = %bb4.i16, %bb3.i15, %bb1.i14, %bb1.i14, %bb1.i14, %bb3, %bb2, %bb1 + %base.0 = phi i32 [ %34, %bb4.i16 ], [ %32, %bb3.i15 ], [ %base.2, %bb1 ], [ %base.2, %bb2 ], [ 0, %bb3 ], [ 0, %bb1.i14 ], [ 0, %bb1.i14 ], [ 0, %bb1.i14 ] ; [#uses=5] + %encoding.0 = phi i32 [ %27, %bb3.i15 ], [ %27, %bb4.i16 ], [ %encoding.2, %bb1 ], [ %encoding.2, %bb2 ], [ %27, %bb3 ], [ %27, %bb1.i14 ], [ %27, %bb1.i14 ], [ %27, %bb1.i14 ] ; [#uses=6] + %last_cie.0 = phi %struct.dwarf_cie* [ %25, %bb3.i15 ], [ %25, %bb4.i16 ], [ %last_cie.2, %bb1 ], [ %last_cie.2, %bb2 ], [ %25, %bb3 ], [ %25, %bb1.i14 ], [ %25, %bb1.i14 ], [ %25, %bb1.i14 ] ; <%struct.dwarf_cie*> [#uses=4] + %35 = icmp eq i32 %encoding.0, 0 ; [#uses=1] + br i1 %35, label %bb5, label %bb6 + +bb5: ; preds = %bb4 + %36 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 2 ; <[0 x i8]*> [#uses=1] + %37 = bitcast [0 x i8]* %36 to i32* ; [#uses=1] + %38 = load i32* %37, align 4 ; [#uses=1] + %39 = icmp eq i32 %38, 0 ; [#uses=1] + br i1 %39, label %bb11, label %bb10 + +bb6: ; preds = %bb4 + %40 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 2, i32 0 ; [#uses=1] + %41 = trunc i32 %encoding.0 to i8 ; [#uses=2] + %42 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %41, i32 %base.0, i8* %40, i32* %pc_begin) ; [#uses=0] + %43 = call arm_apcscc i32 @size_of_encoded_value(i8 zeroext %41) ; [#uses=2] + %44 = icmp ugt i32 %43, 3 ; [#uses=1] + br i1 %44, label %bb9, label %bb7 + +bb7: ; preds = %bb6 + %45 = shl i32 %43, 3 ; [#uses=1] + %46 = shl i32 1, %45 ; [#uses=1] + %47 = add i32 %46, -1 ; [#uses=1] + br label %bb9 + +bb9: ; preds = %bb7, %bb6 + %mask.0 = phi i32 [ %47, %bb7 ], [ -1, %bb6 ] ; [#uses=1] + %48 = load i32* %pc_begin, align 4 ; [#uses=1] + %49 = and i32 %48, %mask.0 ; [#uses=1] + %50 = icmp eq i32 %49, 0 ; [#uses=1] + br i1 %50, label %bb11, label %bb10 + +bb10: ; preds = %bb9, %bb5 + %51 = load %struct.fde_vector** %7, align 4 ; <%struct.fde_vector*> [#uses=3] + %52 = icmp eq %struct.fde_vector* %51, null ; [#uses=1] + br i1 %52, label %bb11, label %bb.i + +bb.i: ; preds = %bb10 + %53 = getelementptr %struct.fde_vector* %51, i32 0, i32 1 ; [#uses=2] + %54 = load i32* %53, align 4 ; [#uses=2] + %55 = getelementptr %struct.fde_vector* %51, i32 0, i32 2, i32 %54 ; <%struct.dwarf_fde**> [#uses=1] + store %struct.dwarf_fde* %this_fde_addr.0, %struct.dwarf_fde** %55, align 4 + %56 = add i32 %54, 1 ; [#uses=1] + store i32 %56, i32* %53, align 4 + br label %bb11 + +bb11: ; preds = %bb.i, %bb10, %bb9, %bb5, %bb + %base.1 = phi i32 [ %base.0, %bb.i ], [ %base.2, %bb ], [ %base.0, %bb5 ], [ %base.0, %bb9 ], [ %base.0, %bb10 ] ; [#uses=1] + %encoding.1 = phi i32 [ %encoding.0, %bb.i ], [ %encoding.2, %bb ], [ %encoding.0, %bb5 ], [ %encoding.0, %bb9 ], [ %encoding.0, %bb10 ] ; [#uses=1] + %last_cie.1 = phi %struct.dwarf_cie* [ %last_cie.0, %bb.i ], [ %last_cie.2, %bb ], [ %last_cie.0, %bb5 ], [ %last_cie.0, %bb9 ], [ %last_cie.0, %bb10 ] ; <%struct.dwarf_cie*> [#uses=1] + %57 = bitcast %struct.dwarf_fde* %this_fde_addr.0 to i8* ; [#uses=1] + %58 = load i32* %61, align 1 ; [#uses=1] + %.sum.i = add i32 %58, 4 ; [#uses=1] + %59 = getelementptr i8* %57, i32 %.sum.i ; [#uses=1] + %60 = bitcast i8* %59 to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] + br label %bb12 + +bb12: ; preds = %bb11, %bb12.preheader + %base.2 = phi i32 [ %base.1, %bb11 ], [ %base.2.ph, %bb12.preheader ] ; [#uses=3] + %this_fde_addr.0 = phi %struct.dwarf_fde* [ %60, %bb11 ], [ %this_fde, %bb12.preheader ] ; <%struct.dwarf_fde*> [#uses=6] + %encoding.2 = phi i32 [ %encoding.1, %bb11 ], [ %3, %bb12.preheader ] ; [#uses=3] + %last_cie.2 = phi %struct.dwarf_cie* [ %last_cie.1, %bb11 ], [ null, %bb12.preheader ] ; <%struct.dwarf_cie*> [#uses=4] + %61 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 0 ; [#uses=2] + %62 = load i32* %61, align 1 ; [#uses=1] + %63 = icmp eq i32 %62, 0 ; [#uses=1] + br i1 %63, label %return, label %bb + +return: ; preds = %bb12 + call void @llvm.dbg.stoppoint(i32 659, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to { }*)) + call void @llvm.dbg.stoppoint(i32 708, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram252 to { }*)) + ret void +} + +define internal arm_apcscc i32 @fde_single_encoding_compare(%struct.object* nocapture %ob, %struct.dwarf_fde* %x, %struct.dwarf_fde* %y) nounwind { +entry: + %y_ptr = alloca i32, align 4 ; [#uses=2] + %x_ptr = alloca i32, align 4 ; [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram254 to { }*)) + call void @llvm.dbg.stoppoint(i32 341, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=2] + %1 = load i32* %0 ; [#uses=1] + %2 = lshr i32 %1, 3 ; [#uses=2] + %3 = trunc i32 %2 to i8 ; [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %4 = icmp eq i8 %3, -1 ; [#uses=1] + br i1 %4, label %base_from_object.exit, label %bb1.i + +bb1.i: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %5 = and i32 %2, 112 ; [#uses=1] + switch i32 %5, label %bb5.i [ + i32 0, label %base_from_object.exit + i32 16, label %base_from_object.exit + i32 32, label %bb3.i + i32 48, label %bb4.i + i32 80, label %base_from_object.exit + ] + +bb3.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %6 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + %7 = load i8** %6, align 4 ; [#uses=1] + %8 = ptrtoint i8* %7 to i32 ; [#uses=1] + br label %base_from_object.exit + +bb4.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %9 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + %10 = load i8** %9, align 4 ; [#uses=1] + %11 = ptrtoint i8* %10 to i32 ; [#uses=1] + br label %base_from_object.exit + +bb5.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call arm_apcscc void @abort() noreturn nounwind + unreachable + +base_from_object.exit: ; preds = %bb4.i, %bb3.i, %bb1.i, %bb1.i, %bb1.i, %entry + %12 = phi i32 [ %11, %bb4.i ], [ %8, %bb3.i ], [ 0, %entry ], [ 0, %bb1.i ], [ 0, %bb1.i ], [ 0, %bb1.i ] ; [#uses=2] + call void @llvm.dbg.stoppoint(i32 342, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) + %13 = getelementptr %struct.dwarf_fde* %x, i32 0, i32 2, i32 0 ; [#uses=1] + %14 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %3, i32 %12, i8* %13, i32* %x_ptr) ; [#uses=0] + call void @llvm.dbg.stoppoint(i32 343, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %15 = load i32* %0 ; [#uses=1] + %16 = lshr i32 %15, 3 ; [#uses=1] + %17 = getelementptr %struct.dwarf_fde* %y, i32 0, i32 2, i32 0 ; [#uses=1] + %18 = trunc i32 %16 to i8 ; [#uses=1] + %19 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %18, i32 %12, i8* %17, i32* %y_ptr) ; [#uses=0] + call void @llvm.dbg.stoppoint(i32 345, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %20 = load i32* %x_ptr, align 4 ; [#uses=2] + %21 = load i32* %y_ptr, align 4 ; [#uses=2] + %22 = icmp ugt i32 %20, %21 ; [#uses=1] + br i1 %22, label %bb4, label %bb1 + +bb1: ; preds = %base_from_object.exit + call void @llvm.dbg.stoppoint(i32 347, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %23 = icmp ult i32 %20, %21 ; [#uses=1] + %retval = select i1 %23, i32 -1, i32 0 ; [#uses=1] + ret i32 %retval + +bb4: ; preds = %base_from_object.exit + call void @llvm.dbg.stoppoint(i32 349, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + ret i32 1 +} + +define internal arm_apcscc i32 @fde_mixed_encoding_compare(%struct.object* nocapture %ob, %struct.dwarf_fde* %x, %struct.dwarf_fde* %y) nounwind { +entry: + %y_ptr = alloca i32, align 4 ; [#uses=2] + %x_ptr = alloca i32, align 4 ; [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram256 to { }*)) + call void @llvm.dbg.stoppoint(i32 358, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram248 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 312, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 163, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*)) nounwind + %0 = getelementptr %struct.dwarf_fde* %x, i32 0, i32 1 ; [#uses=2] + %1 = bitcast i32* %0 to i8* ; [#uses=1] + %2 = load i32* %0, align 1 ; [#uses=1] + %3 = sub i32 0, %2 ; [#uses=1] + %4 = getelementptr i8* %1, i32 %3 ; [#uses=1] + %5 = bitcast i8* %4 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=1] + %6 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %5) nounwind ; [#uses=2] + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 359, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram248 to { }*)) + %7 = trunc i32 %6 to i8 ; [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %8 = icmp eq i8 %7, -1 ; [#uses=1] + br i1 %8, label %base_from_object.exit, label %bb1.i + +bb1.i: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %9 = and i32 %6, 112 ; [#uses=1] + switch i32 %9, label %bb5.i [ + i32 0, label %base_from_object.exit + i32 16, label %base_from_object.exit + i32 32, label %bb3.i + i32 48, label %bb4.i + i32 80, label %base_from_object.exit + ] + +bb3.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %10 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + %11 = load i8** %10, align 4 ; [#uses=1] + %12 = ptrtoint i8* %11 to i32 ; [#uses=1] + br label %base_from_object.exit + +bb4.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %13 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + %14 = load i8** %13, align 4 ; [#uses=1] + %15 = ptrtoint i8* %14 to i32 ; [#uses=1] + br label %base_from_object.exit + +bb5.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call arm_apcscc void @abort() noreturn nounwind + unreachable + +base_from_object.exit: ; preds = %bb4.i, %bb3.i, %bb1.i, %bb1.i, %bb1.i, %entry + %16 = phi i32 [ %15, %bb4.i ], [ %12, %bb3.i ], [ 0, %entry ], [ 0, %bb1.i ], [ 0, %bb1.i ], [ 0, %bb1.i ] ; [#uses=1] + %17 = getelementptr %struct.dwarf_fde* %x, i32 0, i32 2, i32 0 ; [#uses=1] + %18 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %7, i32 %16, i8* %17, i32* %x_ptr) ; [#uses=0] + call void @llvm.dbg.stoppoint(i32 362, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) + %19 = getelementptr %struct.dwarf_fde* %y, i32 0, i32 1 ; [#uses=2] + %20 = bitcast i32* %19 to i8* ; [#uses=1] + %21 = load i32* %19, align 1 ; [#uses=1] + %22 = sub i32 0, %21 ; [#uses=1] + %23 = getelementptr i8* %20, i32 %22 ; [#uses=1] + %24 = bitcast i8* %23 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=1] + %25 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %24) nounwind ; [#uses=2] + call void @llvm.dbg.stoppoint(i32 363, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %26 = trunc i32 %25 to i8 ; [#uses=2] + %27 = icmp eq i8 %26, -1 ; [#uses=1] + br i1 %27, label %base_from_object.exit11, label %bb1.i6 + +bb1.i6: ; preds = %base_from_object.exit + call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %28 = and i32 %25, 112 ; [#uses=1] + switch i32 %28, label %bb5.i9 [ + i32 0, label %base_from_object.exit11 + i32 16, label %base_from_object.exit11 + i32 32, label %bb3.i7 + i32 48, label %bb4.i8 + i32 80, label %base_from_object.exit11 + ] + +bb3.i7: ; preds = %bb1.i6 + call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %29 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + %30 = load i8** %29, align 4 ; [#uses=1] + %31 = ptrtoint i8* %30 to i32 ; [#uses=1] + br label %base_from_object.exit11 + +bb4.i8: ; preds = %bb1.i6 + call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %32 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + %33 = load i8** %32, align 4 ; [#uses=1] + %34 = ptrtoint i8* %33 to i32 ; [#uses=1] + br label %base_from_object.exit11 + +bb5.i9: ; preds = %bb1.i6 + call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call arm_apcscc void @abort() noreturn nounwind + unreachable + +base_from_object.exit11: ; preds = %bb4.i8, %bb3.i7, %bb1.i6, %bb1.i6, %bb1.i6, %base_from_object.exit + %35 = phi i32 [ %34, %bb4.i8 ], [ %31, %bb3.i7 ], [ 0, %base_from_object.exit ], [ 0, %bb1.i6 ], [ 0, %bb1.i6 ], [ 0, %bb1.i6 ] ; [#uses=1] + %36 = getelementptr %struct.dwarf_fde* %y, i32 0, i32 2, i32 0 ; [#uses=1] + %37 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %26, i32 %35, i8* %36, i32* %y_ptr) ; [#uses=0] + call void @llvm.dbg.stoppoint(i32 366, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %38 = load i32* %x_ptr, align 4 ; [#uses=2] + %39 = load i32* %y_ptr, align 4 ; [#uses=2] + %40 = icmp ugt i32 %38, %39 ; [#uses=1] + br i1 %40, label %bb4, label %bb1 + +bb1: ; preds = %base_from_object.exit11 + call void @llvm.dbg.stoppoint(i32 368, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %41 = icmp ult i32 %38, %39 ; [#uses=1] + %retval = select i1 %41, i32 -1, i32 0 ; [#uses=1] + ret i32 %retval + +bb4: ; preds = %base_from_object.exit11 + call void @llvm.dbg.stoppoint(i32 370, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + ret i32 1 +} + +define internal arm_apcscc %struct.dwarf_fde* @linear_search_fdes(%struct.object* nocapture %ob, %struct.dwarf_fde* %this_fde, i8* %pc) nounwind { +entry: + %pc_range = alloca i32, align 4 ; [#uses=3] + %pc_begin = alloca i32, align 4 ; [#uses=3] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram264 to { }*)) + call void @llvm.dbg.stoppoint(i32 773, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=2] + %1 = load i32* %0 ; [#uses=1] + %2 = lshr i32 %1, 3 ; [#uses=3] + %3 = and i32 %2, 255 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 774, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = trunc i32 %2 to i8 ; [#uses=1] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %5 = icmp eq i8 %4, -1 ; [#uses=1] + br i1 %5, label %bb13.preheader, label %bb1.i + +bb1.i: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %6 = and i32 %2, 112 ; [#uses=1] + switch i32 %6, label %bb5.i [ + i32 0, label %bb13.preheader + i32 16, label %bb13.preheader + i32 32, label %bb3.i + i32 48, label %bb4.i + i32 80, label %bb13.preheader + ] + +bb13.preheader: ; preds = %bb4.i, %bb3.i, %bb1.i, %bb1.i, %bb1.i, %entry + %base.2.ph = phi i32 [ %15, %bb4.i ], [ %12, %bb3.i ], [ 0, %entry ], [ 0, %bb1.i ], [ 0, %bb1.i ], [ 0, %bb1.i ] ; [#uses=1] + %7 = ptrtoint i8* %pc to i32 ; [#uses=1] + %8 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + %9 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + br label %bb13 + +bb3.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %10 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + %11 = load i8** %10, align 4 ; [#uses=1] + %12 = ptrtoint i8* %11 to i32 ; [#uses=1] + br label %bb13.preheader + +bb4.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %13 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + %14 = load i8** %13, align 4 ; [#uses=1] + %15 = ptrtoint i8* %14 to i32 ; [#uses=1] + br label %bb13.preheader + +bb5.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call arm_apcscc void @abort() noreturn nounwind + unreachable + +bb: ; preds = %bb13 + %16 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 1 ; [#uses=2] + %17 = load i32* %16, align 1 ; [#uses=2] + %18 = icmp eq i32 %17, 0 ; [#uses=1] + br i1 %18, label %bb12, label %bb1 + +bb1: ; preds = %bb + %19 = load i32* %0 ; [#uses=1] + %20 = and i32 %19, 4 ; [#uses=1] + %21 = icmp eq i32 %20, 0 ; [#uses=1] + br i1 %21, label %bb4, label %bb2 + +bb2: ; preds = %bb1 + %22 = bitcast i32* %16 to i8* ; [#uses=1] + %23 = sub i32 0, %17 ; [#uses=1] + %24 = getelementptr i8* %22, i32 %23 ; [#uses=1] + %25 = bitcast i8* %24 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=8] + %26 = icmp eq %struct.dwarf_cie* %25, %last_cie.2 ; [#uses=1] + br i1 %26, label %bb4, label %bb3 + +bb3: ; preds = %bb2 + %27 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %25) ; [#uses=8] + %28 = trunc i32 %27 to i8 ; [#uses=1] + %29 = icmp eq i8 %28, -1 ; [#uses=1] + br i1 %29, label %bb4, label %bb1.i17 + +bb1.i17: ; preds = %bb3 + %30 = and i32 %27, 112 ; [#uses=1] + switch i32 %30, label %bb5.i20 [ + i32 0, label %bb4 + i32 16, label %bb4 + i32 32, label %bb3.i18 + i32 48, label %bb4.i19 + i32 80, label %bb4 + ] + +bb3.i18: ; preds = %bb1.i17 + %31 = load i8** %8, align 4 ; [#uses=1] + %32 = ptrtoint i8* %31 to i32 ; [#uses=1] + br label %bb4 + +bb4.i19: ; preds = %bb1.i17 + %33 = load i8** %9, align 4 ; [#uses=1] + %34 = ptrtoint i8* %33 to i32 ; [#uses=1] + br label %bb4 + +bb5.i20: ; preds = %bb1.i17 + call void @llvm.dbg.stoppoint(i32 776, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to { }*)) + call void @llvm.dbg.stoppoint(i32 789, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) + call void @llvm.dbg.stoppoint(i32 790, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) + call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call arm_apcscc void @abort() noreturn nounwind + unreachable + +bb4: ; preds = %bb4.i19, %bb3.i18, %bb1.i17, %bb1.i17, %bb1.i17, %bb3, %bb2, %bb1 + %base.0 = phi i32 [ %34, %bb4.i19 ], [ %32, %bb3.i18 ], [ %base.2, %bb1 ], [ %base.2, %bb2 ], [ 0, %bb3 ], [ 0, %bb1.i17 ], [ 0, %bb1.i17 ], [ 0, %bb1.i17 ] ; [#uses=4] + %encoding.0 = phi i32 [ %27, %bb3.i18 ], [ %27, %bb4.i19 ], [ %encoding.2, %bb1 ], [ %encoding.2, %bb2 ], [ %27, %bb3 ], [ %27, %bb1.i17 ], [ %27, %bb1.i17 ], [ %27, %bb1.i17 ] ; [#uses=5] + %last_cie.0 = phi %struct.dwarf_cie* [ %25, %bb3.i18 ], [ %25, %bb4.i19 ], [ %last_cie.2, %bb1 ], [ %last_cie.2, %bb2 ], [ %25, %bb3 ], [ %25, %bb1.i17 ], [ %25, %bb1.i17 ], [ %25, %bb1.i17 ] ; <%struct.dwarf_cie*> [#uses=3] + %35 = icmp eq i32 %encoding.0, 0 ; [#uses=1] + br i1 %35, label %bb5, label %bb6 + +bb5: ; preds = %bb4 + %36 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 2 ; <[0 x i8]*> [#uses=1] + %37 = bitcast [0 x i8]* %36 to i32* ; [#uses=2] + %38 = load i32* %37, align 4 ; [#uses=3] + store i32 %38, i32* %pc_begin, align 4 + %39 = getelementptr i32* %37, i32 1 ; [#uses=1] + %40 = load i32* %39, align 4 ; [#uses=1] + store i32 %40, i32* %pc_range, align 4 + %41 = icmp eq i32 %38, 0 ; [#uses=1] + br i1 %41, label %bb12, label %bb10 + +bb6: ; preds = %bb4 + %42 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 2, i32 0 ; [#uses=1] + %43 = trunc i32 %encoding.0 to i8 ; [#uses=3] + %44 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %43, i32 %base.0, i8* %42, i32* %pc_begin) ; [#uses=1] + %45 = and i8 %43, 15 ; [#uses=1] + %46 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %45, i32 0, i8* %44, i32* %pc_range) ; [#uses=0] + %47 = call arm_apcscc i32 @size_of_encoded_value(i8 zeroext %43) ; [#uses=2] + %48 = icmp ugt i32 %47, 3 ; [#uses=1] + br i1 %48, label %bb9, label %bb7 + +bb7: ; preds = %bb6 + %49 = shl i32 %47, 3 ; [#uses=1] + %50 = shl i32 1, %49 ; [#uses=1] + %51 = add i32 %50, -1 ; [#uses=1] + br label %bb9 + +bb9: ; preds = %bb7, %bb6 + %mask.0 = phi i32 [ %51, %bb7 ], [ -1, %bb6 ] ; [#uses=1] + %52 = load i32* %pc_begin, align 4 ; [#uses=2] + %53 = and i32 %52, %mask.0 ; [#uses=1] + %54 = icmp eq i32 %53, 0 ; [#uses=1] + br i1 %54, label %bb12, label %bb10 + +bb10: ; preds = %bb9, %bb5 + %55 = phi i32 [ %38, %bb5 ], [ %52, %bb9 ] ; [#uses=1] + %56 = sub i32 %7, %55 ; [#uses=1] + %57 = load i32* %pc_range, align 4 ; [#uses=1] + %58 = icmp ult i32 %56, %57 ; [#uses=1] + br i1 %58, label %bb15, label %bb12 + +bb12: ; preds = %bb10, %bb9, %bb5, %bb + %base.1 = phi i32 [ %base.2, %bb ], [ %base.0, %bb5 ], [ %base.0, %bb9 ], [ %base.0, %bb10 ] ; [#uses=1] + %encoding.1 = phi i32 [ %encoding.2, %bb ], [ %encoding.0, %bb5 ], [ %encoding.0, %bb9 ], [ %encoding.0, %bb10 ] ; [#uses=1] + %last_cie.1 = phi %struct.dwarf_cie* [ %last_cie.2, %bb ], [ %last_cie.0, %bb5 ], [ %last_cie.0, %bb9 ], [ %last_cie.0, %bb10 ] ; <%struct.dwarf_cie*> [#uses=1] + %59 = bitcast %struct.dwarf_fde* %this_fde_addr.0 to i8* ; [#uses=1] + %60 = load i32* %63, align 1 ; [#uses=1] + %.sum.i = add i32 %60, 4 ; [#uses=1] + %61 = getelementptr i8* %59, i32 %.sum.i ; [#uses=1] + %62 = bitcast i8* %61 to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] + br label %bb13 + +bb13: ; preds = %bb12, %bb13.preheader + %base.2 = phi i32 [ %base.1, %bb12 ], [ %base.2.ph, %bb13.preheader ] ; [#uses=3] + %encoding.2 = phi i32 [ %encoding.1, %bb12 ], [ %3, %bb13.preheader ] ; [#uses=3] + %last_cie.2 = phi %struct.dwarf_cie* [ %last_cie.1, %bb12 ], [ null, %bb13.preheader ] ; <%struct.dwarf_cie*> [#uses=4] + %this_fde_addr.0 = phi %struct.dwarf_fde* [ %62, %bb12 ], [ %this_fde, %bb13.preheader ] ; <%struct.dwarf_fde*> [#uses=6] + %63 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 0 ; [#uses=2] + %64 = load i32* %63, align 1 ; [#uses=1] + %65 = icmp eq i32 %64, 0 ; [#uses=1] + br i1 %65, label %bb15, label %bb + +bb15: ; preds = %bb13, %bb10 + %.0 = phi %struct.dwarf_fde* [ %this_fde_addr.0, %bb10 ], [ null, %bb13 ] ; <%struct.dwarf_fde*> [#uses=1] + call void @llvm.dbg.stoppoint(i32 776, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to { }*)) + call void @llvm.dbg.stoppoint(i32 832, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram264 to { }*)) + ret %struct.dwarf_fde* %.0 +} + +define arm_apcscc void @__register_frame_table(i8* %begin) nounwind { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram272 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 157, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = malloc %struct.object ; <%struct.object*> [#uses=7] + tail call void @llvm.dbg.stoppoint(i32 158, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram184 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 151, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram180 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 131, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %1 = getelementptr %struct.object* %0, i32 0, i32 0 ; [#uses=1] + store i8* inttoptr (i64 4294967295 to i8*), i8** %1, align 4 + tail call void @llvm.dbg.stoppoint(i32 132, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %2 = getelementptr %struct.object* %0, i32 0, i32 1 ; [#uses=1] + store i8* null, i8** %2, align 4 + tail call void @llvm.dbg.stoppoint(i32 133, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = getelementptr %struct.object* %0, i32 0, i32 2 ; [#uses=1] + store i8* null, i8** %3, align 4 + tail call void @llvm.dbg.stoppoint(i32 134, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = getelementptr %struct.object* %0, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] + %.c.i.i = bitcast i8* %begin to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] + store %struct.dwarf_fde* %.c.i.i, %struct.dwarf_fde** %4 + tail call void @llvm.dbg.stoppoint(i32 137, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %5 = getelementptr %struct.object* %0, i32 0, i32 4, i32 0 ; [#uses=1] + store i32 2042, i32* %5 + tail call void @llvm.dbg.stoppoint(i32 140, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 142, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + %6 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=1] + %7 = getelementptr %struct.object* %0, i32 0, i32 5 ; <%struct.object**> [#uses=1] + store %struct.object* %6, %struct.object** %7, align 4 + tail call void @llvm.dbg.stoppoint(i32 143, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + store %struct.object* %0, %struct.object** @unseen_objects, align 4 + tail call void @llvm.dbg.stoppoint(i32 145, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 146, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 152, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram180 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 159, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram184 to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram272 to { }*)) + ret void +} + +define arm_apcscc void @__register_frame(i8* %begin) nounwind { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram274 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 116, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = bitcast i8* %begin to i32* ; [#uses=1] + %1 = load i32* %0, align 4 ; [#uses=1] + %2 = icmp eq i32 %1, 0 ; [#uses=1] + br i1 %2, label %return, label %bb + +bb: ; preds = %entry + tail call void @llvm.dbg.stoppoint(i32 119, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = malloc %struct.object ; <%struct.object*> [#uses=7] + tail call void @llvm.dbg.stoppoint(i32 120, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram176 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 107, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram172 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 82, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = icmp eq i8* %begin, null ; [#uses=1] + br i1 %4, label %__register_frame_info.exit, label %bb.i.i + +bb.i.i: ; preds = %bb + tail call void @llvm.dbg.stoppoint(i32 85, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %5 = getelementptr %struct.object* %3, i32 0, i32 0 ; [#uses=1] + store i8* inttoptr (i64 4294967295 to i8*), i8** %5, align 4 + tail call void @llvm.dbg.stoppoint(i32 86, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %6 = getelementptr %struct.object* %3, i32 0, i32 1 ; [#uses=1] + store i8* null, i8** %6, align 4 + tail call void @llvm.dbg.stoppoint(i32 87, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %7 = getelementptr %struct.object* %3, i32 0, i32 2 ; [#uses=1] + store i8* null, i8** %7, align 4 + tail call void @llvm.dbg.stoppoint(i32 88, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %8 = bitcast i8* %begin to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] + %9 = getelementptr %struct.object* %3, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] + store %struct.dwarf_fde* %8, %struct.dwarf_fde** %9, align 4 + tail call void @llvm.dbg.stoppoint(i32 90, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %10 = getelementptr %struct.object* %3, i32 0, i32 4, i32 0 ; [#uses=1] + store i32 2040, i32* %10 + tail call void @llvm.dbg.stoppoint(i32 96, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 98, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + %11 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=1] + %12 = getelementptr %struct.object* %3, i32 0, i32 5 ; <%struct.object**> [#uses=1] + store %struct.object* %11, %struct.object** %12, align 4 + tail call void @llvm.dbg.stoppoint(i32 99, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + store %struct.object* %3, %struct.object** @unseen_objects, align 4 + tail call void @llvm.dbg.stoppoint(i32 101, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 233, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit159 to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram274 to { }*)) + ret void + +__register_frame_info.exit: ; preds = %bb + ret void + +return: ; preds = %entry + tail call void @llvm.dbg.stoppoint(i32 120, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + ret void +} + +define internal arm_apcscc %struct.dwarf_fde* @search_object(%struct.object* %ob, i8* %pc) { +entry: + %pc_range.i33 = alloca i32, align 4 ; [#uses=2] + %pc_begin.i34 = alloca i32, align 4 ; [#uses=2] + %pc_range.i = alloca i32, align 4 ; [#uses=2] + %pc_begin.i = alloca i32, align 4 ; [#uses=2] + %accu.i = alloca %struct.fde_accumulator, align 4 ; <%struct.fde_accumulator*> [#uses=4] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram284 to { }*)) + call void @llvm.dbg.stoppoint(i32 931, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=7] + %1 = load i32* %0 ; [#uses=6] + %2 = and i32 %1, 1 ; [#uses=1] + %3 = icmp eq i32 %2, 0 ; [#uses=1] + br i1 %3, label %bb, label %bb2 + +bb: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 933, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram282 to { }*)) + call void @llvm.dbg.stoppoint(i32 721, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = lshr i32 %1, 11 ; [#uses=2] + call void @llvm.dbg.stoppoint(i32 722, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %5 = icmp eq i32 %4, 0 ; [#uses=1] + br i1 %5, label %bb.i, label %bb8.i + +bb.i: ; preds = %bb + call void @llvm.dbg.stoppoint(i32 724, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %6 = and i32 %1, 2 ; [#uses=1] + %7 = icmp eq i32 %6, 0 ; [#uses=1] + %8 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=2] + br i1 %7, label %bb5.i, label %bb2.i + +bb2.i: ; preds = %bb.i + call void @llvm.dbg.stoppoint(i32 726, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %9 = load %struct.dwarf_fde** %8 ; <%struct.dwarf_fde*> [#uses=3] + %10 = bitcast %struct.dwarf_fde* %9 to i8* ; [#uses=1] + %11 = bitcast %struct.dwarf_fde* %9 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] + call void @llvm.dbg.stoppoint(i32 727, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %12 = load %struct.dwarf_fde** %11, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %13 = icmp eq %struct.dwarf_fde* %12, null ; [#uses=1] + br i1 %13, label %bb6.i, label %bb3.i + +bb3.i: ; preds = %bb3.i, %bb2.i + %indvar.i = phi i32 [ 0, %bb2.i ], [ %indvar.next.i, %bb3.i ] ; [#uses=3] + %count.221.i = phi i32 [ 0, %bb2.i ], [ %16, %bb3.i ] ; [#uses=1] + %scevgep = getelementptr %struct.dwarf_fde* %9, i32 0, i32 1 ; [#uses=1] + %scevgep60 = getelementptr i32* %scevgep, i32 %indvar.i ; [#uses=1] + %scevgep2728.i = bitcast i32* %scevgep60 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] + %tmp = shl i32 %indvar.i, 2 ; [#uses=1] + %scevgep62 = getelementptr i8* %10, i32 %tmp ; [#uses=1] + %p1.020.i = bitcast i8* %scevgep62 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] + %14 = load %struct.dwarf_fde** %p1.020.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %15 = call arm_apcscc i32 @classify_object_over_fdes(%struct.object* %ob, %struct.dwarf_fde* %14) ; [#uses=1] + %16 = add i32 %15, %count.221.i ; [#uses=2] + %17 = load %struct.dwarf_fde** %scevgep2728.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %18 = icmp eq %struct.dwarf_fde* %17, null ; [#uses=1] + %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=1] + br i1 %18, label %bb6.i, label %bb3.i + +bb5.i: ; preds = %bb.i + call void @llvm.dbg.stoppoint(i32 731, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %19 = load %struct.dwarf_fde** %8, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %20 = call arm_apcscc i32 @classify_object_over_fdes(%struct.object* %ob, %struct.dwarf_fde* %19) ; [#uses=1] + br label %bb6.i + +bb6.i: ; preds = %bb5.i, %bb3.i, %bb2.i + %count.0.i = phi i32 [ %20, %bb5.i ], [ 0, %bb2.i ], [ %16, %bb3.i ] ; [#uses=5] + call void @llvm.dbg.stoppoint(i32 738, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %21 = load i32* %0 ; [#uses=1] + %22 = shl i32 %count.0.i, 11 ; [#uses=1] + %23 = and i32 %21, 2047 ; [#uses=4] + %24 = or i32 %23, %22 ; [#uses=3] + store i32 %24, i32* %0 + call void @llvm.dbg.stoppoint(i32 739, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %25 = and i32 %count.0.i, 2097151 ; [#uses=1] + %26 = icmp eq i32 %25, %count.0.i ; [#uses=1] + br i1 %26, label %bb8.i, label %bb7.i + +bb7.i: ; preds = %bb6.i + call void @llvm.dbg.stoppoint(i32 740, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + store i32 %23, i32* %0 + br label %bb8.i + +bb8.i: ; preds = %bb7.i, %bb6.i, %bb + %.rle121 = phi i32 [ %23, %bb7.i ], [ %1, %bb ], [ %24, %bb6.i ] ; [#uses=2] + %27 = phi i32 [ %23, %bb7.i ], [ %1, %bb ], [ %24, %bb6.i ] ; [#uses=1] + %count.1.i = phi i32 [ %count.0.i, %bb7.i ], [ %4, %bb ], [ %count.0.i, %bb6.i ] ; [#uses=4] + call void @llvm.dbg.stoppoint(i32 743, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram268 to { }*)) + call void @llvm.dbg.stoppoint(i32 397, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %28 = icmp eq i32 %count.1.i, 0 ; [#uses=1] + br i1 %28, label %init_object.exit, label %bb1.i.i + +bb1.i.i: ; preds = %bb8.i + call void @llvm.dbg.stoppoint(i32 400, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %29 = shl i32 %count.1.i, 2 ; [#uses=1] + %30 = add i32 %29, 8 ; [#uses=2] + call void @llvm.dbg.stoppoint(i32 401, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %31 = malloc i8, i32 %30 ; [#uses=3] + %32 = bitcast i8* %31 to %struct.fde_vector* ; <%struct.fde_vector*> [#uses=1] + %33 = getelementptr %struct.fde_accumulator* %accu.i, i32 0, i32 0 ; <%struct.fde_vector**> [#uses=6] + store %struct.fde_vector* %32, %struct.fde_vector** %33, align 4 + %34 = icmp eq i8* %31, null ; [#uses=1] + br i1 %34, label %init_object.exit, label %bb2.i.i + +bb2.i.i: ; preds = %bb1.i.i + call void @llvm.dbg.stoppoint(i32 403, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %35 = getelementptr i8* %31, i32 4 ; [#uses=1] + %36 = bitcast i8* %35 to i32* ; [#uses=1] + store i32 0, i32* %36, align 4 + call void @llvm.dbg.stoppoint(i32 404, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %37 = malloc i8, i32 %30 ; [#uses=3] + %38 = bitcast i8* %37 to %struct.fde_vector* ; <%struct.fde_vector*> [#uses=1] + %39 = getelementptr %struct.fde_accumulator* %accu.i, i32 0, i32 1 ; <%struct.fde_vector**> [#uses=5] + store %struct.fde_vector* %38, %struct.fde_vector** %39, align 4 + %40 = icmp eq i8* %37, null ; [#uses=1] + br i1 %40, label %bb9.i, label %start_fde_sort.exit.thread.i + +start_fde_sort.exit.thread.i: ; preds = %bb2.i.i + call void @llvm.dbg.stoppoint(i32 405, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %41 = getelementptr i8* %37, i32 4 ; [#uses=1] + %42 = bitcast i8* %41 to i32* ; [#uses=1] + store i32 0, i32* %42, align 4 + br label %bb9.i + +bb9.i: ; preds = %start_fde_sort.exit.thread.i, %bb2.i.i + call void @llvm.dbg.stoppoint(i32 746, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %43 = and i32 %27, 2 ; [#uses=1] + %44 = icmp eq i32 %43, 0 ; [#uses=1] + %45 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=4] + br i1 %44, label %bb13.i, label %bb10.i + +bb10.i: ; preds = %bb9.i + call void @llvm.dbg.stoppoint(i32 749, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %46 = load %struct.dwarf_fde** %45 ; <%struct.dwarf_fde*> [#uses=3] + %47 = bitcast %struct.dwarf_fde* %46 to i8* ; [#uses=1] + %48 = bitcast %struct.dwarf_fde* %46 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] + %49 = load %struct.dwarf_fde** %48, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %50 = icmp eq %struct.dwarf_fde* %49, null ; [#uses=1] + br i1 %50, label %bb14.i, label %bb11.i + +bb11.i: ; preds = %bb11.i, %bb10.i + %indvar29.i = phi i32 [ 0, %bb10.i ], [ %indvar.next30.i, %bb11.i ] ; [#uses=3] + %scevgep64 = getelementptr %struct.dwarf_fde* %46, i32 0, i32 1 ; [#uses=1] + %scevgep65 = getelementptr i32* %scevgep64, i32 %indvar29.i ; [#uses=1] + %scevgep3536.i = bitcast i32* %scevgep65 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] + %tmp67 = shl i32 %indvar29.i, 2 ; [#uses=1] + %scevgep68 = getelementptr i8* %47, i32 %tmp67 ; [#uses=1] + %p.023.i = bitcast i8* %scevgep68 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] + %51 = load %struct.dwarf_fde** %p.023.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] + call arm_apcscc void @add_fdes(%struct.object* %ob, %struct.fde_accumulator* %accu.i, %struct.dwarf_fde* %51) + %52 = load %struct.dwarf_fde** %scevgep3536.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %53 = icmp eq %struct.dwarf_fde* %52, null ; [#uses=1] + %indvar.next30.i = add i32 %indvar29.i, 1 ; [#uses=1] + br i1 %53, label %bb14.i, label %bb11.i + +bb13.i: ; preds = %bb9.i + call void @llvm.dbg.stoppoint(i32 753, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %54 = load %struct.dwarf_fde** %45, align 4 ; <%struct.dwarf_fde*> [#uses=1] + call arm_apcscc void @add_fdes(%struct.object* %ob, %struct.fde_accumulator* %accu.i, %struct.dwarf_fde* %54) + br label %bb14.i + +bb14.i: ; preds = %bb13.i, %bb11.i, %bb10.i + call void @llvm.dbg.stoppoint(i32 755, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram278 to { }*)) + call void @llvm.dbg.stoppoint(i32 567, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %55 = load %struct.fde_vector** %33, align 4 ; <%struct.fde_vector*> [#uses=8] + %56 = icmp eq %struct.fde_vector* %55, null ; [#uses=1] + br i1 %56, label %bb2.i17.i, label %bb.i.i + +bb.i.i: ; preds = %bb14.i + %57 = getelementptr %struct.fde_vector* %55, i32 0, i32 1 ; [#uses=1] + %58 = load i32* %57, align 4 ; [#uses=1] + %59 = icmp eq i32 %58, %count.1.i ; [#uses=1] + br i1 %59, label %bb2.i17.i, label %bb1.i16.i + +bb1.i16.i: ; preds = %bb.i.i + call arm_apcscc void @abort() noreturn nounwind + unreachable + +bb2.i17.i: ; preds = %bb.i.i, %bb14.i + call void @llvm.dbg.stoppoint(i32 569, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %60 = load i32* %0 ; [#uses=2] + %61 = and i32 %60, 4 ; [#uses=1] + %62 = icmp eq i32 %61, 0 ; [#uses=1] + br i1 %62, label %bb4.i.i, label %bb7.i.i + +bb4.i.i: ; preds = %bb2.i17.i + call void @llvm.dbg.stoppoint(i32 571, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %63 = and i32 %60, 2040 ; [#uses=1] + %64 = icmp eq i32 %63, 0 ; [#uses=1] + br i1 %64, label %bb7.i.i, label %bb6.i18.i + +bb6.i18.i: ; preds = %bb4.i.i + call void @llvm.dbg.stoppoint(i32 574, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + br label %bb7.i.i + +bb7.i.i: ; preds = %bb6.i18.i, %bb4.i.i, %bb2.i17.i + %fde_compare.0.i.i = phi i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* [ @fde_single_encoding_compare, %bb6.i18.i ], [ @fde_mixed_encoding_compare, %bb2.i17.i ], [ @fde_unencoded_compare, %bb4.i.i ] ; [#uses=4] + call void @llvm.dbg.stoppoint(i32 576, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %65 = load %struct.fde_vector** %39, align 4 ; <%struct.fde_vector*> [#uses=5] + %66 = icmp eq %struct.fde_vector* %65, null ; [#uses=1] + br i1 %66, label %bb11.i.i, label %bb8.i.i + +bb8.i.i: ; preds = %bb7.i.i + call void @llvm.dbg.stoppoint(i32 578, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram208 to { }*)) + call void @llvm.dbg.stoppoint(i32 436, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %67 = getelementptr %struct.fde_vector* %55, i32 0, i32 1 ; [#uses=2] + %68 = load i32* %67, align 4 ; [#uses=3] + call void @llvm.dbg.stoppoint(i32 445, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %69 = icmp eq i32 %68, 0 ; [#uses=2] + br i1 %69, label %fde_split.exit.i.i, label %bb.nph20.i.i.i + +bb1.i.i.i: ; preds = %bb3.i.i.i + %70 = ptrtoint %struct.dwarf_fde** %probe.0.i.i.i to i32 ; [#uses=1] + %71 = sub i32 %70, %84 ; [#uses=1] + %72 = ashr i32 %71, 2 ; [#uses=1] + %73 = getelementptr %struct.fde_vector* %65, i32 0, i32 2, i32 %72 ; <%struct.dwarf_fde**> [#uses=2] + %74 = load %struct.dwarf_fde** %73, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %75 = bitcast %struct.dwarf_fde* %74 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=2] + store %struct.dwarf_fde* null, %struct.dwarf_fde** %73, align 4 + br label %bb2.i.i.i + +bb2.i.i.i: ; preds = %bb2.preheader.i.i.i, %bb1.i.i.i + %probe.0.i.i.i = phi %struct.dwarf_fde** [ %75, %bb1.i.i.i ], [ %chain_end.119.i.i.i, %bb2.preheader.i.i.i ] ; <%struct.dwarf_fde**> [#uses=3] + %chain_end.0.i.i.i = phi %struct.dwarf_fde** [ %75, %bb1.i.i.i ], [ %chain_end.119.i.i.i, %bb2.preheader.i.i.i ] ; <%struct.dwarf_fde**> [#uses=1] + %76 = icmp eq %struct.dwarf_fde** %probe.0.i.i.i, @marker.2702 ; [#uses=1] + br i1 %76, label %bb4.i.i.i, label %bb3.i.i.i + +bb3.i.i.i: ; preds = %bb2.i.i.i + %scevgep333437.i.i.i = load i8** %scevgep33.i.i.i ; [#uses=1] + %77 = bitcast i8* %scevgep333437.i.i.i to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] + %78 = load %struct.dwarf_fde** %probe.0.i.i.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %79 = call arm_apcscc i32 %fde_compare.0.i.i(%struct.object* %ob, %struct.dwarf_fde* %77, %struct.dwarf_fde* %78) ; [#uses=1] + %80 = icmp slt i32 %79, 0 ; [#uses=1] + br i1 %80, label %bb1.i.i.i, label %bb4.i.i.i + +bb4.i.i.i: ; preds = %bb3.i.i.i, %bb2.i.i.i + %.c.i.i.i = bitcast %struct.dwarf_fde** %chain_end.0.i.i.i to i8* ; [#uses=1] + store i8* %.c.i.i.i, i8** %scevgep30.i.i.i + %81 = getelementptr %struct.fde_vector* %55, i32 0, i32 2, i32 %i.018.i.i.i ; <%struct.dwarf_fde**> [#uses=1] + %82 = add i32 %i.018.i.i.i, 1 ; [#uses=2] + %exitcond77 = icmp eq i32 %82, %umax76 ; [#uses=1] + br i1 %exitcond77, label %bb11.loopexit.i.i.i, label %bb2.preheader.i.i.i + +bb.nph20.i.i.i: ; preds = %bb8.i.i + %83 = getelementptr %struct.fde_vector* %55, i32 0, i32 2 ; <[0 x %struct.dwarf_fde*]*> [#uses=1] + %84 = ptrtoint [0 x %struct.dwarf_fde*]* %83 to i32 ; [#uses=1] + %tmp75 = icmp ugt i32 %68, 1 ; [#uses=1] + %umax76 = select i1 %tmp75, i32 %68, i32 1 ; [#uses=2] + br label %bb2.preheader.i.i.i + +bb2.preheader.i.i.i: ; preds = %bb.nph20.i.i.i, %bb4.i.i.i + %chain_end.119.i.i.i = phi %struct.dwarf_fde** [ @marker.2702, %bb.nph20.i.i.i ], [ %81, %bb4.i.i.i ] ; <%struct.dwarf_fde**> [#uses=2] + %i.018.i.i.i = phi i32 [ 0, %bb.nph20.i.i.i ], [ %82, %bb4.i.i.i ] ; [#uses=4] + %scevgep78 = getelementptr %struct.fde_vector* %55, i32 1, i32 0 ; [#uses=2] + %scevgep33.i.i.i = getelementptr i8** %scevgep78, i32 %i.018.i.i.i ; [#uses=1] + %scevgep80 = getelementptr %struct.fde_vector* %65, i32 1, i32 0 ; [#uses=2] + %scevgep30.i.i.i = getelementptr i8** %scevgep80, i32 %i.018.i.i.i ; [#uses=1] + br label %bb2.i.i.i + +bb7.i.i.i: ; preds = %bb11.loopexit.i.i.i, %bb10.i.i.i + %i.115.i.i.i = phi i32 [ %91, %bb10.i.i.i ], [ 0, %bb11.loopexit.i.i.i ] ; [#uses=3] + %j.114.i.i.i = phi i32 [ %j.0.i.i.i, %bb10.i.i.i ], [ 0, %bb11.loopexit.i.i.i ] ; [#uses=3] + %k.113.i.i.i = phi i32 [ %k.0.i.i.i, %bb10.i.i.i ], [ 0, %bb11.loopexit.i.i.i ] ; [#uses=3] + %scevgep24.i.i.i = getelementptr i8** %scevgep80, i32 %i.115.i.i.i ; [#uses=1] + %scevgep21.i.i.i = getelementptr i8** %scevgep78, i32 %i.115.i.i.i ; [#uses=1] + %scevgep242536.i.i.i = load i8** %scevgep24.i.i.i ; [#uses=1] + %85 = icmp eq i8* %scevgep242536.i.i.i, null ; [#uses=1] + %scevgep212235.i.i.i = load i8** %scevgep21.i.i.i ; [#uses=1] + %86 = bitcast i8* %scevgep212235.i.i.i to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=2] + br i1 %85, label %bb9.i.i.i, label %bb8.i.i.i + +bb8.i.i.i: ; preds = %bb7.i.i.i + %87 = getelementptr %struct.fde_vector* %55, i32 0, i32 2, i32 %j.114.i.i.i ; <%struct.dwarf_fde**> [#uses=1] + store %struct.dwarf_fde* %86, %struct.dwarf_fde** %87, align 4 + %88 = add i32 %j.114.i.i.i, 1 ; [#uses=1] + br label %bb10.i.i.i + +bb9.i.i.i: ; preds = %bb7.i.i.i + %89 = getelementptr %struct.fde_vector* %65, i32 0, i32 2, i32 %k.113.i.i.i ; <%struct.dwarf_fde**> [#uses=1] + store %struct.dwarf_fde* %86, %struct.dwarf_fde** %89, align 4 + %90 = add i32 %k.113.i.i.i, 1 ; [#uses=1] + br label %bb10.i.i.i + +bb10.i.i.i: ; preds = %bb9.i.i.i, %bb8.i.i.i + %k.0.i.i.i = phi i32 [ %k.113.i.i.i, %bb8.i.i.i ], [ %90, %bb9.i.i.i ] ; [#uses=2] + %j.0.i.i.i = phi i32 [ %88, %bb8.i.i.i ], [ %j.114.i.i.i, %bb9.i.i.i ] ; [#uses=2] + %91 = add i32 %i.115.i.i.i, 1 ; [#uses=2] + %exitcond = icmp eq i32 %91, %umax76 ; [#uses=1] + br i1 %exitcond, label %fde_split.exit.i.i, label %bb7.i.i.i + +bb11.loopexit.i.i.i: ; preds = %bb4.i.i.i + call void @llvm.dbg.stoppoint(i32 463, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + br i1 %69, label %fde_split.exit.i.i, label %bb7.i.i.i + +fde_split.exit.i.i: ; preds = %bb11.loopexit.i.i.i, %bb10.i.i.i, %bb8.i.i + %j.1.lcssa.i.i.i = phi i32 [ 0, %bb8.i.i ], [ 0, %bb11.loopexit.i.i.i ], [ %j.0.i.i.i, %bb10.i.i.i ] ; [#uses=1] + %k.1.lcssa.i.i.i = phi i32 [ 0, %bb8.i.i ], [ 0, %bb11.loopexit.i.i.i ], [ %k.0.i.i.i, %bb10.i.i.i ] ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 468, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + store i32 %j.1.lcssa.i.i.i, i32* %67, align 4 + call void @llvm.dbg.stoppoint(i32 469, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %92 = getelementptr %struct.fde_vector* %65, i32 0, i32 1 ; [#uses=1] + store i32 %k.1.lcssa.i.i.i, i32* %92, align 4 + call void @llvm.dbg.stoppoint(i32 579, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram208 to { }*)) + %93 = load %struct.fde_vector** %33, align 4 ; <%struct.fde_vector*> [#uses=1] + %94 = getelementptr %struct.fde_vector* %93, i32 0, i32 1 ; [#uses=1] + %95 = load i32* %94, align 4 ; [#uses=1] + %96 = load %struct.fde_vector** %39, align 4 ; <%struct.fde_vector*> [#uses=2] + %97 = getelementptr %struct.fde_vector* %96, i32 0, i32 1 ; [#uses=1] + %98 = load i32* %97, align 4 ; [#uses=1] + %99 = add i32 %98, %95 ; [#uses=1] + %100 = icmp eq i32 %99, %count.1.i ; [#uses=1] + br i1 %100, label %bb10.i.i, label %bb9.i.i + +bb9.i.i: ; preds = %fde_split.exit.i.i + call arm_apcscc void @abort() noreturn nounwind + unreachable + +bb10.i.i: ; preds = %fde_split.exit.i.i + call void @llvm.dbg.stoppoint(i32 580, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call arm_apcscc void @frame_heapsort(%struct.object* %ob, i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* %fde_compare.0.i.i, %struct.fde_vector* %96) + call void @llvm.dbg.stoppoint(i32 581, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %101 = load %struct.fde_vector** %33, align 4 ; <%struct.fde_vector*> [#uses=3] + %v19.i.i.i = bitcast %struct.fde_vector* %101 to i8* ; [#uses=2] + %102 = load %struct.fde_vector** %39, align 4 ; <%struct.fde_vector*> [#uses=3] + %v230.i.i.i = bitcast %struct.fde_vector* %102 to i8* ; [#uses=1] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram219 to { }*)) + call void @llvm.dbg.stoppoint(i32 542, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %103 = getelementptr %struct.fde_vector* %102, i32 0, i32 1 ; [#uses=2] + %104 = load i32* %103, align 4 ; [#uses=4] + call void @llvm.dbg.stoppoint(i32 543, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %105 = icmp eq i32 %104, 0 ; [#uses=1] + br i1 %105, label %fde_merge.exit.i.i, label %bb.i.i.i + +bb.i.i.i: ; preds = %bb10.i.i + %106 = getelementptr %struct.fde_vector* %101, i32 0, i32 1 ; [#uses=3] + %107 = load i32* %106, align 4 ; [#uses=1] + %tmp18.i.i.i = add i32 %104, -1 ; [#uses=1] + %tmp104 = shl i32 %104, 2 ; [#uses=1] + %tmp105 = add i32 %tmp104, 4 ; [#uses=1] + br label %bb1.i13.i.i + +bb1.i13.i.i: ; preds = %bb5.i.i.i, %bb.i.i.i + %indvar15.i.i.i = phi i32 [ 0, %bb.i.i.i ], [ %indvar.next16.i.i.i, %bb5.i.i.i ] ; [#uses=3] + %i1.1.i.i.i = phi i32 [ %107, %bb.i.i.i ], [ %i1.0.i.i.i, %bb5.i.i.i ] ; [#uses=4] + %tmp100 = sub i32 %tmp18.i.i.i, %indvar15.i.i.i ; [#uses=2] + %tmp103 = mul i32 %indvar15.i.i.i, -4 ; [#uses=1] + %tmp106 = add i32 %tmp103, %tmp105 ; [#uses=1] + %scevgep107 = getelementptr i8* %v230.i.i.i, i32 %tmp106 ; [#uses=1] + %scevgep3536.i.i.i = bitcast i8* %scevgep107 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] + %108 = load %struct.dwarf_fde** %scevgep3536.i.i.i, align 4 ; <%struct.dwarf_fde*> [#uses=2] + %tmp85 = add i32 %i1.1.i.i.i, %tmp100 ; [#uses=1] + %tmp86 = shl i32 %tmp85, 2 ; [#uses=1] + %tmp87 = add i32 %tmp86, 8 ; [#uses=1] + %tmp91 = shl i32 %i1.1.i.i.i, 2 ; [#uses=1] + %tmp92 = add i32 %tmp91, 4 ; [#uses=1] + br label %bb3.i17.i.i + +bb2.i14.i.i: ; preds = %bb4.i18.i.i + %109 = load %struct.dwarf_fde** %scevgep14.i.i.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] + store %struct.dwarf_fde* %109, %struct.dwarf_fde** %scevgep2425.i.i.i, align 4 + %indvar.next.i.i.i = add i32 %110, 1 ; [#uses=1] + br label %bb3.i17.i.i + +bb3.i17.i.i: ; preds = %bb2.i14.i.i, %bb1.i13.i.i + %110 = phi i32 [ 0, %bb1.i13.i.i ], [ %indvar.next.i.i.i, %bb2.i14.i.i ] ; [#uses=4] + %tmp82 = mul i32 %110, -4 ; [#uses=2] + %tmp88 = add i32 %tmp82, %tmp87 ; [#uses=1] + %scevgep89 = getelementptr i8* %v19.i.i.i, i32 %tmp88 ; [#uses=1] + %scevgep2425.i.i.i = bitcast i8* %scevgep89 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] + %tmp93 = add i32 %tmp82, %tmp92 ; [#uses=1] + %scevgep94 = getelementptr i8* %v19.i.i.i, i32 %tmp93 ; [#uses=1] + %scevgep14.i.i.i = bitcast i8* %scevgep94 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=2] + %i1.0.i.i.i = sub i32 %i1.1.i.i.i, %110 ; [#uses=2] + %111 = icmp eq i32 %i1.1.i.i.i, %110 ; [#uses=1] + br i1 %111, label %bb5.i.i.i, label %bb4.i18.i.i + +bb4.i18.i.i: ; preds = %bb3.i17.i.i + %112 = load %struct.dwarf_fde** %scevgep14.i.i.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %113 = call arm_apcscc i32 %fde_compare.0.i.i(%struct.object* %ob, %struct.dwarf_fde* %112, %struct.dwarf_fde* %108) ; [#uses=1] + %114 = icmp sgt i32 %113, 0 ; [#uses=1] + br i1 %114, label %bb2.i14.i.i, label %bb5.i.i.i + +bb5.i.i.i: ; preds = %bb4.i18.i.i, %bb3.i17.i.i + %tmp29.i.i.i = add i32 %i1.0.i.i.i, %tmp100 ; [#uses=1] + %115 = getelementptr %struct.fde_vector* %101, i32 0, i32 2, i32 %tmp29.i.i.i ; <%struct.dwarf_fde**> [#uses=1] + store %struct.dwarf_fde* %108, %struct.dwarf_fde** %115, align 4 + %indvar.next16.i.i.i = add i32 %indvar15.i.i.i, 1 ; [#uses=2] + %exitcond98 = icmp eq i32 %indvar.next16.i.i.i, %104 ; [#uses=1] + br i1 %exitcond98, label %bb6.i.i.i, label %bb1.i13.i.i + +bb6.i.i.i: ; preds = %bb5.i.i.i + call void @llvm.dbg.stoppoint(i32 558, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %116 = load i32* %106, align 4 ; [#uses=1] + %117 = load i32* %103, align 4 ; [#uses=1] + %118 = add i32 %117, %116 ; [#uses=1] + store i32 %118, i32* %106, align 4 + %.pre.i.i = load %struct.fde_vector** %39, align 4 ; <%struct.fde_vector*> [#uses=1] + br label %fde_merge.exit.i.i + +fde_merge.exit.i.i: ; preds = %bb6.i.i.i, %bb10.i.i + %119 = phi %struct.fde_vector* [ %.pre.i.i, %bb6.i.i.i ], [ %102, %bb10.i.i ] ; <%struct.fde_vector*> [#uses=1] + call void @llvm.dbg.stoppoint(i32 582, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram219 to { }*)) + free %struct.fde_vector* %119 + br label %end_fde_sort.exit.i + +bb11.i.i: ; preds = %bb7.i.i + call void @llvm.dbg.stoppoint(i32 588, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call arm_apcscc void @frame_heapsort(%struct.object* %ob, i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* %fde_compare.0.i.i, %struct.fde_vector* %55) + br label %end_fde_sort.exit.i + +end_fde_sort.exit.i: ; preds = %bb11.i.i, %fde_merge.exit.i.i + call void @llvm.dbg.stoppoint(i32 759, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram278 to { }*)) + %120 = load %struct.fde_vector** %33, align 4 ; <%struct.fde_vector*> [#uses=1] + %121 = load %struct.dwarf_fde** %45, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %122 = getelementptr %struct.fde_vector* %120, i32 0, i32 0 ; [#uses=1] + %123 = bitcast %struct.dwarf_fde* %121 to i8* ; [#uses=1] + store i8* %123, i8** %122, align 4 + call void @llvm.dbg.stoppoint(i32 760, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %124 = load %struct.fde_vector** %33, align 4 ; <%struct.fde_vector*> [#uses=1] + %.c.i = bitcast %struct.fde_vector* %124 to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] + store %struct.dwarf_fde* %.c.i, %struct.dwarf_fde** %45 + call void @llvm.dbg.stoppoint(i32 762, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %125 = load i32* %0 ; [#uses=1] + %126 = or i32 %125, 1 ; [#uses=2] + store i32 %126, i32* %0 + br label %init_object.exit + +init_object.exit: ; preds = %end_fde_sort.exit.i, %bb1.i.i, %bb8.i + %.rle120 = phi i32 [ %126, %end_fde_sort.exit.i ], [ %.rle121, %bb8.i ], [ %.rle121, %bb1.i.i ] ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 938, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram282 to { }*)) + %127 = getelementptr %struct.object* %ob, i32 0, i32 0 ; [#uses=1] + %128 = load i8** %127, align 4 ; [#uses=1] + %129 = icmp ugt i8* %128, %pc ; [#uses=1] + br i1 %129, label %bb16, label %bb2 + +bb2: ; preds = %init_object.exit, %entry + %130 = phi i32 [ %1, %entry ], [ %.rle120, %init_object.exit ] ; [#uses=5] + call void @llvm.dbg.stoppoint(i32 942, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %131 = and i32 %130, 1 ; [#uses=1] + %132 = icmp eq i32 %131, 0 ; [#uses=1] + br i1 %132, label %bb8, label %bb3 + +bb3: ; preds = %bb2 + call void @llvm.dbg.stoppoint(i32 944, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %133 = and i32 %130, 4 ; [#uses=1] + %134 = icmp eq i32 %133, 0 ; [#uses=1] + br i1 %134, label %bb5, label %bb4 + +bb4: ; preds = %bb3 + call void @llvm.dbg.stoppoint(i32 945, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram258 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 898, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %135 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] + %136 = load %struct.dwarf_fde** %135 ; <%struct.dwarf_fde*> [#uses=2] + %137 = bitcast %struct.dwarf_fde* %136 to %struct.fde_vector* ; <%struct.fde_vector*> [#uses=1] + call void @llvm.dbg.stoppoint(i32 901, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %138 = getelementptr %struct.dwarf_fde* %136, i32 0, i32 1 ; [#uses=1] + %139 = load i32* %138, align 4 ; [#uses=1] + %140 = ptrtoint i8* %pc to i32 ; [#uses=2] + %141 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + %142 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + br label %bb5.i23 + +bb.i18: ; preds = %bb5.i23 + %143 = add i32 %lo.0.i, %hi.0.ph.i.ph ; [#uses=1] + %144 = lshr i32 %143, 1 ; [#uses=3] + %145 = getelementptr %struct.fde_vector* %137, i32 0, i32 2, i32 %144 ; <%struct.dwarf_fde**> [#uses=1] + %146 = load %struct.dwarf_fde** %145, align 4 ; <%struct.dwarf_fde*> [#uses=3] + %147 = getelementptr %struct.dwarf_fde* %146, i32 0, i32 1 ; [#uses=2] + %148 = bitcast i32* %147 to i8* ; [#uses=1] + %149 = load i32* %147, align 1 ; [#uses=1] + %150 = sub i32 0, %149 ; [#uses=1] + %151 = getelementptr i8* %148, i32 %150 ; [#uses=1] + %152 = bitcast i8* %151 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=1] + %153 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %152) nounwind ; [#uses=2] + %154 = trunc i32 %153 to i8 ; [#uses=3] + %155 = icmp eq i8 %154, -1 ; [#uses=1] + br i1 %155, label %base_from_object.exit.i, label %bb1.i.i19 + +bb1.i.i19: ; preds = %bb.i18 + %156 = and i32 %153, 112 ; [#uses=1] + switch i32 %156, label %bb5.i.i [ + i32 0, label %base_from_object.exit.i + i32 16, label %base_from_object.exit.i + i32 32, label %bb3.i.i + i32 48, label %bb4.i.i20 + i32 80, label %base_from_object.exit.i + ] + +bb3.i.i: ; preds = %bb1.i.i19 + %157 = load i8** %141, align 4 ; [#uses=1] + %158 = ptrtoint i8* %157 to i32 ; [#uses=1] + br label %base_from_object.exit.i + +bb4.i.i20: ; preds = %bb1.i.i19 + %159 = load i8** %142, align 4 ; [#uses=1] + %160 = ptrtoint i8* %159 to i32 ; [#uses=1] + br label %base_from_object.exit.i + +bb5.i.i: ; preds = %bb1.i.i19 + call void @llvm.dbg.stoppoint(i32 909, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram248 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 312, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 163, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*)) nounwind + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 910, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram248 to { }*)) nounwind + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call arm_apcscc void @abort() noreturn nounwind + unreachable + +base_from_object.exit.i: ; preds = %bb4.i.i20, %bb3.i.i, %bb1.i.i19, %bb1.i.i19, %bb1.i.i19, %bb.i18 + %161 = phi i32 [ %160, %bb4.i.i20 ], [ %158, %bb3.i.i ], [ 0, %bb.i18 ], [ 0, %bb1.i.i19 ], [ 0, %bb1.i.i19 ], [ 0, %bb1.i.i19 ] ; [#uses=1] + %162 = getelementptr %struct.dwarf_fde* %146, i32 0, i32 2, i32 0 ; [#uses=1] + %163 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %154, i32 %161, i8* %162, i32* %pc_begin.i) nounwind ; [#uses=1] + %164 = and i8 %154, 15 ; [#uses=1] + %165 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %164, i32 0, i8* %163, i32* %pc_range.i) nounwind ; [#uses=0] + %166 = load i32* %pc_begin.i, align 4 ; [#uses=2] + %167 = icmp ult i32 %140, %166 ; [#uses=1] + br i1 %167, label %bb5.i23, label %bb2.i21 + +bb2.i21: ; preds = %base_from_object.exit.i + %168 = load i32* %pc_range.i, align 4 ; [#uses=1] + %169 = add i32 %168, %166 ; [#uses=1] + %170 = icmp ult i32 %140, %169 ; [#uses=1] + br i1 %170, label %binary_search_mixed_encoding_fdes.exit, label %bb3.i22 + +bb3.i22: ; preds = %bb2.i21 + %171 = add i32 %144, 1 ; [#uses=1] + br label %bb5.i23 + +bb5.i23: ; preds = %bb3.i22, %base_from_object.exit.i, %bb4 + %hi.0.ph.i.ph = phi i32 [ %139, %bb4 ], [ %144, %base_from_object.exit.i ], [ %hi.0.ph.i.ph, %bb3.i22 ] ; [#uses=3] + %lo.0.i = phi i32 [ %171, %bb3.i22 ], [ 0, %bb4 ], [ %lo.0.i, %base_from_object.exit.i ] ; [#uses=3] + %172 = icmp ult i32 %lo.0.i, %hi.0.ph.i.ph ; [#uses=1] + br i1 %172, label %bb.i18, label %binary_search_mixed_encoding_fdes.exit + +binary_search_mixed_encoding_fdes.exit: ; preds = %bb5.i23, %bb2.i21 + %.0.i = phi %struct.dwarf_fde* [ %146, %bb2.i21 ], [ null, %bb5.i23 ] ; <%struct.dwarf_fde*> [#uses=1] + call void @llvm.dbg.stoppoint(i32 923, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram284 to { }*)) + ret %struct.dwarf_fde* %.0.i + +bb5: ; preds = %bb3 + call void @llvm.dbg.stoppoint(i32 946, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %173 = and i32 %130, 2040 ; [#uses=1] + %174 = icmp eq i32 %173, 0 ; [#uses=1] + %175 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] + %176 = load %struct.dwarf_fde** %175 ; <%struct.dwarf_fde*> [#uses=3] + %177 = bitcast %struct.dwarf_fde* %176 to %struct.fde_vector* ; <%struct.fde_vector*> [#uses=2] + br i1 %174, label %bb6, label %bb7 + +bb6: ; preds = %bb5 + call void @llvm.dbg.stoppoint(i32 947, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram223 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 844, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %178 = getelementptr %struct.dwarf_fde* %176, i32 0, i32 1 ; [#uses=1] + %179 = load i32* %178, align 4 ; [#uses=1] + br label %bb5.i30 + +bb.i25: ; preds = %bb5.i30 + %180 = add i32 %lo.0.i29, %hi.0.ph.i28.ph ; [#uses=1] + %181 = lshr i32 %180, 1 ; [#uses=3] + %182 = getelementptr %struct.fde_vector* %177, i32 0, i32 2, i32 %181 ; <%struct.dwarf_fde**> [#uses=1] + %183 = load %struct.dwarf_fde** %182, align 4 ; <%struct.dwarf_fde*> [#uses=2] + %184 = getelementptr %struct.dwarf_fde* %183, i32 0, i32 2 ; <[0 x i8]*> [#uses=2] + %185 = bitcast [0 x i8]* %184 to i8** ; [#uses=1] + %186 = load i8** %185, align 4 ; [#uses=2] + %187 = icmp ugt i8* %186, %pc ; [#uses=1] + br i1 %187, label %bb5.i30, label %bb2.i26 + +bb2.i26: ; preds = %bb.i25 + %188 = bitcast [0 x i8]* %184 to i32* ; [#uses=1] + %189 = getelementptr i32* %188, i32 1 ; [#uses=1] + %190 = load i32* %189, align 4 ; [#uses=1] + %191 = getelementptr i8* %186, i32 %190 ; [#uses=1] + %192 = icmp ugt i8* %191, %pc ; [#uses=1] + br i1 %192, label %binary_search_unencoded_fdes.exit, label %bb3.i27 + +bb3.i27: ; preds = %bb2.i26 + %193 = add i32 %181, 1 ; [#uses=1] + br label %bb5.i30 + +bb5.i30: ; preds = %bb3.i27, %bb.i25, %bb6 + %hi.0.ph.i28.ph = phi i32 [ %179, %bb6 ], [ %181, %bb.i25 ], [ %hi.0.ph.i28.ph, %bb3.i27 ] ; [#uses=3] + %lo.0.i29 = phi i32 [ %193, %bb3.i27 ], [ 0, %bb6 ], [ %lo.0.i29, %bb.i25 ] ; [#uses=3] + %194 = icmp ult i32 %lo.0.i29, %hi.0.ph.i28.ph ; [#uses=1] + br i1 %194, label %bb.i25, label %binary_search_unencoded_fdes.exit + +binary_search_unencoded_fdes.exit: ; preds = %bb5.i30, %bb2.i26 + %.0.i31 = phi %struct.dwarf_fde* [ %183, %bb2.i26 ], [ null, %bb5.i30 ] ; <%struct.dwarf_fde*> [#uses=1] + tail call void @llvm.dbg.stoppoint(i32 862, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + ret %struct.dwarf_fde* %.0.i31 + +bb7: ; preds = %bb5 + call void @llvm.dbg.stoppoint(i32 949, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram260 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 869, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %195 = lshr i32 %130, 3 ; [#uses=2] + call void @llvm.dbg.stoppoint(i32 870, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %196 = trunc i32 %195 to i8 ; [#uses=3] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %197 = icmp eq i8 %196, -1 ; [#uses=1] + br i1 %197, label %base_from_object.exit.i39, label %bb1.i.i35 + +bb1.i.i35: ; preds = %bb7 + call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %198 = and i32 %195, 112 ; [#uses=1] + switch i32 %198, label %bb5.i.i38 [ + i32 0, label %base_from_object.exit.i39 + i32 16, label %base_from_object.exit.i39 + i32 32, label %bb3.i.i36 + i32 48, label %bb4.i.i37 + i32 80, label %base_from_object.exit.i39 + ] + +bb3.i.i36: ; preds = %bb1.i.i35 + call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %199 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] + %200 = load i8** %199, align 4 ; [#uses=1] + %201 = ptrtoint i8* %200 to i32 ; [#uses=1] + br label %base_from_object.exit.i39 + +bb4.i.i37: ; preds = %bb1.i.i35 + call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %202 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] + %203 = load i8** %202, align 4 ; [#uses=1] + %204 = ptrtoint i8* %203 to i32 ; [#uses=1] + br label %base_from_object.exit.i39 + +bb5.i.i38: ; preds = %bb1.i.i35 + call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call arm_apcscc void @abort() noreturn nounwind + unreachable + +base_from_object.exit.i39: ; preds = %bb4.i.i37, %bb3.i.i36, %bb1.i.i35, %bb1.i.i35, %bb1.i.i35, %bb7 + %205 = phi i32 [ %204, %bb4.i.i37 ], [ %201, %bb3.i.i36 ], [ 0, %bb7 ], [ 0, %bb1.i.i35 ], [ 0, %bb1.i.i35 ], [ 0, %bb1.i.i35 ] ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 873, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind + %206 = getelementptr %struct.dwarf_fde* %176, i32 0, i32 1 ; [#uses=1] + %207 = load i32* %206, align 4 ; [#uses=1] + %208 = and i8 %196, 15 ; [#uses=1] + %209 = ptrtoint i8* %pc to i32 ; [#uses=2] + br label %bb5.i45 + +bb.i40: ; preds = %bb5.i45 + %210 = add i32 %lo.0.i44, %hi.0.ph.i43.ph ; [#uses=1] + %211 = lshr i32 %210, 1 ; [#uses=3] + %212 = getelementptr %struct.fde_vector* %177, i32 0, i32 2, i32 %211 ; <%struct.dwarf_fde**> [#uses=1] + %213 = load %struct.dwarf_fde** %212, align 4 ; <%struct.dwarf_fde*> [#uses=2] + %214 = getelementptr %struct.dwarf_fde* %213, i32 0, i32 2, i32 0 ; [#uses=1] + %215 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %196, i32 %205, i8* %214, i32* %pc_begin.i34) nounwind ; [#uses=1] + %216 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %208, i32 0, i8* %215, i32* %pc_range.i33) nounwind ; [#uses=0] + %217 = load i32* %pc_begin.i34, align 4 ; [#uses=2] + %218 = icmp ult i32 %209, %217 ; [#uses=1] + br i1 %218, label %bb5.i45, label %bb2.i41 + +bb2.i41: ; preds = %bb.i40 + %219 = load i32* %pc_range.i33, align 4 ; [#uses=1] + %220 = add i32 %219, %217 ; [#uses=1] + %221 = icmp ult i32 %209, %220 ; [#uses=1] + br i1 %221, label %binary_search_single_encoding_fdes.exit, label %bb3.i42 + +bb3.i42: ; preds = %bb2.i41 + %222 = add i32 %211, 1 ; [#uses=1] + br label %bb5.i45 + +bb5.i45: ; preds = %bb3.i42, %bb.i40, %base_from_object.exit.i39 + %hi.0.ph.i43.ph = phi i32 [ %207, %base_from_object.exit.i39 ], [ %211, %bb.i40 ], [ %hi.0.ph.i43.ph, %bb3.i42 ] ; [#uses=3] + %lo.0.i44 = phi i32 [ %222, %bb3.i42 ], [ 0, %base_from_object.exit.i39 ], [ %lo.0.i44, %bb.i40 ] ; [#uses=3] + %223 = icmp ult i32 %lo.0.i44, %hi.0.ph.i43.ph ; [#uses=1] + br i1 %223, label %bb.i40, label %binary_search_single_encoding_fdes.exit + +binary_search_single_encoding_fdes.exit: ; preds = %bb5.i45, %bb2.i41 + %.0.i46 = phi %struct.dwarf_fde* [ %213, %bb2.i41 ], [ null, %bb5.i45 ] ; <%struct.dwarf_fde*> [#uses=1] + call void @llvm.dbg.stoppoint(i32 892, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + ret %struct.dwarf_fde* %.0.i46 + +bb8: ; preds = %bb2 + call void @llvm.dbg.stoppoint(i32 954, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %224 = and i32 %130, 2 ; [#uses=1] + %225 = icmp eq i32 %224, 0 ; [#uses=1] + %226 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=2] + br i1 %225, label %bb15, label %bb9 + +bb9: ; preds = %bb8 + call void @llvm.dbg.stoppoint(i32 957, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %227 = load %struct.dwarf_fde** %226 ; <%struct.dwarf_fde*> [#uses=1] + %228 = bitcast %struct.dwarf_fde* %227 to i8* ; [#uses=1] + br label %bb13 + +bb10: ; preds = %bb13 + %229 = call arm_apcscc %struct.dwarf_fde* @linear_search_fdes(%struct.object* %ob, %struct.dwarf_fde* %231, i8* %pc) ; <%struct.dwarf_fde*> [#uses=2] + %230 = icmp eq %struct.dwarf_fde* %229, null ; [#uses=1] + br i1 %230, label %bb12, label %bb16 + +bb12: ; preds = %bb10 + %indvar.next = add i32 %indvar, 1 ; [#uses=1] + br label %bb13 + +bb13: ; preds = %bb12, %bb9 + %indvar = phi i32 [ 0, %bb9 ], [ %indvar.next, %bb12 ] ; [#uses=2] + %tmp117 = shl i32 %indvar, 2 ; [#uses=1] + %scevgep118 = getelementptr i8* %228, i32 %tmp117 ; [#uses=1] + %p.0 = bitcast i8* %scevgep118 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] + %231 = load %struct.dwarf_fde** %p.0, align 4 ; <%struct.dwarf_fde*> [#uses=2] + %232 = icmp eq %struct.dwarf_fde* %231, null ; [#uses=1] + br i1 %232, label %bb16, label %bb10 + +bb15: ; preds = %bb8 + call void @llvm.dbg.stoppoint(i32 966, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %233 = load %struct.dwarf_fde** %226, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %234 = call arm_apcscc %struct.dwarf_fde* @linear_search_fdes(%struct.object* %ob, %struct.dwarf_fde* %233, i8* %pc) ; <%struct.dwarf_fde*> [#uses=1] + ret %struct.dwarf_fde* %234 + +bb16: ; preds = %bb13, %bb10, %init_object.exit + %.0 = phi %struct.dwarf_fde* [ null, %init_object.exit ], [ %229, %bb10 ], [ null, %bb13 ] ; <%struct.dwarf_fde*> [#uses=1] + call void @llvm.dbg.stoppoint(i32 966, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + ret %struct.dwarf_fde* %.0 +} + +define arm_apcscc %struct.dwarf_fde* @_Unwind_Find_FDE(i8* %pc, %struct.dwarf_eh_bases* nocapture %bases) { +entry: + %func = alloca i32, align 4 ; [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram297 to { }*)) + call void @llvm.dbg.stoppoint(i32 977, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + call void @llvm.dbg.stoppoint(i32 982, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) + br label %bb3 + +bb: ; preds = %bb3 + %0 = getelementptr %struct.object* %ob.0, i32 0, i32 0 ; [#uses=1] + %1 = load i8** %0, align 4 ; [#uses=1] + %2 = icmp ugt i8* %1, %pc ; [#uses=1] + br i1 %2, label %bb2, label %bb1 + +bb1: ; preds = %bb + call void @llvm.dbg.stoppoint(i32 985, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = call arm_apcscc %struct.dwarf_fde* @search_object(%struct.object* %ob.0, i8* %pc) ; <%struct.dwarf_fde*> [#uses=3] + call void @llvm.dbg.stoppoint(i32 986, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = icmp eq %struct.dwarf_fde* %3, null ; [#uses=1] + br i1 %4, label %bb9, label %fini + +bb2: ; preds = %bb + %5 = getelementptr %struct.object* %ob.0, i32 0, i32 5 ; <%struct.object**> [#uses=1] + br label %bb3 + +bb3: ; preds = %bb2, %entry + %ob.0.in = phi %struct.object** [ @seen_objects, %entry ], [ %5, %bb2 ] ; <%struct.object**> [#uses=1] + %ob.0 = load %struct.object** %ob.0.in ; <%struct.object*> [#uses=5] + %6 = icmp eq %struct.object* %ob.0, null ; [#uses=1] + br i1 %6, label %bb9, label %bb + +bb4: ; preds = %bb9 + %7 = getelementptr %struct.object* %19, i32 0, i32 5 ; <%struct.object**> [#uses=2] + %8 = load %struct.object** %7, align 4 ; <%struct.object*> [#uses=1] + store %struct.object* %8, %struct.object** @unseen_objects, align 4 + %9 = call arm_apcscc %struct.dwarf_fde* @search_object(%struct.object* %19, i8* %pc) ; <%struct.dwarf_fde*> [#uses=3] + %10 = getelementptr %struct.object* %19, i32 0, i32 0 ; [#uses=1] + br label %bb7 + +bb5: ; preds = %bb7 + %11 = getelementptr %struct.object* %16, i32 0, i32 0 ; [#uses=1] + %12 = load i8** %11, align 4 ; [#uses=1] + %13 = load i8** %10, align 4 ; [#uses=1] + %14 = icmp ult i8* %12, %13 ; [#uses=1] + br i1 %14, label %bb8, label %bb6 + +bb6: ; preds = %bb5 + %15 = getelementptr %struct.object* %16, i32 0, i32 5 ; <%struct.object**> [#uses=1] + br label %bb7 + +bb7: ; preds = %bb6, %bb4 + %p.0 = phi %struct.object** [ @seen_objects, %bb4 ], [ %15, %bb6 ] ; <%struct.object**> [#uses=2] + %16 = load %struct.object** %p.0, align 4 ; <%struct.object*> [#uses=4] + %17 = icmp eq %struct.object* %16, null ; [#uses=1] + br i1 %17, label %bb8, label %bb5 + +bb8: ; preds = %bb7, %bb5 + store %struct.object* %16, %struct.object** %7, align 4 + store %struct.object* %19, %struct.object** %p.0, align 4 + %18 = icmp eq %struct.dwarf_fde* %9, null ; [#uses=1] + br i1 %18, label %bb9, label %fini + +bb9: ; preds = %bb8, %bb3, %bb1 + %f.0 = phi %struct.dwarf_fde* [ %9, %bb8 ], [ %3, %bb1 ], [ null, %bb3 ] ; <%struct.dwarf_fde*> [#uses=1] + %19 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=7] + %20 = icmp eq %struct.object* %19, null ; [#uses=1] + br i1 %20, label %fini, label %bb4 + +fini: ; preds = %bb9, %bb8, %bb1 + %f.1 = phi %struct.dwarf_fde* [ %3, %bb1 ], [ %9, %bb8 ], [ %f.0, %bb9 ] ; <%struct.dwarf_fde*> [#uses=5] + %ob.1 = phi %struct.object* [ %ob.0, %bb1 ], [ %19, %bb9 ], [ %19, %bb8 ] ; <%struct.object*> [#uses=3] + call void @llvm.dbg.stoppoint(i32 1011, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + call void @llvm.dbg.stoppoint(i32 1013, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + %21 = icmp eq %struct.dwarf_fde* %f.1, null ; [#uses=1] + br i1 %21, label %bb13, label %bb10 + +bb10: ; preds = %fini + call void @llvm.dbg.stoppoint(i32 1018, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %22 = getelementptr %struct.object* %ob.1, i32 0, i32 1 ; [#uses=2] + %23 = load i8** %22, align 4 ; [#uses=1] + %24 = getelementptr %struct.dwarf_eh_bases* %bases, i32 0, i32 0 ; [#uses=1] + store i8* %23, i8** %24, align 4 + call void @llvm.dbg.stoppoint(i32 1019, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %25 = getelementptr %struct.object* %ob.1, i32 0, i32 2 ; [#uses=2] + %26 = load i8** %25, align 4 ; [#uses=1] + %27 = getelementptr %struct.dwarf_eh_bases* %bases, i32 0, i32 1 ; [#uses=1] + store i8* %26, i8** %27, align 4 + call void @llvm.dbg.stoppoint(i32 1021, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %28 = getelementptr %struct.object* %ob.1, i32 0, i32 4, i32 0 ; [#uses=1] + %29 = load i32* %28 ; [#uses=2] + %30 = lshr i32 %29, 3 ; [#uses=1] + %31 = and i32 %30, 255 ; [#uses=1] + call void @llvm.dbg.stoppoint(i32 1022, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %32 = and i32 %29, 4 ; [#uses=1] + %33 = icmp eq i32 %32, 0 ; [#uses=1] + br i1 %33, label %bb12, label %bb11 + +bb11: ; preds = %bb10 + call void @llvm.dbg.stoppoint(i32 1023, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram248 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 312, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 163, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*)) nounwind + %34 = getelementptr %struct.dwarf_fde* %f.1, i32 0, i32 1 ; [#uses=2] + %35 = bitcast i32* %34 to i8* ; [#uses=1] + %36 = load i32* %34, align 1 ; [#uses=1] + %37 = sub i32 0, %36 ; [#uses=1] + %38 = getelementptr i8* %35, i32 %37 ; [#uses=1] + %39 = bitcast i8* %38 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=1] + %40 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %39) nounwind ; [#uses=1] + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) nounwind + br label %bb12 + +bb12: ; preds = %bb11, %bb10 + %encoding.0 = phi i32 [ %40, %bb11 ], [ %31, %bb10 ] ; [#uses=2] + call void @llvm.dbg.stoppoint(i32 1024, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %41 = trunc i32 %encoding.0 to i8 ; [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %42 = icmp eq i8 %41, -1 ; [#uses=1] + br i1 %42, label %base_from_object.exit, label %bb1.i + +bb1.i: ; preds = %bb12 + call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %43 = and i32 %encoding.0, 112 ; [#uses=1] + switch i32 %43, label %bb5.i [ + i32 0, label %base_from_object.exit + i32 16, label %base_from_object.exit + i32 32, label %bb3.i + i32 48, label %bb4.i + i32 80, label %base_from_object.exit + ] + +bb3.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %44 = load i8** %22, align 4 ; [#uses=1] + %45 = ptrtoint i8* %44 to i32 ; [#uses=1] + br label %base_from_object.exit + +bb4.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %46 = load i8** %25, align 4 ; [#uses=1] + %47 = ptrtoint i8* %46 to i32 ; [#uses=1] + br label %base_from_object.exit + +bb5.i: ; preds = %bb1.i + call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + call arm_apcscc void @abort() noreturn nounwind + unreachable + +base_from_object.exit: ; preds = %bb4.i, %bb3.i, %bb1.i, %bb1.i, %bb1.i, %bb12 + %48 = phi i32 [ %47, %bb4.i ], [ %45, %bb3.i ], [ 0, %bb12 ], [ 0, %bb1.i ], [ 0, %bb1.i ], [ 0, %bb1.i ] ; [#uses=1] + %49 = getelementptr %struct.dwarf_fde* %f.1, i32 0, i32 2, i32 0 ; [#uses=1] + %50 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %41, i32 %48, i8* %49, i32* %func) ; [#uses=0] + call void @llvm.dbg.stoppoint(i32 1026, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) + %51 = load i32* %func, align 4 ; [#uses=1] + %52 = inttoptr i32 %51 to i8* ; [#uses=1] + %53 = getelementptr %struct.dwarf_eh_bases* %bases, i32 0, i32 2 ; [#uses=1] + store i8* %52, i8** %53, align 4 + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram297 to { }*)) + ret %struct.dwarf_fde* %f.1 + +bb13: ; preds = %fini + call void @llvm.dbg.stoppoint(i32 1029, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + ret %struct.dwarf_fde* %f.1 +} + +define arm_apcscc i8* @__deregister_frame_info_bases(i8* %begin) nounwind { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram301 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 180, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = icmp eq i8* %begin, null ; [#uses=1] + br i1 %0, label %bb17, label %bb + +bb: ; preds = %entry + %1 = bitcast i8* %begin to i32* ; [#uses=1] + %2 = load i32* %1, align 4 ; [#uses=1] + %3 = icmp eq i32 %2, 0 ; [#uses=1] + br i1 %3, label %bb17, label %bb6 + +bb3: ; preds = %bb6 + %4 = getelementptr %struct.object* %10, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] + %5 = load %struct.dwarf_fde** %4, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %6 = bitcast %struct.dwarf_fde* %5 to i8* ; [#uses=1] + %7 = icmp eq i8* %6, %begin ; [#uses=1] + %8 = getelementptr %struct.object* %10, i32 0, i32 5 ; <%struct.object**> [#uses=2] + br i1 %7, label %bb4, label %bb6 + +bb4: ; preds = %bb3 + tail call void @llvm.dbg.stoppoint(i32 190, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %9 = load %struct.object** %8, align 4 ; <%struct.object*> [#uses=1] + store %struct.object* %9, %struct.object** %p.0, align 4 + br label %out + +bb6: ; preds = %bb3, %bb + %p.0 = phi %struct.object** [ @unseen_objects, %bb ], [ %8, %bb3 ] ; <%struct.object**> [#uses=2] + %10 = load %struct.object** %p.0, align 4 ; <%struct.object*> [#uses=4] + %11 = icmp eq %struct.object* %10, null ; [#uses=1] + br i1 %11, label %bb14, label %bb3 + +bb8: ; preds = %bb14 + %12 = getelementptr %struct.object* %30, i32 0, i32 4, i32 0 ; [#uses=1] + %13 = load i32* %12 ; [#uses=1] + %14 = and i32 %13, 1 ; [#uses=1] + %15 = icmp eq i32 %14, 0 ; [#uses=1] + %16 = getelementptr %struct.object* %30, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=3] + br i1 %15, label %bb11, label %bb9 + +bb9: ; preds = %bb8 + %17 = load %struct.dwarf_fde** %16 ; <%struct.dwarf_fde*> [#uses=1] + %18 = bitcast %struct.dwarf_fde* %17 to i8** ; [#uses=1] + %19 = load i8** %18, align 4 ; [#uses=1] + %20 = icmp eq i8* %19, %begin ; [#uses=1] + br i1 %20, label %bb10, label %bb13 + +bb10: ; preds = %bb9 + tail call void @llvm.dbg.stoppoint(i32 200, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %21 = getelementptr %struct.object* %30, i32 0, i32 5 ; <%struct.object**> [#uses=1] + %22 = load %struct.object** %21, align 4 ; <%struct.object*> [#uses=1] + store %struct.object* %22, %struct.object** %p.1, align 4 + tail call void @llvm.dbg.stoppoint(i32 201, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %23 = load %struct.dwarf_fde** %16 ; <%struct.dwarf_fde*> [#uses=1] + free %struct.dwarf_fde* %23 + br label %out + +bb11: ; preds = %bb8 + %24 = load %struct.dwarf_fde** %16, align 4 ; <%struct.dwarf_fde*> [#uses=1] + %25 = bitcast %struct.dwarf_fde* %24 to i8* ; [#uses=1] + %26 = icmp eq i8* %25, %begin ; [#uses=1] + br i1 %26, label %bb12, label %bb13 + +bb12: ; preds = %bb11 + tail call void @llvm.dbg.stoppoint(i32 210, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %27 = getelementptr %struct.object* %30, i32 0, i32 5 ; <%struct.object**> [#uses=1] + %28 = load %struct.object** %27, align 4 ; <%struct.object*> [#uses=1] + store %struct.object* %28, %struct.object** %p.1, align 4 + br label %out + +bb13: ; preds = %bb11, %bb9 + %29 = getelementptr %struct.object* %30, i32 0, i32 5 ; <%struct.object**> [#uses=1] + br label %bb14 + +bb14: ; preds = %bb13, %bb6 + %p.1 = phi %struct.object** [ %29, %bb13 ], [ @seen_objects, %bb6 ] ; <%struct.object**> [#uses=3] + %30 = load %struct.object** %p.1, align 4 ; <%struct.object*> [#uses=8] + %31 = icmp eq %struct.object* %30, null ; [#uses=1] + br i1 %31, label %bb15, label %bb8 + +out: ; preds = %bb12, %bb10, %bb4 + %ob.0 = phi %struct.object* [ %10, %bb4 ], [ %30, %bb10 ], [ %30, %bb12 ] ; <%struct.object*> [#uses=2] + tail call void @llvm.dbg.stoppoint(i32 216, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 217, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) + %32 = icmp eq %struct.object* %ob.0, null ; [#uses=1] + br i1 %32, label %bb15, label %bb16 + +bb15: ; preds = %out, %bb14 + tail call void @llvm.dbg.stoppoint(i32 217, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call arm_apcscc void @abort() noreturn nounwind + unreachable + +bb16: ; preds = %out + tail call void @llvm.dbg.stoppoint(i32 218, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %33 = bitcast %struct.object* %ob.0 to i8* ; [#uses=1] + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram301 to { }*)) + ret i8* %33 + +bb17: ; preds = %bb, %entry + tail call void @llvm.dbg.stoppoint(i32 218, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + ret i8* null +} + +define arm_apcscc i8* @__deregister_frame_info(i8* %begin) nounwind { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram303 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 224, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = tail call arm_apcscc i8* @__deregister_frame_info_bases(i8* %begin) ; [#uses=1] + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram303 to { }*)) + ret i8* %0 +} + +define arm_apcscc void @__deregister_frame(i8* %begin) nounwind { +entry: + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram305 to { }*)) + tail call void @llvm.dbg.stoppoint(i32 231, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %0 = bitcast i8* %begin to i32* ; [#uses=1] + %1 = load i32* %0, align 4 ; [#uses=1] + %2 = icmp eq i32 %1, 0 ; [#uses=1] + br i1 %2, label %return, label %bb + +bb: ; preds = %entry + tail call void @llvm.dbg.stoppoint(i32 232, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram303 to { }*)) nounwind + tail call void @llvm.dbg.stoppoint(i32 224, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind + %3 = tail call arm_apcscc i8* @__deregister_frame_info_bases(i8* %begin) nounwind ; [#uses=1] + free i8* %3 + tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram305 to { }*)) + ret void + +return: ; preds = %entry + tail call void @llvm.dbg.stoppoint(i32 233, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + ret void +} Modified: llvm/trunk/test/FrontendC++/2009-07-15-LineNumbers.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC%2B%2B/2009-07-15-LineNumbers.cpp?rev=76486&r1=76485&r2=76486&view=diff ============================================================================== --- llvm/trunk/test/FrontendC++/2009-07-15-LineNumbers.cpp (original) +++ llvm/trunk/test/FrontendC++/2009-07-15-LineNumbers.cpp Mon Jul 20 17:02:59 2009 @@ -2,7 +2,6 @@ // print line numbers in asm. // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \ // RUN: llc --disable-fp-elim -f -O0 -relocation-model=pic | grep {# SrcLine 25} -// XFAIL: * #include Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=76486&r1=76485&r2=76486&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Mon Jul 20 17:02:59 2009 @@ -19,6 +19,7 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/MathExtras.h" #include +#include #include using namespace llvm; @@ -32,7 +33,11 @@ // This should be an anon namespace, this works around a GCC warning. namespace llvm { struct AsmWriterOperand { - enum { isLiteralTextOperand, isMachineInstrOperand } OperandType; + enum OpType { + isLiteralTextOperand, + isMachineInstrOperand, + isLiteralStatementOperand + } OperandType; /// Str - For isLiteralTextOperand, this IS the literal text. For /// isMachineInstrOperand, this is the PrinterMethodName for the operand. @@ -47,14 +52,16 @@ std::string MiModifier; // To make VS STL happy - AsmWriterOperand():OperandType(isLiteralTextOperand) {} + AsmWriterOperand(OpType op = isLiteralTextOperand):OperandType(op) {} - explicit AsmWriterOperand(const std::string &LitStr) - : OperandType(isLiteralTextOperand), Str(LitStr) {} + AsmWriterOperand(const std::string &LitStr, + OpType op = isLiteralTextOperand) + : OperandType(op), Str(LitStr) {} AsmWriterOperand(const std::string &Printer, unsigned OpNo, - const std::string &Modifier) - : OperandType(isMachineInstrOperand), Str(Printer), MIOpNo(OpNo), + const std::string &Modifier, + OpType op = isMachineInstrOperand) + : OperandType(op), Str(Printer), MIOpNo(OpNo), MiModifier(Modifier) {} bool operator!=(const AsmWriterOperand &Other) const { @@ -78,6 +85,22 @@ std::vector Operands; const CodeGenInstruction *CGI; + /// MAX_GROUP_NESTING_LEVEL - The maximum number of group nesting + /// levels we ever expect to see in an asm operand. + static const int MAX_GROUP_NESTING_LEVEL = 10; + + /// GroupLevel - The level of nesting of the current operand + /// group, such as [reg + (reg + offset)]. -1 means we are not in + /// a group. + int GroupLevel; + + /// GroupDelim - Remember the delimeter for a group operand. + char GroupDelim[MAX_GROUP_NESTING_LEVEL]; + + /// InGroup - Determine whether we are in the middle of an + /// operand group. + bool InGroup() const { return GroupLevel != -1; } + AsmWriterInst(const CodeGenInstruction &CGI, unsigned Variant); /// MatchesAllButOneOp - If this instruction is exactly identical to the @@ -89,6 +112,70 @@ void AddLiteralString(const std::string &Str) { // If the last operand was already a literal text string, append this to // it, otherwise add a new operand. + + std::string::size_type SearchStart = 0; + std::string::size_type SpaceStartPos = std::string::npos; + do { + // Search for whitespace and replace with calls to set the + // output column. + SpaceStartPos = Str.find_first_of(" \t", SearchStart); + // Assume grouped text is one operand. + std::string::size_type StartDelimPos = Str.find_first_of("[{(", SearchStart); + + SearchStart = std::string::npos; + + if (StartDelimPos != std::string::npos) { + ++GroupLevel; + assert(GroupLevel < MAX_GROUP_NESTING_LEVEL + && "Exceeded maximum operand group nesting level"); + GroupDelim[GroupLevel] = Str[StartDelimPos]; + if (SpaceStartPos != std::string::npos && + SpaceStartPos > StartDelimPos) { + // This space doesn't count. + SpaceStartPos = std::string::npos; + } + } + + if (InGroup()) { + // Find the end delimiter. + char EndDelim = (GroupDelim[GroupLevel] == '{' ? '}' : + (GroupDelim[GroupLevel] == '(' ? ')' : ']')); + std::string::size_type EndDelimSearchStart = + StartDelimPos == std::string::npos ? 0 : StartDelimPos+1; + std::string::size_type EndDelimPos = Str.find(EndDelim, + EndDelimSearchStart); + SearchStart = EndDelimPos; + if (EndDelimPos != std::string::npos) { + // Iterate. + SearchStart = EndDelimPos + 1; + --GroupLevel; + assert(GroupLevel > -2 && "Too many end delimeters!"); + } + if (InGroup()) + SpaceStartPos = std::string::npos; + } + } while (SearchStart != std::string::npos); + + + if (SpaceStartPos != std::string::npos) { + std::string::size_type SpaceEndPos = + Str.find_first_not_of(" \t", SpaceStartPos+1); + if (SpaceStartPos != 0) { + // Emit the first part of the string. + AddLiteralString(Str.substr(0, SpaceStartPos)); + } + Operands.push_back( + AsmWriterOperand( + "O.PadToColumn(TAI->getOperandColumn(OperandColumn++), 1);\n", + AsmWriterOperand::isLiteralStatementOperand)); + if (SpaceEndPos != std::string::npos) { + // Emit the last part of the string. + AddLiteralString(Str.substr(SpaceEndPos)); + } + // We've emitted the whole string. + return; + } + if (!Operands.empty() && Operands.back().OperandType == AsmWriterOperand::isLiteralTextOperand) Operands.back().Str.append(Str); @@ -103,6 +190,18 @@ if (OperandType == isLiteralTextOperand) return "O << \"" + Str + "\"; "; + if (OperandType == isLiteralStatementOperand) { + return Str; + } + + if (OperandType == isLiteralStatementOperand) { + return Str; + } + + if (OperandType == isLiteralStatementOperand) { + return Str; + } + std::string Result = Str + "(MI"; if (MIOpNo != ~0U) Result += ", " + utostr(MIOpNo); @@ -115,7 +214,8 @@ /// ParseAsmString - Parse the specified Instruction's AsmString into this /// AsmWriterInst. /// -AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI, unsigned Variant) { +AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI, unsigned Variant) + : GroupLevel(-1) { this->CGI = &CGI; unsigned CurVariant = ~0U; // ~0 if we are outside a {.|.|.} region, other #. @@ -188,7 +288,7 @@ } else { // Get the name of the variable. std::string::size_type VarEnd = DollarPos+1; - + // handle ${foo}bar as $foo by detecting whether the character following // the dollar sign is a curly brace. If so, advance VarEnd and DollarPos // so the variable name does not contain the leading curly brace. @@ -260,6 +360,9 @@ } } + Operands.push_back( + AsmWriterOperand("EmitComments(*MI);\n", + AsmWriterOperand::isLiteralStatementOperand)); AddLiteralString("\\n"); } @@ -357,7 +460,6 @@ } O << "\n"; } - O << " break;\n"; } @@ -385,8 +487,9 @@ Command = " " + Inst->Operands[0].getCode() + "\n"; // If this is the last operand, emit a return. - if (Inst->Operands.size() == 1) + if (Inst->Operands.size() == 1) { Command += " return true;\n"; + } // Check to see if we already have 'Command' in UniqueOperandCommands. // If not, add it. @@ -431,7 +534,10 @@ // Otherwise, scan to see if all of the other instructions in this command // set share the operand. bool AllSame = true; - + // Keep track of the maximum, number of operands or any + // instruction we see in the group. + size_t MaxSize = FirstInst->Operands.size(); + for (NIT = std::find(NIT+1, InstIdxs.end(), CommandIdx); NIT != InstIdxs.end(); NIT = std::find(NIT+1, InstIdxs.end(), CommandIdx)) { @@ -439,6 +545,11 @@ // matches, we're ok, otherwise bail out. const AsmWriterInst *OtherInst = getAsmWriterInstByID(NIT-InstIdxs.begin()); + + if (OtherInst && + OtherInst->Operands.size() > FirstInst->Operands.size()) + MaxSize = std::max(MaxSize, OtherInst->Operands.size()); + if (!OtherInst || OtherInst->Operands.size() == Op || OtherInst->Operands[Op] != FirstInst->Operands[Op]) { AllSame = false; @@ -452,8 +563,12 @@ std::string Command = " " + FirstInst->Operands[Op].getCode() + "\n"; // If this is the last operand, emit a return after the code. - if (FirstInst->Operands.size() == Op+1) + if (FirstInst->Operands.size() == Op+1 && + // Don't early-out too soon. Other instructions in this + // group may have more operands. + FirstInst->Operands.size() == MaxSize) { Command += " return true;\n"; + } UniqueOperandCommands[CommandIdx] += Command; InstOpsUsed[CommandIdx]++; @@ -567,7 +682,7 @@ UniqueOperandCommands.push_back(" return true;\n"); isFirst = false; } - + std::vector InstIdxs; std::vector NumInstOpsHandled; FindUniqueOperandCommands(UniqueOperandCommands, InstIdxs, @@ -675,8 +790,16 @@ O << " // Emit the opcode for the instruction.\n" << " unsigned Bits = OpInfo[MI->getOpcode()];\n" - << " if (Bits == 0) return false;\n" - << " O << AsmStrs+(Bits & " << (1 << AsmStrBits)-1 << ");\n\n"; + << " if (Bits == 0) return false;\n\n"; + + O << " std::string OpStr(AsmStrs+(Bits & " << (1 << AsmStrBits)-1 << "));\n" + << " unsigned OperandColumn = 1;\n" + << " O << OpStr;\n\n"; + + O << " if (OpStr.find_last_of(\" \\t\") == OpStr.size()-1) {\n" + << " O.PadToColumn(TAI->getOperandColumn(1));\n" + << " OperandColumn = 2;\n" + << " }\n\n"; // Output the table driven operand information. BitsLeft = 32-AsmStrBits; @@ -741,6 +864,7 @@ O << " }\n"; O << " return true;\n"; } - + + O << " return true;\n"; O << "}\n"; } From david_goodwin at apple.com Mon Jul 20 17:13:31 2009 From: david_goodwin at apple.com (David Goodwin) Date: Mon, 20 Jul 2009 22:13:31 -0000 Subject: [llvm-commits] [llvm] r76489 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Message-ID: <200907202213.n6KMDVgX016111@zion.cs.uiuc.edu> Author: david_goodwin Date: Mon Jul 20 17:13:31 2009 New Revision: 76489 URL: http://llvm.org/viewvc/llvm-project?rev=76489&view=rev Log: CMP and TST define CPSR, not use it. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=76489&r1=76488&r2=76489&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Mon Jul 20 17:13:31 2009 @@ -351,7 +351,7 @@ /// T21_cmp_irs - Defines a set of (op r, {so_imm|r|so_reg}) cmp / test /// patterns. Similar to T2I_bin_irs except the instruction does not produce /// a explicit result, only implicitly set CPSR. -let Uses = [CPSR] in { +let Defs = [CPSR] in { multiclass T2I_cmp_is { // shifted imm def ri : T2I<(outs), (ins GPR:$lhs, t2_so_imm:$rhs), From sabre at nondot.org Mon Jul 20 17:23:49 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 22:23:49 -0000 Subject: [llvm-commits] [llvm] r76490 - /llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp Message-ID: <200907202223.n6KMNnrx016400@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 17:23:48 2009 New Revision: 76490 URL: http://llvm.org/viewvc/llvm-project?rev=76490&view=rev Log: clean up some formatting, indent by 2 instead of 4. Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp?rev=76490&r1=76489&r2=76490&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp Mon Jul 20 17:23:48 2009 @@ -241,23 +241,14 @@ } PIC16TargetAsmInfo::~PIC16TargetAsmInfo() { - - for (unsigned i = 0; i < BSSSections.size(); i++) { - delete BSSSections[i]; - } - - for (unsigned i = 0; i < IDATASections.size(); i++) { - delete IDATASections[i]; - } - - for (unsigned i = 0; i < AutosSections.size(); i++) { - delete AutosSections[i]; - } - - for (unsigned i = 0; i < ROSections.size(); i++) { - delete ROSections[i]; - } - + for (unsigned i = 0; i < BSSSections.size(); i++) + delete BSSSections[i]; + for (unsigned i = 0; i < IDATASections.size(); i++) + delete IDATASections[i]; + for (unsigned i = 0; i < AutosSections.size(); i++) + delete AutosSections[i]; + for (unsigned i = 0; i < ROSections.size(); i++) + delete ROSections[i]; delete ExternalVarDecls; delete ExternalVarDefs; } @@ -276,8 +267,7 @@ if (SectName.compare(0, AddrStr.length(), AddrStr) == 0) { std::string SectAddr = SectName.substr(AddrStr.length()); S = CreateSectionForGlobal(GV, SectAddr); - } - else { + } else { S = CreateSectionForGlobal(GV); } } else { From gohman at apple.com Mon Jul 20 17:34:18 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 20 Jul 2009 22:34:18 -0000 Subject: [llvm-commits] [llvm] r76492 - in /llvm/trunk: lib/Analysis/ScalarEvolution.cpp test/Transforms/IndVarSimplify/single-element-range.ll Message-ID: <200907202234.n6KMYIP6016751@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 17:34:18 2009 New Revision: 76492 URL: http://llvm.org/viewvc/llvm-project?rev=76492&view=rev Log: The upper argument of ConstantRange is exclusive, not inclusive. Added: llvm/trunk/test/Transforms/IndVarSimplify/single-element-range.ll Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=76492&r1=76491&r2=76492&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Jul 20 17:34:18 2009 @@ -2644,7 +2644,9 @@ APInt Mask = APInt::getAllOnesValue(BitWidth); APInt Zeros(BitWidth, 0), Ones(BitWidth, 0); ComputeMaskedBits(U->getValue(), Mask, Zeros, Ones, TD); - return ConstantRange(Ones, ~Zeros); + if (Ones == ~Zeros + 1) + return FullSet; + return ConstantRange(Ones, ~Zeros + 1); } return FullSet; Added: llvm/trunk/test/Transforms/IndVarSimplify/single-element-range.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/single-element-range.ll?rev=76492&view=auto ============================================================================== --- llvm/trunk/test/Transforms/IndVarSimplify/single-element-range.ll (added) +++ llvm/trunk/test/Transforms/IndVarSimplify/single-element-range.ll Mon Jul 20 17:34:18 2009 @@ -0,0 +1,27 @@ +; RUN: llvm-as < %s | opt -indvars + +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:64" +target triple = "armv6-apple-darwin10" + +define arm_apcscc void @sqlite3_free_table(i8** %azResult) nounwind { +entry: + br i1 undef, label %return, label %bb + +bb: ; preds = %entry + %0 = load i8** undef, align 4 ; [#uses=2] + %1 = ptrtoint i8* %0 to i32 ; [#uses=1] + %2 = icmp sgt i8* %0, inttoptr (i32 1 to i8*) ; [#uses=1] + br i1 %2, label %bb1, label %bb5 + +bb1: ; preds = %bb1, %bb + %i.01 = phi i32 [ %3, %bb1 ], [ 1, %bb ] ; [#uses=1] + %3 = add i32 %i.01, 1 ; [#uses=2] + %4 = icmp slt i32 %3, %1 ; [#uses=1] + br i1 %4, label %bb1, label %bb5 + +bb5: ; preds = %bb1, %bb + ret void + +return: ; preds = %entry + ret void +} From gohman at apple.com Mon Jul 20 17:41:19 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 20 Jul 2009 22:41:19 -0000 Subject: [llvm-commits] [llvm] r76495 - /llvm/trunk/docs/LangRef.html Message-ID: <200907202241.n6KMfJv4017009@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 17:41:19 2009 New Revision: 76495 URL: http://llvm.org/viewvc/llvm-project?rev=76495&view=rev Log: Documentation for the new non-overflow and exact keywords. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=76495&r1=76494&r2=76495&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Mon Jul 20 17:41:19 2009 @@ -2600,7 +2600,9 @@
        Syntax:
        -  <result> = add <ty> <op1>, <op2>   ; yields {ty}:result
        +  <result> = add <ty> <op1>, <op2>          ; yields {ty}:result
        +  <result> = signed add <ty> <op1>, <op2>   ; yields {ty}:result
        +  <result> = unsigned add <ty> <op1>, <op2> ; yields {ty}:result
         
        Overview:
        @@ -2620,6 +2622,10 @@

        Because LLVM integers use a two's complement representation, this instruction is appropriate for both signed and unsigned integers.

        +

        If the signed and/or unsigned keywords are present, + the behavior of the add is undefined if signed and/or unsigned + overflow, respectively, occurs.

        +
        Example:
           <result> = add i32 4, %var          ; yields {i32}:result = 4 + %var
        @@ -2666,7 +2672,9 @@
         
         
        Syntax:
        -  <result> = sub <ty> <op1>, <op2>   ; yields {ty}:result
        +  <result> = sub <ty> <op1>, <op2>            ; yields {ty}:result
        +  <result> = signed sub <ty> <op1>, <op2>     ; yields {ty}:result
        +  <result> = unsigned sub <ty> <op1>, <op2>   ; yields {ty}:result
         
        Overview:
        @@ -2692,6 +2700,10 @@

        Because LLVM integers use a two's complement representation, this instruction is appropriate for both signed and unsigned integers.

        +

        If the signed and/or unsigned keywords are present, + the behavior of the sub is undefined if signed and/or unsigned + overflow, respectively, occurs.

        +
        Example:
           <result> = sub i32 4, %var          ; yields {i32}:result = 4 - %var
        @@ -2745,7 +2757,9 @@
         
         
        Syntax:
        -  <result> = mul <ty> <op1>, <op2>   ; yields {ty}:result
        +  <result> = mul <ty> <op1>, <op2>            ; yields {ty}:result
        +  <result> = signed mul <ty> <op1>, <op2>     ; yields {ty}:result
        +  <result> = unsigned mul <ty> <op1>, <op2>   ; yields {ty}:result
         
        Overview:
        @@ -2770,6 +2784,10 @@ be sign-extended or zero-extended as appropriate to the width of the full product.

        +

        If the signed and/or unsigned keywords are present, + the behavior of the mul is undefined if signed and/or unsigned + overflow, respectively, occurs.

        +
        Example:
           <result> = mul i32 4, %var          ; yields {i32}:result = 4 * %var
        @@ -2849,7 +2867,8 @@
         
         
        Syntax:
        -  <result> = sdiv <ty> <op1>, <op2>   ; yields {ty}:result
        +  <result> = sdiv <ty> <op1>, <op2>         ; yields {ty}:result
        +  <result> = exact sdiv <ty> <op1>, <op2>   ; yields {ty}:result
         
        Overview:
        @@ -2871,6 +2890,9 @@ undefined behavior; this is a rare case, but can occur, for example, by doing a 32-bit division of -2147483648 by -1.

        +

        If the exact keyword is present, the result of the sdiv + is undefined if the result would be rounded or if overflow occurs.

        +
        Example:
           <result> = sdiv i32 4, %var          ; yields {i32}:result = 4 / %var
        @@ -3912,13 +3934,6 @@
           }
         
        -

        Note that it is undefined to access an array out of bounds: array and pointer - indexes must always be within the defined bounds of the array type when - accessed with an instruction that dereferences the pointer (e.g. a load or - store instruction). The one exception for this rule is zero length arrays. - These arrays are defined to be accessible as variable length arrays, which - requires access beyond the zero'th element.

        -

        The getelementptr instruction is often confusing. For some more insight into how it works, see the getelementptr FAQ.

        From gohman at apple.com Mon Jul 20 17:41:51 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 20 Jul 2009 22:41:51 -0000 Subject: [llvm-commits] [llvm] r76496 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <200907202241.n6KMfq6J017036@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 17:41:51 2009 New Revision: 76496 URL: http://llvm.org/viewvc/llvm-project?rev=76496&view=rev Log: Minor code simplification. Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=76496&r1=76495&r2=76496&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Jul 20 17:41:51 2009 @@ -2632,7 +2632,7 @@ APInt Max = APIntOps::umax(StartRange.getUnsignedMax(), EndRange.getUnsignedMax()); if (Min.isMinValue() && Max.isMaxValue()) - return ConstantRange(Min.getBitWidth(), /*isFullSet=*/true); + return FullSet; return ConstantRange(Min, Max+1); } } From parseerror at gmail.com Mon Jul 20 18:15:34 2009 From: parseerror at gmail.com (Ryan Flynn) Date: Mon, 20 Jul 2009 19:15:34 -0400 Subject: [llvm-commits] [commit-after-approval] c94 define __STDC_VERSION__ Message-ID: match gcc behavior by defining preprocessor token __STDC__VERSION=199409L if given -std=iso9899:199409 before: $ echo "" | gcc -dM -E -std=iso9899:199409 - | grep STDC #define __STDC_HOSTED__ 1 #define __STDC_VERSION__ 199409L $ echo "" | clang-cc -dM -E -std=iso9899:199409 | grep STDC #define __STDC_HOSTED__ 1 #define __STDC__ 1 after: $ echo "" | ~/proj/llvm-commit/Debug/bin/clang-cc -dM -E -std=iso9899:199409 | grep STDC #define __STDC_HOSTED__ 1 #define __STDC_VERSION__ 199409L #define __STDC__ 1 -------------- next part -------------- A non-text attachment was scrubbed... Name: c94-define__STDC_VERSION__.patch Type: text/x-diff Size: 896 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090720/44e09682/attachment.bin From sabre at nondot.org Mon Jul 20 18:20:05 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 20 Jul 2009 23:20:05 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r76499 - /llvm-gcc-4.2/trunk/gcc/Makefile.in Message-ID: <200907202320.n6KNK5rQ018448@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 20 18:20:05 2009 New Revision: 76499 URL: http://llvm.org/viewvc/llvm-project?rev=76499&view=rev Log: fix the bootstrap miscompare I apparently introduced somehow in r76444. -frandom-seed not being set caused g++ compiled code to have different symbols, leading to llvm-convert.o to miscompare. Modified: llvm-gcc-4.2/trunk/gcc/Makefile.in Modified: llvm-gcc-4.2/trunk/gcc/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/Makefile.in?rev=76499&r1=76498&r2=76499&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/Makefile.in (original) +++ llvm-gcc-4.2/trunk/gcc/Makefile.in Mon Jul 20 18:20:05 2009 @@ -965,6 +965,7 @@ ALL_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wmissing-prototypes \ -Wold-style-definition -Wno-overlength-strings, $(ALL_CFLAGS)) -Wno-unused ALL_CXXFLAGS += -DTARGET_NAME=\"$(target_noncanonical)\" +ALL_CXXFLAGS += -frandom-seed=0 # Turn off LLVM assertions in a non-checking build. ifndef CHECKING_ENABLED From dalej at apple.com Mon Jul 20 18:26:06 2009 From: dalej at apple.com (Dale Johannesen) Date: Mon, 20 Jul 2009 23:26:06 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r76501 - /llvm-gcc-4.2/trunk/gcc/c-common.c Message-ID: <200907202326.n6KNQ7Bw018761@zion.cs.uiuc.edu> Author: johannes Date: Mon Jul 20 18:26:06 2009 New Revision: 76501 URL: http://llvm.org/viewvc/llvm-project?rev=76501&view=rev Log: asm blocks used the P modifier for FUNCTION_DECLs, whether we want the function's address or are calling it. After struggling with this in the X86 BE for a while I decided it shouldn't have to handle this; changing FE to emit P only in the call context. Modified: llvm-gcc-4.2/trunk/gcc/c-common.c Modified: llvm-gcc-4.2/trunk/gcc/c-common.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-common.c?rev=76501&r1=76500&r2=76501&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/c-common.c (original) +++ llvm-gcc-4.2/trunk/gcc/c-common.c Mon Jul 20 18:26:06 2009 @@ -8001,6 +8001,12 @@ { if (TARGET_64BIT) e.modifier = "l"; + /* LLVM LOCAL begin apply this only within calls */ +#ifdef ENABLE_LLVM + else + e.modifier = "P"; +#endif + /* LLVM LOCAL end */ iasm_force_constraint ("X", &e); } } @@ -8492,6 +8498,16 @@ e->modifier = 0; strcat (buf, "*"); } +/* LLVM LOCAL begin apply P modifier only within calls. */ +#ifdef ENABLE_LLVM + else + { + modifier = ""; + if (e->modifier && strcmp (e->modifier, "P") == 0) + modifier = "P"; + } +#endif +/* LLVM LOCAL end */ #endif iasm_get_register_var (arg, modifier, buf, argnum, must_be_reg, e); break; From dalej at apple.com Mon Jul 20 18:27:40 2009 From: dalej at apple.com (Dale Johannesen) Date: Mon, 20 Jul 2009 23:27:40 -0000 Subject: [llvm-commits] [llvm] r76502 - in /llvm/trunk/lib/CodeGen/SelectionDAG: SelectionDAGBuild.cpp TargetLowering.cpp Message-ID: <200907202327.n6KNReGf018829@zion.cs.uiuc.edu> Author: johannes Date: Mon Jul 20 18:27:39 2009 New Revision: 76502 URL: http://llvm.org/viewvc/llvm-project?rev=76502&view=rev Log: Move stripping of bitcasts in inline asm arguments to a place where it affects everything. Occurs only on calls AFAIK. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=76502&r1=76501&r2=76502&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Mon Jul 20 18:27:39 2009 @@ -5059,6 +5059,11 @@ // If this is an input or an indirect output, process the call argument. // BasicBlocks are labels, currently appearing only in asm's. if (OpInfo.CallOperandVal) { + // Strip bitcasts, if any. This mostly comes up for functions. + ConstantExpr* CE = NULL; + while ((CE = dyn_cast(OpInfo.CallOperandVal)) && + CE->getOpcode()==Instruction::BitCast) + OpInfo.CallOperandVal = CE->getOperand(0); if (BasicBlock *BB = dyn_cast(OpInfo.CallOperandVal)) { OpInfo.CallOperand = DAG.getBasicBlock(FuncInfo.MBBMap[BB]); } else { Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=76502&r1=76501&r2=76502&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Jul 20 18:27:39 2009 @@ -2406,20 +2406,10 @@ // 'X' matches anything. if (OpInfo.ConstraintCode == "X" && OpInfo.CallOperandVal) { - // Look through bitcasts over functions. In the context of an asm - // argument we don't care about bitcasting function types; the parameters - // to the function, if any, will have been handled elsewhere. - Value *v = OpInfo.CallOperandVal; - ConstantExpr *CE = NULL; - while ((CE = dyn_cast(v)) && - CE->getOpcode()==Instruction::BitCast) - v = CE->getOperand(0); - if (!isa(v)) - v = OpInfo.CallOperandVal; // Labels and constants are handled elsewhere ('X' is the only thing // that matches labels). For Functions, the type here is the type of - // the result, which is not what we want to look at; leave them alone - // (minus any bitcasts). + // the result, which is not what we want to look at; leave them alone. + Value *v = OpInfo.CallOperandVal; if (isa(v) || isa(v) || isa(v)) { OpInfo.CallOperandVal = v; return; From clattner at apple.com Mon Jul 20 18:29:27 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 16:29:27 -0700 Subject: [llvm-commits] [commit-after-approval] c94 define __STDC_VERSION__ In-Reply-To: References: Message-ID: <74FA35A6-4FD4-4ED0-8626-F5AB8A9C2C8C@apple.com> On Jul 20, 2009, at 4:15 PM, Ryan Flynn wrote: > match gcc behavior by defining preprocessor token > __STDC__VERSION=199409L if given -std=iso9899:199409 Looks great to me, please commit. Please send clang patches to cfe- commits though, -Chris > > before: > $ echo "" | gcc -dM -E -std=iso9899:199409 - | grep STDC > #define __STDC_HOSTED__ 1 > #define __STDC_VERSION__ 199409L > > $ echo "" | clang-cc -dM -E -std=iso9899:199409 | grep STDC > #define __STDC_HOSTED__ 1 > #define __STDC__ 1 > > after: > > $ echo "" | ~/proj/llvm-commit/Debug/bin/clang-cc -dM -E > -std=iso9899:199409 | grep STDC > #define __STDC_HOSTED__ 1 > #define __STDC_VERSION__ 199409L > #define __STDC__ 1 > define__STDC_VERSION__ > .patch>_______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From clattner at apple.com Mon Jul 20 18:32:08 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 16:32:08 -0700 Subject: [llvm-commits] [llvm] r76502 - in /llvm/trunk/lib/CodeGen/SelectionDAG: SelectionDAGBuild.cpp TargetLowering.cpp In-Reply-To: <200907202327.n6KNReGf018829@zion.cs.uiuc.edu> References: <200907202327.n6KNReGf018829@zion.cs.uiuc.edu> Message-ID: On Jul 20, 2009, at 4:27 PM, Dale Johannesen wrote: > Author: johannes > Date: Mon Jul 20 18:27:39 2009 > New Revision: 76502 > > URL: http://llvm.org/viewvc/llvm-project?rev=76502&view=rev > Log: > Move stripping of bitcasts in inline asm arguments > to a place where it affects everything. Occurs > only on calls AFAIK. Hi Dale, please use Value::stripPointerCasts to do this. This will strip things like 'getelementptr x, 0, 0, 0' which constantexpr bitcasts sometimes get canonicalized into. -Chris > > > Modified: > llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=76502&r1=76501&r2=76502&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Mon > Jul 20 18:27:39 2009 > @@ -5059,6 +5059,11 @@ > // If this is an input or an indirect output, process the call > argument. > // BasicBlocks are labels, currently appearing only in asm's. > if (OpInfo.CallOperandVal) { > + // Strip bitcasts, if any. This mostly comes up for functions. > + ConstantExpr* CE = NULL; > + while ((CE = dyn_cast(OpInfo.CallOperandVal)) && > + CE->getOpcode()==Instruction::BitCast) > + OpInfo.CallOperandVal = CE->getOperand(0); > if (BasicBlock *BB = > dyn_cast(OpInfo.CallOperandVal)) { > OpInfo.CallOperand = DAG.getBasicBlock(FuncInfo.MBBMap[BB]); > } else { > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=76502&r1=76501&r2=76502&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Jul > 20 18:27:39 2009 > @@ -2406,20 +2406,10 @@ > > // 'X' matches anything. > if (OpInfo.ConstraintCode == "X" && OpInfo.CallOperandVal) { > - // Look through bitcasts over functions. In the context of an > asm > - // argument we don't care about bitcasting function types; the > parameters > - // to the function, if any, will have been handled elsewhere. > - Value *v = OpInfo.CallOperandVal; > - ConstantExpr *CE = NULL; > - while ((CE = dyn_cast(v)) && > - CE->getOpcode()==Instruction::BitCast) > - v = CE->getOperand(0); > - if (!isa(v)) > - v = OpInfo.CallOperandVal; > // Labels and constants are handled elsewhere ('X' is the only > thing > // that matches labels). For Functions, the type here is the > type of > - // the result, which is not what we want to look at; leave them > alone > - // (minus any bitcasts). > + // the result, which is not what we want to look at; leave them > alone. > + Value *v = OpInfo.CallOperandVal; > if (isa(v) || isa(v) || > isa(v)) { > OpInfo.CallOperandVal = v; > return; > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From dalej at apple.com Mon Jul 20 18:39:13 2009 From: dalej at apple.com (Dale Johannesen) Date: Mon, 20 Jul 2009 23:39:13 -0000 Subject: [llvm-commits] [llvm] r76503 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200907202339.n6KNdDgV019193@zion.cs.uiuc.edu> Author: johannes Date: Mon Jul 20 18:39:13 2009 New Revision: 76503 URL: http://llvm.org/viewvc/llvm-project?rev=76503&view=rev Log: Make sure a global matching asm 'i' constraint gets its flags set properly. (hasMemory is clearly irrelevant when matching 'i', I don't understand what this was supposed to be doing.) gcc.apple/asm-block-25.c (test passed before by accident, but generated code was wrong) Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=76503&r1=76502&r2=76503&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Jul 20 18:39:13 2009 @@ -4557,7 +4557,7 @@ SDValue Result; if (OpFlags == X86II::MO_NO_FLAG && isInt32(Offset)) { // A direct static reference to a global. - Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), Offset); + Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), Offset, OpFlags); Offset = 0; } else { Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), 0, OpFlags); @@ -8911,10 +8911,7 @@ getTargetMachine()))) return; - if (hasMemory) - Op = LowerGlobalAddress(GV, Op.getDebugLoc(), Offset, DAG); - else - Op = DAG.getTargetGlobalAddress(GV, GA->getValueType(0), Offset); + Op = LowerGlobalAddress(GV, Op.getDebugLoc(), Offset, DAG); Result = Op; break; } From gohman at apple.com Mon Jul 20 18:53:36 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 20 Jul 2009 23:53:36 -0000 Subject: [llvm-commits] [llvm] r76504 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <200907202353.n6KNraX2019652@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 18:53:35 2009 New Revision: 76504 URL: http://llvm.org/viewvc/llvm-project?rev=76504&view=rev Log: Remove the code that tried to evaluate whether (A pred B) is known by determining if (B pred (B-A)) is known, as it doesn't handle overflow correctly. Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=76504&r1=76503&r2=76504&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Jul 20 18:53:35 2009 @@ -4274,20 +4274,6 @@ return true; if (LHSRange.getSignedMin().sge(RHSRange.getSignedMax())) return false; - - const SCEV *Diff = getMinusSCEV(LHS, RHS); - ConstantRange DiffRange = getUnsignedRange(Diff); - if (isKnownNegative(Diff)) { - if (DiffRange.getUnsignedMax().ult(LHSRange.getUnsignedMin())) - return true; - if (DiffRange.getUnsignedMin().uge(LHSRange.getUnsignedMax())) - return false; - } else if (isKnownPositive(Diff)) { - if (LHSRange.getUnsignedMax().ult(DiffRange.getUnsignedMin())) - return true; - if (LHSRange.getUnsignedMin().uge(DiffRange.getUnsignedMax())) - return false; - } break; } case ICmpInst::ICMP_SGE: @@ -4300,20 +4286,6 @@ return true; if (LHSRange.getSignedMin().sgt(RHSRange.getSignedMax())) return false; - - const SCEV *Diff = getMinusSCEV(LHS, RHS); - ConstantRange DiffRange = getUnsignedRange(Diff); - if (isKnownNonPositive(Diff)) { - if (DiffRange.getUnsignedMax().ule(LHSRange.getUnsignedMin())) - return true; - if (DiffRange.getUnsignedMin().ugt(LHSRange.getUnsignedMax())) - return false; - } else if (isKnownNonNegative(Diff)) { - if (LHSRange.getUnsignedMax().ule(DiffRange.getUnsignedMin())) - return true; - if (LHSRange.getUnsignedMin().ugt(DiffRange.getUnsignedMax())) - return false; - } break; } case ICmpInst::ICMP_UGT: @@ -4326,13 +4298,6 @@ return true; if (LHSRange.getUnsignedMin().uge(RHSRange.getUnsignedMax())) return false; - - const SCEV *Diff = getMinusSCEV(LHS, RHS); - ConstantRange DiffRange = getUnsignedRange(Diff); - if (LHSRange.getUnsignedMax().ult(DiffRange.getUnsignedMin())) - return true; - if (LHSRange.getUnsignedMin().uge(DiffRange.getUnsignedMax())) - return false; break; } case ICmpInst::ICMP_UGE: @@ -4345,13 +4310,6 @@ return true; if (LHSRange.getUnsignedMin().ugt(RHSRange.getUnsignedMax())) return false; - - const SCEV *Diff = getMinusSCEV(LHS, RHS); - ConstantRange DiffRange = getUnsignedRange(Diff); - if (LHSRange.getUnsignedMax().ule(DiffRange.getUnsignedMin())) - return true; - if (LHSRange.getUnsignedMin().ugt(DiffRange.getUnsignedMax())) - return false; break; } case ICmpInst::ICMP_NE: { From gohman at apple.com Mon Jul 20 18:54:43 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 20 Jul 2009 23:54:43 -0000 Subject: [llvm-commits] [llvm] r76505 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <200907202354.n6KNshWD019696@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 18:54:43 2009 New Revision: 76505 URL: http://llvm.org/viewvc/llvm-project?rev=76505&view=rev Log: Add a comment to clarify why there isn't any code in this spot. Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=76505&r1=76504&r2=76505&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Jul 20 18:54:43 2009 @@ -4324,6 +4324,8 @@ break; } case ICmpInst::ICMP_EQ: + // The check at the top of the function catches the case where + // the values are known to be equal. break; } return false; From daniel at zuster.org Mon Jul 20 19:05:04 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 20 Jul 2009 17:05:04 -0700 Subject: [llvm-commits] [PATCH] StringRef class. Message-ID: <6a8523d60907201705y5221663bi48a2042bdeb5bc58@mail.gmail.com> Hi, The attached patch provides a new StringRef helper class, which is used to represent a constant string (pointer & length) which is not owned. This class is not intended for direct use, rather it is a way to have uniform and efficient APIs. For example, this code in llvm/Value.h: -- /// getNameStart - Return a pointer to a null terminated string for this name. /// Note that names can have null characters within the string as well as at /// their end. This always returns a non-null pointer. const char *getNameStart() const; /// getNameEnd - Return a pointer to the end of the name. const char *getNameEnd() const { return getNameStart() + getNameLen(); } /// isName - Return true if this value has the name specified by the provided /// nul terminated string. bool isName(const char *N) const; /// getNameLen - Return the length of the string, correctly handling nul /// characters embedded into them. unsigned getNameLen() const; /// getName()/getNameStr() - Return the name of the specified value, /// *constructing a string* to hold it. Because these are guaranteed to /// construct a string, they are very expensive and should be avoided. std::string getName() const { return getNameStr(); } std::string getNameStr() const; void setName(const std::string &name); void setName(const char *Name, unsigned NameLen); void setName(const char *Name); // Takes a null-terminated string. -- becomes: -- StringRef getName() const; void setName(const StringRef &); -- without any loss in efficiency (assuming a sufficiently smart compiler), and an increase in convenience. The downside is that combining unowned memory and implicit construction provides some opportunities for shooting oneself in the foot. To mitigate this risk, the general idiom is that one should generally avoid explicitly naming the StringRef and only use it as a compiler generated temporary. Storage of a StringRef should be limited to contexts when the reference strings are available in some long term storage (like a MemoryBuffer). Overall I think this is a good compromise, and will allow us to have cleaner, more uniform, and somewhat more efficient APIs, with a minimum of risk. Comments? - Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: StringRef.patch Type: application/octet-stream Size: 5621 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090720/e49f069a/attachment.obj From dalej at apple.com Mon Jul 20 19:12:30 2009 From: dalej at apple.com (Dale Johannesen) Date: Tue, 21 Jul 2009 00:12:30 -0000 Subject: [llvm-commits] [llvm] r76517 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200907210012.n6L0CVGJ020365@zion.cs.uiuc.edu> Author: johannes Date: Mon Jul 20 19:12:29 2009 New Revision: 76517 URL: http://llvm.org/viewvc/llvm-project?rev=76517&view=rev Log: revert 76503 while I figure out what's going on Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=76517&r1=76516&r2=76517&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Jul 20 19:12:29 2009 @@ -4557,7 +4557,7 @@ SDValue Result; if (OpFlags == X86II::MO_NO_FLAG && isInt32(Offset)) { // A direct static reference to a global. - Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), Offset, OpFlags); + Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), Offset); Offset = 0; } else { Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), 0, OpFlags); @@ -8911,7 +8911,10 @@ getTargetMachine()))) return; - Op = LowerGlobalAddress(GV, Op.getDebugLoc(), Offset, DAG); + if (hasMemory) + Op = LowerGlobalAddress(GV, Op.getDebugLoc(), Offset, DAG); + else + Op = DAG.getTargetGlobalAddress(GV, GA->getValueType(0), Offset); Result = Op; break; } From devang.patel at gmail.com Mon Jul 20 19:13:58 2009 From: devang.patel at gmail.com (Devang Patel) Date: Mon, 20 Jul 2009 17:13:58 -0700 Subject: [llvm-commits] patch: mdnode .bc format change In-Reply-To: <4A4ED86B.6000007@mxc.ca> References: <4A4ED86B.6000007@mxc.ca> Message-ID: <352a1fb20907201713p799a59b3i8ab66e9c47446058@mail.gmail.com> Nick, On Fri, Jul 3, 2009 at 9:19 PM, Nick Lewycky wrote: > This patch implements the new MDNode on-disk format for .bc files which we > would use if we supported instructions in MDNodes. > > This format is plainly inefficient when MDNodes only contain constants, but > I don't want to release 2.6 with a legacy file format that we need to > support. > > In the current format we store the MDNodes in the Constants block with > references to the other constants by number. > > The new format mentions the MDNodes in the Constant block but stores no data > about them other than the fact they exist. Why not put MDNodes in METADATA_BLOCK ? Other comments: - I think WriteMetadata() is going to write MDNode multiple times. - Reusing ConstantPlaceHolder for Metadata is not a good idea, I've doubts that this will work. ConstantPlaceHolder is meant for ConstExprs. I am moving in a direction where metadata is not derived from Constant. I will introduce new block in bitcode to hold metadata strings and nodes. - Devang From evan.cheng at apple.com Mon Jul 20 19:23:13 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 00:23:13 -0000 Subject: [llvm-commits] [llvm] r76519 - in /llvm/trunk: lib/CodeGen/SimpleRegisterCoalescing.cpp test/CodeGen/X86/subclass-coalesce.ll Message-ID: <200907210023.n6L0NFKP020696@zion.cs.uiuc.edu> Author: evancheng Date: Mon Jul 20 19:22:59 2009 New Revision: 76519 URL: http://llvm.org/viewvc/llvm-project?rev=76519&view=rev Log: Cross RC coalescing is now on by default. Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp llvm/trunk/test/CodeGen/X86/subclass-coalesce.ll Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=76519&r1=76518&r2=76519&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original) +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Mon Jul 20 19:22:59 2009 @@ -57,9 +57,9 @@ cl::init(false), cl::Hidden); static cl::opt -CrossClassJoin("join-cross-class-copies", - cl::desc("Coalesce cross register class copies"), - cl::init(true), cl::Hidden); +DisableCrossClassJoin("disable-cross-class-join", + cl::desc("Avoid coalescing cross register class copies"), + cl::init(false), cl::Hidden); static cl::opt PhysJoinTweak("tweak-phys-join-heuristics", @@ -1401,7 +1401,7 @@ } } } else if (differingRegisterClasses(SrcReg, DstReg)) { - if (!CrossClassJoin) + if (DisableCrossClassJoin) return false; CrossRC = true; Modified: llvm/trunk/test/CodeGen/X86/subclass-coalesce.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/subclass-coalesce.ll?rev=76519&r1=76518&r2=76519&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/subclass-coalesce.ll (original) +++ llvm/trunk/test/CodeGen/X86/subclass-coalesce.ll Mon Jul 20 19:22:59 2009 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=x86 -join-cross-class-copies -stats |& grep {Number of cross class joins performed} +; RUN: llvm-as < %s | llc -march=x86 -stats |& grep {Number of cross class joins performed} @mem.6 = external global i64 ; [#uses=1] From evan.cheng at apple.com Mon Jul 20 19:31:26 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 00:31:26 -0000 Subject: [llvm-commits] [llvm] r76520 - in /llvm/trunk: lib/Target/ARM/ARMISelDAGToDAG.cpp test/CodeGen/ARM/mul_const.ll test/CodeGen/Thumb2/mul_const.ll Message-ID: <200907210031.n6L0VReZ020922@zion.cs.uiuc.edu> Author: evancheng Date: Mon Jul 20 19:31:12 2009 New Revision: 76520 URL: http://llvm.org/viewvc/llvm-project?rev=76520&view=rev Log: Fix ARM isle code that optimize multiply by constants which are power-of-2 +/- 1. Added: llvm/trunk/test/CodeGen/ARM/mul_const.ll llvm/trunk/test/CodeGen/Thumb2/mul_const.ll Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp?rev=76520&r1=76519&r2=76520&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Mon Jul 20 19:31:12 2009 @@ -949,26 +949,36 @@ unsigned RHSV = C->getZExtValue(); if (!RHSV) break; if (isPowerOf2_32(RHSV-1)) { // 2^n+1? + unsigned ShImm = Log2_32(RHSV-1); + if (ShImm >= 32) + break; SDValue V = Op.getOperand(0); - unsigned ShImm = ARM_AM::getSORegOpc(ARM_AM::lsl, Log2_32(RHSV-1)); - SDValue Ops[] = { V, V, CurDAG->getRegister(0, MVT::i32), - CurDAG->getTargetConstant(ShImm, MVT::i32), - getAL(CurDAG), CurDAG->getRegister(0, MVT::i32), - CurDAG->getRegister(0, MVT::i32) }; - return CurDAG->SelectNodeTo(N, (Subtarget->isThumb() && - Subtarget->hasThumb2()) ? - ARM::t2ADDrs : ARM::ADDrs, MVT::i32, Ops, 7); + ShImm = ARM_AM::getSORegOpc(ARM_AM::lsl, ShImm); + SDValue ShImmOp = CurDAG->getConstant(ShImm, MVT::i32); + SDValue Reg0 = CurDAG->getRegister(0, MVT::i32); + if (Subtarget->isThumb() && Subtarget->hasThumb2()) { + SDValue Ops[] = { V, V, ShImmOp, getAL(CurDAG), Reg0, Reg0 }; + return CurDAG->SelectNodeTo(N, ARM::t2ADDrs, MVT::i32, Ops, 6); + } else { + SDValue Ops[] = { V, V, Reg0, ShImmOp, getAL(CurDAG), Reg0, Reg0 }; + return CurDAG->SelectNodeTo(N, ARM::ADDrs, MVT::i32, Ops, 7); + } } if (isPowerOf2_32(RHSV+1)) { // 2^n-1? + unsigned ShImm = Log2_32(RHSV+1); + if (ShImm >= 32) + break; SDValue V = Op.getOperand(0); - unsigned ShImm = ARM_AM::getSORegOpc(ARM_AM::lsl, Log2_32(RHSV+1)); - SDValue Ops[] = { V, V, CurDAG->getRegister(0, MVT::i32), - CurDAG->getTargetConstant(ShImm, MVT::i32), - getAL(CurDAG), CurDAG->getRegister(0, MVT::i32), - CurDAG->getRegister(0, MVT::i32) }; - return CurDAG->SelectNodeTo(N, (Subtarget->isThumb() && - Subtarget->hasThumb2()) ? - ARM::t2RSBrs : ARM::RSBrs, MVT::i32, Ops, 7); + ShImm = ARM_AM::getSORegOpc(ARM_AM::lsl, ShImm); + SDValue ShImmOp = CurDAG->getConstant(ShImm, MVT::i32); + SDValue Reg0 = CurDAG->getRegister(0, MVT::i32); + if (Subtarget->isThumb() && Subtarget->hasThumb2()) { + SDValue Ops[] = { V, V, ShImmOp, getAL(CurDAG), Reg0 }; + return CurDAG->SelectNodeTo(N, ARM::t2RSBrs, MVT::i32, Ops, 5); + } else { + SDValue Ops[] = { V, V, Reg0, ShImmOp, getAL(CurDAG), Reg0, Reg0 }; + return CurDAG->SelectNodeTo(N, ARM::RSBrs, MVT::i32, Ops, 7); + } } } break; Added: llvm/trunk/test/CodeGen/ARM/mul_const.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/mul_const.ll?rev=76520&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/ARM/mul_const.ll (added) +++ llvm/trunk/test/CodeGen/ARM/mul_const.ll Mon Jul 20 19:31:12 2009 @@ -0,0 +1,17 @@ +; RUN: llvm-as < %s | llc -march=arm | FileCheck %s + +define i32 @t1(i32 %v) nounwind readnone { +entry: +; CHECK: t1: +; CHECK: add r0, r0, r0, lsl #3 + %0 = mul i32 %v, 9 + ret i32 %0 +} + +define i32 @t2(i32 %v) nounwind readnone { +entry: +; CHECK: t2: +; CHECK: rsb r0, r0, r0, lsl #3 + %0 = mul i32 %v, 7 + ret i32 %0 +} Added: llvm/trunk/test/CodeGen/Thumb2/mul_const.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/mul_const.ll?rev=76520&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Thumb2/mul_const.ll (added) +++ llvm/trunk/test/CodeGen/Thumb2/mul_const.ll Mon Jul 20 19:31:12 2009 @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | FileCheck %s +; rdar://7069502 + +define i32 @t1(i32 %v) nounwind readnone { +entry: +; CHECK: t1: +; CHECK: add r0, r0, r0, lsl #3 + %0 = mul i32 %v, 9 + ret i32 %0 +} + +define i32 @t2(i32 %v) nounwind readnone { +entry: +; CHECK: t2: +; CHECK: rsb r0, r0, r0, lsl #3 + %0 = mul i32 %v, 7 + ret i32 %0 +} From gohman at apple.com Mon Jul 20 19:37:58 2009 From: gohman at apple.com (Dan Gohman) Date: Tue, 21 Jul 2009 00:37:58 -0000 Subject: [llvm-commits] [llvm] r76521 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <200907210038.n6L0c0H3021138@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 19:37:45 2009 New Revision: 76521 URL: http://llvm.org/viewvc/llvm-project?rev=76521&view=rev Log: Minor code simplification. Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=76521&r1=76520&r2=76521&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Jul 20 19:37:45 2009 @@ -2741,7 +2741,7 @@ APInt Max = APIntOps::smax(StartRange.getSignedMax(), EndRange.getSignedMax()); if (Min.isMinSignedValue() && Max.isMaxSignedValue()) - return ConstantRange(Min.getBitWidth(), /*isFullSet=*/true); + return FullSet; return ConstantRange(Min, Max+1); } } From gohman at apple.com Mon Jul 20 19:38:58 2009 From: gohman at apple.com (Dan Gohman) Date: Tue, 21 Jul 2009 00:38:58 -0000 Subject: [llvm-commits] [llvm] r76523 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <200907210038.n6L0cwee021191@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 19:38:55 2009 New Revision: 76523 URL: http://llvm.org/viewvc/llvm-project?rev=76523&view=rev Log: Whitespace cleanups. Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=76523&r1=76522&r2=76523&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Jul 20 19:38:55 2009 @@ -568,8 +568,8 @@ /// BinomialCoefficient - Compute BC(It, K). The result has width W. /// Assume, K > 0. static const SCEV *BinomialCoefficient(const SCEV *It, unsigned K, - ScalarEvolution &SE, - const Type* ResultTy) { + ScalarEvolution &SE, + const Type* ResultTy) { // Handle the simplest case efficiently. if (K == 1) return SE.getTruncateOrZeroExtend(It, ResultTy); @@ -686,7 +686,7 @@ /// where BC(It, k) stands for binomial coefficient. /// const SCEV *SCEVAddRecExpr::evaluateAtIteration(const SCEV *It, - ScalarEvolution &SE) const { + ScalarEvolution &SE) const { const SCEV *Result = getStart(); for (unsigned i = 1, e = getNumOperands(); i != e; ++i) { // The computation is correct in the face of overflow provided that the From gohman at apple.com Mon Jul 20 19:42:51 2009 From: gohman at apple.com (Dan Gohman) Date: Tue, 21 Jul 2009 00:42:51 -0000 Subject: [llvm-commits] [llvm] r76524 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <200907210042.n6L0gqi1021314@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 19:42:47 2009 New Revision: 76524 URL: http://llvm.org/viewvc/llvm-project?rev=76524&view=rev Log: Make the range calculations for addrecs to be more conservative, as they aren't currently prepared to handle complicated overflow cases. Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=76524&r1=76523&r2=76524&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Jul 20 19:42:47 2009 @@ -2619,10 +2619,15 @@ MaxBECount = getNoopOrZeroExtend(MaxBECount, Ty); const SCEV *Start = AddRec->getStart(); + const SCEV *Step = AddRec->getStepRecurrence(*this); const SCEV *End = AddRec->evaluateAtIteration(MaxBECount, *this); // Check for overflow. - if (!isKnownPredicate(ICmpInst::ICMP_ULE, Start, End)) + // TODO: This is very conservative. + if (!(Step->isOne() && + isKnownPredicate(ICmpInst::ICMP_ULT, Start, End)) && + !(Step->isAllOnesValue() && + isKnownPredicate(ICmpInst::ICMP_UGT, Start, End))) return FullSet; ConstantRange StartRange = getUnsignedRange(Start); @@ -2728,9 +2733,10 @@ const SCEV *End = AddRec->evaluateAtIteration(MaxBECount, *this); // Check for overflow. - if (!(isKnownPositive(Step) && + // TODO: This is very conservative. + if (!(Step->isOne() && isKnownPredicate(ICmpInst::ICMP_SLT, Start, End)) && - !(isKnownNegative(Step) && + !(Step->isAllOnesValue() && isKnownPredicate(ICmpInst::ICMP_SGT, Start, End))) return FullSet; From gohman at apple.com Mon Jul 20 19:43:43 2009 From: gohman at apple.com (Dan Gohman) Date: Tue, 21 Jul 2009 00:43:43 -0000 Subject: [llvm-commits] [llvm] r76525 - /llvm/trunk/test/CodeGen/PIC16/ Message-ID: <200907210043.n6L0hhd8021348@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 19:43:42 2009 New Revision: 76525 URL: http://llvm.org/viewvc/llvm-project?rev=76525&view=rev Log: Add an svn:ignore. Modified: llvm/trunk/test/CodeGen/PIC16/ (props changed) Propchange: llvm/trunk/test/CodeGen/PIC16/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Mon Jul 20 19:43:42 2009 @@ -0,0 +1,4 @@ +Output +*.log +*.sum + From gohman at apple.com Mon Jul 20 19:51:18 2009 From: gohman at apple.com (Dan Gohman) Date: Tue, 21 Jul 2009 00:51:18 -0000 Subject: [llvm-commits] [llvm] r76526 - /llvm/trunk/test/Analysis/ScalarEvolution/zext-wrap.ll Message-ID: <200907210051.n6L0pL1l021566@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 19:50:52 2009 New Revision: 76526 URL: http://llvm.org/viewvc/llvm-project?rev=76526&view=rev Log: Add a testcase for PR4569, which is now fixed. Added: llvm/trunk/test/Analysis/ScalarEvolution/zext-wrap.ll Added: llvm/trunk/test/Analysis/ScalarEvolution/zext-wrap.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/ScalarEvolution/zext-wrap.ll?rev=76526&view=auto ============================================================================== --- llvm/trunk/test/Analysis/ScalarEvolution/zext-wrap.ll (added) +++ llvm/trunk/test/Analysis/ScalarEvolution/zext-wrap.ll Mon Jul 20 19:50:52 2009 @@ -0,0 +1,24 @@ +; RUN: llvm-as < %s | opt -analyze -scalar-evolution -disable-output \ +; RUN: | FileCheck %s +; PR4569 + +define i16 @main() nounwind { +entry: + br label %bb.i + +bb.i: ; preds = %bb1.i, %bb.nph + %l_95.0.i1 = phi i8 [ %tmp1, %bb.i ], [ 0, %entry ] + +; This cast shouldn't be folded into the addrec. +; CHECK: %tmp = zext i8 %l_95.0.i1 to i16 +; CHECK: --> (zext i8 {0,+,-1} to i16) Exits: 2 + + %tmp = zext i8 %l_95.0.i1 to i16 + + %tmp1 = add i8 %l_95.0.i1, -1 + %phitmp = icmp eq i8 %tmp1, 1 + br i1 %phitmp, label %bb1.i.func_36.exit_crit_edge, label %bb.i + +bb1.i.func_36.exit_crit_edge: + ret i16 %tmp +} From eli.friedman at gmail.com Mon Jul 20 20:00:29 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 20 Jul 2009 18:00:29 -0700 Subject: [llvm-commits] [llvm] r76520 - in /llvm/trunk: lib/Target/ARM/ARMISelDAGToDAG.cpp test/CodeGen/ARM/mul_const.ll test/CodeGen/Thumb2/mul_const.ll In-Reply-To: <200907210031.n6L0VReZ020922@zion.cs.uiuc.edu> References: <200907210031.n6L0VReZ020922@zion.cs.uiuc.edu> Message-ID: On Mon, Jul 20, 2009 at 5:31 PM, Evan Cheng wrote: > + ? ? ? ?if (Subtarget->isThumb() && Subtarget->hasThumb2()) { Nit: the check for hasThumb2() is redundant. -Eli From gohman at apple.com Mon Jul 20 20:02:30 2009 From: gohman at apple.com (Dan Gohman) Date: Tue, 21 Jul 2009 01:02:30 -0000 Subject: [llvm-commits] [llvm] r76527 - /llvm/trunk/test/Transforms/InstCombine/cast3.ll Message-ID: <200907210102.n6L12YdI021908@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 20 20:02:18 2009 New Revision: 76527 URL: http://llvm.org/viewvc/llvm-project?rev=76527&view=rev Log: Add a testcase for PR2831. Added: llvm/trunk/test/Transforms/InstCombine/cast3.ll Added: llvm/trunk/test/Transforms/InstCombine/cast3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/cast3.ll?rev=76527&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/cast3.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/cast3.ll Mon Jul 20 20:02:18 2009 @@ -0,0 +1,35 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep getelementptr +; PR2831 + +; Don't raise arbitrary inttoptr+arithmetic+ptrtoint to getelementptr. + +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:32:32" + +define i32 @main(i32 %argc, i8** %argv) nounwind { +entry: + %0 = ptrtoint i8** %argv to i32 ; [#uses=1] + %1 = add i32 %0, 1 ; [#uses=1] + ret i32 %1 +} + +; This testcase could theoretically be optimized down to return zero, +; but for now being conservative with ptrtoint/inttoptr is fine. +define i32 @a() nounwind { +entry: + %b = alloca i32 ; [#uses=3] + %a = alloca i32 ; [#uses=2] + %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + store i32 1, i32* %b, align 4 + %a1 = ptrtoint i32* %a to i32 ; [#uses=1] + %b4 = ptrtoint i32* %b to i32 ; [#uses=1] + %a7 = ptrtoint i32* %a to i32 ; [#uses=1] + %0 = sub i32 %b4, %a7 ; [#uses=1] + %1 = add i32 %a1, %0 ; [#uses=1] + %2 = inttoptr i32 %1 to i32* ; [#uses=1] + store i32 0, i32* %2, align 4 + %3 = load i32* %b, align 4 ; [#uses=1] + br label %return + +return: ; preds = %entry + ret i32 %3 +} From isanbard at gmail.com Mon Jul 20 20:07:46 2009 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 21 Jul 2009 01:07:46 -0000 Subject: [llvm-commits] [llvm] r76528 - /llvm/trunk/lib/Target/X86/X86Instr64bit.td Message-ID: <200907210107.n6L17o8j022074@zion.cs.uiuc.edu> Author: void Date: Mon Jul 20 20:07:24 2009 New Revision: 76528 URL: http://llvm.org/viewvc/llvm-project?rev=76528&view=rev Log: Add the following functions: - SYSCALL (normal fast system call instruction) [0f 05] - SYSENTER (system call entry instruction) [0f 34] - SYSEXIT (system call exit instruction) [0f 35] - SYSEXIT64 (system call exit instruction to 64-bit user code) [REX.W 0f 35] - SYSRET (system call return instruction) [0f 07] Patch by Sean Callanan. Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Instr64bit.td?rev=76528&r1=76527&r2=76528&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86Instr64bit.td (original) +++ llvm/trunk/lib/Target/X86/X86Instr64bit.td Mon Jul 20 20:07:24 2009 @@ -245,6 +245,18 @@ def REP_STOSQ : RI<0xAB, RawFrm, (outs), (ins), "{rep;stosq|rep stosq}", [(X86rep_stos i64)]>, REP; +// Fast system-call instructions +def SYSCALL : I<0x05, RawFrm, + (outs), (ins), "syscall", []>, TB; +def SYSENTER : I<0x34, RawFrm, + (outs), (ins), "sysenter", []>, TB; +def SYSEXIT : I<0x35, RawFrm, + (outs), (ins), "sysexit", []>, TB; +def SYSEXIT64 : RI<0x35, RawFrm, + (outs), (ins), "sysexit", []>, TB; +def SYSRET : I<0x07, RawFrm, + (outs), (ins), "sysret", []>, TB; + //===----------------------------------------------------------------------===// // Move Instructions... // From daniel at zuster.org Mon Jul 20 21:22:19 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 20 Jul 2009 19:22:19 -0700 Subject: [llvm-commits] [llvm] r76486 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/Target/TargetAsmInfo.cpp test/CodeGen/PIC16/ test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll test/CodeGen/PIC16/dg.exp test/CodeGen/Thumb/2009-07-17-PR4566-thumb Message-ID: <6a8523d60907201922hf09ac56g230ba858eaef017b@mail.gmail.com> Any chance of getting a reduced version of that huge test instead? 250k is a bit much... - Daniel From sanjiv.gupta at microchip.com Mon Jul 20 21:28:34 2009 From: sanjiv.gupta at microchip.com (Sanjiv Gupta) Date: Tue, 21 Jul 2009 07:58:34 +0530 Subject: [llvm-commits] PATCH: New option for bitcode output file in llvm-ld In-Reply-To: <1247763944.14580.13.camel@idc-lt-i00171.microchip.com> References: <1247663289.3501.17.camel@idc-lt-i00171.microchip.com> <4A5EB8F5.1010301@mxc.ca> <1247763944.14580.13.camel@idc-lt-i00171.microchip.com> Message-ID: <4A6527D2.5000808@microchip.com> sanjiv gupta wrote: > On Wed, 2009-07-15 at 22:21 -0700, Nick Lewycky wrote: > >> Your description of the option made me say "what?" several times. Please >> try to clarify it. >> Done. >> This patch doesn't change the behaviour when llvm-ld emits a shell >> script. I would've expected it (based on the name and description) to >> change the name of the .bc file that the shell script runs. >> >> > Right. I missed to make that change. > Done. Attached is the revised patch. > >> It's still not clear to me what problem this is solving for you. Why not >> just use "-link-as-library -o"? >> >> Nick >> > > I want to use llvm-ld as a linker to link a user program with required > libraries (also bitcode) and generate the linked .bc file with the name > that user has specified. That linked .bc file will then be passed to > the llc to generate native code. (I am not sure whether -link-as-library > serves the same purpose. ) > > Now about the problem that it solves. > The llvmc driver framework is a graph based model whether output > filename of one tool goes as input filename of another tool. i.e. > llvm-ld's output file name goes as input file name to llc. So even after > specifying the -o hello.bc, the linked .bc file generated is > hello.bc.bc, and llc receives only hello.bc as input file name. > > - Sanjiv > > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: llvm-ld-option.txt Url: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090721/4fcfabea/attachment.txt From eli.friedman at gmail.com Mon Jul 20 21:32:06 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 20 Jul 2009 19:32:06 -0700 Subject: [llvm-commits] [llvm] r76495 - /llvm/trunk/docs/LangRef.html In-Reply-To: <200907202241.n6KMfJv4017009@zion.cs.uiuc.edu> References: <200907202241.n6KMfJv4017009@zion.cs.uiuc.edu> Message-ID: On Mon, Jul 20, 2009 at 3:41 PM, Dan Gohman wrote: > Author: djg > Date: Mon Jul 20 17:41:19 2009 > New Revision: 76495 > > URL: http://llvm.org/viewvc/llvm-project?rev=76495&view=rev > Log: > Documentation for the new non-overflow and exact keywords. Could you add an example to LangRef for the " = signed unsigned add , " form? We need to clean up the usage of "undefined behavior" vs. "undefined result"; we depend on the distinction in various places in the optimizer. For example, a load from an uninitialized alloca has an undefined result, but using that result as the argument to another load has undefined behavior. (Note that this only applies within LLVM; common languages, like C, don't make this distinction.) -Eli From resistor at mac.com Mon Jul 20 21:47:59 2009 From: resistor at mac.com (Owen Anderson) Date: Tue, 21 Jul 2009 02:47:59 -0000 Subject: [llvm-commits] [llvm] r76533 - in /llvm/trunk: include/llvm/Constants.h lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Transforms/Scalar/PredicateSimplifier.cpp lib/VMCore/Constants.cpp lib/VMCore/LLVMContext.cpp lib/VMCore/LLVMContextImpl.h Message-ID: <200907210247.n6L2lxx3025603@zion.cs.uiuc.edu> Author: resistor Date: Mon Jul 20 21:47:59 2009 New Revision: 76533 URL: http://llvm.org/viewvc/llvm-project?rev=76533&view=rev Log: Move a bit more state over to the LLVMContext. Modified: llvm/trunk/include/llvm/Constants.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp llvm/trunk/lib/VMCore/Constants.cpp llvm/trunk/lib/VMCore/LLVMContext.cpp llvm/trunk/lib/VMCore/LLVMContextImpl.h Modified: llvm/trunk/include/llvm/Constants.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=76533&r1=76532&r2=76533&view=diff ============================================================================== --- llvm/trunk/include/llvm/Constants.h (original) +++ llvm/trunk/include/llvm/Constants.h Mon Jul 20 21:47:59 2009 @@ -93,16 +93,6 @@ return Val == V; } - /// getTrue/getFalse - Return the singleton true/false values. - static inline ConstantInt *getTrue() { - if (TheTrueVal) return TheTrueVal; - return CreateTrueFalseVals(true); - } - static inline ConstantInt *getFalse() { - if (TheFalseVal) return TheFalseVal; - return CreateTrueFalseVals(false); - } - /// getType - Specialize the getType() method to always return an IntegerType, /// which reduces the amount of casting needed in parts of the compiler. /// @@ -200,9 +190,6 @@ static bool classof(const Value *V) { return V->getValueID() == ConstantIntVal; } - static void ResetTrueFalse() { TheTrueVal = TheFalseVal = 0; } -private: - static ConstantInt *CreateTrueFalseVals(bool WhichOne); }; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=76533&r1=76532&r2=76533&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Mon Jul 20 21:47:59 2009 @@ -1149,7 +1149,7 @@ } // Create a CaseBlock record representing this branch. - CaseBlock CB(ISD::SETEQ, Cond, ConstantInt::getTrue(), + CaseBlock CB(ISD::SETEQ, Cond, DAG.getContext()->getConstantIntTrue(), NULL, TBB, FBB, CurBB); SwitchCases.push_back(CB); } @@ -1304,7 +1304,7 @@ } // Create a CaseBlock record representing this branch. - CaseBlock CB(ISD::SETEQ, CondVal, ConstantInt::getTrue(), + CaseBlock CB(ISD::SETEQ, CondVal, DAG.getContext()->getConstantIntTrue(), NULL, Succ0MBB, Succ1MBB, CurMBB); // Use visitSwitchCase to actually insert the fast branch sequence for this // cond branch. @@ -1322,9 +1322,11 @@ if (CB.CmpMHS == NULL) { // Fold "(X == true)" to X and "(X == false)" to !X to // handle common cases produced by branch lowering. - if (CB.CmpRHS == ConstantInt::getTrue() && CB.CC == ISD::SETEQ) + if (CB.CmpRHS == DAG.getContext()->getConstantIntTrue() && + CB.CC == ISD::SETEQ) Cond = CondLHS; - else if (CB.CmpRHS == ConstantInt::getFalse() && CB.CC == ISD::SETEQ) { + else if (CB.CmpRHS == DAG.getContext()->getConstantIntFalse() && + CB.CC == ISD::SETEQ) { SDValue True = DAG.getConstant(1, CondLHS.getValueType()); Cond = DAG.getNode(ISD::XOR, dl, CondLHS.getValueType(), CondLHS, True); } else Modified: llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp?rev=76533&r1=76532&r2=76533&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp Mon Jul 20 21:47:59 2009 @@ -1690,8 +1690,8 @@ bool isRelatedBy(Value *V1, Value *V2, ICmpInst::Predicate Pred) const { if (Constant *C1 = dyn_cast(V1)) if (Constant *C2 = dyn_cast(V2)) - return ConstantExpr::getCompare(Pred, C1, C2) == - ConstantInt::getTrue(); + return Context->getConstantExprCompare(Pred, C1, C2) == + Context->getConstantIntTrue(); unsigned n1 = VN.valueNumber(V1, Top); unsigned n2 = VN.valueNumber(V2, Top); @@ -1803,10 +1803,10 @@ // "icmp ult i32 %a, %y" EQ true then %a u< y // etc. - if (Canonical == ConstantInt::getTrue()) { + if (Canonical == Context->getConstantIntTrue()) { add(IC->getOperand(0), IC->getOperand(1), IC->getPredicate(), NewContext); - } else if (Canonical == ConstantInt::getFalse()) { + } else if (Canonical == Context->getConstantIntFalse()) { add(IC->getOperand(0), IC->getOperand(1), ICmpInst::getInversePredicate(IC->getPredicate()), NewContext); } @@ -1822,11 +1822,11 @@ if (isRelatedBy(True, False, ICmpInst::ICMP_NE)) { if (Canonical == VN.canonicalize(True, Top) || isRelatedBy(Canonical, False, ICmpInst::ICMP_NE)) - add(SI->getCondition(), ConstantInt::getTrue(), + add(SI->getCondition(), Context->getConstantIntTrue(), ICmpInst::ICMP_EQ, NewContext); else if (Canonical == VN.canonicalize(False, Top) || isRelatedBy(Canonical, True, ICmpInst::ICMP_NE)) - add(SI->getCondition(), ConstantInt::getFalse(), + add(SI->getCondition(), Context->getConstantIntFalse(), ICmpInst::ICMP_EQ, NewContext); } } else if (GetElementPtrInst *GEPI = dyn_cast(I)) { @@ -2050,9 +2050,10 @@ ICmpInst::Predicate Pred = IC->getPredicate(); if (isRelatedBy(Op0, Op1, Pred)) - add(IC, ConstantInt::getTrue(), ICmpInst::ICMP_EQ, NewContext); + add(IC, Context->getConstantIntTrue(), ICmpInst::ICMP_EQ, NewContext); else if (isRelatedBy(Op0, Op1, ICmpInst::getInversePredicate(Pred))) - add(IC, ConstantInt::getFalse(), ICmpInst::ICMP_EQ, NewContext); + add(IC, Context->getConstantIntFalse(), + ICmpInst::ICMP_EQ, NewContext); } else if (SelectInst *SI = dyn_cast(I)) { if (I->getType()->isFPOrFPVector()) return; @@ -2063,9 +2064,9 @@ // %b EQ %c then %a EQ %b Value *Canonical = VN.canonicalize(SI->getCondition(), Top); - if (Canonical == ConstantInt::getTrue()) { + if (Canonical == Context->getConstantIntTrue()) { add(SI, SI->getTrueValue(), ICmpInst::ICMP_EQ, NewContext); - } else if (Canonical == ConstantInt::getFalse()) { + } else if (Canonical == Context->getConstantIntFalse()) { add(SI, SI->getFalseValue(), ICmpInst::ICMP_EQ, NewContext); } else if (VN.canonicalize(SI->getTrueValue(), Top) == VN.canonicalize(SI->getFalseValue(), Top)) { @@ -2154,8 +2155,8 @@ // the BB as unreachable if so. if (Constant *CI_L = dyn_cast(O.LHS)) { if (Constant *CI_R = dyn_cast(O.RHS)) { - if (ConstantExpr::getCompare(O.Op, CI_L, CI_R) == - ConstantInt::getFalse()) + if (Context->getConstantExprCompare(O.Op, CI_L, CI_R) == + Context->getConstantIntFalse()) UB.mark(TopBB); WorkList.pop_front(); @@ -2446,6 +2447,8 @@ return; } + LLVMContext *Context = BI.getParent()->getContext(); + for (DomTreeDFS::Node::iterator I = DTNode->begin(), E = DTNode->end(); I != E; ++I) { BasicBlock *Dest = (*I)->getBlock(); @@ -2455,7 +2458,7 @@ if (Dest == TrueDest) { DOUT << "(" << DTNode->getBlock()->getName() << ") true set:\n"; VRPSolver VRP(VN, IG, UB, VR, PS->DTDFS, PS->modified, Dest); - VRP.add(ConstantInt::getTrue(), Condition, ICmpInst::ICMP_EQ); + VRP.add(Context->getConstantIntTrue(), Condition, ICmpInst::ICMP_EQ); VRP.solve(); DEBUG(VN.dump()); DEBUG(IG.dump()); @@ -2463,7 +2466,7 @@ } else if (Dest == FalseDest) { DOUT << "(" << DTNode->getBlock()->getName() << ") false set:\n"; VRPSolver VRP(VN, IG, UB, VR, PS->DTDFS, PS->modified, Dest); - VRP.add(ConstantInt::getFalse(), Condition, ICmpInst::ICMP_EQ); + VRP.add(Context->getConstantIntFalse(), Condition, ICmpInst::ICMP_EQ); VRP.solve(); DEBUG(VN.dump()); DEBUG(IG.dump()); Modified: llvm/trunk/lib/VMCore/Constants.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=76533&r1=76532&r2=76533&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Constants.cpp (original) +++ llvm/trunk/lib/VMCore/Constants.cpp Mon Jul 20 21:47:59 2009 @@ -169,28 +169,6 @@ assert(V.getBitWidth() == Ty->getBitWidth() && "Invalid constant for type"); } -ConstantInt *ConstantInt::TheTrueVal = 0; -ConstantInt *ConstantInt::TheFalseVal = 0; - -namespace llvm { - void CleanupTrueFalse(void *) { - ConstantInt::ResetTrueFalse(); - } -} - -static ManagedCleanup TrueFalseCleanup; - -ConstantInt *ConstantInt::CreateTrueFalseVals(bool WhichOne) { - assert(TheTrueVal == 0 && TheFalseVal == 0); - TheTrueVal = getGlobalContext().getConstantInt(Type::Int1Ty, 1); - TheFalseVal = getGlobalContext().getConstantInt(Type::Int1Ty, 0); - - // Ensure that llvm_shutdown nulls out TheTrueVal/TheFalseVal. - TrueFalseCleanup.Register(); - - return WhichOne ? TheTrueVal : TheFalseVal; -} - //===----------------------------------------------------------------------===// // ConstantFP //===----------------------------------------------------------------------===// Modified: llvm/trunk/lib/VMCore/LLVMContext.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContext.cpp?rev=76533&r1=76532&r2=76533&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/LLVMContext.cpp (original) +++ llvm/trunk/lib/VMCore/LLVMContext.cpp Mon Jul 20 21:47:59 2009 @@ -81,11 +81,15 @@ // ConstantInt accessors. ConstantInt* LLVMContext::getConstantIntTrue() { - return ConstantInt::getTrue(); + assert(this && "Context not initialized!"); + assert(pImpl && "Context not initialized!"); + return pImpl->getConstantIntTrue(); } ConstantInt* LLVMContext::getConstantIntFalse() { - return ConstantInt::getFalse(); + assert(this && "Context not initialized!"); + assert(pImpl && "Context not initialized!"); + return pImpl->getConstantIntFalse(); } Constant* LLVMContext::getConstantInt(const Type* Ty, uint64_t V, Modified: llvm/trunk/lib/VMCore/LLVMContextImpl.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContextImpl.h?rev=76533&r1=76532&r2=76533&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/LLVMContextImpl.h (original) +++ llvm/trunk/lib/VMCore/LLVMContextImpl.h Mon Jul 20 21:47:59 2009 @@ -15,6 +15,8 @@ #ifndef LLVM_LLVMCONTEXT_IMPL_H #define LLVM_LLVMCONTEXT_IMPL_H +#include "llvm/LLVMContext.h" +#include "llvm/DerivedTypes.h" #include "llvm/System/RWMutex.h" #include "llvm/ADT/APFloat.h" #include "llvm/ADT/APInt.h" @@ -100,10 +102,13 @@ FoldingSet MDNodeSet; LLVMContext &Context; + ConstantInt *TheTrueVal; + ConstantInt *TheFalseVal; + LLVMContextImpl(); LLVMContextImpl(const LLVMContextImpl&); public: - LLVMContextImpl(LLVMContext &C) : Context(C) { } + LLVMContextImpl(LLVMContext &C) : Context(C), TheTrueVal(0), TheFalseVal(0) {} /// Return a ConstantInt with the specified value and an implied Type. The /// type is the integer type that corresponds to the bit width of the value. @@ -115,6 +120,20 @@ MDNode *getMDNode(Value*const* Vals, unsigned NumVals); + ConstantInt *getConstantIntTrue() { + if (TheTrueVal) + return TheTrueVal; + else + return (TheTrueVal = Context.getConstantInt(IntegerType::get(1), 1)); + } + + ConstantInt *getConstantIntFalse() { + if (TheFalseVal) + return TheFalseVal; + else + return (TheFalseVal = Context.getConstantInt(IntegerType::get(1), 0)); + } + void erase(MDString *M); void erase(MDNode *M); }; From nicholas at mxc.ca Mon Jul 20 22:30:47 2009 From: nicholas at mxc.ca (Nick Lewycky) Date: Mon, 20 Jul 2009 20:30:47 -0700 Subject: [llvm-commits] [llvm] r76402 - /llvm/trunk/tools/bugpoint/bugpoint.cpp In-Reply-To: <200907200701.n6K711bo003903@zion.cs.uiuc.edu> References: <200907200701.n6K711bo003903@zion.cs.uiuc.edu> Message-ID: <4A653667.5050905@mxc.ca> Daniel Dunbar wrote: > Author: ddunbar > Date: Mon Jul 20 02:01:01 2009 > New Revision: 76402 > > URL: http://llvm.org/viewvc/llvm-project?rev=76402&view=rev > Log: > Add -std-{compile,link}-opts to bugpoint. > - Sheesh. and there was much rejoicing! > > Modified: > llvm/trunk/tools/bugpoint/bugpoint.cpp > > Modified: llvm/trunk/tools/bugpoint/bugpoint.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/bugpoint.cpp?rev=76402&r1=76401&r2=76402&view=diff > > ============================================================================== > --- llvm/trunk/tools/bugpoint/bugpoint.cpp (original) > +++ llvm/trunk/tools/bugpoint/bugpoint.cpp Mon Jul 20 02:01:01 2009 > @@ -22,6 +22,7 @@ > #include "llvm/Support/ManagedStatic.h" > #include "llvm/Support/PluginLoader.h" > #include "llvm/Support/PrettyStackTrace.h" > +#include "llvm/Support/StandardPasses.h" > #include "llvm/System/Process.h" > #include "llvm/System/Signals.h" > #include "llvm/LinkAllVMCore.h" > @@ -57,6 +58,14 @@ > static cl::list > PassList(cl::desc("Passes available:"), cl::ZeroOrMore); > > +static cl::opt > +StandardCompileOpts("std-compile-opts", > + cl::desc("Include the standard compile time optimizations")); > + > +static cl::opt > +StandardLinkOpts("std-link-opts", > + cl::desc("Include the standard link time optimizations")); > + > /// BugpointIsInterrupted - Set to true when the user presses ctrl-c. > bool llvm::BugpointIsInterrupted = false; > > @@ -64,6 +73,20 @@ > BugpointIsInterrupted = true; > } > > +// Hack to capture a pass list. > +namespace { > + class AddToDriver : public PassManager { > + BugDriver &D; > + public: > + AddToDriver(BugDriver &_D) : D(_D) {} > + > + virtual void add(Pass *P) { > + const PassInfo *PI = P->getPassInfo(); > + D.addPasses(&PI, &PI + 1); > + } > + }; > +} > + > int main(int argc, char **argv) { > llvm::sys::PrintStackTraceOnErrorSignal(); > llvm::PrettyStackTraceProgram X(argc, argv); > @@ -77,6 +100,23 @@ > LLVMContext& Context = getGlobalContext(); > BugDriver D(argv[0], AsChild, FindBugs, TimeoutValue, MemoryLimit, Context); > if (D.addSources(InputFilenames)) return 1; > + > + AddToDriver PM(D); > + if (StandardCompileOpts) { > + createStandardModulePasses(&PM, 3, > + /*OptimizeSize=*/ false, > + /*UnitAtATime=*/ true, > + /*UnrollLoops=*/ true, > + /*SimplifyLibCalls=*/ true, > + /*HaveExceptions=*/ true, > + createFunctionInliningPass()); > + } > + > + if (StandardLinkOpts) > + createStandardLTOPasses(&PM, /*Internalize=*/false, > + /*RunInliner=*/true, > + /*VerifyEach=*/false); > + > D.addPasses(PassList.begin(), PassList.end()); > > // Bugpoint has the ability of generating a plethora of core files, so to > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From nicholas at mxc.ca Tue Jul 21 00:33:24 2009 From: nicholas at mxc.ca (Nick Lewycky) Date: Mon, 20 Jul 2009 22:33:24 -0700 Subject: [llvm-commits] patch: mdnode .bc format change In-Reply-To: <352a1fb20907201713p799a59b3i8ab66e9c47446058@mail.gmail.com> References: <4A4ED86B.6000007@mxc.ca> <352a1fb20907201713p799a59b3i8ab66e9c47446058@mail.gmail.com> Message-ID: <4A655324.9020902@mxc.ca> Devang Patel wrote: > Nick, > > On Fri, Jul 3, 2009 at 9:19 PM, Nick Lewycky wrote: >> This patch implements the new MDNode on-disk format for .bc files which we >> would use if we supported instructions in MDNodes. >> >> This format is plainly inefficient when MDNodes only contain constants, but >> I don't want to release 2.6 with a legacy file format that we need to >> support. >> >> In the current format we store the MDNodes in the Constants block with >> references to the other constants by number. >> >> The new format mentions the MDNodes in the Constant block but stores no data >> about them other than the fact they exist. > > Why not put MDNodes in METADATA_BLOCK ? They are. Because they're constants they're numbered in the constant block but that has no information about their contents. We need them to be numbered in the constants block so that the instructions which come thereafter have a value number to refer to. You can think of the constants block as containing the 'forward declarations' of the mdnodes to come. Then the instructions are listed which may refer to any constants, then the metadata_block fills in the full definitions of the mdnodes which may refer to the constants and instructions. > Other comments: > > - I think WriteMetadata() is going to write MDNode multiple times. Never. The METADATA_BLOCK contains: { node size, value number 1, value number 2 ... } for each MDNode. Note that only the depth=1 level of an MDNode is included; any MDNodes it contains are referenced by value number. This even handles circular references correctly. > - Reusing ConstantPlaceHolder for Metadata is not a good idea, I've > doubts that this will work. ConstantPlaceHolder is meant for > ConstExprs. It works fine :) If you like I can refactor it into a MetadataPlaceHolder, but I don't see the benefit. What in particular are you worried about (ie. why does it matter that ConstantPlaceHolder was meant for ConstExprs)? > I am moving in a direction where metadata is not derived from > Constant. I will introduce new block in bitcode to hold metadata > strings and nodes. Okay. I assume this goes with removing the uniqueness property from MDNode? Nick From evan.cheng at apple.com Tue Jul 21 00:40:17 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 05:40:17 -0000 Subject: [llvm-commits] [llvm] r76535 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/X86/2009-07-20-DAGCombineBug.ll Message-ID: <200907210540.n6L5eIYL031381@zion.cs.uiuc.edu> Author: evancheng Date: Tue Jul 21 00:40:15 2009 New Revision: 76535 URL: http://llvm.org/viewvc/llvm-project?rev=76535&view=rev Log: Fix a dagga combiner bug: avoid creating illegal constant. Is this really a winning transformation? fold (shl (srl x, c1), c2) -> (shl (and x, (shl -1, c1)), (sub c2, c1)) or (srl (and x, (shl -1, c1)), (sub c1, c2)) Added: llvm/trunk/test/CodeGen/X86/2009-07-20-DAGCombineBug.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=76535&r1=76534&r2=76535&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Jul 21 00:40:15 2009 @@ -2475,15 +2475,18 @@ if (N1C && N0.getOpcode() == ISD::SRL && N0.getOperand(1).getOpcode() == ISD::Constant) { uint64_t c1 = cast(N0.getOperand(1))->getZExtValue(); - uint64_t c2 = N1C->getZExtValue(); - SDValue Mask = DAG.getNode(ISD::AND, N0.getDebugLoc(), VT, N0.getOperand(0), - DAG.getConstant(~0ULL << c1, VT)); - if (c2 > c1) - return DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, Mask, - DAG.getConstant(c2-c1, N1.getValueType())); - else - return DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, Mask, - DAG.getConstant(c1-c2, N1.getValueType())); + if (c1 < VT.getSizeInBits()) { + uint64_t c2 = N1C->getZExtValue(); + SDValue Mask = DAG.getNode(ISD::AND, N0.getDebugLoc(), VT, + N0.getOperand(0), + DAG.getConstant(~0ULL << c1, VT)); + if (c2 > c1) + return DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, Mask, + DAG.getConstant(c2-c1, N1.getValueType())); + else + return DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, Mask, + DAG.getConstant(c1-c2, N1.getValueType())); + } } // fold (shl (sra x, c1), c1) -> (and x, (shl -1, c1)) if (N1C && N0.getOpcode() == ISD::SRA && N1 == N0.getOperand(1)) Added: llvm/trunk/test/CodeGen/X86/2009-07-20-DAGCombineBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-07-20-DAGCombineBug.ll?rev=76535&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-07-20-DAGCombineBug.ll (added) +++ llvm/trunk/test/CodeGen/X86/2009-07-20-DAGCombineBug.ll Tue Jul 21 00:40:15 2009 @@ -0,0 +1,29 @@ +; RUN: llvm-as < %s | llc -march=x86 + + at bsBuff = internal global i32 0 ; [#uses=1] + at llvm.used = appending global [1 x i8*] [i8* bitcast (i32 ()* @bsGetUInt32 to i8*)], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] + +define fastcc i32 @bsGetUInt32() nounwind ssp { +entry: + %bsBuff.promoted44 = load i32* @bsBuff ; [#uses=1] + %0 = add i32 0, -8 ; [#uses=1] + %1 = lshr i32 %bsBuff.promoted44, %0 ; [#uses=1] + %2 = shl i32 %1, 8 ; [#uses=1] + br label %bb3.i17 + +bb3.i9: ; preds = %bb3.i17 + br i1 false, label %bb2.i16, label %bb1.i15 + +bb1.i15: ; preds = %bb3.i9 + unreachable + +bb2.i16: ; preds = %bb3.i9 + br label %bb3.i17 + +bb3.i17: ; preds = %bb2.i16, %entry + br i1 false, label %bb3.i9, label %bsR.exit18 + +bsR.exit18: ; preds = %bb3.i17 + %3 = or i32 0, %2 ; [#uses=0] + ret i32 0 +} From nicholas at mxc.ca Tue Jul 21 00:56:36 2009 From: nicholas at mxc.ca (Nick Lewycky) Date: Mon, 20 Jul 2009 22:56:36 -0700 Subject: [llvm-commits] PATCH: New option for bitcode output file in llvm-ld In-Reply-To: <4A6527D2.5000808@microchip.com> References: <1247663289.3501.17.camel@idc-lt-i00171.microchip.com> <4A5EB8F5.1010301@mxc.ca> <1247763944.14580.13.camel@idc-lt-i00171.microchip.com> <4A6527D2.5000808@microchip.com> Message-ID: <4A655894.8050307@mxc.ca> Sanjiv Gupta wrote: > sanjiv gupta wrote: >> On Wed, 2009-07-15 at 22:21 -0700, Nick Lewycky wrote: >> >>> Your description of the option made me say "what?" several times. Please >>> try to clarify it. >>> > Done. >>> This patch doesn't change the behaviour when llvm-ld emits a shell >>> script. I would've expected it (based on the name and description) to >>> change the name of the .bc file that the shell script runs. >>> >>> >> Right. I missed to make that change. >> > Done. Attached is the revised patch. +=item B<-b> F + +This option can be used to override the output bitcode file name. By default, the name of the bitcode output file is one more ".bc" suffix added to the name specified by B<-o filename> option. + Wrap the long line, and it looks file to me! >> >>> It's still not clear to me what problem this is solving for you. Why >>> not just use "-link-as-library -o"? >>> >>> Nick >>> >> >> I want to use llvm-ld as a linker to link a user program with required >> libraries (also bitcode) and generate the linked .bc file with the name >> that user has specified. That linked .bc file will then be passed to >> the llc to generate native code. (I am not sure whether -link-as-library >> serves the same purpose. ) >> >> Now about the problem that it solves. >> The llvmc driver framework is a graph based model whether output >> filename of one tool goes as input filename of another tool. i.e. >> llvm-ld's output file name goes as input file name to llc. So even after >> specifying the -o hello.bc, the linked .bc file generated is >> hello.bc.bc, and llc receives only hello.bc as input file name. >> >> - Sanjiv >> >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From evan.cheng at apple.com Tue Jul 21 01:00:18 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 06:00:18 -0000 Subject: [llvm-commits] [llvm] r76536 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td Message-ID: <200907210600.n6L60JhT031982@zion.cs.uiuc.edu> Author: evancheng Date: Tue Jul 21 01:00:18 2009 New Revision: 76536 URL: http://llvm.org/viewvc/llvm-project?rev=76536&view=rev Log: Add jumps with 8-bit relocation for assembler / disassembler. Patch by Sean Callanan. Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=76536&r1=76535&r2=76536&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Tue Jul 21 01:00:18 2009 @@ -218,6 +218,10 @@ let PrintMethod = "print_pcrel_imm"; } +def brtarget8 : Operand { + let PrintMethod = "print_pcrel_imm"; +} + //===----------------------------------------------------------------------===// // X86 Complex Pattern Definitions. // @@ -527,6 +531,26 @@ // Conditional branches let Uses = [EFLAGS] in { +// Short conditional jumps +def JO8 : IBr<0x70, (ins brtarget8:$dst), "jo\t$dst", []>; +def JNO8 : IBr<0x71, (ins brtarget8:$dst), "jno\t$dst", []>; +def JB8 : IBr<0x72, (ins brtarget8:$dst), "jb\t$dst", []>; +def JAE8 : IBr<0x73, (ins brtarget8:$dst), "jae\t$dst", []>; +def JE8 : IBr<0x74, (ins brtarget8:$dst), "je\t$dst", []>; +def JNE8 : IBr<0x75, (ins brtarget8:$dst), "jne\t$dst", []>; +def JBE8 : IBr<0x76, (ins brtarget8:$dst), "jbe\t$dst", []>; +def JA8 : IBr<0x77, (ins brtarget8:$dst), "ja\t$dst", []>; +def JS8 : IBr<0x78, (ins brtarget8:$dst), "js\t$dst", []>; +def JNS8 : IBr<0x79, (ins brtarget8:$dst), "jns\t$dst", []>; +def JP8 : IBr<0x7A, (ins brtarget8:$dst), "jp\t$dst", []>; +def JNP8 : IBr<0x7B, (ins brtarget8:$dst), "jnp\t$dst", []>; +def JL8 : IBr<0x7C, (ins brtarget8:$dst), "jl\t$dst", []>; +def JGE8 : IBr<0x7D, (ins brtarget8:$dst), "jge\t$dst", []>; +def JLE8 : IBr<0x7E, (ins brtarget8:$dst), "jle\t$dst", []>; +def JG8 : IBr<0x7F, (ins brtarget8:$dst), "jg\t$dst", []>; + +def JCXZ8 : IBr<0xE3, (ins brtarget8:$dst), "jcxz\t$dst", []>; + def JE : IBr<0x84, (ins brtarget:$dst), "je\t$dst", [(X86brcond bb:$dst, X86_COND_E, EFLAGS)]>, TB; def JNE : IBr<0x85, (ins brtarget:$dst), "jne\t$dst", From clattner at apple.com Tue Jul 21 01:24:04 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 23:24:04 -0700 Subject: [llvm-commits] [llvm] r76527 - /llvm/trunk/test/Transforms/InstCombine/cast3.ll In-Reply-To: <200907210102.n6L12YdI021908@zion.cs.uiuc.edu> References: <200907210102.n6L12YdI021908@zion.cs.uiuc.edu> Message-ID: On Jul 20, 2009, at 6:02 PM, Dan Gohman wrote: > Author: djg > Date: Mon Jul 20 20:02:18 2009 > New Revision: 76527 > > URL: http://llvm.org/viewvc/llvm-project?rev=76527&view=rev > Log: > Add a testcase for PR2831. Hi Dan, I see you decided to not go with overflow flags on GEP. How do you plan to model this sort of thing going forward (even if not an immediate priority)? -Chris From clattner at apple.com Tue Jul 21 01:26:27 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 23:26:27 -0700 Subject: [llvm-commits] [llvm] r76533 - in /llvm/trunk: include/llvm/Constants.h lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Transforms/Scalar/PredicateSimplifier.cpp lib/VMCore/Constants.cpp lib/VMCore/LLVMContext.cpp lib/VMCore/LLVMContextImpl.h In-Reply-To: <200907210247.n6L2lxx3025603@zion.cs.uiuc.edu> References: <200907210247.n6L2lxx3025603@zion.cs.uiuc.edu> Message-ID: <2D254106-D521-46C2-9DCC-A2EEBCAED786@apple.com> On Jul 20, 2009, at 7:47 PM, Owen Anderson wrote: > Author: resistor > Date: Mon Jul 20 21:47:59 2009 > New Revision: 76533 > > URL: http://llvm.org/viewvc/llvm-project?rev=76533&view=rev > Log: > Move a bit more state over to the LLVMContext. How about getFalse() instead of getConstantIntFalse()? -Chris From clattner at apple.com Tue Jul 21 01:27:16 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 23:27:16 -0700 Subject: [llvm-commits] [llvm] r76536 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td In-Reply-To: <200907210600.n6L60JhT031982@zion.cs.uiuc.edu> References: <200907210600.n6L60JhT031982@zion.cs.uiuc.edu> Message-ID: On Jul 20, 2009, at 11:00 PM, Evan Cheng wrote: > Author: evancheng > Date: Tue Jul 21 01:00:18 2009 > New Revision: 76536 > > URL: http://llvm.org/viewvc/llvm-project?rev=76536&view=rev > Log: > Add jumps with 8-bit relocation for assembler / disassembler. Patch > by Sean Callanan. Very nice, thanks Sean. Doesn't Sean have commit access? -Chris > > Modified: > llvm/trunk/lib/Target/X86/X86InstrInfo.td > > Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=76536&r1=76535&r2=76536&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) > +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Tue Jul 21 01:00:18 2009 > @@ -218,6 +218,10 @@ > let PrintMethod = "print_pcrel_imm"; > } > > +def brtarget8 : Operand { > + let PrintMethod = "print_pcrel_imm"; > +} > + > // > = > = > = > ----------------------------------------------------------------------= > ==// > // X86 Complex Pattern Definitions. > // > @@ -527,6 +531,26 @@ > > // Conditional branches > let Uses = [EFLAGS] in { > +// Short conditional jumps > +def JO8 : IBr<0x70, (ins brtarget8:$dst), "jo\t$dst", []>; > +def JNO8 : IBr<0x71, (ins brtarget8:$dst), "jno\t$dst", []>; > +def JB8 : IBr<0x72, (ins brtarget8:$dst), "jb\t$dst", []>; > +def JAE8 : IBr<0x73, (ins brtarget8:$dst), "jae\t$dst", []>; > +def JE8 : IBr<0x74, (ins brtarget8:$dst), "je\t$dst", []>; > +def JNE8 : IBr<0x75, (ins brtarget8:$dst), "jne\t$dst", []>; > +def JBE8 : IBr<0x76, (ins brtarget8:$dst), "jbe\t$dst", []>; > +def JA8 : IBr<0x77, (ins brtarget8:$dst), "ja\t$dst", []>; > +def JS8 : IBr<0x78, (ins brtarget8:$dst), "js\t$dst", []>; > +def JNS8 : IBr<0x79, (ins brtarget8:$dst), "jns\t$dst", []>; > +def JP8 : IBr<0x7A, (ins brtarget8:$dst), "jp\t$dst", []>; > +def JNP8 : IBr<0x7B, (ins brtarget8:$dst), "jnp\t$dst", []>; > +def JL8 : IBr<0x7C, (ins brtarget8:$dst), "jl\t$dst", []>; > +def JGE8 : IBr<0x7D, (ins brtarget8:$dst), "jge\t$dst", []>; > +def JLE8 : IBr<0x7E, (ins brtarget8:$dst), "jle\t$dst", []>; > +def JG8 : IBr<0x7F, (ins brtarget8:$dst), "jg\t$dst", []>; > + > +def JCXZ8 : IBr<0xE3, (ins brtarget8:$dst), "jcxz\t$dst", []>; > + > def JE : IBr<0x84, (ins brtarget:$dst), "je\t$dst", > [(X86brcond bb:$dst, X86_COND_E, EFLAGS)]>, TB; > def JNE : IBr<0x85, (ins brtarget:$dst), "jne\t$dst", > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Tue Jul 21 01:28:36 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 06:28:36 -0000 Subject: [llvm-commits] [llvm] r76537 - /llvm/trunk/test/CodeGen/Thumb/2009-07-17-PR4566-thumb.ll Message-ID: <200907210628.n6L6SaoJ000421@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 01:28:36 2009 New Revision: 76537 URL: http://llvm.org/viewvc/llvm-project?rev=76537&view=rev Log: remove a very large testcase for now. Removed: llvm/trunk/test/CodeGen/Thumb/2009-07-17-PR4566-thumb.ll Removed: llvm/trunk/test/CodeGen/Thumb/2009-07-17-PR4566-thumb.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb/2009-07-17-PR4566-thumb.ll?rev=76536&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Thumb/2009-07-17-PR4566-thumb.ll (original) +++ llvm/trunk/test/CodeGen/Thumb/2009-07-17-PR4566-thumb.ll (removed) @@ -1,2891 +0,0 @@ -; RUN: llvm-as < %s | llc -march=thumb | grep {rsbs \\+r\[0-9\]\\+, \\+r\[0-9\]\\+, \\+#0} - -target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32" -target triple = "thumbv6-elf" - type { i32 } ; type %0 - %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8*, i32 } - %llvm.dbg.composite.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, { }*, { }*, i32 } - %llvm.dbg.derivedtype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, { }* } - %llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1 } - %struct.anon = type { %struct.dwarf_fde* } - %struct.dwarf_cie = type <{ i32, i32, i8, [0 x i8], [3 x i8] }> - %struct.dwarf_eh_bases = type { i8*, i8*, i8* } - %struct.dwarf_fde = type <{ i32, i32, [0 x i8] }> - %struct.fde_accumulator = type { %struct.fde_vector*, %struct.fde_vector* } - %struct.fde_vector = type { i8*, i32, [0 x %struct.dwarf_fde*] } - %struct.object = type { i8*, i8*, i8*, %struct.anon, %0, %struct.object* } - at .str = internal constant [17 x i8] c"unwind-dw2-fde.c\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at .str1 = internal constant [61 x i8] c"/home/asl/proj/llvm/llvm-gcc-4.2/build_arm/gcc/../../src/gcc\00", section "llvm.metadata" ; <[61 x i8]*> [#uses=1] - at .str2 = internal constant [52 x i8] c"4.2.1 (Based on Apple Inc. build 5646) (LLVM build)\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([17 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 true, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str3 = internal constant [14 x i8] c"unsigned char\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str3, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 8, i64 8, i64 0, i32 0, i32 8 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.derivedtype = internal constant %llvm.dbg.derivedtype.type { i32 458790, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 8, i64 8, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype4 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str5 = internal constant [13 x i8] c"unsigned int\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.basictype6 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str5, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 7 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str7 = internal constant [9 x i8] c"unwind.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at .str8 = internal constant [57 x i8] c"/home/asl/proj/llvm/llvm-gcc-4.2/build_arm/gcc/./include\00", section "llvm.metadata" ; <[57 x i8]*> [#uses=1] - at llvm.dbg.compile_unit9 = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([9 x i8]* @.str7, i32 0, i32 0), i8* getelementptr ([57 x i8]* @.str8, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str10 = internal constant [13 x i8] c"_Unwind_Word\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype11 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str10, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit9 to { }*), i32 47, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype12 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype11 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype4 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype4 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype12 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str13 = internal constant [12 x i8] c"unwind-pe.h\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.compile_unit14 = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([12 x i8]* @.str13, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str15 = internal constant [13 x i8] c"read_uleb128\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.subprogram = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str15, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str15, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str15, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*), i32 134, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str16 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.basictype17 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str16, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str18 = internal constant [12 x i8] c"coretypes.h\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.compile_unit19 = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([12 x i8]* @.str18, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str20 = internal constant [8 x i8] c"wchar_t\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype21 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str20, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit19 to { }*), i32 72, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str22 = internal constant [14 x i8] c"_Unwind_Sword\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype23 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str22, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit9 to { }*), i32 51, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype21 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype24 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype23 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array25 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype4 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype4 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype24 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite26 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array25 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str27 = internal constant [13 x i8] c"read_sleb128\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.subprogram28 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str27, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str27, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str27, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*), i32 156, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite26 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str29 = internal constant [17 x i8] c"unwind-dw2-fde.h\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.compile_unit30 = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([17 x i8]* @.str29, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str31 = internal constant [10 x i8] c"dwarf_cie\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str33 = internal constant [12 x i8] c"_Unwind_Ptr\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype34 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str33, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit9 to { }*), i32 53, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype11 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str35 = internal constant [21 x i8] c"_Unwind_Internal_Ptr\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.derivedtype36 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([21 x i8]* @.str35, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit9 to { }*), i32 59, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype34 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype37 = internal constant %llvm.dbg.derivedtype.type { i32 458790, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype36 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str38 = internal constant [6 x i8] c"uword\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype39 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str38, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 114, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype37 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str40 = internal constant [7 x i8] c"length\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype41 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str40, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 142, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype39 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str42 = internal constant [15 x i8] c"_Unwind_Action\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype43 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str42, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit9 to { }*), i32 115, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype23 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype44 = internal constant %llvm.dbg.derivedtype.type { i32 458790, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype43 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str45 = internal constant [6 x i8] c"sword\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype46 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str45, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 113, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str47 = internal constant [7 x i8] c"CIE_id\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype48 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str47, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 143, i64 32, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype46 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str49 = internal constant [6 x i8] c"ubyte\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype50 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str49, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 141, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str51 = internal constant [8 x i8] c"version\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype52 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str51, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 144, i64 8, i64 8, i64 64, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype50 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array53 = internal constant [0 x { }*] zeroinitializer, section "llvm.metadata" ; <[0 x { }*]*> [#uses=1] - at llvm.dbg.composite54 = internal constant %llvm.dbg.composite.type { i32 458753, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 8, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), { }* bitcast ([0 x { }*]* @llvm.dbg.array53 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str55 = internal constant [13 x i8] c"augmentation\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype56 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str55, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 145, i64 0, i64 8, i64 72, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite54 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array57 = internal constant [4 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype41 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype48 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype52 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype56 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] - at llvm.dbg.composite58 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str31, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 141, i64 96, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array57 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype59 = internal constant %llvm.dbg.derivedtype.type { i32 458790, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 96, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite58 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype60 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype59 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str61 = internal constant [10 x i8] c"dwarf_fde\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype63 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str40, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 151, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype39 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str64 = internal constant [10 x i8] c"CIE_delta\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype65 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str64, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 152, i64 32, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype46 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str67 = internal constant [9 x i8] c"pc_begin\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype68 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str67, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 153, i64 0, i64 8, i64 64, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite54 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array69 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype63 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype65 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype68 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite70 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str61, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 43, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array69 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype71 = internal constant %llvm.dbg.derivedtype.type { i32 458790, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 64, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite70 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype72 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype71 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array73 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype60 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype72 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite74 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array73 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str75 = internal constant [8 x i8] c"get_cie\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.subprogram76 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str75, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str75, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str75, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 162, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite74 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str77 = internal constant [4 x i8] c"fde\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.derivedtype78 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str77, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 162, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype71 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype79 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str77, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 162, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype78 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype80 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype79 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array81 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite82 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array81 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str83 = internal constant [9 x i8] c"next_fde\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.subprogram84 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str83, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str83, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str83, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 168, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite82 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=0] - at .str85 = internal constant [7 x i8] c"object\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype87 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* null }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype88 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str67, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 48, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str89 = internal constant [6 x i8] c"tbase\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype90 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str89, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 49, i64 32, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str91 = internal constant [6 x i8] c"dbase\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype92 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str91, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 50, i64 32, i64 32, i64 64, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str94 = internal constant [7 x i8] c"single\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype95 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str94, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 52, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype72 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype96 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite70 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype97 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype96 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str98 = internal constant [6 x i8] c"array\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype99 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str98, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 53, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype97 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str100 = internal constant [11 x i8] c"fde_vector\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str103 = internal constant [10 x i8] c"orig_data\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype104 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str103, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 41, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str105 = internal constant [18 x i8] c"long unsigned int\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.basictype106 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str105, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 7 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str107 = internal constant [9 x i8] c"stddef.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.compile_unit108 = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([9 x i8]* @.str107, i32 0, i32 0), i8* getelementptr ([57 x i8]* @.str8, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str109 = internal constant [7 x i8] c"size_t\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype110 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str109, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit108 to { }*), i32 326, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype106 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str111 = internal constant [6 x i8] c"count\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype112 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str111, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 42, i64 32, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype110 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.composite113 = internal constant %llvm.dbg.composite.type { i32 458753, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype72 to { }*), { }* bitcast ([0 x { }*]* @llvm.dbg.array53 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype114 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str98, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 43, i64 0, i64 32, i64 64, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite113 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array115 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype104 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype112 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype114 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite116 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str100, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 40, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array115 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype117 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite116 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str118 = internal constant [5 x i8] c"sort\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.derivedtype119 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([5 x i8]* @.str118, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 54, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype117 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array120 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype95 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype99 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype119 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite121 = internal constant %llvm.dbg.composite.type { i32 458775, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 51, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array120 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str122 = internal constant [2 x i8] c"u\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.derivedtype123 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str122, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 55, i64 32, i64 32, i64 96, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite121 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str126 = internal constant [7 x i8] c"sorted\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype127 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str126, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 59, i64 1, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype106 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str128 = internal constant [11 x i8] c"from_array\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype129 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str128, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 60, i64 1, i64 32, i64 1, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype106 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str130 = internal constant [15 x i8] c"mixed_encoding\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype131 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str130, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 61, i64 1, i64 32, i64 2, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype106 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str132 = internal constant [9 x i8] c"encoding\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype133 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str132, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 62, i64 8, i64 32, i64 3, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype106 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype134 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str111, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 65, i64 21, i64 32, i64 11, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype106 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array135 = internal constant [5 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype127 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype129 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype131 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype133 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype134 to { }*)], section "llvm.metadata" ; <[5 x { }*]*> [#uses=1] - at llvm.dbg.composite136 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 58, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([5 x { }*]* @llvm.dbg.array135 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str137 = internal constant [2 x i8] c"b\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.derivedtype138 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str137, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 66, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite136 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str139 = internal constant [2 x i8] c"i\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.derivedtype140 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str139, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 67, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype110 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array141 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype138 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype140 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite142 = internal constant %llvm.dbg.composite.type { i32 458775, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 57, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array141 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str143 = internal constant [2 x i8] c"s\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.derivedtype144 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str143, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 68, i64 32, i64 32, i64 128, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite142 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype145 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite149 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str146 = internal constant [5 x i8] c"next\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.derivedtype147 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([5 x i8]* @.str146, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 74, i64 32, i64 32, i64 160, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array148 = internal constant [6 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype88 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype90 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype92 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype123 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype144 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype147 to { }*)], section "llvm.metadata" ; <[6 x { }*]*> [#uses=1] - at llvm.dbg.composite149 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str85, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 47, i64 192, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([6 x { }*]* @llvm.dbg.array148 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.array151 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite152 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array151 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str153 = internal constant [9 x i8] c"last_fde\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.subprogram154 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str153, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str153, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str153, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 176, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite152 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str155 = internal constant [6 x i8] c"saddr\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype156 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str155, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 116, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype46 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype157 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str45, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 113, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype156 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str158 = internal constant [14 x i8] c"gthr-single.h\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.compile_unit159 = linkonce constant %llvm.dbg.compile_unit.type { i32 458769, { }* null, i32 1, i8* getelementptr ([14 x i8]* @.str158, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 true, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str160 = internal constant [18 x i8] c"__gthread_mutex_t\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.derivedtype161 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str160, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit159 to { }*), i32 35, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype157 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype162 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype161 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array163 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype162 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite164 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array163 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str165 = internal constant [21 x i8] c"__gthread_mutex_lock\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram166 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([21 x i8]* @.str165, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str165, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str165, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit159 to { }*), i32 220, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite164 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str167 = internal constant [23 x i8] c"__gthread_mutex_unlock\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] - at llvm.dbg.subprogram168 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([23 x i8]* @.str167, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str167, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str167, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit159 to { }*), i32 232, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite164 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array169 = internal constant [5 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*)], section "llvm.metadata" ; <[5 x { }*]*> [#uses=1] - at llvm.dbg.composite170 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([5 x { }*]* @llvm.dbg.array169 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str171 = internal constant [28 x i8] c"__register_frame_info_bases\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram172 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([28 x i8]* @.str171, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str171, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str171, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 80, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite170 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at unseen_objects = internal global %struct.object* null ; <%struct.object**> [#uses=15] - at llvm.dbg.array173 = internal constant [3 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite174 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array173 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str175 = internal constant [22 x i8] c"__register_frame_info\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.subprogram176 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([22 x i8]* @.str175, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str175, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str175, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 106, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite174 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str179 = internal constant [34 x i8] c"__register_frame_info_table_bases\00", section "llvm.metadata" ; <[34 x i8]*> [#uses=1] - at llvm.dbg.subprogram180 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([34 x i8]* @.str179, i32 0, i32 0), i8* getelementptr ([34 x i8]* @.str179, i32 0, i32 0), i8* getelementptr ([34 x i8]* @.str179, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 130, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite170 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str183 = internal constant [28 x i8] c"__register_frame_info_table\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram184 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([28 x i8]* @.str183, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str183, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str183, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 150, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite174 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array185 = internal constant [4 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] - at llvm.dbg.composite186 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array185 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str187 = internal constant [22 x i8] c"fde_unencoded_compare\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.subprogram188 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([22 x i8]* @.str187, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str187, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str187, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 325, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite186 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str189 = internal constant [16 x i8] c"fde_accumulator\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at .str191 = internal constant [7 x i8] c"linear\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype192 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str191, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 389, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype117 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str193 = internal constant [8 x i8] c"erratic\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype194 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str193, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 390, i64 32, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype117 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array195 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype192 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype194 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite196 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str189, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 388, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array195 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype197 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite196 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array198 = internal constant [3 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype197 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite199 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array198 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str200 = internal constant [11 x i8] c"fde_insert\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.subprogram201 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str200, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str200, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str200, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 414, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite199 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=0] - at llvm.dbg.derivedtype202 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite186 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str203 = internal constant [14 x i8] c"fde_compare_t\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype204 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str203, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 388, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype202 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array205 = internal constant [5 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype204 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype117 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype117 to { }*)], section "llvm.metadata" ; <[5 x { }*]*> [#uses=1] - at llvm.dbg.composite206 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([5 x { }*]* @llvm.dbg.array205 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str207 = internal constant [10 x i8] c"fde_split\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.subprogram208 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str207, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str207, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str207, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 434, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite206 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at marker.2702 = internal global %struct.dwarf_fde* null ; <%struct.dwarf_fde**> [#uses=2] - at llvm.dbg.derivedtype209 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array210 = internal constant [6 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype204 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype209 to { }*), { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*)], section "llvm.metadata" ; <[6 x { }*]*> [#uses=1] - at llvm.dbg.composite211 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([6 x { }*]* @llvm.dbg.array210 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str212 = internal constant [15 x i8] c"frame_downheap\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram213 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str212, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str212, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str212, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 480, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite211 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array214 = internal constant [4 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype204 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype117 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] - at llvm.dbg.composite215 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array214 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str216 = internal constant [15 x i8] c"frame_heapsort\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram217 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str216, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str216, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str216, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 506, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite215 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str218 = internal constant [10 x i8] c"fde_merge\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.subprogram219 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str218, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str218, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str218, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 538, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite206 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array220 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite221 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array220 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str222 = internal constant [29 x i8] c"binary_search_unencoded_fdes\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.subprogram223 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([29 x i8]* @.str222, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str222, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str222, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 840, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite221 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array224 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to { }*), { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite225 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array224 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str226 = internal constant [22 x i8] c"size_of_encoded_value\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.subprogram227 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([22 x i8]* @.str226, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str226, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str226, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*), i32 75, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite225 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array228 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype34 to { }*), { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite229 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array228 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str230 = internal constant [17 x i8] c"base_from_object\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram231 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str230, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str230, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str230, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 241, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite229 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype232 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype34 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array233 = internal constant [5 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype4 to { }*), { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype34 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype4 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype232 to { }*)], section "llvm.metadata" ; <[5 x { }*]*> [#uses=1] - at llvm.dbg.composite234 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([5 x { }*]* @llvm.dbg.array233 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str235 = internal constant [29 x i8] c"read_encoded_value_with_base\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.subprogram236 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([29 x i8]* @.str235, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str235, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str235, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*), i32 185, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite234 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array237 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype60 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite238 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array237 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str239 = internal constant [17 x i8] c"get_cie_encoding\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram240 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str239, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str239, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str239, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 266, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite238 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array241 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype110 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite242 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array241 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str243 = internal constant [26 x i8] c"classify_object_over_fdes\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.subprogram244 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([26 x i8]* @.str243, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str243, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str243, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 599, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite242 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array245 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype72 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite246 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array245 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str247 = internal constant [17 x i8] c"get_fde_encoding\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram248 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str247, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str247, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str247, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 311, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite246 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array249 = internal constant [4 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype197 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] - at llvm.dbg.composite250 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array249 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str251 = internal constant [9 x i8] c"add_fdes\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.subprogram252 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str251, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str251, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str251, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 654, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite250 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str253 = internal constant [28 x i8] c"fde_single_encoding_compare\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram254 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([28 x i8]* @.str253, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str253, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str253, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 338, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite186 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str255 = internal constant [27 x i8] c"fde_mixed_encoding_compare\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram256 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([27 x i8]* @.str255, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str255, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str255, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 354, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite186 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str257 = internal constant [34 x i8] c"binary_search_mixed_encoding_fdes\00", section "llvm.metadata" ; <[34 x i8]*> [#uses=1] - at llvm.dbg.subprogram258 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([34 x i8]* @.str257, i32 0, i32 0), i8* getelementptr ([34 x i8]* @.str257, i32 0, i32 0), i8* getelementptr ([34 x i8]* @.str257, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 897, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite221 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str259 = internal constant [35 x i8] c"binary_search_single_encoding_fdes\00", section "llvm.metadata" ; <[35 x i8]*> [#uses=1] - at llvm.dbg.subprogram260 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([35 x i8]* @.str259, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str259, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str259, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 867, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite221 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array261 = internal constant [4 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] - at llvm.dbg.composite262 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array261 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str263 = internal constant [19 x i8] c"linear_search_fdes\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.subprogram264 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str263, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str263, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str263, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 771, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite262 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array265 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype17 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype197 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype110 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite266 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array265 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str267 = internal constant [15 x i8] c"start_fde_sort\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram268 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str267, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str267, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str267, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 395, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite266 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array269 = internal constant [2 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite270 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array269 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str271 = internal constant [23 x i8] c"__register_frame_table\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] - at llvm.dbg.subprogram272 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([23 x i8]* @.str271, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str271, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str271, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 156, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite270 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str273 = internal constant [17 x i8] c"__register_frame\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram274 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str273, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str273, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str273, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 112, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite270 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array275 = internal constant [4 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype197 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype110 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] - at llvm.dbg.composite276 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array275 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str277 = internal constant [13 x i8] c"end_fde_sort\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.subprogram278 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str277, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str277, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str277, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 564, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite276 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array279 = internal constant [2 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype145 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite280 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array279 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str281 = internal constant [12 x i8] c"init_object\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.subprogram282 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str281, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str281, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str281, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 717, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite280 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str283 = internal constant [14 x i8] c"search_object\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram284 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str283, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str283, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str283, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 928, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite221 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str285 = internal constant [15 x i8] c"dwarf_eh_bases\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype287 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str89, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 93, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype288 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str91, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 94, i64 32, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str289 = internal constant [5 x i8] c"func\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.derivedtype290 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([5 x i8]* @.str289, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 95, i64 32, i64 32, i64 64, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array291 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype287 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype288 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype290 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite292 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str285, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 92, i64 96, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array291 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype293 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite292 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array294 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype293 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite295 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array294 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str296 = internal constant [17 x i8] c"_Unwind_Find_FDE\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram297 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str296, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str296, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str296, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 972, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite295 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at seen_objects = internal global %struct.object* null ; <%struct.object**> [#uses=3] - at llvm.dbg.array298 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype87 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite299 = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array298 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str300 = internal constant [30 x i8] c"__deregister_frame_info_bases\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] - at llvm.dbg.subprogram301 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([30 x i8]* @.str300, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str300, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str300, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 175, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite299 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str302 = internal constant [24 x i8] c"__deregister_frame_info\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram303 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([24 x i8]* @.str302, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str302, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str302, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 223, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite299 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str304 = internal constant [19 x i8] c"__deregister_frame\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.subprogram305 = linkonce constant %llvm.dbg.subprogram.type { i32 458798, { }* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str304, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 229, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite270 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - -define arm_apcscc void @__register_frame_info_bases(i8* %begin, %struct.object* %ob, i8* %tbase, i8* %dbase) nounwind { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram172 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 82, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = icmp eq i8* %begin, null ; [#uses=1] - br i1 %0, label %return, label %bb - -bb: ; preds = %entry - %1 = bitcast i8* %begin to i32* ; [#uses=1] - %2 = load i32* %1, align 4 ; [#uses=1] - %3 = icmp eq i32 %2, 0 ; [#uses=1] - br i1 %3, label %return, label %bb1 - -bb1: ; preds = %bb - tail call void @llvm.dbg.stoppoint(i32 85, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %4 = getelementptr %struct.object* %ob, i32 0, i32 0 ; [#uses=1] - store i8* inttoptr (i64 4294967295 to i8*), i8** %4, align 4 - tail call void @llvm.dbg.stoppoint(i32 86, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %5 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - store i8* %tbase, i8** %5, align 4 - tail call void @llvm.dbg.stoppoint(i32 87, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %6 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - store i8* %dbase, i8** %6, align 4 - tail call void @llvm.dbg.stoppoint(i32 88, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %7 = bitcast i8* %begin to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] - %8 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] - store %struct.dwarf_fde* %7, %struct.dwarf_fde** %8, align 4 - tail call void @llvm.dbg.stoppoint(i32 90, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %9 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=1] - store i32 2040, i32* %9 - tail call void @llvm.dbg.stoppoint(i32 96, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 98, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - %10 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=1] - %11 = getelementptr %struct.object* %ob, i32 0, i32 5 ; <%struct.object**> [#uses=1] - store %struct.object* %10, %struct.object** %11, align 4 - tail call void @llvm.dbg.stoppoint(i32 99, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - store %struct.object* %ob, %struct.object** @unseen_objects, align 4 - tail call void @llvm.dbg.stoppoint(i32 101, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 233, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit159 to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram172 to { }*)) - ret void - -return: ; preds = %bb, %entry - tail call void @llvm.dbg.stoppoint(i32 101, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret void -} - -declare void @llvm.dbg.func.start({ }*) nounwind readnone - -declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind readnone - -declare void @llvm.dbg.region.end({ }*) nounwind readnone - -define internal arm_apcscc i8* @read_sleb128(i8* %p, i32* nocapture %val) nounwind { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram28 to { }*)) - br label %bb - -bb: ; preds = %bb, %entry - %indvar = phi i32 [ 0, %entry ], [ %tmp, %bb ] ; [#uses=3] - %result.0 = phi i32 [ 0, %entry ], [ %4, %bb ] ; [#uses=1] - %shift.0 = mul i32 %indvar, 7 ; [#uses=2] - %tmp12 = add i32 %shift.0, 7 ; [#uses=2] - %tmp = add i32 %indvar, 1 ; [#uses=2] - %scevgep = getelementptr i8* %p, i32 %tmp ; [#uses=1] - %p_addr.0 = getelementptr i8* %p, i32 %indvar ; [#uses=1] - %0 = load i8* %p_addr.0, align 1 ; [#uses=2] - %1 = zext i8 %0 to i32 ; [#uses=2] - %2 = and i32 %1, 127 ; [#uses=1] - %3 = shl i32 %2, %shift.0 ; [#uses=1] - %4 = or i32 %3, %result.0 ; [#uses=4] - %5 = icmp slt i8 %0, 0 ; [#uses=1] - br i1 %5, label %bb, label %bb1 - -bb1: ; preds = %bb - tail call void @llvm.dbg.stoppoint(i32 171, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %6 = icmp ugt i32 %tmp12, 31 ; [#uses=1] - br i1 %6, label %bb4, label %bb2 - -bb2: ; preds = %bb1 - %7 = and i32 %1, 64 ; [#uses=1] - %8 = icmp eq i32 %7, 0 ; [#uses=1] - br i1 %8, label %bb4, label %bb3 - -bb3: ; preds = %bb2 - tail call void @llvm.dbg.stoppoint(i32 172, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %9 = shl i32 1, %tmp12 ; [#uses=1] - %10 = sub i32 0, %9 ; [#uses=1] - %11 = or i32 %4, %10 ; [#uses=1] - br label %bb4 - -bb4: ; preds = %bb3, %bb2, %bb1 - %result.1 = phi i32 [ %11, %bb3 ], [ %4, %bb1 ], [ %4, %bb2 ] ; [#uses=1] - tail call void @llvm.dbg.stoppoint(i32 174, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - store i32 %result.1, i32* %val, align 4 - tail call void @llvm.dbg.stoppoint(i32 175, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram28 to { }*)) - ret i8* %scevgep -} - -define arm_apcscc void @__register_frame_info(i8* %begin, %struct.object* %ob) nounwind { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram176 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 107, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram172 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 82, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = icmp eq i8* %begin, null ; [#uses=1] - br i1 %0, label %__register_frame_info_bases.exit, label %bb.i - -bb.i: ; preds = %entry - %1 = bitcast i8* %begin to i32* ; [#uses=1] - %2 = load i32* %1, align 4 ; [#uses=1] - %3 = icmp eq i32 %2, 0 ; [#uses=1] - br i1 %3, label %__register_frame_info_bases.exit, label %bb1.i - -bb1.i: ; preds = %bb.i - tail call void @llvm.dbg.stoppoint(i32 85, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %4 = getelementptr %struct.object* %ob, i32 0, i32 0 ; [#uses=1] - store i8* inttoptr (i64 4294967295 to i8*), i8** %4, align 4 - tail call void @llvm.dbg.stoppoint(i32 86, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %5 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - store i8* null, i8** %5, align 4 - tail call void @llvm.dbg.stoppoint(i32 87, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %6 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - store i8* null, i8** %6, align 4 - tail call void @llvm.dbg.stoppoint(i32 88, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %7 = bitcast i8* %begin to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] - %8 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] - store %struct.dwarf_fde* %7, %struct.dwarf_fde** %8, align 4 - tail call void @llvm.dbg.stoppoint(i32 90, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %9 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=1] - store i32 2040, i32* %9 - tail call void @llvm.dbg.stoppoint(i32 96, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 98, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - %10 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=1] - %11 = getelementptr %struct.object* %ob, i32 0, i32 5 ; <%struct.object**> [#uses=1] - store %struct.object* %10, %struct.object** %11, align 4 - tail call void @llvm.dbg.stoppoint(i32 99, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - store %struct.object* %ob, %struct.object** @unseen_objects, align 4 - tail call void @llvm.dbg.stoppoint(i32 101, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 233, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit159 to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram176 to { }*)) - ret void - -__register_frame_info_bases.exit: ; preds = %bb.i, %entry - tail call void @llvm.dbg.stoppoint(i32 108, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram172 to { }*)) - ret void -} - -define arm_apcscc void @__register_frame_info_table_bases(i8* %begin, %struct.object* %ob, i8* %tbase, i8* %dbase) nounwind { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram180 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 131, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = getelementptr %struct.object* %ob, i32 0, i32 0 ; [#uses=1] - store i8* inttoptr (i64 4294967295 to i8*), i8** %0, align 4 - tail call void @llvm.dbg.stoppoint(i32 132, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %1 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - store i8* %tbase, i8** %1, align 4 - tail call void @llvm.dbg.stoppoint(i32 133, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %2 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - store i8* %dbase, i8** %2, align 4 - tail call void @llvm.dbg.stoppoint(i32 134, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %3 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] - %.c = bitcast i8* %begin to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] - store %struct.dwarf_fde* %.c, %struct.dwarf_fde** %3 - tail call void @llvm.dbg.stoppoint(i32 137, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %4 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=1] - store i32 2042, i32* %4 - tail call void @llvm.dbg.stoppoint(i32 140, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 142, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - %5 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=1] - %6 = getelementptr %struct.object* %ob, i32 0, i32 5 ; <%struct.object**> [#uses=1] - store %struct.object* %5, %struct.object** %6, align 4 - tail call void @llvm.dbg.stoppoint(i32 143, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - store %struct.object* %ob, %struct.object** @unseen_objects, align 4 - tail call void @llvm.dbg.stoppoint(i32 145, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 146, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram180 to { }*)) - ret void -} - -define arm_apcscc void @__register_frame_info_table(i8* %begin, %struct.object* %ob) nounwind { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram184 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 151, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram180 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 131, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = getelementptr %struct.object* %ob, i32 0, i32 0 ; [#uses=1] - store i8* inttoptr (i64 4294967295 to i8*), i8** %0, align 4 - tail call void @llvm.dbg.stoppoint(i32 132, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %1 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - store i8* null, i8** %1, align 4 - tail call void @llvm.dbg.stoppoint(i32 133, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %2 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - store i8* null, i8** %2, align 4 - tail call void @llvm.dbg.stoppoint(i32 134, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %3 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] - %.c.i = bitcast i8* %begin to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] - store %struct.dwarf_fde* %.c.i, %struct.dwarf_fde** %3 - tail call void @llvm.dbg.stoppoint(i32 137, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %4 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=1] - store i32 2042, i32* %4 - tail call void @llvm.dbg.stoppoint(i32 140, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 142, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - %5 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=1] - %6 = getelementptr %struct.object* %ob, i32 0, i32 5 ; <%struct.object**> [#uses=1] - store %struct.object* %5, %struct.object** %6, align 4 - tail call void @llvm.dbg.stoppoint(i32 143, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - store %struct.object* %ob, %struct.object** @unseen_objects, align 4 - tail call void @llvm.dbg.stoppoint(i32 145, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 146, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 152, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram180 to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram184 to { }*)) - ret void -} - -define internal arm_apcscc i32 @fde_unencoded_compare(%struct.object* nocapture %ob, %struct.dwarf_fde* nocapture %x, %struct.dwarf_fde* nocapture %y) nounwind readonly { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram188 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 326, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = getelementptr %struct.dwarf_fde* %x, i32 0, i32 2 ; <[0 x i8]*> [#uses=1] - %1 = bitcast [0 x i8]* %0 to i32* ; [#uses=1] - %2 = load i32* %1, align 4 ; [#uses=2] - tail call void @llvm.dbg.stoppoint(i32 327, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %3 = getelementptr %struct.dwarf_fde* %y, i32 0, i32 2 ; <[0 x i8]*> [#uses=1] - %4 = bitcast [0 x i8]* %3 to i32* ; [#uses=1] - %5 = load i32* %4, align 4 ; [#uses=2] - tail call void @llvm.dbg.stoppoint(i32 329, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %6 = icmp ugt i32 %2, %5 ; [#uses=1] - br i1 %6, label %bb4, label %bb1 - -bb1: ; preds = %entry - tail call void @llvm.dbg.stoppoint(i32 331, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %7 = icmp ult i32 %2, %5 ; [#uses=1] - %retval = select i1 %7, i32 -1, i32 0 ; [#uses=1] - ret i32 %retval - -bb4: ; preds = %entry - tail call void @llvm.dbg.stoppoint(i32 333, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret i32 1 -} - -define internal arm_apcscc void @frame_downheap(%struct.object* %ob, i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* nocapture %fde_compare, %struct.dwarf_fde** nocapture %a, i32 %lo, i32 %hi) { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram213 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 483, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - br label %bb5 - -bb: ; preds = %bb5 - %0 = add i32 %j.1, 1 ; [#uses=2] - %1 = icmp slt i32 %0, %hi ; [#uses=1] - br i1 %1, label %bb1, label %bb3 - -bb1: ; preds = %bb - %2 = getelementptr %struct.dwarf_fde** %a, i32 %j.1 ; <%struct.dwarf_fde**> [#uses=1] - %3 = load %struct.dwarf_fde** %2, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %4 = getelementptr %struct.dwarf_fde** %a, i32 %0 ; <%struct.dwarf_fde**> [#uses=1] - %5 = load %struct.dwarf_fde** %4, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %6 = tail call arm_apcscc i32 %fde_compare(%struct.object* %ob, %struct.dwarf_fde* %3, %struct.dwarf_fde* %5) ; [#uses=1] - %.lobit = lshr i32 %6, 31 ; [#uses=1] - %.j.1 = add i32 %.lobit, %j.1 ; [#uses=1] - br label %bb3 - -bb3: ; preds = %bb1, %bb - %j.0 = phi i32 [ %.j.1, %bb1 ], [ %j.1, %bb ] ; [#uses=3] - %7 = getelementptr %struct.dwarf_fde** %a, i32 %i.0 ; <%struct.dwarf_fde**> [#uses=3] - %8 = load %struct.dwarf_fde** %7, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %9 = getelementptr %struct.dwarf_fde** %a, i32 %j.0 ; <%struct.dwarf_fde**> [#uses=3] - %10 = load %struct.dwarf_fde** %9, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %11 = tail call arm_apcscc i32 %fde_compare(%struct.object* %ob, %struct.dwarf_fde* %8, %struct.dwarf_fde* %10) ; [#uses=1] - %12 = icmp slt i32 %11, 0 ; [#uses=1] - br i1 %12, label %bb4, label %return - -bb4: ; preds = %bb3 - %13 = load %struct.dwarf_fde** %7, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %14 = load %struct.dwarf_fde** %9, align 4 ; <%struct.dwarf_fde*> [#uses=1] - store %struct.dwarf_fde* %14, %struct.dwarf_fde** %7, align 4 - store %struct.dwarf_fde* %13, %struct.dwarf_fde** %9, align 4 - br label %bb5 - -bb5: ; preds = %bb4, %entry - %j.1.in.in = phi i32 [ %lo, %entry ], [ %j.0, %bb4 ] ; [#uses=1] - %i.0 = phi i32 [ %lo, %entry ], [ %j.0, %bb4 ] ; [#uses=1] - %j.1.in = shl i32 %j.1.in.in, 1 ; [#uses=1] - %j.1 = or i32 %j.1.in, 1 ; [#uses=5] - %15 = icmp slt i32 %j.1, %hi ; [#uses=1] - br i1 %15, label %bb, label %return - -return: ; preds = %bb5, %bb3 - tail call void @llvm.dbg.stoppoint(i32 498, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram213 to { }*)) - ret void -} - -define internal arm_apcscc void @frame_heapsort(%struct.object* %ob, i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* nocapture %fde_compare, %struct.fde_vector* nocapture %erratic) { -entry: - %erratic15 = bitcast %struct.fde_vector* %erratic to i8* ; [#uses=1] - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram217 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 510, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = getelementptr %struct.fde_vector* %erratic, i32 0, i32 2, i32 0 ; <%struct.dwarf_fde**> [#uses=4] - tail call void @llvm.dbg.stoppoint(i32 514, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %1 = getelementptr %struct.fde_vector* %erratic, i32 0, i32 1 ; [#uses=1] - %2 = load i32* %1, align 4 ; [#uses=4] - tail call void @llvm.dbg.stoppoint(i32 520, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %3 = lshr i32 %2, 1 ; [#uses=2] - %m.010 = add i32 %3, -1 ; [#uses=2] - %4 = icmp slt i32 %m.010, 0 ; [#uses=1] - br i1 %4, label %bb4.loopexit, label %bb.nph12 - -bb.nph12: ; preds = %entry - %tmp25 = add i32 %3, -2 ; [#uses=1] - br label %bb - -bb: ; preds = %bb, %bb.nph12 - %indvar21 = phi i32 [ 0, %bb.nph12 ], [ %indvar.next22, %bb ] ; [#uses=3] - %m.011 = sub i32 %m.010, %indvar21 ; [#uses=1] - tail call arm_apcscc void @frame_downheap(%struct.object* %ob, i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* %fde_compare, %struct.dwarf_fde** %0, i32 %m.011, i32 %2) - %m.0 = sub i32 %tmp25, %indvar21 ; [#uses=1] - %5 = icmp slt i32 %m.0, 0 ; [#uses=1] - %indvar.next22 = add i32 %indvar21, 1 ; [#uses=1] - br i1 %5, label %bb4.loopexit, label %bb - -bb.nph: ; preds = %bb4.loopexit - %tmp17 = shl i32 %2, 2 ; [#uses=1] - %tmp18 = add i32 %tmp17, 4 ; [#uses=1] - br label %bb3 - -bb3: ; preds = %bb3, %bb.nph - %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb3 ] ; [#uses=3] - %m.18 = sub i32 %m.17, %indvar ; [#uses=1] - %tmp16 = mul i32 %indvar, -4 ; [#uses=1] - %tmp19 = add i32 %tmp16, %tmp18 ; [#uses=1] - %scevgep = getelementptr i8* %erratic15, i32 %tmp19 ; [#uses=1] - %scevgep20 = bitcast i8* %scevgep to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=2] - %6 = load %struct.dwarf_fde** %0, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %7 = load %struct.dwarf_fde** %scevgep20, align 4 ; <%struct.dwarf_fde*> [#uses=1] - store %struct.dwarf_fde* %7, %struct.dwarf_fde** %0, align 4 - store %struct.dwarf_fde* %6, %struct.dwarf_fde** %scevgep20, align 4 - tail call arm_apcscc void @frame_downheap(%struct.object* %ob, i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* %fde_compare, %struct.dwarf_fde** %0, i32 0, i32 %m.18) - %indvar.next = add i32 %indvar, 1 ; [#uses=2] - %exitcond = icmp eq i32 %indvar.next, %m.17 ; [#uses=1] - br i1 %exitcond, label %return, label %bb3 - -bb4.loopexit: ; preds = %bb, %entry - %m.17 = add i32 %2, -1 ; [#uses=3] - tail call void @llvm.dbg.stoppoint(i32 526, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %8 = icmp sgt i32 %m.17, 0 ; [#uses=1] - br i1 %8, label %bb.nph, label %return - -return: ; preds = %bb4.loopexit, %bb3 - tail call void @llvm.dbg.stoppoint(i32 532, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram217 to { }*)) - ret void -} - -define internal arm_apcscc i32 @size_of_encoded_value(i8 zeroext %encoding) nounwind { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram227 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 76, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %0 = icmp eq i8 %encoding, -1 ; [#uses=1] - br i1 %0, label %bb7, label %bb1 - -bb1: ; preds = %entry - tail call void @llvm.dbg.stoppoint(i32 79, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %1 = zext i8 %encoding to i32 ; [#uses=1] - %2 = and i32 %1, 7 ; [#uses=1] - switch i32 %2, label %bb6 [ - i32 0, label %bb7 - i32 2, label %bb3 - i32 3, label %bb7 - i32 4, label %bb5 - ] - -bb3: ; preds = %bb1 - tail call void @llvm.dbg.stoppoint(i32 84, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram227 to { }*)) - ret i32 2 - -bb5: ; preds = %bb1 - tail call void @llvm.dbg.stoppoint(i32 88, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - ret i32 8 - -bb6: ; preds = %bb1 - tail call void @llvm.dbg.stoppoint(i32 90, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - tail call arm_apcscc void @abort() noreturn nounwind - unreachable - -bb7: ; preds = %bb1, %bb1, %entry - %.0 = phi i32 [ 0, %entry ], [ 4, %bb1 ], [ 4, %bb1 ] ; [#uses=1] - tail call void @llvm.dbg.stoppoint(i32 90, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - ret i32 %.0 -} - -declare arm_apcscc void @abort() noreturn nounwind - -define internal arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %encoding, i32 %base, i8* %p, i32* nocapture %val) nounwind { -entry: - %tmp = alloca i32, align 4 ; [#uses=2] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram236 to { }*)) - call void @llvm.dbg.stoppoint(i32 200, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %0 = icmp eq i8 %encoding, 80 ; [#uses=1] - br i1 %0, label %bb, label %bb2 - -bb: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 203, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %ctg2 = getelementptr i8* %p, i32 3 ; [#uses=1] - %1 = ptrtoint i8* %ctg2 to i32 ; [#uses=1] - %2 = and i32 %1, -4 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 204, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %3 = inttoptr i32 %2 to i32* ; [#uses=1] - %4 = load i32* %3, align 4 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 205, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %tmp21 = inttoptr i32 %2 to i8* ; [#uses=1] - %5 = getelementptr i8* %tmp21, i32 4 ; [#uses=1] - br label %bb19 - -bb2: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 209, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %6 = zext i8 %encoding to i32 ; [#uses=2] - %7 = and i32 %6, 15 ; [#uses=1] - switch i32 %7, label %bb12 [ - i32 0, label %bb3 - i32 1, label %bb.i - i32 2, label %bb6 - i32 3, label %bb7 - i32 4, label %bb8 - i32 9, label %bb5 - i32 10, label %bb9 - i32 11, label %bb10 - i32 12, label %bb11 - ] - -bb3: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 212, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %8 = bitcast i8* %p to i8** ; [#uses=1] - %9 = load i8** %8, align 1 ; [#uses=1] - %10 = ptrtoint i8* %9 to i32 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 213, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %11 = getelementptr i8* %p, i32 4 ; [#uses=1] - br label %bb13 - -bb.i: ; preds = %bb.i, %bb2 - %indvar.i = phi i32 [ 0, %bb2 ], [ %18, %bb.i ] ; [#uses=3] - %result.0.i = phi i32 [ 0, %bb2 ], [ %16, %bb.i ] ; [#uses=1] - %p_addr.0.i = getelementptr i8* %p, i32 %indvar.i ; [#uses=1] - %shift.0.i = mul i32 %indvar.i, 7 ; [#uses=1] - %12 = load i8* %p_addr.0.i, align 1 ; [#uses=2] - %13 = zext i8 %12 to i32 ; [#uses=1] - %14 = and i32 %13, 127 ; [#uses=1] - %15 = shl i32 %14, %shift.0.i ; [#uses=1] - %16 = or i32 %15, %result.0.i ; [#uses=2] - %17 = icmp slt i8 %12, 0 ; [#uses=1] - %18 = add i32 %indvar.i, 1 ; [#uses=2] - br i1 %17, label %bb.i, label %read_uleb128.exit - -read_uleb128.exit: ; preds = %bb.i - %scevgep.i = getelementptr i8* %p, i32 %18 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 220, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) - br label %bb13 - -bb5: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 227, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %19 = call arm_apcscc i8* @read_sleb128(i8* %p, i32* %tmp) ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 228, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %20 = load i32* %tmp, align 4 ; [#uses=1] - br label %bb13 - -bb6: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 233, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %21 = bitcast i8* %p to i16* ; [#uses=1] - %22 = load i16* %21, align 1 ; [#uses=1] - %23 = zext i16 %22 to i32 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 234, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %24 = getelementptr i8* %p, i32 2 ; [#uses=1] - br label %bb13 - -bb7: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 237, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %25 = bitcast i8* %p to i32* ; [#uses=1] - %26 = load i32* %25, align 1 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 238, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %27 = getelementptr i8* %p, i32 4 ; [#uses=1] - br label %bb13 - -bb8: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 241, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %28 = bitcast i8* %p to i64* ; [#uses=1] - %29 = load i64* %28, align 1 ; [#uses=1] - %30 = trunc i64 %29 to i32 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %31 = getelementptr i8* %p, i32 8 ; [#uses=1] - br label %bb13 - -bb9: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 246, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %32 = bitcast i8* %p to i16* ; [#uses=1] - %33 = load i16* %32, align 1 ; [#uses=1] - %34 = sext i16 %33 to i32 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 247, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %35 = getelementptr i8* %p, i32 2 ; [#uses=1] - br label %bb13 - -bb10: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 250, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %36 = bitcast i8* %p to i32* ; [#uses=1] - %37 = load i32* %36, align 1 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 251, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %38 = getelementptr i8* %p, i32 4 ; [#uses=1] - br label %bb13 - -bb11: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 254, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %39 = bitcast i8* %p to i64* ; [#uses=1] - %40 = load i64* %39, align 1 ; [#uses=1] - %41 = trunc i64 %40 to i32 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %42 = getelementptr i8* %p, i32 8 ; [#uses=1] - br label %bb13 - -bb12: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 259, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - call arm_apcscc void @abort() noreturn nounwind - unreachable - -bb13: ; preds = %bb11, %bb10, %bb9, %bb8, %bb7, %bb6, %bb5, %read_uleb128.exit, %bb3 - %p_addr.1 = phi i8* [ %42, %bb11 ], [ %38, %bb10 ], [ %35, %bb9 ], [ %19, %bb5 ], [ %31, %bb8 ], [ %27, %bb7 ], [ %24, %bb6 ], [ %scevgep.i, %read_uleb128.exit ], [ %11, %bb3 ] ; [#uses=3] - %result.1 = phi i32 [ %41, %bb11 ], [ %37, %bb10 ], [ %34, %bb9 ], [ %20, %bb5 ], [ %30, %bb8 ], [ %26, %bb7 ], [ %23, %bb6 ], [ %16, %read_uleb128.exit ], [ %10, %bb3 ] ; [#uses=3] - call void @llvm.dbg.stoppoint(i32 262, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %43 = icmp eq i32 %result.1, 0 ; [#uses=1] - br i1 %43, label %bb19, label %bb14 - -bb14: ; preds = %bb13 - call void @llvm.dbg.stoppoint(i32 264, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %44 = and i32 %6, 112 ; [#uses=1] - %45 = icmp eq i32 %44, 16 ; [#uses=1] - br i1 %45, label %bb15, label %bb17 - -bb15: ; preds = %bb14 - %46 = ptrtoint i8* %p to i32 ; [#uses=1] - br label %bb17 - -bb17: ; preds = %bb15, %bb14 - %iftmp.9.0 = phi i32 [ %46, %bb15 ], [ %base, %bb14 ] ; [#uses=1] - %47 = add i32 %iftmp.9.0, %result.1 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 266, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %48 = icmp slt i8 %encoding, 0 ; [#uses=1] - br i1 %48, label %bb18, label %bb19 - -bb18: ; preds = %bb17 - call void @llvm.dbg.stoppoint(i32 267, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - %49 = inttoptr i32 %47 to i32* ; [#uses=1] - %50 = load i32* %49, align 4 ; [#uses=1] - br label %bb19 - -bb19: ; preds = %bb18, %bb17, %bb13, %bb - %p_addr.0 = phi i8* [ %5, %bb ], [ %p_addr.1, %bb18 ], [ %p_addr.1, %bb13 ], [ %p_addr.1, %bb17 ] ; [#uses=1] - %result.0 = phi i32 [ %4, %bb ], [ %50, %bb18 ], [ %result.1, %bb13 ], [ %47, %bb17 ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 271, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - store i32 %result.0, i32* %val, align 4 - call void @llvm.dbg.stoppoint(i32 272, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram236 to { }*)) - ret i8* %p_addr.0 -} - -define internal arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %cie) nounwind { -entry: - %cie37 = bitcast %struct.dwarf_cie* %cie to i8* ; [#uses=1] - %stmp = alloca i32, align 4 ; [#uses=1] - %dummy = alloca i32, align 4 ; [#uses=1] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram240 to { }*)) - call void @llvm.dbg.stoppoint(i32 272, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = getelementptr %struct.dwarf_cie* %cie, i32 0, i32 3, i32 0 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 273, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %1 = load i8* %0, align 1 ; [#uses=1] - %2 = icmp eq i8 %1, 122 ; [#uses=1] - br i1 %2, label %bb1, label %bb13 - -bb1: ; preds = %entry - %3 = call arm_apcscc i32 @strlen(i8* %0) nounwind readonly ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 277, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %tmp38 = add i32 %3, 10 ; [#uses=1] - br label %bb.i - -bb.i: ; preds = %bb.i, %bb1 - %indvar.i = phi i32 [ 0, %bb1 ], [ %6, %bb.i ] ; [#uses=3] - %tmp39 = add i32 %indvar.i, %tmp38 ; [#uses=1] - %p_addr.0.i = getelementptr i8* %cie37, i32 %tmp39 ; [#uses=1] - %4 = load i8* %p_addr.0.i, align 1 ; [#uses=1] - %5 = icmp slt i8 %4, 0 ; [#uses=1] - %6 = add i32 %indvar.i, 1 ; [#uses=1] - br i1 %5, label %bb.i, label %read_uleb128.exit - -read_uleb128.exit: ; preds = %bb.i - call void @llvm.dbg.stoppoint(i32 276, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) - %.sum40 = add i32 %indvar.i, %3 ; [#uses=1] - %.sum31 = add i32 %.sum40, 2 ; [#uses=1] - %scevgep.i = getelementptr %struct.dwarf_cie* %cie, i32 0, i32 3, i32 %.sum31 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 278, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) - %7 = call arm_apcscc i8* @read_sleb128(i8* %scevgep.i, i32* %stmp) ; [#uses=3] - call void @llvm.dbg.stoppoint(i32 279, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %8 = getelementptr %struct.dwarf_cie* %cie, i32 0, i32 2 ; [#uses=1] - %9 = load i8* %8, align 1 ; [#uses=1] - %10 = icmp eq i8 %9, 1 ; [#uses=1] - br i1 %10, label %bb2, label %bb.i20 - -bb2: ; preds = %read_uleb128.exit - call void @llvm.dbg.stoppoint(i32 280, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %11 = getelementptr i8* %7, i32 1 ; [#uses=1] - br label %bb.i28 - -bb.i20: ; preds = %bb.i20, %read_uleb128.exit - %indvar.i15 = phi i32 [ 0, %read_uleb128.exit ], [ %14, %bb.i20 ] ; [#uses=2] - %p_addr.0.i18 = getelementptr i8* %7, i32 %indvar.i15 ; [#uses=1] - %12 = load i8* %p_addr.0.i18, align 1 ; [#uses=1] - %13 = icmp slt i8 %12, 0 ; [#uses=1] - %14 = add i32 %indvar.i15, 1 ; [#uses=2] - br i1 %13, label %bb.i20, label %read_uleb128.exit22 - -read_uleb128.exit22: ; preds = %bb.i20 - %scevgep.i21 = getelementptr i8* %7, i32 %14 ; [#uses=1] - tail call void @llvm.dbg.stoppoint(i32 149, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - br label %bb.i28 - -bb.i28: ; preds = %bb.i28, %read_uleb128.exit22, %bb2 - %p.0.ph = phi i8* [ %11, %bb2 ], [ %scevgep.i21, %read_uleb128.exit22 ], [ %p.0.ph, %bb.i28 ] ; [#uses=3] - %indvar.i23 = phi i32 [ 0, %read_uleb128.exit22 ], [ 0, %bb2 ], [ %17, %bb.i28 ] ; [#uses=2] - %p_addr.0.i26 = getelementptr i8* %p.0.ph, i32 %indvar.i23 ; [#uses=1] - %15 = load i8* %p_addr.0.i26, align 1 ; [#uses=1] - %16 = icmp slt i8 %15, 0 ; [#uses=1] - %17 = add i32 %indvar.i23, 1 ; [#uses=2] - br i1 %16, label %bb.i28, label %read_uleb128.exit30 - -read_uleb128.exit30: ; preds = %bb.i28 - %scevgep.i29 = getelementptr i8* %p.0.ph, i32 %17 ; [#uses=1] - tail call void @llvm.dbg.stoppoint(i32 149, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit14 to { }*)) - br label %bb5 - -bb5: ; preds = %bb5.backedge, %read_uleb128.exit30 - %indvar = phi i32 [ 1, %read_uleb128.exit30 ], [ %phitmp, %bb5.backedge ] ; [#uses=2] - %p.2 = phi i8* [ %scevgep.i29, %read_uleb128.exit30 ], [ %p.2.be, %bb5.backedge ] ; [#uses=4] - %aug.0 = getelementptr %struct.dwarf_cie* %cie, i32 0, i32 4, i32 %indvar ; [#uses=1] - %18 = load i8* %aug.0, align 1 ; [#uses=1] - switch i8 %18, label %bb13 [ - i8 82, label %bb6 - i8 80, label %bb8 - i8 76, label %bb10 - ] - -bb6: ; preds = %bb5 - call void @llvm.dbg.stoppoint(i32 290, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %19 = load i8* %p.2, align 1 ; [#uses=1] - %20 = zext i8 %19 to i32 ; [#uses=1] - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram240 to { }*)) - ret i32 %20 - -bb8: ; preds = %bb5 - %21 = load i8* %p.2, align 1 ; [#uses=1] - %22 = and i8 %21, 127 ; [#uses=1] - %23 = getelementptr i8* %p.2, i32 1 ; [#uses=1] - %24 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %22, i32 0, i8* %23, i32* %dummy) ; [#uses=1] - br label %bb5.backedge - -bb10: ; preds = %bb5 - %25 = getelementptr i8* %p.2, i32 1 ; [#uses=1] - br label %bb5.backedge - -bb5.backedge: ; preds = %bb10, %bb8 - %p.2.be = phi i8* [ %24, %bb8 ], [ %25, %bb10 ] ; [#uses=1] - %phitmp = add i32 %indvar, 1 ; [#uses=1] - br label %bb5 - -bb13: ; preds = %bb5, %entry - call void @llvm.dbg.stoppoint(i32 305, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret i32 0 -} - -declare arm_apcscc i32 @strlen(i8* nocapture) nounwind readonly - -define internal arm_apcscc i32 @classify_object_over_fdes(%struct.object* nocapture %ob, %struct.dwarf_fde* %this_fde) nounwind { -entry: - %pc_begin = alloca i32, align 4 ; [#uses=2] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram244 to { }*)) - call void @llvm.dbg.stoppoint(i32 603, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = getelementptr %struct.object* %ob, i32 0, i32 0 ; [#uses=2] - %1 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=3] - %2 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - %3 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - br label %bb13 - -bb: ; preds = %bb13 - %4 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 1 ; [#uses=2] - %5 = load i32* %4, align 1 ; [#uses=2] - %6 = icmp eq i32 %5, 0 ; [#uses=1] - br i1 %6, label %bb12, label %bb1 - -bb1: ; preds = %bb - %7 = bitcast i32* %4 to i8* ; [#uses=1] - %8 = sub i32 0, %5 ; [#uses=1] - %9 = getelementptr i8* %7, i32 %8 ; [#uses=1] - %10 = bitcast i8* %9 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=5] - %11 = icmp eq %struct.dwarf_cie* %10, %last_cie.2 ; [#uses=1] - br i1 %11, label %bb6, label %bb2 - -bb2: ; preds = %bb1 - %12 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %10) ; [#uses=7] - %13 = trunc i32 %12 to i8 ; [#uses=1] - %14 = icmp eq i8 %13, -1 ; [#uses=1] - br i1 %14, label %base_from_object.exit, label %bb1.i - -bb1.i: ; preds = %bb2 - %15 = and i32 %12, 112 ; [#uses=1] - switch i32 %15, label %bb5.i [ - i32 0, label %base_from_object.exit - i32 16, label %base_from_object.exit - i32 32, label %bb3.i - i32 48, label %bb4.i - i32 80, label %base_from_object.exit - ] - -bb3.i: ; preds = %bb1.i - %16 = load i8** %2, align 4 ; [#uses=1] - %17 = ptrtoint i8* %16 to i32 ; [#uses=1] - br label %base_from_object.exit - -bb4.i: ; preds = %bb1.i - %18 = load i8** %3, align 4 ; [#uses=1] - %19 = ptrtoint i8* %18 to i32 ; [#uses=1] - br label %base_from_object.exit - -bb5.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 605, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to { }*)) - call void @llvm.dbg.stoppoint(i32 616, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) - call void @llvm.dbg.stoppoint(i32 617, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) - call void @llvm.dbg.stoppoint(i32 621, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call arm_apcscc void @abort() noreturn nounwind - unreachable - -base_from_object.exit: ; preds = %bb4.i, %bb3.i, %bb1.i, %bb1.i, %bb1.i, %bb2 - %20 = phi i32 [ %19, %bb4.i ], [ %17, %bb3.i ], [ 0, %bb2 ], [ 0, %bb1.i ], [ 0, %bb1.i ], [ 0, %bb1.i ] ; [#uses=3] - %21 = load i32* %1 ; [#uses=4] - %22 = and i32 %21, 2040 ; [#uses=1] - %23 = icmp eq i32 %22, 2040 ; [#uses=1] - br i1 %23, label %bb3, label %bb4 - -bb3: ; preds = %base_from_object.exit - %24 = shl i32 %12, 3 ; [#uses=1] - %25 = and i32 %24, 2040 ; [#uses=1] - %26 = and i32 %21, -2041 ; [#uses=1] - %27 = or i32 %26, %25 ; [#uses=1] - store i32 %27, i32* %1 - br label %bb6 - -bb4: ; preds = %base_from_object.exit - %28 = lshr i32 %21, 3 ; [#uses=1] - %29 = and i32 %28, 255 ; [#uses=1] - %30 = icmp eq i32 %29, %12 ; [#uses=1] - br i1 %30, label %bb6, label %bb5 - -bb5: ; preds = %bb4 - %31 = or i32 %21, 4 ; [#uses=1] - store i32 %31, i32* %1 - br label %bb6 - -bb6: ; preds = %bb5, %bb4, %bb3, %bb1 - %base.0 = phi i32 [ %20, %bb3 ], [ %20, %bb5 ], [ %base.2, %bb1 ], [ %20, %bb4 ] ; [#uses=4] - %encoding.0 = phi i32 [ %12, %bb3 ], [ %12, %bb5 ], [ %encoding.2, %bb1 ], [ %12, %bb4 ] ; [#uses=4] - %last_cie.0 = phi %struct.dwarf_cie* [ %10, %bb3 ], [ %10, %bb5 ], [ %last_cie.2, %bb1 ], [ %10, %bb4 ] ; <%struct.dwarf_cie*> [#uses=3] - %32 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 2, i32 0 ; [#uses=1] - %33 = trunc i32 %encoding.0 to i8 ; [#uses=2] - %34 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %33, i32 %base.0, i8* %32, i32* %pc_begin) ; [#uses=0] - %35 = call arm_apcscc i32 @size_of_encoded_value(i8 zeroext %33) ; [#uses=2] - %36 = icmp ugt i32 %35, 3 ; [#uses=1] - br i1 %36, label %bb9, label %bb7 - -bb7: ; preds = %bb6 - %37 = shl i32 %35, 3 ; [#uses=1] - %38 = shl i32 1, %37 ; [#uses=1] - %39 = add i32 %38, -1 ; [#uses=1] - br label %bb9 - -bb9: ; preds = %bb7, %bb6 - %mask.0 = phi i32 [ %39, %bb7 ], [ -1, %bb6 ] ; [#uses=1] - %40 = load i32* %pc_begin, align 4 ; [#uses=2] - %41 = and i32 %40, %mask.0 ; [#uses=1] - %42 = icmp eq i32 %41, 0 ; [#uses=1] - br i1 %42, label %bb12, label %bb10 - -bb10: ; preds = %bb9 - %43 = add i32 %count.1, 1 ; [#uses=2] - %44 = load i8** %0, align 4 ; [#uses=1] - %45 = inttoptr i32 %40 to i8* ; [#uses=2] - %46 = icmp ugt i8* %44, %45 ; [#uses=1] - br i1 %46, label %bb11, label %bb12 - -bb11: ; preds = %bb10 - store i8* %45, i8** %0, align 4 - br label %bb12 - -bb12: ; preds = %bb11, %bb10, %bb9, %bb - %base.1 = phi i32 [ %base.0, %bb11 ], [ %base.2, %bb ], [ %base.0, %bb9 ], [ %base.0, %bb10 ] ; [#uses=1] - %encoding.1 = phi i32 [ %encoding.0, %bb11 ], [ %encoding.2, %bb ], [ %encoding.0, %bb9 ], [ %encoding.0, %bb10 ] ; [#uses=1] - %count.0 = phi i32 [ %43, %bb11 ], [ %count.1, %bb ], [ %count.1, %bb9 ], [ %43, %bb10 ] ; [#uses=1] - %last_cie.1 = phi %struct.dwarf_cie* [ %last_cie.0, %bb11 ], [ %last_cie.2, %bb ], [ %last_cie.0, %bb9 ], [ %last_cie.0, %bb10 ] ; <%struct.dwarf_cie*> [#uses=1] - %47 = bitcast %struct.dwarf_fde* %this_fde_addr.0 to i8* ; [#uses=1] - %48 = load i32* %51, align 1 ; [#uses=1] - %.sum.i = add i32 %48, 4 ; [#uses=1] - %49 = getelementptr i8* %47, i32 %.sum.i ; [#uses=1] - %50 = bitcast i8* %49 to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] - br label %bb13 - -bb13: ; preds = %bb12, %entry - %base.2 = phi i32 [ 0, %entry ], [ %base.1, %bb12 ] ; [#uses=2] - %encoding.2 = phi i32 [ 0, %entry ], [ %encoding.1, %bb12 ] ; [#uses=2] - %count.1 = phi i32 [ 0, %entry ], [ %count.0, %bb12 ] ; [#uses=4] - %this_fde_addr.0 = phi %struct.dwarf_fde* [ %this_fde, %entry ], [ %50, %bb12 ] ; <%struct.dwarf_fde*> [#uses=4] - %last_cie.2 = phi %struct.dwarf_cie* [ null, %entry ], [ %last_cie.1, %bb12 ] ; <%struct.dwarf_cie*> [#uses=3] - %51 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 0 ; [#uses=2] - %52 = load i32* %51, align 1 ; [#uses=1] - %53 = icmp eq i32 %52, 0 ; [#uses=1] - br i1 %53, label %bb14, label %bb - -bb14: ; preds = %bb13 - call void @llvm.dbg.stoppoint(i32 605, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to { }*)) - call void @llvm.dbg.stoppoint(i32 649, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram244 to { }*)) - ret i32 %count.1 -} - -define internal arm_apcscc void @add_fdes(%struct.object* nocapture %ob, %struct.fde_accumulator* nocapture %accu, %struct.dwarf_fde* %this_fde) nounwind { -entry: - %pc_begin = alloca i32, align 4 ; [#uses=2] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram252 to { }*)) - call void @llvm.dbg.stoppoint(i32 656, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=2] - %1 = load i32* %0 ; [#uses=1] - %2 = lshr i32 %1, 3 ; [#uses=3] - %3 = and i32 %2, 255 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 657, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %4 = trunc i32 %2 to i8 ; [#uses=1] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %5 = icmp eq i8 %4, -1 ; [#uses=1] - br i1 %5, label %bb12.preheader, label %bb1.i - -bb1.i: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %6 = and i32 %2, 112 ; [#uses=1] - switch i32 %6, label %bb5.i [ - i32 0, label %bb12.preheader - i32 16, label %bb12.preheader - i32 32, label %bb3.i - i32 48, label %bb4.i - i32 80, label %bb12.preheader - ] - -bb12.preheader: ; preds = %bb4.i, %bb3.i, %bb1.i, %bb1.i, %bb1.i, %entry - %base.2.ph = phi i32 [ %15, %bb4.i ], [ %12, %bb3.i ], [ 0, %entry ], [ 0, %bb1.i ], [ 0, %bb1.i ], [ 0, %bb1.i ] ; [#uses=1] - %7 = getelementptr %struct.fde_accumulator* %accu, i32 0, i32 0 ; <%struct.fde_vector**> [#uses=1] - %8 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - %9 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - br label %bb12 - -bb3.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %10 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - %11 = load i8** %10, align 4 ; [#uses=1] - %12 = ptrtoint i8* %11 to i32 ; [#uses=1] - br label %bb12.preheader - -bb4.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %13 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - %14 = load i8** %13, align 4 ; [#uses=1] - %15 = ptrtoint i8* %14 to i32 ; [#uses=1] - br label %bb12.preheader - -bb5.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call arm_apcscc void @abort() noreturn nounwind - unreachable - -bb: ; preds = %bb12 - %16 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 1 ; [#uses=2] - %17 = load i32* %16, align 1 ; [#uses=2] - %18 = icmp eq i32 %17, 0 ; [#uses=1] - br i1 %18, label %bb11, label %bb1 - -bb1: ; preds = %bb - %19 = load i32* %0 ; [#uses=1] - %20 = and i32 %19, 4 ; [#uses=1] - %21 = icmp eq i32 %20, 0 ; [#uses=1] - br i1 %21, label %bb4, label %bb2 - -bb2: ; preds = %bb1 - %22 = bitcast i32* %16 to i8* ; [#uses=1] - %23 = sub i32 0, %17 ; [#uses=1] - %24 = getelementptr i8* %22, i32 %23 ; [#uses=1] - %25 = bitcast i8* %24 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=8] - %26 = icmp eq %struct.dwarf_cie* %25, %last_cie.2 ; [#uses=1] - br i1 %26, label %bb4, label %bb3 - -bb3: ; preds = %bb2 - %27 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %25) ; [#uses=8] - %28 = trunc i32 %27 to i8 ; [#uses=1] - %29 = icmp eq i8 %28, -1 ; [#uses=1] - br i1 %29, label %bb4, label %bb1.i14 - -bb1.i14: ; preds = %bb3 - %30 = and i32 %27, 112 ; [#uses=1] - switch i32 %30, label %bb5.i17 [ - i32 0, label %bb4 - i32 16, label %bb4 - i32 32, label %bb3.i15 - i32 48, label %bb4.i16 - i32 80, label %bb4 - ] - -bb3.i15: ; preds = %bb1.i14 - %31 = load i8** %8, align 4 ; [#uses=1] - %32 = ptrtoint i8* %31 to i32 ; [#uses=1] - br label %bb4 - -bb4.i16: ; preds = %bb1.i14 - %33 = load i8** %9, align 4 ; [#uses=1] - %34 = ptrtoint i8* %33 to i32 ; [#uses=1] - br label %bb4 - -bb5.i17: ; preds = %bb1.i14 - call void @llvm.dbg.stoppoint(i32 659, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to { }*)) - call void @llvm.dbg.stoppoint(i32 671, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) - call void @llvm.dbg.stoppoint(i32 672, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) - call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call arm_apcscc void @abort() noreturn nounwind - unreachable - -bb4: ; preds = %bb4.i16, %bb3.i15, %bb1.i14, %bb1.i14, %bb1.i14, %bb3, %bb2, %bb1 - %base.0 = phi i32 [ %34, %bb4.i16 ], [ %32, %bb3.i15 ], [ %base.2, %bb1 ], [ %base.2, %bb2 ], [ 0, %bb3 ], [ 0, %bb1.i14 ], [ 0, %bb1.i14 ], [ 0, %bb1.i14 ] ; [#uses=5] - %encoding.0 = phi i32 [ %27, %bb3.i15 ], [ %27, %bb4.i16 ], [ %encoding.2, %bb1 ], [ %encoding.2, %bb2 ], [ %27, %bb3 ], [ %27, %bb1.i14 ], [ %27, %bb1.i14 ], [ %27, %bb1.i14 ] ; [#uses=6] - %last_cie.0 = phi %struct.dwarf_cie* [ %25, %bb3.i15 ], [ %25, %bb4.i16 ], [ %last_cie.2, %bb1 ], [ %last_cie.2, %bb2 ], [ %25, %bb3 ], [ %25, %bb1.i14 ], [ %25, %bb1.i14 ], [ %25, %bb1.i14 ] ; <%struct.dwarf_cie*> [#uses=4] - %35 = icmp eq i32 %encoding.0, 0 ; [#uses=1] - br i1 %35, label %bb5, label %bb6 - -bb5: ; preds = %bb4 - %36 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 2 ; <[0 x i8]*> [#uses=1] - %37 = bitcast [0 x i8]* %36 to i32* ; [#uses=1] - %38 = load i32* %37, align 4 ; [#uses=1] - %39 = icmp eq i32 %38, 0 ; [#uses=1] - br i1 %39, label %bb11, label %bb10 - -bb6: ; preds = %bb4 - %40 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 2, i32 0 ; [#uses=1] - %41 = trunc i32 %encoding.0 to i8 ; [#uses=2] - %42 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %41, i32 %base.0, i8* %40, i32* %pc_begin) ; [#uses=0] - %43 = call arm_apcscc i32 @size_of_encoded_value(i8 zeroext %41) ; [#uses=2] - %44 = icmp ugt i32 %43, 3 ; [#uses=1] - br i1 %44, label %bb9, label %bb7 - -bb7: ; preds = %bb6 - %45 = shl i32 %43, 3 ; [#uses=1] - %46 = shl i32 1, %45 ; [#uses=1] - %47 = add i32 %46, -1 ; [#uses=1] - br label %bb9 - -bb9: ; preds = %bb7, %bb6 - %mask.0 = phi i32 [ %47, %bb7 ], [ -1, %bb6 ] ; [#uses=1] - %48 = load i32* %pc_begin, align 4 ; [#uses=1] - %49 = and i32 %48, %mask.0 ; [#uses=1] - %50 = icmp eq i32 %49, 0 ; [#uses=1] - br i1 %50, label %bb11, label %bb10 - -bb10: ; preds = %bb9, %bb5 - %51 = load %struct.fde_vector** %7, align 4 ; <%struct.fde_vector*> [#uses=3] - %52 = icmp eq %struct.fde_vector* %51, null ; [#uses=1] - br i1 %52, label %bb11, label %bb.i - -bb.i: ; preds = %bb10 - %53 = getelementptr %struct.fde_vector* %51, i32 0, i32 1 ; [#uses=2] - %54 = load i32* %53, align 4 ; [#uses=2] - %55 = getelementptr %struct.fde_vector* %51, i32 0, i32 2, i32 %54 ; <%struct.dwarf_fde**> [#uses=1] - store %struct.dwarf_fde* %this_fde_addr.0, %struct.dwarf_fde** %55, align 4 - %56 = add i32 %54, 1 ; [#uses=1] - store i32 %56, i32* %53, align 4 - br label %bb11 - -bb11: ; preds = %bb.i, %bb10, %bb9, %bb5, %bb - %base.1 = phi i32 [ %base.0, %bb.i ], [ %base.2, %bb ], [ %base.0, %bb5 ], [ %base.0, %bb9 ], [ %base.0, %bb10 ] ; [#uses=1] - %encoding.1 = phi i32 [ %encoding.0, %bb.i ], [ %encoding.2, %bb ], [ %encoding.0, %bb5 ], [ %encoding.0, %bb9 ], [ %encoding.0, %bb10 ] ; [#uses=1] - %last_cie.1 = phi %struct.dwarf_cie* [ %last_cie.0, %bb.i ], [ %last_cie.2, %bb ], [ %last_cie.0, %bb5 ], [ %last_cie.0, %bb9 ], [ %last_cie.0, %bb10 ] ; <%struct.dwarf_cie*> [#uses=1] - %57 = bitcast %struct.dwarf_fde* %this_fde_addr.0 to i8* ; [#uses=1] - %58 = load i32* %61, align 1 ; [#uses=1] - %.sum.i = add i32 %58, 4 ; [#uses=1] - %59 = getelementptr i8* %57, i32 %.sum.i ; [#uses=1] - %60 = bitcast i8* %59 to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] - br label %bb12 - -bb12: ; preds = %bb11, %bb12.preheader - %base.2 = phi i32 [ %base.1, %bb11 ], [ %base.2.ph, %bb12.preheader ] ; [#uses=3] - %this_fde_addr.0 = phi %struct.dwarf_fde* [ %60, %bb11 ], [ %this_fde, %bb12.preheader ] ; <%struct.dwarf_fde*> [#uses=6] - %encoding.2 = phi i32 [ %encoding.1, %bb11 ], [ %3, %bb12.preheader ] ; [#uses=3] - %last_cie.2 = phi %struct.dwarf_cie* [ %last_cie.1, %bb11 ], [ null, %bb12.preheader ] ; <%struct.dwarf_cie*> [#uses=4] - %61 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 0 ; [#uses=2] - %62 = load i32* %61, align 1 ; [#uses=1] - %63 = icmp eq i32 %62, 0 ; [#uses=1] - br i1 %63, label %return, label %bb - -return: ; preds = %bb12 - call void @llvm.dbg.stoppoint(i32 659, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to { }*)) - call void @llvm.dbg.stoppoint(i32 708, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram252 to { }*)) - ret void -} - -define internal arm_apcscc i32 @fde_single_encoding_compare(%struct.object* nocapture %ob, %struct.dwarf_fde* %x, %struct.dwarf_fde* %y) nounwind { -entry: - %y_ptr = alloca i32, align 4 ; [#uses=2] - %x_ptr = alloca i32, align 4 ; [#uses=2] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram254 to { }*)) - call void @llvm.dbg.stoppoint(i32 341, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=2] - %1 = load i32* %0 ; [#uses=1] - %2 = lshr i32 %1, 3 ; [#uses=2] - %3 = trunc i32 %2 to i8 ; [#uses=2] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %4 = icmp eq i8 %3, -1 ; [#uses=1] - br i1 %4, label %base_from_object.exit, label %bb1.i - -bb1.i: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %5 = and i32 %2, 112 ; [#uses=1] - switch i32 %5, label %bb5.i [ - i32 0, label %base_from_object.exit - i32 16, label %base_from_object.exit - i32 32, label %bb3.i - i32 48, label %bb4.i - i32 80, label %base_from_object.exit - ] - -bb3.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %6 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - %7 = load i8** %6, align 4 ; [#uses=1] - %8 = ptrtoint i8* %7 to i32 ; [#uses=1] - br label %base_from_object.exit - -bb4.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %9 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - %10 = load i8** %9, align 4 ; [#uses=1] - %11 = ptrtoint i8* %10 to i32 ; [#uses=1] - br label %base_from_object.exit - -bb5.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call arm_apcscc void @abort() noreturn nounwind - unreachable - -base_from_object.exit: ; preds = %bb4.i, %bb3.i, %bb1.i, %bb1.i, %bb1.i, %entry - %12 = phi i32 [ %11, %bb4.i ], [ %8, %bb3.i ], [ 0, %entry ], [ 0, %bb1.i ], [ 0, %bb1.i ], [ 0, %bb1.i ] ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 342, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) - %13 = getelementptr %struct.dwarf_fde* %x, i32 0, i32 2, i32 0 ; [#uses=1] - %14 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %3, i32 %12, i8* %13, i32* %x_ptr) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 343, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %15 = load i32* %0 ; [#uses=1] - %16 = lshr i32 %15, 3 ; [#uses=1] - %17 = getelementptr %struct.dwarf_fde* %y, i32 0, i32 2, i32 0 ; [#uses=1] - %18 = trunc i32 %16 to i8 ; [#uses=1] - %19 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %18, i32 %12, i8* %17, i32* %y_ptr) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 345, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %20 = load i32* %x_ptr, align 4 ; [#uses=2] - %21 = load i32* %y_ptr, align 4 ; [#uses=2] - %22 = icmp ugt i32 %20, %21 ; [#uses=1] - br i1 %22, label %bb4, label %bb1 - -bb1: ; preds = %base_from_object.exit - call void @llvm.dbg.stoppoint(i32 347, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %23 = icmp ult i32 %20, %21 ; [#uses=1] - %retval = select i1 %23, i32 -1, i32 0 ; [#uses=1] - ret i32 %retval - -bb4: ; preds = %base_from_object.exit - call void @llvm.dbg.stoppoint(i32 349, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret i32 1 -} - -define internal arm_apcscc i32 @fde_mixed_encoding_compare(%struct.object* nocapture %ob, %struct.dwarf_fde* %x, %struct.dwarf_fde* %y) nounwind { -entry: - %y_ptr = alloca i32, align 4 ; [#uses=2] - %x_ptr = alloca i32, align 4 ; [#uses=2] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram256 to { }*)) - call void @llvm.dbg.stoppoint(i32 358, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram248 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 312, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 163, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*)) nounwind - %0 = getelementptr %struct.dwarf_fde* %x, i32 0, i32 1 ; [#uses=2] - %1 = bitcast i32* %0 to i8* ; [#uses=1] - %2 = load i32* %0, align 1 ; [#uses=1] - %3 = sub i32 0, %2 ; [#uses=1] - %4 = getelementptr i8* %1, i32 %3 ; [#uses=1] - %5 = bitcast i8* %4 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=1] - %6 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %5) nounwind ; [#uses=2] - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 359, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram248 to { }*)) - %7 = trunc i32 %6 to i8 ; [#uses=2] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %8 = icmp eq i8 %7, -1 ; [#uses=1] - br i1 %8, label %base_from_object.exit, label %bb1.i - -bb1.i: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %9 = and i32 %6, 112 ; [#uses=1] - switch i32 %9, label %bb5.i [ - i32 0, label %base_from_object.exit - i32 16, label %base_from_object.exit - i32 32, label %bb3.i - i32 48, label %bb4.i - i32 80, label %base_from_object.exit - ] - -bb3.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %10 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - %11 = load i8** %10, align 4 ; [#uses=1] - %12 = ptrtoint i8* %11 to i32 ; [#uses=1] - br label %base_from_object.exit - -bb4.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %13 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - %14 = load i8** %13, align 4 ; [#uses=1] - %15 = ptrtoint i8* %14 to i32 ; [#uses=1] - br label %base_from_object.exit - -bb5.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call arm_apcscc void @abort() noreturn nounwind - unreachable - -base_from_object.exit: ; preds = %bb4.i, %bb3.i, %bb1.i, %bb1.i, %bb1.i, %entry - %16 = phi i32 [ %15, %bb4.i ], [ %12, %bb3.i ], [ 0, %entry ], [ 0, %bb1.i ], [ 0, %bb1.i ], [ 0, %bb1.i ] ; [#uses=1] - %17 = getelementptr %struct.dwarf_fde* %x, i32 0, i32 2, i32 0 ; [#uses=1] - %18 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %7, i32 %16, i8* %17, i32* %x_ptr) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 362, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) - %19 = getelementptr %struct.dwarf_fde* %y, i32 0, i32 1 ; [#uses=2] - %20 = bitcast i32* %19 to i8* ; [#uses=1] - %21 = load i32* %19, align 1 ; [#uses=1] - %22 = sub i32 0, %21 ; [#uses=1] - %23 = getelementptr i8* %20, i32 %22 ; [#uses=1] - %24 = bitcast i8* %23 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=1] - %25 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %24) nounwind ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 363, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %26 = trunc i32 %25 to i8 ; [#uses=2] - %27 = icmp eq i8 %26, -1 ; [#uses=1] - br i1 %27, label %base_from_object.exit11, label %bb1.i6 - -bb1.i6: ; preds = %base_from_object.exit - call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %28 = and i32 %25, 112 ; [#uses=1] - switch i32 %28, label %bb5.i9 [ - i32 0, label %base_from_object.exit11 - i32 16, label %base_from_object.exit11 - i32 32, label %bb3.i7 - i32 48, label %bb4.i8 - i32 80, label %base_from_object.exit11 - ] - -bb3.i7: ; preds = %bb1.i6 - call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %29 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - %30 = load i8** %29, align 4 ; [#uses=1] - %31 = ptrtoint i8* %30 to i32 ; [#uses=1] - br label %base_from_object.exit11 - -bb4.i8: ; preds = %bb1.i6 - call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %32 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - %33 = load i8** %32, align 4 ; [#uses=1] - %34 = ptrtoint i8* %33 to i32 ; [#uses=1] - br label %base_from_object.exit11 - -bb5.i9: ; preds = %bb1.i6 - call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call arm_apcscc void @abort() noreturn nounwind - unreachable - -base_from_object.exit11: ; preds = %bb4.i8, %bb3.i7, %bb1.i6, %bb1.i6, %bb1.i6, %base_from_object.exit - %35 = phi i32 [ %34, %bb4.i8 ], [ %31, %bb3.i7 ], [ 0, %base_from_object.exit ], [ 0, %bb1.i6 ], [ 0, %bb1.i6 ], [ 0, %bb1.i6 ] ; [#uses=1] - %36 = getelementptr %struct.dwarf_fde* %y, i32 0, i32 2, i32 0 ; [#uses=1] - %37 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %26, i32 %35, i8* %36, i32* %y_ptr) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 366, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %38 = load i32* %x_ptr, align 4 ; [#uses=2] - %39 = load i32* %y_ptr, align 4 ; [#uses=2] - %40 = icmp ugt i32 %38, %39 ; [#uses=1] - br i1 %40, label %bb4, label %bb1 - -bb1: ; preds = %base_from_object.exit11 - call void @llvm.dbg.stoppoint(i32 368, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %41 = icmp ult i32 %38, %39 ; [#uses=1] - %retval = select i1 %41, i32 -1, i32 0 ; [#uses=1] - ret i32 %retval - -bb4: ; preds = %base_from_object.exit11 - call void @llvm.dbg.stoppoint(i32 370, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret i32 1 -} - -define internal arm_apcscc %struct.dwarf_fde* @linear_search_fdes(%struct.object* nocapture %ob, %struct.dwarf_fde* %this_fde, i8* %pc) nounwind { -entry: - %pc_range = alloca i32, align 4 ; [#uses=3] - %pc_begin = alloca i32, align 4 ; [#uses=3] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram264 to { }*)) - call void @llvm.dbg.stoppoint(i32 773, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=2] - %1 = load i32* %0 ; [#uses=1] - %2 = lshr i32 %1, 3 ; [#uses=3] - %3 = and i32 %2, 255 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 774, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %4 = trunc i32 %2 to i8 ; [#uses=1] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %5 = icmp eq i8 %4, -1 ; [#uses=1] - br i1 %5, label %bb13.preheader, label %bb1.i - -bb1.i: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %6 = and i32 %2, 112 ; [#uses=1] - switch i32 %6, label %bb5.i [ - i32 0, label %bb13.preheader - i32 16, label %bb13.preheader - i32 32, label %bb3.i - i32 48, label %bb4.i - i32 80, label %bb13.preheader - ] - -bb13.preheader: ; preds = %bb4.i, %bb3.i, %bb1.i, %bb1.i, %bb1.i, %entry - %base.2.ph = phi i32 [ %15, %bb4.i ], [ %12, %bb3.i ], [ 0, %entry ], [ 0, %bb1.i ], [ 0, %bb1.i ], [ 0, %bb1.i ] ; [#uses=1] - %7 = ptrtoint i8* %pc to i32 ; [#uses=1] - %8 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - %9 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - br label %bb13 - -bb3.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %10 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - %11 = load i8** %10, align 4 ; [#uses=1] - %12 = ptrtoint i8* %11 to i32 ; [#uses=1] - br label %bb13.preheader - -bb4.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %13 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - %14 = load i8** %13, align 4 ; [#uses=1] - %15 = ptrtoint i8* %14 to i32 ; [#uses=1] - br label %bb13.preheader - -bb5.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call arm_apcscc void @abort() noreturn nounwind - unreachable - -bb: ; preds = %bb13 - %16 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 1 ; [#uses=2] - %17 = load i32* %16, align 1 ; [#uses=2] - %18 = icmp eq i32 %17, 0 ; [#uses=1] - br i1 %18, label %bb12, label %bb1 - -bb1: ; preds = %bb - %19 = load i32* %0 ; [#uses=1] - %20 = and i32 %19, 4 ; [#uses=1] - %21 = icmp eq i32 %20, 0 ; [#uses=1] - br i1 %21, label %bb4, label %bb2 - -bb2: ; preds = %bb1 - %22 = bitcast i32* %16 to i8* ; [#uses=1] - %23 = sub i32 0, %17 ; [#uses=1] - %24 = getelementptr i8* %22, i32 %23 ; [#uses=1] - %25 = bitcast i8* %24 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=8] - %26 = icmp eq %struct.dwarf_cie* %25, %last_cie.2 ; [#uses=1] - br i1 %26, label %bb4, label %bb3 - -bb3: ; preds = %bb2 - %27 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %25) ; [#uses=8] - %28 = trunc i32 %27 to i8 ; [#uses=1] - %29 = icmp eq i8 %28, -1 ; [#uses=1] - br i1 %29, label %bb4, label %bb1.i17 - -bb1.i17: ; preds = %bb3 - %30 = and i32 %27, 112 ; [#uses=1] - switch i32 %30, label %bb5.i20 [ - i32 0, label %bb4 - i32 16, label %bb4 - i32 32, label %bb3.i18 - i32 48, label %bb4.i19 - i32 80, label %bb4 - ] - -bb3.i18: ; preds = %bb1.i17 - %31 = load i8** %8, align 4 ; [#uses=1] - %32 = ptrtoint i8* %31 to i32 ; [#uses=1] - br label %bb4 - -bb4.i19: ; preds = %bb1.i17 - %33 = load i8** %9, align 4 ; [#uses=1] - %34 = ptrtoint i8* %33 to i32 ; [#uses=1] - br label %bb4 - -bb5.i20: ; preds = %bb1.i17 - call void @llvm.dbg.stoppoint(i32 776, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to { }*)) - call void @llvm.dbg.stoppoint(i32 789, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) - call void @llvm.dbg.stoppoint(i32 790, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) - call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call arm_apcscc void @abort() noreturn nounwind - unreachable - -bb4: ; preds = %bb4.i19, %bb3.i18, %bb1.i17, %bb1.i17, %bb1.i17, %bb3, %bb2, %bb1 - %base.0 = phi i32 [ %34, %bb4.i19 ], [ %32, %bb3.i18 ], [ %base.2, %bb1 ], [ %base.2, %bb2 ], [ 0, %bb3 ], [ 0, %bb1.i17 ], [ 0, %bb1.i17 ], [ 0, %bb1.i17 ] ; [#uses=4] - %encoding.0 = phi i32 [ %27, %bb3.i18 ], [ %27, %bb4.i19 ], [ %encoding.2, %bb1 ], [ %encoding.2, %bb2 ], [ %27, %bb3 ], [ %27, %bb1.i17 ], [ %27, %bb1.i17 ], [ %27, %bb1.i17 ] ; [#uses=5] - %last_cie.0 = phi %struct.dwarf_cie* [ %25, %bb3.i18 ], [ %25, %bb4.i19 ], [ %last_cie.2, %bb1 ], [ %last_cie.2, %bb2 ], [ %25, %bb3 ], [ %25, %bb1.i17 ], [ %25, %bb1.i17 ], [ %25, %bb1.i17 ] ; <%struct.dwarf_cie*> [#uses=3] - %35 = icmp eq i32 %encoding.0, 0 ; [#uses=1] - br i1 %35, label %bb5, label %bb6 - -bb5: ; preds = %bb4 - %36 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 2 ; <[0 x i8]*> [#uses=1] - %37 = bitcast [0 x i8]* %36 to i32* ; [#uses=2] - %38 = load i32* %37, align 4 ; [#uses=3] - store i32 %38, i32* %pc_begin, align 4 - %39 = getelementptr i32* %37, i32 1 ; [#uses=1] - %40 = load i32* %39, align 4 ; [#uses=1] - store i32 %40, i32* %pc_range, align 4 - %41 = icmp eq i32 %38, 0 ; [#uses=1] - br i1 %41, label %bb12, label %bb10 - -bb6: ; preds = %bb4 - %42 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 2, i32 0 ; [#uses=1] - %43 = trunc i32 %encoding.0 to i8 ; [#uses=3] - %44 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %43, i32 %base.0, i8* %42, i32* %pc_begin) ; [#uses=1] - %45 = and i8 %43, 15 ; [#uses=1] - %46 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %45, i32 0, i8* %44, i32* %pc_range) ; [#uses=0] - %47 = call arm_apcscc i32 @size_of_encoded_value(i8 zeroext %43) ; [#uses=2] - %48 = icmp ugt i32 %47, 3 ; [#uses=1] - br i1 %48, label %bb9, label %bb7 - -bb7: ; preds = %bb6 - %49 = shl i32 %47, 3 ; [#uses=1] - %50 = shl i32 1, %49 ; [#uses=1] - %51 = add i32 %50, -1 ; [#uses=1] - br label %bb9 - -bb9: ; preds = %bb7, %bb6 - %mask.0 = phi i32 [ %51, %bb7 ], [ -1, %bb6 ] ; [#uses=1] - %52 = load i32* %pc_begin, align 4 ; [#uses=2] - %53 = and i32 %52, %mask.0 ; [#uses=1] - %54 = icmp eq i32 %53, 0 ; [#uses=1] - br i1 %54, label %bb12, label %bb10 - -bb10: ; preds = %bb9, %bb5 - %55 = phi i32 [ %38, %bb5 ], [ %52, %bb9 ] ; [#uses=1] - %56 = sub i32 %7, %55 ; [#uses=1] - %57 = load i32* %pc_range, align 4 ; [#uses=1] - %58 = icmp ult i32 %56, %57 ; [#uses=1] - br i1 %58, label %bb15, label %bb12 - -bb12: ; preds = %bb10, %bb9, %bb5, %bb - %base.1 = phi i32 [ %base.2, %bb ], [ %base.0, %bb5 ], [ %base.0, %bb9 ], [ %base.0, %bb10 ] ; [#uses=1] - %encoding.1 = phi i32 [ %encoding.2, %bb ], [ %encoding.0, %bb5 ], [ %encoding.0, %bb9 ], [ %encoding.0, %bb10 ] ; [#uses=1] - %last_cie.1 = phi %struct.dwarf_cie* [ %last_cie.2, %bb ], [ %last_cie.0, %bb5 ], [ %last_cie.0, %bb9 ], [ %last_cie.0, %bb10 ] ; <%struct.dwarf_cie*> [#uses=1] - %59 = bitcast %struct.dwarf_fde* %this_fde_addr.0 to i8* ; [#uses=1] - %60 = load i32* %63, align 1 ; [#uses=1] - %.sum.i = add i32 %60, 4 ; [#uses=1] - %61 = getelementptr i8* %59, i32 %.sum.i ; [#uses=1] - %62 = bitcast i8* %61 to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] - br label %bb13 - -bb13: ; preds = %bb12, %bb13.preheader - %base.2 = phi i32 [ %base.1, %bb12 ], [ %base.2.ph, %bb13.preheader ] ; [#uses=3] - %encoding.2 = phi i32 [ %encoding.1, %bb12 ], [ %3, %bb13.preheader ] ; [#uses=3] - %last_cie.2 = phi %struct.dwarf_cie* [ %last_cie.1, %bb12 ], [ null, %bb13.preheader ] ; <%struct.dwarf_cie*> [#uses=4] - %this_fde_addr.0 = phi %struct.dwarf_fde* [ %62, %bb12 ], [ %this_fde, %bb13.preheader ] ; <%struct.dwarf_fde*> [#uses=6] - %63 = getelementptr %struct.dwarf_fde* %this_fde_addr.0, i32 0, i32 0 ; [#uses=2] - %64 = load i32* %63, align 1 ; [#uses=1] - %65 = icmp eq i32 %64, 0 ; [#uses=1] - br i1 %65, label %bb15, label %bb - -bb15: ; preds = %bb13, %bb10 - %.0 = phi %struct.dwarf_fde* [ %this_fde_addr.0, %bb10 ], [ null, %bb13 ] ; <%struct.dwarf_fde*> [#uses=1] - call void @llvm.dbg.stoppoint(i32 776, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to { }*)) - call void @llvm.dbg.stoppoint(i32 832, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram264 to { }*)) - ret %struct.dwarf_fde* %.0 -} - -define arm_apcscc void @__register_frame_table(i8* %begin) nounwind { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram272 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 157, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = malloc %struct.object ; <%struct.object*> [#uses=7] - tail call void @llvm.dbg.stoppoint(i32 158, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram184 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 151, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram180 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 131, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %1 = getelementptr %struct.object* %0, i32 0, i32 0 ; [#uses=1] - store i8* inttoptr (i64 4294967295 to i8*), i8** %1, align 4 - tail call void @llvm.dbg.stoppoint(i32 132, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %2 = getelementptr %struct.object* %0, i32 0, i32 1 ; [#uses=1] - store i8* null, i8** %2, align 4 - tail call void @llvm.dbg.stoppoint(i32 133, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %3 = getelementptr %struct.object* %0, i32 0, i32 2 ; [#uses=1] - store i8* null, i8** %3, align 4 - tail call void @llvm.dbg.stoppoint(i32 134, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %4 = getelementptr %struct.object* %0, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] - %.c.i.i = bitcast i8* %begin to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] - store %struct.dwarf_fde* %.c.i.i, %struct.dwarf_fde** %4 - tail call void @llvm.dbg.stoppoint(i32 137, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %5 = getelementptr %struct.object* %0, i32 0, i32 4, i32 0 ; [#uses=1] - store i32 2042, i32* %5 - tail call void @llvm.dbg.stoppoint(i32 140, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 142, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - %6 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=1] - %7 = getelementptr %struct.object* %0, i32 0, i32 5 ; <%struct.object**> [#uses=1] - store %struct.object* %6, %struct.object** %7, align 4 - tail call void @llvm.dbg.stoppoint(i32 143, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - store %struct.object* %0, %struct.object** @unseen_objects, align 4 - tail call void @llvm.dbg.stoppoint(i32 145, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 146, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 152, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram180 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 159, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram184 to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram272 to { }*)) - ret void -} - -define arm_apcscc void @__register_frame(i8* %begin) nounwind { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram274 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 116, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = bitcast i8* %begin to i32* ; [#uses=1] - %1 = load i32* %0, align 4 ; [#uses=1] - %2 = icmp eq i32 %1, 0 ; [#uses=1] - br i1 %2, label %return, label %bb - -bb: ; preds = %entry - tail call void @llvm.dbg.stoppoint(i32 119, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %3 = malloc %struct.object ; <%struct.object*> [#uses=7] - tail call void @llvm.dbg.stoppoint(i32 120, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram176 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 107, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram172 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 82, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %4 = icmp eq i8* %begin, null ; [#uses=1] - br i1 %4, label %__register_frame_info.exit, label %bb.i.i - -bb.i.i: ; preds = %bb - tail call void @llvm.dbg.stoppoint(i32 85, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %5 = getelementptr %struct.object* %3, i32 0, i32 0 ; [#uses=1] - store i8* inttoptr (i64 4294967295 to i8*), i8** %5, align 4 - tail call void @llvm.dbg.stoppoint(i32 86, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %6 = getelementptr %struct.object* %3, i32 0, i32 1 ; [#uses=1] - store i8* null, i8** %6, align 4 - tail call void @llvm.dbg.stoppoint(i32 87, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %7 = getelementptr %struct.object* %3, i32 0, i32 2 ; [#uses=1] - store i8* null, i8** %7, align 4 - tail call void @llvm.dbg.stoppoint(i32 88, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %8 = bitcast i8* %begin to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] - %9 = getelementptr %struct.object* %3, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] - store %struct.dwarf_fde* %8, %struct.dwarf_fde** %9, align 4 - tail call void @llvm.dbg.stoppoint(i32 90, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %10 = getelementptr %struct.object* %3, i32 0, i32 4, i32 0 ; [#uses=1] - store i32 2040, i32* %10 - tail call void @llvm.dbg.stoppoint(i32 96, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 98, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - %11 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=1] - %12 = getelementptr %struct.object* %3, i32 0, i32 5 ; <%struct.object**> [#uses=1] - store %struct.object* %11, %struct.object** %12, align 4 - tail call void @llvm.dbg.stoppoint(i32 99, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - store %struct.object* %3, %struct.object** @unseen_objects, align 4 - tail call void @llvm.dbg.stoppoint(i32 101, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 233, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit159 to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram274 to { }*)) - ret void - -__register_frame_info.exit: ; preds = %bb - ret void - -return: ; preds = %entry - tail call void @llvm.dbg.stoppoint(i32 120, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret void -} - -define internal arm_apcscc %struct.dwarf_fde* @search_object(%struct.object* %ob, i8* %pc) { -entry: - %pc_range.i33 = alloca i32, align 4 ; [#uses=2] - %pc_begin.i34 = alloca i32, align 4 ; [#uses=2] - %pc_range.i = alloca i32, align 4 ; [#uses=2] - %pc_begin.i = alloca i32, align 4 ; [#uses=2] - %accu.i = alloca %struct.fde_accumulator, align 4 ; <%struct.fde_accumulator*> [#uses=4] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram284 to { }*)) - call void @llvm.dbg.stoppoint(i32 931, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = getelementptr %struct.object* %ob, i32 0, i32 4, i32 0 ; [#uses=7] - %1 = load i32* %0 ; [#uses=6] - %2 = and i32 %1, 1 ; [#uses=1] - %3 = icmp eq i32 %2, 0 ; [#uses=1] - br i1 %3, label %bb, label %bb2 - -bb: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 933, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram282 to { }*)) - call void @llvm.dbg.stoppoint(i32 721, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %4 = lshr i32 %1, 11 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 722, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %5 = icmp eq i32 %4, 0 ; [#uses=1] - br i1 %5, label %bb.i, label %bb8.i - -bb.i: ; preds = %bb - call void @llvm.dbg.stoppoint(i32 724, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %6 = and i32 %1, 2 ; [#uses=1] - %7 = icmp eq i32 %6, 0 ; [#uses=1] - %8 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=2] - br i1 %7, label %bb5.i, label %bb2.i - -bb2.i: ; preds = %bb.i - call void @llvm.dbg.stoppoint(i32 726, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %9 = load %struct.dwarf_fde** %8 ; <%struct.dwarf_fde*> [#uses=3] - %10 = bitcast %struct.dwarf_fde* %9 to i8* ; [#uses=1] - %11 = bitcast %struct.dwarf_fde* %9 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] - call void @llvm.dbg.stoppoint(i32 727, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %12 = load %struct.dwarf_fde** %11, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %13 = icmp eq %struct.dwarf_fde* %12, null ; [#uses=1] - br i1 %13, label %bb6.i, label %bb3.i - -bb3.i: ; preds = %bb3.i, %bb2.i - %indvar.i = phi i32 [ 0, %bb2.i ], [ %indvar.next.i, %bb3.i ] ; [#uses=3] - %count.221.i = phi i32 [ 0, %bb2.i ], [ %16, %bb3.i ] ; [#uses=1] - %scevgep = getelementptr %struct.dwarf_fde* %9, i32 0, i32 1 ; [#uses=1] - %scevgep60 = getelementptr i32* %scevgep, i32 %indvar.i ; [#uses=1] - %scevgep2728.i = bitcast i32* %scevgep60 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] - %tmp = shl i32 %indvar.i, 2 ; [#uses=1] - %scevgep62 = getelementptr i8* %10, i32 %tmp ; [#uses=1] - %p1.020.i = bitcast i8* %scevgep62 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] - %14 = load %struct.dwarf_fde** %p1.020.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %15 = call arm_apcscc i32 @classify_object_over_fdes(%struct.object* %ob, %struct.dwarf_fde* %14) ; [#uses=1] - %16 = add i32 %15, %count.221.i ; [#uses=2] - %17 = load %struct.dwarf_fde** %scevgep2728.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %18 = icmp eq %struct.dwarf_fde* %17, null ; [#uses=1] - %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=1] - br i1 %18, label %bb6.i, label %bb3.i - -bb5.i: ; preds = %bb.i - call void @llvm.dbg.stoppoint(i32 731, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %19 = load %struct.dwarf_fde** %8, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %20 = call arm_apcscc i32 @classify_object_over_fdes(%struct.object* %ob, %struct.dwarf_fde* %19) ; [#uses=1] - br label %bb6.i - -bb6.i: ; preds = %bb5.i, %bb3.i, %bb2.i - %count.0.i = phi i32 [ %20, %bb5.i ], [ 0, %bb2.i ], [ %16, %bb3.i ] ; [#uses=5] - call void @llvm.dbg.stoppoint(i32 738, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %21 = load i32* %0 ; [#uses=1] - %22 = shl i32 %count.0.i, 11 ; [#uses=1] - %23 = and i32 %21, 2047 ; [#uses=4] - %24 = or i32 %23, %22 ; [#uses=3] - store i32 %24, i32* %0 - call void @llvm.dbg.stoppoint(i32 739, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %25 = and i32 %count.0.i, 2097151 ; [#uses=1] - %26 = icmp eq i32 %25, %count.0.i ; [#uses=1] - br i1 %26, label %bb8.i, label %bb7.i - -bb7.i: ; preds = %bb6.i - call void @llvm.dbg.stoppoint(i32 740, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - store i32 %23, i32* %0 - br label %bb8.i - -bb8.i: ; preds = %bb7.i, %bb6.i, %bb - %.rle121 = phi i32 [ %23, %bb7.i ], [ %1, %bb ], [ %24, %bb6.i ] ; [#uses=2] - %27 = phi i32 [ %23, %bb7.i ], [ %1, %bb ], [ %24, %bb6.i ] ; [#uses=1] - %count.1.i = phi i32 [ %count.0.i, %bb7.i ], [ %4, %bb ], [ %count.0.i, %bb6.i ] ; [#uses=4] - call void @llvm.dbg.stoppoint(i32 743, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram268 to { }*)) - call void @llvm.dbg.stoppoint(i32 397, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %28 = icmp eq i32 %count.1.i, 0 ; [#uses=1] - br i1 %28, label %init_object.exit, label %bb1.i.i - -bb1.i.i: ; preds = %bb8.i - call void @llvm.dbg.stoppoint(i32 400, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %29 = shl i32 %count.1.i, 2 ; [#uses=1] - %30 = add i32 %29, 8 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 401, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %31 = malloc i8, i32 %30 ; [#uses=3] - %32 = bitcast i8* %31 to %struct.fde_vector* ; <%struct.fde_vector*> [#uses=1] - %33 = getelementptr %struct.fde_accumulator* %accu.i, i32 0, i32 0 ; <%struct.fde_vector**> [#uses=6] - store %struct.fde_vector* %32, %struct.fde_vector** %33, align 4 - %34 = icmp eq i8* %31, null ; [#uses=1] - br i1 %34, label %init_object.exit, label %bb2.i.i - -bb2.i.i: ; preds = %bb1.i.i - call void @llvm.dbg.stoppoint(i32 403, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %35 = getelementptr i8* %31, i32 4 ; [#uses=1] - %36 = bitcast i8* %35 to i32* ; [#uses=1] - store i32 0, i32* %36, align 4 - call void @llvm.dbg.stoppoint(i32 404, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %37 = malloc i8, i32 %30 ; [#uses=3] - %38 = bitcast i8* %37 to %struct.fde_vector* ; <%struct.fde_vector*> [#uses=1] - %39 = getelementptr %struct.fde_accumulator* %accu.i, i32 0, i32 1 ; <%struct.fde_vector**> [#uses=5] - store %struct.fde_vector* %38, %struct.fde_vector** %39, align 4 - %40 = icmp eq i8* %37, null ; [#uses=1] - br i1 %40, label %bb9.i, label %start_fde_sort.exit.thread.i - -start_fde_sort.exit.thread.i: ; preds = %bb2.i.i - call void @llvm.dbg.stoppoint(i32 405, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %41 = getelementptr i8* %37, i32 4 ; [#uses=1] - %42 = bitcast i8* %41 to i32* ; [#uses=1] - store i32 0, i32* %42, align 4 - br label %bb9.i - -bb9.i: ; preds = %start_fde_sort.exit.thread.i, %bb2.i.i - call void @llvm.dbg.stoppoint(i32 746, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %43 = and i32 %27, 2 ; [#uses=1] - %44 = icmp eq i32 %43, 0 ; [#uses=1] - %45 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=4] - br i1 %44, label %bb13.i, label %bb10.i - -bb10.i: ; preds = %bb9.i - call void @llvm.dbg.stoppoint(i32 749, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %46 = load %struct.dwarf_fde** %45 ; <%struct.dwarf_fde*> [#uses=3] - %47 = bitcast %struct.dwarf_fde* %46 to i8* ; [#uses=1] - %48 = bitcast %struct.dwarf_fde* %46 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] - %49 = load %struct.dwarf_fde** %48, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %50 = icmp eq %struct.dwarf_fde* %49, null ; [#uses=1] - br i1 %50, label %bb14.i, label %bb11.i - -bb11.i: ; preds = %bb11.i, %bb10.i - %indvar29.i = phi i32 [ 0, %bb10.i ], [ %indvar.next30.i, %bb11.i ] ; [#uses=3] - %scevgep64 = getelementptr %struct.dwarf_fde* %46, i32 0, i32 1 ; [#uses=1] - %scevgep65 = getelementptr i32* %scevgep64, i32 %indvar29.i ; [#uses=1] - %scevgep3536.i = bitcast i32* %scevgep65 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] - %tmp67 = shl i32 %indvar29.i, 2 ; [#uses=1] - %scevgep68 = getelementptr i8* %47, i32 %tmp67 ; [#uses=1] - %p.023.i = bitcast i8* %scevgep68 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] - %51 = load %struct.dwarf_fde** %p.023.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] - call arm_apcscc void @add_fdes(%struct.object* %ob, %struct.fde_accumulator* %accu.i, %struct.dwarf_fde* %51) - %52 = load %struct.dwarf_fde** %scevgep3536.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %53 = icmp eq %struct.dwarf_fde* %52, null ; [#uses=1] - %indvar.next30.i = add i32 %indvar29.i, 1 ; [#uses=1] - br i1 %53, label %bb14.i, label %bb11.i - -bb13.i: ; preds = %bb9.i - call void @llvm.dbg.stoppoint(i32 753, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %54 = load %struct.dwarf_fde** %45, align 4 ; <%struct.dwarf_fde*> [#uses=1] - call arm_apcscc void @add_fdes(%struct.object* %ob, %struct.fde_accumulator* %accu.i, %struct.dwarf_fde* %54) - br label %bb14.i - -bb14.i: ; preds = %bb13.i, %bb11.i, %bb10.i - call void @llvm.dbg.stoppoint(i32 755, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram278 to { }*)) - call void @llvm.dbg.stoppoint(i32 567, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %55 = load %struct.fde_vector** %33, align 4 ; <%struct.fde_vector*> [#uses=8] - %56 = icmp eq %struct.fde_vector* %55, null ; [#uses=1] - br i1 %56, label %bb2.i17.i, label %bb.i.i - -bb.i.i: ; preds = %bb14.i - %57 = getelementptr %struct.fde_vector* %55, i32 0, i32 1 ; [#uses=1] - %58 = load i32* %57, align 4 ; [#uses=1] - %59 = icmp eq i32 %58, %count.1.i ; [#uses=1] - br i1 %59, label %bb2.i17.i, label %bb1.i16.i - -bb1.i16.i: ; preds = %bb.i.i - call arm_apcscc void @abort() noreturn nounwind - unreachable - -bb2.i17.i: ; preds = %bb.i.i, %bb14.i - call void @llvm.dbg.stoppoint(i32 569, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %60 = load i32* %0 ; [#uses=2] - %61 = and i32 %60, 4 ; [#uses=1] - %62 = icmp eq i32 %61, 0 ; [#uses=1] - br i1 %62, label %bb4.i.i, label %bb7.i.i - -bb4.i.i: ; preds = %bb2.i17.i - call void @llvm.dbg.stoppoint(i32 571, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %63 = and i32 %60, 2040 ; [#uses=1] - %64 = icmp eq i32 %63, 0 ; [#uses=1] - br i1 %64, label %bb7.i.i, label %bb6.i18.i - -bb6.i18.i: ; preds = %bb4.i.i - call void @llvm.dbg.stoppoint(i32 574, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - br label %bb7.i.i - -bb7.i.i: ; preds = %bb6.i18.i, %bb4.i.i, %bb2.i17.i - %fde_compare.0.i.i = phi i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* [ @fde_single_encoding_compare, %bb6.i18.i ], [ @fde_mixed_encoding_compare, %bb2.i17.i ], [ @fde_unencoded_compare, %bb4.i.i ] ; [#uses=4] - call void @llvm.dbg.stoppoint(i32 576, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %65 = load %struct.fde_vector** %39, align 4 ; <%struct.fde_vector*> [#uses=5] - %66 = icmp eq %struct.fde_vector* %65, null ; [#uses=1] - br i1 %66, label %bb11.i.i, label %bb8.i.i - -bb8.i.i: ; preds = %bb7.i.i - call void @llvm.dbg.stoppoint(i32 578, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram208 to { }*)) - call void @llvm.dbg.stoppoint(i32 436, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %67 = getelementptr %struct.fde_vector* %55, i32 0, i32 1 ; [#uses=2] - %68 = load i32* %67, align 4 ; [#uses=3] - call void @llvm.dbg.stoppoint(i32 445, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %69 = icmp eq i32 %68, 0 ; [#uses=2] - br i1 %69, label %fde_split.exit.i.i, label %bb.nph20.i.i.i - -bb1.i.i.i: ; preds = %bb3.i.i.i - %70 = ptrtoint %struct.dwarf_fde** %probe.0.i.i.i to i32 ; [#uses=1] - %71 = sub i32 %70, %84 ; [#uses=1] - %72 = ashr i32 %71, 2 ; [#uses=1] - %73 = getelementptr %struct.fde_vector* %65, i32 0, i32 2, i32 %72 ; <%struct.dwarf_fde**> [#uses=2] - %74 = load %struct.dwarf_fde** %73, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %75 = bitcast %struct.dwarf_fde* %74 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=2] - store %struct.dwarf_fde* null, %struct.dwarf_fde** %73, align 4 - br label %bb2.i.i.i - -bb2.i.i.i: ; preds = %bb2.preheader.i.i.i, %bb1.i.i.i - %probe.0.i.i.i = phi %struct.dwarf_fde** [ %75, %bb1.i.i.i ], [ %chain_end.119.i.i.i, %bb2.preheader.i.i.i ] ; <%struct.dwarf_fde**> [#uses=3] - %chain_end.0.i.i.i = phi %struct.dwarf_fde** [ %75, %bb1.i.i.i ], [ %chain_end.119.i.i.i, %bb2.preheader.i.i.i ] ; <%struct.dwarf_fde**> [#uses=1] - %76 = icmp eq %struct.dwarf_fde** %probe.0.i.i.i, @marker.2702 ; [#uses=1] - br i1 %76, label %bb4.i.i.i, label %bb3.i.i.i - -bb3.i.i.i: ; preds = %bb2.i.i.i - %scevgep333437.i.i.i = load i8** %scevgep33.i.i.i ; [#uses=1] - %77 = bitcast i8* %scevgep333437.i.i.i to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] - %78 = load %struct.dwarf_fde** %probe.0.i.i.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %79 = call arm_apcscc i32 %fde_compare.0.i.i(%struct.object* %ob, %struct.dwarf_fde* %77, %struct.dwarf_fde* %78) ; [#uses=1] - %80 = icmp slt i32 %79, 0 ; [#uses=1] - br i1 %80, label %bb1.i.i.i, label %bb4.i.i.i - -bb4.i.i.i: ; preds = %bb3.i.i.i, %bb2.i.i.i - %.c.i.i.i = bitcast %struct.dwarf_fde** %chain_end.0.i.i.i to i8* ; [#uses=1] - store i8* %.c.i.i.i, i8** %scevgep30.i.i.i - %81 = getelementptr %struct.fde_vector* %55, i32 0, i32 2, i32 %i.018.i.i.i ; <%struct.dwarf_fde**> [#uses=1] - %82 = add i32 %i.018.i.i.i, 1 ; [#uses=2] - %exitcond77 = icmp eq i32 %82, %umax76 ; [#uses=1] - br i1 %exitcond77, label %bb11.loopexit.i.i.i, label %bb2.preheader.i.i.i - -bb.nph20.i.i.i: ; preds = %bb8.i.i - %83 = getelementptr %struct.fde_vector* %55, i32 0, i32 2 ; <[0 x %struct.dwarf_fde*]*> [#uses=1] - %84 = ptrtoint [0 x %struct.dwarf_fde*]* %83 to i32 ; [#uses=1] - %tmp75 = icmp ugt i32 %68, 1 ; [#uses=1] - %umax76 = select i1 %tmp75, i32 %68, i32 1 ; [#uses=2] - br label %bb2.preheader.i.i.i - -bb2.preheader.i.i.i: ; preds = %bb.nph20.i.i.i, %bb4.i.i.i - %chain_end.119.i.i.i = phi %struct.dwarf_fde** [ @marker.2702, %bb.nph20.i.i.i ], [ %81, %bb4.i.i.i ] ; <%struct.dwarf_fde**> [#uses=2] - %i.018.i.i.i = phi i32 [ 0, %bb.nph20.i.i.i ], [ %82, %bb4.i.i.i ] ; [#uses=4] - %scevgep78 = getelementptr %struct.fde_vector* %55, i32 1, i32 0 ; [#uses=2] - %scevgep33.i.i.i = getelementptr i8** %scevgep78, i32 %i.018.i.i.i ; [#uses=1] - %scevgep80 = getelementptr %struct.fde_vector* %65, i32 1, i32 0 ; [#uses=2] - %scevgep30.i.i.i = getelementptr i8** %scevgep80, i32 %i.018.i.i.i ; [#uses=1] - br label %bb2.i.i.i - -bb7.i.i.i: ; preds = %bb11.loopexit.i.i.i, %bb10.i.i.i - %i.115.i.i.i = phi i32 [ %91, %bb10.i.i.i ], [ 0, %bb11.loopexit.i.i.i ] ; [#uses=3] - %j.114.i.i.i = phi i32 [ %j.0.i.i.i, %bb10.i.i.i ], [ 0, %bb11.loopexit.i.i.i ] ; [#uses=3] - %k.113.i.i.i = phi i32 [ %k.0.i.i.i, %bb10.i.i.i ], [ 0, %bb11.loopexit.i.i.i ] ; [#uses=3] - %scevgep24.i.i.i = getelementptr i8** %scevgep80, i32 %i.115.i.i.i ; [#uses=1] - %scevgep21.i.i.i = getelementptr i8** %scevgep78, i32 %i.115.i.i.i ; [#uses=1] - %scevgep242536.i.i.i = load i8** %scevgep24.i.i.i ; [#uses=1] - %85 = icmp eq i8* %scevgep242536.i.i.i, null ; [#uses=1] - %scevgep212235.i.i.i = load i8** %scevgep21.i.i.i ; [#uses=1] - %86 = bitcast i8* %scevgep212235.i.i.i to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=2] - br i1 %85, label %bb9.i.i.i, label %bb8.i.i.i - -bb8.i.i.i: ; preds = %bb7.i.i.i - %87 = getelementptr %struct.fde_vector* %55, i32 0, i32 2, i32 %j.114.i.i.i ; <%struct.dwarf_fde**> [#uses=1] - store %struct.dwarf_fde* %86, %struct.dwarf_fde** %87, align 4 - %88 = add i32 %j.114.i.i.i, 1 ; [#uses=1] - br label %bb10.i.i.i - -bb9.i.i.i: ; preds = %bb7.i.i.i - %89 = getelementptr %struct.fde_vector* %65, i32 0, i32 2, i32 %k.113.i.i.i ; <%struct.dwarf_fde**> [#uses=1] - store %struct.dwarf_fde* %86, %struct.dwarf_fde** %89, align 4 - %90 = add i32 %k.113.i.i.i, 1 ; [#uses=1] - br label %bb10.i.i.i - -bb10.i.i.i: ; preds = %bb9.i.i.i, %bb8.i.i.i - %k.0.i.i.i = phi i32 [ %k.113.i.i.i, %bb8.i.i.i ], [ %90, %bb9.i.i.i ] ; [#uses=2] - %j.0.i.i.i = phi i32 [ %88, %bb8.i.i.i ], [ %j.114.i.i.i, %bb9.i.i.i ] ; [#uses=2] - %91 = add i32 %i.115.i.i.i, 1 ; [#uses=2] - %exitcond = icmp eq i32 %91, %umax76 ; [#uses=1] - br i1 %exitcond, label %fde_split.exit.i.i, label %bb7.i.i.i - -bb11.loopexit.i.i.i: ; preds = %bb4.i.i.i - call void @llvm.dbg.stoppoint(i32 463, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - br i1 %69, label %fde_split.exit.i.i, label %bb7.i.i.i - -fde_split.exit.i.i: ; preds = %bb11.loopexit.i.i.i, %bb10.i.i.i, %bb8.i.i - %j.1.lcssa.i.i.i = phi i32 [ 0, %bb8.i.i ], [ 0, %bb11.loopexit.i.i.i ], [ %j.0.i.i.i, %bb10.i.i.i ] ; [#uses=1] - %k.1.lcssa.i.i.i = phi i32 [ 0, %bb8.i.i ], [ 0, %bb11.loopexit.i.i.i ], [ %k.0.i.i.i, %bb10.i.i.i ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 468, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - store i32 %j.1.lcssa.i.i.i, i32* %67, align 4 - call void @llvm.dbg.stoppoint(i32 469, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %92 = getelementptr %struct.fde_vector* %65, i32 0, i32 1 ; [#uses=1] - store i32 %k.1.lcssa.i.i.i, i32* %92, align 4 - call void @llvm.dbg.stoppoint(i32 579, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram208 to { }*)) - %93 = load %struct.fde_vector** %33, align 4 ; <%struct.fde_vector*> [#uses=1] - %94 = getelementptr %struct.fde_vector* %93, i32 0, i32 1 ; [#uses=1] - %95 = load i32* %94, align 4 ; [#uses=1] - %96 = load %struct.fde_vector** %39, align 4 ; <%struct.fde_vector*> [#uses=2] - %97 = getelementptr %struct.fde_vector* %96, i32 0, i32 1 ; [#uses=1] - %98 = load i32* %97, align 4 ; [#uses=1] - %99 = add i32 %98, %95 ; [#uses=1] - %100 = icmp eq i32 %99, %count.1.i ; [#uses=1] - br i1 %100, label %bb10.i.i, label %bb9.i.i - -bb9.i.i: ; preds = %fde_split.exit.i.i - call arm_apcscc void @abort() noreturn nounwind - unreachable - -bb10.i.i: ; preds = %fde_split.exit.i.i - call void @llvm.dbg.stoppoint(i32 580, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call arm_apcscc void @frame_heapsort(%struct.object* %ob, i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* %fde_compare.0.i.i, %struct.fde_vector* %96) - call void @llvm.dbg.stoppoint(i32 581, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %101 = load %struct.fde_vector** %33, align 4 ; <%struct.fde_vector*> [#uses=3] - %v19.i.i.i = bitcast %struct.fde_vector* %101 to i8* ; [#uses=2] - %102 = load %struct.fde_vector** %39, align 4 ; <%struct.fde_vector*> [#uses=3] - %v230.i.i.i = bitcast %struct.fde_vector* %102 to i8* ; [#uses=1] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram219 to { }*)) - call void @llvm.dbg.stoppoint(i32 542, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %103 = getelementptr %struct.fde_vector* %102, i32 0, i32 1 ; [#uses=2] - %104 = load i32* %103, align 4 ; [#uses=4] - call void @llvm.dbg.stoppoint(i32 543, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %105 = icmp eq i32 %104, 0 ; [#uses=1] - br i1 %105, label %fde_merge.exit.i.i, label %bb.i.i.i - -bb.i.i.i: ; preds = %bb10.i.i - %106 = getelementptr %struct.fde_vector* %101, i32 0, i32 1 ; [#uses=3] - %107 = load i32* %106, align 4 ; [#uses=1] - %tmp18.i.i.i = add i32 %104, -1 ; [#uses=1] - %tmp104 = shl i32 %104, 2 ; [#uses=1] - %tmp105 = add i32 %tmp104, 4 ; [#uses=1] - br label %bb1.i13.i.i - -bb1.i13.i.i: ; preds = %bb5.i.i.i, %bb.i.i.i - %indvar15.i.i.i = phi i32 [ 0, %bb.i.i.i ], [ %indvar.next16.i.i.i, %bb5.i.i.i ] ; [#uses=3] - %i1.1.i.i.i = phi i32 [ %107, %bb.i.i.i ], [ %i1.0.i.i.i, %bb5.i.i.i ] ; [#uses=4] - %tmp100 = sub i32 %tmp18.i.i.i, %indvar15.i.i.i ; [#uses=2] - %tmp103 = mul i32 %indvar15.i.i.i, -4 ; [#uses=1] - %tmp106 = add i32 %tmp103, %tmp105 ; [#uses=1] - %scevgep107 = getelementptr i8* %v230.i.i.i, i32 %tmp106 ; [#uses=1] - %scevgep3536.i.i.i = bitcast i8* %scevgep107 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] - %108 = load %struct.dwarf_fde** %scevgep3536.i.i.i, align 4 ; <%struct.dwarf_fde*> [#uses=2] - %tmp85 = add i32 %i1.1.i.i.i, %tmp100 ; [#uses=1] - %tmp86 = shl i32 %tmp85, 2 ; [#uses=1] - %tmp87 = add i32 %tmp86, 8 ; [#uses=1] - %tmp91 = shl i32 %i1.1.i.i.i, 2 ; [#uses=1] - %tmp92 = add i32 %tmp91, 4 ; [#uses=1] - br label %bb3.i17.i.i - -bb2.i14.i.i: ; preds = %bb4.i18.i.i - %109 = load %struct.dwarf_fde** %scevgep14.i.i.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] - store %struct.dwarf_fde* %109, %struct.dwarf_fde** %scevgep2425.i.i.i, align 4 - %indvar.next.i.i.i = add i32 %110, 1 ; [#uses=1] - br label %bb3.i17.i.i - -bb3.i17.i.i: ; preds = %bb2.i14.i.i, %bb1.i13.i.i - %110 = phi i32 [ 0, %bb1.i13.i.i ], [ %indvar.next.i.i.i, %bb2.i14.i.i ] ; [#uses=4] - %tmp82 = mul i32 %110, -4 ; [#uses=2] - %tmp88 = add i32 %tmp82, %tmp87 ; [#uses=1] - %scevgep89 = getelementptr i8* %v19.i.i.i, i32 %tmp88 ; [#uses=1] - %scevgep2425.i.i.i = bitcast i8* %scevgep89 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] - %tmp93 = add i32 %tmp82, %tmp92 ; [#uses=1] - %scevgep94 = getelementptr i8* %v19.i.i.i, i32 %tmp93 ; [#uses=1] - %scevgep14.i.i.i = bitcast i8* %scevgep94 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=2] - %i1.0.i.i.i = sub i32 %i1.1.i.i.i, %110 ; [#uses=2] - %111 = icmp eq i32 %i1.1.i.i.i, %110 ; [#uses=1] - br i1 %111, label %bb5.i.i.i, label %bb4.i18.i.i - -bb4.i18.i.i: ; preds = %bb3.i17.i.i - %112 = load %struct.dwarf_fde** %scevgep14.i.i.i, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %113 = call arm_apcscc i32 %fde_compare.0.i.i(%struct.object* %ob, %struct.dwarf_fde* %112, %struct.dwarf_fde* %108) ; [#uses=1] - %114 = icmp sgt i32 %113, 0 ; [#uses=1] - br i1 %114, label %bb2.i14.i.i, label %bb5.i.i.i - -bb5.i.i.i: ; preds = %bb4.i18.i.i, %bb3.i17.i.i - %tmp29.i.i.i = add i32 %i1.0.i.i.i, %tmp100 ; [#uses=1] - %115 = getelementptr %struct.fde_vector* %101, i32 0, i32 2, i32 %tmp29.i.i.i ; <%struct.dwarf_fde**> [#uses=1] - store %struct.dwarf_fde* %108, %struct.dwarf_fde** %115, align 4 - %indvar.next16.i.i.i = add i32 %indvar15.i.i.i, 1 ; [#uses=2] - %exitcond98 = icmp eq i32 %indvar.next16.i.i.i, %104 ; [#uses=1] - br i1 %exitcond98, label %bb6.i.i.i, label %bb1.i13.i.i - -bb6.i.i.i: ; preds = %bb5.i.i.i - call void @llvm.dbg.stoppoint(i32 558, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %116 = load i32* %106, align 4 ; [#uses=1] - %117 = load i32* %103, align 4 ; [#uses=1] - %118 = add i32 %117, %116 ; [#uses=1] - store i32 %118, i32* %106, align 4 - %.pre.i.i = load %struct.fde_vector** %39, align 4 ; <%struct.fde_vector*> [#uses=1] - br label %fde_merge.exit.i.i - -fde_merge.exit.i.i: ; preds = %bb6.i.i.i, %bb10.i.i - %119 = phi %struct.fde_vector* [ %.pre.i.i, %bb6.i.i.i ], [ %102, %bb10.i.i ] ; <%struct.fde_vector*> [#uses=1] - call void @llvm.dbg.stoppoint(i32 582, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram219 to { }*)) - free %struct.fde_vector* %119 - br label %end_fde_sort.exit.i - -bb11.i.i: ; preds = %bb7.i.i - call void @llvm.dbg.stoppoint(i32 588, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call arm_apcscc void @frame_heapsort(%struct.object* %ob, i32 (%struct.object*, %struct.dwarf_fde*, %struct.dwarf_fde*)* %fde_compare.0.i.i, %struct.fde_vector* %55) - br label %end_fde_sort.exit.i - -end_fde_sort.exit.i: ; preds = %bb11.i.i, %fde_merge.exit.i.i - call void @llvm.dbg.stoppoint(i32 759, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram278 to { }*)) - %120 = load %struct.fde_vector** %33, align 4 ; <%struct.fde_vector*> [#uses=1] - %121 = load %struct.dwarf_fde** %45, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %122 = getelementptr %struct.fde_vector* %120, i32 0, i32 0 ; [#uses=1] - %123 = bitcast %struct.dwarf_fde* %121 to i8* ; [#uses=1] - store i8* %123, i8** %122, align 4 - call void @llvm.dbg.stoppoint(i32 760, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %124 = load %struct.fde_vector** %33, align 4 ; <%struct.fde_vector*> [#uses=1] - %.c.i = bitcast %struct.fde_vector* %124 to %struct.dwarf_fde* ; <%struct.dwarf_fde*> [#uses=1] - store %struct.dwarf_fde* %.c.i, %struct.dwarf_fde** %45 - call void @llvm.dbg.stoppoint(i32 762, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %125 = load i32* %0 ; [#uses=1] - %126 = or i32 %125, 1 ; [#uses=2] - store i32 %126, i32* %0 - br label %init_object.exit - -init_object.exit: ; preds = %end_fde_sort.exit.i, %bb1.i.i, %bb8.i - %.rle120 = phi i32 [ %126, %end_fde_sort.exit.i ], [ %.rle121, %bb8.i ], [ %.rle121, %bb1.i.i ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 938, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram282 to { }*)) - %127 = getelementptr %struct.object* %ob, i32 0, i32 0 ; [#uses=1] - %128 = load i8** %127, align 4 ; [#uses=1] - %129 = icmp ugt i8* %128, %pc ; [#uses=1] - br i1 %129, label %bb16, label %bb2 - -bb2: ; preds = %init_object.exit, %entry - %130 = phi i32 [ %1, %entry ], [ %.rle120, %init_object.exit ] ; [#uses=5] - call void @llvm.dbg.stoppoint(i32 942, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %131 = and i32 %130, 1 ; [#uses=1] - %132 = icmp eq i32 %131, 0 ; [#uses=1] - br i1 %132, label %bb8, label %bb3 - -bb3: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 944, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %133 = and i32 %130, 4 ; [#uses=1] - %134 = icmp eq i32 %133, 0 ; [#uses=1] - br i1 %134, label %bb5, label %bb4 - -bb4: ; preds = %bb3 - call void @llvm.dbg.stoppoint(i32 945, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram258 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 898, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %135 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] - %136 = load %struct.dwarf_fde** %135 ; <%struct.dwarf_fde*> [#uses=2] - %137 = bitcast %struct.dwarf_fde* %136 to %struct.fde_vector* ; <%struct.fde_vector*> [#uses=1] - call void @llvm.dbg.stoppoint(i32 901, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %138 = getelementptr %struct.dwarf_fde* %136, i32 0, i32 1 ; [#uses=1] - %139 = load i32* %138, align 4 ; [#uses=1] - %140 = ptrtoint i8* %pc to i32 ; [#uses=2] - %141 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - %142 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - br label %bb5.i23 - -bb.i18: ; preds = %bb5.i23 - %143 = add i32 %lo.0.i, %hi.0.ph.i.ph ; [#uses=1] - %144 = lshr i32 %143, 1 ; [#uses=3] - %145 = getelementptr %struct.fde_vector* %137, i32 0, i32 2, i32 %144 ; <%struct.dwarf_fde**> [#uses=1] - %146 = load %struct.dwarf_fde** %145, align 4 ; <%struct.dwarf_fde*> [#uses=3] - %147 = getelementptr %struct.dwarf_fde* %146, i32 0, i32 1 ; [#uses=2] - %148 = bitcast i32* %147 to i8* ; [#uses=1] - %149 = load i32* %147, align 1 ; [#uses=1] - %150 = sub i32 0, %149 ; [#uses=1] - %151 = getelementptr i8* %148, i32 %150 ; [#uses=1] - %152 = bitcast i8* %151 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=1] - %153 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %152) nounwind ; [#uses=2] - %154 = trunc i32 %153 to i8 ; [#uses=3] - %155 = icmp eq i8 %154, -1 ; [#uses=1] - br i1 %155, label %base_from_object.exit.i, label %bb1.i.i19 - -bb1.i.i19: ; preds = %bb.i18 - %156 = and i32 %153, 112 ; [#uses=1] - switch i32 %156, label %bb5.i.i [ - i32 0, label %base_from_object.exit.i - i32 16, label %base_from_object.exit.i - i32 32, label %bb3.i.i - i32 48, label %bb4.i.i20 - i32 80, label %base_from_object.exit.i - ] - -bb3.i.i: ; preds = %bb1.i.i19 - %157 = load i8** %141, align 4 ; [#uses=1] - %158 = ptrtoint i8* %157 to i32 ; [#uses=1] - br label %base_from_object.exit.i - -bb4.i.i20: ; preds = %bb1.i.i19 - %159 = load i8** %142, align 4 ; [#uses=1] - %160 = ptrtoint i8* %159 to i32 ; [#uses=1] - br label %base_from_object.exit.i - -bb5.i.i: ; preds = %bb1.i.i19 - call void @llvm.dbg.stoppoint(i32 909, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram248 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 312, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 163, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*)) nounwind - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 910, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram248 to { }*)) nounwind - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call arm_apcscc void @abort() noreturn nounwind - unreachable - -base_from_object.exit.i: ; preds = %bb4.i.i20, %bb3.i.i, %bb1.i.i19, %bb1.i.i19, %bb1.i.i19, %bb.i18 - %161 = phi i32 [ %160, %bb4.i.i20 ], [ %158, %bb3.i.i ], [ 0, %bb.i18 ], [ 0, %bb1.i.i19 ], [ 0, %bb1.i.i19 ], [ 0, %bb1.i.i19 ] ; [#uses=1] - %162 = getelementptr %struct.dwarf_fde* %146, i32 0, i32 2, i32 0 ; [#uses=1] - %163 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %154, i32 %161, i8* %162, i32* %pc_begin.i) nounwind ; [#uses=1] - %164 = and i8 %154, 15 ; [#uses=1] - %165 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %164, i32 0, i8* %163, i32* %pc_range.i) nounwind ; [#uses=0] - %166 = load i32* %pc_begin.i, align 4 ; [#uses=2] - %167 = icmp ult i32 %140, %166 ; [#uses=1] - br i1 %167, label %bb5.i23, label %bb2.i21 - -bb2.i21: ; preds = %base_from_object.exit.i - %168 = load i32* %pc_range.i, align 4 ; [#uses=1] - %169 = add i32 %168, %166 ; [#uses=1] - %170 = icmp ult i32 %140, %169 ; [#uses=1] - br i1 %170, label %binary_search_mixed_encoding_fdes.exit, label %bb3.i22 - -bb3.i22: ; preds = %bb2.i21 - %171 = add i32 %144, 1 ; [#uses=1] - br label %bb5.i23 - -bb5.i23: ; preds = %bb3.i22, %base_from_object.exit.i, %bb4 - %hi.0.ph.i.ph = phi i32 [ %139, %bb4 ], [ %144, %base_from_object.exit.i ], [ %hi.0.ph.i.ph, %bb3.i22 ] ; [#uses=3] - %lo.0.i = phi i32 [ %171, %bb3.i22 ], [ 0, %bb4 ], [ %lo.0.i, %base_from_object.exit.i ] ; [#uses=3] - %172 = icmp ult i32 %lo.0.i, %hi.0.ph.i.ph ; [#uses=1] - br i1 %172, label %bb.i18, label %binary_search_mixed_encoding_fdes.exit - -binary_search_mixed_encoding_fdes.exit: ; preds = %bb5.i23, %bb2.i21 - %.0.i = phi %struct.dwarf_fde* [ %146, %bb2.i21 ], [ null, %bb5.i23 ] ; <%struct.dwarf_fde*> [#uses=1] - call void @llvm.dbg.stoppoint(i32 923, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram284 to { }*)) - ret %struct.dwarf_fde* %.0.i - -bb5: ; preds = %bb3 - call void @llvm.dbg.stoppoint(i32 946, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %173 = and i32 %130, 2040 ; [#uses=1] - %174 = icmp eq i32 %173, 0 ; [#uses=1] - %175 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] - %176 = load %struct.dwarf_fde** %175 ; <%struct.dwarf_fde*> [#uses=3] - %177 = bitcast %struct.dwarf_fde* %176 to %struct.fde_vector* ; <%struct.fde_vector*> [#uses=2] - br i1 %174, label %bb6, label %bb7 - -bb6: ; preds = %bb5 - call void @llvm.dbg.stoppoint(i32 947, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram223 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 844, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %178 = getelementptr %struct.dwarf_fde* %176, i32 0, i32 1 ; [#uses=1] - %179 = load i32* %178, align 4 ; [#uses=1] - br label %bb5.i30 - -bb.i25: ; preds = %bb5.i30 - %180 = add i32 %lo.0.i29, %hi.0.ph.i28.ph ; [#uses=1] - %181 = lshr i32 %180, 1 ; [#uses=3] - %182 = getelementptr %struct.fde_vector* %177, i32 0, i32 2, i32 %181 ; <%struct.dwarf_fde**> [#uses=1] - %183 = load %struct.dwarf_fde** %182, align 4 ; <%struct.dwarf_fde*> [#uses=2] - %184 = getelementptr %struct.dwarf_fde* %183, i32 0, i32 2 ; <[0 x i8]*> [#uses=2] - %185 = bitcast [0 x i8]* %184 to i8** ; [#uses=1] - %186 = load i8** %185, align 4 ; [#uses=2] - %187 = icmp ugt i8* %186, %pc ; [#uses=1] - br i1 %187, label %bb5.i30, label %bb2.i26 - -bb2.i26: ; preds = %bb.i25 - %188 = bitcast [0 x i8]* %184 to i32* ; [#uses=1] - %189 = getelementptr i32* %188, i32 1 ; [#uses=1] - %190 = load i32* %189, align 4 ; [#uses=1] - %191 = getelementptr i8* %186, i32 %190 ; [#uses=1] - %192 = icmp ugt i8* %191, %pc ; [#uses=1] - br i1 %192, label %binary_search_unencoded_fdes.exit, label %bb3.i27 - -bb3.i27: ; preds = %bb2.i26 - %193 = add i32 %181, 1 ; [#uses=1] - br label %bb5.i30 - -bb5.i30: ; preds = %bb3.i27, %bb.i25, %bb6 - %hi.0.ph.i28.ph = phi i32 [ %179, %bb6 ], [ %181, %bb.i25 ], [ %hi.0.ph.i28.ph, %bb3.i27 ] ; [#uses=3] - %lo.0.i29 = phi i32 [ %193, %bb3.i27 ], [ 0, %bb6 ], [ %lo.0.i29, %bb.i25 ] ; [#uses=3] - %194 = icmp ult i32 %lo.0.i29, %hi.0.ph.i28.ph ; [#uses=1] - br i1 %194, label %bb.i25, label %binary_search_unencoded_fdes.exit - -binary_search_unencoded_fdes.exit: ; preds = %bb5.i30, %bb2.i26 - %.0.i31 = phi %struct.dwarf_fde* [ %183, %bb2.i26 ], [ null, %bb5.i30 ] ; <%struct.dwarf_fde*> [#uses=1] - tail call void @llvm.dbg.stoppoint(i32 862, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret %struct.dwarf_fde* %.0.i31 - -bb7: ; preds = %bb5 - call void @llvm.dbg.stoppoint(i32 949, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram260 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 869, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %195 = lshr i32 %130, 3 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 870, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %196 = trunc i32 %195 to i8 ; [#uses=3] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %197 = icmp eq i8 %196, -1 ; [#uses=1] - br i1 %197, label %base_from_object.exit.i39, label %bb1.i.i35 - -bb1.i.i35: ; preds = %bb7 - call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %198 = and i32 %195, 112 ; [#uses=1] - switch i32 %198, label %bb5.i.i38 [ - i32 0, label %base_from_object.exit.i39 - i32 16, label %base_from_object.exit.i39 - i32 32, label %bb3.i.i36 - i32 48, label %bb4.i.i37 - i32 80, label %base_from_object.exit.i39 - ] - -bb3.i.i36: ; preds = %bb1.i.i35 - call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %199 = getelementptr %struct.object* %ob, i32 0, i32 1 ; [#uses=1] - %200 = load i8** %199, align 4 ; [#uses=1] - %201 = ptrtoint i8* %200 to i32 ; [#uses=1] - br label %base_from_object.exit.i39 - -bb4.i.i37: ; preds = %bb1.i.i35 - call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %202 = getelementptr %struct.object* %ob, i32 0, i32 2 ; [#uses=1] - %203 = load i8** %202, align 4 ; [#uses=1] - %204 = ptrtoint i8* %203 to i32 ; [#uses=1] - br label %base_from_object.exit.i39 - -bb5.i.i38: ; preds = %bb1.i.i35 - call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call arm_apcscc void @abort() noreturn nounwind - unreachable - -base_from_object.exit.i39: ; preds = %bb4.i.i37, %bb3.i.i36, %bb1.i.i35, %bb1.i.i35, %bb1.i.i35, %bb7 - %205 = phi i32 [ %204, %bb4.i.i37 ], [ %201, %bb3.i.i36 ], [ 0, %bb7 ], [ 0, %bb1.i.i35 ], [ 0, %bb1.i.i35 ], [ 0, %bb1.i.i35 ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 873, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind - %206 = getelementptr %struct.dwarf_fde* %176, i32 0, i32 1 ; [#uses=1] - %207 = load i32* %206, align 4 ; [#uses=1] - %208 = and i8 %196, 15 ; [#uses=1] - %209 = ptrtoint i8* %pc to i32 ; [#uses=2] - br label %bb5.i45 - -bb.i40: ; preds = %bb5.i45 - %210 = add i32 %lo.0.i44, %hi.0.ph.i43.ph ; [#uses=1] - %211 = lshr i32 %210, 1 ; [#uses=3] - %212 = getelementptr %struct.fde_vector* %177, i32 0, i32 2, i32 %211 ; <%struct.dwarf_fde**> [#uses=1] - %213 = load %struct.dwarf_fde** %212, align 4 ; <%struct.dwarf_fde*> [#uses=2] - %214 = getelementptr %struct.dwarf_fde* %213, i32 0, i32 2, i32 0 ; [#uses=1] - %215 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %196, i32 %205, i8* %214, i32* %pc_begin.i34) nounwind ; [#uses=1] - %216 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %208, i32 0, i8* %215, i32* %pc_range.i33) nounwind ; [#uses=0] - %217 = load i32* %pc_begin.i34, align 4 ; [#uses=2] - %218 = icmp ult i32 %209, %217 ; [#uses=1] - br i1 %218, label %bb5.i45, label %bb2.i41 - -bb2.i41: ; preds = %bb.i40 - %219 = load i32* %pc_range.i33, align 4 ; [#uses=1] - %220 = add i32 %219, %217 ; [#uses=1] - %221 = icmp ult i32 %209, %220 ; [#uses=1] - br i1 %221, label %binary_search_single_encoding_fdes.exit, label %bb3.i42 - -bb3.i42: ; preds = %bb2.i41 - %222 = add i32 %211, 1 ; [#uses=1] - br label %bb5.i45 - -bb5.i45: ; preds = %bb3.i42, %bb.i40, %base_from_object.exit.i39 - %hi.0.ph.i43.ph = phi i32 [ %207, %base_from_object.exit.i39 ], [ %211, %bb.i40 ], [ %hi.0.ph.i43.ph, %bb3.i42 ] ; [#uses=3] - %lo.0.i44 = phi i32 [ %222, %bb3.i42 ], [ 0, %base_from_object.exit.i39 ], [ %lo.0.i44, %bb.i40 ] ; [#uses=3] - %223 = icmp ult i32 %lo.0.i44, %hi.0.ph.i43.ph ; [#uses=1] - br i1 %223, label %bb.i40, label %binary_search_single_encoding_fdes.exit - -binary_search_single_encoding_fdes.exit: ; preds = %bb5.i45, %bb2.i41 - %.0.i46 = phi %struct.dwarf_fde* [ %213, %bb2.i41 ], [ null, %bb5.i45 ] ; <%struct.dwarf_fde*> [#uses=1] - call void @llvm.dbg.stoppoint(i32 892, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - ret %struct.dwarf_fde* %.0.i46 - -bb8: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 954, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %224 = and i32 %130, 2 ; [#uses=1] - %225 = icmp eq i32 %224, 0 ; [#uses=1] - %226 = getelementptr %struct.object* %ob, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=2] - br i1 %225, label %bb15, label %bb9 - -bb9: ; preds = %bb8 - call void @llvm.dbg.stoppoint(i32 957, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %227 = load %struct.dwarf_fde** %226 ; <%struct.dwarf_fde*> [#uses=1] - %228 = bitcast %struct.dwarf_fde* %227 to i8* ; [#uses=1] - br label %bb13 - -bb10: ; preds = %bb13 - %229 = call arm_apcscc %struct.dwarf_fde* @linear_search_fdes(%struct.object* %ob, %struct.dwarf_fde* %231, i8* %pc) ; <%struct.dwarf_fde*> [#uses=2] - %230 = icmp eq %struct.dwarf_fde* %229, null ; [#uses=1] - br i1 %230, label %bb12, label %bb16 - -bb12: ; preds = %bb10 - %indvar.next = add i32 %indvar, 1 ; [#uses=1] - br label %bb13 - -bb13: ; preds = %bb12, %bb9 - %indvar = phi i32 [ 0, %bb9 ], [ %indvar.next, %bb12 ] ; [#uses=2] - %tmp117 = shl i32 %indvar, 2 ; [#uses=1] - %scevgep118 = getelementptr i8* %228, i32 %tmp117 ; [#uses=1] - %p.0 = bitcast i8* %scevgep118 to %struct.dwarf_fde** ; <%struct.dwarf_fde**> [#uses=1] - %231 = load %struct.dwarf_fde** %p.0, align 4 ; <%struct.dwarf_fde*> [#uses=2] - %232 = icmp eq %struct.dwarf_fde* %231, null ; [#uses=1] - br i1 %232, label %bb16, label %bb10 - -bb15: ; preds = %bb8 - call void @llvm.dbg.stoppoint(i32 966, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %233 = load %struct.dwarf_fde** %226, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %234 = call arm_apcscc %struct.dwarf_fde* @linear_search_fdes(%struct.object* %ob, %struct.dwarf_fde* %233, i8* %pc) ; <%struct.dwarf_fde*> [#uses=1] - ret %struct.dwarf_fde* %234 - -bb16: ; preds = %bb13, %bb10, %init_object.exit - %.0 = phi %struct.dwarf_fde* [ null, %init_object.exit ], [ %229, %bb10 ], [ null, %bb13 ] ; <%struct.dwarf_fde*> [#uses=1] - call void @llvm.dbg.stoppoint(i32 966, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret %struct.dwarf_fde* %.0 -} - -define arm_apcscc %struct.dwarf_fde* @_Unwind_Find_FDE(i8* %pc, %struct.dwarf_eh_bases* nocapture %bases) { -entry: - %func = alloca i32, align 4 ; [#uses=2] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram297 to { }*)) - call void @llvm.dbg.stoppoint(i32 977, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - call void @llvm.dbg.stoppoint(i32 982, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram166 to { }*)) - br label %bb3 - -bb: ; preds = %bb3 - %0 = getelementptr %struct.object* %ob.0, i32 0, i32 0 ; [#uses=1] - %1 = load i8** %0, align 4 ; [#uses=1] - %2 = icmp ugt i8* %1, %pc ; [#uses=1] - br i1 %2, label %bb2, label %bb1 - -bb1: ; preds = %bb - call void @llvm.dbg.stoppoint(i32 985, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %3 = call arm_apcscc %struct.dwarf_fde* @search_object(%struct.object* %ob.0, i8* %pc) ; <%struct.dwarf_fde*> [#uses=3] - call void @llvm.dbg.stoppoint(i32 986, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %4 = icmp eq %struct.dwarf_fde* %3, null ; [#uses=1] - br i1 %4, label %bb9, label %fini - -bb2: ; preds = %bb - %5 = getelementptr %struct.object* %ob.0, i32 0, i32 5 ; <%struct.object**> [#uses=1] - br label %bb3 - -bb3: ; preds = %bb2, %entry - %ob.0.in = phi %struct.object** [ @seen_objects, %entry ], [ %5, %bb2 ] ; <%struct.object**> [#uses=1] - %ob.0 = load %struct.object** %ob.0.in ; <%struct.object*> [#uses=5] - %6 = icmp eq %struct.object* %ob.0, null ; [#uses=1] - br i1 %6, label %bb9, label %bb - -bb4: ; preds = %bb9 - %7 = getelementptr %struct.object* %19, i32 0, i32 5 ; <%struct.object**> [#uses=2] - %8 = load %struct.object** %7, align 4 ; <%struct.object*> [#uses=1] - store %struct.object* %8, %struct.object** @unseen_objects, align 4 - %9 = call arm_apcscc %struct.dwarf_fde* @search_object(%struct.object* %19, i8* %pc) ; <%struct.dwarf_fde*> [#uses=3] - %10 = getelementptr %struct.object* %19, i32 0, i32 0 ; [#uses=1] - br label %bb7 - -bb5: ; preds = %bb7 - %11 = getelementptr %struct.object* %16, i32 0, i32 0 ; [#uses=1] - %12 = load i8** %11, align 4 ; [#uses=1] - %13 = load i8** %10, align 4 ; [#uses=1] - %14 = icmp ult i8* %12, %13 ; [#uses=1] - br i1 %14, label %bb8, label %bb6 - -bb6: ; preds = %bb5 - %15 = getelementptr %struct.object* %16, i32 0, i32 5 ; <%struct.object**> [#uses=1] - br label %bb7 - -bb7: ; preds = %bb6, %bb4 - %p.0 = phi %struct.object** [ @seen_objects, %bb4 ], [ %15, %bb6 ] ; <%struct.object**> [#uses=2] - %16 = load %struct.object** %p.0, align 4 ; <%struct.object*> [#uses=4] - %17 = icmp eq %struct.object* %16, null ; [#uses=1] - br i1 %17, label %bb8, label %bb5 - -bb8: ; preds = %bb7, %bb5 - store %struct.object* %16, %struct.object** %7, align 4 - store %struct.object* %19, %struct.object** %p.0, align 4 - %18 = icmp eq %struct.dwarf_fde* %9, null ; [#uses=1] - br i1 %18, label %bb9, label %fini - -bb9: ; preds = %bb8, %bb3, %bb1 - %f.0 = phi %struct.dwarf_fde* [ %9, %bb8 ], [ %3, %bb1 ], [ null, %bb3 ] ; <%struct.dwarf_fde*> [#uses=1] - %19 = load %struct.object** @unseen_objects, align 4 ; <%struct.object*> [#uses=7] - %20 = icmp eq %struct.object* %19, null ; [#uses=1] - br i1 %20, label %fini, label %bb4 - -fini: ; preds = %bb9, %bb8, %bb1 - %f.1 = phi %struct.dwarf_fde* [ %3, %bb1 ], [ %9, %bb8 ], [ %f.0, %bb9 ] ; <%struct.dwarf_fde*> [#uses=5] - %ob.1 = phi %struct.object* [ %ob.0, %bb1 ], [ %19, %bb9 ], [ %19, %bb8 ] ; <%struct.object*> [#uses=3] - call void @llvm.dbg.stoppoint(i32 1011, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - call void @llvm.dbg.stoppoint(i32 1013, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - %21 = icmp eq %struct.dwarf_fde* %f.1, null ; [#uses=1] - br i1 %21, label %bb13, label %bb10 - -bb10: ; preds = %fini - call void @llvm.dbg.stoppoint(i32 1018, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %22 = getelementptr %struct.object* %ob.1, i32 0, i32 1 ; [#uses=2] - %23 = load i8** %22, align 4 ; [#uses=1] - %24 = getelementptr %struct.dwarf_eh_bases* %bases, i32 0, i32 0 ; [#uses=1] - store i8* %23, i8** %24, align 4 - call void @llvm.dbg.stoppoint(i32 1019, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %25 = getelementptr %struct.object* %ob.1, i32 0, i32 2 ; [#uses=2] - %26 = load i8** %25, align 4 ; [#uses=1] - %27 = getelementptr %struct.dwarf_eh_bases* %bases, i32 0, i32 1 ; [#uses=1] - store i8* %26, i8** %27, align 4 - call void @llvm.dbg.stoppoint(i32 1021, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %28 = getelementptr %struct.object* %ob.1, i32 0, i32 4, i32 0 ; [#uses=1] - %29 = load i32* %28 ; [#uses=2] - %30 = lshr i32 %29, 3 ; [#uses=1] - %31 = and i32 %30, 255 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 1022, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %32 = and i32 %29, 4 ; [#uses=1] - %33 = icmp eq i32 %32, 0 ; [#uses=1] - br i1 %33, label %bb12, label %bb11 - -bb11: ; preds = %bb10 - call void @llvm.dbg.stoppoint(i32 1023, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram248 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 312, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 163, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*)) nounwind - %34 = getelementptr %struct.dwarf_fde* %f.1, i32 0, i32 1 ; [#uses=2] - %35 = bitcast i32* %34 to i8* ; [#uses=1] - %36 = load i32* %34, align 1 ; [#uses=1] - %37 = sub i32 0, %36 ; [#uses=1] - %38 = getelementptr i8* %35, i32 %37 ; [#uses=1] - %39 = bitcast i8* %38 to %struct.dwarf_cie* ; <%struct.dwarf_cie*> [#uses=1] - %40 = call arm_apcscc i32 @get_cie_encoding(%struct.dwarf_cie* %39) nounwind ; [#uses=1] - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram76 to { }*)) nounwind - br label %bb12 - -bb12: ; preds = %bb11, %bb10 - %encoding.0 = phi i32 [ %40, %bb11 ], [ %31, %bb10 ] ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 1024, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %41 = trunc i32 %encoding.0 to i8 ; [#uses=2] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) nounwind - call void @llvm.dbg.stoppoint(i32 242, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %42 = icmp eq i8 %41, -1 ; [#uses=1] - br i1 %42, label %base_from_object.exit, label %bb1.i - -bb1.i: ; preds = %bb12 - call void @llvm.dbg.stoppoint(i32 245, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %43 = and i32 %encoding.0, 112 ; [#uses=1] - switch i32 %43, label %bb5.i [ - i32 0, label %base_from_object.exit - i32 16, label %base_from_object.exit - i32 32, label %bb3.i - i32 48, label %bb4.i - i32 80, label %base_from_object.exit - ] - -bb3.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 253, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %44 = load i8** %22, align 4 ; [#uses=1] - %45 = ptrtoint i8* %44 to i32 ; [#uses=1] - br label %base_from_object.exit - -bb4.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 255, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %46 = load i8** %25, align 4 ; [#uses=1] - %47 = ptrtoint i8* %46 to i32 ; [#uses=1] - br label %base_from_object.exit - -bb5.i: ; preds = %bb1.i - call void @llvm.dbg.stoppoint(i32 257, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - call arm_apcscc void @abort() noreturn nounwind - unreachable - -base_from_object.exit: ; preds = %bb4.i, %bb3.i, %bb1.i, %bb1.i, %bb1.i, %bb12 - %48 = phi i32 [ %47, %bb4.i ], [ %45, %bb3.i ], [ 0, %bb12 ], [ 0, %bb1.i ], [ 0, %bb1.i ], [ 0, %bb1.i ] ; [#uses=1] - %49 = getelementptr %struct.dwarf_fde* %f.1, i32 0, i32 2, i32 0 ; [#uses=1] - %50 = call arm_apcscc i8* @read_encoded_value_with_base(i8 zeroext %41, i32 %48, i8* %49, i32* %func) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 1026, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram231 to { }*)) - %51 = load i32* %func, align 4 ; [#uses=1] - %52 = inttoptr i32 %51 to i8* ; [#uses=1] - %53 = getelementptr %struct.dwarf_eh_bases* %bases, i32 0, i32 2 ; [#uses=1] - store i8* %52, i8** %53, align 4 - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram297 to { }*)) - ret %struct.dwarf_fde* %f.1 - -bb13: ; preds = %fini - call void @llvm.dbg.stoppoint(i32 1029, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret %struct.dwarf_fde* %f.1 -} - -define arm_apcscc i8* @__deregister_frame_info_bases(i8* %begin) nounwind { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram301 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 180, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = icmp eq i8* %begin, null ; [#uses=1] - br i1 %0, label %bb17, label %bb - -bb: ; preds = %entry - %1 = bitcast i8* %begin to i32* ; [#uses=1] - %2 = load i32* %1, align 4 ; [#uses=1] - %3 = icmp eq i32 %2, 0 ; [#uses=1] - br i1 %3, label %bb17, label %bb6 - -bb3: ; preds = %bb6 - %4 = getelementptr %struct.object* %10, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=1] - %5 = load %struct.dwarf_fde** %4, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %6 = bitcast %struct.dwarf_fde* %5 to i8* ; [#uses=1] - %7 = icmp eq i8* %6, %begin ; [#uses=1] - %8 = getelementptr %struct.object* %10, i32 0, i32 5 ; <%struct.object**> [#uses=2] - br i1 %7, label %bb4, label %bb6 - -bb4: ; preds = %bb3 - tail call void @llvm.dbg.stoppoint(i32 190, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %9 = load %struct.object** %8, align 4 ; <%struct.object*> [#uses=1] - store %struct.object* %9, %struct.object** %p.0, align 4 - br label %out - -bb6: ; preds = %bb3, %bb - %p.0 = phi %struct.object** [ @unseen_objects, %bb ], [ %8, %bb3 ] ; <%struct.object**> [#uses=2] - %10 = load %struct.object** %p.0, align 4 ; <%struct.object*> [#uses=4] - %11 = icmp eq %struct.object* %10, null ; [#uses=1] - br i1 %11, label %bb14, label %bb3 - -bb8: ; preds = %bb14 - %12 = getelementptr %struct.object* %30, i32 0, i32 4, i32 0 ; [#uses=1] - %13 = load i32* %12 ; [#uses=1] - %14 = and i32 %13, 1 ; [#uses=1] - %15 = icmp eq i32 %14, 0 ; [#uses=1] - %16 = getelementptr %struct.object* %30, i32 0, i32 3, i32 0 ; <%struct.dwarf_fde**> [#uses=3] - br i1 %15, label %bb11, label %bb9 - -bb9: ; preds = %bb8 - %17 = load %struct.dwarf_fde** %16 ; <%struct.dwarf_fde*> [#uses=1] - %18 = bitcast %struct.dwarf_fde* %17 to i8** ; [#uses=1] - %19 = load i8** %18, align 4 ; [#uses=1] - %20 = icmp eq i8* %19, %begin ; [#uses=1] - br i1 %20, label %bb10, label %bb13 - -bb10: ; preds = %bb9 - tail call void @llvm.dbg.stoppoint(i32 200, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %21 = getelementptr %struct.object* %30, i32 0, i32 5 ; <%struct.object**> [#uses=1] - %22 = load %struct.object** %21, align 4 ; <%struct.object*> [#uses=1] - store %struct.object* %22, %struct.object** %p.1, align 4 - tail call void @llvm.dbg.stoppoint(i32 201, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %23 = load %struct.dwarf_fde** %16 ; <%struct.dwarf_fde*> [#uses=1] - free %struct.dwarf_fde* %23 - br label %out - -bb11: ; preds = %bb8 - %24 = load %struct.dwarf_fde** %16, align 4 ; <%struct.dwarf_fde*> [#uses=1] - %25 = bitcast %struct.dwarf_fde* %24 to i8* ; [#uses=1] - %26 = icmp eq i8* %25, %begin ; [#uses=1] - br i1 %26, label %bb12, label %bb13 - -bb12: ; preds = %bb11 - tail call void @llvm.dbg.stoppoint(i32 210, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %27 = getelementptr %struct.object* %30, i32 0, i32 5 ; <%struct.object**> [#uses=1] - %28 = load %struct.object** %27, align 4 ; <%struct.object*> [#uses=1] - store %struct.object* %28, %struct.object** %p.1, align 4 - br label %out - -bb13: ; preds = %bb11, %bb9 - %29 = getelementptr %struct.object* %30, i32 0, i32 5 ; <%struct.object**> [#uses=1] - br label %bb14 - -bb14: ; preds = %bb13, %bb6 - %p.1 = phi %struct.object** [ %29, %bb13 ], [ @seen_objects, %bb6 ] ; <%struct.object**> [#uses=3] - %30 = load %struct.object** %p.1, align 4 ; <%struct.object*> [#uses=8] - %31 = icmp eq %struct.object* %30, null ; [#uses=1] - br i1 %31, label %bb15, label %bb8 - -out: ; preds = %bb12, %bb10, %bb4 - %ob.0 = phi %struct.object* [ %10, %bb4 ], [ %30, %bb10 ], [ %30, %bb12 ] ; <%struct.object*> [#uses=2] - tail call void @llvm.dbg.stoppoint(i32 216, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 217, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram168 to { }*)) - %32 = icmp eq %struct.object* %ob.0, null ; [#uses=1] - br i1 %32, label %bb15, label %bb16 - -bb15: ; preds = %out, %bb14 - tail call void @llvm.dbg.stoppoint(i32 217, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call arm_apcscc void @abort() noreturn nounwind - unreachable - -bb16: ; preds = %out - tail call void @llvm.dbg.stoppoint(i32 218, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %33 = bitcast %struct.object* %ob.0 to i8* ; [#uses=1] - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram301 to { }*)) - ret i8* %33 - -bb17: ; preds = %bb, %entry - tail call void @llvm.dbg.stoppoint(i32 218, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret i8* null -} - -define arm_apcscc i8* @__deregister_frame_info(i8* %begin) nounwind { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram303 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 224, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = tail call arm_apcscc i8* @__deregister_frame_info_bases(i8* %begin) ; [#uses=1] - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram303 to { }*)) - ret i8* %0 -} - -define arm_apcscc void @__deregister_frame(i8* %begin) nounwind { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram305 to { }*)) - tail call void @llvm.dbg.stoppoint(i32 231, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = bitcast i8* %begin to i32* ; [#uses=1] - %1 = load i32* %0, align 4 ; [#uses=1] - %2 = icmp eq i32 %1, 0 ; [#uses=1] - br i1 %2, label %return, label %bb - -bb: ; preds = %entry - tail call void @llvm.dbg.stoppoint(i32 232, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram303 to { }*)) nounwind - tail call void @llvm.dbg.stoppoint(i32 224, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) nounwind - %3 = tail call arm_apcscc i8* @__deregister_frame_info_bases(i8* %begin) nounwind ; [#uses=1] - free i8* %3 - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram305 to { }*)) - ret void - -return: ; preds = %entry - tail call void @llvm.dbg.stoppoint(i32 233, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret void -} From clattner at apple.com Tue Jul 21 01:36:21 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 20 Jul 2009 23:36:21 -0700 Subject: [llvm-commits] [PATCH] StringRef class. In-Reply-To: <6a8523d60907201705y5221663bi48a2042bdeb5bc58@mail.gmail.com> References: <6a8523d60907201705y5221663bi48a2042bdeb5bc58@mail.gmail.com> Message-ID: <23AF8E62-D807-4B5D-BEA0-1BE403D5BA5B@apple.com> On Jul 20, 2009, at 5:05 PM, Daniel Dunbar wrote: > Hi, > > The attached patch provides a new StringRef helper class, which is > used to represent a constant string (pointer & length) which is not > owned. Great, thanks for working on this! + /// StringRef - Represent a constant reference to a string, i.e. a character + /// array and a length. + /// + /// This class does not own the string data, it is expected to be used in + /// situations where the character data resides in some other buffer, whose + /// lifetime extends past that of the StringRef. For this reason, it is not in + /// general safe to store a StringRef. Please also mention that the stringref is not necessarily nul- terminated. + /// Construct a string ref from a cstring. + /*implicit*/ StringRef(const char *Str) + : Data(Str), Length(::strlen(Str)) {} No magic array template version that avoids strlen? :) Instead of: + const char *begin() const { return Data; } + const char *end() const { return Data + Length; } How about: + iterator begin() const { return Data; } + iterator end() const { return Data + Length; } + /// size - Get the string size. + unsigned size() const { return Length; } + + /// length - Get the string size. + unsigned length() const { return Length; } I don't see a reason to have length(), lets just go with size(), which is more standard. + int compare(const StringRef &RHS) const { + // Check the prefix for a mismatch. + if (int Res = memcmp(Data, RHS.Data, std::min(Length, RHS.Length))) + return Res; Is memcmp guaranteed to return -1/0/1? I thought it was just "negative, 0, positive"? This will foul up your operator<. + bool operator==(const StringRef &RHS) const { return compare(RHS) == 0; } + bool operator!=(const StringRef &RHS) const { return compare(RHS) != 0; } These are expensive equality checks. For equality (but not ordering), you can do a quick reject based on the string length. + bool operator<(const StringRef &RHS) const { return compare(RHS) == -1; } No >, <=, etc? Otherwise, looks great. Thanks Daniel! Bonus points if you actually change the Value "name" apis to use it. :) -Chris From bruno.cardoso at gmail.com Tue Jul 21 01:51:32 2009 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Tue, 21 Jul 2009 06:51:32 -0000 Subject: [llvm-commits] [llvm] r76540 - in /llvm/trunk/lib: CodeGen/ELFCodeEmitter.cpp CodeGen/ELFWriter.cpp CodeGen/ELFWriter.h Target/X86/X86ELFWriterInfo.cpp Message-ID: <200907210651.n6L6pWs8001274@zion.cs.uiuc.edu> Author: bruno Date: Tue Jul 21 01:51:32 2009 New Revision: 76540 URL: http://llvm.org/viewvc/llvm-project?rev=76540&view=rev Log: Support adding relocations for data sections, handling the cases where global declared symbols are initialized with references from other global symbols. Modified: llvm/trunk/lib/CodeGen/ELFCodeEmitter.cpp llvm/trunk/lib/CodeGen/ELFWriter.cpp llvm/trunk/lib/CodeGen/ELFWriter.h llvm/trunk/lib/Target/X86/X86ELFWriterInfo.cpp Modified: llvm/trunk/lib/CodeGen/ELFCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ELFCodeEmitter.cpp?rev=76540&r1=76539&r2=76540&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/ELFCodeEmitter.cpp (original) +++ llvm/trunk/lib/CodeGen/ELFCodeEmitter.cpp Tue Jul 21 01:51:32 2009 @@ -68,6 +68,10 @@ FnSym->SectionIdx = ES->SectionIdx; FnSym->Size = ES->getCurrentPCOffset()-FnStartOff; + // keep track of the emitted function leaving its symbol index as zero + // to be patched up later when emitting the symbol table + EW.setGlobalSymLookup(F, 0); + // Offset from start of Section FnSym->Value = FnStartOff; Modified: llvm/trunk/lib/CodeGen/ELFWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ELFWriter.cpp?rev=76540&r1=76539&r2=76540&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/ELFWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/ELFWriter.cpp Tue Jul 21 01:51:32 2009 @@ -240,30 +240,31 @@ // isELFBssSym - for an undef or null value, the symbol must go to a bss // section if it's not weak for linker, otherwise it's a common sym. -static bool isELFBssSym(const GlobalValue *GV) { - return (!GV->isDeclaration() && - (GV->isNullValue() || isa(GV)) && - !GV->isWeakForLinker()); +static bool isELFBssSym(const GlobalVariable *GV) { + const Constant *CV = GV->getInitializer(); + return ((CV->isNullValue() || isa(CV)) && !GV->isWeakForLinker()); } // isELFCommonSym - for an undef or null value, the symbol must go to a // common section if it's weak for linker, otherwise bss. -static bool isELFCommonSym(const GlobalValue *GV) { - return (!GV->isDeclaration() && - (GV->isNullValue() || isa(GV)) - && GV->isWeakForLinker()); +static bool isELFCommonSym(const GlobalVariable *GV) { + const Constant *CV = GV->getInitializer(); + return ((CV->isNullValue() || isa(CV)) && GV->isWeakForLinker()); } // isELFDataSym - if the symbol is an initialized but no null constant // it must go to some kind of data section gathered from TAI -static bool isELFDataSym(const GlobalValue *GV) { - return (!GV->isDeclaration() && - !(GV->isNullValue() || isa(GV))); +static bool isELFDataSym(const Constant *CV) { + return (!(CV->isNullValue() || isa(CV))); } // EmitGlobal - Choose the right section for global and emit it void ELFWriter::EmitGlobal(const GlobalValue *GV) { + // Check if the referenced symbol is already emitted + if (GblSymLookup.find(GV) != GblSymLookup.end()) + return; + // Handle ELF Bind, Visibility and Type for the current symbol unsigned SymBind = getGlobalELFBinding(GV); ELFSym *GblSym = new ELFSym(GV); @@ -287,7 +288,7 @@ unsigned Size = TD->getTypeAllocSize(GVar->getInitializer()->getType()); GblSym->Size = Size; - if (isELFCommonSym(GV)) { + if (isELFCommonSym(GVar)) { GblSym->SectionIdx = ELFSection::SHN_COMMON; getSection(S->getName(), ELFSection::SHT_NOBITS, SectionFlags, 1); @@ -296,7 +297,7 @@ // value contains its alignment. GblSym->Value = Align; - } else if (isELFBssSym(GV)) { + } else if (isELFBssSym(GVar)) { ELFSection &ES = getSection(S->getName(), ELFSection::SHT_NOBITS, SectionFlags); GblSym->SectionIdx = ES.SectionIdx; @@ -336,7 +337,7 @@ SymbolList.push_back(GblSym); } - GblSymLookup[GV] = SymIdx; + setGlobalSymLookup(GV, SymIdx); } void ELFWriter::EmitGlobalConstantStruct(const ConstantStruct *CVS, @@ -410,8 +411,37 @@ for (unsigned I = 0, E = PTy->getNumElements(); I < E; ++I) EmitGlobalConstant(CP->getOperand(I), GblS); return; + } else if (const GlobalValue *GV = dyn_cast(CV)) { + // This is a constant address for a global variable or function and + // therefore must be referenced using a relocation entry. + + // Check if the referenced symbol is already emitted + if (GblSymLookup.find(GV) == GblSymLookup.end()) + EmitGlobal(GV); + + // Create the relocation entry for the global value + MachineRelocation MR = + MachineRelocation::getGV(GblS.getCurrentPCOffset(), + TEW->getAbsoluteLabelMachineRelTy(), + const_cast(GV)); + + // Fill the data entry with zeros + for (unsigned i=0; i < Size; ++i) + GblS.emitByte(0); + + // Add the relocation entry for the current data section + GblS.addRelocation(MR); + return; + } else if (const ConstantExpr *CE = dyn_cast(CV)) { + if (CE->getOpcode() == Instruction::BitCast) { + EmitGlobalConstant(CE->getOperand(0), GblS); + return; + } + // See AsmPrinter::EmitConstantValueOnly for other ConstantExpr types + llvm_unreachable("Unsupported ConstantExpr type"); } - llvm_unreachable("unknown global constant"); + + llvm_unreachable("Unknown global constant type"); } @@ -431,19 +461,13 @@ // Build and emit data, bss and "common" sections. for (Module::global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) { + I != E; ++I) EmitGlobal(I); - } // Emit all pending globals - // TODO: this should be done only for referenced symbols for (SetVector::const_iterator I = PendingGlobals.begin(), - E = PendingGlobals.end(); I != E; ++I) { - // No need to emit the symbol again - if (GblSymLookup.find(*I) != GblSymLookup.end()) - continue; + E = PendingGlobals.end(); I != E; ++I) EmitGlobal(*I); - } // Emit non-executable stack note if (TAI->getNonexecutableStackDirective()) @@ -731,7 +755,7 @@ EmitSymbol(SymTab, Sym); // Record the symbol table index for each global value - if (Sym.GV) GblSymLookup[Sym.GV] = i; + if (Sym.GV) setGlobalSymLookup(Sym.GV, i); // Keep track on the symbol index into the symbol table Sym.SymTabIdx = i; Modified: llvm/trunk/lib/CodeGen/ELFWriter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ELFWriter.h?rev=76540&r1=76539&r2=76540&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/ELFWriter.h (original) +++ llvm/trunk/lib/CodeGen/ELFWriter.h Tue Jul 21 01:51:32 2009 @@ -211,6 +211,11 @@ unsigned getGlobalELFVisibility(const GlobalValue *GV); unsigned getElfSectionFlags(unsigned Flags); + // setGlobalSymLookup - Set global value 'GV' with 'Index' in the lookup map + void setGlobalSymLookup(const GlobalValue *GV, unsigned Index) { + GblSymLookup[GV] = Index; + } + // As we complete the ELF file, we need to update fields in the ELF header // (e.g. the location of the section table). These members keep track of // the offset in ELFHeader of these various pieces to update and other Modified: llvm/trunk/lib/Target/X86/X86ELFWriterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ELFWriterInfo.cpp?rev=76540&r1=76539&r2=76540&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ELFWriterInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ELFWriterInfo.cpp Tue Jul 21 01:51:32 2009 @@ -64,7 +64,9 @@ if (is64Bit) { switch(RelTy) { case R_X86_64_PC32: return -4; - case R_X86_64_32: return 0; + case R_X86_64_32: + case R_X86_64_64: + return 0; default: llvm_unreachable("unknown x86_64 relocation type"); } From daniel at zuster.org Tue Jul 21 02:08:59 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 07:08:59 -0000 Subject: [llvm-commits] [llvm] r76541 - /llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Message-ID: <200907210708.n6L78xlF001979@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Jul 21 02:08:59 2009 New Revision: 76541 URL: http://llvm.org/viewvc/llvm-project?rev=76541&view=rev Log: Remove some unused code. Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=76541&r1=76540&r2=76541&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Tue Jul 21 02:08:59 2009 @@ -51,10 +51,7 @@ bool X86ATTAsmParser::ParseInstruction(MCAsmParser &AP, const char *Name, MCInst &Inst) { - MCAsmLexer &Lexer = AP.getLexer(); llvm::SmallVector Operands; - (void) Lexer; - (void) Operands; return MatchInstruction(Name, Operands, Inst); } From edwintorok at gmail.com Tue Jul 21 02:09:05 2009 From: edwintorok at gmail.com (Torok Edwin) Date: Tue, 21 Jul 2009 07:09:05 -0000 Subject: [llvm-commits] [llvm] r76542 - /llvm/trunk/unittests/ADT/StringMapTest.cpp Message-ID: <200907210709.n6L795jW001995@zion.cs.uiuc.edu> Author: edwin Date: Tue Jul 21 02:09:05 2009 New Revision: 76542 URL: http://llvm.org/viewvc/llvm-project?rev=76542&view=rev Log: unbreak unit-tests on gcc-4.4. Modified: llvm/trunk/unittests/ADT/StringMapTest.cpp Modified: llvm/trunk/unittests/ADT/StringMapTest.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/StringMapTest.cpp?rev=76542&r1=76541&r2=76542&view=diff ============================================================================== --- llvm/trunk/unittests/ADT/StringMapTest.cpp (original) +++ llvm/trunk/unittests/ADT/StringMapTest.cpp Tue Jul 21 02:09:05 2009 @@ -9,6 +9,7 @@ #include "gtest/gtest.h" #include "llvm/ADT/StringMap.h" +#include "llvm/Support/DataTypes.h" using namespace llvm; namespace { From edwintorok at gmail.com Tue Jul 21 02:18:00 2009 From: edwintorok at gmail.com (=?ISO-8859-1?Q?T=F6r=F6k_Edwin?=) Date: Tue, 21 Jul 2009 10:18:00 +0300 Subject: [llvm-commits] [PATCH] poison freed memory in DenseMap.h Message-ID: <4A656BA8.8080801@gmail.com> Hi, Attached patch helps finding bugs such as PR4575 in !NDEBUG mode, because it makes it reproducible. Ok to commit? Best regards, --Edwin -------------- next part -------------- A non-text attachment was scrubbed... Name: poison.patch Type: text/x-diff Size: 1405 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090721/c0a28b4e/attachment.bin From daniel at zuster.org Tue Jul 21 02:28:42 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 00:28:42 -0700 Subject: [llvm-commits] [PATCH] StringRef class. In-Reply-To: <23AF8E62-D807-4B5D-BEA0-1BE403D5BA5B@apple.com> References: <6a8523d60907201705y5221663bi48a2042bdeb5bc58@mail.gmail.com> <23AF8E62-D807-4B5D-BEA0-1BE403D5BA5B@apple.com> Message-ID: <6a8523d60907210028l61206b49qebba872dae614534@mail.gmail.com> On Mon, Jul 20, 2009 at 11:36 PM, Chris Lattner wrote: > + ?/// StringRef - Represent a constant reference to a string, i.e. a > character > + ?/// array and a length. > + ?/// > + ?/// This class does not own the string data, it is expected to be > used in > + ?/// situations where the character data resides in some other > buffer, whose > + ?/// lifetime extends past that of the StringRef. For this reason, > it is not in > + ?/// general safe to store a StringRef. > > Please also mention that the stringref is not necessarily nul- > terminated. Good point, added here and to the data() method. > + ? ?/// Construct a string ref from a cstring. > + ? ?/*implicit*/ StringRef(const char *Str) > + ? ? ?: Data(Str), Length(::strlen(Str)) {} > > No magic array template version that avoids strlen? :) No, I don't think its possible to do this and have a method which takes a const char*. > > Instead of: > > + ? ?const char *begin() const { return Data; } > + ? ?const char *end() const { return Data + Length; } > > How about: > > + ? ?iterator begin() const { return Data; } > + ? ?iterator end() const { return Data + Length; } Yup! > + ? ?/// size - Get the string size. > + ? ?unsigned size() const { return Length; } > + > + ? ?/// length - Get the string size. > + ? ?unsigned length() const { return Length; } > > I don't see a reason to have length(), lets just go with size(), which > is more standard. Okay, removed. I added length just to match std::string. > + ? ?int compare(const StringRef &RHS) const { > + ? ? ?// Check the prefix for a mismatch. > + ? ? ?if (int Res = memcmp(Data, RHS.Data, std::min(Length, > RHS.Length))) > + ? ? ? ?return Res; > > Is memcmp guaranteed to return -1/0/1? ?I thought it was just > "negative, 0, positive"? ?This will foul up your operator<. Nice catch, of course I wrote my unit test with an ordinal difference of 1. Fixed to honor the comment; although we could also just follow memcmp semantics. > + ? ?bool operator==(const StringRef &RHS) const { return compare(RHS) > == 0; } > + ? ?bool operator!=(const StringRef &RHS) const { return > compare(RHS) != 0; } > > These are expensive equality checks. ?For equality (but not ordering), > you can do a quick reject based on the string length. Another nice catch, fixed. > + ? ?bool operator<(const StringRef &RHS) const { return compare(RHS) > == -1; } > > No >, <=, etc? Added; I wasn't sure if we had a policy on this. Thanks, - Daniel From daniel at zuster.org Tue Jul 21 02:28:51 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 07:28:51 -0000 Subject: [llvm-commits] [llvm] r76543 - in /llvm/trunk: include/llvm/ADT/StringRef.h unittests/ADT/StringRefTest.cpp Message-ID: <200907210728.n6L7SqXX002871@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Jul 21 02:28:51 2009 New Revision: 76543 URL: http://llvm.org/viewvc/llvm-project?rev=76543&view=rev Log: Add StringRef class, with fixes. Added: llvm/trunk/include/llvm/ADT/StringRef.h llvm/trunk/unittests/ADT/StringRefTest.cpp Added: llvm/trunk/include/llvm/ADT/StringRef.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=76543&view=auto ============================================================================== --- llvm/trunk/include/llvm/ADT/StringRef.h (added) +++ llvm/trunk/include/llvm/ADT/StringRef.h Tue Jul 21 02:28:51 2009 @@ -0,0 +1,127 @@ +//===--- StringRef.h - Constant String Reference Wrapper --------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_ADT_STRINGREF_H +#define LLVM_ADT_STRINGREF_H + +#include +#include + +namespace llvm { + /// StringRef - Represent a constant reference to a string, i.e. a character + /// array and a length, which need not be null terminated. + /// + /// This class does not own the string data, it is expected to be used in + /// situations where the character data resides in some other buffer, whose + /// lifetime extends past that of the StringRef. For this reason, it is not in + /// general safe to store a StringRef. + class StringRef { + public: + typedef const char *iterator; + + private: + /// The start of the string, in an external buffer. + const char *Data; + + /// The length of the string. + unsigned Length; + + public: + /// @name Constructors + /// @{ + + /// Construct an empty string ref. + /*implicit*/ StringRef() : Data(0), Length(0) {} + + /// Construct a string ref from a cstring. + /*implicit*/ StringRef(const char *Str) + : Data(Str), Length(::strlen(Str)) {} + + /// Construct a string ref from a pointer and length. + /*implicit*/ StringRef(const char *_Data, unsigned _Length) + : Data(_Data), Length(_Length) {} + + /// Construct a string ref from an std::string. + /*implicit*/ StringRef(const std::string &Str) + : Data(Str.c_str()), Length(Str.length()) {} + + /// @} + /// @name Iterators + /// @{ + + iterator begin() const { return Data; } + + iterator end() const { return Data + Length; } + + /// @} + /// @name String Operations + /// @{ + + /// data - Get a pointer to the start of the string (which may not be null + /// terminated). + const char *data() const { return Data; } + + /// empty - Check if the string is empty. + bool empty() const { return Length == 0; } + + /// size - Get the string size. + unsigned size() const { return Length; } + + /// compare - Compare two strings; the result is -1, 0, or 1 if this string + /// is lexicographically less than, equal to, or greater than the \arg RHS. + int compare(const StringRef &RHS) const { + // Check the prefix for a mismatch. + if (int Res = memcmp(Data, RHS.Data, std::min(Length, RHS.Length))) + return Res < 0 ? -1 : 1; + + // Otherwise the prefixes match, so we only need to check the lengths. + if (Length == RHS.Length) + return 0; + return Length < RHS.Length ? -1 : 1; + } + + /// str - Get the contents as an std::string. + std::string str() const { return std::string(Data, Length); } + + /// @} + /// @name Operator Overloads + /// @{ + + bool operator==(const StringRef &RHS) const { + return Length == RHS.Length && memcmp(Data, RHS.Data, Length) == 0; + } + + bool operator!=(const StringRef &RHS) const { return !(*this == RHS); } + + bool operator<(const StringRef &RHS) const { return compare(RHS) == -1; } + + bool operator<=(const StringRef &RHS) const { return compare(RHS) != 1; } + + bool operator>(const StringRef &RHS) const { return compare(RHS) == 1; } + + bool operator>=(const StringRef &RHS) const { return compare(RHS) != -1; } + + char operator[](size_t Index) const { + assert(Index < Length && "Invalid index!"); + return Data[Index]; + } + + /// @} + /// @name Type Conversions + /// @{ + + operator std::string() const { + return str(); + } + + /// @} + }; +} + +#endif Added: llvm/trunk/unittests/ADT/StringRefTest.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/StringRefTest.cpp?rev=76543&view=auto ============================================================================== --- llvm/trunk/unittests/ADT/StringRefTest.cpp (added) +++ llvm/trunk/unittests/ADT/StringRefTest.cpp Tue Jul 21 02:28:51 2009 @@ -0,0 +1,59 @@ +//===- llvm/unittest/ADT/StringRefTest.cpp - StringRef unit tests ---------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "gtest/gtest.h" +#include "llvm/ADT/StringRef.h" +using namespace llvm; + +namespace { + +TEST(StringRefTest, Construction) { + EXPECT_TRUE(StringRef() == ""); + EXPECT_TRUE(StringRef("hello") == "hello"); + EXPECT_TRUE(StringRef("hello world", 5) == "hello"); + EXPECT_TRUE(StringRef(std::string("hello")) == "hello"); +} + +TEST(StringRefTest, Iteration) { + StringRef S("hello"); + const char *p = "hello"; + for (const char *it = S.begin(), *ie = S.end(); it != ie; ++it, ++p) + EXPECT_TRUE(*p == *it); +} + +TEST(StringRefTest, StringOps) { + const char *p = "hello"; + EXPECT_EQ(p, StringRef(p, 0).data()); + EXPECT_TRUE(StringRef().empty()); + EXPECT_EQ((size_t) 5, StringRef("hello").size()); + EXPECT_EQ(-1, StringRef("aab").compare("aad")); + EXPECT_EQ( 0, StringRef("aab").compare("aab")); + EXPECT_EQ( 1, StringRef("aab").compare("aaa")); + EXPECT_EQ(-1, StringRef("aab").compare("aabb")); + EXPECT_EQ( 1, StringRef("aab").compare("aa")); +} + +TEST(StringRefTest, Operators) { + EXPECT_TRUE(StringRef() == ""); + EXPECT_TRUE(StringRef("aab") < StringRef("aad")); + EXPECT_FALSE(StringRef("aab") < StringRef("aab")); + EXPECT_TRUE(StringRef("aab") <= StringRef("aab")); + EXPECT_FALSE(StringRef("aab") <= StringRef("aaa")); + EXPECT_TRUE(StringRef("aad") > StringRef("aab")); + EXPECT_FALSE(StringRef("aab") > StringRef("aab")); + EXPECT_TRUE(StringRef("aab") >= StringRef("aab")); + EXPECT_FALSE(StringRef("aaa") >= StringRef("aab")); + EXPECT_TRUE(StringRef("aab") == StringRef("aab")); + EXPECT_FALSE(StringRef("aab") == StringRef("aac")); + EXPECT_FALSE(StringRef("aab") != StringRef("aab")); + EXPECT_TRUE(StringRef("aab") != StringRef("aac")); + EXPECT_EQ('a', StringRef("aab")[1]); +} + +} // end anonymous namespace From baldrick at free.fr Tue Jul 21 03:45:46 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 08:45:46 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r76551 - in /llvm-gcc-4.2/trunk/gcc: llvm-abi.h llvm-convert.cpp llvm-types.cpp Message-ID: <200907210845.n6L8jpiw013057@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 03:45:16 2009 New Revision: 76551 URL: http://llvm.org/viewvc/llvm-project?rev=76551&view=rev Log: Use "isa" rather than getTypeID. Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-abi.h?rev=76551&r1=76550&r2=76551&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-abi.h (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-abi.h Tue Jul 21 03:45:16 2009 @@ -378,7 +378,7 @@ void HandleReturnType(tree type, tree fn, bool isBuiltin) { unsigned Offset = 0; const Type *Ty = ConvertType(type); - if (Ty->getTypeID() == Type::VectorTyID) { + if (isa(Ty)) { // Vector handling is weird on x86. In particular builtin and // non-builtin function of the same return types can use different // calling conventions. @@ -444,7 +444,7 @@ const Type *PtrTy = PointerType::getUnqual(Ty); C.HandleByInvisibleReferenceArgument(PtrTy, type); ScalarElts.push_back(PtrTy); - } else if (Ty->getTypeID()==Type::VectorTyID) { + } else if (isa(Ty)) { if (LLVM_SHOULD_PASS_VECTOR_IN_INTEGER_REGS(type)) { PassInIntegerRegisters(type, Ty, ScalarElts, 0, false); } else if (LLVM_SHOULD_PASS_VECTOR_USING_BYVAL_ATTR(type)) { @@ -729,7 +729,7 @@ void HandleReturnType(tree type, tree fn, bool isBuiltin) { unsigned Offset = 0; const Type *Ty = ConvertType(type); - if (Ty->getTypeID() == Type::VectorTyID) { + if (isa(Ty)) { // Vector handling is weird on x86. In particular builtin and // non-builtin function of the same return types can use different // calling conventions. @@ -818,7 +818,7 @@ if (Attributes) { *Attributes |= Attr; } - } else if (Ty->getTypeID()==Type::VectorTyID) { + } else if (isa(Ty)) { if (LLVM_SHOULD_PASS_VECTOR_IN_INTEGER_REGS(type)) { PassInIntegerRegisters(type, Ty, ScalarElts, 0, false); } else if (LLVM_SHOULD_PASS_VECTOR_USING_BYVAL_ATTR(type)) { @@ -857,7 +857,7 @@ Attr |= Attribute::InReg; NumGPR = NumArgRegs; } - } else if (Ty->getTypeID() == Type::PointerTyID) { + } else if (isa(Ty)) { if (NumGPR < NumArgRegs) { NumGPR++; } else { @@ -865,8 +865,7 @@ } // We don't care about arguments passed in Floating-point or vector // registers. - } else if (!(Ty->isFloatingPoint() || - Ty->getTypeID() == Type::VectorTyID)) { + } else if (!(Ty->isFloatingPoint() || isa(Ty))) { abort(); } Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=76551&r1=76550&r2=76551&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Jul 21 03:45:16 2009 @@ -565,7 +565,7 @@ const Type *ArgTy = ConvertType(TREE_TYPE(Args)); bool isInvRef = isPassedByInvisibleReference(TREE_TYPE(Args)); if (isInvRef || - (ArgTy->getTypeID()==Type::VectorTyID && + (isa(ArgTy) && LLVM_SHOULD_PASS_VECTOR_USING_BYVAL_ATTR(TREE_TYPE(Args))) || (!ArgTy->isSingleValueType() && isPassedByVal(TREE_TYPE(Args), ArgTy, ScalarArgs, Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=76551&r1=76550&r2=76551&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Tue Jul 21 03:45:16 2009 @@ -801,7 +801,7 @@ // Restore ConvertingStruct for the caller. ConvertingStruct = false; - if (Actual->getTypeID() == Type::VoidTyID) + if (Actual == Type::VoidTy) Actual = Type::Int8Ty; // void* -> sbyte* // Update the type, potentially updating TYPE_LLVM(type). @@ -836,7 +836,7 @@ Ty = ConvertType(TREE_TYPE(type)); } - if (Ty->getTypeID() == Type::VoidTyID) + if (Ty == Type::VoidTy) Ty = Type::Int8Ty; // void* -> sbyte* return TypeDB.setType(type, Context.getPointerTypeUnqual(Ty)); } From daniel at zuster.org Tue Jul 21 03:54:36 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 08:54:36 -0000 Subject: [llvm-commits] [llvm] r76553 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/ExecutionEngine/ExecutionEngine.cpp lib/ExecutionEngine/JIT/JIT.cpp lib/ExecutionEngine/JIT/JITEmitter.cpp tools/llvm-prof/llvm-prof.cpp Message-ID: <200907210854.n6L8sosT013362@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Jul 21 03:54:24 2009 New Revision: 76553 URL: http://llvm.org/viewvc/llvm-project?rev=76553&view=rev Log: Simplify / normalize some uses of Value::getName. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp llvm/trunk/tools/llvm-prof/llvm-prof.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=76553&r1=76552&r2=76553&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Jul 21 03:54:24 2009 @@ -568,7 +568,7 @@ if (ViewDAGCombine1 || ViewLegalizeTypesDAGs || ViewLegalizeDAGs || ViewDAGCombine2 || ViewDAGCombineLT || ViewISelDAGs || ViewSchedDAGs || ViewSUnitDAGs) - BlockName = CurDAG->getMachineFunction().getFunction()->getName() + ':' + + BlockName = CurDAG->getMachineFunction().getFunction()->getName() + ":" + BB->getBasicBlock()->getName(); DOUT << "Initial selection DAG:\n"; Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=76553&r1=76552&r2=76553&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Tue Jul 21 03:54:24 2009 @@ -993,7 +993,7 @@ // External variable reference. Try to use the dynamic loader to // get a pointer to it. if (void *SymAddr = - sys::DynamicLibrary::SearchForAddressOfSymbol(I->getName().c_str())) + sys::DynamicLibrary::SearchForAddressOfSymbol(I->getName())) addGlobalMapping(I, SymAddr); else { llvm_report_error("Could not resolve external global address: " Modified: llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp?rev=76553&r1=76552&r2=76553&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp Tue Jul 21 03:54:24 2009 @@ -686,7 +686,7 @@ if (GV->getName() == "__dso_handle") return (void*)&__dso_handle; #endif - Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(GV->getName().c_str()); + Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(GV->getName()); if (Ptr == 0 && !areDlsymStubsEnabled()) { llvm_report_error("Could not resolve external global address: " +GV->getName()); Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp?rev=76553&r1=76552&r2=76553&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Tue Jul 21 03:54:24 2009 @@ -1432,7 +1432,7 @@ SmallVector Offsets; for (unsigned i = 0; i != GVs.size(); ++i) { Offsets.push_back(offset); - offset += GVs[i]->getName().length() + 1; + offset += GVs[i]->getName().size() + 1; } for (StringMapConstIterator i = ExtFns.begin(), e = ExtFns.end(); i != e; ++i) { Modified: llvm/trunk/tools/llvm-prof/llvm-prof.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-prof/llvm-prof.cpp?rev=76553&r1=76552&r2=76553&view=diff ============================================================================== --- llvm/trunk/tools/llvm-prof/llvm-prof.cpp (original) +++ llvm/trunk/tools/llvm-prof/llvm-prof.cpp Tue Jul 21 03:54:24 2009 @@ -185,7 +185,7 @@ std::cout << std::setw(3) << i+1 << ". " << std::setw(5) << FunctionCounts[i].second << "/" << TotalExecutions << " " - << FunctionCounts[i].first->getName().c_str() << "\n"; + << FunctionCounts[i].first->getName() << "\n"; } std::set FunctionsToPrint; @@ -219,8 +219,8 @@ << Counts[i].second/(double)TotalExecutions*100 << "% " << std::setw(5) << Counts[i].second << "/" << TotalExecutions << "\t" - << F->getName().c_str() << "() - " - << Counts[i].first->getName().c_str() << "\n"; + << F->getName() << "() - " + << Counts[i].first->getName() << "\n"; FunctionsToPrint.insert(F); } From daniel at zuster.org Tue Jul 21 03:57:43 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 08:57:43 -0000 Subject: [llvm-commits] [llvm] r76554 - in /llvm/trunk/lib/Target/MSIL: MSILWriter.cpp MSILWriter.h Message-ID: <200907210857.n6L8vkP7013530@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Jul 21 03:57:31 2009 New Revision: 76554 URL: http://llvm.org/viewvc/llvm-project?rev=76554&view=rev Log: Switch this API to StringRef. Modified: llvm/trunk/lib/Target/MSIL/MSILWriter.cpp llvm/trunk/lib/Target/MSIL/MSILWriter.h Modified: llvm/trunk/lib/Target/MSIL/MSILWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSIL/MSILWriter.cpp?rev=76554&r1=76553&r2=76554&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSIL/MSILWriter.cpp (original) +++ llvm/trunk/lib/Target/MSIL/MSILWriter.cpp Tue Jul 21 03:57:31 2009 @@ -1619,17 +1619,18 @@ const char* MSILWriter::getLibraryName(const Function* F) { - return getLibraryForSymbol(F->getName().c_str(), true, F->getCallingConv()); + return getLibraryForSymbol(F->getName(), true, F->getCallingConv()); } const char* MSILWriter::getLibraryName(const GlobalVariable* GV) { - return getLibraryForSymbol(Mang->getMangledName(GV).c_str(), false, 0); + return getLibraryForSymbol(Mang->getMangledName(GV), false, 0); } -const char* MSILWriter::getLibraryForSymbol(const char* Name, bool isFunction, - unsigned CallingConv) { +const char* MSILWriter::getLibraryForSymbol(const StringRef &Name, + bool isFunction, + unsigned CallingConv) { // TODO: Read *.def file with function and libraries definitions. return "MSVCRT.DLL"; } Modified: llvm/trunk/lib/Target/MSIL/MSILWriter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSIL/MSILWriter.h?rev=76554&r1=76553&r2=76554&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSIL/MSILWriter.h (original) +++ llvm/trunk/lib/Target/MSIL/MSILWriter.h Tue Jul 21 03:57:31 2009 @@ -252,7 +252,7 @@ const char* getLibraryName(const GlobalVariable* GV); - const char* getLibraryForSymbol(const char* Name, bool isFunction, + const char* getLibraryForSymbol(const StringRef &Name, bool isFunction, unsigned CallingConv); void printExternals(); From daniel at zuster.org Tue Jul 21 03:58:53 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 08:58:53 -0000 Subject: [llvm-commits] [llvm] r76555 - /llvm/trunk/lib/Target/MSIL/MSILWriter.h Message-ID: <200907210858.n6L8wtgP013572@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Jul 21 03:58:44 2009 New Revision: 76555 URL: http://llvm.org/viewvc/llvm-project?rev=76555&view=rev Log: Add missing include. Modified: llvm/trunk/lib/Target/MSIL/MSILWriter.h Modified: llvm/trunk/lib/Target/MSIL/MSILWriter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSIL/MSILWriter.h?rev=76555&r1=76554&r2=76555&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSIL/MSILWriter.h (original) +++ llvm/trunk/lib/Target/MSIL/MSILWriter.h Tue Jul 21 03:58:44 2009 @@ -19,6 +19,7 @@ #include "llvm/IntrinsicInst.h" #include "llvm/Pass.h" #include "llvm/PassManager.h" +#include "llvm/ADT/StringRef.h" #include "llvm/Analysis/FindUsedTypes.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Support/FormattedStream.h" From baldrick at free.fr Tue Jul 21 04:02:00 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 09:02:00 -0000 Subject: [llvm-commits] [gcc-plugin] r76556 - in /gcc-plugin/trunk/i386: ./ llvm-i386-target.h llvm-i386.cpp Message-ID: <200907210902.n6L923SN013667@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 04:01:36 2009 New Revision: 76556 URL: http://llvm.org/viewvc/llvm-project?rev=76556&view=rev Log: Target specific files, copied from llvm-gcc at revision 76542. Added: gcc-plugin/trunk/i386/ gcc-plugin/trunk/i386/llvm-i386-target.h - copied unchanged from r76542, llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h gcc-plugin/trunk/i386/llvm-i386.cpp - copied unchanged from r76542, llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp From baldrick at free.fr Tue Jul 21 04:04:22 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 09:04:22 -0000 Subject: [llvm-commits] [gcc-plugin] r76557 - in /gcc-plugin/trunk/i386: llvm-i386-target.h llvm-i386.cpp Message-ID: <200907210904.n6L94TQ0013870@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 04:04:05 2009 New Revision: 76557 URL: http://llvm.org/viewvc/llvm-project?rev=76557&view=rev Log: Remove irrelevant comment and preprocessor test. Modified: gcc-plugin/trunk/i386/llvm-i386-target.h gcc-plugin/trunk/i386/llvm-i386.cpp Modified: gcc-plugin/trunk/i386/llvm-i386-target.h URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/i386/llvm-i386-target.h?rev=76557&r1=76556&r2=76557&view=diff ============================================================================== --- gcc-plugin/trunk/i386/llvm-i386-target.h (original) +++ gcc-plugin/trunk/i386/llvm-i386-target.h Tue Jul 21 04:04:05 2009 @@ -1,5 +1,3 @@ -/* LLVM LOCAL begin (ENTIRE FILE!) */ -#ifdef ENABLE_LLVM /* Some target-specific hooks for gcc->llvm conversion Copyright (C) 2007 Free Software Foundation, Inc. Contributed by Anton Korobeynikov (asl at math.spbu.ru) @@ -225,6 +223,3 @@ false) #endif /* LLVM_ABI_H */ -#endif /* ENABLE_LLVM */ -/* LLVM LOCAL end (ENTIRE FILE!) */ - Modified: gcc-plugin/trunk/i386/llvm-i386.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/i386/llvm-i386.cpp?rev=76557&r1=76556&r2=76557&view=diff ============================================================================== --- gcc-plugin/trunk/i386/llvm-i386.cpp (original) +++ gcc-plugin/trunk/i386/llvm-i386.cpp Tue Jul 21 04:04:05 2009 @@ -1,5 +1,3 @@ -/* LLVM LOCAL begin (ENTIRE FILE!) */ -#ifdef ENABLE_LLVM /* High-level LLVM backend interface Copyright (C) 2005 Free Software Foundation, Inc. Contributed by Evan Cheng (evan.cheng at apple.com) @@ -1489,5 +1487,3 @@ else return !isSingleElementStructOrArray(type, false, true); } -#endif /* ENABLE_LLVM */ -/* LLVM LOCAL end (ENTIRE FILE!) */ From evan.cheng at apple.com Tue Jul 21 04:09:15 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 02:09:15 -0700 Subject: [llvm-commits] [llvm] r76536 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td In-Reply-To: References: <200907210600.n6L60JhT031982@zion.cs.uiuc.edu> Message-ID: <981121B8-E9AF-4CE2-A73C-C711B0EB85B1@apple.com> On Jul 20, 2009, at 11:27 PM, Chris Lattner wrote: > > On Jul 20, 2009, at 11:00 PM, Evan Cheng wrote: > >> Author: evancheng >> Date: Tue Jul 21 01:00:18 2009 >> New Revision: 76536 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=76536&view=rev >> Log: >> Add jumps with 8-bit relocation for assembler / disassembler. Patch >> by Sean Callanan. > > Very nice, thanks Sean. Doesn't Sean have commit access? Sean does. I think he is just too nice so he allows us to review his patches first. :-) Evan > > -Chris > >> >> Modified: >> llvm/trunk/lib/Target/X86/X86InstrInfo.td >> >> Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=76536&r1=76535&r2=76536&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) >> +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Tue Jul 21 01:00:18 >> 2009 >> @@ -218,6 +218,10 @@ >> let PrintMethod = "print_pcrel_imm"; >> } >> >> +def brtarget8 : Operand { >> + let PrintMethod = "print_pcrel_imm"; >> +} >> + >> // >> = >> = >> = >> ----------------------------------------------------------------------= >> ==// >> // X86 Complex Pattern Definitions. >> // >> @@ -527,6 +531,26 @@ >> >> // Conditional branches >> let Uses = [EFLAGS] in { >> +// Short conditional jumps >> +def JO8 : IBr<0x70, (ins brtarget8:$dst), "jo\t$dst", []>; >> +def JNO8 : IBr<0x71, (ins brtarget8:$dst), "jno\t$dst", []>; >> +def JB8 : IBr<0x72, (ins brtarget8:$dst), "jb\t$dst", []>; >> +def JAE8 : IBr<0x73, (ins brtarget8:$dst), "jae\t$dst", []>; >> +def JE8 : IBr<0x74, (ins brtarget8:$dst), "je\t$dst", []>; >> +def JNE8 : IBr<0x75, (ins brtarget8:$dst), "jne\t$dst", []>; >> +def JBE8 : IBr<0x76, (ins brtarget8:$dst), "jbe\t$dst", []>; >> +def JA8 : IBr<0x77, (ins brtarget8:$dst), "ja\t$dst", []>; >> +def JS8 : IBr<0x78, (ins brtarget8:$dst), "js\t$dst", []>; >> +def JNS8 : IBr<0x79, (ins brtarget8:$dst), "jns\t$dst", []>; >> +def JP8 : IBr<0x7A, (ins brtarget8:$dst), "jp\t$dst", []>; >> +def JNP8 : IBr<0x7B, (ins brtarget8:$dst), "jnp\t$dst", []>; >> +def JL8 : IBr<0x7C, (ins brtarget8:$dst), "jl\t$dst", []>; >> +def JGE8 : IBr<0x7D, (ins brtarget8:$dst), "jge\t$dst", []>; >> +def JLE8 : IBr<0x7E, (ins brtarget8:$dst), "jle\t$dst", []>; >> +def JG8 : IBr<0x7F, (ins brtarget8:$dst), "jg\t$dst", []>; >> + >> +def JCXZ8 : IBr<0xE3, (ins brtarget8:$dst), "jcxz\t$dst", []>; >> + >> def JE : IBr<0x84, (ins brtarget:$dst), "je\t$dst", >> [(X86brcond bb:$dst, X86_COND_E, EFLAGS)]>, TB; >> def JNE : IBr<0x85, (ins brtarget:$dst), "jne\t$dst", >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From evan.cheng at apple.com Tue Jul 21 04:15:35 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 09:15:35 -0000 Subject: [llvm-commits] [llvm] r76558 - in /llvm/trunk: lib/CodeGen/VirtRegRewriter.cpp test/CodeGen/X86/2009-07-21-RewriterBug.ll Message-ID: <200907210915.n6L9Fe27018490@zion.cs.uiuc.edu> Author: evancheng Date: Tue Jul 21 04:15:00 2009 New Revision: 76558 URL: http://llvm.org/viewvc/llvm-project?rev=76558&view=rev Log: Another rewriter bug exposed by recent coalescer changes. ReuseInfo::GetRegForReload() should make sure the "switched" register is in the desired register class. I'm surprised this hasn't caused more failures in the past. Added: llvm/trunk/test/CodeGen/X86/2009-07-21-RewriterBug.ll Modified: llvm/trunk/lib/CodeGen/VirtRegRewriter.cpp Modified: llvm/trunk/lib/CodeGen/VirtRegRewriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegRewriter.cpp?rev=76558&r1=76557&r2=76558&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/VirtRegRewriter.cpp (original) +++ llvm/trunk/lib/CodeGen/VirtRegRewriter.cpp Tue Jul 21 04:15:00 2009 @@ -277,7 +277,8 @@ /// GetRegForReload - We are about to emit a reload into PhysReg. If there /// is some other operand that is using the specified register, either pick /// a new register to use, or evict the previous reload and use this reg. - unsigned GetRegForReload(unsigned PhysReg, MachineInstr *MI, + unsigned GetRegForReload(const TargetRegisterClass *RC, unsigned PhysReg, + MachineFunction &MF, MachineInstr *MI, AvailableSpills &Spills, std::vector &MaybeDeadStores, SmallSet &Rejected, @@ -296,15 +297,17 @@ /// sees r1 is taken by t2, tries t2's reload register r0 /// sees r0 is taken by t3, tries t3's reload register r1 /// sees r1 is taken by t2, tries t2's reload register r0 ... - unsigned GetRegForReload(unsigned PhysReg, MachineInstr *MI, + unsigned GetRegForReload(unsigned VirtReg, unsigned PhysReg, MachineInstr *MI, AvailableSpills &Spills, std::vector &MaybeDeadStores, BitVector &RegKills, std::vector &KillOps, VirtRegMap &VRM) { SmallSet Rejected; - return GetRegForReload(PhysReg, MI, Spills, MaybeDeadStores, Rejected, - RegKills, KillOps, VRM); + MachineFunction &MF = *MI->getParent()->getParent(); + const TargetRegisterClass* RC = MF.getRegInfo().getRegClass(VirtReg); + return GetRegForReload(RC, PhysReg, MF, MI, Spills, MaybeDeadStores, + Rejected, RegKills, KillOps, VRM); } }; @@ -658,15 +661,17 @@ /// GetRegForReload - We are about to emit a reload into PhysReg. If there /// is some other operand that is using the specified register, either pick /// a new register to use, or evict the previous reload and use this reg. -unsigned ReuseInfo::GetRegForReload(unsigned PhysReg, MachineInstr *MI, - AvailableSpills &Spills, +unsigned ReuseInfo::GetRegForReload(const TargetRegisterClass *RC, + unsigned PhysReg, + MachineFunction &MF, + MachineInstr *MI, AvailableSpills &Spills, std::vector &MaybeDeadStores, SmallSet &Rejected, BitVector &RegKills, std::vector &KillOps, VirtRegMap &VRM) { - const TargetInstrInfo* TII = MI->getParent()->getParent()->getTarget() - .getInstrInfo(); + const TargetInstrInfo* TII = MF.getTarget().getInstrInfo(); + const TargetRegisterInfo *TRI = Spills.getRegInfo(); if (Reuses.empty()) return PhysReg; // This is most often empty. @@ -678,18 +683,18 @@ // considered and subsequently rejected because it has also been reused // by another operand. if (Op.PhysRegReused == PhysReg && - Rejected.count(Op.AssignedPhysReg) == 0) { + Rejected.count(Op.AssignedPhysReg) == 0 && + RC->contains(Op.AssignedPhysReg)) { // Yup, use the reload register that we didn't use before. unsigned NewReg = Op.AssignedPhysReg; Rejected.insert(PhysReg); - return GetRegForReload(NewReg, MI, Spills, MaybeDeadStores, Rejected, + return GetRegForReload(RC, NewReg, MF, MI, Spills, MaybeDeadStores, Rejected, RegKills, KillOps, VRM); } else { // Otherwise, we might also have a problem if a previously reused - // value aliases the new register. If so, codegen the previous reload + // value aliases the new register. If so, codegen the previous reload // and use this one. unsigned PRRU = Op.PhysRegReused; - const TargetRegisterInfo *TRI = Spills.getRegInfo(); if (TRI->areAliases(PRRU, PhysReg)) { // Okay, we found out that an alias of a reused register // was used. This isn't good because it means we have @@ -707,9 +712,9 @@ // slot that we were supposed to in the first place. However, that // register could hold a reuse. Check to see if it conflicts or // would prefer us to use a different register. - unsigned NewPhysReg = GetRegForReload(NewOp.AssignedPhysReg, - MI, Spills, MaybeDeadStores, - Rejected, RegKills, KillOps, VRM); + unsigned NewPhysReg = GetRegForReload(RC, NewOp.AssignedPhysReg, + MF, MI, Spills, MaybeDeadStores, + Rejected, RegKills, KillOps, VRM); MachineBasicBlock::iterator MII = MI; if (NewOp.StackSlotOrReMat > VirtRegMap::MAX_STACK_SLOT) { @@ -1352,8 +1357,6 @@ TID.isCall() || TID.isBarrier() || TID.isReturn() || TID.hasUnmodeledSideEffects()) return false; - if (TID.getImplicitDefs()) - return false; for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) { MachineOperand &MO = MI.getOperand(i); if (!MO.isReg() || !MO.getReg()) @@ -1790,8 +1793,9 @@ // available. If this occurs, use the register indicated by the // reuser. if (ReusedOperands.hasReuses()) - DesignatedReg = ReusedOperands.GetRegForReload(DesignatedReg, &MI, - Spills, MaybeDeadStores, RegKills, KillOps, VRM); + DesignatedReg = ReusedOperands.GetRegForReload(VirtReg, + DesignatedReg, &MI, + Spills, MaybeDeadStores, RegKills, KillOps, VRM); // If the mapped designated register is actually the physreg we have // incoming, we don't need to inserted a dead copy. @@ -1842,8 +1846,8 @@ // available. If this occurs, use the register indicated by the // reuser. if (ReusedOperands.hasReuses()) - PhysReg = ReusedOperands.GetRegForReload(PhysReg, &MI, - Spills, MaybeDeadStores, RegKills, KillOps, VRM); + PhysReg = ReusedOperands.GetRegForReload(VirtReg, PhysReg, &MI, + Spills, MaybeDeadStores, RegKills, KillOps, VRM); RegInfo->setPhysRegUsed(PhysReg); ReusedOperands.markClobbered(PhysReg); @@ -2157,8 +2161,8 @@ if (ReusedOperands.isClobbered(PhysReg)) { // Another def has taken the assigned physreg. It must have been a // use&def which got it due to reuse. Undo the reuse! - PhysReg = ReusedOperands.GetRegForReload(PhysReg, &MI, - Spills, MaybeDeadStores, RegKills, KillOps, VRM); + PhysReg = ReusedOperands.GetRegForReload(VirtReg, PhysReg, &MI, + Spills, MaybeDeadStores, RegKills, KillOps, VRM); } } Added: llvm/trunk/test/CodeGen/X86/2009-07-21-RewriterBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-07-21-RewriterBug.ll?rev=76558&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-07-21-RewriterBug.ll (added) +++ llvm/trunk/test/CodeGen/X86/2009-07-21-RewriterBug.ll Tue Jul 21 04:15:00 2009 @@ -0,0 +1,5384 @@ +; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin10.0 -relocation-model=pic -disable-fp-elim | not grep dil + + %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.__sFILEX = type opaque + %struct.__sbuf = type { i8*, i32 } + %struct.spec_fd_t = type { i32, i32, i32, i8* } + at globalCrc = internal global i32 0 ; [#uses=6] + at bsStream.b = internal global i1 false ; [#uses=41] + at bsLive = internal global i32 0 ; [#uses=91] + at bsBuff = internal global i32 0 ; [#uses=91] + at bytesIn = internal global i32 0 ; [#uses=4] + at nInUse = internal global i32 0 ; [#uses=3] + at inUse = internal global [256 x i8] zeroinitializer, align 32 ; <[256 x i8]*> [#uses=7] + at seqToUnseq = internal global [256 x i8] zeroinitializer, align 32 ; <[256 x i8]*> [#uses=3] + at unseqToSeq = internal global [256 x i8] zeroinitializer, align 32 ; <[256 x i8]*> [#uses=1] + at mtfFreq = internal global [258 x i32] zeroinitializer, align 32 ; <[258 x i32]*> [#uses=2] + at block = internal global i8* null ; [#uses=3] + at zptr = internal global i32* null ; [#uses=2] + at szptr = internal global i16* null ; [#uses=3] + at last = internal global i32 0 ; [#uses=13] + at nMTF = internal global i32 0 ; [#uses=2] + at quadrant = internal global i16* null ; [#uses=1] + at workDone = internal global i32 0 ; [#uses=3] + at rNums = internal constant [512 x i32] [i32 619, i32 720, i32 127, i32 481, i32 931, i32 816, i32 813, i32 233, i32 566, i32 247, i32 985, i32 724, i32 205, i32 454, i32 863, i32 491, i32 741, i32 242, i32 949, i32 214, i32 733, i32 859, i32 335, i32 708, i32 621, i32 574, i32 73, i32 654, i32 730, i32 472, i32 419, i32 436, i32 278, i32 496, i32 867, i32 210, i32 399, i32 680, i32 480, i32 51, i32 878, i32 465, i32 811, i32 169, i32 869, i32 675, i32 611, i32 697, i32 867, i32 561, i32 862, i32 687, i32 507, i32 283, i32 482, i32 129, i32 807, i32 591, i32 733, i32 623, i32 150, i32 238, i32 59, i32 379, i32 684, i32 877, i32 625, i32 169, i32 643, i32 105, i32 170, i32 607, i32 520, i32 932, i32 727, i32 476, i32 693, i32 425, i32 174, i32 647, i32 73, i32 122, i32 335, i32 530, i32 442, i32 853, i32 695, i32 249, i32 445, i32 515, i32 909, i32 545, i32 703, i32 919, i32 874, i32 474, i32 882, i32 500, i32 594, i32 612, i32 641, i32 801, i32 220, i32 162, i32 819, i32 984! , i32 589, i32 513, i32 495, i32 799, i32 161, i32 604, i32 958, i32 533, i32 221, i32 400, i32 386, i32 867, i32 600, i32 782, i32 382, i32 596, i32 414, i32 171, i32 516, i32 375, i32 682, i32 485, i32 911, i32 276, i32 98, i32 553, i32 163, i32 354, i32 666, i32 933, i32 424, i32 341, i32 533, i32 870, i32 227, i32 730, i32 475, i32 186, i32 263, i32 647, i32 537, i32 686, i32 600, i32 224, i32 469, i32 68, i32 770, i32 919, i32 190, i32 373, i32 294, i32 822, i32 808, i32 206, i32 184, i32 943, i32 795, i32 384, i32 383, i32 461, i32 404, i32 758, i32 839, i32 887, i32 715, i32 67, i32 618, i32 276, i32 204, i32 918, i32 873, i32 777, i32 604, i32 560, i32 951, i32 160, i32 578, i32 722, i32 79, i32 804, i32 96, i32 409, i32 713, i32 940, i32 652, i32 934, i32 970, i32 447, i32 318, i32 353, i32 859, i32 672, i32 112, i32 785, i32 645, i32 863, i32 803, i32 350, i32 139, i32 93, i32 354, i32 99, i32 820, i32 908, i32 609, i32 772, i32 154, i32 274, i32 580, i32 184, i32! 79, i32 626, i32 630, i32 742, i32 653, i32 282, i32 762, i32! 623, i3 2 680, i32 81, i32 927, i32 626, i32 789, i32 125, i32 411, i32 521, i32 938, i32 300, i32 821, i32 78, i32 343, i32 175, i32 128, i32 250, i32 170, i32 774, i32 972, i32 275, i32 999, i32 639, i32 495, i32 78, i32 352, i32 126, i32 857, i32 956, i32 358, i32 619, i32 580, i32 124, i32 737, i32 594, i32 701, i32 612, i32 669, i32 112, i32 134, i32 694, i32 363, i32 992, i32 809, i32 743, i32 168, i32 974, i32 944, i32 375, i32 748, i32 52, i32 600, i32 747, i32 642, i32 182, i32 862, i32 81, i32 344, i32 805, i32 988, i32 739, i32 511, i32 655, i32 814, i32 334, i32 249, i32 515, i32 897, i32 955, i32 664, i32 981, i32 649, i32 113, i32 974, i32 459, i32 893, i32 228, i32 433, i32 837, i32 553, i32 268, i32 926, i32 240, i32 102, i32 654, i32 459, i32 51, i32 686, i32 754, i32 806, i32 760, i32 493, i32 403, i32 415, i32 394, i32 687, i32 700, i32 946, i32 670, i32 656, i32 610, i32 738, i32 392, i32 760, i32 799, i32 887, i32 653, i32 978, i32 321, i32 576, i32 617, i32 626! , i32 502, i32 894, i32 679, i32 243, i32 440, i32 680, i32 879, i32 194, i32 572, i32 640, i32 724, i32 926, i32 56, i32 204, i32 700, i32 707, i32 151, i32 457, i32 449, i32 797, i32 195, i32 791, i32 558, i32 945, i32 679, i32 297, i32 59, i32 87, i32 824, i32 713, i32 663, i32 412, i32 693, i32 342, i32 606, i32 134, i32 108, i32 571, i32 364, i32 631, i32 212, i32 174, i32 643, i32 304, i32 329, i32 343, i32 97, i32 430, i32 751, i32 497, i32 314, i32 983, i32 374, i32 822, i32 928, i32 140, i32 206, i32 73, i32 263, i32 980, i32 736, i32 876, i32 478, i32 430, i32 305, i32 170, i32 514, i32 364, i32 692, i32 829, i32 82, i32 855, i32 953, i32 676, i32 246, i32 369, i32 970, i32 294, i32 750, i32 807, i32 827, i32 150, i32 790, i32 288, i32 923, i32 804, i32 378, i32 215, i32 828, i32 592, i32 281, i32 565, i32 555, i32 710, i32 82, i32 896, i32 831, i32 547, i32 261, i32 524, i32 462, i32 293, i32 465, i32 502, i32 56, i32 661, i32 821, i32 976, i32 991, i32 658, i32 ! 869, i32 905, i32 758, i32 745, i32 193, i32 768, i32 550, i32! 608, i3 2 933, i32 378, i32 286, i32 215, i32 979, i32 792, i32 961, i32 61, i32 688, i32 793, i32 644, i32 986, i32 403, i32 106, i32 366, i32 905, i32 644, i32 372, i32 567, i32 466, i32 434, i32 645, i32 210, i32 389, i32 550, i32 919, i32 135, i32 780, i32 773, i32 635, i32 389, i32 707, i32 100, i32 626, i32 958, i32 165, i32 504, i32 920, i32 176, i32 193, i32 713, i32 857, i32 265, i32 203, i32 50, i32 668, i32 108, i32 645, i32 990, i32 626, i32 197, i32 510, i32 357, i32 358, i32 850, i32 858, i32 364, i32 936, i32 638], align 32 ; <[512 x i32]*> [#uses=3] + at __stderrp = external global %struct.FILE* ; <%struct.FILE**> [#uses=9] +@"\01LC" = internal constant [36 x i8] c"\09Input file = %s, output file = %s\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[36 x i8]*> [#uses=1] + at inName = internal global [1024 x i8] zeroinitializer, align 32 ; <[1024 x i8]*> [#uses=1] + at outName = internal global [1024 x i8] zeroinitializer, align 32 ; <[1024 x i8]*> [#uses=1] + at workLimit = internal global i32 0 ; [#uses=3] + at firstAttempt.b = internal global i1 false ; [#uses=3] +@"\01LC5" = internal constant [146 x i8] c"\0A%s: Can't allocate enough memory for compression.\0A\09Requested %d bytes for a block size of %d.\0A\09Try selecting a small block size (with flag -s).\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[146 x i8]*> [#uses=1] +@"\01LC6" = internal constant [206 x i8] c"\0A%s: Can't allocate enough memory for decompression.\0A\09Requested %d bytes for a block size of %d.\0A\09Try selecting space-economic decompress (with flag -s)\0A\09and failing that, find a machine with more memory.\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[206 x i8]*> [#uses=1] +@"\01LC11" = internal constant [21 x i8] c"hbMakeCodeLengths(1)\00", section "__TEXT,__cstring,cstring_literals" ; <[21 x i8]*> [#uses=1] +@"\01LC12" = internal constant [21 x i8] c"hbMakeCodeLengths(2)\00", section "__TEXT,__cstring,cstring_literals" ; <[21 x i8]*> [#uses=1] +@"\01LC13" = internal constant [243 x i8] c"\0AIt is possible that the compressed file(s) have become corrupted.\0AYou can use the -tvv option to test integrity of such files.\0A\0AYou can use the `bzip2recover' program to *attempt* to recover\0Adata from undamaged sections of corrupted files.\0A\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[243 x i8]*> [#uses=1] +@"\01LC17" = internal constant [86 x i8] c"\0A%s: bad block header in the compressed file,\0A\09which probably means it is corrupted.\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[86 x i8]*> [#uses=1] + at ftab = internal global i32* null ; [#uses=1] +@"\01LC32" = internal constant [27 x i8] c"doReversibleTransformation\00", section "__TEXT,__cstring,cstring_literals" ; <[27 x i8]*> [#uses=1] + at selectorMtf = internal global [18002 x i8] zeroinitializer, align 32 ; <[18002 x i8]*> [#uses=4] + at selector = internal global [18002 x i8] zeroinitializer, align 32 ; <[18002 x i8]*> [#uses=7] + at len = internal global [6 x [258 x i8]] zeroinitializer, align 32 ; <[6 x [258 x i8]]*> [#uses=24] + at perm = internal global [6 x [258 x i32]] zeroinitializer, align 32 ; <[6 x [258 x i32]]*> [#uses=4] + at base = internal global [6 x [258 x i32]] zeroinitializer, align 32 ; <[6 x [258 x i32]]*> [#uses=11] + at limit = internal global [6 x [258 x i32]] zeroinitializer, align 32 ; <[6 x [258 x i32]]*> [#uses=7] + at minLens = internal global [6 x i32] zeroinitializer ; <[6 x i32]*> [#uses=4] + at blockSize100k = internal global i32 0 ; [#uses=6] + at unzftab = internal global [256 x i32] zeroinitializer, align 32 ; <[256 x i32]*> [#uses=4] + at crc32Table = internal constant [256 x i32] [i32 0, i32 79764919, i32 159529838, i32 222504665, i32 319059676, i32 398814059, i32 445009330, i32 507990021, i32 638119352, i32 583659535, i32 797628118, i32 726387553, i32 890018660, i32 835552979, i32 1015980042, i32 944750013, i32 1276238704, i32 1221641927, i32 1167319070, i32 1095957929, i32 1595256236, i32 1540665371, i32 1452775106, i32 1381403509, i32 1780037320, i32 1859660671, i32 1671105958, i32 1733955601, i32 2031960084, i32 2111593891, i32 1889500026, i32 1952343757, i32 -1742489888, i32 -1662866601, i32 -1851683442, i32 -1788833735, i32 -1960329156, i32 -1880695413, i32 -2103051438, i32 -2040207643, i32 -1104454824, i32 -1159051537, i32 -1213636554, i32 -1284997759, i32 -1389417084, i32 -1444007885, i32 -1532160278, i32 -1603531939, i32 -734892656, i32 -789352409, i32 -575645954, i32 -646886583, i32 -952755380, i32 -1007220997, i32 -827056094, i32 -898286187, i32 -231047128, i32 -151282273, i32 -71779514, i32 -88! 04623, i32 -515967244, i32 -436212925, i32 -390279782, i32 -327299027, i32 881225847, i32 809987520, i32 1023691545, i32 969234094, i32 662832811, i32 591600412, i32 771767749, i32 717299826, i32 311336399, i32 374308984, i32 453813921, i32 533576470, i32 25881363, i32 88864420, i32 134795389, i32 214552010, i32 2023205639, i32 2086057648, i32 1897238633, i32 1976864222, i32 1804852699, i32 1867694188, i32 1645340341, i32 1724971778, i32 1587496639, i32 1516133128, i32 1461550545, i32 1406951526, i32 1302016099, i32 1230646740, i32 1142491917, i32 1087903418, i32 -1398421865, i32 -1469785312, i32 -1524105735, i32 -1578704818, i32 -1079922613, i32 -1151291908, i32 -1239184603, i32 -1293773166, i32 -1968362705, i32 -1905510760, i32 -2094067647, i32 -2014441994, i32 -1716953613, i32 -1654112188, i32 -1876203875, i32 -1796572374, i32 -525066777, i32 -462094256, i32 -382327159, i32 -302564546, i32 -206542021, i32 -143559028, i32 -97365931, i32 -17609246, i32 -960696225, i32 -103! 1934488, i32 -817968335, i32 -872425850, i32 -709327229, i32 -! 78055956 4, i32 -600130067, i32 -654598054, i32 1762451694, i32 1842216281, i32 1619975040, i32 1682949687, i32 2047383090, i32 2127137669, i32 1938468188, i32 2001449195, i32 1325665622, i32 1271206113, i32 1183200824, i32 1111960463, i32 1543535498, i32 1489069629, i32 1434599652, i32 1363369299, i32 622672798, i32 568075817, i32 748617968, i32 677256519, i32 907627842, i32 853037301, i32 1067152940, i32 995781531, i32 51762726, i32 131386257, i32 177728840, i32 240578815, i32 269590778, i32 349224269, i32 429104020, i32 491947555, i32 -248556018, i32 -168932423, i32 -122852000, i32 -60002089, i32 -500490030, i32 -420856475, i32 -341238852, i32 -278395381, i32 -685261898, i32 -739858943, i32 -559578920, i32 -630940305, i32 -1004286614, i32 -1058877219, i32 -845023740, i32 -916395085, i32 -1119974018, i32 -1174433591, i32 -1262701040, i32 -1333941337, i32 -1371866206, i32 -1426332139, i32 -1481064244, i32 -1552294533, i32 -1690935098, i32 -1611170447, i32 -1833673816, i32 -177069923! 3, i32 -2009983462, i32 -1930228819, i32 -2119160460, i32 -2056179517, i32 1569362073, i32 1498123566, i32 1409854455, i32 1355396672, i32 1317987909, i32 1246755826, i32 1192025387, i32 1137557660, i32 2072149281, i32 2135122070, i32 1912620623, i32 1992383480, i32 1753615357, i32 1816598090, i32 1627664531, i32 1707420964, i32 295390185, i32 358241886, i32 404320391, i32 483945776, i32 43990325, i32 106832002, i32 186451547, i32 266083308, i32 932423249, i32 861060070, i32 1041341759, i32 986742920, i32 613929101, i32 542559546, i32 756411363, i32 701822548, i32 -978770311, i32 -1050133554, i32 -869589737, i32 -924188512, i32 -693284699, i32 -764654318, i32 -550540341, i32 -605129092, i32 -475935807, i32 -413084042, i32 -366743377, i32 -287118056, i32 -257573603, i32 -194731862, i32 -114850189, i32 -35218492, i32 -1984365303, i32 -1921392450, i32 -2143631769, i32 -2063868976, i32 -1698919467, i32 -1635936670, i32 -1824608069, i32 -1744851700, i32 -1347415887, i32 -1418654! 458, i32 -1506661409, i32 -1561119128, i32 -1129027987, i32 -1! 20026013 4, i32 -1254728445, i32 -1309196108], align 32 ; <[256 x i32]*> [#uses=4] +@"\01LC35" = internal constant [17 x i8] c"sendMTFValues(0)\00", section "__TEXT,__cstring,cstring_literals" ; <[17 x i8]*> [#uses=1] + at rfreq = internal global [6 x [258 x i32]] zeroinitializer, align 32 ; <[6 x [258 x i32]]*> [#uses=3] +@"\01LC40" = internal constant [17 x i8] c"sendMTFValues(2)\00", section "__TEXT,__cstring,cstring_literals" ; <[17 x i8]*> [#uses=1] +@"\01LC41" = internal constant [17 x i8] c"sendMTFValues(3)\00", section "__TEXT,__cstring,cstring_literals" ; <[17 x i8]*> [#uses=1] +@"\01LC42" = internal constant [17 x i8] c"sendMTFValues(4)\00", section "__TEXT,__cstring,cstring_literals" ; <[17 x i8]*> [#uses=1] + at code = internal global [6 x [258 x i32]] zeroinitializer, align 32 ; <[6 x [258 x i32]]*> [#uses=2] +@"\01LC46" = internal constant [17 x i8] c"sendMTFValues(5)\00", section "__TEXT,__cstring,cstring_literals" ; <[17 x i8]*> [#uses=1] +@"\01LC54" = internal constant [28 x i8] c"setDecompressStructureSizes\00", section "__TEXT,__cstring,cstring_literals" ; <[28 x i8]*> [#uses=1] + at spec_fd = internal global [3 x %struct.spec_fd_t] zeroinitializer, align 32 ; <[3 x %struct.spec_fd_t]*> [#uses=128] +@"\01LC1179" = internal constant [10 x i8] c"spec_init\00", section "__TEXT,__cstring,cstring_literals" ; <[10 x i8]*> [#uses=1] +@"\01LC1280" = internal constant [35 x i8] c"spec_init: Error mallocing memory!\00", section "__TEXT,__cstring,cstring_literals" ; <[35 x i8]*> [#uses=1] +@"\01LC1684" = internal constant [24 x i8] c"Can't open file %s: %s\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[24 x i8]*> [#uses=1] +@"\01LC1785" = internal constant [27 x i8] c"Error reading from %s: %s\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[27 x i8]*> [#uses=1] +@"\01LC1886" = internal constant [22 x i8] c"Duplicating %d bytes\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[22 x i8]*> [#uses=1] +@"\01LC1987" = internal constant [15 x i8] c"input.combined\00", section "__TEXT,__cstring,cstring_literals" ; <[15 x i8]*> [#uses=1] +@"\01LC2088" = internal constant [19 x i8] c"Loading Input Data\00", section "__TEXT,__cstring,cstring_literals" ; <[19 x i8]*> [#uses=1] +@"\01LC2189" = internal constant [31 x i8] c"Input data %d bytes in length\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[31 x i8]*> [#uses=1] +@"\01LC2290" = internal constant [30 x i8] c"main: Error mallocing memory!\00", section "__TEXT,__cstring,cstring_literals" ; <[30 x i8]*> [#uses=1] +@"\01LC2391" = internal constant [34 x i8] c"Compressing Input Data, level %d\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[34 x i8]*> [#uses=1] +@"\01LC2492" = internal constant [36 x i8] c"Compressed data %d bytes in length\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[36 x i8]*> [#uses=1] +@"\01LC2593" = internal constant [19 x i8] c"Uncompressing Data\00", section "__TEXT,__cstring,cstring_literals" ; <[19 x i8]*> [#uses=1] +@"\01LC2694" = internal constant [38 x i8] c"Uncompressed data %d bytes in length\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[38 x i8]*> [#uses=1] +@"\01LC2795" = internal constant [35 x i8] c"Tested %dMB buffer: Miscompared!!\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[35 x i8]*> [#uses=1] +@"\01LC2896" = internal constant [37 x i8] c"Uncompressed data compared correctly\00", section "__TEXT,__cstring,cstring_literals" ; <[37 x i8]*> [#uses=1] +@"\01LC2997" = internal constant [25 x i8] c"Tested %dMB buffer: OK!\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[25 x i8]*> [#uses=1] + at llvm.used = appending global [1 x i8*] [i8* bitcast (i32 (i32, i8**)* @main to i8*)], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] + +define i32 @main(i32 %argc, i8** nocapture %argv) nounwind ssp { +entry: + %parent.i.i.i = alloca [516 x i32], align 4 ; <[516 x i32]*> [#uses=8] + %weight.i.i.i = alloca [516 x i32], align 4 ; <[516 x i32]*> [#uses=19] + %heap.i.i.i = alloca [260 x i32], align 4 ; <[260 x i32]*> [#uses=25] + %inUse16.i.i = alloca [16 x i8], align 1 ; <[16 x i8]*> [#uses=3] + %pos.i.i = alloca [6 x i8], align 1 ; <[6 x i8]*> [#uses=3] + %fave.i.i = alloca [6 x i32], align 4 ; <[6 x i32]*> [#uses=2] + %cost.i.i = alloca [6 x i16], align 2 ; <[6 x i16]*> [#uses=9] + %pos.i.i.i = alloca [6 x i8], align 1 ; <[6 x i8]*> [#uses=5] + %inUse16.i.i.i = alloca [16 x i8], align 1 ; <[16 x i8]*> [#uses=2] + %yy.i.i = alloca [256 x i8], align 1 ; <[256 x i8]*> [#uses=10] + %cftab.i.i = alloca [257 x i32], align 4 ; <[257 x i32]*> [#uses=5] + %0 = icmp sgt i32 %argc, 1 ; [#uses=1] + br i1 %0, label %bb, label %bb1 + +bb: ; preds = %entry + %1 = getelementptr i8** %argv, i32 1 ; [#uses=1] + %2 = load i8** %1, align 4 ; [#uses=1] + br label %bb1 + +bb1: ; preds = %bb, %entry + %input_name.0 = phi i8* [ %2, %bb ], [ getelementptr ([15 x i8]* @"\01LC1987", i32 0, i32 0), %entry ] ; [#uses=3] + %3 = icmp sgt i32 %argc, 2 ; [#uses=1] + br i1 %3, label %bb2, label %bb3 + +bb2: ; preds = %bb1 + %4 = getelementptr i8** %argv, i32 2 ; [#uses=1] + %5 = load i8** %4, align 4 ; [#uses=1] + %6 = tail call i32 @atoi(i8* %5) nounwind ; [#uses=1] + br label %bb3 + +bb3: ; preds = %bb2, %bb1 + %input_size.0 = phi i32 [ %6, %bb2 ], [ 64, %bb1 ] ; [#uses=5] + %7 = icmp sgt i32 %argc, 3 ; [#uses=1] + br i1 %7, label %bb4, label %bb6 + +bb4: ; preds = %bb3 + %8 = getelementptr i8** %argv, i32 3 ; [#uses=1] + %9 = load i8** %8, align 4 ; [#uses=1] + %10 = tail call i32 @atoi(i8* %9) nounwind ; [#uses=1] + br label %bb6 + +bb6: ; preds = %bb4, %bb3 + %compressed_size.0 = phi i32 [ %10, %bb4 ], [ %input_size.0, %bb3 ] ; [#uses=1] + %11 = shl i32 %input_size.0, 20 ; [#uses=9] + store i32 %11, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 0), align 32 + %12 = shl i32 %compressed_size.0, 20 ; [#uses=1] + store i32 %12, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 0), align 16 + store i32 %11, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 2, i32 0), align 32 + %13 = tail call i32 @puts(i8* getelementptr ([10 x i8]* @"\01LC1179", i32 0, i32 0)) nounwind ; [#uses=0] + br label %bb11.i + +bb2.i: ; preds = %bb11.i + %scevgep35.i = bitcast i32* %scevgep3.i to i8* ; [#uses=1] + %14 = load i32* %scevgep3.i, align 16 ; [#uses=4] + tail call void @llvm.memset.i32(i8* %scevgep35.i, i8 0, i32 16, i32 16) nounwind + store i32 %14, i32* %scevgep3.i, align 16 + %15 = add i32 %14, 102400 ; [#uses=1] + %16 = malloc i8, i32 %15 ; [#uses=2] + store i8* %16, i8** %scevgep4.i, align 4 + %17 = icmp eq i8* %16, null ; [#uses=1] + br i1 %17, label %bb6.i, label %bb9.preheader.i + +bb9.preheader.i: ; preds = %bb2.i + %18 = icmp sgt i32 %14, 0 ; [#uses=1] + br i1 %18, label %bb8.i, label %bb10.i + +bb6.i: ; preds = %bb2.i + %19 = tail call i32 @puts(i8* getelementptr ([35 x i8]* @"\01LC1280", i32 0, i32 0)) nounwind ; [#uses=0] + tail call void @exit(i32 1) noreturn nounwind + unreachable + +bb8.i: ; preds = %bb8.i, %bb9.preheader.i + %indvar.i = phi i32 [ %indvar.next.i, %bb8.i ], [ 0, %bb9.preheader.i ] ; [#uses=2] + %tmp.i = shl i32 %indvar.i, 10 ; [#uses=2] + %20 = load i8** %scevgep4.i, align 4 ; [#uses=1] + %scevgep.i = getelementptr i8* %20, i32 %tmp.i ; [#uses=1] + store i8 0, i8* %scevgep.i, align 1 + %tmp2.i = add i32 %tmp.i, 1024 ; [#uses=1] + %21 = icmp slt i32 %tmp2.i, %14 ; [#uses=1] + %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=1] + br i1 %21, label %bb8.i, label %bb10.i + +bb10.i: ; preds = %bb8.i, %bb9.preheader.i + %22 = add i32 %23, 1 ; [#uses=1] + br label %bb11.i + +bb11.i: ; preds = %bb10.i, %bb6 + %23 = phi i32 [ %22, %bb10.i ], [ 0, %bb6 ] ; [#uses=4] + %scevgep3.i = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %23, i32 0 ; [#uses=3] + %scevgep4.i = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %23, i32 3 ; [#uses=2] + %24 = icmp sgt i32 %23, 2 ; [#uses=1] + br i1 %24, label %bb8, label %bb2.i + +bb8: ; preds = %bb11.i + %25 = tail call i32 @puts(i8* getelementptr ([19 x i8]* @"\01LC2088", i32 0, i32 0)) nounwind ; [#uses=0] + %26 = tail call i32 (i8*, i32, ...)* @"\01_open$UNIX2003"(i8* %input_name.0, i32 0) nounwind ; [#uses=3] + %27 = icmp slt i32 %26, 0 ; [#uses=1] + br i1 %27, label %bb.i77, label %bb1.i + +bb.i77: ; preds = %bb8 + %28 = tail call i32* @__error() nounwind ; [#uses=1] + %29 = load i32* %28, align 4 ; [#uses=1] + %30 = tail call i8* @"\01_strerror$UNIX2003"(i32 %29) nounwind ; [#uses=1] + %31 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] + %32 = tail call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %31, i8* getelementptr ([24 x i8]* @"\01LC1684", i32 0, i32 0), i8* %input_name.0, i8* %30) nounwind ; [#uses=0] + tail call void @exit(i32 1) noreturn nounwind + unreachable + +bb1.i: ; preds = %bb8 + store i32 0, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 + store i32 0, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 2), align 8 + br label %bb6.i80 + +bb2.i78: ; preds = %bb6.i80 + %33 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 3), align 4 ; [#uses=1] + %34 = getelementptr i8* %33, i32 %i.0.i ; [#uses=1] + %35 = tail call i32 (...)* @read(i32 %26, i8* %34, i32 131072) nounwind ; [#uses=4] + %36 = icmp eq i32 %35, 0 ; [#uses=1] + br i1 %36, label %bb7.i81, label %bb3.i + +bb3.i: ; preds = %bb2.i78 + %37 = icmp slt i32 %35, 0 ; [#uses=1] + br i1 %37, label %bb4.i, label %bb5.i79 + +bb4.i: ; preds = %bb3.i + %38 = tail call i32* @__error() nounwind ; [#uses=1] + %39 = load i32* %38, align 4 ; [#uses=1] + %40 = tail call i8* @"\01_strerror$UNIX2003"(i32 %39) nounwind ; [#uses=1] + %41 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] + %42 = tail call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %41, i8* getelementptr ([27 x i8]* @"\01LC1785", i32 0, i32 0), i8* %input_name.0, i8* %40) nounwind ; [#uses=0] + tail call void @exit(i32 1) noreturn nounwind + unreachable + +bb5.i79: ; preds = %bb3.i + %43 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=1] + %44 = add i32 %43, %35 ; [#uses=1] + store i32 %44, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 + %45 = add i32 %35, %i.0.i ; [#uses=1] + br label %bb6.i80 + +bb6.i80: ; preds = %bb5.i79, %bb1.i + %i.0.i = phi i32 [ 0, %bb1.i ], [ %45, %bb5.i79 ] ; [#uses=3] + %46 = icmp slt i32 %i.0.i, %11 ; [#uses=1] + br i1 %46, label %bb2.i78, label %bb7.i81 + +bb7.i81: ; preds = %bb6.i80, %bb2.i78 + %47 = tail call i32 (...)* @close(i32 %26) nounwind ; [#uses=0] + %48 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=3] + %49 = icmp slt i32 %48, %11 ; [#uses=1] + br i1 %49, label %bb14.i, label %bb10 + +bb14.i: ; preds = %bb14.i, %bb7.i81 + %50 = phi i32 [ %57, %bb14.i ], [ %48, %bb7.i81 ] ; [#uses=3] + %51 = sub i32 %11, %50 ; [#uses=2] + %52 = icmp slt i32 %50, %51 ; [#uses=1] + %tmp.0.i = select i1 %52, i32 %50, i32 %51 ; [#uses=3] + %53 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([22 x i8]* @"\01LC1886", i32 0, i32 0), i32 %tmp.0.i) nounwind ; [#uses=0] + %.pre.i = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=1] + %54 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 3), align 4 ; [#uses=2] + %55 = getelementptr i8* %54, i32 %.pre.i ; [#uses=1] + tail call void @llvm.memcpy.i32(i8* %55, i8* %54, i32 %tmp.0.i, i32 1) nounwind + %56 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=1] + %57 = add i32 %56, %tmp.0.i ; [#uses=4] + store i32 %57, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 + %58 = icmp slt i32 %57, %11 ; [#uses=1] + br i1 %58, label %bb14.i, label %bb10 + +bb10: ; preds = %bb14.i, %bb7.i81 + %59 = phi i32 [ %48, %bb7.i81 ], [ %57, %bb14.i ] ; [#uses=1] + %60 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([31 x i8]* @"\01LC2189", i32 0, i32 0), i32 %59) nounwind ; [#uses=0] + %61 = shl i32 %input_size.0, 10 ; [#uses=1] + %62 = malloc i8, i32 %61 ; [#uses=3] + %63 = icmp eq i8* %62, null ; [#uses=1] + br i1 %63, label %bb11, label %bb14.preheader + +bb14.preheader: ; preds = %bb10 + %64 = icmp sgt i32 %11, 0 ; [#uses=1] + br i1 %64, label %bb13, label %bb15 + +bb11: ; preds = %bb10 + %65 = tail call i32 @puts(i8* getelementptr ([30 x i8]* @"\01LC2290", i32 0, i32 0)) nounwind ; [#uses=0] + ret i32 1 + +bb13: ; preds = %bb13, %bb14.preheader + %i.01 = phi i32 [ %68, %bb13 ], [ 0, %bb14.preheader ] ; [#uses=3] + %scevgep5 = getelementptr i8* %62, i32 %i.01 ; [#uses=1] + %tmp6 = mul i32 %i.01, 1027 ; [#uses=2] + %66 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 3), align 4 ; [#uses=1] + %scevgep7 = getelementptr i8* %66, i32 %tmp6 ; [#uses=1] + %67 = load i8* %scevgep7, align 1 ; [#uses=1] + store i8 %67, i8* %scevgep5, align 1 + %68 = add i32 %i.01, 1 ; [#uses=1] + %phitmp = add i32 %tmp6, 1027 ; [#uses=1] + %69 = icmp slt i32 %phitmp, %11 ; [#uses=1] + br i1 %69, label %bb13, label %bb15 + +bb15: ; preds = %bb13, %bb14.preheader + store i32 9, i32* @blockSize100k, align 4 + store i1 false, i1* @bsStream.b + %70 = malloc [900021 x i8] ; <[900021 x i8]*> [#uses=3] + %.sub.i = getelementptr [900021 x i8]* %70, i32 0, i32 0 ; [#uses=1] + store i8* %.sub.i, i8** @block, align 4 + %71 = malloc [900020 x i16] ; <[900020 x i16]*> [#uses=2] + %.sub1.i = getelementptr [900020 x i16]* %71, i32 0, i32 0 ; [#uses=1] + store i16* %.sub1.i, i16** @quadrant, align 4 + %72 = malloc [900000 x i32] ; <[900000 x i32]*> [#uses=3] + %.sub2.i = getelementptr [900000 x i32]* %72, i32 0, i32 0 ; [#uses=1] + store i32* %.sub2.i, i32** @zptr, align 4 + %73 = malloc [65537 x i32] ; <[65537 x i32]*> [#uses=2] + %.sub.i.i = getelementptr [65537 x i32]* %73, i32 0, i32 0 ; [#uses=1] + store i32* %.sub.i.i, i32** @ftab, align 4 + %74 = icmp eq [900021 x i8]* %70, null ; [#uses=1] + %75 = icmp eq [900020 x i16]* %71, null ; [#uses=1] + %76 = icmp eq [900000 x i32]* %72, null ; [#uses=1] + %77 = icmp eq [65537 x i32]* %73, null ; [#uses=1] + %or.cond.i.i = or i1 %75, %74 ; [#uses=1] + %or.cond2.i.i = or i1 %or.cond.i.i, %76 ; [#uses=1] + %or.cond3.i.i = or i1 %or.cond2.i.i, %77 ; [#uses=1] + br i1 %or.cond3.i.i, label %bb3.i.i, label %spec_initbufs.exit + +bb3.i.i: ; preds = %bb15 + %78 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] + %79 = tail call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %78, i8* getelementptr ([146 x i8]* @"\01LC5", i32 0, i32 0), i8* null, i32 6562209, i32 900000) nounwind ; [#uses=0] + %80 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] + %81 = tail call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %80, i8* getelementptr ([36 x i8]* @"\01LC", i32 0, i32 0), i8* getelementptr ([1024 x i8]* @inName, i32 0, i32 0), i8* getelementptr ([1024 x i8]* @outName, i32 0, i32 0)) nounwind ; [#uses=0] + tail call fastcc void @cleanUpAndFail(i32 1) nounwind ssp + unreachable + +spec_initbufs.exit: ; preds = %bb15 + %82 = getelementptr [900021 x i8]* %70, i32 0, i32 1 ; [#uses=1] + store i8* %82, i8** @block, align 4 + %83 = bitcast [900000 x i32]* %72 to i16* ; [#uses=1] + store i16* %83, i16** @szptr, align 4 + %84 = getelementptr [6 x i8]* %pos.i.i.i, i32 0, i32 0 ; [#uses=1] + %85 = getelementptr [256 x i8]* %yy.i.i, i32 0, i32 0 ; [#uses=2] + %86 = getelementptr [257 x i32]* %cftab.i.i, i32 0, i32 0 ; [#uses=1] + %87 = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 0 ; [#uses=1] + %88 = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 1 ; [#uses=1] + %89 = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 2 ; [#uses=1] + %90 = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 3 ; [#uses=1] + %91 = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 4 ; [#uses=1] + %92 = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 5 ; [#uses=1] + %93 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 0 ; [#uses=1] + %94 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 0 ; [#uses=1] + %95 = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 0 ; [#uses=1] + %96 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 1 ; [#uses=4] + %97 = getelementptr [6 x i8]* %pos.i.i, i32 0, i32 0 ; [#uses=2] + br label %bb32 + +bb18: ; preds = %bb32 + %98 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([34 x i8]* @"\01LC2391", i32 0, i32 0), i32 %level.0) nounwind ; [#uses=0] + store i32 %level.0, i32* @blockSize100k, align 4 + store i1 true, i1* @bsStream.b + store i32 0, i32* @bsLive, align 4 + store i32 0, i32* @bsBuff, align 4 + store i32 0, i32* @bytesIn, align 4 + br label %bb1.i.i9 + +bb.i.i8: ; preds = %bb1.i.i9 + %99 = lshr i32 %110, 24 ; [#uses=1] + %100 = trunc i32 %99 to i8 ; [#uses=1] + %101 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 3), align 4 ; [#uses=1] + %102 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 ; [#uses=2] + %103 = getelementptr i8* %101, i32 %102 ; [#uses=1] + store i8 %100, i8* %103, align 1 + %104 = add i32 %102, 1 ; [#uses=1] + store i32 %104, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 + %105 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 1), align 4 ; [#uses=1] + %106 = add i32 %105, 1 ; [#uses=1] + store i32 %106, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 1), align 4 + %107 = shl i32 %bsBuff.tmp.0496, 8 ; [#uses=2] + %108 = add i32 %bsLive.tmp.0497, -8 ; [#uses=3] + %phitmp86 = icmp sgt i32 %108, 7 ; [#uses=1] + br label %bb1.i.i9 + +bb1.i.i9: ; preds = %bb.i.i8, %bb18 + %bsLive.tmp.0497 = phi i32 [ 0, %bb18 ], [ %108, %bb.i.i8 ] ; [#uses=1] + %bsBuff.tmp.0496 = phi i32 [ 0, %bb18 ], [ %107, %bb.i.i8 ] ; [#uses=2] + %109 = phi i32 [ %108, %bb.i.i8 ], [ 0, %bb18 ] ; [#uses=2] + %110 = phi i32 [ %107, %bb.i.i8 ], [ 0, %bb18 ] ; [#uses=1] + %111 = phi i1 [ %phitmp86, %bb.i.i8 ], [ false, %bb18 ] ; [#uses=1] + br i1 %111, label %bb.i.i8, label %bsW.exit.i + +bsW.exit.i: ; preds = %bb1.i.i9 + %112 = sub i32 24, %109 ; [#uses=1] + %113 = shl i32 66, %112 ; [#uses=1] + %114 = or i32 %113, %bsBuff.tmp.0496 ; [#uses=3] + store i32 %114, i32* @bsBuff, align 4 + %115 = add i32 %109, 8 ; [#uses=4] + store i32 %115, i32* @bsLive, align 4 + %.b.i68.i = load i1* @bsStream.b ; [#uses=1] + %116 = zext i1 %.b.i68.i to i32 ; [#uses=3] + %117 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %116, i32 3 ; [#uses=1] + %118 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %116, i32 2 ; [#uses=2] + %119 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %116, i32 1 ; [#uses=2] + br label %bb1.i70.i + +bb.i69.i: ; preds = %bb1.i70.i + %120 = lshr i32 %131, 24 ; [#uses=1] + %121 = trunc i32 %120 to i8 ; [#uses=1] + %122 = load i8** %117, align 4 ; [#uses=1] + %123 = load i32* %118, align 8 ; [#uses=2] + %124 = getelementptr i8* %122, i32 %123 ; [#uses=1] + store i8 %121, i8* %124, align 1 + %125 = add i32 %123, 1 ; [#uses=1] + store i32 %125, i32* %118, align 8 + %126 = load i32* %119, align 4 ; [#uses=1] + %127 = add i32 %126, 1 ; [#uses=1] + store i32 %127, i32* %119, align 4 + %128 = shl i32 %bsBuff.tmp.0500, 8 ; [#uses=2] + %129 = add i32 %bsLive.tmp.0501, -8 ; [#uses=3] + br label %bb1.i70.i + +bb1.i70.i: ; preds = %bb.i69.i, %bsW.exit.i + %bsLive.tmp.0501 = phi i32 [ %115, %bsW.exit.i ], [ %129, %bb.i69.i ] ; [#uses=1] + %bsBuff.tmp.0500 = phi i32 [ %114, %bsW.exit.i ], [ %128, %bb.i69.i ] ; [#uses=2] + %130 = phi i32 [ %129, %bb.i69.i ], [ %115, %bsW.exit.i ] ; [#uses=2] + %131 = phi i32 [ %128, %bb.i69.i ], [ %114, %bsW.exit.i ] ; [#uses=1] + %132 = phi i32 [ %129, %bb.i69.i ], [ %115, %bsW.exit.i ] ; [#uses=1] + %133 = icmp sgt i32 %132, 7 ; [#uses=1] + br i1 %133, label %bb.i69.i, label %bsW.exit71.i + +bsW.exit71.i: ; preds = %bb1.i70.i + %134 = sub i32 24, %130 ; [#uses=1] + %135 = shl i32 90, %134 ; [#uses=1] + %136 = or i32 %135, %bsBuff.tmp.0500 ; [#uses=3] + store i32 %136, i32* @bsBuff, align 4 + %137 = add i32 %130, 8 ; [#uses=4] + store i32 %137, i32* @bsLive, align 4 + %.b.i75.i = load i1* @bsStream.b ; [#uses=1] + %138 = zext i1 %.b.i75.i to i32 ; [#uses=3] + %139 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %138, i32 3 ; [#uses=1] + %140 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %138, i32 2 ; [#uses=2] + %141 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %138, i32 1 ; [#uses=2] + br label %bb1.i78.i + +bb.i76.i: ; preds = %bb1.i78.i + %142 = lshr i32 %153, 24 ; [#uses=1] + %143 = trunc i32 %142 to i8 ; [#uses=1] + %144 = load i8** %139, align 4 ; [#uses=1] + %145 = load i32* %140, align 8 ; [#uses=2] + %146 = getelementptr i8* %144, i32 %145 ; [#uses=1] + store i8 %143, i8* %146, align 1 + %147 = add i32 %145, 1 ; [#uses=1] + store i32 %147, i32* %140, align 8 + %148 = load i32* %141, align 4 ; [#uses=1] + %149 = add i32 %148, 1 ; [#uses=1] + store i32 %149, i32* %141, align 4 + %150 = shl i32 %bsBuff.tmp.0504, 8 ; [#uses=2] + %151 = add i32 %bsLive.tmp.0505, -8 ; [#uses=3] + br label %bb1.i78.i + +bb1.i78.i: ; preds = %bb.i76.i, %bsW.exit71.i + %bsLive.tmp.0505 = phi i32 [ %137, %bsW.exit71.i ], [ %151, %bb.i76.i ] ; [#uses=1] + %bsBuff.tmp.0504 = phi i32 [ %136, %bsW.exit71.i ], [ %150, %bb.i76.i ] ; [#uses=2] + %152 = phi i32 [ %151, %bb.i76.i ], [ %137, %bsW.exit71.i ] ; [#uses=2] + %153 = phi i32 [ %150, %bb.i76.i ], [ %136, %bsW.exit71.i ] ; [#uses=1] + %154 = phi i32 [ %151, %bb.i76.i ], [ %137, %bsW.exit71.i ] ; [#uses=1] + %155 = icmp sgt i32 %154, 7 ; [#uses=1] + br i1 %155, label %bb.i76.i, label %bsW.exit79.i + +bsW.exit79.i: ; preds = %bb1.i78.i + %156 = sub i32 24, %152 ; [#uses=1] + %157 = shl i32 104, %156 ; [#uses=1] + %158 = or i32 %157, %bsBuff.tmp.0504 ; [#uses=3] + store i32 %158, i32* @bsBuff, align 4 + %159 = add i32 %152, 8 ; [#uses=4] + store i32 %159, i32* @bsLive, align 4 + %160 = load i32* @blockSize100k, align 4 ; [#uses=1] + %161 = add i32 %160, 48 ; [#uses=1] + %162 = and i32 %161, 255 ; [#uses=1] + %.b.i189.i = load i1* @bsStream.b ; [#uses=1] + %163 = zext i1 %.b.i189.i to i32 ; [#uses=3] + %164 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %163, i32 3 ; [#uses=1] + %165 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %163, i32 2 ; [#uses=2] + %166 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %163, i32 1 ; [#uses=2] + br label %bb1.i192.i + +bb.i190.i: ; preds = %bb1.i192.i + %167 = lshr i32 %178, 24 ; [#uses=1] + %168 = trunc i32 %167 to i8 ; [#uses=1] + %169 = load i8** %164, align 4 ; [#uses=1] + %170 = load i32* %165, align 8 ; [#uses=2] + %171 = getelementptr i8* %169, i32 %170 ; [#uses=1] + store i8 %168, i8* %171, align 1 + %172 = add i32 %170, 1 ; [#uses=1] + store i32 %172, i32* %165, align 8 + %173 = load i32* %166, align 4 ; [#uses=1] + %174 = add i32 %173, 1 ; [#uses=1] + store i32 %174, i32* %166, align 4 + %175 = shl i32 %bsBuff.tmp.0508, 8 ; [#uses=2] + %176 = add i32 %bsLive.tmp.0509, -8 ; [#uses=3] + br label %bb1.i192.i + +bb1.i192.i: ; preds = %bb.i190.i, %bsW.exit79.i + %bsLive.tmp.0509 = phi i32 [ %159, %bsW.exit79.i ], [ %176, %bb.i190.i ] ; [#uses=1] + %bsBuff.tmp.0508 = phi i32 [ %158, %bsW.exit79.i ], [ %175, %bb.i190.i ] ; [#uses=2] + %177 = phi i32 [ %176, %bb.i190.i ], [ %159, %bsW.exit79.i ] ; [#uses=2] + %178 = phi i32 [ %175, %bb.i190.i ], [ %158, %bsW.exit79.i ] ; [#uses=1] + %179 = phi i32 [ %176, %bb.i190.i ], [ %159, %bsW.exit79.i ] ; [#uses=1] + %180 = icmp sgt i32 %179, 7 ; [#uses=1] + br i1 %180, label %bb.i190.i, label %bsW.exit193.i + +bsW.exit193.i: ; preds = %bb1.i192.i + %181 = sub i32 24, %177 ; [#uses=1] + %182 = shl i32 %162, %181 ; [#uses=1] + %183 = or i32 %182, %bsBuff.tmp.0508 ; [#uses=1] + store i32 %183, i32* @bsBuff, align 4 + %184 = add i32 %177, 8 ; [#uses=1] + store i32 %184, i32* @bsLive, align 4 + store i32 -1, i32* @globalCrc, align 4 + tail call fastcc void @loadAndRLEsource() nounwind ssp + %185 = load i32* @last, align 4 ; [#uses=2] + %186 = icmp eq i32 %185, -1 ; [#uses=1] + br i1 %186, label %bb8.i70, label %bb2.i11 + +bb2.i11: ; preds = %sendMTFValues.exit.i, %bsW.exit193.i + %187 = phi i32 [ %1058, %sendMTFValues.exit.i ], [ %185, %bsW.exit193.i ] ; [#uses=1] + %combinedCRC.01.i = phi i32 [ %192, %sendMTFValues.exit.i ], [ 0, %bsW.exit193.i ] ; [#uses=2] + %188 = load i32* @globalCrc, align 4 ; [#uses=1] + %not.i.i10 = xor i32 %188, -1 ; [#uses=5] + %189 = lshr i32 %combinedCRC.01.i, 31 ; [#uses=1] + %190 = shl i32 %combinedCRC.01.i, 1 ; [#uses=1] + %191 = or i32 %189, %190 ; [#uses=1] + %192 = xor i32 %191, %not.i.i10 ; [#uses=2] + %193 = mul i32 %187, 30 ; [#uses=1] + store i32 %193, i32* @workLimit, align 4 + store i32 0, i32* @workDone, align 4 + store i1 true, i1* @firstAttempt.b + tail call fastcc void @sortIt() nounwind ssp + %194 = load i32* @workDone, align 4 ; [#uses=1] + %195 = load i32* @workLimit, align 4 ; [#uses=1] + %196 = icmp sgt i32 %194, %195 ; [#uses=1] + br i1 %196, label %bb4.i174.i, label %bb9.i182.i + +bb4.i174.i: ; preds = %bb2.i11 + %.b.i173.i = load i1* @firstAttempt.b ; [#uses=1] + br i1 %.b.i173.i, label %bb.i.i176.i, label %bb9.i182.i + +bb.i.i176.i: ; preds = %bb.i.i176.i, %bb4.i174.i + %i.04.i.i.i = phi i32 [ %197, %bb.i.i176.i ], [ 0, %bb4.i174.i ] ; [#uses=2] + %scevgep8.i.i.i = getelementptr [256 x i8]* @inUse, i32 0, i32 %i.04.i.i.i ; [#uses=1] + store i8 0, i8* %scevgep8.i.i.i, align 1 + %197 = add i32 %i.04.i.i.i, 1 ; [#uses=2] + %exitcond.i175.i = icmp eq i32 %197, 256 ; [#uses=1] + br i1 %exitcond.i175.i, label %bb7.loopexit.i.i.i, label %bb.i.i176.i + +bb3.i.i178.i: ; preds = %bb3.i.i178.i.preheader, %bb6.i.i.i14 + %rTPos.13.i.i.i = phi i32 [ %rTPos.0.i.i.i, %bb6.i.i.i14 ], [ 0, %bb3.i.i178.i.preheader ] ; [#uses=3] + %rNToGo.12.i.i.i = phi i32 [ %203, %bb6.i.i.i14 ], [ 0, %bb3.i.i178.i.preheader ] ; [#uses=2] + %i.11.i.i.i = phi i32 [ %tmp.i.i177.i, %bb6.i.i.i14 ], [ 0, %bb3.i.i178.i.preheader ] ; [#uses=2] + %tmp.i.i177.i = add i32 %i.11.i.i.i, 1 ; [#uses=2] + %198 = icmp eq i32 %rNToGo.12.i.i.i, 0 ; [#uses=1] + br i1 %198, label %bb4.i.i.i13, label %bb6.i.i.i14 + +bb4.i.i.i13: ; preds = %bb3.i.i178.i + %199 = getelementptr [512 x i32]* @rNums, i32 0, i32 %rTPos.13.i.i.i ; [#uses=1] + %200 = load i32* %199, align 4 ; [#uses=2] + %201 = add i32 %rTPos.13.i.i.i, 1 ; [#uses=2] + %202 = icmp eq i32 %201, 512 ; [#uses=1] + br i1 %202, label %bb5.i.i179.i, label %bb6.i.i.i14 + +bb5.i.i179.i: ; preds = %bb4.i.i.i13 + br label %bb6.i.i.i14 + +bb6.i.i.i14: ; preds = %bb5.i.i179.i, %bb4.i.i.i13, %bb3.i.i178.i + %rNToGo.0.i.i.i = phi i32 [ %200, %bb5.i.i179.i ], [ %rNToGo.12.i.i.i, %bb3.i.i178.i ], [ %200, %bb4.i.i.i13 ] ; [#uses=1] + %rTPos.0.i.i.i = phi i32 [ 0, %bb5.i.i179.i ], [ %rTPos.13.i.i.i, %bb3.i.i178.i ], [ %201, %bb4.i.i.i13 ] ; [#uses=1] + %203 = add i32 %rNToGo.0.i.i.i, -1 ; [#uses=2] + %scevgep.i180.i = getelementptr i8* %213, i32 %i.11.i.i.i ; [#uses=2] + %204 = load i8* %scevgep.i180.i, align 1 ; [#uses=1] + %205 = icmp eq i32 %203, 1 ; [#uses=1] + %206 = zext i1 %205 to i8 ; [#uses=1] + %207 = xor i8 %204, %206 ; [#uses=2] + store i8 %207, i8* %scevgep.i180.i, align 1 + %208 = zext i8 %207 to i32 ; [#uses=1] + %209 = getelementptr [256 x i8]* @inUse, i32 0, i32 %208 ; [#uses=1] + store i8 1, i8* %209, align 1 + %210 = icmp sgt i32 %tmp.i.i177.i, %211 ; [#uses=1] + br i1 %210, label %randomiseBlock.exit.i.i, label %bb3.i.i178.i + +bb7.loopexit.i.i.i: ; preds = %bb.i.i176.i + %211 = load i32* @last, align 4 ; [#uses=2] + %212 = icmp slt i32 %211, 0 ; [#uses=1] + br i1 %212, label %randomiseBlock.exit.i.i, label %bb3.i.i178.i.preheader + +bb3.i.i178.i.preheader: ; preds = %bb7.loopexit.i.i.i + %213 = load i8** @block, align 4 ; [#uses=1] + br label %bb3.i.i178.i + +randomiseBlock.exit.i.i: ; preds = %bb7.loopexit.i.i.i, %bb6.i.i.i14 + store i32 0, i32* @workDone, align 4 + store i32 0, i32* @workLimit, align 4 + store i1 false, i1* @firstAttempt.b + tail call fastcc void @sortIt() nounwind ssp + br label %bb9.i182.i + +bb9.i182.i: ; preds = %randomiseBlock.exit.i.i, %bb4.i174.i, %bb2.i11 + %blockRandomised.0 = phi i8 [ 1, %randomiseBlock.exit.i.i ], [ 0, %bb4.i174.i ], [ 0, %bb2.i11 ] ; [#uses=1] + %214 = load i32* @last, align 4 ; [#uses=1] + %215 = load i32** @zptr, align 4 ; [#uses=1] + br label %bb13.i.i16 + +bb10.i183.i: ; preds = %bb13.i.i16 + %scevgep4.i.i = getelementptr i32* %215, i32 %219 ; [#uses=1] + %216 = load i32* %scevgep4.i.i, align 4 ; [#uses=1] + %217 = icmp eq i32 %216, 0 ; [#uses=1] + br i1 %217, label %bb14.i185.i, label %bb12.i184.i + +bb12.i184.i: ; preds = %bb10.i183.i + %218 = add i32 %219, 1 ; [#uses=1] + br label %bb13.i.i16 + +bb13.i.i16: ; preds = %bb12.i184.i, %bb9.i182.i + %219 = phi i32 [ 0, %bb9.i182.i ], [ %218, %bb12.i184.i ] ; [#uses=5] + %220 = icmp sgt i32 %219, %214 ; [#uses=1] + br i1 %220, label %bb15.i186.i, label %bb10.i183.i + +bb14.i185.i: ; preds = %bb10.i183.i + %221 = icmp eq i32 %219, -1 ; [#uses=1] + br i1 %221, label %bb15.i186.i, label %doReversibleTransformation.exit.i + +bb15.i186.i: ; preds = %bb14.i185.i, %bb13.i.i16 + tail call fastcc void @panic(i8* getelementptr ([27 x i8]* @"\01LC32", i32 0, i32 0)) nounwind ssp + unreachable + +doReversibleTransformation.exit.i: ; preds = %bb14.i185.i + %.pr.i164.i = load i32* @bsLive ; [#uses=3] + %.pre.i165.i = load i32* @bsBuff, align 4 ; [#uses=2] + %.b.i166.i = load i1* @bsStream.b ; [#uses=1] + %222 = zext i1 %.b.i166.i to i32 ; [#uses=3] + %223 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %222, i32 3 ; [#uses=1] + %224 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %222, i32 2 ; [#uses=2] + %225 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %222, i32 1 ; [#uses=2] + br label %bb1.i169.i + +bb.i167.i: ; preds = %bb1.i169.i + %226 = lshr i32 %237, 24 ; [#uses=1] + %227 = trunc i32 %226 to i8 ; [#uses=1] + %228 = load i8** %223, align 4 ; [#uses=1] + %229 = load i32* %224, align 8 ; [#uses=2] + %230 = getelementptr i8* %228, i32 %229 ; [#uses=1] + store i8 %227, i8* %230, align 1 + %231 = add i32 %229, 1 ; [#uses=1] + store i32 %231, i32* %224, align 8 + %232 = load i32* %225, align 4 ; [#uses=1] + %233 = add i32 %232, 1 ; [#uses=1] + store i32 %233, i32* %225, align 4 + %234 = shl i32 %bsBuff.tmp.0408, 8 ; [#uses=2] + %235 = add i32 %bsLive.tmp.0409, -8 ; [#uses=3] + br label %bb1.i169.i + +bb1.i169.i: ; preds = %bb.i167.i, %doReversibleTransformation.exit.i + %bsLive.tmp.0409 = phi i32 [ %.pr.i164.i, %doReversibleTransformation.exit.i ], [ %235, %bb.i167.i ] ; [#uses=1] + %bsBuff.tmp.0408 = phi i32 [ %.pre.i165.i, %doReversibleTransformation.exit.i ], [ %234, %bb.i167.i ] ; [#uses=2] + %236 = phi i32 [ %235, %bb.i167.i ], [ %.pr.i164.i, %doReversibleTransformation.exit.i ] ; [#uses=2] + %237 = phi i32 [ %234, %bb.i167.i ], [ %.pre.i165.i, %doReversibleTransformation.exit.i ] ; [#uses=1] + %238 = phi i32 [ %235, %bb.i167.i ], [ %.pr.i164.i, %doReversibleTransformation.exit.i ] ; [#uses=1] + %239 = icmp sgt i32 %238, 7 ; [#uses=1] + br i1 %239, label %bb.i167.i, label %bsW.exit170.i + +bsW.exit170.i: ; preds = %bb1.i169.i + %240 = sub i32 24, %236 ; [#uses=1] + %241 = shl i32 49, %240 ; [#uses=1] + %242 = or i32 %241, %bsBuff.tmp.0408 ; [#uses=3] + store i32 %242, i32* @bsBuff, align 4 + %243 = add i32 %236, 8 ; [#uses=4] + store i32 %243, i32* @bsLive, align 4 + %.b.i159.i = load i1* @bsStream.b ; [#uses=1] + %244 = zext i1 %.b.i159.i to i32 ; [#uses=3] + %245 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %244, i32 3 ; [#uses=1] + %246 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %244, i32 2 ; [#uses=2] + %247 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %244, i32 1 ; [#uses=2] + br label %bb1.i162.i + +bb.i160.i: ; preds = %bb1.i162.i + %248 = lshr i32 %259, 24 ; [#uses=1] + %249 = trunc i32 %248 to i8 ; [#uses=1] + %250 = load i8** %245, align 4 ; [#uses=1] + %251 = load i32* %246, align 8 ; [#uses=2] + %252 = getelementptr i8* %250, i32 %251 ; [#uses=1] + store i8 %249, i8* %252, align 1 + %253 = add i32 %251, 1 ; [#uses=1] + store i32 %253, i32* %246, align 8 + %254 = load i32* %247, align 4 ; [#uses=1] + %255 = add i32 %254, 1 ; [#uses=1] + store i32 %255, i32* %247, align 4 + %256 = shl i32 %bsBuff.tmp.0412, 8 ; [#uses=2] + %257 = add i32 %bsLive.tmp.0413, -8 ; [#uses=3] + br label %bb1.i162.i + +bb1.i162.i: ; preds = %bb.i160.i, %bsW.exit170.i + %bsLive.tmp.0413 = phi i32 [ %243, %bsW.exit170.i ], [ %257, %bb.i160.i ] ; [#uses=1] + %bsBuff.tmp.0412 = phi i32 [ %242, %bsW.exit170.i ], [ %256, %bb.i160.i ] ; [#uses=2] + %258 = phi i32 [ %257, %bb.i160.i ], [ %243, %bsW.exit170.i ] ; [#uses=2] + %259 = phi i32 [ %256, %bb.i160.i ], [ %242, %bsW.exit170.i ] ; [#uses=1] + %260 = phi i32 [ %257, %bb.i160.i ], [ %243, %bsW.exit170.i ] ; [#uses=1] + %261 = icmp sgt i32 %260, 7 ; [#uses=1] + br i1 %261, label %bb.i160.i, label %bsW.exit163.i + +bsW.exit163.i: ; preds = %bb1.i162.i + %262 = sub i32 24, %258 ; [#uses=1] + %263 = shl i32 65, %262 ; [#uses=1] + %264 = or i32 %263, %bsBuff.tmp.0412 ; [#uses=3] + store i32 %264, i32* @bsBuff, align 4 + %265 = add i32 %258, 8 ; [#uses=4] + store i32 %265, i32* @bsLive, align 4 + %.b.i152.i = load i1* @bsStream.b ; [#uses=1] + %266 = zext i1 %.b.i152.i to i32 ; [#uses=3] + %267 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %266, i32 3 ; [#uses=1] + %268 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %266, i32 2 ; [#uses=2] + %269 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %266, i32 1 ; [#uses=2] + br label %bb1.i155.i + +bb.i153.i: ; preds = %bb1.i155.i + %270 = lshr i32 %281, 24 ; [#uses=1] + %271 = trunc i32 %270 to i8 ; [#uses=1] + %272 = load i8** %267, align 4 ; [#uses=1] + %273 = load i32* %268, align 8 ; [#uses=2] + %274 = getelementptr i8* %272, i32 %273 ; [#uses=1] + store i8 %271, i8* %274, align 1 + %275 = add i32 %273, 1 ; [#uses=1] + store i32 %275, i32* %268, align 8 + %276 = load i32* %269, align 4 ; [#uses=1] + %277 = add i32 %276, 1 ; [#uses=1] + store i32 %277, i32* %269, align 4 + %278 = shl i32 %bsBuff.tmp.0416, 8 ; [#uses=2] + %279 = add i32 %bsLive.tmp.0417, -8 ; [#uses=3] + br label %bb1.i155.i + +bb1.i155.i: ; preds = %bb.i153.i, %bsW.exit163.i + %bsLive.tmp.0417 = phi i32 [ %265, %bsW.exit163.i ], [ %279, %bb.i153.i ] ; [#uses=1] + %bsBuff.tmp.0416 = phi i32 [ %264, %bsW.exit163.i ], [ %278, %bb.i153.i ] ; [#uses=2] + %280 = phi i32 [ %279, %bb.i153.i ], [ %265, %bsW.exit163.i ] ; [#uses=2] + %281 = phi i32 [ %278, %bb.i153.i ], [ %264, %bsW.exit163.i ] ; [#uses=1] + %282 = phi i32 [ %279, %bb.i153.i ], [ %265, %bsW.exit163.i ] ; [#uses=1] + %283 = icmp sgt i32 %282, 7 ; [#uses=1] + br i1 %283, label %bb.i153.i, label %bsW.exit156.i + +bsW.exit156.i: ; preds = %bb1.i155.i + %284 = sub i32 24, %280 ; [#uses=1] + %285 = shl i32 89, %284 ; [#uses=1] + %286 = or i32 %285, %bsBuff.tmp.0416 ; [#uses=3] + store i32 %286, i32* @bsBuff, align 4 + %287 = add i32 %280, 8 ; [#uses=4] + store i32 %287, i32* @bsLive, align 4 + %.b.i145.i = load i1* @bsStream.b ; [#uses=1] + %288 = zext i1 %.b.i145.i to i32 ; [#uses=3] + %289 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %288, i32 3 ; [#uses=1] + %290 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %288, i32 2 ; [#uses=2] + %291 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %288, i32 1 ; [#uses=2] + br label %bb1.i148.i + +bb.i146.i: ; preds = %bb1.i148.i + %292 = lshr i32 %303, 24 ; [#uses=1] + %293 = trunc i32 %292 to i8 ; [#uses=1] + %294 = load i8** %289, align 4 ; [#uses=1] + %295 = load i32* %290, align 8 ; [#uses=2] + %296 = getelementptr i8* %294, i32 %295 ; [#uses=1] + store i8 %293, i8* %296, align 1 + %297 = add i32 %295, 1 ; [#uses=1] + store i32 %297, i32* %290, align 8 + %298 = load i32* %291, align 4 ; [#uses=1] + %299 = add i32 %298, 1 ; [#uses=1] + store i32 %299, i32* %291, align 4 + %300 = shl i32 %bsBuff.tmp.0420, 8 ; [#uses=2] + %301 = add i32 %bsLive.tmp.0421, -8 ; [#uses=3] + br label %bb1.i148.i + +bb1.i148.i: ; preds = %bb.i146.i, %bsW.exit156.i + %bsLive.tmp.0421 = phi i32 [ %287, %bsW.exit156.i ], [ %301, %bb.i146.i ] ; [#uses=1] + %bsBuff.tmp.0420 = phi i32 [ %286, %bsW.exit156.i ], [ %300, %bb.i146.i ] ; [#uses=2] + %302 = phi i32 [ %301, %bb.i146.i ], [ %287, %bsW.exit156.i ] ; [#uses=2] + %303 = phi i32 [ %300, %bb.i146.i ], [ %286, %bsW.exit156.i ] ; [#uses=1] + %304 = phi i32 [ %301, %bb.i146.i ], [ %287, %bsW.exit156.i ] ; [#uses=1] + %305 = icmp sgt i32 %304, 7 ; [#uses=1] + br i1 %305, label %bb.i146.i, label %bsW.exit149.i + +bsW.exit149.i: ; preds = %bb1.i148.i + %306 = sub i32 24, %302 ; [#uses=1] + %307 = shl i32 38, %306 ; [#uses=1] + %308 = or i32 %307, %bsBuff.tmp.0420 ; [#uses=3] + store i32 %308, i32* @bsBuff, align 4 + %309 = add i32 %302, 8 ; [#uses=4] + store i32 %309, i32* @bsLive, align 4 + %.b.i138.i = load i1* @bsStream.b ; [#uses=1] + %310 = zext i1 %.b.i138.i to i32 ; [#uses=3] + %311 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %310, i32 3 ; [#uses=1] + %312 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %310, i32 2 ; [#uses=2] + %313 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %310, i32 1 ; [#uses=2] + br label %bb1.i141.i + +bb.i139.i: ; preds = %bb1.i141.i + %314 = lshr i32 %325, 24 ; [#uses=1] + %315 = trunc i32 %314 to i8 ; [#uses=1] + %316 = load i8** %311, align 4 ; [#uses=1] + %317 = load i32* %312, align 8 ; [#uses=2] + %318 = getelementptr i8* %316, i32 %317 ; [#uses=1] + store i8 %315, i8* %318, align 1 + %319 = add i32 %317, 1 ; [#uses=1] + store i32 %319, i32* %312, align 8 + %320 = load i32* %313, align 4 ; [#uses=1] + %321 = add i32 %320, 1 ; [#uses=1] + store i32 %321, i32* %313, align 4 + %322 = shl i32 %bsBuff.tmp.0424, 8 ; [#uses=2] + %323 = add i32 %bsLive.tmp.0425, -8 ; [#uses=3] + br label %bb1.i141.i + +bb1.i141.i: ; preds = %bb.i139.i, %bsW.exit149.i + %bsLive.tmp.0425 = phi i32 [ %309, %bsW.exit149.i ], [ %323, %bb.i139.i ] ; [#uses=1] + %bsBuff.tmp.0424 = phi i32 [ %308, %bsW.exit149.i ], [ %322, %bb.i139.i ] ; [#uses=2] + %324 = phi i32 [ %323, %bb.i139.i ], [ %309, %bsW.exit149.i ] ; [#uses=2] + %325 = phi i32 [ %322, %bb.i139.i ], [ %308, %bsW.exit149.i ] ; [#uses=1] + %326 = phi i32 [ %323, %bb.i139.i ], [ %309, %bsW.exit149.i ] ; [#uses=1] + %327 = icmp sgt i32 %326, 7 ; [#uses=1] + br i1 %327, label %bb.i139.i, label %bsW.exit142.i + +bsW.exit142.i: ; preds = %bb1.i141.i + %328 = sub i32 24, %324 ; [#uses=1] + %329 = shl i32 83, %328 ; [#uses=1] + %330 = or i32 %329, %bsBuff.tmp.0424 ; [#uses=3] + store i32 %330, i32* @bsBuff, align 4 + %331 = add i32 %324, 8 ; [#uses=4] + store i32 %331, i32* @bsLive, align 4 + %.b.i131.i = load i1* @bsStream.b ; [#uses=1] + %332 = zext i1 %.b.i131.i to i32 ; [#uses=3] + %333 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %332, i32 3 ; [#uses=1] + %334 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %332, i32 2 ; [#uses=2] + %335 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %332, i32 1 ; [#uses=2] + br label %bb1.i134.i + +bb.i132.i: ; preds = %bb1.i134.i + %336 = lshr i32 %347, 24 ; [#uses=1] + %337 = trunc i32 %336 to i8 ; [#uses=1] + %338 = load i8** %333, align 4 ; [#uses=1] + %339 = load i32* %334, align 8 ; [#uses=2] + %340 = getelementptr i8* %338, i32 %339 ; [#uses=1] + store i8 %337, i8* %340, align 1 + %341 = add i32 %339, 1 ; [#uses=1] + store i32 %341, i32* %334, align 8 + %342 = load i32* %335, align 4 ; [#uses=1] + %343 = add i32 %342, 1 ; [#uses=1] + store i32 %343, i32* %335, align 4 + %344 = shl i32 %bsBuff.tmp.0428, 8 ; [#uses=2] + %345 = add i32 %bsLive.tmp.0429, -8 ; [#uses=3] + br label %bb1.i134.i + +bb1.i134.i: ; preds = %bb.i132.i, %bsW.exit142.i + %bsLive.tmp.0429 = phi i32 [ %331, %bsW.exit142.i ], [ %345, %bb.i132.i ] ; [#uses=1] + %bsBuff.tmp.0428 = phi i32 [ %330, %bsW.exit142.i ], [ %344, %bb.i132.i ] ; [#uses=2] + %346 = phi i32 [ %345, %bb.i132.i ], [ %331, %bsW.exit142.i ] ; [#uses=2] + %347 = phi i32 [ %344, %bb.i132.i ], [ %330, %bsW.exit142.i ] ; [#uses=1] + %348 = phi i32 [ %345, %bb.i132.i ], [ %331, %bsW.exit142.i ] ; [#uses=1] + %349 = icmp sgt i32 %348, 7 ; [#uses=1] + br i1 %349, label %bb.i132.i, label %bsW.exit135.i + +bsW.exit135.i: ; preds = %bb1.i134.i + %350 = sub i32 24, %346 ; [#uses=1] + %351 = shl i32 89, %350 ; [#uses=1] + %352 = or i32 %351, %bsBuff.tmp.0428 ; [#uses=3] + store i32 %352, i32* @bsBuff, align 4 + %353 = add i32 %346, 8 ; [#uses=4] + store i32 %353, i32* @bsLive, align 4 + %354 = lshr i32 %not.i.i10, 24 ; [#uses=1] + %.b.i124.i = load i1* @bsStream.b ; [#uses=1] + %355 = zext i1 %.b.i124.i to i32 ; [#uses=3] + %356 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %355, i32 3 ; [#uses=1] + %357 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %355, i32 2 ; [#uses=2] + %358 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %355, i32 1 ; [#uses=2] + br label %bb1.i127.i + +bb.i125.i: ; preds = %bb1.i127.i + %359 = lshr i32 %370, 24 ; [#uses=1] + %360 = trunc i32 %359 to i8 ; [#uses=1] + %361 = load i8** %356, align 4 ; [#uses=1] + %362 = load i32* %357, align 8 ; [#uses=2] + %363 = getelementptr i8* %361, i32 %362 ; [#uses=1] + store i8 %360, i8* %363, align 1 + %364 = add i32 %362, 1 ; [#uses=1] + store i32 %364, i32* %357, align 8 + %365 = load i32* %358, align 4 ; [#uses=1] + %366 = add i32 %365, 1 ; [#uses=1] + store i32 %366, i32* %358, align 4 + %367 = shl i32 %bsBuff.tmp.0432, 8 ; [#uses=2] + %368 = add i32 %bsLive.tmp.0433, -8 ; [#uses=3] + br label %bb1.i127.i + +bb1.i127.i: ; preds = %bb.i125.i, %bsW.exit135.i + %bsLive.tmp.0433 = phi i32 [ %353, %bsW.exit135.i ], [ %368, %bb.i125.i ] ; [#uses=1] + %bsBuff.tmp.0432 = phi i32 [ %352, %bsW.exit135.i ], [ %367, %bb.i125.i ] ; [#uses=2] + %369 = phi i32 [ %368, %bb.i125.i ], [ %353, %bsW.exit135.i ] ; [#uses=2] + %370 = phi i32 [ %367, %bb.i125.i ], [ %352, %bsW.exit135.i ] ; [#uses=1] + %371 = phi i32 [ %368, %bb.i125.i ], [ %353, %bsW.exit135.i ] ; [#uses=1] + %372 = icmp sgt i32 %371, 7 ; [#uses=1] + br i1 %372, label %bb.i125.i, label %bsW.exit128.i + +bsW.exit128.i: ; preds = %bb1.i127.i + %373 = sub i32 24, %369 ; [#uses=1] + %374 = shl i32 %354, %373 ; [#uses=1] + %375 = or i32 %374, %bsBuff.tmp.0432 ; [#uses=3] + store i32 %375, i32* @bsBuff, align 4 + %376 = add i32 %369, 8 ; [#uses=4] + store i32 %376, i32* @bsLive, align 4 + %377 = lshr i32 %not.i.i10, 16 ; [#uses=1] + %378 = and i32 %377, 255 ; [#uses=1] + %.b.i117.i = load i1* @bsStream.b ; [#uses=1] + %379 = zext i1 %.b.i117.i to i32 ; [#uses=3] + %380 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %379, i32 3 ; [#uses=1] + %381 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %379, i32 2 ; [#uses=2] + %382 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %379, i32 1 ; [#uses=2] + br label %bb1.i120.i + +bb.i118.i: ; preds = %bb1.i120.i + %383 = lshr i32 %394, 24 ; [#uses=1] + %384 = trunc i32 %383 to i8 ; [#uses=1] + %385 = load i8** %380, align 4 ; [#uses=1] + %386 = load i32* %381, align 8 ; [#uses=2] + %387 = getelementptr i8* %385, i32 %386 ; [#uses=1] + store i8 %384, i8* %387, align 1 + %388 = add i32 %386, 1 ; [#uses=1] + store i32 %388, i32* %381, align 8 + %389 = load i32* %382, align 4 ; [#uses=1] + %390 = add i32 %389, 1 ; [#uses=1] + store i32 %390, i32* %382, align 4 + %391 = shl i32 %bsBuff.tmp.0436, 8 ; [#uses=2] + %392 = add i32 %bsLive.tmp.0437, -8 ; [#uses=3] + br label %bb1.i120.i + +bb1.i120.i: ; preds = %bb.i118.i, %bsW.exit128.i + %bsLive.tmp.0437 = phi i32 [ %376, %bsW.exit128.i ], [ %392, %bb.i118.i ] ; [#uses=1] + %bsBuff.tmp.0436 = phi i32 [ %375, %bsW.exit128.i ], [ %391, %bb.i118.i ] ; [#uses=2] + %393 = phi i32 [ %392, %bb.i118.i ], [ %376, %bsW.exit128.i ] ; [#uses=2] + %394 = phi i32 [ %391, %bb.i118.i ], [ %375, %bsW.exit128.i ] ; [#uses=1] + %395 = phi i32 [ %392, %bb.i118.i ], [ %376, %bsW.exit128.i ] ; [#uses=1] + %396 = icmp sgt i32 %395, 7 ; [#uses=1] + br i1 %396, label %bb.i118.i, label %bsW.exit121.i + +bsW.exit121.i: ; preds = %bb1.i120.i + %397 = sub i32 24, %393 ; [#uses=1] + %398 = shl i32 %378, %397 ; [#uses=1] + %399 = or i32 %398, %bsBuff.tmp.0436 ; [#uses=3] + store i32 %399, i32* @bsBuff, align 4 + %400 = add i32 %393, 8 ; [#uses=4] + store i32 %400, i32* @bsLive, align 4 + %401 = lshr i32 %not.i.i10, 8 ; [#uses=1] + %402 = and i32 %401, 255 ; [#uses=1] + %.b.i110.i = load i1* @bsStream.b ; [#uses=1] + %403 = zext i1 %.b.i110.i to i32 ; [#uses=3] + %404 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %403, i32 3 ; [#uses=1] + %405 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %403, i32 2 ; [#uses=2] + %406 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %403, i32 1 ; [#uses=2] + br label %bb1.i113.i + +bb.i111.i: ; preds = %bb1.i113.i + %407 = lshr i32 %418, 24 ; [#uses=1] + %408 = trunc i32 %407 to i8 ; [#uses=1] + %409 = load i8** %404, align 4 ; [#uses=1] + %410 = load i32* %405, align 8 ; [#uses=2] + %411 = getelementptr i8* %409, i32 %410 ; [#uses=1] + store i8 %408, i8* %411, align 1 + %412 = add i32 %410, 1 ; [#uses=1] + store i32 %412, i32* %405, align 8 + %413 = load i32* %406, align 4 ; [#uses=1] + %414 = add i32 %413, 1 ; [#uses=1] + store i32 %414, i32* %406, align 4 + %415 = shl i32 %bsBuff.tmp.0440, 8 ; [#uses=2] + %416 = add i32 %bsLive.tmp.0441, -8 ; [#uses=3] + br label %bb1.i113.i + +bb1.i113.i: ; preds = %bb.i111.i, %bsW.exit121.i + %bsLive.tmp.0441 = phi i32 [ %400, %bsW.exit121.i ], [ %416, %bb.i111.i ] ; [#uses=1] + %bsBuff.tmp.0440 = phi i32 [ %399, %bsW.exit121.i ], [ %415, %bb.i111.i ] ; [#uses=2] + %417 = phi i32 [ %416, %bb.i111.i ], [ %400, %bsW.exit121.i ] ; [#uses=2] + %418 = phi i32 [ %415, %bb.i111.i ], [ %399, %bsW.exit121.i ] ; [#uses=1] + %419 = phi i32 [ %416, %bb.i111.i ], [ %400, %bsW.exit121.i ] ; [#uses=1] + %420 = icmp sgt i32 %419, 7 ; [#uses=1] + br i1 %420, label %bb.i111.i, label %bsW.exit114.i + +bsW.exit114.i: ; preds = %bb1.i113.i + %421 = sub i32 24, %417 ; [#uses=1] + %422 = shl i32 %402, %421 ; [#uses=1] + %423 = or i32 %422, %bsBuff.tmp.0440 ; [#uses=3] + store i32 %423, i32* @bsBuff, align 4 + %424 = add i32 %417, 8 ; [#uses=4] + store i32 %424, i32* @bsLive, align 4 + %425 = and i32 %not.i.i10, 255 ; [#uses=1] + %.b.i103.i = load i1* @bsStream.b ; [#uses=1] + %426 = zext i1 %.b.i103.i to i32 ; [#uses=3] + %427 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %426, i32 3 ; [#uses=1] + %428 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %426, i32 2 ; [#uses=2] + %429 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %426, i32 1 ; [#uses=2] + br label %bb1.i106.i + +bb.i104.i: ; preds = %bb1.i106.i + %430 = lshr i32 %441, 24 ; [#uses=1] + %431 = trunc i32 %430 to i8 ; [#uses=1] + %432 = load i8** %427, align 4 ; [#uses=1] + %433 = load i32* %428, align 8 ; [#uses=2] + %434 = getelementptr i8* %432, i32 %433 ; [#uses=1] + store i8 %431, i8* %434, align 1 + %435 = add i32 %433, 1 ; [#uses=1] + store i32 %435, i32* %428, align 8 + %436 = load i32* %429, align 4 ; [#uses=1] + %437 = add i32 %436, 1 ; [#uses=1] + store i32 %437, i32* %429, align 4 + %438 = shl i32 %bsBuff.tmp.0444, 8 ; [#uses=2] + %439 = add i32 %bsLive.tmp.0445, -8 ; [#uses=3] + br label %bb1.i106.i + +bb1.i106.i: ; preds = %bb.i104.i, %bsW.exit114.i + %bsLive.tmp.0445 = phi i32 [ %424, %bsW.exit114.i ], [ %439, %bb.i104.i ] ; [#uses=1] + %bsBuff.tmp.0444 = phi i32 [ %423, %bsW.exit114.i ], [ %438, %bb.i104.i ] ; [#uses=2] + %440 = phi i32 [ %439, %bb.i104.i ], [ %424, %bsW.exit114.i ] ; [#uses=2] + %441 = phi i32 [ %438, %bb.i104.i ], [ %423, %bsW.exit114.i ] ; [#uses=1] + %442 = phi i32 [ %439, %bb.i104.i ], [ %424, %bsW.exit114.i ] ; [#uses=1] + %443 = icmp sgt i32 %442, 7 ; [#uses=1] + br i1 %443, label %bb.i104.i, label %bsW.exit107.i + +bsW.exit107.i: ; preds = %bb1.i106.i + %444 = sub i32 24, %440 ; [#uses=1] + %445 = shl i32 %425, %444 ; [#uses=1] + %446 = or i32 %445, %bsBuff.tmp.0444 ; [#uses=5] + store i32 %446, i32* @bsBuff, align 4 + %447 = add i32 %440, 8 ; [#uses=7] + store i32 %447, i32* @bsLive, align 4 + %448 = icmp eq i8 %blockRandomised.0, 0 ; [#uses=1] + %.b.i89.i = load i1* @bsStream.b ; [#uses=1] + %449 = zext i1 %.b.i89.i to i32 ; [#uses=3] + %450 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %449, i32 3 ; [#uses=2] + %451 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %449, i32 2 ; [#uses=4] + %452 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %449, i32 1 ; [#uses=4] + br i1 %448, label %bb1.i92.i, label %bb1.i99.i + +bb.i97.i: ; preds = %bb1.i99.i + %453 = lshr i32 %464, 24 ; [#uses=1] + %454 = trunc i32 %453 to i8 ; [#uses=1] + %455 = load i8** %450, align 4 ; [#uses=1] + %456 = load i32* %451, align 8 ; [#uses=2] + %457 = getelementptr i8* %455, i32 %456 ; [#uses=1] + store i8 %454, i8* %457, align 1 + %458 = add i32 %456, 1 ; [#uses=1] + store i32 %458, i32* %451, align 8 + %459 = load i32* %452, align 4 ; [#uses=1] + %460 = add i32 %459, 1 ; [#uses=1] + store i32 %460, i32* %452, align 4 + %461 = shl i32 %bsBuff.tmp.0448, 8 ; [#uses=2] + %462 = add i32 %bsLive.tmp.0449, -8 ; [#uses=3] + br label %bb1.i99.i + +bb1.i99.i: ; preds = %bb.i97.i, %bsW.exit107.i + %bsLive.tmp.0449 = phi i32 [ %462, %bb.i97.i ], [ %447, %bsW.exit107.i ] ; [#uses=1] + %bsBuff.tmp.0448 = phi i32 [ %461, %bb.i97.i ], [ %446, %bsW.exit107.i ] ; [#uses=2] + %463 = phi i32 [ %462, %bb.i97.i ], [ %447, %bsW.exit107.i ] ; [#uses=2] + %464 = phi i32 [ %461, %bb.i97.i ], [ %446, %bsW.exit107.i ] ; [#uses=1] + %465 = phi i32 [ %462, %bb.i97.i ], [ %447, %bsW.exit107.i ] ; [#uses=1] + %466 = icmp sgt i32 %465, 7 ; [#uses=1] + br i1 %466, label %bb.i97.i, label %bsW.exit100.i + +bsW.exit100.i: ; preds = %bb1.i99.i + %467 = sub i32 31, %463 ; [#uses=1] + %468 = shl i32 1, %467 ; [#uses=1] + %469 = or i32 %468, %bsBuff.tmp.0448 ; [#uses=2] + store i32 %469, i32* @bsBuff, align 4 + %470 = add i32 %463, 1 ; [#uses=2] + store i32 %470, i32* @bsLive, align 4 + br label %bb7.i18 + +bb.i90.i: ; preds = %bb1.i92.i + %471 = lshr i32 %482, 24 ; [#uses=1] + %472 = trunc i32 %471 to i8 ; [#uses=1] + %473 = load i8** %450, align 4 ; [#uses=1] + %474 = load i32* %451, align 8 ; [#uses=2] + %475 = getelementptr i8* %473, i32 %474 ; [#uses=1] + store i8 %472, i8* %475, align 1 + %476 = add i32 %474, 1 ; [#uses=1] + store i32 %476, i32* %451, align 8 + %477 = load i32* %452, align 4 ; [#uses=1] + %478 = add i32 %477, 1 ; [#uses=1] + store i32 %478, i32* %452, align 4 + %479 = shl i32 %bsBuff.tmp.0404, 8 ; [#uses=2] + %480 = add i32 %bsLive.tmp.0405, -8 ; [#uses=3] + br label %bb1.i92.i + +bb1.i92.i: ; preds = %bb.i90.i, %bsW.exit107.i + %bsLive.tmp.0405 = phi i32 [ %480, %bb.i90.i ], [ %447, %bsW.exit107.i ] ; [#uses=1] + %bsBuff.tmp.0404 = phi i32 [ %479, %bb.i90.i ], [ %446, %bsW.exit107.i ] ; [#uses=3] + %481 = phi i32 [ %480, %bb.i90.i ], [ %447, %bsW.exit107.i ] ; [#uses=1] + %482 = phi i32 [ %479, %bb.i90.i ], [ %446, %bsW.exit107.i ] ; [#uses=1] + %483 = phi i32 [ %480, %bb.i90.i ], [ %447, %bsW.exit107.i ] ; [#uses=1] + %484 = icmp sgt i32 %483, 7 ; [#uses=1] + br i1 %484, label %bb.i90.i, label %bsW.exit93.i + +bsW.exit93.i: ; preds = %bb1.i92.i + store i32 %bsBuff.tmp.0404, i32* @bsBuff + %485 = add i32 %481, 1 ; [#uses=2] + store i32 %485, i32* @bsLive, align 4 + br label %bb7.i18 + +bb7.i18: ; preds = %bsW.exit93.i, %bsW.exit100.i + %.pre.i81.i = phi i32 [ %bsBuff.tmp.0404, %bsW.exit93.i ], [ %469, %bsW.exit100.i ] ; [#uses=2] + %.pr.i80.i = phi i32 [ %485, %bsW.exit93.i ], [ %470, %bsW.exit100.i ] ; [#uses=3] + %.b.i82.i = load i1* @bsStream.b ; [#uses=1] + %486 = zext i1 %.b.i82.i to i32 ; [#uses=3] + %487 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %486, i32 3 ; [#uses=1] + %488 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %486, i32 2 ; [#uses=2] + %489 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %486, i32 1 ; [#uses=2] + br label %bb1.i85.i + +bb.i83.i: ; preds = %bb1.i85.i + %490 = lshr i32 %501, 24 ; [#uses=1] + %491 = trunc i32 %490 to i8 ; [#uses=1] + %492 = load i8** %487, align 4 ; [#uses=1] + %493 = load i32* %488, align 8 ; [#uses=2] + %494 = getelementptr i8* %492, i32 %493 ; [#uses=1] + store i8 %491, i8* %494, align 1 + %495 = add i32 %493, 1 ; [#uses=1] + store i32 %495, i32* %488, align 8 + %496 = load i32* %489, align 4 ; [#uses=1] + %497 = add i32 %496, 1 ; [#uses=1] + store i32 %497, i32* %489, align 4 + %498 = shl i32 %bsBuff.tmp.0452, 8 ; [#uses=2] + %499 = add i32 %bsLive.tmp.0453, -8 ; [#uses=3] + br label %bb1.i85.i + +bb1.i85.i: ; preds = %bb.i83.i, %bb7.i18 + %bsLive.tmp.0453 = phi i32 [ %.pr.i80.i, %bb7.i18 ], [ %499, %bb.i83.i ] ; [#uses=1] + %bsBuff.tmp.0452 = phi i32 [ %.pre.i81.i, %bb7.i18 ], [ %498, %bb.i83.i ] ; [#uses=2] + %500 = phi i32 [ %499, %bb.i83.i ], [ %.pr.i80.i, %bb7.i18 ] ; [#uses=2] + %501 = phi i32 [ %498, %bb.i83.i ], [ %.pre.i81.i, %bb7.i18 ] ; [#uses=1] + %502 = phi i32 [ %499, %bb.i83.i ], [ %.pr.i80.i, %bb7.i18 ] ; [#uses=1] + %503 = icmp sgt i32 %502, 7 ; [#uses=1] + br i1 %503, label %bb.i83.i, label %bsW.exit86.i + +bsW.exit86.i: ; preds = %bb1.i85.i + %504 = sub i32 8, %500 ; [#uses=1] + %505 = shl i32 %219, %504 ; [#uses=1] + %506 = or i32 %505, %bsBuff.tmp.0452 ; [#uses=1] + store i32 %506, i32* @bsBuff, align 4 + %507 = add i32 %500, 24 ; [#uses=1] + store i32 %507, i32* @bsLive, align 4 + tail call fastcc void @generateMTFValues() nounwind ssp + %508 = load i32* @nInUse, align 4 ; [#uses=4] + %509 = add i32 %508, 2 ; [#uses=20] + %510 = icmp sgt i32 %509, 0 ; [#uses=6] + br i1 %510, label %bb4.i.i19, label %bb8.i.i20 + +bb4.i.i19: ; preds = %bb4.i.i19, %bsW.exit86.i + %v.0107.i.i = phi i32 [ %511, %bb4.i.i19 ], [ 0, %bsW.exit86.i ] ; [#uses=2] + %scevgep268.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 0, i32 %v.0107.i.i ; [#uses=1] + store i8 15, i8* %scevgep268.i.i, align 1 + %511 = add i32 %v.0107.i.i, 1 ; [#uses=2] + %exitcond267.i.i = icmp eq i32 %511, %509 ; [#uses=1] + br i1 %exitcond267.i.i, label %bb4.1.i.i, label %bb4.i.i19 + +bb8.i.i20: ; preds = %bb4.5.i.i, %bsW.exit86.i + %512 = load i32* @nMTF, align 4 ; [#uses=8] + %513 = icmp sgt i32 %512, 0 ; [#uses=1] + br i1 %513, label %bb10.i.i21, label %bb9.i.i + +bb9.i.i: ; preds = %bb8.i.i20 + call fastcc void @panic(i8* getelementptr ([17 x i8]* @"\01LC35", i32 0, i32 0)) nounwind ssp + unreachable + +bb10.i.i21: ; preds = %bb8.i.i20 + %514 = icmp sgt i32 %512, 199 ; [#uses=1] + br i1 %514, label %bb12.i.i22, label %bb.nph106.i.i + +bb12.i.i22: ; preds = %bb10.i.i21 + %515 = icmp sgt i32 %512, 799 ; [#uses=1] + br i1 %515, label %bb.nph106.i.i, label %bb15.i.i24 + +bb15.i.i24: ; preds = %bb12.i.i22 + br label %bb.nph106.i.i + +bb.nph106.i.i: ; preds = %bb15.i.i24, %bb12.i.i22, %bb10.i.i21 + %nGroups.0.i.i.reg2mem.0 = phi i32 [ 4, %bb15.i.i24 ], [ 2, %bb10.i.i21 ], [ 6, %bb12.i.i22 ] ; [#uses=9] + %516 = add i32 %508, 1 ; [#uses=2] + %tmp254.i.i = mul i32 %nGroups.0.i.i.reg2mem.0, 258 ; [#uses=1] + %tmp255.i.i = add i32 %tmp254.i.i, -258 ; [#uses=1] + %tmp258.i.i = sub i32 0, %nGroups.0.i.i.reg2mem.0 ; [#uses=2] + %tmp259.i.i = icmp sgt i32 %tmp258.i.i, -1 ; [#uses=1] + %smax260.i.i = select i1 %tmp259.i.i, i32 %tmp258.i.i, i32 -1 ; [#uses=1] + %tmp261.i.i = add i32 %nGroups.0.i.i.reg2mem.0, %smax260.i.i ; [#uses=1] + %tmp262.i.i = add i32 %tmp261.i.i, 1 ; [#uses=1] + br label %bb16.i.i + +bb16.i.i: ; preds = %bb37.i.i32, %bb.nph106.i.i + %indvar251.i.i = phi i32 [ 0, %bb.nph106.i.i ], [ %indvar.next252.i.i, %bb37.i.i32 ] ; [#uses=5] + %gs.0105.i.i = phi i32 [ 0, %bb.nph106.i.i ], [ %540, %bb37.i.i32 ] ; [#uses=4] + %remF.0104.i.i = phi i32 [ %512, %bb.nph106.i.i ], [ %541, %bb37.i.i32 ] ; [#uses=2] + %tmp253.i.i = sub i32 0, %indvar251.i.i ; [#uses=1] + %nPart.0103.i.i = sub i32 %nGroups.0.i.i.reg2mem.0, %indvar251.i.i ; [#uses=2] + %517 = sdiv i32 %remF.0104.i.i, %nPart.0103.i.i ; [#uses=2] + %518 = add i32 %gs.0105.i.i, -1 ; [#uses=2] + %519 = icmp sgt i32 %517, 0 ; [#uses=1] + %520 = icmp sgt i32 %516, %518 ; [#uses=1] + %or.cond197.i.i = and i1 %519, %520 ; [#uses=1] + br i1 %or.cond197.i.i, label %bb17.i.i25, label %bb20.i.i27 + +bb17.i.i25: ; preds = %bb17.i.i25, %bb16.i.i + %indvar245.i.i = phi i32 [ %indvar.next246.i.i, %bb17.i.i25 ], [ 0, %bb16.i.i ] ; [#uses=2] + %aFreq.096.i.i = phi i32 [ %522, %bb17.i.i25 ], [ 0, %bb16.i.i ] ; [#uses=1] + %tmp247.i.i = add i32 %indvar245.i.i, %gs.0105.i.i ; [#uses=3] + %scevgep248.i.i = getelementptr [258 x i32]* @mtfFreq, i32 0, i32 %tmp247.i.i ; [#uses=1] + %521 = load i32* %scevgep248.i.i, align 4 ; [#uses=1] + %522 = add i32 %521, %aFreq.096.i.i ; [#uses=3] + %523 = icmp slt i32 %522, %517 ; [#uses=1] + %524 = icmp sgt i32 %516, %tmp247.i.i ; [#uses=1] + %or.cond1.i.i = and i1 %523, %524 ; [#uses=1] + %indvar.next246.i.i = add i32 %indvar245.i.i, 1 ; [#uses=1] + br i1 %or.cond1.i.i, label %bb17.i.i25, label %bb20.i.i27 + +bb20.i.i27: ; preds = %bb17.i.i25, %bb16.i.i + %aFreq.0.lcssa.i.i = phi i32 [ 0, %bb16.i.i ], [ %522, %bb17.i.i25 ] ; [#uses=3] + %ge.0.lcssa.i.i = phi i32 [ %518, %bb16.i.i ], [ %tmp247.i.i, %bb17.i.i25 ] ; [#uses=5] + %525 = icmp sgt i32 %ge.0.lcssa.i.i, %gs.0105.i.i ; [#uses=1] + %526 = icmp ne i32 %indvar251.i.i, 0 ; [#uses=1] + %527 = and i1 %525, %526 ; [#uses=1] + %.not.i.i = xor i1 %527, true ; [#uses=1] + %528 = icmp eq i32 %nPart.0103.i.i, 1 ; [#uses=1] + %or.cond.i.i26 = or i1 %528, %.not.i.i ; [#uses=1] + br i1 %or.cond.i.i26, label %bb26.i.i30, label %bb24.i.i28 + +bb24.i.i28: ; preds = %bb20.i.i27 + %529 = srem i32 %indvar251.i.i, 2 ; [#uses=1] + %530 = icmp eq i32 %529, 1 ; [#uses=1] + br i1 %530, label %bb25.i.i29, label %bb26.i.i30 + +bb25.i.i29: ; preds = %bb24.i.i28 + %531 = getelementptr [258 x i32]* @mtfFreq, i32 0, i32 %ge.0.lcssa.i.i ; [#uses=1] + %532 = load i32* %531, align 4 ; [#uses=1] + %533 = sub i32 %aFreq.0.lcssa.i.i, %532 ; [#uses=1] + %534 = add i32 %ge.0.lcssa.i.i, -1 ; [#uses=1] + br label %bb26.i.i30 + +bb26.i.i30: ; preds = %bb25.i.i29, %bb24.i.i28, %bb20.i.i27 + %ge.1.i.i = phi i32 [ %534, %bb25.i.i29 ], [ %ge.0.lcssa.i.i, %bb20.i.i27 ], [ %ge.0.lcssa.i.i, %bb24.i.i28 ] ; [#uses=2] + %aFreq.1.i.i = phi i32 [ %533, %bb25.i.i29 ], [ %aFreq.0.lcssa.i.i, %bb20.i.i27 ], [ %aFreq.0.lcssa.i.i, %bb24.i.i28 ] ; [#uses=1] + br i1 %510, label %bb29.i.i31, label %bb37.i.i32 + +bb29.i.i31: ; preds = %bb29.i.i31, %bb26.i.i30 + %535 = phi i32 [ %539, %bb29.i.i31 ], [ 0, %bb26.i.i30 ] ; [#uses=4] + %tmp256.i.i = add i32 %535, %tmp255.i.i ; [#uses=1] + %scevgep257.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %tmp253.i.i, i32 %tmp256.i.i ; [#uses=1] + %536 = icmp sge i32 %535, %gs.0105.i.i ; [#uses=1] + %537 = icmp sle i32 %535, %ge.1.i.i ; [#uses=1] + %538 = and i1 %536, %537 ; [#uses=1] + %storemerge.i.i = select i1 %538, i8 0, i8 15 ; [#uses=1] + store i8 %storemerge.i.i, i8* %scevgep257.i.i + %539 = add i32 %535, 1 ; [#uses=2] + %exitcond250.i.i = icmp eq i32 %539, %509 ; [#uses=1] + br i1 %exitcond250.i.i, label %bb37.i.i32, label %bb29.i.i31 + +bb37.i.i32: ; preds = %bb29.i.i31, %bb26.i.i30 + %540 = add i32 %ge.1.i.i, 1 ; [#uses=1] + %541 = sub i32 %remF.0104.i.i, %aFreq.1.i.i ; [#uses=1] + %indvar.next252.i.i = add i32 %indvar251.i.i, 1 ; [#uses=2] + %exitcond263.i.i = icmp eq i32 %indvar.next252.i.i, %tmp262.i.i ; [#uses=1] + br i1 %exitcond263.i.i, label %bb85.loopexit.i.i, label %bb16.i.i + +bb41.i.i33: ; preds = %bb41.i.i33.preheader, %bb41.i.i33 + %t.147.i.i = phi i32 [ %542, %bb41.i.i33 ], [ 0, %bb41.i.i33.preheader ] ; [#uses=2] + %scevgep183.i.i = getelementptr [6 x i32]* %fave.i.i, i32 0, i32 %t.147.i.i ; [#uses=1] + store i32 0, i32* %scevgep183.i.i, align 4 + %542 = add i32 %t.147.i.i, 1 ; [#uses=2] + %exitcond182.i.i = icmp eq i32 %542, %smax181.i.i ; [#uses=1] + br i1 %exitcond182.i.i, label %bb48.preheader.i.i, label %bb41.i.i33 + +bb48.preheader.i.i: ; preds = %bb41.i.i33 + br i1 %724, label %bb50.preheader.i.i, label %bb45.i.i + +bb45.i.i: ; preds = %bb47.i.i34, %bb45.i.i, %bb48.preheader.i.i + %.ph = phi i32 [ %544, %bb47.i.i34 ], [ 0, %bb48.preheader.i.i ], [ %.ph, %bb45.i.i ] ; [#uses=3] + %v.249.i.i = phi i32 [ %543, %bb45.i.i ], [ 0, %bb48.preheader.i.i ], [ 0, %bb47.i.i34 ] ; [#uses=2] + %scevgep186.i.i = getelementptr [6 x [258 x i32]]* @rfreq, i32 0, i32 %.ph, i32 %v.249.i.i ; [#uses=1] + store i32 0, i32* %scevgep186.i.i, align 4 + %543 = add i32 %v.249.i.i, 1 ; [#uses=2] + %exitcond185.i.i = icmp eq i32 %543, %509 ; [#uses=1] + br i1 %exitcond185.i.i, label %bb47.i.i34, label %bb45.i.i + +bb47.i.i34: ; preds = %bb45.i.i + %544 = add i32 %.ph, 1 ; [#uses=2] + %exitcond189.i.i = icmp eq i32 %544, %smax181.i.i ; [#uses=1] + br i1 %exitcond189.i.i, label %bb50.preheader.i.i, label %bb45.i.i + +bb50.preheader.i.i: ; preds = %bb47.i.i34, %bb48.preheader.i.i + br i1 %723, label %bb54.i.i.preheader, label %bb82.i.i + +bb54.i.i.preheader: ; preds = %bb75.i.i, %bb50.preheader.i.i + %gs.183.i.i = phi i32 [ %598, %bb75.i.i ], [ 0, %bb50.preheader.i.i ] ; [#uses=8] + %nSelectors.182.i.i = phi i32 [ %tmp231.i.i, %bb75.i.i ], [ 0, %bb50.preheader.i.i ] ; [#uses=2] + %scevgep230.i.i = getelementptr [18002 x i8]* @selector, i32 0, i32 %nSelectors.182.i.i ; [#uses=1] + %tmp231.i.i = add i32 %nSelectors.182.i.i, 1 ; [#uses=2] + %545 = add i32 %gs.183.i.i, 49 ; [#uses=2] + %546 = icmp slt i32 %545, %512 ; [#uses=1] + %..i.i = select i1 %546, i32 %545, i32 %726 ; [#uses=5] + br label %bb54.i.i + +bb54.i.i: ; preds = %bb54.i.i, %bb54.i.i.preheader + %t.357.i.i = phi i32 [ %547, %bb54.i.i ], [ 0, %bb54.i.i.preheader ] ; [#uses=2] + %scevgep205.i.i = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 %t.357.i.i ; [#uses=1] + store i16 0, i16* %scevgep205.i.i, align 2 + %547 = add i32 %t.357.i.i, 1 ; [#uses=2] + %exitcond204.i.i = icmp eq i32 %547, %smax181.i.i ; [#uses=1] + br i1 %exitcond204.i.i, label %bb56.i.i, label %bb54.i.i + +bb56.i.i: ; preds = %bb54.i.i + %548 = icmp sgt i32 %gs.183.i.i, %..i.i ; [#uses=3] + br i1 %722, label %bb59.preheader.i.i, label %bb66.preheader.i.i + +bb66.preheader.i.i: ; preds = %bb56.i.i + br i1 %548, label %bb68.i.i37, label %bb.nph56.split.i.i + +bb59.preheader.i.i: ; preds = %bb56.i.i + br i1 %548, label %bb60.i.i, label %bb.nph66.i.i + +bb.nph66.i.i: ; preds = %bb59.preheader.i.i + %tmp216.i.i = add i32 %gs.183.i.i, 1 ; [#uses=1] + br label %bb58.i.i + +bb58.i.i: ; preds = %bb58.i.i, %bb.nph66.i.i + %indvar212.i.i = phi i32 [ 0, %bb.nph66.i.i ], [ %indvar.next213.i.i, %bb58.i.i ] ; [#uses=3] + %cost5.064.i.i = phi i16 [ 0, %bb.nph66.i.i ], [ %574, %bb58.i.i ] ; [#uses=1] + %cost4.063.i.i = phi i16 [ 0, %bb.nph66.i.i ], [ %570, %bb58.i.i ] ; [#uses=1] + %cost3.062.i.i = phi i16 [ 0, %bb.nph66.i.i ], [ %566, %bb58.i.i ] ; [#uses=1] + %cost2.061.i.i = phi i16 [ 0, %bb.nph66.i.i ], [ %562, %bb58.i.i ] ; [#uses=1] + %cost1.060.i.i = phi i16 [ 0, %bb.nph66.i.i ], [ %558, %bb58.i.i ] ; [#uses=1] + %cost0.059.i.i = phi i16 [ 0, %bb.nph66.i.i ], [ %554, %bb58.i.i ] ; [#uses=1] + %tmp214.i.i = add i32 %indvar212.i.i, %gs.183.i.i ; [#uses=1] + %scevgep215.i.i = getelementptr i16* %727, i32 %tmp214.i.i ; [#uses=1] + %549 = load i16* %scevgep215.i.i, align 2 ; [#uses=1] + %550 = zext i16 %549 to i32 ; [#uses=6] + %551 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 0, i32 %550 ; [#uses=1] + %552 = load i8* %551, align 1 ; [#uses=1] + %553 = zext i8 %552 to i16 ; [#uses=1] + %554 = add i16 %553, %cost0.059.i.i ; [#uses=2] + %555 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 1, i32 %550 ; [#uses=1] + %556 = load i8* %555, align 1 ; [#uses=1] + %557 = zext i8 %556 to i16 ; [#uses=1] + %558 = add i16 %557, %cost1.060.i.i ; [#uses=2] + %559 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 2, i32 %550 ; [#uses=1] + %560 = load i8* %559, align 1 ; [#uses=1] + %561 = zext i8 %560 to i16 ; [#uses=1] + %562 = add i16 %561, %cost2.061.i.i ; [#uses=2] + %563 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 3, i32 %550 ; [#uses=1] + %564 = load i8* %563, align 1 ; [#uses=1] + %565 = zext i8 %564 to i16 ; [#uses=1] + %566 = add i16 %565, %cost3.062.i.i ; [#uses=2] + %567 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 4, i32 %550 ; [#uses=1] + %568 = load i8* %567, align 1 ; [#uses=1] + %569 = zext i8 %568 to i16 ; [#uses=1] + %570 = add i16 %569, %cost4.063.i.i ; [#uses=2] + %571 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 5, i32 %550 ; [#uses=1] + %572 = load i8* %571, align 1 ; [#uses=1] + %573 = zext i8 %572 to i16 ; [#uses=1] + %574 = add i16 %573, %cost5.064.i.i ; [#uses=2] + %tmp217.i.i = add i32 %indvar212.i.i, %tmp216.i.i ; [#uses=1] + %575 = icmp sgt i32 %tmp217.i.i, %..i.i ; [#uses=1] + %indvar.next213.i.i = add i32 %indvar212.i.i, 1 ; [#uses=1] + br i1 %575, label %bb60.i.i, label %bb58.i.i + +bb60.i.i: ; preds = %bb58.i.i, %bb59.preheader.i.i + %cost5.0.lcssa.i.i = phi i16 [ 0, %bb59.preheader.i.i ], [ %574, %bb58.i.i ] ; [#uses=1] + %cost4.0.lcssa.i.i = phi i16 [ 0, %bb59.preheader.i.i ], [ %570, %bb58.i.i ] ; [#uses=1] + %cost3.0.lcssa.i.i = phi i16 [ 0, %bb59.preheader.i.i ], [ %566, %bb58.i.i ] ; [#uses=1] + %cost2.0.lcssa.i.i = phi i16 [ 0, %bb59.preheader.i.i ], [ %562, %bb58.i.i ] ; [#uses=1] + %cost1.0.lcssa.i.i = phi i16 [ 0, %bb59.preheader.i.i ], [ %558, %bb58.i.i ] ; [#uses=1] + %cost0.0.lcssa.i.i = phi i16 [ 0, %bb59.preheader.i.i ], [ %554, %bb58.i.i ] ; [#uses=1] + store i16 %cost0.0.lcssa.i.i, i16* %87, align 2 + store i16 %cost1.0.lcssa.i.i, i16* %88, align 2 + store i16 %cost2.0.lcssa.i.i, i16* %89, align 2 + store i16 %cost3.0.lcssa.i.i, i16* %90, align 2 + store i16 %cost4.0.lcssa.i.i, i16* %91, align 2 + store i16 %cost5.0.lcssa.i.i, i16* %92, align 2 + br label %bb68.i.i37 + +bb.nph56.split.i.i: ; preds = %bb66.preheader.i.i + %tmp200.i.i = add i32 %gs.183.i.i, 1 ; [#uses=1] + br label %bb62.i.i + +bb62.i.i: ; preds = %bb65.i.i36, %bb.nph56.split.i.i + %indvar196.i.i = phi i32 [ 0, %bb.nph56.split.i.i ], [ %indvar.next197.i.i, %bb65.i.i36 ] ; [#uses=3] + %tmp201.i.i = add i32 %indvar196.i.i, %tmp200.i.i ; [#uses=1] + %tmp198.i.i = add i32 %indvar196.i.i, %gs.183.i.i ; [#uses=1] + %scevgep199.i.i = getelementptr i16* %727, i32 %tmp198.i.i ; [#uses=1] + %576 = load i16* %scevgep199.i.i, align 2 ; [#uses=1] + %tmp194.i.i = zext i16 %576 to i32 ; [#uses=1] + br label %bb63.i.i + +bb63.i.i: ; preds = %bb63.i.i, %bb62.i.i + %t.453.i.i = phi i32 [ 0, %bb62.i.i ], [ %581, %bb63.i.i ] ; [#uses=3] + %scevgep193.i.i = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 %t.453.i.i ; [#uses=2] + %scevgep195.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %t.453.i.i, i32 %tmp194.i.i ; [#uses=1] + %577 = load i16* %scevgep193.i.i, align 2 ; [#uses=1] + %578 = load i8* %scevgep195.i.i, align 1 ; [#uses=1] + %579 = zext i8 %578 to i16 ; [#uses=1] + %580 = add i16 %579, %577 ; [#uses=1] + store i16 %580, i16* %scevgep193.i.i, align 2 + %581 = add i32 %t.453.i.i, 1 ; [#uses=2] + %exitcond192.i.i = icmp eq i32 %581, %smax181.i.i ; [#uses=1] + br i1 %exitcond192.i.i, label %bb65.i.i36, label %bb63.i.i + +bb65.i.i36: ; preds = %bb63.i.i + %582 = icmp sgt i32 %tmp201.i.i, %..i.i ; [#uses=1] + %indvar.next197.i.i = add i32 %indvar196.i.i, 1 ; [#uses=1] + br i1 %582, label %bb68.i.i37, label %bb62.i.i + +bb68.i.i37: ; preds = %bb68.i.i37, %bb65.i.i36, %bb60.i.i, %bb66.preheader.i.i + %583 = phi i32 [ %587, %bb68.i.i37 ], [ 0, %bb65.i.i36 ], [ 0, %bb66.preheader.i.i ], [ 0, %bb60.i.i ] ; [#uses=3] + %bc.174.i.i = phi i32 [ %bc.0.i.i, %bb68.i.i37 ], [ 999999999, %bb65.i.i36 ], [ 999999999, %bb66.preheader.i.i ], [ 999999999, %bb60.i.i ] ; [#uses=2] + %bt.173.i.i = phi i32 [ %bt.0.i.i, %bb68.i.i37 ], [ -1, %bb65.i.i36 ], [ -1, %bb66.preheader.i.i ], [ -1, %bb60.i.i ] ; [#uses=1] + %scevgep221.i.i = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 %583 ; [#uses=1] + %584 = load i16* %scevgep221.i.i, align 2 ; [#uses=1] + %585 = zext i16 %584 to i32 ; [#uses=2] + %586 = icmp slt i32 %585, %bc.174.i.i ; [#uses=2] + %bt.0.i.i = select i1 %586, i32 %583, i32 %bt.173.i.i ; [#uses=4] + %bc.0.i.i = select i1 %586, i32 %585, i32 %bc.174.i.i ; [#uses=1] + %587 = add i32 %583, 1 ; [#uses=2] + %exitcond220.i.i = icmp eq i32 %587, %smax181.i.i ; [#uses=1] + br i1 %exitcond220.i.i, label %bb72.i.i, label %bb68.i.i37 + +bb72.i.i: ; preds = %bb68.i.i37 + %588 = getelementptr [6 x i32]* %fave.i.i, i32 0, i32 %bt.0.i.i ; [#uses=2] + %589 = load i32* %588, align 4 ; [#uses=1] + %590 = add i32 %589, 1 ; [#uses=1] + store i32 %590, i32* %588, align 4 + %591 = trunc i32 %bt.0.i.i to i8 ; [#uses=1] + store i8 %591, i8* %scevgep230.i.i, align 1 + br i1 %548, label %bb75.i.i, label %bb.nph80.i.i + +bb.nph80.i.i: ; preds = %bb72.i.i + %tmp226.i.i = add i32 %gs.183.i.i, 1 ; [#uses=1] + br label %bb73.i.i + +bb73.i.i: ; preds = %bb73.i.i, %bb.nph80.i.i + %indvar222.i.i = phi i32 [ 0, %bb.nph80.i.i ], [ %indvar.next223.i.i, %bb73.i.i ] ; [#uses=3] + %tmp224.i.i = add i32 %indvar222.i.i, %gs.183.i.i ; [#uses=1] + %scevgep225.i.i = getelementptr i16* %727, i32 %tmp224.i.i ; [#uses=1] + %592 = load i16* %scevgep225.i.i, align 2 ; [#uses=1] + %593 = zext i16 %592 to i32 ; [#uses=1] + %594 = getelementptr [6 x [258 x i32]]* @rfreq, i32 0, i32 %bt.0.i.i, i32 %593 ; [#uses=2] + %595 = load i32* %594, align 4 ; [#uses=1] + %596 = add i32 %595, 1 ; [#uses=1] + store i32 %596, i32* %594, align 4 + %tmp227.i.i = add i32 %indvar222.i.i, %tmp226.i.i ; [#uses=1] + %597 = icmp sgt i32 %tmp227.i.i, %..i.i ; [#uses=1] + %indvar.next223.i.i = add i32 %indvar222.i.i, 1 ; [#uses=1] + br i1 %597, label %bb75.i.i, label %bb73.i.i + +bb75.i.i: ; preds = %bb73.i.i, %bb72.i.i + %598 = add i32 %..i.i, 1 ; [#uses=2] + %599 = icmp slt i32 %598, %512 ; [#uses=1] + br i1 %599, label %bb54.i.i.preheader, label %bb82.i.i + +bb82.i.i: ; preds = %hbMakeCodeLengths.exit.i.i, %bb75.i.i, %bb50.preheader.i.i + %nSelectors.1.lcssa.i.i = phi i32 [ 0, %bb50.preheader.i.i ], [ %tmp231.i.i, %bb75.i.i ], [ %nSelectors.1.lcssa.i.i, %hbMakeCodeLengths.exit.i.i ] ; [#uses=7] + %t.789.i.i = phi i32 [ %721, %hbMakeCodeLengths.exit.i.i ], [ 0, %bb75.i.i ], [ 0, %bb50.preheader.i.i ] ; [#uses=3] + br i1 %510, label %bb.i.i.i38, label %bb12.i.i.i39 + +bb.i.i.i38: ; preds = %bb.i.i.i38, %bb82.i.i + %i.026.i.i.i = phi i32 [ %tmp67.i.i.i, %bb.i.i.i38 ], [ 0, %bb82.i.i ] ; [#uses=2] + %scevgep66.i.i.i = getelementptr [6 x [258 x i32]]* @rfreq, i32 0, i32 %t.789.i.i, i32 %i.026.i.i.i ; [#uses=1] + %tmp67.i.i.i = add i32 %i.026.i.i.i, 1 ; [#uses=3] + %scevgep68.i.i.i = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %tmp67.i.i.i ; [#uses=1] + %600 = load i32* %scevgep66.i.i.i, align 4 ; [#uses=2] + %601 = shl i32 %600, 8 ; [#uses=1] + %602 = icmp eq i32 %600, 0 ; [#uses=1] + %.69.i.i.i = select i1 %602, i32 256, i32 %601 ; [#uses=1] + store i32 %.69.i.i.i, i32* %scevgep68.i.i.i, align 4 + %exitcond65.i.i.i = icmp eq i32 %tmp67.i.i.i, %509 ; [#uses=1] + br i1 %exitcond65.i.i.i, label %bb12.i.i.i39, label %bb.i.i.i38 + +bb12.i.i.i39: ; preds = %bb52.i.i.i, %bb53.preheader.i.i.i, %bb.i.i.i38, %bb82.i.i + store i32 0, i32* %93, align 4 + store i32 0, i32* %94, align 4 + store i32 -2, i32* %95, align 4 + br i1 %724, label %bb40.i.i.i52, label %bb13.i.i.i40 + +bb13.i.i.i40: ; preds = %bb16.i.i.i42, %bb12.i.i.i39 + %nHeap.06.i.i.i = phi i32 [ %i.15.i.i.i, %bb16.i.i.i42 ], [ 0, %bb12.i.i.i39 ] ; [#uses=5] + %i.15.i.i.i = add i32 %nHeap.06.i.i.i, 1 ; [#uses=13] + %tmp.i1.i.i = add i32 %nHeap.06.i.i.i, 2 ; [#uses=1] + %scevgep.i2.i.i = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %i.15.i.i.i ; [#uses=1] + %scevgep30.i.i.i = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %i.15.i.i.i ; [#uses=1] + %scevgep31.i.i.i = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %i.15.i.i.i ; [#uses=1] + store i32 -1, i32* %scevgep30.i.i.i, align 4 + store i32 %i.15.i.i.i, i32* %scevgep.i2.i.i, align 4 + %603 = load i32* %scevgep31.i.i.i, align 4 ; [#uses=2] + %604 = ashr i32 %i.15.i.i.i, 1 ; [#uses=1] + %605 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %604 ; [#uses=1] + %606 = load i32* %605, align 4 ; [#uses=1] + %607 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %606 ; [#uses=1] + %608 = load i32* %607, align 4 ; [#uses=1] + %609 = icmp slt i32 %603, %608 ; [#uses=1] + br i1 %609, label %bb14.i.i.i41, label %bb16.i.i.i42 + +bb14.i.i.i41: ; preds = %bb14.i.i.i41, %bb13.i.i.i40 + %zz7.03.i.i.i = phi i32 [ %610, %bb14.i.i.i41 ], [ %i.15.i.i.i, %bb13.i.i.i40 ] ; [#uses=3] + %610 = ashr i32 %zz7.03.i.i.i, 1 ; [#uses=3] + %611 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %610 ; [#uses=1] + %612 = load i32* %611, align 4 ; [#uses=1] + %613 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz7.03.i.i.i ; [#uses=1] + store i32 %612, i32* %613, align 4 + %614 = ashr i32 %zz7.03.i.i.i, 2 ; [#uses=1] + %615 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %614 ; [#uses=1] + %616 = load i32* %615, align 4 ; [#uses=1] + %617 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %616 ; [#uses=1] + %618 = load i32* %617, align 4 ; [#uses=1] + %619 = icmp slt i32 %603, %618 ; [#uses=1] + br i1 %619, label %bb14.i.i.i41, label %bb16.i.i.i42 + +bb16.i.i.i42: ; preds = %bb14.i.i.i41, %bb13.i.i.i40 + %zz7.0.lcssa.i.i.i = phi i32 [ %i.15.i.i.i, %bb13.i.i.i40 ], [ %610, %bb14.i.i.i41 ] ; [#uses=1] + %620 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz7.0.lcssa.i.i.i ; [#uses=1] + store i32 %i.15.i.i.i, i32* %620, align 4 + %621 = icmp sgt i32 %tmp.i1.i.i, %509 ; [#uses=1] + br i1 %621, label %bb18.i.i.i, label %bb13.i.i.i40 + +bb18.i.i.i: ; preds = %bb16.i.i.i42 + %622 = icmp sgt i32 %i.15.i.i.i, 259 ; [#uses=1] + br i1 %622, label %bb19.i.i.i43, label %bb39.preheader.i.i.i + +bb39.preheader.i.i.i: ; preds = %bb18.i.i.i + %623 = icmp sgt i32 %i.15.i.i.i, 1 ; [#uses=1] + br i1 %623, label %bb.nph14.i.i.i, label %bb40.i.i.i52 + +bb19.i.i.i43: ; preds = %bb18.i.i.i + call fastcc void @panic(i8* getelementptr ([21 x i8]* @"\01LC11", i32 0, i32 0)) nounwind ssp + unreachable + +bb.nph14.i.i.i: ; preds = %bb39.preheader.i.i.i + %tmp34.i.i.i = add i32 %i.15.i.i.i, %509 ; [#uses=1] + %tmp49.i.i.i44 = add i32 %nHeap.06.i.i.i, -1 ; [#uses=1] + br label %bb20.i.i.i + +bb20.i.i.i: ; preds = %bb38.i.i.i51, %bb.nph14.i.i.i + %indvar.i3.i.i = phi i32 [ 0, %bb.nph14.i.i.i ], [ %indvar.next.i4.i.i, %bb38.i.i.i51 ] ; [#uses=5] + %tmp38.i.i.i = add i32 %indvar.i3.i.i, %tmp37.i.i.i ; [#uses=6] + %scevgep40.i.i.i = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %tmp38.i.i.i ; [#uses=1] + %scevgep42.i.i.i = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %tmp38.i.i.i ; [#uses=1] + %tmp44.i.i.i = sub i32 %i.15.i.i.i, %indvar.i3.i.i ; [#uses=1] + %scevgep45.i.i.i = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %tmp44.i.i.i ; [#uses=1] + %scevgep46.sum.i.i.i = sub i32 %nHeap.06.i.i.i, %indvar.i3.i.i ; [#uses=6] + %scevgep47.i.i.i = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %scevgep46.sum.i.i.i ; [#uses=2] + %tmp50.i.i.i = sub i32 %tmp49.i.i.i44, %indvar.i3.i.i ; [#uses=2] + %624 = load i32* %96, align 4 ; [#uses=2] + %625 = load i32* %scevgep45.i.i.i, align 4 ; [#uses=3] + store i32 %625, i32* %96, align 4 + %626 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %625 ; [#uses=1] + br label %bb21.i.i.i45 + +bb21.i.i.i45: ; preds = %bb26.i.i.i, %bb20.i.i.i + %zz5.0.i.i.i = phi i32 [ 1, %bb20.i.i.i ], [ %yy4.0.i.i.i, %bb26.i.i.i ] ; [#uses=3] + %627 = shl i32 %zz5.0.i.i.i, 1 ; [#uses=6] + %628 = icmp sgt i32 %627, %scevgep46.sum.i.i.i ; [#uses=1] + br i1 %628, label %bb27.i.i.i47, label %bb22.i.i.i46 + +bb22.i.i.i46: ; preds = %bb21.i.i.i45 + %629 = icmp slt i32 %627, %scevgep46.sum.i.i.i ; [#uses=1] + br i1 %629, label %bb23.i.i.i, label %bb25.i.i.i + +bb23.i.i.i: ; preds = %bb22.i.i.i46 + %630 = or i32 %627, 1 ; [#uses=1] + %631 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %630 ; [#uses=1] + %632 = load i32* %631, align 4 ; [#uses=1] + %633 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %632 ; [#uses=1] + %634 = load i32* %633, align 4 ; [#uses=1] + %635 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %627 ; [#uses=1] + %636 = load i32* %635, align 4 ; [#uses=1] + %637 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %636 ; [#uses=1] + %638 = load i32* %637, align 4 ; [#uses=1] + %639 = icmp slt i32 %634, %638 ; [#uses=1] + %640 = zext i1 %639 to i32 ; [#uses=1] + %..i.i.i = or i32 %640, %627 ; [#uses=1] + br label %bb25.i.i.i + +bb25.i.i.i: ; preds = %bb23.i.i.i, %bb22.i.i.i46 + %yy4.0.i.i.i = phi i32 [ %..i.i.i, %bb23.i.i.i ], [ %627, %bb22.i.i.i46 ] ; [#uses=2] + %641 = load i32* %626, align 4 ; [#uses=1] + %642 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %yy4.0.i.i.i ; [#uses=1] + %643 = load i32* %642, align 4 ; [#uses=2] + %644 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %643 ; [#uses=1] + %645 = load i32* %644, align 4 ; [#uses=1] + %646 = icmp slt i32 %641, %645 ; [#uses=1] + br i1 %646, label %bb27.i.i.i47, label %bb26.i.i.i + +bb26.i.i.i: ; preds = %bb25.i.i.i + %647 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz5.0.i.i.i ; [#uses=1] + store i32 %643, i32* %647, align 4 + br label %bb21.i.i.i45 + +bb27.i.i.i47: ; preds = %bb25.i.i.i, %bb21.i.i.i45 + %648 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz5.0.i.i.i ; [#uses=1] + store i32 %625, i32* %648, align 4 + %649 = load i32* %96, align 4 ; [#uses=2] + %650 = load i32* %scevgep47.i.i.i, align 4 ; [#uses=3] + store i32 %650, i32* %96, align 4 + %651 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %650 ; [#uses=1] + br label %bb28.i.i.i48 + +bb28.i.i.i48: ; preds = %bb33.i.i.i, %bb27.i.i.i47 + %zz2.0.i.i.i = phi i32 [ 1, %bb27.i.i.i47 ], [ %yy.0.i.i.i, %bb33.i.i.i ] ; [#uses=3] + %652 = shl i32 %zz2.0.i.i.i, 1 ; [#uses=6] + %653 = icmp sgt i32 %652, %tmp50.i.i.i ; [#uses=1] + br i1 %653, label %bb34.i.i.i, label %bb29.i.i.i + +bb29.i.i.i: ; preds = %bb28.i.i.i48 + %654 = icmp slt i32 %652, %tmp50.i.i.i ; [#uses=1] + br i1 %654, label %bb30.i.i.i49, label %bb32.i.i.i + +bb30.i.i.i49: ; preds = %bb29.i.i.i + %655 = or i32 %652, 1 ; [#uses=1] + %656 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %655 ; [#uses=1] + %657 = load i32* %656, align 4 ; [#uses=1] + %658 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %657 ; [#uses=1] + %659 = load i32* %658, align 4 ; [#uses=1] + %660 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %652 ; [#uses=1] + %661 = load i32* %660, align 4 ; [#uses=1] + %662 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %661 ; [#uses=1] + %663 = load i32* %662, align 4 ; [#uses=1] + %664 = icmp slt i32 %659, %663 ; [#uses=1] + %665 = zext i1 %664 to i32 ; [#uses=1] + %.1.i.i.i = or i32 %665, %652 ; [#uses=1] + br label %bb32.i.i.i + +bb32.i.i.i: ; preds = %bb30.i.i.i49, %bb29.i.i.i + %yy.0.i.i.i = phi i32 [ %.1.i.i.i, %bb30.i.i.i49 ], [ %652, %bb29.i.i.i ] ; [#uses=2] + %666 = load i32* %651, align 4 ; [#uses=1] + %667 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %yy.0.i.i.i ; [#uses=1] + %668 = load i32* %667, align 4 ; [#uses=2] + %669 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %668 ; [#uses=1] + %670 = load i32* %669, align 4 ; [#uses=1] + %671 = icmp slt i32 %666, %670 ; [#uses=1] + br i1 %671, label %bb34.i.i.i, label %bb33.i.i.i + +bb33.i.i.i: ; preds = %bb32.i.i.i + %672 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz2.0.i.i.i ; [#uses=1] + store i32 %668, i32* %672, align 4 + br label %bb28.i.i.i48 + +bb34.i.i.i: ; preds = %bb32.i.i.i, %bb28.i.i.i48 + %673 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz2.0.i.i.i ; [#uses=1] + store i32 %650, i32* %673, align 4 + %674 = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %649 ; [#uses=1] + store i32 %tmp38.i.i.i, i32* %674, align 4 + %675 = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %624 ; [#uses=1] + store i32 %tmp38.i.i.i, i32* %675, align 4 + %676 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %624 ; [#uses=1] + %677 = load i32* %676, align 4 ; [#uses=2] + %678 = and i32 %677, -256 ; [#uses=1] + %679 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %649 ; [#uses=1] + %680 = load i32* %679, align 4 ; [#uses=2] + %681 = and i32 %680, -256 ; [#uses=1] + %682 = add i32 %681, %678 ; [#uses=1] + %683 = and i32 %680, 255 ; [#uses=2] + %684 = and i32 %677, 255 ; [#uses=2] + %685 = icmp uge i32 %683, %684 ; [#uses=1] + %max.i.i.i = select i1 %685, i32 %683, i32 %684 ; [#uses=1] + %686 = add i32 %max.i.i.i, 1 ; [#uses=1] + %687 = or i32 %686, %682 ; [#uses=3] + store i32 %687, i32* %scevgep40.i.i.i, align 4 + store i32 -1, i32* %scevgep42.i.i.i, align 4 + store i32 %tmp38.i.i.i, i32* %scevgep47.i.i.i, align 4 + %688 = ashr i32 %scevgep46.sum.i.i.i, 1 ; [#uses=1] + %689 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %688 ; [#uses=1] + %690 = load i32* %689, align 4 ; [#uses=1] + %691 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %690 ; [#uses=1] + %692 = load i32* %691, align 4 ; [#uses=1] + %693 = icmp slt i32 %687, %692 ; [#uses=1] + br i1 %693, label %bb36.i.i.i, label %bb38.i.i.i51 + +bb36.i.i.i: ; preds = %bb36.i.i.i, %bb34.i.i.i + %zz.09.i.i.i = phi i32 [ %694, %bb36.i.i.i ], [ %scevgep46.sum.i.i.i, %bb34.i.i.i ] ; [#uses=3] + %694 = ashr i32 %zz.09.i.i.i, 1 ; [#uses=3] + %695 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %694 ; [#uses=1] + %696 = load i32* %695, align 4 ; [#uses=1] + %697 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz.09.i.i.i ; [#uses=1] + store i32 %696, i32* %697, align 4 + %698 = ashr i32 %zz.09.i.i.i, 2 ; [#uses=1] + %699 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %698 ; [#uses=1] + %700 = load i32* %699, align 4 ; [#uses=1] + %701 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %700 ; [#uses=1] + %702 = load i32* %701, align 4 ; [#uses=1] + %703 = icmp slt i32 %687, %702 ; [#uses=1] + br i1 %703, label %bb36.i.i.i, label %bb38.i.i.i51 + +bb38.i.i.i51: ; preds = %bb36.i.i.i, %bb34.i.i.i + %zz.0.lcssa.i.i.i = phi i32 [ %scevgep46.sum.i.i.i, %bb34.i.i.i ], [ %694, %bb36.i.i.i ] ; [#uses=1] + %704 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz.0.lcssa.i.i.i ; [#uses=1] + store i32 %tmp38.i.i.i, i32* %704, align 4 + %indvar.next.i4.i.i = add i32 %indvar.i3.i.i, 1 ; [#uses=2] + %exitcond.i.i.i50 = icmp eq i32 %indvar.next.i4.i.i, %nHeap.06.i.i.i ; [#uses=1] + br i1 %exitcond.i.i.i50, label %bb39.bb40_crit_edge.i.i.i, label %bb20.i.i.i + +bb39.bb40_crit_edge.i.i.i: ; preds = %bb38.i.i.i51 + %tmp35.i.i.i = add i32 %tmp34.i.i.i, -1 ; [#uses=1] + br label %bb40.i.i.i52 + +bb40.i.i.i52: ; preds = %bb39.bb40_crit_edge.i.i.i, %bb39.preheader.i.i.i, %bb12.i.i.i39 + %nNodes.0.lcssa.i.i.i = phi i32 [ %tmp35.i.i.i, %bb39.bb40_crit_edge.i.i.i ], [ %509, %bb39.preheader.i.i.i ], [ %509, %bb12.i.i.i39 ] ; [#uses=1] + %705 = icmp sgt i32 %nNodes.0.lcssa.i.i.i, 515 ; [#uses=1] + br i1 %705, label %bb41.i.i.i54, label %bb49.preheader.i.i.i53 + +bb49.preheader.i.i.i53: ; preds = %bb40.i.i.i52 + br i1 %724, label %hbMakeCodeLengths.exit.i.i, label %bb45.preheader.i.i.i + +bb41.i.i.i54: ; preds = %bb40.i.i.i52 + call fastcc void @panic(i8* getelementptr ([21 x i8]* @"\01LC12", i32 0, i32 0)) nounwind ssp + unreachable + +bb44.i.i.i55: ; preds = %bb45.preheader.i.i.i, %bb44.i.i.i55 + %j.017.i.i.i = phi i32 [ %tmp52.i.i.i, %bb44.i.i.i55 ], [ 0, %bb45.preheader.i.i.i ] ; [#uses=1] + %k.016.i.i.i = phi i32 [ %707, %bb44.i.i.i55 ], [ %i.221.i.i.i, %bb45.preheader.i.i.i ] ; [#uses=1] + %tmp52.i.i.i = add i32 %j.017.i.i.i, 1 ; [#uses=2] + %706 = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %k.016.i.i.i ; [#uses=1] + %707 = load i32* %706, align 4 ; [#uses=2] + %708 = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %707 ; [#uses=1] + %709 = load i32* %708, align 4 ; [#uses=1] + %710 = icmp slt i32 %709, 0 ; [#uses=1] + br i1 %710, label %bb46.i.i.i, label %bb44.i.i.i55 + +bb46.i.i.i: ; preds = %bb45.preheader.i.i.i, %bb44.i.i.i55 + %j.0.lcssa.i.i.i = phi i32 [ 0, %bb45.preheader.i.i.i ], [ %tmp52.i.i.i, %bb44.i.i.i55 ] ; [#uses=2] + %711 = trunc i32 %j.0.lcssa.i.i.i to i8 ; [#uses=1] + store i8 %711, i8* %scevgep55.i.i.i, align 1 + %712 = icmp sgt i32 %j.0.lcssa.i.i.i, 20 ; [#uses=1] + %tooLong.0.i.i.i = select i1 %712, i8 1, i8 %tooLong.120.i.i.i ; [#uses=2] + %713 = icmp sgt i32 %tmp56.i.i.i, %509 ; [#uses=1] + br i1 %713, label %bb49.bb50_crit_edge.i.i.i, label %bb45.preheader.i.i.i + +bb49.bb50_crit_edge.i.i.i: ; preds = %bb46.i.i.i + %phitmp28.i.i.i = icmp eq i8 %tooLong.0.i.i.i, 0 ; [#uses=1] + br i1 %phitmp28.i.i.i, label %hbMakeCodeLengths.exit.i.i, label %bb53.preheader.i.i.i + +bb45.preheader.i.i.i: ; preds = %bb46.i.i.i, %bb49.preheader.i.i.i53 + %indvar53.i.i.i = phi i32 [ %i.221.i.i.i, %bb46.i.i.i ], [ 0, %bb49.preheader.i.i.i53 ] ; [#uses=3] + %tooLong.120.i.i.i = phi i8 [ %tooLong.0.i.i.i, %bb46.i.i.i ], [ 0, %bb49.preheader.i.i.i53 ] ; [#uses=1] + %scevgep55.i.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %t.789.i.i, i32 %indvar53.i.i.i ; [#uses=1] + %tmp56.i.i.i = add i32 %indvar53.i.i.i, 2 ; [#uses=1] + %i.221.i.i.i = add i32 %indvar53.i.i.i, 1 ; [#uses=3] + %scevgep58.i.i.i = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %i.221.i.i.i ; [#uses=1] + %714 = load i32* %scevgep58.i.i.i, align 4 ; [#uses=1] + %715 = icmp slt i32 %714, 0 ; [#uses=1] + br i1 %715, label %bb46.i.i.i, label %bb44.i.i.i55 + +bb53.preheader.i.i.i: ; preds = %bb49.bb50_crit_edge.i.i.i + br i1 %725, label %bb52.i.i.i, label %bb12.i.i.i39 + +bb52.i.i.i: ; preds = %bb52.i.i.i, %bb53.preheader.i.i.i + %indvar59.i.i.i = phi i32 [ %tmp63.i.i.i, %bb52.i.i.i ], [ 0, %bb53.preheader.i.i.i ] ; [#uses=1] + %tmp63.i.i.i = add i32 %indvar59.i.i.i, 1 ; [#uses=3] + %scevgep64.i.i.i = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %tmp63.i.i.i ; [#uses=2] + %716 = load i32* %scevgep64.i.i.i, align 4 ; [#uses=1] + %717 = ashr i32 %716, 8 ; [#uses=1] + %718 = sdiv i32 %717, 2 ; [#uses=1] + %719 = shl i32 %718, 8 ; [#uses=1] + %720 = add i32 %719, 256 ; [#uses=1] + store i32 %720, i32* %scevgep64.i.i.i, align 4 + %exitcond62.i.i.i = icmp eq i32 %tmp63.i.i.i, %tmp61.i.i.i ; [#uses=1] + br i1 %exitcond62.i.i.i, label %bb12.i.i.i39, label %bb52.i.i.i + +hbMakeCodeLengths.exit.i.i: ; preds = %bb49.bb50_crit_edge.i.i.i, %bb49.preheader.i.i.i53 + %721 = add i32 %t.789.i.i, 1 ; [#uses=2] + %exitcond238.i.i = icmp eq i32 %721, %smax181.i.i ; [#uses=1] + br i1 %exitcond238.i.i, label %bb84.i.i, label %bb82.i.i + +bb84.i.i: ; preds = %hbMakeCodeLengths.exit.i.i + %exitcond241.i.i = icmp eq i32 %tmp242.i.i, 4 ; [#uses=1] + br i1 %exitcond241.i.i, label %bb88.i.i, label %bb41.i.i33.preheader + +bb85.loopexit.i.i: ; preds = %bb37.i.i32 + %722 = icmp eq i32 %nGroups.0.i.i.reg2mem.0, 6 ; [#uses=1] + %tmp180.i.i = icmp ugt i32 %nGroups.0.i.i.reg2mem.0, 1 ; [#uses=1] + %smax181.i.i = select i1 %tmp180.i.i, i32 %nGroups.0.i.i.reg2mem.0, i32 1 ; [#uses=8] + %723 = icmp sgt i32 %512, 0 ; [#uses=1] + %724 = icmp slt i32 %509, 1 ; [#uses=3] + %725 = icmp sgt i32 %509, 1 ; [#uses=1] + %tmp37.i.i.i = add i32 %508, 3 ; [#uses=1] + %tmp61.i.i.i = add i32 %508, 1 ; [#uses=1] + %726 = add i32 %512, -1 ; [#uses=1] + %727 = load i16** @szptr, align 4 ; [#uses=3] + br label %bb41.i.i33.preheader + +bb41.i.i33.preheader: ; preds = %bb85.loopexit.i.i, %bb84.i.i + %iter.091.i.i = phi i32 [ 0, %bb85.loopexit.i.i ], [ %tmp242.i.i, %bb84.i.i ] ; [#uses=1] + %tmp242.i.i = add i32 %iter.091.i.i, 1 ; [#uses=2] + br label %bb41.i.i33 + +bb88.i.i: ; preds = %bb84.i.i + %728 = icmp sgt i32 %nSelectors.1.lcssa.i.i, 18002 ; [#uses=1] + br i1 %728, label %bb89.i.i, label %bb91.i.i + +bb89.i.i: ; preds = %bb88.i.i + call fastcc void @panic(i8* getelementptr ([17 x i8]* @"\01LC40", i32 0, i32 0)) nounwind ssp + unreachable + +bb91.i.i: ; preds = %bb91.i.i, %bb88.i.i + %i.345.i.i = phi i32 [ %729, %bb91.i.i ], [ 0, %bb88.i.i ] ; [#uses=3] + %scevgep178.i.i = getelementptr [6 x i8]* %pos.i.i, i32 0, i32 %i.345.i.i ; [#uses=1] + %tmp179.i.i = trunc i32 %i.345.i.i to i8 ; [#uses=1] + store i8 %tmp179.i.i, i8* %scevgep178.i.i, align 1 + %729 = add i32 %i.345.i.i, 1 ; [#uses=2] + %exitcond177.i.i = icmp eq i32 %729, %smax181.i.i ; [#uses=1] + br i1 %exitcond177.i.i, label %bb98.loopexit.i.i, label %bb91.i.i + +bb.nph44.i.i: ; preds = %bb98.loopexit.i.i + %.pre.i72.i = load i8* %97, align 1 ; [#uses=1] + br label %bb94.i.i + +bb94.i.i: ; preds = %bb97.i.i, %bb.nph44.i.i + %730 = phi i8 [ %.pre.i72.i, %bb.nph44.i.i ], [ %tmp.0.lcssa.i.i, %bb97.i.i ] ; [#uses=3] + %i.443.i.i = phi i32 [ 0, %bb.nph44.i.i ], [ %735, %bb97.i.i ] ; [#uses=3] + %scevgep173.i.i = getelementptr [18002 x i8]* @selector, i32 0, i32 %i.443.i.i ; [#uses=1] + %scevgep174.i.i = getelementptr [18002 x i8]* @selectorMtf, i32 0, i32 %i.443.i.i ; [#uses=1] + %731 = load i8* %scevgep173.i.i, align 1 ; [#uses=2] + %732 = icmp eq i8 %731, %730 ; [#uses=1] + br i1 %732, label %bb97.i.i, label %bb95.i.i + +bb95.i.i: ; preds = %bb95.i.i, %bb94.i.i + %tmp.039.i.i = phi i8 [ %733, %bb95.i.i ], [ %730, %bb94.i.i ] ; [#uses=1] + %j.038.i.i = phi i32 [ %tmp170.i.i, %bb95.i.i ], [ 0, %bb94.i.i ] ; [#uses=1] + %tmp170.i.i = add i32 %j.038.i.i, 1 ; [#uses=3] + %scevgep171.i.i = getelementptr [6 x i8]* %pos.i.i, i32 0, i32 %tmp170.i.i ; [#uses=2] + %733 = load i8* %scevgep171.i.i, align 1 ; [#uses=3] + store i8 %tmp.039.i.i, i8* %scevgep171.i.i, align 1 + %734 = icmp eq i8 %731, %733 ; [#uses=1] + br i1 %734, label %bb96.bb97_crit_edge.i.i, label %bb95.i.i + +bb96.bb97_crit_edge.i.i: ; preds = %bb95.i.i + %phitmp119.i.i = trunc i32 %tmp170.i.i to i8 ; [#uses=1] + br label %bb97.i.i + +bb97.i.i: ; preds = %bb96.bb97_crit_edge.i.i, %bb94.i.i + %tmp.0.lcssa.i.i = phi i8 [ %733, %bb96.bb97_crit_edge.i.i ], [ %730, %bb94.i.i ] ; [#uses=2] + %j.0.lcssa.i.i56 = phi i8 [ %phitmp119.i.i, %bb96.bb97_crit_edge.i.i ], [ 0, %bb94.i.i ] ; [#uses=1] + store i8 %tmp.0.lcssa.i.i, i8* %97, align 1 + store i8 %j.0.lcssa.i.i56, i8* %scevgep174.i.i, align 1 + %735 = add i32 %i.443.i.i, 1 ; [#uses=2] + %exitcond172.i.i = icmp eq i32 %735, %nSelectors.1.lcssa.i.i ; [#uses=1] + br i1 %exitcond172.i.i, label %bb112.i.i, label %bb94.i.i + +bb98.loopexit.i.i: ; preds = %bb91.i.i + %736 = icmp sgt i32 %nSelectors.1.lcssa.i.i, 0 ; [#uses=2] + br i1 %736, label %bb.nph44.i.i, label %bb112.i.i + +bb101.i.i: ; preds = %bb106.preheader.i.i, %bb101.i.i + %i.534.i.i = phi i32 [ %741, %bb101.i.i ], [ 0, %bb106.preheader.i.i ] ; [#uses=2] + %maxLen.133.i.i = phi i32 [ %maxLen.0.i.i, %bb101.i.i ], [ 0, %bb106.preheader.i.i ] ; [#uses=2] + %minLen.132.i.i = phi i32 [ %minLen.0.i.i, %bb101.i.i ], [ 32, %bb106.preheader.i.i ] ; [#uses=2] + %scevgep167.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %752, i32 %i.534.i.i ; [#uses=1] + %737 = load i8* %scevgep167.i.i, align 1 ; [#uses=1] + %738 = zext i8 %737 to i32 ; [#uses=4] + %739 = icmp sgt i32 %738, %maxLen.133.i.i ; [#uses=1] + %maxLen.0.i.i = select i1 %739, i32 %738, i32 %maxLen.133.i.i ; [#uses=3] + %740 = icmp slt i32 %738, %minLen.132.i.i ; [#uses=1] + %minLen.0.i.i = select i1 %740, i32 %738, i32 %minLen.132.i.i ; [#uses=3] + %741 = add i32 %i.534.i.i, 1 ; [#uses=2] + %exitcond166.i.i = icmp eq i32 %741, %509 ; [#uses=1] + br i1 %exitcond166.i.i, label %bb107.i.i, label %bb101.i.i + +bb107.i.i: ; preds = %bb101.i.i + %742 = icmp sgt i32 %maxLen.0.i.i, 20 ; [#uses=1] + br i1 %742, label %bb108.i.i, label %bb109.i.i + +bb108.i.i: ; preds = %bb107.i.i + call fastcc void @panic(i8* getelementptr ([17 x i8]* @"\01LC41", i32 0, i32 0)) nounwind ssp + unreachable + +bb109.i.i: ; preds = %bb107.i.i + %743 = icmp sgt i32 %minLen.0.i.i, 0 ; [#uses=1] + br i1 %743, label %bb111.i.i, label %bb110.i.i + +bb110.i.i: ; preds = %bb109.i.i + call fastcc void @panic(i8* getelementptr ([17 x i8]* @"\01LC42", i32 0, i32 0)) nounwind ssp + unreachable + +bb111.i.i: ; preds = %bb106.preheader.i.i, %bb109.i.i + %maxLen.1.lcssa.i.i.reg2mem.0 = phi i32 [ %maxLen.0.i.i, %bb109.i.i ], [ 0, %bb106.preheader.i.i ] ; [#uses=2] + %minLen.1.lcssa.i.i.reg2mem.0 = phi i32 [ %minLen.0.i.i, %bb109.i.i ], [ 32, %bb106.preheader.i.i ] ; [#uses=3] + %.not.i.i.i = icmp sle i32 %minLen.1.lcssa.i.i.reg2mem.0, %maxLen.1.lcssa.i.i.reg2mem.0 ; [#uses=1] + %or.cond.i.i.i = and i1 %.not.i.i.i, %510 ; [#uses=1] + br i1 %or.cond.i.i.i, label %bb.nph6.split.i.i.i, label %hbAssignCodes.exit.i.i + +bb1.i.i.i58: ; preds = %bb4.preheader.i.i.i, %bb3.i.i.i60 + %vec.12.i.i.i = phi i32 [ %vec.24.i.i.i, %bb4.preheader.i.i.i ], [ %vec.0.i.i.i, %bb3.i.i.i60 ] ; [#uses=3] + %i.01.i.i.i = phi i32 [ 0, %bb4.preheader.i.i.i ], [ %748, %bb3.i.i.i60 ] ; [#uses=3] + %scevgep.i.i.i57 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %752, i32 %i.01.i.i.i ; [#uses=1] + %744 = load i8* %scevgep.i.i.i57, align 1 ; [#uses=1] + %745 = zext i8 %744 to i32 ; [#uses=1] + %746 = icmp eq i32 %745, %n.05.i.i.i ; [#uses=1] + br i1 %746, label %bb2.i.i.i59, label %bb3.i.i.i60 + +bb2.i.i.i59: ; preds = %bb1.i.i.i58 + %scevgep7.i.i.i = getelementptr [6 x [258 x i32]]* @code, i32 0, i32 %752, i32 %i.01.i.i.i ; [#uses=1] + store i32 %vec.12.i.i.i, i32* %scevgep7.i.i.i, align 4 + %747 = add i32 %vec.12.i.i.i, 1 ; [#uses=1] + br label %bb3.i.i.i60 + +bb3.i.i.i60: ; preds = %bb2.i.i.i59, %bb1.i.i.i58 + %vec.0.i.i.i = phi i32 [ %747, %bb2.i.i.i59 ], [ %vec.12.i.i.i, %bb1.i.i.i58 ] ; [#uses=2] + %748 = add i32 %i.01.i.i.i, 1 ; [#uses=2] + %exitcond161.i.i = icmp eq i32 %748, %509 ; [#uses=1] + br i1 %exitcond161.i.i, label %bb5.i.i.i, label %bb1.i.i.i58 + +bb5.i.i.i: ; preds = %bb3.i.i.i60 + %749 = shl i32 %vec.0.i.i.i, 1 ; [#uses=1] + %750 = icmp sgt i32 %tmp8.i.i.i, %maxLen.1.lcssa.i.i.reg2mem.0 ; [#uses=1] + %indvar.next.i.i.i61 = add i32 %indvar.i.i.i63, 1 ; [#uses=1] + br i1 %750, label %hbAssignCodes.exit.i.i, label %bb4.preheader.i.i.i + +bb.nph6.split.i.i.i: ; preds = %bb111.i.i + %tmp.i.i.i62 = add i32 %minLen.1.lcssa.i.i.reg2mem.0, 1 ; [#uses=1] + br label %bb4.preheader.i.i.i + +bb4.preheader.i.i.i: ; preds = %bb.nph6.split.i.i.i, %bb5.i.i.i + %indvar.i.i.i63 = phi i32 [ 0, %bb.nph6.split.i.i.i ], [ %indvar.next.i.i.i61, %bb5.i.i.i ] ; [#uses=3] + %vec.24.i.i.i = phi i32 [ 0, %bb.nph6.split.i.i.i ], [ %749, %bb5.i.i.i ] ; [#uses=1] + %tmp8.i.i.i = add i32 %indvar.i.i.i63, %tmp.i.i.i62 ; [#uses=1] + %n.05.i.i.i = add i32 %indvar.i.i.i63, %minLen.1.lcssa.i.i.reg2mem.0 ; [#uses=1] + br label %bb1.i.i.i58 + +hbAssignCodes.exit.i.i: ; preds = %bb5.i.i.i, %bb111.i.i + %751 = add i32 %752, 1 ; [#uses=1] + br label %bb112.i.i + +bb112.i.i: ; preds = %hbAssignCodes.exit.i.i, %bb98.loopexit.i.i, %bb97.i.i + %752 = phi i32 [ %751, %hbAssignCodes.exit.i.i ], [ 0, %bb97.i.i ], [ 0, %bb98.loopexit.i.i ] ; [#uses=5] + %753 = icmp slt i32 %752, %nGroups.0.i.i.reg2mem.0 ; [#uses=1] + br i1 %753, label %bb106.preheader.i.i, label %bb114.i.i + +bb106.preheader.i.i: ; preds = %bb112.i.i + br i1 %510, label %bb101.i.i, label %bb111.i.i + +bb114.i.i: ; preds = %bb119.i.i, %bb112.i.i + %i.630.i.i = phi i32 [ %757, %bb119.i.i ], [ 0, %bb112.i.i ] ; [#uses=3] + %tmp154.i.i = shl i32 %i.630.i.i, 4 ; [#uses=1] + %scevgep159.i.i = getelementptr [16 x i8]* %inUse16.i.i, i32 0, i32 %i.630.i.i ; [#uses=2] + store i8 0, i8* %scevgep159.i.i, align 1 + br label %bb115.i.i + +bb115.i.i: ; preds = %bb117.i.i, %bb114.i.i + %j.128.i.i = phi i32 [ 0, %bb114.i.i ], [ %756, %bb117.i.i ] ; [#uses=2] + %tmp155.i.i = add i32 %j.128.i.i, %tmp154.i.i ; [#uses=1] + %scevgep156.i.i = getelementptr [256 x i8]* @inUse, i32 0, i32 %tmp155.i.i ; [#uses=1] + %754 = load i8* %scevgep156.i.i, align 1 ; [#uses=1] + %755 = icmp eq i8 %754, 0 ; [#uses=1] + br i1 %755, label %bb117.i.i, label %bb116.i.i + +bb116.i.i: ; preds = %bb115.i.i + store i8 1, i8* %scevgep159.i.i, align 1 + br label %bb117.i.i + +bb117.i.i: ; preds = %bb116.i.i, %bb115.i.i + %756 = add i32 %j.128.i.i, 1 ; [#uses=2] + %exitcond153.i.i = icmp eq i32 %756, 16 ; [#uses=1] + br i1 %exitcond153.i.i, label %bb119.i.i, label %bb115.i.i + +bb119.i.i: ; preds = %bb117.i.i + %757 = add i32 %i.630.i.i, 1 ; [#uses=2] + %exitcond157.i.i = icmp eq i32 %757, 16 ; [#uses=1] + br i1 %exitcond157.i.i, label %bb121.i.i, label %bb114.i.i + +bb121.i.i: ; preds = %bb119.i.i + %.b.i87.i.i = load i1* @bsStream.b ; [#uses=1] + %758 = zext i1 %.b.i87.i.i to i32 ; [#uses=3] + %759 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %758, i32 3 ; [#uses=2] + %760 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %758, i32 2 ; [#uses=4] + %761 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %758, i32 1 ; [#uses=4] + %bsBuff.promoted462 = load i32* @bsBuff ; [#uses=1] + %bsLive.promoted463 = load i32* @bsLive ; [#uses=1] + br label %bb122.i.i + +bb122.i.i: ; preds = %bb125.i.i, %bb121.i.i + %bsLive.tmp.0466 = phi i32 [ %bsLive.promoted463, %bb121.i.i ], [ %storemerge, %bb125.i.i ] ; [#uses=6] + %bsBuff.tmp.1465 = phi i32 [ %bsBuff.promoted462, %bb121.i.i ], [ %bsBuff.tmp.0464, %bb125.i.i ] ; [#uses=4] + %i.726.i.i = phi i32 [ 0, %bb121.i.i ], [ %795, %bb125.i.i ] ; [#uses=2] + %scevgep152.i.i = getelementptr [16 x i8]* %inUse16.i.i, i32 0, i32 %i.726.i.i ; [#uses=1] + %762 = load i8* %scevgep152.i.i, align 1 ; [#uses=1] + %763 = icmp eq i8 %762, 0 ; [#uses=1] + br i1 %763, label %bb1.i89.i.i, label %bb1.i6.i.i + +bb.i5.i.i: ; preds = %bb1.i6.i.i + %764 = lshr i32 %775, 24 ; [#uses=1] + %765 = trunc i32 %764 to i8 ; [#uses=1] + %766 = load i8** %759, align 4 ; [#uses=1] + %767 = load i32* %760, align 8 ; [#uses=2] + %768 = getelementptr i8* %766, i32 %767 ; [#uses=1] + store i8 %765, i8* %768, align 1 + %769 = add i32 %767, 1 ; [#uses=1] + store i32 %769, i32* %760, align 8 + %770 = load i32* %761, align 4 ; [#uses=1] + %771 = add i32 %770, 1 ; [#uses=1] + store i32 %771, i32* %761, align 4 + %772 = shl i32 %bsBuff.tmp.0456, 8 ; [#uses=2] + %773 = add i32 %bsLive.tmp.0457, -8 ; [#uses=3] + br label %bb1.i6.i.i + +bb1.i6.i.i: ; preds = %bb.i5.i.i, %bb122.i.i + %bsLive.tmp.0457 = phi i32 [ %773, %bb.i5.i.i ], [ %bsLive.tmp.0466, %bb122.i.i ] ; [#uses=1] + %bsBuff.tmp.0456 = phi i32 [ %772, %bb.i5.i.i ], [ %bsBuff.tmp.1465, %bb122.i.i ] ; [#uses=2] + %774 = phi i32 [ %773, %bb.i5.i.i ], [ %bsLive.tmp.0466, %bb122.i.i ] ; [#uses=2] + %775 = phi i32 [ %772, %bb.i5.i.i ], [ %bsBuff.tmp.1465, %bb122.i.i ] ; [#uses=1] + %776 = phi i32 [ %773, %bb.i5.i.i ], [ %bsLive.tmp.0466, %bb122.i.i ] ; [#uses=1] + %777 = icmp sgt i32 %776, 7 ; [#uses=1] + br i1 %777, label %bb.i5.i.i, label %bsW.exit.i.i + +bsW.exit.i.i: ; preds = %bb1.i6.i.i + %778 = sub i32 31, %774 ; [#uses=1] + %779 = shl i32 1, %778 ; [#uses=1] + %780 = or i32 %779, %bsBuff.tmp.0456 ; [#uses=1] + br label %bb125.i.i + +bb.i88.i.i: ; preds = %bb1.i89.i.i + %781 = lshr i32 %792, 24 ; [#uses=1] + %782 = trunc i32 %781 to i8 ; [#uses=1] + %783 = load i8** %759, align 4 ; [#uses=1] + %784 = load i32* %760, align 8 ; [#uses=2] + %785 = getelementptr i8* %783, i32 %784 ; [#uses=1] + store i8 %782, i8* %785, align 1 + %786 = add i32 %784, 1 ; [#uses=1] + store i32 %786, i32* %760, align 8 + %787 = load i32* %761, align 4 ; [#uses=1] + %788 = add i32 %787, 1 ; [#uses=1] + store i32 %788, i32* %761, align 4 + %789 = shl i32 %bsBuff.tmp.0460, 8 ; [#uses=2] + %790 = add i32 %bsLive.tmp.0461, -8 ; [#uses=3] + br label %bb1.i89.i.i + +bb1.i89.i.i: ; preds = %bb.i88.i.i, %bb122.i.i + %bsLive.tmp.0461 = phi i32 [ %790, %bb.i88.i.i ], [ %bsLive.tmp.0466, %bb122.i.i ] ; [#uses=1] + %bsBuff.tmp.0460 = phi i32 [ %789, %bb.i88.i.i ], [ %bsBuff.tmp.1465, %bb122.i.i ] ; [#uses=2] + %791 = phi i32 [ %790, %bb.i88.i.i ], [ %bsLive.tmp.0466, %bb122.i.i ] ; [#uses=1] + %792 = phi i32 [ %789, %bb.i88.i.i ], [ %bsBuff.tmp.1465, %bb122.i.i ] ; [#uses=1] + %793 = phi i32 [ %790, %bb.i88.i.i ], [ %bsLive.tmp.0466, %bb122.i.i ] ; [#uses=1] + %794 = icmp sgt i32 %793, 7 ; [#uses=1] + br i1 %794, label %bb.i88.i.i, label %bb125.i.i + +bb125.i.i: ; preds = %bb1.i89.i.i, %bsW.exit.i.i + %bsBuff.tmp.0464 = phi i32 [ %780, %bsW.exit.i.i ], [ %bsBuff.tmp.0460, %bb1.i89.i.i ] ; [#uses=3] + %storemerge.in = phi i32 [ %774, %bsW.exit.i.i ], [ %791, %bb1.i89.i.i ] ; [#uses=1] + %storemerge = add i32 %storemerge.in, 1 ; [#uses=3] + %795 = add i32 %i.726.i.i, 1 ; [#uses=2] + %exitcond151.i.i = icmp eq i32 %795, 16 ; [#uses=1] + br i1 %exitcond151.i.i, label %bb128.i.i.preheader, label %bb122.i.i + +bb128.i.i.preheader: ; preds = %bb125.i.i + store i32 %bsBuff.tmp.0464, i32* @bsBuff + store i32 %storemerge, i32* @bsLive + %.b.i73.i.i = load i1* @bsStream.b ; [#uses=1] + %796 = zext i1 %.b.i73.i.i to i32 ; [#uses=3] + %797 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %796, i32 3 ; [#uses=2] + %798 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %796, i32 2 ; [#uses=4] + %799 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %796, i32 1 ; [#uses=4] + br label %bb128.i.i + +bb128.i.i: ; preds = %bb135.i.i, %bb128.i.i.preheader + %bsLive.tmp.1485 = phi i32 [ %storemerge, %bb128.i.i.preheader ], [ %bsLive.tmp.0484, %bb135.i.i ] ; [#uses=2] + %bsBuff.tmp.1483 = phi i32 [ %bsBuff.tmp.0464, %bb128.i.i.preheader ], [ %bsBuff.tmp.0482, %bb135.i.i ] ; [#uses=2] + %i.824.i.i = phi i32 [ %836, %bb135.i.i ], [ 0, %bb128.i.i.preheader ] ; [#uses=3] + %tmp145.i.i = shl i32 %i.824.i.i, 4 ; [#uses=1] + %scevgep150.i.i = getelementptr [16 x i8]* %inUse16.i.i, i32 0, i32 %i.824.i.i ; [#uses=1] + %800 = load i8* %scevgep150.i.i, align 1 ; [#uses=1] + %801 = icmp eq i8 %800, 0 ; [#uses=1] + br i1 %801, label %bb135.i.i, label %bb130.i.i + +bb130.i.i: ; preds = %bb133.i.i, %bb128.i.i + %bsLive.tmp.0479 = phi i32 [ %storemerge85, %bb133.i.i ], [ %bsLive.tmp.1485, %bb128.i.i ] ; [#uses=6] + %bsBuff.tmp.1478 = phi i32 [ %bsBuff.tmp.0477, %bb133.i.i ], [ %bsBuff.tmp.1483, %bb128.i.i ] ; [#uses=4] + %j.222.i.i = phi i32 [ %835, %bb133.i.i ], [ 0, %bb128.i.i ] ; [#uses=2] + %tmp146.i.i = add i32 %j.222.i.i, %tmp145.i.i ; [#uses=1] + %scevgep147.i.i = getelementptr [256 x i8]* @inUse, i32 0, i32 %tmp146.i.i ; [#uses=1] + %802 = load i8* %scevgep147.i.i, align 1 ; [#uses=1] + %803 = icmp eq i8 %802, 0 ; [#uses=1] + br i1 %803, label %bb1.i75.i.i, label %bb1.i82.i.i + +bb.i81.i.i: ; preds = %bb1.i82.i.i + %804 = lshr i32 %815, 24 ; [#uses=1] + %805 = trunc i32 %804 to i8 ; [#uses=1] + %806 = load i8** %797, align 4 ; [#uses=1] + %807 = load i32* %798, align 8 ; [#uses=2] + %808 = getelementptr i8* %806, i32 %807 ; [#uses=1] + store i8 %805, i8* %808, align 1 + %809 = add i32 %807, 1 ; [#uses=1] + store i32 %809, i32* %798, align 8 + %810 = load i32* %799, align 4 ; [#uses=1] + %811 = add i32 %810, 1 ; [#uses=1] + store i32 %811, i32* %799, align 4 + %812 = shl i32 %bsBuff.tmp.0473, 8 ; [#uses=2] + %813 = add i32 %bsLive.tmp.0474, -8 ; [#uses=3] + br label %bb1.i82.i.i + +bb1.i82.i.i: ; preds = %bb.i81.i.i, %bb130.i.i + %bsLive.tmp.0474 = phi i32 [ %813, %bb.i81.i.i ], [ %bsLive.tmp.0479, %bb130.i.i ] ; [#uses=1] + %bsBuff.tmp.0473 = phi i32 [ %812, %bb.i81.i.i ], [ %bsBuff.tmp.1478, %bb130.i.i ] ; [#uses=2] + %814 = phi i32 [ %813, %bb.i81.i.i ], [ %bsLive.tmp.0479, %bb130.i.i ] ; [#uses=2] + %815 = phi i32 [ %812, %bb.i81.i.i ], [ %bsBuff.tmp.1478, %bb130.i.i ] ; [#uses=1] + %816 = phi i32 [ %813, %bb.i81.i.i ], [ %bsLive.tmp.0479, %bb130.i.i ] ; [#uses=1] + %817 = icmp sgt i32 %816, 7 ; [#uses=1] + br i1 %817, label %bb.i81.i.i, label %bsW.exit84.i.i + +bsW.exit84.i.i: ; preds = %bb1.i82.i.i + %818 = sub i32 31, %814 ; [#uses=1] + %819 = shl i32 1, %818 ; [#uses=1] + %820 = or i32 %819, %bsBuff.tmp.0473 ; [#uses=1] + br label %bb133.i.i + +bb.i74.i.i: ; preds = %bb1.i75.i.i + %821 = lshr i32 %832, 24 ; [#uses=1] + %822 = trunc i32 %821 to i8 ; [#uses=1] + %823 = load i8** %797, align 4 ; [#uses=1] + %824 = load i32* %798, align 8 ; [#uses=2] + %825 = getelementptr i8* %823, i32 %824 ; [#uses=1] + store i8 %822, i8* %825, align 1 + %826 = add i32 %824, 1 ; [#uses=1] + store i32 %826, i32* %798, align 8 + %827 = load i32* %799, align 4 ; [#uses=1] + %828 = add i32 %827, 1 ; [#uses=1] + store i32 %828, i32* %799, align 4 + %829 = shl i32 %bsBuff.tmp.0469, 8 ; [#uses=2] + %830 = add i32 %bsLive.tmp.0470, -8 ; [#uses=3] + br label %bb1.i75.i.i + +bb1.i75.i.i: ; preds = %bb.i74.i.i, %bb130.i.i + %bsLive.tmp.0470 = phi i32 [ %830, %bb.i74.i.i ], [ %bsLive.tmp.0479, %bb130.i.i ] ; [#uses=1] + %bsBuff.tmp.0469 = phi i32 [ %829, %bb.i74.i.i ], [ %bsBuff.tmp.1478, %bb130.i.i ] ; [#uses=2] + %831 = phi i32 [ %830, %bb.i74.i.i ], [ %bsLive.tmp.0479, %bb130.i.i ] ; [#uses=1] + %832 = phi i32 [ %829, %bb.i74.i.i ], [ %bsBuff.tmp.1478, %bb130.i.i ] ; [#uses=1] + %833 = phi i32 [ %830, %bb.i74.i.i ], [ %bsLive.tmp.0479, %bb130.i.i ] ; [#uses=1] + %834 = icmp sgt i32 %833, 7 ; [#uses=1] + br i1 %834, label %bb.i74.i.i, label %bb133.i.i + +bb133.i.i: ; preds = %bb1.i75.i.i, %bsW.exit84.i.i + %bsBuff.tmp.0477 = phi i32 [ %820, %bsW.exit84.i.i ], [ %bsBuff.tmp.0469, %bb1.i75.i.i ] ; [#uses=2] + %storemerge85.in = phi i32 [ %814, %bsW.exit84.i.i ], [ %831, %bb1.i75.i.i ] ; [#uses=1] + %storemerge85 = add i32 %storemerge85.in, 1 ; [#uses=2] + %835 = add i32 %j.222.i.i, 1 ; [#uses=2] + %exitcond144.i.i = icmp eq i32 %835, 16 ; [#uses=1] + br i1 %exitcond144.i.i, label %bb135.i.i, label %bb130.i.i + +bb135.i.i: ; preds = %bb133.i.i, %bb128.i.i + %bsLive.tmp.0484 = phi i32 [ %bsLive.tmp.1485, %bb128.i.i ], [ %storemerge85, %bb133.i.i ] ; [#uses=5] + %bsBuff.tmp.0482 = phi i32 [ %bsBuff.tmp.1483, %bb128.i.i ], [ %bsBuff.tmp.0477, %bb133.i.i ] ; [#uses=4] + %836 = add i32 %i.824.i.i, 1 ; [#uses=2] + %exitcond148.i.i = icmp eq i32 %836, 16 ; [#uses=1] + br i1 %exitcond148.i.i, label %bb137.i.i, label %bb128.i.i + +bb137.i.i: ; preds = %bb135.i.i + store i32 %bsBuff.tmp.0482, i32* @bsBuff + store i32 %bsLive.tmp.0484, i32* @bsLive + %.b.i66.i.i = load i1* @bsStream.b ; [#uses=1] + %837 = zext i1 %.b.i66.i.i to i32 ; [#uses=3] + %838 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %837, i32 3 ; [#uses=1] + %839 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %837, i32 2 ; [#uses=2] + %840 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %837, i32 1 ; [#uses=2] + br label %bb1.i68.i.i + +bb.i67.i.i: ; preds = %bb1.i68.i.i + %841 = lshr i32 %852, 24 ; [#uses=1] + %842 = trunc i32 %841 to i8 ; [#uses=1] + %843 = load i8** %838, align 4 ; [#uses=1] + %844 = load i32* %839, align 8 ; [#uses=2] + %845 = getelementptr i8* %843, i32 %844 ; [#uses=1] + store i8 %842, i8* %845, align 1 + %846 = add i32 %844, 1 ; [#uses=1] + store i32 %846, i32* %839, align 8 + %847 = load i32* %840, align 4 ; [#uses=1] + %848 = add i32 %847, 1 ; [#uses=1] + store i32 %848, i32* %840, align 4 + %849 = shl i32 %bsBuff.tmp.0488, 8 ; [#uses=2] + %850 = add i32 %bsLive.tmp.0489, -8 ; [#uses=3] + br label %bb1.i68.i.i + +bb1.i68.i.i: ; preds = %bb.i67.i.i, %bb137.i.i + %bsLive.tmp.0489 = phi i32 [ %bsLive.tmp.0484, %bb137.i.i ], [ %850, %bb.i67.i.i ] ; [#uses=1] + %bsBuff.tmp.0488 = phi i32 [ %bsBuff.tmp.0482, %bb137.i.i ], [ %849, %bb.i67.i.i ] ; [#uses=2] + %851 = phi i32 [ %850, %bb.i67.i.i ], [ %bsLive.tmp.0484, %bb137.i.i ] ; [#uses=2] + %852 = phi i32 [ %849, %bb.i67.i.i ], [ %bsBuff.tmp.0482, %bb137.i.i ] ; [#uses=1] + %853 = phi i32 [ %850, %bb.i67.i.i ], [ %bsLive.tmp.0484, %bb137.i.i ] ; [#uses=1] + %854 = icmp sgt i32 %853, 7 ; [#uses=1] + br i1 %854, label %bb.i67.i.i, label %bsW.exit70.i.i + +bsW.exit70.i.i: ; preds = %bb1.i68.i.i + %855 = sub i32 29, %851 ; [#uses=1] + %856 = shl i32 %nGroups.0.i.i.reg2mem.0, %855 ; [#uses=1] + %857 = or i32 %856, %bsBuff.tmp.0488 ; [#uses=3] + store i32 %857, i32* @bsBuff, align 4 + %858 = add i32 %851, 3 ; [#uses=4] + store i32 %858, i32* @bsLive, align 4 + %.b.i59.i.i = load i1* @bsStream.b ; [#uses=1] + %859 = zext i1 %.b.i59.i.i to i32 ; [#uses=3] + %860 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %859, i32 3 ; [#uses=1] + %861 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %859, i32 2 ; [#uses=2] + %862 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %859, i32 1 ; [#uses=2] + br label %bb1.i61.i.i + +bb.i60.i.i: ; preds = %bb1.i61.i.i + %863 = lshr i32 %874, 24 ; [#uses=1] + %864 = trunc i32 %863 to i8 ; [#uses=1] + %865 = load i8** %860, align 4 ; [#uses=1] + %866 = load i32* %861, align 8 ; [#uses=2] + %867 = getelementptr i8* %865, i32 %866 ; [#uses=1] + store i8 %864, i8* %867, align 1 + %868 = add i32 %866, 1 ; [#uses=1] + store i32 %868, i32* %861, align 8 + %869 = load i32* %862, align 4 ; [#uses=1] + %870 = add i32 %869, 1 ; [#uses=1] + store i32 %870, i32* %862, align 4 + %871 = shl i32 %bsBuff.tmp.0492, 8 ; [#uses=2] + %872 = add i32 %bsLive.tmp.0493, -8 ; [#uses=3] + br label %bb1.i61.i.i + +bb1.i61.i.i: ; preds = %bb.i60.i.i, %bsW.exit70.i.i + %bsLive.tmp.0493 = phi i32 [ %858, %bsW.exit70.i.i ], [ %872, %bb.i60.i.i ] ; [#uses=1] + %bsBuff.tmp.0492 = phi i32 [ %857, %bsW.exit70.i.i ], [ %871, %bb.i60.i.i ] ; [#uses=2] + %873 = phi i32 [ %872, %bb.i60.i.i ], [ %858, %bsW.exit70.i.i ] ; [#uses=2] + %874 = phi i32 [ %871, %bb.i60.i.i ], [ %857, %bsW.exit70.i.i ] ; [#uses=1] + %875 = phi i32 [ %872, %bb.i60.i.i ], [ %858, %bsW.exit70.i.i ] ; [#uses=1] + %876 = icmp sgt i32 %875, 7 ; [#uses=1] + br i1 %876, label %bb.i60.i.i, label %bsW.exit63.i.i + +bsW.exit63.i.i: ; preds = %bb1.i61.i.i + %877 = sub i32 17, %873 ; [#uses=1] + %878 = shl i32 %nSelectors.1.lcssa.i.i, %877 ; [#uses=1] + %879 = or i32 %878, %bsBuff.tmp.0492 ; [#uses=3] + store i32 %879, i32* @bsBuff, align 4 + %880 = add i32 %873, 15 ; [#uses=3] + store i32 %880, i32* @bsLive, align 4 + br i1 %736, label %bb142.preheader.i.i.preheader, label %bb.nph17.i.i + +bb142.preheader.i.i.preheader: ; preds = %bsW.exit63.i.i + %.b.i45.i.i = load i1* @bsStream.b ; [#uses=1] + %881 = zext i1 %.b.i45.i.i to i32 ; [#uses=3] + %882 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %881, i32 3 ; [#uses=2] + %883 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %881, i32 2 ; [#uses=4] + %884 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %881, i32 1 ; [#uses=4] + br label %bb142.preheader.i.i + +bb.i53.i.i: ; preds = %bb1.i54.i.i + %885 = lshr i32 %896, 24 ; [#uses=1] + %886 = trunc i32 %885 to i8 ; [#uses=1] + %887 = load i8** %882, align 4 ; [#uses=1] + %888 = load i32* %883, align 8 ; [#uses=2] + %889 = getelementptr i8* %887, i32 %888 ; [#uses=1] + store i8 %886, i8* %889, align 1 + %890 = add i32 %888, 1 ; [#uses=1] + store i32 %890, i32* %883, align 8 + %891 = load i32* %884, align 4 ; [#uses=1] + %892 = add i32 %891, 1 ; [#uses=1] + store i32 %892, i32* %884, align 4 + %893 = shl i32 %bsBuff.tmp.0386, 8 ; [#uses=2] + %894 = add i32 %bsLive.tmp.0387, -8 ; [#uses=3] + br label %bb1.i54.i.i + +bb1.i54.i.i: ; preds = %bb141.i.i.preheader, %bsW.exit56.i.i, %bb.i53.i.i + %j.318.i.i = phi i32 [ %903, %bsW.exit56.i.i ], [ 0, %bb141.i.i.preheader ], [ %j.318.i.i, %bb.i53.i.i ] ; [#uses=2] + %bsLive.tmp.0387 = phi i32 [ %894, %bb.i53.i.i ], [ %bsLive.tmp.0400, %bb141.i.i.preheader ], [ %902, %bsW.exit56.i.i ] ; [#uses=1] + %bsBuff.tmp.0386 = phi i32 [ %893, %bb.i53.i.i ], [ %bsBuff.tmp.0398, %bb141.i.i.preheader ], [ %901, %bsW.exit56.i.i ] ; [#uses=2] + %895 = phi i32 [ %894, %bb.i53.i.i ], [ %bsLive.tmp.0400, %bb141.i.i.preheader ], [ %902, %bsW.exit56.i.i ] ; [#uses=2] + %896 = phi i32 [ %893, %bb.i53.i.i ], [ %bsBuff.tmp.0398, %bb141.i.i.preheader ], [ %901, %bsW.exit56.i.i ] ; [#uses=1] + %897 = phi i32 [ %894, %bb.i53.i.i ], [ %bsLive.tmp.0400, %bb141.i.i.preheader ], [ %902, %bsW.exit56.i.i ] ; [#uses=1] + %898 = icmp sgt i32 %897, 7 ; [#uses=1] + br i1 %898, label %bb.i53.i.i, label %bsW.exit56.i.i + +bsW.exit56.i.i: ; preds = %bb1.i54.i.i + %899 = sub i32 31, %895 ; [#uses=1] + %900 = shl i32 1, %899 ; [#uses=1] + %901 = or i32 %900, %bsBuff.tmp.0386 ; [#uses=4] + %902 = add i32 %895, 1 ; [#uses=6] + %903 = add i32 %j.318.i.i, 1 ; [#uses=2] + %904 = icmp sgt i32 %923, %903 ; [#uses=1] + br i1 %904, label %bb1.i54.i.i, label %bb1.i47.i.i + +bb.i46.i.i: ; preds = %bb1.i47.i.i + %905 = lshr i32 %916, 24 ; [#uses=1] + %906 = trunc i32 %905 to i8 ; [#uses=1] + %907 = load i8** %882, align 4 ; [#uses=1] + %908 = load i32* %883, align 8 ; [#uses=2] + %909 = getelementptr i8* %907, i32 %908 ; [#uses=1] + store i8 %906, i8* %909, align 1 + %910 = add i32 %908, 1 ; [#uses=1] + store i32 %910, i32* %883, align 8 + %911 = load i32* %884, align 4 ; [#uses=1] + %912 = add i32 %911, 1 ; [#uses=1] + store i32 %912, i32* %884, align 4 + %913 = shl i32 %bsBuff.tmp.0394, 8 ; [#uses=2] + %914 = add i32 %bsLive.tmp.0395, -8 ; [#uses=3] + br label %bb1.i47.i.i + +bb1.i47.i.i: ; preds = %bb142.preheader.i.i, %bb.i46.i.i, %bsW.exit56.i.i + %bsLive.tmp.0395 = phi i32 [ %914, %bb.i46.i.i ], [ %bsLive.tmp.0400, %bb142.preheader.i.i ], [ %902, %bsW.exit56.i.i ] ; [#uses=1] + %bsBuff.tmp.0394 = phi i32 [ %913, %bb.i46.i.i ], [ %bsBuff.tmp.0398, %bb142.preheader.i.i ], [ %901, %bsW.exit56.i.i ] ; [#uses=4] + %915 = phi i32 [ %914, %bb.i46.i.i ], [ %bsLive.tmp.0400, %bb142.preheader.i.i ], [ %902, %bsW.exit56.i.i ] ; [#uses=1] + %916 = phi i32 [ %913, %bb.i46.i.i ], [ %bsBuff.tmp.0398, %bb142.preheader.i.i ], [ %901, %bsW.exit56.i.i ] ; [#uses=1] + %917 = phi i32 [ %914, %bb.i46.i.i ], [ %bsLive.tmp.0400, %bb142.preheader.i.i ], [ %902, %bsW.exit56.i.i ] ; [#uses=1] + %918 = icmp sgt i32 %917, 7 ; [#uses=1] + br i1 %918, label %bb.i46.i.i, label %bsW.exit49.i.i + +bsW.exit49.i.i: ; preds = %bb1.i47.i.i + %919 = add i32 %915, 1 ; [#uses=3] + %920 = add i32 %i.920.i.i, 1 ; [#uses=2] + %exitcond142.i.i = icmp eq i32 %920, %nSelectors.1.lcssa.i.i ; [#uses=1] + br i1 %exitcond142.i.i, label %bb145.i.i.loopexit, label %bb142.preheader.i.i + +bb142.preheader.i.i: ; preds = %bsW.exit49.i.i, %bb142.preheader.i.i.preheader + %bsLive.tmp.0400 = phi i32 [ %880, %bb142.preheader.i.i.preheader ], [ %919, %bsW.exit49.i.i ] ; [#uses=6] + %bsBuff.tmp.0398 = phi i32 [ %879, %bb142.preheader.i.i.preheader ], [ %bsBuff.tmp.0394, %bsW.exit49.i.i ] ; [#uses=4] + %i.920.i.i = phi i32 [ %920, %bsW.exit49.i.i ], [ 0, %bb142.preheader.i.i.preheader ] ; [#uses=2] + %scevgep143.i.i = getelementptr [18002 x i8]* @selectorMtf, i32 0, i32 %i.920.i.i ; [#uses=1] + %921 = load i8* %scevgep143.i.i, align 1 ; [#uses=2] + %922 = icmp eq i8 %921, 0 ; [#uses=1] + br i1 %922, label %bb1.i47.i.i, label %bb141.i.i.preheader + +bb141.i.i.preheader: ; preds = %bb142.preheader.i.i + %923 = zext i8 %921 to i32 ; [#uses=1] + br label %bb1.i54.i.i + +bb145.i.i.loopexit: ; preds = %bsW.exit49.i.i + store i32 %bsBuff.tmp.0394, i32* @bsBuff + store i32 %919, i32* @bsLive + br label %bb.nph17.i.i + +bb.nph17.i.i: ; preds = %bb145.i.i.loopexit, %bsW.exit63.i.i + %bsLive.promoted379 = phi i32 [ %919, %bb145.i.i.loopexit ], [ %880, %bsW.exit63.i.i ] ; [#uses=1] + %bsBuff.promoted378 = phi i32 [ %bsBuff.tmp.0394, %bb145.i.i.loopexit ], [ %879, %bsW.exit63.i.i ] ; [#uses=1] + %.b.i38.i.i = load i1* @bsStream.b ; [#uses=1] + %924 = zext i1 %.b.i38.i.i to i32 ; [#uses=3] + %925 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %924, i32 3 ; [#uses=4] + %926 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %924, i32 2 ; [#uses=8] + %927 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %924, i32 1 ; [#uses=8] + br label %bb148.i.i + +bb148.i.i: ; preds = %bb155.i.i, %bb.nph17.i.i + %bsLive.tmp.0382 = phi i32 [ %bsLive.promoted379, %bb.nph17.i.i ], [ %bsLive.tmp.1383, %bb155.i.i ] ; [#uses=3] + %bsBuff.tmp.0380 = phi i32 [ %bsBuff.promoted378, %bb.nph17.i.i ], [ %bsBuff.tmp.1381, %bb155.i.i ] ; [#uses=2] + %928 = phi i32 [ 0, %bb.nph17.i.i ], [ %1009, %bb155.i.i ] ; [#uses=3] + %scevgep140.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %928, i32 0 ; [#uses=1] + %929 = load i8* %scevgep140.i.i, align 2 ; [#uses=1] + %930 = zext i8 %929 to i32 ; [#uses=2] + br label %bb1.i40.i.i + +bb.i39.i.i: ; preds = %bb1.i40.i.i + %931 = lshr i32 %942, 24 ; [#uses=1] + %932 = trunc i32 %931 to i8 ; [#uses=1] + %933 = load i8** %925, align 4 ; [#uses=1] + %934 = load i32* %926, align 8 ; [#uses=2] + %935 = getelementptr i8* %933, i32 %934 ; [#uses=1] + store i8 %932, i8* %935, align 1 + %936 = add i32 %934, 1 ; [#uses=1] + store i32 %936, i32* %926, align 8 + %937 = load i32* %927, align 4 ; [#uses=1] + %938 = add i32 %937, 1 ; [#uses=1] + store i32 %938, i32* %927, align 4 + %939 = shl i32 %bsBuff.tmp.0376, 8 ; [#uses=2] + %940 = add i32 %bsLive.tmp.0377, -8 ; [#uses=3] + br label %bb1.i40.i.i + +bb1.i40.i.i: ; preds = %bb.i39.i.i, %bb148.i.i + %bsLive.tmp.0377 = phi i32 [ %bsLive.tmp.0382, %bb148.i.i ], [ %940, %bb.i39.i.i ] ; [#uses=1] + %bsBuff.tmp.0376 = phi i32 [ %bsBuff.tmp.0380, %bb148.i.i ], [ %939, %bb.i39.i.i ] ; [#uses=2] + %941 = phi i32 [ %940, %bb.i39.i.i ], [ %bsLive.tmp.0382, %bb148.i.i ] ; [#uses=2] + %942 = phi i32 [ %939, %bb.i39.i.i ], [ %bsBuff.tmp.0380, %bb148.i.i ] ; [#uses=1] + %943 = phi i32 [ %940, %bb.i39.i.i ], [ %bsLive.tmp.0382, %bb148.i.i ] ; [#uses=1] + %944 = icmp sgt i32 %943, 7 ; [#uses=1] + br i1 %944, label %bb.i39.i.i, label %bsW.exit42.i.i + +bsW.exit42.i.i: ; preds = %bb1.i40.i.i + %945 = sub i32 27, %941 ; [#uses=1] + %946 = shl i32 %930, %945 ; [#uses=1] + %947 = or i32 %946, %bsBuff.tmp.0376 ; [#uses=2] + %948 = add i32 %941, 5 ; [#uses=2] + br i1 %510, label %bb150.preheader.i.i, label %bb155.i.i + +bb.nph8.i.i: ; preds = %bb150.preheader.i.i + %tmp128.i.i = add i32 %curr.114.i.i, 1 ; [#uses=1] + br label %bb149.i.i + +bb149.i.i: ; preds = %bsW.exit35.i.i, %bb.nph8.i.i + %bsLive.tmp.0363 = phi i32 [ %bsLive.tmp.0372, %bb.nph8.i.i ], [ %966, %bsW.exit35.i.i ] ; [#uses=3] + %bsBuff.tmp.0362 = phi i32 [ %bsBuff.tmp.0370, %bb.nph8.i.i ], [ %965, %bsW.exit35.i.i ] ; [#uses=2] + %indvar126.i.i = phi i32 [ 0, %bb.nph8.i.i ], [ %indvar.next127.i.i, %bsW.exit35.i.i ] ; [#uses=2] + %tmp129.i.i = add i32 %indvar126.i.i, %tmp128.i.i ; [#uses=2] + br label %bb1.i33.i.i + +bb.i32.i.i: ; preds = %bb1.i33.i.i + %949 = lshr i32 %960, 24 ; [#uses=1] + %950 = trunc i32 %949 to i8 ; [#uses=1] + %951 = load i8** %925, align 4 ; [#uses=1] + %952 = load i32* %926, align 8 ; [#uses=2] + %953 = getelementptr i8* %951, i32 %952 ; [#uses=1] + store i8 %950, i8* %953, align 1 + %954 = add i32 %952, 1 ; [#uses=1] + store i32 %954, i32* %926, align 8 + %955 = load i32* %927, align 4 ; [#uses=1] + %956 = add i32 %955, 1 ; [#uses=1] + store i32 %956, i32* %927, align 4 + %957 = shl i32 %bsBuff.tmp.0358, 8 ; [#uses=2] + %958 = add i32 %bsLive.tmp.0359, -8 ; [#uses=3] + br label %bb1.i33.i.i + +bb1.i33.i.i: ; preds = %bb.i32.i.i, %bb149.i.i + %bsLive.tmp.0359 = phi i32 [ %bsLive.tmp.0363, %bb149.i.i ], [ %958, %bb.i32.i.i ] ; [#uses=1] + %bsBuff.tmp.0358 = phi i32 [ %bsBuff.tmp.0362, %bb149.i.i ], [ %957, %bb.i32.i.i ] ; [#uses=2] + %959 = phi i32 [ %958, %bb.i32.i.i ], [ %bsLive.tmp.0363, %bb149.i.i ] ; [#uses=2] + %960 = phi i32 [ %957, %bb.i32.i.i ], [ %bsBuff.tmp.0362, %bb149.i.i ] ; [#uses=1] + %961 = phi i32 [ %958, %bb.i32.i.i ], [ %bsLive.tmp.0363, %bb149.i.i ] ; [#uses=1] + %962 = icmp sgt i32 %961, 7 ; [#uses=1] + br i1 %962, label %bb.i32.i.i, label %bsW.exit35.i.i + +bsW.exit35.i.i: ; preds = %bb1.i33.i.i + %963 = sub i32 30, %959 ; [#uses=1] + %964 = shl i32 2, %963 ; [#uses=1] + %965 = or i32 %964, %bsBuff.tmp.0358 ; [#uses=2] + %966 = add i32 %959, 2 ; [#uses=2] + %967 = icmp sgt i32 %1007, %tmp129.i.i ; [#uses=1] + %indvar.next127.i.i = add i32 %indvar126.i.i, 1 ; [#uses=1] + br i1 %967, label %bb149.i.i, label %bb152.preheader.i.i + +bb152.preheader.i.i: ; preds = %bb150.preheader.i.i, %bsW.exit35.i.i + %bsLive.tmp.1373 = phi i32 [ %bsLive.tmp.0372, %bb150.preheader.i.i ], [ %966, %bsW.exit35.i.i ] ; [#uses=4] + %bsBuff.tmp.1371 = phi i32 [ %bsBuff.tmp.0370, %bb150.preheader.i.i ], [ %965, %bsW.exit35.i.i ] ; [#uses=3] + %curr.0.lcssa.i.i = phi i32 [ %curr.114.i.i, %bb150.preheader.i.i ], [ %tmp129.i.i, %bsW.exit35.i.i ] ; [#uses=3] + %968 = icmp slt i32 %1007, %curr.0.lcssa.i.i ; [#uses=1] + br i1 %968, label %bb.nph11.i.i, label %bb1.i19.i.i + +bb.nph11.i.i: ; preds = %bb152.preheader.i.i + %tmp134.i.i = add i32 %curr.0.lcssa.i.i, -1 ; [#uses=1] + %969 = load i8* %scevgep137.i.i, align 1 ; [#uses=1] + %970 = zext i8 %969 to i32 ; [#uses=1] + br label %bb151.i.i + +bb151.i.i: ; preds = %bsW.exit28.i.i, %bb.nph11.i.i + %bsLive.tmp.0355 = phi i32 [ %bsLive.tmp.1373, %bb.nph11.i.i ], [ %988, %bsW.exit28.i.i ] ; [#uses=3] + %bsBuff.tmp.0354 = phi i32 [ %bsBuff.tmp.1371, %bb.nph11.i.i ], [ %987, %bsW.exit28.i.i ] ; [#uses=2] + %indvar131.i.i = phi i32 [ 0, %bb.nph11.i.i ], [ %indvar.next132.i.i, %bsW.exit28.i.i ] ; [#uses=2] + %tmp135.i.i = sub i32 %tmp134.i.i, %indvar131.i.i ; [#uses=2] + br label %bb1.i26.i.i + +bb.i25.i.i: ; preds = %bb1.i26.i.i + %971 = lshr i32 %982, 24 ; [#uses=1] + %972 = trunc i32 %971 to i8 ; [#uses=1] + %973 = load i8** %925, align 4 ; [#uses=1] + %974 = load i32* %926, align 8 ; [#uses=2] + %975 = getelementptr i8* %973, i32 %974 ; [#uses=1] + store i8 %972, i8* %975, align 1 + %976 = add i32 %974, 1 ; [#uses=1] + store i32 %976, i32* %926, align 8 + %977 = load i32* %927, align 4 ; [#uses=1] + %978 = add i32 %977, 1 ; [#uses=1] + store i32 %978, i32* %927, align 4 + %979 = shl i32 %bsBuff.tmp.0350, 8 ; [#uses=2] + %980 = add i32 %bsLive.tmp.0351, -8 ; [#uses=3] + br label %bb1.i26.i.i + +bb1.i26.i.i: ; preds = %bb.i25.i.i, %bb151.i.i + %bsLive.tmp.0351 = phi i32 [ %bsLive.tmp.0355, %bb151.i.i ], [ %980, %bb.i25.i.i ] ; [#uses=1] + %bsBuff.tmp.0350 = phi i32 [ %bsBuff.tmp.0354, %bb151.i.i ], [ %979, %bb.i25.i.i ] ; [#uses=2] + %981 = phi i32 [ %980, %bb.i25.i.i ], [ %bsLive.tmp.0355, %bb151.i.i ] ; [#uses=2] + %982 = phi i32 [ %979, %bb.i25.i.i ], [ %bsBuff.tmp.0354, %bb151.i.i ] ; [#uses=1] + %983 = phi i32 [ %980, %bb.i25.i.i ], [ %bsLive.tmp.0355, %bb151.i.i ] ; [#uses=1] + %984 = icmp sgt i32 %983, 7 ; [#uses=1] + br i1 %984, label %bb.i25.i.i, label %bsW.exit28.i.i + +bsW.exit28.i.i: ; preds = %bb1.i26.i.i + %985 = sub i32 30, %981 ; [#uses=1] + %986 = shl i32 3, %985 ; [#uses=1] + %987 = or i32 %986, %bsBuff.tmp.0350 ; [#uses=3] + %988 = add i32 %981, 2 ; [#uses=4] + %989 = icmp slt i32 %970, %tmp135.i.i ; [#uses=1] + %indvar.next132.i.i = add i32 %indvar131.i.i, 1 ; [#uses=1] + br i1 %989, label %bb151.i.i, label %bb1.i19.i.i + +bb.i18.i.i: ; preds = %bb1.i19.i.i + %990 = lshr i32 %1001, 24 ; [#uses=1] + %991 = trunc i32 %990 to i8 ; [#uses=1] + %992 = load i8** %925, align 4 ; [#uses=1] + %993 = load i32* %926, align 8 ; [#uses=2] + %994 = getelementptr i8* %992, i32 %993 ; [#uses=1] + store i8 %991, i8* %994, align 1 + %995 = add i32 %993, 1 ; [#uses=1] + store i32 %995, i32* %926, align 8 + %996 = load i32* %927, align 4 ; [#uses=1] + %997 = add i32 %996, 1 ; [#uses=1] + store i32 %997, i32* %927, align 4 + %998 = shl i32 %bsBuff.tmp.0366, 8 ; [#uses=2] + %999 = add i32 %bsLive.tmp.0367, -8 ; [#uses=3] + br label %bb1.i19.i.i + +bb1.i19.i.i: ; preds = %bb.i18.i.i, %bsW.exit28.i.i, %bb152.preheader.i.i + %curr.2.lcssa.i.i = phi i32 [ %curr.0.lcssa.i.i, %bb152.preheader.i.i ], [ %tmp135.i.i, %bsW.exit28.i.i ], [ %curr.2.lcssa.i.i, %bb.i18.i.i ] ; [#uses=2] + %bsLive.tmp.0367 = phi i32 [ %999, %bb.i18.i.i ], [ %bsLive.tmp.1373, %bb152.preheader.i.i ], [ %988, %bsW.exit28.i.i ] ; [#uses=1] + %bsBuff.tmp.0366 = phi i32 [ %998, %bb.i18.i.i ], [ %bsBuff.tmp.1371, %bb152.preheader.i.i ], [ %987, %bsW.exit28.i.i ] ; [#uses=3] + %1000 = phi i32 [ %999, %bb.i18.i.i ], [ %bsLive.tmp.1373, %bb152.preheader.i.i ], [ %988, %bsW.exit28.i.i ] ; [#uses=1] + %1001 = phi i32 [ %998, %bb.i18.i.i ], [ %bsBuff.tmp.1371, %bb152.preheader.i.i ], [ %987, %bsW.exit28.i.i ] ; [#uses=1] + %1002 = phi i32 [ %999, %bb.i18.i.i ], [ %bsLive.tmp.1373, %bb152.preheader.i.i ], [ %988, %bsW.exit28.i.i ] ; [#uses=1] + %1003 = icmp sgt i32 %1002, 7 ; [#uses=1] + br i1 %1003, label %bb.i18.i.i, label %bsW.exit21.i.i + +bsW.exit21.i.i: ; preds = %bb1.i19.i.i + %1004 = add i32 %1000, 1 ; [#uses=2] + %1005 = add i32 %i.1013.i.i, 1 ; [#uses=2] + %exitcond.i.i66 = icmp eq i32 %1005, %509 ; [#uses=1] + br i1 %exitcond.i.i66, label %bb155.i.i, label %bb150.preheader.i.i + +bb150.preheader.i.i: ; preds = %bsW.exit21.i.i, %bsW.exit42.i.i + %bsLive.tmp.0372 = phi i32 [ %1004, %bsW.exit21.i.i ], [ %948, %bsW.exit42.i.i ] ; [#uses=2] + %bsBuff.tmp.0370 = phi i32 [ %bsBuff.tmp.0366, %bsW.exit21.i.i ], [ %947, %bsW.exit42.i.i ] ; [#uses=2] + %curr.114.i.i = phi i32 [ %curr.2.lcssa.i.i, %bsW.exit21.i.i ], [ %930, %bsW.exit42.i.i ] ; [#uses=3] + %i.1013.i.i = phi i32 [ %1005, %bsW.exit21.i.i ], [ 0, %bsW.exit42.i.i ] ; [#uses=2] + %scevgep137.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %928, i32 %i.1013.i.i ; [#uses=2] + %1006 = load i8* %scevgep137.i.i, align 1 ; [#uses=1] + %1007 = zext i8 %1006 to i32 ; [#uses=3] + %1008 = icmp sgt i32 %1007, %curr.114.i.i ; [#uses=1] + br i1 %1008, label %bb.nph8.i.i, label %bb152.preheader.i.i + +bb155.i.i: ; preds = %bsW.exit21.i.i, %bsW.exit42.i.i + %bsLive.tmp.1383 = phi i32 [ %948, %bsW.exit42.i.i ], [ %1004, %bsW.exit21.i.i ] ; [#uses=3] + %bsBuff.tmp.1381 = phi i32 [ %947, %bsW.exit42.i.i ], [ %bsBuff.tmp.0366, %bsW.exit21.i.i ] ; [#uses=3] + %1009 = add i32 %928, 1 ; [#uses=2] + %exitcond139.i.i = icmp eq i32 %1009, %smax181.i.i ; [#uses=1] + br i1 %exitcond139.i.i, label %bb157.i.i, label %bb148.i.i + +bb157.i.i: ; preds = %bb155.i.i + store i32 %bsBuff.tmp.1381, i32* @bsBuff + store i32 %bsLive.tmp.1383, i32* @bsLive + %1010 = load i32* @nMTF, align 4 ; [#uses=4] + %1011 = icmp sgt i32 %1010, 0 ; [#uses=1] + br i1 %1011, label %bb161.i.i.preheader, label %bb167.i.i + +bb161.i.i.preheader: ; preds = %bb157.i.i + %1012 = load i16** @szptr, align 4 ; [#uses=1] + %.b.i10.i.i = load i1* @bsStream.b ; [#uses=1] + %1013 = zext i1 %.b.i10.i.i to i32 ; [#uses=3] + %1014 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1013, i32 3 ; [#uses=1] + %1015 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1013, i32 2 ; [#uses=2] + %1016 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1013, i32 1 ; [#uses=2] + br label %bb161.i.i + +bb161.i.i: ; preds = %bb166.i.i, %bb161.i.i.preheader + %bsLive.tmp.1347 = phi i32 [ %bsLive.tmp.1383, %bb161.i.i.preheader ], [ %bsLive.tmp.0346, %bb166.i.i ] ; [#uses=2] + %bsBuff.tmp.1345 = phi i32 [ %bsBuff.tmp.1381, %bb161.i.i.preheader ], [ %bsBuff.tmp.0344, %bb166.i.i ] ; [#uses=2] + %gs.24.i.i = phi i32 [ %1050, %bb166.i.i ], [ 0, %bb161.i.i.preheader ] ; [#uses=4] + %selCtr.03.i.i = phi i32 [ %tmp124.i.i, %bb166.i.i ], [ 0, %bb161.i.i.preheader ] ; [#uses=2] + %tmp124.i.i = add i32 %selCtr.03.i.i, 1 ; [#uses=2] + %1017 = add i32 %gs.24.i.i, 49 ; [#uses=2] + %1018 = add i32 %1010, -1 ; [#uses=1] + %1019 = icmp slt i32 %1017, %1010 ; [#uses=1] + %.285.i.i = select i1 %1019, i32 %1017, i32 %1018 ; [#uses=3] + %1020 = icmp sgt i32 %gs.24.i.i, %.285.i.i ; [#uses=1] + br i1 %1020, label %bb166.i.i, label %bb.nph.i.i + +bb.nph.i.i: ; preds = %bb161.i.i + %scevgep123.i.i = getelementptr [18002 x i8]* @selector, i32 0, i32 %selCtr.03.i.i ; [#uses=1] + %tmp121.i.i = add i32 %gs.24.i.i, 1 ; [#uses=1] + %1021 = load i8* %scevgep123.i.i, align 1 ; [#uses=1] + %1022 = zext i8 %1021 to i32 ; [#uses=2] + br label %bb164.i.i + +bb164.i.i: ; preds = %bsW.exit14.i.i, %bb.nph.i.i + %bsLive.tmp.0341 = phi i32 [ %bsLive.tmp.1347, %bb.nph.i.i ], [ %1048, %bsW.exit14.i.i ] ; [#uses=3] + %bsBuff.tmp.0340 = phi i32 [ %bsBuff.tmp.1345, %bb.nph.i.i ], [ %1047, %bsW.exit14.i.i ] ; [#uses=2] + %indvar.i.i67 = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i69, %bsW.exit14.i.i ] ; [#uses=3] + %tmp.i.i = add i32 %indvar.i.i67, %gs.24.i.i ; [#uses=1] + %scevgep.i.i68 = getelementptr i16* %1012, i32 %tmp.i.i ; [#uses=1] + %1023 = load i16* %scevgep.i.i68, align 2 ; [#uses=1] + %1024 = zext i16 %1023 to i32 ; [#uses=2] + %1025 = getelementptr [6 x [258 x i32]]* @code, i32 0, i32 %1022, i32 %1024 ; [#uses=1] + %1026 = load i32* %1025, align 4 ; [#uses=1] + %1027 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %1022, i32 %1024 ; [#uses=1] + %1028 = load i8* %1027, align 1 ; [#uses=1] + %1029 = zext i8 %1028 to i32 ; [#uses=2] + br label %bb1.i12.i.i + +bb.i11.i.i: ; preds = %bb1.i12.i.i + %1030 = lshr i32 %1041, 24 ; [#uses=1] + %1031 = trunc i32 %1030 to i8 ; [#uses=1] + %1032 = load i8** %1014, align 4 ; [#uses=1] + %1033 = load i32* %1015, align 8 ; [#uses=2] + %1034 = getelementptr i8* %1032, i32 %1033 ; [#uses=1] + store i8 %1031, i8* %1034, align 1 + %1035 = add i32 %1033, 1 ; [#uses=1] + store i32 %1035, i32* %1015, align 8 + %1036 = load i32* %1016, align 4 ; [#uses=1] + %1037 = add i32 %1036, 1 ; [#uses=1] + store i32 %1037, i32* %1016, align 4 + %1038 = shl i32 %bsBuff.tmp.0336, 8 ; [#uses=2] + %1039 = add i32 %bsLive.tmp.0337, -8 ; [#uses=3] + br label %bb1.i12.i.i + +bb1.i12.i.i: ; preds = %bb.i11.i.i, %bb164.i.i + %bsLive.tmp.0337 = phi i32 [ %bsLive.tmp.0341, %bb164.i.i ], [ %1039, %bb.i11.i.i ] ; [#uses=1] + %bsBuff.tmp.0336 = phi i32 [ %bsBuff.tmp.0340, %bb164.i.i ], [ %1038, %bb.i11.i.i ] ; [#uses=2] + %1040 = phi i32 [ %1039, %bb.i11.i.i ], [ %bsLive.tmp.0341, %bb164.i.i ] ; [#uses=2] + %1041 = phi i32 [ %1038, %bb.i11.i.i ], [ %bsBuff.tmp.0340, %bb164.i.i ] ; [#uses=1] + %1042 = phi i32 [ %1039, %bb.i11.i.i ], [ %bsLive.tmp.0341, %bb164.i.i ] ; [#uses=1] + %1043 = icmp sgt i32 %1042, 7 ; [#uses=1] + br i1 %1043, label %bb.i11.i.i, label %bsW.exit14.i.i + +bsW.exit14.i.i: ; preds = %bb1.i12.i.i + %1044 = sub i32 32, %1029 ; [#uses=1] + %1045 = sub i32 %1044, %1040 ; [#uses=1] + %1046 = shl i32 %1026, %1045 ; [#uses=1] + %1047 = or i32 %1046, %bsBuff.tmp.0336 ; [#uses=2] + %1048 = add i32 %1040, %1029 ; [#uses=2] + %tmp122.i.i = add i32 %indvar.i.i67, %tmp121.i.i ; [#uses=1] + %1049 = icmp sgt i32 %tmp122.i.i, %.285.i.i ; [#uses=1] + %indvar.next.i.i69 = add i32 %indvar.i.i67, 1 ; [#uses=1] + br i1 %1049, label %bb166.i.i, label %bb164.i.i + +bb166.i.i: ; preds = %bsW.exit14.i.i, %bb161.i.i + %bsLive.tmp.0346 = phi i32 [ %bsLive.tmp.1347, %bb161.i.i ], [ %1048, %bsW.exit14.i.i ] ; [#uses=2] + %bsBuff.tmp.0344 = phi i32 [ %bsBuff.tmp.1345, %bb161.i.i ], [ %1047, %bsW.exit14.i.i ] ; [#uses=2] + %1050 = add i32 %.285.i.i, 1 ; [#uses=2] + %1051 = icmp slt i32 %1050, %1010 ; [#uses=1] + br i1 %1051, label %bb161.i.i, label %bb167.i.i.loopexit + +bb167.i.i.loopexit: ; preds = %bb166.i.i + store i32 %bsBuff.tmp.0344, i32* @bsBuff + store i32 %bsLive.tmp.0346, i32* @bsLive + br label %bb167.i.i + +bb167.i.i: ; preds = %bb167.i.i.loopexit, %bb157.i.i + %selCtr.0.lcssa.i.i = phi i32 [ 0, %bb157.i.i ], [ %tmp124.i.i, %bb167.i.i.loopexit ] ; [#uses=1] + %1052 = icmp eq i32 %selCtr.0.lcssa.i.i, %nSelectors.1.lcssa.i.i ; [#uses=1] + br i1 %1052, label %sendMTFValues.exit.i, label %bb168.i.i + +bb168.i.i: ; preds = %bb167.i.i + call fastcc void @panic(i8* getelementptr ([17 x i8]* @"\01LC46", i32 0, i32 0)) nounwind ssp + unreachable + +bb4.1.i.i: ; preds = %bb4.1.i.i, %bb4.i.i19 + %v.0107.1.i.i = phi i32 [ %1053, %bb4.1.i.i ], [ 0, %bb4.i.i19 ] ; [#uses=2] + %scevgep268.1.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 1, i32 %v.0107.1.i.i ; [#uses=1] + store i8 15, i8* %scevgep268.1.i.i, align 1 + %1053 = add i32 %v.0107.1.i.i, 1 ; [#uses=2] + %exitcond267.1.i.i = icmp eq i32 %1053, %509 ; [#uses=1] + br i1 %exitcond267.1.i.i, label %bb4.2.i.i, label %bb4.1.i.i + +bb4.2.i.i: ; preds = %bb4.2.i.i, %bb4.1.i.i + %v.0107.2.i.i = phi i32 [ %1054, %bb4.2.i.i ], [ 0, %bb4.1.i.i ] ; [#uses=2] + %scevgep268.2.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 2, i32 %v.0107.2.i.i ; [#uses=1] + store i8 15, i8* %scevgep268.2.i.i, align 1 + %1054 = add i32 %v.0107.2.i.i, 1 ; [#uses=2] + %exitcond267.2.i.i = icmp eq i32 %1054, %509 ; [#uses=1] + br i1 %exitcond267.2.i.i, label %bb4.3.i.i, label %bb4.2.i.i + +bb4.3.i.i: ; preds = %bb4.3.i.i, %bb4.2.i.i + %v.0107.3.i.i = phi i32 [ %1055, %bb4.3.i.i ], [ 0, %bb4.2.i.i ] ; [#uses=2] + %scevgep268.3.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 3, i32 %v.0107.3.i.i ; [#uses=1] + store i8 15, i8* %scevgep268.3.i.i, align 1 + %1055 = add i32 %v.0107.3.i.i, 1 ; [#uses=2] + %exitcond267.3.i.i = icmp eq i32 %1055, %509 ; [#uses=1] + br i1 %exitcond267.3.i.i, label %bb4.4.i.i, label %bb4.3.i.i + +bb4.4.i.i: ; preds = %bb4.4.i.i, %bb4.3.i.i + %v.0107.4.i.i = phi i32 [ %1056, %bb4.4.i.i ], [ 0, %bb4.3.i.i ] ; [#uses=2] + %scevgep268.4.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 4, i32 %v.0107.4.i.i ; [#uses=1] + store i8 15, i8* %scevgep268.4.i.i, align 1 + %1056 = add i32 %v.0107.4.i.i, 1 ; [#uses=2] + %exitcond267.4.i.i = icmp eq i32 %1056, %509 ; [#uses=1] + br i1 %exitcond267.4.i.i, label %bb4.5.i.i, label %bb4.4.i.i + +bb4.5.i.i: ; preds = %bb4.5.i.i, %bb4.4.i.i + %v.0107.5.i.i = phi i32 [ %1057, %bb4.5.i.i ], [ 0, %bb4.4.i.i ] ; [#uses=2] + %scevgep268.5.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 5, i32 %v.0107.5.i.i ; [#uses=1] + store i8 15, i8* %scevgep268.5.i.i, align 1 + %1057 = add i32 %v.0107.5.i.i, 1 ; [#uses=2] + %exitcond267.5.i.i = icmp eq i32 %1057, %509 ; [#uses=1] + br i1 %exitcond267.5.i.i, label %bb8.i.i20, label %bb4.5.i.i + +sendMTFValues.exit.i: ; preds = %bb167.i.i + store i32 -1, i32* @globalCrc, align 4 + tail call fastcc void @loadAndRLEsource() nounwind ssp + %1058 = load i32* @last, align 4 ; [#uses=2] + %1059 = icmp eq i32 %1058, -1 ; [#uses=1] + br i1 %1059, label %bb8.i70, label %bb2.i11 + +bb8.i70: ; preds = %sendMTFValues.exit.i, %bsW.exit193.i + %combinedCRC.0.lcssa.i = phi i32 [ 0, %bsW.exit193.i ], [ %192, %sendMTFValues.exit.i ] ; [#uses=4] + %.pr.i60.i = load i32* @bsLive ; [#uses=3] + %.pre.i61.i = load i32* @bsBuff, align 4 ; [#uses=2] + %.b.i62.i = load i1* @bsStream.b ; [#uses=1] + %1060 = zext i1 %.b.i62.i to i32 ; [#uses=3] + %1061 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1060, i32 3 ; [#uses=1] + %1062 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1060, i32 2 ; [#uses=2] + %1063 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1060, i32 1 ; [#uses=2] + br label %bb1.i64.i71 + +bb.i63.i: ; preds = %bb1.i64.i71 + %1064 = lshr i32 %1075, 24 ; [#uses=1] + %1065 = trunc i32 %1064 to i8 ; [#uses=1] + %1066 = load i8** %1061, align 4 ; [#uses=1] + %1067 = load i32* %1062, align 8 ; [#uses=2] + %1068 = getelementptr i8* %1066, i32 %1067 ; [#uses=1] + store i8 %1065, i8* %1068, align 1 + %1069 = add i32 %1067, 1 ; [#uses=1] + store i32 %1069, i32* %1062, align 8 + %1070 = load i32* %1063, align 4 ; [#uses=1] + %1071 = add i32 %1070, 1 ; [#uses=1] + store i32 %1071, i32* %1063, align 4 + %1072 = shl i32 %bsBuff.tmp.0512, 8 ; [#uses=2] + %1073 = add i32 %bsLive.tmp.0513, -8 ; [#uses=3] + br label %bb1.i64.i71 + +bb1.i64.i71: ; preds = %bb.i63.i, %bb8.i70 + %bsLive.tmp.0513 = phi i32 [ %.pr.i60.i, %bb8.i70 ], [ %1073, %bb.i63.i ] ; [#uses=1] + %bsBuff.tmp.0512 = phi i32 [ %.pre.i61.i, %bb8.i70 ], [ %1072, %bb.i63.i ] ; [#uses=2] + %1074 = phi i32 [ %1073, %bb.i63.i ], [ %.pr.i60.i, %bb8.i70 ] ; [#uses=2] + %1075 = phi i32 [ %1072, %bb.i63.i ], [ %.pre.i61.i, %bb8.i70 ] ; [#uses=1] + %1076 = phi i32 [ %1073, %bb.i63.i ], [ %.pr.i60.i, %bb8.i70 ] ; [#uses=1] + %1077 = icmp sgt i32 %1076, 7 ; [#uses=1] + br i1 %1077, label %bb.i63.i, label %bsW.exit65.i + +bsW.exit65.i: ; preds = %bb1.i64.i71 + %1078 = sub i32 24, %1074 ; [#uses=1] + %1079 = shl i32 23, %1078 ; [#uses=1] + %1080 = or i32 %1079, %bsBuff.tmp.0512 ; [#uses=3] + store i32 %1080, i32* @bsBuff, align 4 + %1081 = add i32 %1074, 8 ; [#uses=4] + store i32 %1081, i32* @bsLive, align 4 + %.b.i56.i72 = load i1* @bsStream.b ; [#uses=1] + %1082 = zext i1 %.b.i56.i72 to i32 ; [#uses=3] + %1083 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1082, i32 3 ; [#uses=1] + %1084 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1082, i32 2 ; [#uses=2] + %1085 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1082, i32 1 ; [#uses=2] + br label %bb1.i58.i + +bb.i57.i: ; preds = %bb1.i58.i + %1086 = lshr i32 %1097, 24 ; [#uses=1] + %1087 = trunc i32 %1086 to i8 ; [#uses=1] + %1088 = load i8** %1083, align 4 ; [#uses=1] + %1089 = load i32* %1084, align 8 ; [#uses=2] + %1090 = getelementptr i8* %1088, i32 %1089 ; [#uses=1] + store i8 %1087, i8* %1090, align 1 + %1091 = add i32 %1089, 1 ; [#uses=1] + store i32 %1091, i32* %1084, align 8 + %1092 = load i32* %1085, align 4 ; [#uses=1] + %1093 = add i32 %1092, 1 ; [#uses=1] + store i32 %1093, i32* %1085, align 4 + %1094 = shl i32 %bsBuff.tmp.0516, 8 ; [#uses=2] + %1095 = add i32 %bsLive.tmp.0517, -8 ; [#uses=3] + br label %bb1.i58.i + +bb1.i58.i: ; preds = %bb.i57.i, %bsW.exit65.i + %bsLive.tmp.0517 = phi i32 [ %1081, %bsW.exit65.i ], [ %1095, %bb.i57.i ] ; [#uses=1] + %bsBuff.tmp.0516 = phi i32 [ %1080, %bsW.exit65.i ], [ %1094, %bb.i57.i ] ; [#uses=2] + %1096 = phi i32 [ %1095, %bb.i57.i ], [ %1081, %bsW.exit65.i ] ; [#uses=2] + %1097 = phi i32 [ %1094, %bb.i57.i ], [ %1080, %bsW.exit65.i ] ; [#uses=1] + %1098 = phi i32 [ %1095, %bb.i57.i ], [ %1081, %bsW.exit65.i ] ; [#uses=1] + %1099 = icmp sgt i32 %1098, 7 ; [#uses=1] + br i1 %1099, label %bb.i57.i, label %bsW.exit59.i + +bsW.exit59.i: ; preds = %bb1.i58.i + %1100 = sub i32 24, %1096 ; [#uses=1] + %1101 = shl i32 114, %1100 ; [#uses=1] + %1102 = or i32 %1101, %bsBuff.tmp.0516 ; [#uses=3] + store i32 %1102, i32* @bsBuff, align 4 + %1103 = add i32 %1096, 8 ; [#uses=4] + store i32 %1103, i32* @bsLive, align 4 + %.b.i50.i = load i1* @bsStream.b ; [#uses=1] + %1104 = zext i1 %.b.i50.i to i32 ; [#uses=3] + %1105 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1104, i32 3 ; [#uses=1] + %1106 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1104, i32 2 ; [#uses=2] + %1107 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1104, i32 1 ; [#uses=2] + br label %bb1.i52.i + +bb.i51.i: ; preds = %bb1.i52.i + %1108 = lshr i32 %1119, 24 ; [#uses=1] + %1109 = trunc i32 %1108 to i8 ; [#uses=1] + %1110 = load i8** %1105, align 4 ; [#uses=1] + %1111 = load i32* %1106, align 8 ; [#uses=2] + %1112 = getelementptr i8* %1110, i32 %1111 ; [#uses=1] + store i8 %1109, i8* %1112, align 1 + %1113 = add i32 %1111, 1 ; [#uses=1] + store i32 %1113, i32* %1106, align 8 + %1114 = load i32* %1107, align 4 ; [#uses=1] + %1115 = add i32 %1114, 1 ; [#uses=1] + store i32 %1115, i32* %1107, align 4 + %1116 = shl i32 %bsBuff.tmp.0520, 8 ; [#uses=2] + %1117 = add i32 %bsLive.tmp.0521, -8 ; [#uses=3] + br label %bb1.i52.i + +bb1.i52.i: ; preds = %bb.i51.i, %bsW.exit59.i + %bsLive.tmp.0521 = phi i32 [ %1103, %bsW.exit59.i ], [ %1117, %bb.i51.i ] ; [#uses=1] + %bsBuff.tmp.0520 = phi i32 [ %1102, %bsW.exit59.i ], [ %1116, %bb.i51.i ] ; [#uses=2] + %1118 = phi i32 [ %1117, %bb.i51.i ], [ %1103, %bsW.exit59.i ] ; [#uses=2] + %1119 = phi i32 [ %1116, %bb.i51.i ], [ %1102, %bsW.exit59.i ] ; [#uses=1] + %1120 = phi i32 [ %1117, %bb.i51.i ], [ %1103, %bsW.exit59.i ] ; [#uses=1] + %1121 = icmp sgt i32 %1120, 7 ; [#uses=1] + br i1 %1121, label %bb.i51.i, label %bsW.exit53.i + +bsW.exit53.i: ; preds = %bb1.i52.i + %1122 = sub i32 24, %1118 ; [#uses=1] + %1123 = shl i32 69, %1122 ; [#uses=1] + %1124 = or i32 %1123, %bsBuff.tmp.0520 ; [#uses=3] + store i32 %1124, i32* @bsBuff, align 4 + %1125 = add i32 %1118, 8 ; [#uses=4] + store i32 %1125, i32* @bsLive, align 4 + %.b.i44.i = load i1* @bsStream.b ; [#uses=1] + %1126 = zext i1 %.b.i44.i to i32 ; [#uses=3] + %1127 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1126, i32 3 ; [#uses=1] + %1128 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1126, i32 2 ; [#uses=2] + %1129 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1126, i32 1 ; [#uses=2] + br label %bb1.i46.i + +bb.i45.i: ; preds = %bb1.i46.i + %1130 = lshr i32 %1141, 24 ; [#uses=1] + %1131 = trunc i32 %1130 to i8 ; [#uses=1] + %1132 = load i8** %1127, align 4 ; [#uses=1] + %1133 = load i32* %1128, align 8 ; [#uses=2] + %1134 = getelementptr i8* %1132, i32 %1133 ; [#uses=1] + store i8 %1131, i8* %1134, align 1 + %1135 = add i32 %1133, 1 ; [#uses=1] + store i32 %1135, i32* %1128, align 8 + %1136 = load i32* %1129, align 4 ; [#uses=1] + %1137 = add i32 %1136, 1 ; [#uses=1] + store i32 %1137, i32* %1129, align 4 + %1138 = shl i32 %bsBuff.tmp.0524, 8 ; [#uses=2] + %1139 = add i32 %bsLive.tmp.0525, -8 ; [#uses=3] + br label %bb1.i46.i + +bb1.i46.i: ; preds = %bb.i45.i, %bsW.exit53.i + %bsLive.tmp.0525 = phi i32 [ %1125, %bsW.exit53.i ], [ %1139, %bb.i45.i ] ; [#uses=1] + %bsBuff.tmp.0524 = phi i32 [ %1124, %bsW.exit53.i ], [ %1138, %bb.i45.i ] ; [#uses=2] + %1140 = phi i32 [ %1139, %bb.i45.i ], [ %1125, %bsW.exit53.i ] ; [#uses=2] + %1141 = phi i32 [ %1138, %bb.i45.i ], [ %1124, %bsW.exit53.i ] ; [#uses=1] + %1142 = phi i32 [ %1139, %bb.i45.i ], [ %1125, %bsW.exit53.i ] ; [#uses=1] + %1143 = icmp sgt i32 %1142, 7 ; [#uses=1] + br i1 %1143, label %bb.i45.i, label %bsW.exit47.i + +bsW.exit47.i: ; preds = %bb1.i46.i + %1144 = sub i32 24, %1140 ; [#uses=1] + %1145 = shl i32 56, %1144 ; [#uses=1] + %1146 = or i32 %1145, %bsBuff.tmp.0524 ; [#uses=3] + store i32 %1146, i32* @bsBuff, align 4 + %1147 = add i32 %1140, 8 ; [#uses=4] + store i32 %1147, i32* @bsLive, align 4 + %.b.i38.i = load i1* @bsStream.b ; [#uses=1] + %1148 = zext i1 %.b.i38.i to i32 ; [#uses=3] + %1149 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1148, i32 3 ; [#uses=1] + %1150 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1148, i32 2 ; [#uses=2] + %1151 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1148, i32 1 ; [#uses=2] + br label %bb1.i40.i + +bb.i39.i: ; preds = %bb1.i40.i + %1152 = lshr i32 %1163, 24 ; [#uses=1] + %1153 = trunc i32 %1152 to i8 ; [#uses=1] + %1154 = load i8** %1149, align 4 ; [#uses=1] + %1155 = load i32* %1150, align 8 ; [#uses=2] + %1156 = getelementptr i8* %1154, i32 %1155 ; [#uses=1] + store i8 %1153, i8* %1156, align 1 + %1157 = add i32 %1155, 1 ; [#uses=1] + store i32 %1157, i32* %1150, align 8 + %1158 = load i32* %1151, align 4 ; [#uses=1] + %1159 = add i32 %1158, 1 ; [#uses=1] + store i32 %1159, i32* %1151, align 4 + %1160 = shl i32 %bsBuff.tmp.0528, 8 ; [#uses=2] + %1161 = add i32 %bsLive.tmp.0529, -8 ; [#uses=3] + br label %bb1.i40.i + +bb1.i40.i: ; preds = %bb.i39.i, %bsW.exit47.i + %bsLive.tmp.0529 = phi i32 [ %1147, %bsW.exit47.i ], [ %1161, %bb.i39.i ] ; [#uses=1] + %bsBuff.tmp.0528 = phi i32 [ %1146, %bsW.exit47.i ], [ %1160, %bb.i39.i ] ; [#uses=2] + %1162 = phi i32 [ %1161, %bb.i39.i ], [ %1147, %bsW.exit47.i ] ; [#uses=2] + %1163 = phi i32 [ %1160, %bb.i39.i ], [ %1146, %bsW.exit47.i ] ; [#uses=1] + %1164 = phi i32 [ %1161, %bb.i39.i ], [ %1147, %bsW.exit47.i ] ; [#uses=1] + %1165 = icmp sgt i32 %1164, 7 ; [#uses=1] + br i1 %1165, label %bb.i39.i, label %bsW.exit41.i + +bsW.exit41.i: ; preds = %bb1.i40.i + %1166 = sub i32 24, %1162 ; [#uses=1] + %1167 = shl i32 80, %1166 ; [#uses=1] + %1168 = or i32 %1167, %bsBuff.tmp.0528 ; [#uses=3] + store i32 %1168, i32* @bsBuff, align 4 + %1169 = add i32 %1162, 8 ; [#uses=4] + store i32 %1169, i32* @bsLive, align 4 + %.b.i32.i = load i1* @bsStream.b ; [#uses=1] + %1170 = zext i1 %.b.i32.i to i32 ; [#uses=3] + %1171 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1170, i32 3 ; [#uses=1] + %1172 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1170, i32 2 ; [#uses=2] + %1173 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1170, i32 1 ; [#uses=2] + br label %bb1.i34.i + +bb.i33.i: ; preds = %bb1.i34.i + %1174 = lshr i32 %1185, 24 ; [#uses=1] + %1175 = trunc i32 %1174 to i8 ; [#uses=1] + %1176 = load i8** %1171, align 4 ; [#uses=1] + %1177 = load i32* %1172, align 8 ; [#uses=2] + %1178 = getelementptr i8* %1176, i32 %1177 ; [#uses=1] + store i8 %1175, i8* %1178, align 1 + %1179 = add i32 %1177, 1 ; [#uses=1] + store i32 %1179, i32* %1172, align 8 + %1180 = load i32* %1173, align 4 ; [#uses=1] + %1181 = add i32 %1180, 1 ; [#uses=1] + store i32 %1181, i32* %1173, align 4 + %1182 = shl i32 %bsBuff.tmp.0532, 8 ; [#uses=2] + %1183 = add i32 %bsLive.tmp.0533, -8 ; [#uses=3] + br label %bb1.i34.i + +bb1.i34.i: ; preds = %bb.i33.i, %bsW.exit41.i + %bsLive.tmp.0533 = phi i32 [ %1169, %bsW.exit41.i ], [ %1183, %bb.i33.i ] ; [#uses=1] + %bsBuff.tmp.0532 = phi i32 [ %1168, %bsW.exit41.i ], [ %1182, %bb.i33.i ] ; [#uses=2] + %1184 = phi i32 [ %1183, %bb.i33.i ], [ %1169, %bsW.exit41.i ] ; [#uses=2] + %1185 = phi i32 [ %1182, %bb.i33.i ], [ %1168, %bsW.exit41.i ] ; [#uses=1] + %1186 = phi i32 [ %1183, %bb.i33.i ], [ %1169, %bsW.exit41.i ] ; [#uses=1] + %1187 = icmp sgt i32 %1186, 7 ; [#uses=1] + br i1 %1187, label %bb.i33.i, label %bsW.exit35.i + +bsW.exit35.i: ; preds = %bb1.i34.i + %1188 = sub i32 24, %1184 ; [#uses=1] + %1189 = shl i32 144, %1188 ; [#uses=1] + %1190 = or i32 %1189, %bsBuff.tmp.0532 ; [#uses=3] + store i32 %1190, i32* @bsBuff, align 4 + %1191 = add i32 %1184, 8 ; [#uses=4] + store i32 %1191, i32* @bsLive, align 4 + %1192 = lshr i32 %combinedCRC.0.lcssa.i, 24 ; [#uses=1] + %.b.i26.i = load i1* @bsStream.b ; [#uses=1] + %1193 = zext i1 %.b.i26.i to i32 ; [#uses=3] + %1194 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1193, i32 3 ; [#uses=1] + %1195 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1193, i32 2 ; [#uses=2] + %1196 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1193, i32 1 ; [#uses=2] + br label %bb1.i28.i + +bb.i27.i: ; preds = %bb1.i28.i + %1197 = lshr i32 %1208, 24 ; [#uses=1] + %1198 = trunc i32 %1197 to i8 ; [#uses=1] + %1199 = load i8** %1194, align 4 ; [#uses=1] + %1200 = load i32* %1195, align 8 ; [#uses=2] + %1201 = getelementptr i8* %1199, i32 %1200 ; [#uses=1] + store i8 %1198, i8* %1201, align 1 + %1202 = add i32 %1200, 1 ; [#uses=1] + store i32 %1202, i32* %1195, align 8 + %1203 = load i32* %1196, align 4 ; [#uses=1] + %1204 = add i32 %1203, 1 ; [#uses=1] + store i32 %1204, i32* %1196, align 4 + %1205 = shl i32 %bsBuff.tmp.0536, 8 ; [#uses=2] + %1206 = add i32 %bsLive.tmp.0537, -8 ; [#uses=3] + br label %bb1.i28.i + +bb1.i28.i: ; preds = %bb.i27.i, %bsW.exit35.i + %bsLive.tmp.0537 = phi i32 [ %1191, %bsW.exit35.i ], [ %1206, %bb.i27.i ] ; [#uses=1] + %bsBuff.tmp.0536 = phi i32 [ %1190, %bsW.exit35.i ], [ %1205, %bb.i27.i ] ; [#uses=2] + %1207 = phi i32 [ %1206, %bb.i27.i ], [ %1191, %bsW.exit35.i ] ; [#uses=2] + %1208 = phi i32 [ %1205, %bb.i27.i ], [ %1190, %bsW.exit35.i ] ; [#uses=1] + %1209 = phi i32 [ %1206, %bb.i27.i ], [ %1191, %bsW.exit35.i ] ; [#uses=1] + %1210 = icmp sgt i32 %1209, 7 ; [#uses=1] + br i1 %1210, label %bb.i27.i, label %bsW.exit29.i + +bsW.exit29.i: ; preds = %bb1.i28.i + %1211 = sub i32 24, %1207 ; [#uses=1] + %1212 = shl i32 %1192, %1211 ; [#uses=1] + %1213 = or i32 %1212, %bsBuff.tmp.0536 ; [#uses=3] + store i32 %1213, i32* @bsBuff, align 4 + %1214 = add i32 %1207, 8 ; [#uses=4] + store i32 %1214, i32* @bsLive, align 4 + %1215 = lshr i32 %combinedCRC.0.lcssa.i, 16 ; [#uses=1] + %1216 = and i32 %1215, 255 ; [#uses=1] + %.b.i20.i = load i1* @bsStream.b ; [#uses=1] + %1217 = zext i1 %.b.i20.i to i32 ; [#uses=3] + %1218 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1217, i32 3 ; [#uses=1] + %1219 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1217, i32 2 ; [#uses=2] + %1220 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1217, i32 1 ; [#uses=2] + br label %bb1.i22.i + +bb.i21.i: ; preds = %bb1.i22.i + %1221 = lshr i32 %1232, 24 ; [#uses=1] + %1222 = trunc i32 %1221 to i8 ; [#uses=1] + %1223 = load i8** %1218, align 4 ; [#uses=1] + %1224 = load i32* %1219, align 8 ; [#uses=2] + %1225 = getelementptr i8* %1223, i32 %1224 ; [#uses=1] + store i8 %1222, i8* %1225, align 1 + %1226 = add i32 %1224, 1 ; [#uses=1] + store i32 %1226, i32* %1219, align 8 + %1227 = load i32* %1220, align 4 ; [#uses=1] + %1228 = add i32 %1227, 1 ; [#uses=1] + store i32 %1228, i32* %1220, align 4 + %1229 = shl i32 %bsBuff.tmp.0540, 8 ; [#uses=2] + %1230 = add i32 %bsLive.tmp.0541, -8 ; [#uses=3] + br label %bb1.i22.i + +bb1.i22.i: ; preds = %bb.i21.i, %bsW.exit29.i + %bsLive.tmp.0541 = phi i32 [ %1214, %bsW.exit29.i ], [ %1230, %bb.i21.i ] ; [#uses=1] + %bsBuff.tmp.0540 = phi i32 [ %1213, %bsW.exit29.i ], [ %1229, %bb.i21.i ] ; [#uses=2] + %1231 = phi i32 [ %1230, %bb.i21.i ], [ %1214, %bsW.exit29.i ] ; [#uses=2] + %1232 = phi i32 [ %1229, %bb.i21.i ], [ %1213, %bsW.exit29.i ] ; [#uses=1] + %1233 = phi i32 [ %1230, %bb.i21.i ], [ %1214, %bsW.exit29.i ] ; [#uses=1] + %1234 = icmp sgt i32 %1233, 7 ; [#uses=1] + br i1 %1234, label %bb.i21.i, label %bsW.exit23.i + +bsW.exit23.i: ; preds = %bb1.i22.i + %1235 = sub i32 24, %1231 ; [#uses=1] + %1236 = shl i32 %1216, %1235 ; [#uses=1] + %1237 = or i32 %1236, %bsBuff.tmp.0540 ; [#uses=3] + store i32 %1237, i32* @bsBuff, align 4 + %1238 = add i32 %1231, 8 ; [#uses=4] + store i32 %1238, i32* @bsLive, align 4 + %1239 = lshr i32 %combinedCRC.0.lcssa.i, 8 ; [#uses=1] + %1240 = and i32 %1239, 255 ; [#uses=1] + %.b.i14.i = load i1* @bsStream.b ; [#uses=1] + %1241 = zext i1 %.b.i14.i to i32 ; [#uses=3] + %1242 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1241, i32 3 ; [#uses=1] + %1243 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1241, i32 2 ; [#uses=2] + %1244 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1241, i32 1 ; [#uses=2] + br label %bb1.i16.i + +bb.i15.i: ; preds = %bb1.i16.i + %1245 = lshr i32 %1256, 24 ; [#uses=1] + %1246 = trunc i32 %1245 to i8 ; [#uses=1] + %1247 = load i8** %1242, align 4 ; [#uses=1] + %1248 = load i32* %1243, align 8 ; [#uses=2] + %1249 = getelementptr i8* %1247, i32 %1248 ; [#uses=1] + store i8 %1246, i8* %1249, align 1 + %1250 = add i32 %1248, 1 ; [#uses=1] + store i32 %1250, i32* %1243, align 8 + %1251 = load i32* %1244, align 4 ; [#uses=1] + %1252 = add i32 %1251, 1 ; [#uses=1] + store i32 %1252, i32* %1244, align 4 + %1253 = shl i32 %bsBuff.tmp.0544, 8 ; [#uses=2] + %1254 = add i32 %bsLive.tmp.0545, -8 ; [#uses=3] + br label %bb1.i16.i + +bb1.i16.i: ; preds = %bb.i15.i, %bsW.exit23.i + %bsLive.tmp.0545 = phi i32 [ %1238, %bsW.exit23.i ], [ %1254, %bb.i15.i ] ; [#uses=1] + %bsBuff.tmp.0544 = phi i32 [ %1237, %bsW.exit23.i ], [ %1253, %bb.i15.i ] ; [#uses=2] + %1255 = phi i32 [ %1254, %bb.i15.i ], [ %1238, %bsW.exit23.i ] ; [#uses=2] + %1256 = phi i32 [ %1253, %bb.i15.i ], [ %1237, %bsW.exit23.i ] ; [#uses=1] + %1257 = phi i32 [ %1254, %bb.i15.i ], [ %1238, %bsW.exit23.i ] ; [#uses=1] + %1258 = icmp sgt i32 %1257, 7 ; [#uses=1] + br i1 %1258, label %bb.i15.i, label %bsW.exit17.i + +bsW.exit17.i: ; preds = %bb1.i16.i + %1259 = sub i32 24, %1255 ; [#uses=1] + %1260 = shl i32 %1240, %1259 ; [#uses=1] + %1261 = or i32 %1260, %bsBuff.tmp.0544 ; [#uses=3] + store i32 %1261, i32* @bsBuff, align 4 + %1262 = add i32 %1255, 8 ; [#uses=4] + store i32 %1262, i32* @bsLive, align 4 + %1263 = and i32 %combinedCRC.0.lcssa.i, 255 ; [#uses=1] + %.b.i8.i = load i1* @bsStream.b ; [#uses=1] + %1264 = zext i1 %.b.i8.i to i32 ; [#uses=3] + %1265 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1264, i32 3 ; [#uses=1] + %1266 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1264, i32 2 ; [#uses=2] + %1267 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1264, i32 1 ; [#uses=2] + br label %bb1.i10.i + +bb.i9.i: ; preds = %bb1.i10.i + %1268 = lshr i32 %1279, 24 ; [#uses=1] + %1269 = trunc i32 %1268 to i8 ; [#uses=1] + %1270 = load i8** %1265, align 4 ; [#uses=1] + %1271 = load i32* %1266, align 8 ; [#uses=2] + %1272 = getelementptr i8* %1270, i32 %1271 ; [#uses=1] + store i8 %1269, i8* %1272, align 1 + %1273 = add i32 %1271, 1 ; [#uses=1] + store i32 %1273, i32* %1266, align 8 + %1274 = load i32* %1267, align 4 ; [#uses=1] + %1275 = add i32 %1274, 1 ; [#uses=1] + store i32 %1275, i32* %1267, align 4 + %1276 = shl i32 %bsBuff.tmp.0548, 8 ; [#uses=2] + %1277 = add i32 %bsLive.tmp.0549, -8 ; [#uses=3] + br label %bb1.i10.i + +bb1.i10.i: ; preds = %bb.i9.i, %bsW.exit17.i + %bsLive.tmp.0549 = phi i32 [ %1262, %bsW.exit17.i ], [ %1277, %bb.i9.i ] ; [#uses=1] + %bsBuff.tmp.0548 = phi i32 [ %1261, %bsW.exit17.i ], [ %1276, %bb.i9.i ] ; [#uses=2] + %1278 = phi i32 [ %1277, %bb.i9.i ], [ %1262, %bsW.exit17.i ] ; [#uses=2] + %1279 = phi i32 [ %1276, %bb.i9.i ], [ %1261, %bsW.exit17.i ] ; [#uses=1] + %1280 = phi i32 [ %1277, %bb.i9.i ], [ %1262, %bsW.exit17.i ] ; [#uses=1] + %1281 = icmp sgt i32 %1280, 7 ; [#uses=1] + br i1 %1281, label %bb.i9.i, label %bb1thread-split.i.i74 + +bb.i2.i: ; preds = %bb1.i5.i + %1282 = lshr i32 %1300, 24 ; [#uses=1] + %1283 = trunc i32 %1282 to i8 ; [#uses=1] + %1284 = load i8** %1297, align 4 ; [#uses=1] + %1285 = load i32* %1298, align 8 ; [#uses=2] + %1286 = getelementptr i8* %1284, i32 %1285 ; [#uses=1] + store i8 %1283, i8* %1286, align 1 + %1287 = add i32 %1285, 1 ; [#uses=1] + store i32 %1287, i32* %1298, align 8 + %1288 = load i32* %1299, align 4 ; [#uses=1] + %1289 = add i32 %1288, 1 ; [#uses=1] + store i32 %1289, i32* %1299, align 4 + %1290 = shl i32 %bsBuff.tmp.0332, 8 ; [#uses=2] + %1291 = add i32 %bsLive.tmp.0333, -8 ; [#uses=2] + br label %bb1.i5.i + +bb1thread-split.i.i74: ; preds = %bb1.i10.i + %1292 = sub i32 24, %1278 ; [#uses=1] + %1293 = shl i32 %1263, %1292 ; [#uses=1] + %1294 = or i32 %1293, %bsBuff.tmp.0548 ; [#uses=3] + store i32 %1294, i32* @bsBuff, align 4 + %1295 = add i32 %1278, 8 ; [#uses=3] + store i32 %1295, i32* @bsLive, align 4 + %.b.i1.i = load i1* @bsStream.b ; [#uses=1] + %1296 = zext i1 %.b.i1.i to i32 ; [#uses=3] + %1297 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1296, i32 3 ; [#uses=1] + %1298 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1296, i32 2 ; [#uses=2] + %1299 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1296, i32 1 ; [#uses=2] + br label %bb1.i5.i + +bb1.i5.i: ; preds = %bb1thread-split.i.i74, %bb.i2.i + %bsLive.tmp.0333 = phi i32 [ %1295, %bb1thread-split.i.i74 ], [ %1291, %bb.i2.i ] ; [#uses=2] + %bsBuff.tmp.0332 = phi i32 [ %1294, %bb1thread-split.i.i74 ], [ %1290, %bb.i2.i ] ; [#uses=2] + %1300 = phi i32 [ %1294, %bb1thread-split.i.i74 ], [ %1290, %bb.i2.i ] ; [#uses=1] + %1301 = phi i32 [ %1295, %bb1thread-split.i.i74 ], [ %1291, %bb.i2.i ] ; [#uses=1] + %1302 = icmp sgt i32 %1301, 0 ; [#uses=1] + br i1 %1302, label %bb.i2.i, label %bsFinishedWithStream.exit.i75 + +bsFinishedWithStream.exit.i75: ; preds = %bb1.i5.i + store i32 %bsBuff.tmp.0332, i32* @bsBuff + store i32 %bsLive.tmp.0333, i32* @bsLive + store i1 false, i1* @bsStream.b + %1303 = load i32* @bytesIn, align 4 ; [#uses=1] + %1304 = icmp eq i32 %1303, 0 ; [#uses=1] + br i1 %1304, label %bb23.i, label %bb24.i + +bb23.i: ; preds = %bsFinishedWithStream.exit.i75 + store i32 1, i32* @bytesIn, align 4 + br label %bb24.i + +bb24.i: ; preds = %bb23.i, %bsFinishedWithStream.exit.i75 + %1305 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 1), align 4 ; [#uses=1] + %1306 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([36 x i8]* @"\01LC2492", i32 0, i32 0), i32 %1305) nounwind ; [#uses=0] + %1307 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=1] + %1308 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 3), align 4 ; [#uses=1] + tail call void @llvm.memset.i32(i8* %1308, i8 0, i32 %1307, i32 1) nounwind + store i32 0, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 + store i32 0, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 2), align 8 + store i32 0, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 + %1309 = tail call i32 @puts(i8* getelementptr ([19 x i8]* @"\01LC2593", i32 0, i32 0)) nounwind ; [#uses=0] + store i32 0, i32* @blockSize100k, align 4 + store i1 true, i1* @bsStream.b + store i32 0, i32* @bsLive, align 4 + store i32 0, i32* @bsBuff, align 4 + store i32 0, i32* @bytesIn, align 4 + br label %bb3.i.i.i + +bb3.i3.i: ; preds = %bb3.i.i.i + %1310 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 ; [#uses=3] + %1311 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 1), align 4 ; [#uses=1] + %1312 = icmp slt i32 %1310, %1311 ; [#uses=1] + br i1 %1312, label %bb2.i.i.i, label %bb1.i.i.i + +bb1.i.i.i: ; preds = %bb3.i3.i + store i32 %bsBuff.tmp.0552, i32* @bsBuff + store i32 %bsLive.tmp.0553, i32* @bsLive + tail call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i.i: ; preds = %bb3.i3.i + %1313 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 3), align 4 ; [#uses=1] + %1314 = getelementptr i8* %1313, i32 %1310 ; [#uses=1] + %1315 = load i8* %1314, align 1 ; [#uses=1] + %1316 = add i32 %1310, 1 ; [#uses=1] + store i32 %1316, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 + %1317 = zext i8 %1315 to i32 ; [#uses=1] + %1318 = shl i32 %bsBuff.tmp.0552, 8 ; [#uses=1] + %1319 = or i32 %1318, %1317 ; [#uses=2] + %1320 = add i32 %bsLive.tmp.0553, 8 ; [#uses=2] + %phitmp65.i = icmp slt i32 %1320, 8 ; [#uses=1] + br label %bb3.i.i.i + +bb3.i.i.i: ; preds = %bb2.i.i.i, %bb24.i + %bsLive.tmp.0553 = phi i32 [ 0, %bb24.i ], [ %1320, %bb2.i.i.i ] ; [#uses=3] + %bsBuff.tmp.0552 = phi i32 [ 0, %bb24.i ], [ %1319, %bb2.i.i.i ] ; [#uses=4] + %1321 = phi i32 [ %1319, %bb2.i.i.i ], [ 0, %bb24.i ] ; [#uses=2] + %1322 = phi i32 [ %bsLive.tmp.0553, %bb2.i.i.i ], [ -8, %bb24.i ] ; [#uses=5] + %1323 = phi i1 [ %phitmp65.i, %bb2.i.i.i ], [ true, %bb24.i ] ; [#uses=1] + br i1 %1323, label %bb3.i3.i, label %bsGetUChar.exit.i + +bsGetUChar.exit.i: ; preds = %bb3.i.i.i + store i32 %bsBuff.tmp.0552, i32* @bsBuff + %1324 = lshr i32 %1321, %1322 ; [#uses=1] + store i32 %1322, i32* @bsLive, align 4 + %retval12.i.i = trunc i32 %1324 to i8 ; [#uses=1] + br label %bb3.i.i5.i + +bb3.i11.i: ; preds = %bb3.i.i5.i + %1325 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 ; [#uses=3] + %1326 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 1), align 4 ; [#uses=1] + %1327 = icmp slt i32 %1325, %1326 ; [#uses=1] + br i1 %1327, label %bb2.i.i4.i, label %bb1.i.i3.i + +bb1.i.i3.i: ; preds = %bb3.i11.i + store i32 %bsBuff.tmp.0556, i32* @bsBuff + store i32 %bsLive.tmp.0557, i32* @bsLive + tail call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i4.i: ; preds = %bb3.i11.i + %1328 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 3), align 4 ; [#uses=1] + %1329 = getelementptr i8* %1328, i32 %1325 ; [#uses=1] + %1330 = load i8* %1329, align 1 ; [#uses=1] + %1331 = add i32 %1325, 1 ; [#uses=1] + store i32 %1331, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 + %1332 = zext i8 %1330 to i32 ; [#uses=1] + %1333 = shl i32 %bsBuff.tmp.0556, 8 ; [#uses=1] + %1334 = or i32 %1333, %1332 ; [#uses=2] + %1335 = add i32 %bsLive.tmp.0557, 8 ; [#uses=3] + br label %bb3.i.i5.i + +bb3.i.i5.i: ; preds = %bb2.i.i4.i, %bsGetUChar.exit.i + %bsLive.tmp.0557 = phi i32 [ %1322, %bsGetUChar.exit.i ], [ %1335, %bb2.i.i4.i ] ; [#uses=2] + %bsBuff.tmp.0556 = phi i32 [ %bsBuff.tmp.0552, %bsGetUChar.exit.i ], [ %1334, %bb2.i.i4.i ] ; [#uses=4] + %1336 = phi i32 [ %1334, %bb2.i.i4.i ], [ %1321, %bsGetUChar.exit.i ] ; [#uses=2] + %1337 = phi i32 [ %1335, %bb2.i.i4.i ], [ %1322, %bsGetUChar.exit.i ] ; [#uses=1] + %1338 = phi i32 [ %1335, %bb2.i.i4.i ], [ %1322, %bsGetUChar.exit.i ] ; [#uses=1] + %1339 = icmp slt i32 %1338, 8 ; [#uses=1] + br i1 %1339, label %bb3.i11.i, label %bsGetUChar.exit7.i + +bsGetUChar.exit7.i: ; preds = %bb3.i.i5.i + store i32 %bsBuff.tmp.0556, i32* @bsBuff + %1340 = add i32 %1337, -8 ; [#uses=5] + %1341 = lshr i32 %1336, %1340 ; [#uses=1] + store i32 %1340, i32* @bsLive, align 4 + %retval12.i6.i = trunc i32 %1341 to i8 ; [#uses=1] + br label %bb3.i.i12.i + +bb3.i18.i: ; preds = %bb3.i.i12.i + %1342 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 ; [#uses=3] + %1343 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 1), align 4 ; [#uses=1] + %1344 = icmp slt i32 %1342, %1343 ; [#uses=1] + br i1 %1344, label %bb2.i.i11.i, label %bb1.i.i10.i + +bb1.i.i10.i: ; preds = %bb3.i18.i + store i32 %bsBuff.tmp.0560, i32* @bsBuff + store i32 %bsLive.tmp.0561, i32* @bsLive + tail call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i11.i: ; preds = %bb3.i18.i + %1345 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 3), align 4 ; [#uses=1] + %1346 = getelementptr i8* %1345, i32 %1342 ; [#uses=1] + %1347 = load i8* %1346, align 1 ; [#uses=1] + %1348 = add i32 %1342, 1 ; [#uses=1] + store i32 %1348, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 + %1349 = zext i8 %1347 to i32 ; [#uses=1] + %1350 = shl i32 %bsBuff.tmp.0560, 8 ; [#uses=1] + %1351 = or i32 %1350, %1349 ; [#uses=2] + %1352 = add i32 %bsLive.tmp.0561, 8 ; [#uses=3] + br label %bb3.i.i12.i + +bb3.i.i12.i: ; preds = %bb2.i.i11.i, %bsGetUChar.exit7.i + %bsLive.tmp.0561 = phi i32 [ %1340, %bsGetUChar.exit7.i ], [ %1352, %bb2.i.i11.i ] ; [#uses=2] + %bsBuff.tmp.0560 = phi i32 [ %bsBuff.tmp.0556, %bsGetUChar.exit7.i ], [ %1351, %bb2.i.i11.i ] ; [#uses=4] + %1353 = phi i32 [ %1351, %bb2.i.i11.i ], [ %1336, %bsGetUChar.exit7.i ] ; [#uses=2] + %1354 = phi i32 [ %1352, %bb2.i.i11.i ], [ %1340, %bsGetUChar.exit7.i ] ; [#uses=1] + %1355 = phi i32 [ %1352, %bb2.i.i11.i ], [ %1340, %bsGetUChar.exit7.i ] ; [#uses=1] + %1356 = icmp slt i32 %1355, 8 ; [#uses=1] + br i1 %1356, label %bb3.i18.i, label %bsGetUChar.exit14.i + +bsGetUChar.exit14.i: ; preds = %bb3.i.i12.i + store i32 %bsBuff.tmp.0560, i32* @bsBuff + %1357 = add i32 %1354, -8 ; [#uses=5] + %1358 = lshr i32 %1353, %1357 ; [#uses=1] + store i32 %1357, i32* @bsLive, align 4 + %retval12.i13.i = trunc i32 %1358 to i8 ; [#uses=1] + br label %bb3.i.i19.i + +bb3.i25.i: ; preds = %bb3.i.i19.i + %1359 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 ; [#uses=3] + %1360 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 1), align 4 ; [#uses=1] + %1361 = icmp slt i32 %1359, %1360 ; [#uses=1] + br i1 %1361, label %bb2.i.i18.i, label %bb1.i.i17.i + +bb1.i.i17.i: ; preds = %bb3.i25.i + store i32 %bsBuff.promoted326, i32* @bsBuff + store i32 %bsLive.tmp.0565, i32* @bsLive + tail call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i18.i: ; preds = %bb3.i25.i + %1362 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 3), align 4 ; [#uses=1] + %1363 = getelementptr i8* %1362, i32 %1359 ; [#uses=1] + %1364 = load i8* %1363, align 1 ; [#uses=1] + %1365 = add i32 %1359, 1 ; [#uses=1] + store i32 %1365, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 + %1366 = zext i8 %1364 to i32 ; [#uses=1] + %1367 = shl i32 %bsBuff.promoted326, 8 ; [#uses=1] + %1368 = or i32 %1367, %1366 ; [#uses=2] + %1369 = add i32 %bsLive.tmp.0565, 8 ; [#uses=3] + br label %bb3.i.i19.i + +bb3.i.i19.i: ; preds = %bb2.i.i18.i, %bsGetUChar.exit14.i + %bsLive.tmp.0565 = phi i32 [ %1357, %bsGetUChar.exit14.i ], [ %1369, %bb2.i.i18.i ] ; [#uses=2] + %bsBuff.promoted326 = phi i32 [ %bsBuff.tmp.0560, %bsGetUChar.exit14.i ], [ %1368, %bb2.i.i18.i ] ; [#uses=6] + %1370 = phi i32 [ %1368, %bb2.i.i18.i ], [ %1353, %bsGetUChar.exit14.i ] ; [#uses=1] + %1371 = phi i32 [ %1369, %bb2.i.i18.i ], [ %1357, %bsGetUChar.exit14.i ] ; [#uses=1] + %1372 = phi i32 [ %1369, %bb2.i.i18.i ], [ %1357, %bsGetUChar.exit14.i ] ; [#uses=1] + %1373 = icmp slt i32 %1372, 8 ; [#uses=1] + br i1 %1373, label %bb3.i25.i, label %bsGetUChar.exit21.i + +bsGetUChar.exit21.i: ; preds = %bb3.i.i19.i + store i32 %bsBuff.promoted326, i32* @bsBuff + %1374 = add i32 %1371, -8 ; [#uses=8] + %1375 = lshr i32 %1370, %1374 ; [#uses=2] + store i32 %1374, i32* @bsLive, align 4 + %retval12.i20.i = trunc i32 %1375 to i8 ; [#uses=2] + %1376 = icmp ne i8 %retval12.i.i, 66 ; [#uses=1] + %1377 = icmp ne i8 %retval12.i6.i, 90 ; [#uses=1] + %1378 = or i1 %1377, %1376 ; [#uses=1] + br i1 %1378, label %bb23, label %bb.i + +bb.i: ; preds = %bsGetUChar.exit21.i + %1379 = icmp ne i8 %retval12.i13.i, 104 ; [#uses=1] + %1380 = icmp ult i8 %retval12.i20.i, 49 ; [#uses=1] + %1381 = icmp ugt i8 %retval12.i20.i, 57 ; [#uses=1] + %1382 = or i1 %1381, %1379 ; [#uses=1] + %or.cond.i = or i1 %1382, %1380 ; [#uses=1] + br i1 %or.cond.i, label %bb23, label %bb10.i1 + +bb10.i1: ; preds = %bb.i + %1383 = and i32 %1375, 255 ; [#uses=1] + %1384 = add i32 %1383, -48 ; [#uses=6] + %1385 = icmp ugt i32 %1384, 9 ; [#uses=1] + br i1 %1385, label %bb4.i76.i, label %bb5.i77.i + +bb4.i76.i: ; preds = %bb10.i1 + tail call fastcc void @panic(i8* getelementptr ([28 x i8]* @"\01LC54", i32 0, i32 0)) nounwind ssp + unreachable + +bb5.i77.i: ; preds = %bb10.i1 + %1386 = icmp eq i32 %1384, 0 ; [#uses=1] + br i1 %1386, label %bb13.i, label %bb6.i.i + +bb6.i.i: ; preds = %bb5.i77.i + store i32 %1384, i32* @blockSize100k, align 4 + %1387 = icmp eq i8* %ll8.2, null ; [#uses=1] + br i1 %1387, label %bb12.i80.i, label %bb11.i.i + +bb11.i.i: ; preds = %bb6.i.i + free i8* %ll8.2 + br label %bb12.i80.i + +bb12.i80.i: ; preds = %bb11.i.i, %bb6.i.i + %1388 = icmp eq i32* %tt.2, null ; [#uses=1] + br i1 %1388, label %bb14.i82.i, label %bb13.i81.i + +bb13.i81.i: ; preds = %bb12.i80.i + free i32* %tt.2 + br label %bb14.i82.i + +bb14.i82.i: ; preds = %bb13.i81.i, %bb12.i80.i + %1389 = icmp eq i32 %1384, 0 ; [#uses=1] + br i1 %1389, label %bb13.i, label %bb15.i83.i + +bb15.i83.i: ; preds = %bb14.i82.i + %1390 = mul i32 %1384, 100000 ; [#uses=3] + %1391 = malloc i8, i32 %1390 ; [#uses=2] + %1392 = malloc i32, i32 %1390 ; [#uses=2] + %1393 = icmp eq i8* %1391, null ; [#uses=1] + %1394 = icmp eq i32* %1392, null ; [#uses=1] + %or.cond2.i.i3 = or i1 %1393, %1394 ; [#uses=1] + br i1 %or.cond2.i.i3, label %bb21.i85.i, label %bb13.i + +bb21.i85.i: ; preds = %bb15.i83.i + %1395 = mul i32 %1384, 500000 ; [#uses=1] + %1396 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] + %1397 = tail call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %1396, i8* getelementptr ([206 x i8]* @"\01LC6", i32 0, i32 0), i8* null, i32 %1395, i32 %1390) nounwind ; [#uses=0] + %1398 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] + %1399 = tail call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %1398, i8* getelementptr ([36 x i8]* @"\01LC", i32 0, i32 0), i8* getelementptr ([1024 x i8]* @inName, i32 0, i32 0), i8* getelementptr ([1024 x i8]* @outName, i32 0, i32 0)) nounwind ; [#uses=0] + tail call fastcc void @cleanUpAndFail(i32 1) nounwind ssp + unreachable + +bb13.i: ; preds = %bb54.i, %bb15.i83.i, %bb14.i82.i, %bb5.i77.i + %tt.0 = phi i32* [ %tt.2, %bb5.i77.i ], [ %tt.2, %bb14.i82.i ], [ %1392, %bb15.i83.i ], [ %tt.0, %bb54.i ] ; [#uses=8] + %ll8.0 = phi i8* [ %ll8.2, %bb5.i77.i ], [ %ll8.2, %bb14.i82.i ], [ %1391, %bb15.i83.i ], [ %ll8.0, %bb54.i ] ; [#uses=9] + %bsLive.promoted303 = phi i32 [ %.pre.i.i22.i.pre, %bb54.i ], [ %1374, %bb15.i83.i ], [ %1374, %bb14.i82.i ], [ %1374, %bb5.i77.i ] ; [#uses=1] + %bsBuff.promoted302 = phi i32 [ %bsBuff.promoted302.pre, %bb54.i ], [ %bsBuff.promoted326, %bb15.i83.i ], [ %bsBuff.promoted326, %bb14.i82.i ], [ %bsBuff.promoted326, %bb5.i77.i ] ; [#uses=1] + %.b6.i = phi i32 [ %phitmp758, %bb54.i ], [ 1, %bb15.i83.i ], [ 1, %bb14.i82.i ], [ 1, %bb5.i77.i ] ; [#uses=3] + %.pre.i.i22.i = phi i32 [ %.pre.i.i22.i.pre, %bb54.i ], [ %1374, %bb15.i83.i ], [ %1374, %bb14.i82.i ], [ %1374, %bb5.i77.i ] ; [#uses=2] + %computedCombinedCRC.0.i = phi i32 [ %2147, %bb54.i ], [ 0, %bb15.i83.i ], [ 0, %bb14.i82.i ], [ 0, %bb5.i77.i ] ; [#uses=4] + %1400 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %.b6.i, i32 2 ; [#uses=2] + %1401 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %.b6.i, i32 1 ; [#uses=1] + %1402 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %.b6.i, i32 3 ; [#uses=1] + br label %bb3.i.i26.i + +bb3.i88.i: ; preds = %bb3.i.i26.i + %1403 = load i32* %1400, align 8 ; [#uses=3] + %1404 = load i32* %1401, align 4 ; [#uses=1] + %1405 = icmp slt i32 %1403, %1404 ; [#uses=1] + br i1 %1405, label %bb2.i.i25.i, label %bb1.i.i24.i + +bb1.i.i24.i: ; preds = %bb3.i88.i + store i32 %bsBuff.tmp.0304, i32* @bsBuff + store i32 %bsLive.tmp.0305, i32* @bsLive + tail call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i25.i: ; preds = %bb3.i88.i + %1406 = load i8** %1402, align 4 ; [#uses=1] + %1407 = getelementptr i8* %1406, i32 %1403 ; [#uses=1] + %1408 = load i8* %1407, align 1 ; [#uses=1] + %1409 = add i32 %1403, 1 ; [#uses=1] + store i32 %1409, i32* %1400, align 8 + %1410 = zext i8 %1408 to i32 ; [#uses=1] + %1411 = shl i32 %bsBuff.tmp.0304, 8 ; [#uses=1] + %1412 = or i32 %1411, %1410 ; [#uses=1] + %1413 = add i32 %bsLive.tmp.0305, 8 ; [#uses=3] + br label %bb3.i.i26.i + +bb3.i.i26.i: ; preds = %bb2.i.i25.i, %bb13.i + %bsLive.tmp.0305 = phi i32 [ %bsLive.promoted303, %bb13.i ], [ %1413, %bb2.i.i25.i ] ; [#uses=2] + %bsBuff.tmp.0304 = phi i32 [ %bsBuff.promoted302, %bb13.i ], [ %1412, %bb2.i.i25.i ] ; [#uses=6] + %1414 = phi i32 [ %1413, %bb2.i.i25.i ], [ %.pre.i.i22.i, %bb13.i ] ; [#uses=1] + %1415 = phi i32 [ %1413, %bb2.i.i25.i ], [ %.pre.i.i22.i, %bb13.i ] ; [#uses=1] + %1416 = icmp slt i32 %1415, 8 ; [#uses=1] + br i1 %1416, label %bb3.i88.i, label %bsGetUChar.exit28.i + +bsGetUChar.exit28.i: ; preds = %bb3.i.i26.i + store i32 %bsBuff.tmp.0304, i32* @bsBuff + %1417 = add i32 %1414, -8 ; [#uses=5] + %1418 = lshr i32 %bsBuff.tmp.0304, %1417 ; [#uses=1] + store i32 %1417, i32* @bsLive, align 4 + %retval12.i27.i = trunc i32 %1418 to i8 ; [#uses=2] + %.b5.i = load i1* @bsStream.b ; [#uses=1] + %1419 = zext i1 %.b5.i to i32 ; [#uses=3] + %1420 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1419, i32 2 ; [#uses=10] + %1421 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1419, i32 1 ; [#uses=5] + %1422 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1419, i32 3 ; [#uses=5] + br label %bb3.i.i33.i + +bb3.i104.i: ; preds = %bb3.i.i33.i + %1423 = load i32* %1420, align 8 ; [#uses=3] + %1424 = load i32* %1421, align 4 ; [#uses=1] + %1425 = icmp slt i32 %1423, %1424 ; [#uses=1] + br i1 %1425, label %bb2.i.i32.i, label %bb1.i.i31.i + +bb1.i.i31.i: ; preds = %bb3.i104.i + store i32 %bsBuff.tmp.0308, i32* @bsBuff + store i32 %bsLive.tmp.0309, i32* @bsLive + tail call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i32.i: ; preds = %bb3.i104.i + %1426 = load i8** %1422, align 4 ; [#uses=1] + %1427 = getelementptr i8* %1426, i32 %1423 ; [#uses=1] + %1428 = load i8* %1427, align 1 ; [#uses=1] + %1429 = add i32 %1423, 1 ; [#uses=1] + store i32 %1429, i32* %1420, align 8 + %1430 = zext i8 %1428 to i32 ; [#uses=1] + %1431 = shl i32 %bsBuff.tmp.0308, 8 ; [#uses=1] + %1432 = or i32 %1431, %1430 ; [#uses=2] + %1433 = add i32 %bsLive.tmp.0309, 8 ; [#uses=3] + br label %bb3.i.i33.i + +bb3.i.i33.i: ; preds = %bb2.i.i32.i, %bsGetUChar.exit28.i + %bsLive.tmp.0309 = phi i32 [ %1417, %bsGetUChar.exit28.i ], [ %1433, %bb2.i.i32.i ] ; [#uses=2] + %bsBuff.tmp.0308 = phi i32 [ %bsBuff.tmp.0304, %bsGetUChar.exit28.i ], [ %1432, %bb2.i.i32.i ] ; [#uses=4] + %1434 = phi i32 [ %1432, %bb2.i.i32.i ], [ %bsBuff.tmp.0304, %bsGetUChar.exit28.i ] ; [#uses=2] + %1435 = phi i32 [ %1433, %bb2.i.i32.i ], [ %1417, %bsGetUChar.exit28.i ] ; [#uses=1] + %1436 = phi i32 [ %1433, %bb2.i.i32.i ], [ %1417, %bsGetUChar.exit28.i ] ; [#uses=1] + %1437 = icmp slt i32 %1436, 8 ; [#uses=1] + br i1 %1437, label %bb3.i104.i, label %bsGetUChar.exit35.i + +bsGetUChar.exit35.i: ; preds = %bb3.i.i33.i + store i32 %bsBuff.tmp.0308, i32* @bsBuff + %1438 = add i32 %1435, -8 ; [#uses=5] + %1439 = lshr i32 %1434, %1438 ; [#uses=1] + store i32 %1438, i32* @bsLive, align 4 + %retval12.i34.i = trunc i32 %1439 to i8 ; [#uses=2] + br label %bb3.i.i40.i + +bb3.i120.i: ; preds = %bb3.i.i40.i + %1440 = load i32* %1420, align 8 ; [#uses=3] + %1441 = load i32* %1421, align 4 ; [#uses=1] + %1442 = icmp slt i32 %1440, %1441 ; [#uses=1] + br i1 %1442, label %bb2.i.i39.i, label %bb1.i.i38.i + +bb1.i.i38.i: ; preds = %bb3.i120.i + store i32 %bsBuff.tmp.0312, i32* @bsBuff + store i32 %bsLive.tmp.0313, i32* @bsLive + tail call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i39.i: ; preds = %bb3.i120.i + %1443 = load i8** %1422, align 4 ; [#uses=1] + %1444 = getelementptr i8* %1443, i32 %1440 ; [#uses=1] + %1445 = load i8* %1444, align 1 ; [#uses=1] + %1446 = add i32 %1440, 1 ; [#uses=1] + store i32 %1446, i32* %1420, align 8 + %1447 = zext i8 %1445 to i32 ; [#uses=1] + %1448 = shl i32 %bsBuff.tmp.0312, 8 ; [#uses=1] + %1449 = or i32 %1448, %1447 ; [#uses=2] + %1450 = add i32 %bsLive.tmp.0313, 8 ; [#uses=3] + br label %bb3.i.i40.i + +bb3.i.i40.i: ; preds = %bb2.i.i39.i, %bsGetUChar.exit35.i + %bsLive.tmp.0313 = phi i32 [ %1438, %bsGetUChar.exit35.i ], [ %1450, %bb2.i.i39.i ] ; [#uses=2] + %bsBuff.tmp.0312 = phi i32 [ %bsBuff.tmp.0308, %bsGetUChar.exit35.i ], [ %1449, %bb2.i.i39.i ] ; [#uses=4] + %1451 = phi i32 [ %1449, %bb2.i.i39.i ], [ %1434, %bsGetUChar.exit35.i ] ; [#uses=2] + %1452 = phi i32 [ %1450, %bb2.i.i39.i ], [ %1438, %bsGetUChar.exit35.i ] ; [#uses=1] + %1453 = phi i32 [ %1450, %bb2.i.i39.i ], [ %1438, %bsGetUChar.exit35.i ] ; [#uses=1] + %1454 = icmp slt i32 %1453, 8 ; [#uses=1] + br i1 %1454, label %bb3.i120.i, label %bsGetUChar.exit42.i + +bsGetUChar.exit42.i: ; preds = %bb3.i.i40.i + store i32 %bsBuff.tmp.0312, i32* @bsBuff + %1455 = add i32 %1452, -8 ; [#uses=5] + %1456 = lshr i32 %1451, %1455 ; [#uses=1] + store i32 %1455, i32* @bsLive, align 4 + %retval12.i41.i = trunc i32 %1456 to i8 ; [#uses=2] + br label %bb3.i.i47.i + +bb3.i128.i: ; preds = %bb3.i.i47.i + %1457 = load i32* %1420, align 8 ; [#uses=3] + %1458 = load i32* %1421, align 4 ; [#uses=1] + %1459 = icmp slt i32 %1457, %1458 ; [#uses=1] + br i1 %1459, label %bb2.i.i46.i, label %bb1.i.i45.i + +bb1.i.i45.i: ; preds = %bb3.i128.i + store i32 %bsBuff.tmp.0316, i32* @bsBuff + store i32 %bsLive.tmp.0317, i32* @bsLive + tail call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i46.i: ; preds = %bb3.i128.i + %1460 = load i8** %1422, align 4 ; [#uses=1] + %1461 = getelementptr i8* %1460, i32 %1457 ; [#uses=1] + %1462 = load i8* %1461, align 1 ; [#uses=1] + %1463 = add i32 %1457, 1 ; [#uses=1] + store i32 %1463, i32* %1420, align 8 + %1464 = zext i8 %1462 to i32 ; [#uses=1] + %1465 = shl i32 %bsBuff.tmp.0316, 8 ; [#uses=1] + %1466 = or i32 %1465, %1464 ; [#uses=2] + %1467 = add i32 %bsLive.tmp.0317, 8 ; [#uses=3] + br label %bb3.i.i47.i + +bb3.i.i47.i: ; preds = %bb2.i.i46.i, %bsGetUChar.exit42.i + %bsLive.tmp.0317 = phi i32 [ %1455, %bsGetUChar.exit42.i ], [ %1467, %bb2.i.i46.i ] ; [#uses=2] + %bsBuff.tmp.0316 = phi i32 [ %bsBuff.tmp.0312, %bsGetUChar.exit42.i ], [ %1466, %bb2.i.i46.i ] ; [#uses=4] + %1468 = phi i32 [ %1466, %bb2.i.i46.i ], [ %1451, %bsGetUChar.exit42.i ] ; [#uses=2] + %1469 = phi i32 [ %1467, %bb2.i.i46.i ], [ %1455, %bsGetUChar.exit42.i ] ; [#uses=1] + %1470 = phi i32 [ %1467, %bb2.i.i46.i ], [ %1455, %bsGetUChar.exit42.i ] ; [#uses=1] + %1471 = icmp slt i32 %1470, 8 ; [#uses=1] + br i1 %1471, label %bb3.i128.i, label %bsGetUChar.exit49.i + +bsGetUChar.exit49.i: ; preds = %bb3.i.i47.i + store i32 %bsBuff.tmp.0316, i32* @bsBuff + %1472 = add i32 %1469, -8 ; [#uses=5] + %1473 = lshr i32 %1468, %1472 ; [#uses=1] + store i32 %1472, i32* @bsLive, align 4 + %retval12.i48.i = trunc i32 %1473 to i8 ; [#uses=2] + br label %bb3.i.i54.i + +bb3.i112.i: ; preds = %bb3.i.i54.i + %1474 = load i32* %1420, align 8 ; [#uses=3] + %1475 = load i32* %1421, align 4 ; [#uses=1] + %1476 = icmp slt i32 %1474, %1475 ; [#uses=1] + br i1 %1476, label %bb2.i.i53.i, label %bb1.i.i52.i + +bb1.i.i52.i: ; preds = %bb3.i112.i + store i32 %bsBuff.tmp.0320, i32* @bsBuff + store i32 %bsLive.tmp.0321, i32* @bsLive + tail call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i53.i: ; preds = %bb3.i112.i + %1477 = load i8** %1422, align 4 ; [#uses=1] + %1478 = getelementptr i8* %1477, i32 %1474 ; [#uses=1] + %1479 = load i8* %1478, align 1 ; [#uses=1] + %1480 = add i32 %1474, 1 ; [#uses=1] + store i32 %1480, i32* %1420, align 8 + %1481 = zext i8 %1479 to i32 ; [#uses=1] + %1482 = shl i32 %bsBuff.tmp.0320, 8 ; [#uses=1] + %1483 = or i32 %1482, %1481 ; [#uses=2] + %1484 = add i32 %bsLive.tmp.0321, 8 ; [#uses=3] + br label %bb3.i.i54.i + +bb3.i.i54.i: ; preds = %bb2.i.i53.i, %bsGetUChar.exit49.i + %bsLive.tmp.0321 = phi i32 [ %1472, %bsGetUChar.exit49.i ], [ %1484, %bb2.i.i53.i ] ; [#uses=2] + %bsBuff.tmp.0320 = phi i32 [ %bsBuff.tmp.0316, %bsGetUChar.exit49.i ], [ %1483, %bb2.i.i53.i ] ; [#uses=4] + %1485 = phi i32 [ %1483, %bb2.i.i53.i ], [ %1468, %bsGetUChar.exit49.i ] ; [#uses=2] + %1486 = phi i32 [ %1484, %bb2.i.i53.i ], [ %1472, %bsGetUChar.exit49.i ] ; [#uses=1] + %1487 = phi i32 [ %1484, %bb2.i.i53.i ], [ %1472, %bsGetUChar.exit49.i ] ; [#uses=1] + %1488 = icmp slt i32 %1487, 8 ; [#uses=1] + br i1 %1488, label %bb3.i112.i, label %bsGetUChar.exit56.i + +bsGetUChar.exit56.i: ; preds = %bb3.i.i54.i + store i32 %bsBuff.tmp.0320, i32* @bsBuff + %1489 = add i32 %1486, -8 ; [#uses=5] + %1490 = lshr i32 %1485, %1489 ; [#uses=1] + store i32 %1489, i32* @bsLive, align 4 + %retval12.i55.i = trunc i32 %1490 to i8 ; [#uses=2] + br label %bb3.i.i61.i + +bb3.i96.i: ; preds = %bb3.i.i61.i + %1491 = load i32* %1420, align 8 ; [#uses=3] + %1492 = load i32* %1421, align 4 ; [#uses=1] + %1493 = icmp slt i32 %1491, %1492 ; [#uses=1] + br i1 %1493, label %bb2.i.i60.i, label %bb1.i.i59.i + +bb1.i.i59.i: ; preds = %bb3.i96.i + store i32 %bsBuff.tmp.0324, i32* @bsBuff + store i32 %bsLive.tmp.0325, i32* @bsLive + tail call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i60.i: ; preds = %bb3.i96.i + %1494 = load i8** %1422, align 4 ; [#uses=1] + %1495 = getelementptr i8* %1494, i32 %1491 ; [#uses=1] + %1496 = load i8* %1495, align 1 ; [#uses=1] + %1497 = add i32 %1491, 1 ; [#uses=1] + store i32 %1497, i32* %1420, align 8 + %1498 = zext i8 %1496 to i32 ; [#uses=1] + %1499 = shl i32 %bsBuff.tmp.0324, 8 ; [#uses=1] + %1500 = or i32 %1499, %1498 ; [#uses=2] + %1501 = add i32 %bsLive.tmp.0325, 8 ; [#uses=3] + br label %bb3.i.i61.i + +bb3.i.i61.i: ; preds = %bb2.i.i60.i, %bsGetUChar.exit56.i + %bsLive.tmp.0325 = phi i32 [ %1489, %bsGetUChar.exit56.i ], [ %1501, %bb2.i.i60.i ] ; [#uses=2] + %bsBuff.tmp.0324 = phi i32 [ %bsBuff.tmp.0320, %bsGetUChar.exit56.i ], [ %1500, %bb2.i.i60.i ] ; [#uses=3] + %1502 = phi i32 [ %1500, %bb2.i.i60.i ], [ %1485, %bsGetUChar.exit56.i ] ; [#uses=1] + %1503 = phi i32 [ %1501, %bb2.i.i60.i ], [ %1489, %bsGetUChar.exit56.i ] ; [#uses=1] + %1504 = phi i32 [ %1501, %bb2.i.i60.i ], [ %1489, %bsGetUChar.exit56.i ] ; [#uses=1] + %1505 = icmp slt i32 %1504, 8 ; [#uses=1] + br i1 %1505, label %bb3.i96.i, label %bsGetUChar.exit63.i + +bsGetUChar.exit63.i: ; preds = %bb3.i.i61.i + store i32 %bsBuff.tmp.0324, i32* @bsBuff + %1506 = add i32 %1503, -8 ; [#uses=2] + %1507 = lshr i32 %1502, %1506 ; [#uses=1] + store i32 %1506, i32* @bsLive, align 4 + %retval12.i62.i = trunc i32 %1507 to i8 ; [#uses=2] + %1508 = icmp eq i8 %retval12.i27.i, 23 ; [#uses=1] + %1509 = icmp eq i8 %retval12.i34.i, 114 ; [#uses=1] + %1510 = and i1 %1509, %1508 ; [#uses=1] + br i1 %1510, label %bb17.i, label %bb25.i + +bb17.i: ; preds = %bsGetUChar.exit63.i + %1511 = icmp eq i8 %retval12.i41.i, 69 ; [#uses=1] + %1512 = icmp eq i8 %retval12.i48.i, 56 ; [#uses=1] + %1513 = and i1 %1512, %1511 ; [#uses=1] + br i1 %1513, label %bb21.i, label %bb25.i + +bb21.i: ; preds = %bb17.i + %1514 = icmp eq i8 %retval12.i55.i, 80 ; [#uses=1] + %1515 = icmp eq i8 %retval12.i62.i, -112 ; [#uses=1] + %1516 = and i1 %1515, %1514 ; [#uses=1] + br i1 %1516, label %bb55.i, label %bb25.i + +bb25.i: ; preds = %bb21.i, %bb17.i, %bsGetUChar.exit63.i + %1517 = icmp ne i8 %retval12.i27.i, 49 ; [#uses=1] + %1518 = icmp ne i8 %retval12.i34.i, 65 ; [#uses=1] + %1519 = or i1 %1518, %1517 ; [#uses=1] + br i1 %1519, label %bb37.i, label %bb29.i + +bb29.i: ; preds = %bb25.i + %1520 = icmp ne i8 %retval12.i41.i, 89 ; [#uses=1] + %1521 = icmp ne i8 %retval12.i48.i, 38 ; [#uses=1] + %1522 = or i1 %1521, %1520 ; [#uses=1] + br i1 %1522, label %bb37.i, label %bb33.i + +bb33.i: ; preds = %bb29.i + %1523 = icmp ne i8 %retval12.i55.i, 83 ; [#uses=1] + %1524 = icmp ne i8 %retval12.i62.i, 89 ; [#uses=1] + %1525 = or i1 %1524, %1523 ; [#uses=1] + br i1 %1525, label %bb37.i, label %bb38.i + +bb37.i: ; preds = %bb33.i, %bb29.i, %bb25.i + %1526 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] + %1527 = tail call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %1526, i8* getelementptr ([86 x i8]* @"\01LC17", i32 0, i32 0), i8* null) nounwind ; [#uses=0] + %1528 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] + %1529 = tail call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %1528, i8* getelementptr ([36 x i8]* @"\01LC", i32 0, i32 0), i8* getelementptr ([1024 x i8]* @inName, i32 0, i32 0), i8* getelementptr ([1024 x i8]* @outName, i32 0, i32 0)) nounwind ; [#uses=0] + %1530 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] + %1531 = bitcast %struct.FILE* %1530 to i8* ; [#uses=1] + %1532 = tail call i32 @"\01_fwrite$UNIX2003"(i8* getelementptr ([243 x i8]* @"\01LC13", i32 0, i32 0), i32 1, i32 242, i8* %1531) nounwind ; [#uses=0] + tail call fastcc void @cleanUpAndFail(i32 2) nounwind ssp + unreachable + +bb38.i: ; preds = %bb33.i + %1533 = tail call fastcc i32 @bsGetUInt32() nounwind ssp ; [#uses=2] + %.pre.i.i = load i32* @bsLive, align 4 ; [#uses=3] + %.b.i = load i1* @bsStream.b ; [#uses=4] + %1534 = zext i1 %.b.i to i32 ; [#uses=3] + %1535 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1534, i32 2 ; [#uses=8] + %1536 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1534, i32 1 ; [#uses=4] + %1537 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1534, i32 3 ; [#uses=4] + %bsBuff.promoted183 = load i32* @bsBuff ; [#uses=1] + br label %bb3.i.i4 + +bb3.i69.i: ; preds = %bb3.i.i4 + %1538 = load i32* %1535, align 8 ; [#uses=3] + %1539 = load i32* %1536, align 4 ; [#uses=1] + %1540 = icmp slt i32 %1538, %1539 ; [#uses=1] + br i1 %1540, label %bb2.i.i, label %bb1.i.i + +bb1.i.i: ; preds = %bb3.i69.i + store i32 %bsBuff.tmp.0185, i32* @bsBuff + store i32 %bsLive.tmp.0186, i32* @bsLive + tail call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i: ; preds = %bb3.i69.i + %1541 = load i8** %1537, align 4 ; [#uses=1] + %1542 = getelementptr i8* %1541, i32 %1538 ; [#uses=1] + %1543 = load i8* %1542, align 1 ; [#uses=1] + %1544 = add i32 %1538, 1 ; [#uses=1] + store i32 %1544, i32* %1535, align 8 + %1545 = zext i8 %1543 to i32 ; [#uses=1] + %1546 = shl i32 %bsBuff.tmp.0185, 8 ; [#uses=1] + %1547 = or i32 %1546, %1545 ; [#uses=1] + %1548 = add i32 %bsLive.tmp.0186, 8 ; [#uses=3] + br label %bb3.i.i4 + +bb3.i.i4: ; preds = %bb2.i.i, %bb38.i + %bsLive.tmp.0186 = phi i32 [ %.pre.i.i, %bb38.i ], [ %1548, %bb2.i.i ] ; [#uses=2] + %bsBuff.tmp.0185 = phi i32 [ %bsBuff.promoted183, %bb38.i ], [ %1547, %bb2.i.i ] ; [#uses=5] + %1549 = phi i32 [ %1548, %bb2.i.i ], [ %.pre.i.i, %bb38.i ] ; [#uses=1] + %1550 = phi i32 [ %1548, %bb2.i.i ], [ %.pre.i.i, %bb38.i ] ; [#uses=1] + %1551 = icmp slt i32 %1550, 1 ; [#uses=1] + br i1 %1551, label %bb3.i69.i, label %bsR.exit.i + +bsR.exit.i: ; preds = %bb3.i.i4 + store i32 %bsBuff.tmp.0185, i32* @bsBuff + %1552 = add i32 %1549, -1 ; [#uses=5] + store i32 %1552, i32* @bsLive, align 4 + %1553 = load i32* @blockSize100k, align 4 ; [#uses=1] + %1554 = mul i32 %1553, 100000 ; [#uses=2] + br label %bb3.i.i.i.i + +bb3.i9.i.i: ; preds = %bb3.i.i.i.i + %1555 = load i32* %1535, align 8 ; [#uses=3] + %1556 = load i32* %1536, align 4 ; [#uses=1] + %1557 = icmp slt i32 %1555, %1556 ; [#uses=1] + br i1 %1557, label %bb2.i.i.i.i, label %bb1.i.i.i.i + +bb1.i.i.i.i: ; preds = %bb3.i9.i.i + store i32 %bsBuff.tmp.0189, i32* @bsBuff + store i32 %bsLive.tmp.0190, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i.i.i: ; preds = %bb3.i9.i.i + %1558 = load i8** %1537, align 4 ; [#uses=1] + %1559 = getelementptr i8* %1558, i32 %1555 ; [#uses=1] + %1560 = load i8* %1559, align 1 ; [#uses=1] + %1561 = add i32 %1555, 1 ; [#uses=1] + store i32 %1561, i32* %1535, align 8 + %1562 = zext i8 %1560 to i32 ; [#uses=1] + %1563 = shl i32 %bsBuff.tmp.0189, 8 ; [#uses=1] + %1564 = or i32 %1563, %1562 ; [#uses=1] + %1565 = add i32 %bsLive.tmp.0190, 8 ; [#uses=3] + br label %bb3.i.i.i.i + +bb3.i.i.i.i: ; preds = %bb2.i.i.i.i, %bsR.exit.i + %bsLive.tmp.0190 = phi i32 [ %1552, %bsR.exit.i ], [ %1565, %bb2.i.i.i.i ] ; [#uses=2] + %bsBuff.tmp.0189 = phi i32 [ %bsBuff.tmp.0185, %bsR.exit.i ], [ %1564, %bb2.i.i.i.i ] ; [#uses=5] + %1566 = phi i32 [ %1565, %bb2.i.i.i.i ], [ %1552, %bsR.exit.i ] ; [#uses=1] + %1567 = phi i32 [ %1565, %bb2.i.i.i.i ], [ %1552, %bsR.exit.i ] ; [#uses=1] + %1568 = icmp slt i32 %1567, 24 ; [#uses=1] + br i1 %1568, label %bb3.i9.i.i, label %bsGetIntVS.exit.i.i + +bsGetIntVS.exit.i.i: ; preds = %bb3.i.i.i.i + store i32 %bsBuff.tmp.0189, i32* @bsBuff + %1569 = add i32 %1566, -24 ; [#uses=5] + %1570 = lshr i32 %bsBuff.tmp.0189, %1569 ; [#uses=1] + %1571 = and i32 %1570, 16777215 ; [#uses=1] + store i32 %1569, i32* @bsLive, align 4 + br label %bb4.i16.i.i + +bb3.i10.i.i.i: ; preds = %bb3.i.i13.i.i + %1572 = load i32* %1535, align 8 ; [#uses=3] + %1573 = load i32* %1536, align 4 ; [#uses=1] + %1574 = icmp slt i32 %1572, %1573 ; [#uses=1] + br i1 %1574, label %bb2.i.i12.i.i, label %bb1.i.i11.i.i + +bb1.i.i11.i.i: ; preds = %bb3.i10.i.i.i + store i32 %bsBuff.tmp.0193, i32* @bsBuff + store i32 %bsLive.tmp.0194, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i12.i.i: ; preds = %bb3.i10.i.i.i + %1575 = load i8** %1537, align 4 ; [#uses=1] + %1576 = getelementptr i8* %1575, i32 %1572 ; [#uses=1] + %1577 = load i8* %1576, align 1 ; [#uses=1] + %1578 = add i32 %1572, 1 ; [#uses=1] + store i32 %1578, i32* %1535, align 8 + %1579 = zext i8 %1577 to i32 ; [#uses=1] + %1580 = shl i32 %bsBuff.tmp.0193, 8 ; [#uses=1] + %1581 = or i32 %1580, %1579 ; [#uses=1] + %1582 = add i32 %bsLive.tmp.0194, 8 ; [#uses=3] + br label %bb3.i.i13.i.i + +bb3.i.i13.i.i: ; preds = %bb4.i16.i.i, %bb2.i.i12.i.i + %bsLive.tmp.0194 = phi i32 [ %1582, %bb2.i.i12.i.i ], [ %bsLive.promoted208, %bb4.i16.i.i ] ; [#uses=2] + %bsBuff.tmp.0193 = phi i32 [ %1581, %bb2.i.i12.i.i ], [ %bsBuff.promoted207, %bb4.i16.i.i ] ; [#uses=4] + %1583 = phi i32 [ %1582, %bb2.i.i12.i.i ], [ %.pre.i14.i.i, %bb4.i16.i.i ] ; [#uses=1] + %1584 = phi i32 [ %1582, %bb2.i.i12.i.i ], [ %.pre.i.i15.i.i, %bb4.i16.i.i ] ; [#uses=1] + %1585 = icmp slt i32 %1584, 1 ; [#uses=1] + br i1 %1585, label %bb3.i10.i.i.i, label %bsR.exit.i.i.i + +bsR.exit.i.i.i: ; preds = %bb3.i.i13.i.i + %1586 = add i32 %1583, -1 ; [#uses=4] + %1587 = lshr i32 %bsBuff.tmp.0193, %1586 ; [#uses=1] + %1588 = trunc i32 %1587 to i8 ; [#uses=1] + %storemerge.i.i.i = and i8 %1588, 1 ; [#uses=1] + store i8 %storemerge.i.i.i, i8* %scevgep107.i.i.i + %1589 = add i32 %1590, 1 ; [#uses=1] + br label %bb4.i16.i.i + +bb4.i16.i.i: ; preds = %bsR.exit.i.i.i, %bsGetIntVS.exit.i.i + %bsLive.promoted208 = phi i32 [ %1569, %bsGetIntVS.exit.i.i ], [ %1586, %bsR.exit.i.i.i ] ; [#uses=3] + %bsBuff.promoted207 = phi i32 [ %bsBuff.tmp.0189, %bsGetIntVS.exit.i.i ], [ %bsBuff.tmp.0193, %bsR.exit.i.i.i ] ; [#uses=3] + %.pre.i14.i.i = phi i32 [ %1586, %bsR.exit.i.i.i ], [ %1569, %bsGetIntVS.exit.i.i ] ; [#uses=1] + %.pre.i.i15.i.i = phi i32 [ %1586, %bsR.exit.i.i.i ], [ %1569, %bsGetIntVS.exit.i.i ] ; [#uses=1] + %1590 = phi i32 [ 0, %bsGetIntVS.exit.i.i ], [ %1589, %bsR.exit.i.i.i ] ; [#uses=3] + %scevgep107.i.i.i = getelementptr [16 x i8]* %inUse16.i.i.i, i32 0, i32 %1590 ; [#uses=1] + %1591 = icmp sgt i32 %1590, 15 ; [#uses=1] + br i1 %1591, label %bb6.i.i.i.preheader, label %bb3.i.i13.i.i + +bb6.i.i.i.preheader: ; preds = %bb4.i16.i.i + store i32 %bsBuff.promoted207, i32* @bsBuff + store i32 %bsLive.promoted208, i32* @bsLive + br label %bb6.i.i.i + +bb6.i.i.i: ; preds = %bb6.i.i.i, %bb6.i.i.i.preheader + %i.166.i.i.i = phi i32 [ %1592, %bb6.i.i.i ], [ 0, %bb6.i.i.i.preheader ] ; [#uses=2] + %scevgep106.i.i.i = getelementptr [256 x i8]* @inUse, i32 0, i32 %i.166.i.i.i ; [#uses=1] + store i8 0, i8* %scevgep106.i.i.i, align 1 + %1592 = add i32 %i.166.i.i.i, 1 ; [#uses=2] + %exitcond105.i.i.i = icmp eq i32 %1592, 256 ; [#uses=1] + br i1 %exitcond105.i.i.i, label %bb16.i.i.i, label %bb6.i.i.i + +bb9.i.i.i: ; preds = %bb16.i.i.i + %scevgep104.i.i.i = getelementptr [16 x i8]* %inUse16.i.i.i, i32 0, i32 %1616 ; [#uses=1] + %1593 = load i8* %scevgep104.i.i.i, align 1 ; [#uses=1] + %1594 = icmp eq i8 %1593, 0 ; [#uses=1] + br i1 %1594, label %bb15.i.i.i, label %bb14.i.i.i + +bb3.i18.i.i.i: ; preds = %bb3.i5.i.i.i + %1595 = load i32* %1535, align 8 ; [#uses=3] + %1596 = load i32* %1536, align 4 ; [#uses=1] + %1597 = icmp slt i32 %1595, %1596 ; [#uses=1] + br i1 %1597, label %bb2.i4.i.i.i, label %bb1.i3.i.i.i + +bb1.i3.i.i.i: ; preds = %bb3.i18.i.i.i + store i32 %bsBuff.tmp.0201, i32* @bsBuff + store i32 %bsLive.tmp.0202, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i4.i.i.i: ; preds = %bb3.i18.i.i.i + %1598 = load i8** %1537, align 4 ; [#uses=1] + %1599 = getelementptr i8* %1598, i32 %1595 ; [#uses=1] + %1600 = load i8* %1599, align 1 ; [#uses=1] + %1601 = add i32 %1595, 1 ; [#uses=1] + store i32 %1601, i32* %1535, align 8 + %1602 = zext i8 %1600 to i32 ; [#uses=1] + %1603 = shl i32 %bsBuff.tmp.0201, 8 ; [#uses=1] + %1604 = or i32 %1603, %1602 ; [#uses=1] + %1605 = add i32 %bsLive.tmp.0202, 8 ; [#uses=3] + br label %bb3.i5.i.i.i + +bb3.i5.i.i.i: ; preds = %bb14.i.i.i, %bb2.i4.i.i.i + %bsLive.tmp.0202 = phi i32 [ %1605, %bb2.i4.i.i.i ], [ %bsLive.tmp.0206, %bb14.i.i.i ] ; [#uses=2] + %bsBuff.tmp.0201 = phi i32 [ %1604, %bb2.i4.i.i.i ], [ %bsBuff.tmp.0205, %bb14.i.i.i ] ; [#uses=4] + %1606 = phi i32 [ %1605, %bb2.i4.i.i.i ], [ %.pre130.i.i.i, %bb14.i.i.i ] ; [#uses=1] + %1607 = phi i32 [ %1605, %bb2.i4.i.i.i ], [ %.pre.i1.i.i.i, %bb14.i.i.i ] ; [#uses=1] + %1608 = icmp slt i32 %1607, 1 ; [#uses=1] + br i1 %1608, label %bb3.i18.i.i.i, label %bsR.exit6.i.i.i + +bsR.exit6.i.i.i: ; preds = %bb3.i5.i.i.i + %1609 = add i32 %1606, -1 ; [#uses=4] + %tmp49.i.i.i = shl i32 1, %1609 ; [#uses=1] + %1610 = and i32 %tmp49.i.i.i, %bsBuff.tmp.0201 ; [#uses=1] + %1611 = icmp eq i32 %1610, 0 ; [#uses=1] + br i1 %1611, label %bb13.i.i.i, label %bb12.i.i.i + +bb12.i.i.i: ; preds = %bsR.exit6.i.i.i + store i8 1, i8* %scevgep102.i.i.i, align 1 + br label %bb13.i.i.i + +bb13.i.i.i: ; preds = %bb12.i.i.i, %bsR.exit6.i.i.i + %1612 = add i32 %1613, 1 ; [#uses=1] + br label %bb14.i.i.i + +bb14.i.i.i: ; preds = %bb13.i.i.i, %bb9.i.i.i + %bsLive.tmp.0206 = phi i32 [ %1609, %bb13.i.i.i ], [ %bsLive.tmp.1, %bb9.i.i.i ] ; [#uses=2] + %bsBuff.tmp.0205 = phi i32 [ %bsBuff.tmp.0201, %bb13.i.i.i ], [ %bsBuff.tmp.1, %bb9.i.i.i ] ; [#uses=2] + %.pre130.i.i.i = phi i32 [ %1609, %bb13.i.i.i ], [ %bsLive.tmp.1, %bb9.i.i.i ] ; [#uses=1] + %.pre.i1.i.i.i = phi i32 [ %1609, %bb13.i.i.i ], [ %bsLive.tmp.1, %bb9.i.i.i ] ; [#uses=1] + %1613 = phi i32 [ %1612, %bb13.i.i.i ], [ 0, %bb9.i.i.i ] ; [#uses=3] + %tmp101.i.i.i = add i32 %1613, %tmp100.i.i.i ; [#uses=1] + %scevgep102.i.i.i = getelementptr [256 x i8]* @inUse, i32 0, i32 %tmp101.i.i.i ; [#uses=1] + %1614 = icmp sgt i32 %1613, 15 ; [#uses=1] + br i1 %1614, label %bb15.i.i.i, label %bb3.i5.i.i.i + +bb15.i.i.i: ; preds = %bb14.i.i.i, %bb9.i.i.i + %bsLive.tmp.0210 = phi i32 [ %bsLive.tmp.1, %bb9.i.i.i ], [ %bsLive.tmp.0206, %bb14.i.i.i ] ; [#uses=1] + %bsBuff.tmp.0209 = phi i32 [ %bsBuff.tmp.1, %bb9.i.i.i ], [ %bsBuff.tmp.0205, %bb14.i.i.i ] ; [#uses=1] + %1615 = add i32 %1616, 1 ; [#uses=1] + br label %bb16.i.i.i + +bb16.i.i.i: ; preds = %bb15.i.i.i, %bb6.i.i.i + %bsLive.tmp.1 = phi i32 [ %bsLive.tmp.0210, %bb15.i.i.i ], [ %bsLive.promoted208, %bb6.i.i.i ] ; [#uses=8] + %bsBuff.tmp.1 = phi i32 [ %bsBuff.tmp.0209, %bb15.i.i.i ], [ %bsBuff.promoted207, %bb6.i.i.i ] ; [#uses=4] + %1616 = phi i32 [ %1615, %bb15.i.i.i ], [ 0, %bb6.i.i.i ] ; [#uses=4] + %tmp100.i.i.i = shl i32 %1616, 4 ; [#uses=1] + %1617 = icmp sgt i32 %1616, 15 ; [#uses=1] + br i1 %1617, label %bb17.i.i.i, label %bb9.i.i.i + +bb17.i.i.i: ; preds = %bb16.i.i.i + store i32 %bsBuff.tmp.1, i32* @bsBuff + store i32 %bsLive.tmp.1, i32* @bsLive + store i32 0, i32* @nInUse, align 4 + br label %bb.i43.i.i.i + +bb.i43.i.i.i: ; preds = %bb2.i45.i.i.i, %bb17.i.i.i + %nInUse.tmp.1.i.i.i.i = phi i32 [ 0, %bb17.i.i.i ], [ %nInUse.tmp.0.i.i.i.i, %bb2.i45.i.i.i ] ; [#uses=4] + %i.01.i.i.i.i = phi i32 [ 0, %bb17.i.i.i ], [ %1623, %bb2.i45.i.i.i ] ; [#uses=4] + %scevgep.i.i.i.i = getelementptr [256 x i8]* @inUse, i32 0, i32 %i.01.i.i.i.i ; [#uses=1] + %1618 = load i8* %scevgep.i.i.i.i, align 1 ; [#uses=1] + %1619 = icmp eq i8 %1618, 0 ; [#uses=1] + br i1 %1619, label %bb2.i45.i.i.i, label %bb1.i44.i.i.i + +bb1.i44.i.i.i: ; preds = %bb.i43.i.i.i + %scevgep2.i.i.i.i = getelementptr [256 x i8]* @unseqToSeq, i32 0, i32 %i.01.i.i.i.i ; [#uses=1] + %tmp.i.i.i.i = trunc i32 %i.01.i.i.i.i to i8 ; [#uses=1] + %1620 = getelementptr [256 x i8]* @seqToUnseq, i32 0, i32 %nInUse.tmp.1.i.i.i.i ; [#uses=1] + store i8 %tmp.i.i.i.i, i8* %1620, align 1 + %1621 = trunc i32 %nInUse.tmp.1.i.i.i.i to i8 ; [#uses=1] + store i8 %1621, i8* %scevgep2.i.i.i.i, align 1 + %1622 = add i32 %nInUse.tmp.1.i.i.i.i, 1 ; [#uses=1] + br label %bb2.i45.i.i.i + +bb2.i45.i.i.i: ; preds = %bb1.i44.i.i.i, %bb.i43.i.i.i + %nInUse.tmp.0.i.i.i.i = phi i32 [ %1622, %bb1.i44.i.i.i ], [ %nInUse.tmp.1.i.i.i.i, %bb.i43.i.i.i ] ; [#uses=4] + %1623 = add i32 %i.01.i.i.i.i, 1 ; [#uses=2] + %exitcond96.i.i.i = icmp eq i32 %1623, 256 ; [#uses=1] + br i1 %exitcond96.i.i.i, label %makeMaps.exit.i.i.i, label %bb.i43.i.i.i + +makeMaps.exit.i.i.i: ; preds = %bb2.i45.i.i.i + store i32 %nInUse.tmp.0.i.i.i.i, i32* @nInUse + %1624 = add i32 %nInUse.tmp.0.i.i.i.i, 2 ; [#uses=5] + %1625 = zext i1 %.b.i to i32 ; [#uses=3] + %1626 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1625, i32 2 ; [#uses=6] + %1627 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1625, i32 1 ; [#uses=3] + %1628 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1625, i32 3 ; [#uses=3] + br label %bb3.i41.i.i.i + +bb3.i32.i.i.i: ; preds = %bb3.i41.i.i.i + %1629 = load i32* %1626, align 8 ; [#uses=3] + %1630 = load i32* %1627, align 4 ; [#uses=1] + %1631 = icmp slt i32 %1629, %1630 ; [#uses=1] + br i1 %1631, label %bb2.i40.i.i.i, label %bb1.i39.i.i.i + +bb1.i39.i.i.i: ; preds = %bb3.i32.i.i.i + store i32 %bsBuff.tmp.0213, i32* @bsBuff + store i32 %bsLive.tmp.0214, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i40.i.i.i: ; preds = %bb3.i32.i.i.i + %1632 = load i8** %1628, align 4 ; [#uses=1] + %1633 = getelementptr i8* %1632, i32 %1629 ; [#uses=1] + %1634 = load i8* %1633, align 1 ; [#uses=1] + %1635 = add i32 %1629, 1 ; [#uses=1] + store i32 %1635, i32* %1626, align 8 + %1636 = zext i8 %1634 to i32 ; [#uses=1] + %1637 = shl i32 %bsBuff.tmp.0213, 8 ; [#uses=1] + %1638 = or i32 %1637, %1636 ; [#uses=1] + %1639 = add i32 %bsLive.tmp.0214, 8 ; [#uses=3] + br label %bb3.i41.i.i.i + +bb3.i41.i.i.i: ; preds = %bb2.i40.i.i.i, %makeMaps.exit.i.i.i + %bsLive.tmp.0214 = phi i32 [ %bsLive.tmp.1, %makeMaps.exit.i.i.i ], [ %1639, %bb2.i40.i.i.i ] ; [#uses=3] + %bsBuff.tmp.0213 = phi i32 [ %bsBuff.tmp.1, %makeMaps.exit.i.i.i ], [ %1638, %bb2.i40.i.i.i ] ; [#uses=6] + %1640 = phi i32 [ %1639, %bb2.i40.i.i.i ], [ %bsLive.tmp.1, %makeMaps.exit.i.i.i ] ; [#uses=1] + %1641 = phi i32 [ %1639, %bb2.i40.i.i.i ], [ %bsLive.tmp.1, %makeMaps.exit.i.i.i ] ; [#uses=1] + %1642 = icmp slt i32 %1641, 3 ; [#uses=1] + br i1 %1642, label %bb3.i32.i.i.i, label %bsR.exit42.i.i.i + +bsR.exit42.i.i.i: ; preds = %bb3.i41.i.i.i + store i32 %bsBuff.tmp.0213, i32* @bsBuff + store i32 %bsLive.tmp.0214, i32* @bsLive + %1643 = add i32 %1640, -3 ; [#uses=3] + %1644 = lshr i32 %bsBuff.tmp.0213, %1643 ; [#uses=1] + %1645 = and i32 %1644, 7 ; [#uses=5] + br label %bb3.i35.i.i.i + +bb3.i47.i.i.i: ; preds = %bb3.i35.i.i.i + %1646 = load i32* %1626, align 8 ; [#uses=3] + %1647 = load i32* %1627, align 4 ; [#uses=1] + %1648 = icmp slt i32 %1646, %1647 ; [#uses=1] + br i1 %1648, label %bb2.i34.i.i.i, label %bb1.i33.i.i.i + +bb1.i33.i.i.i: ; preds = %bb3.i47.i.i.i + store i32 %1658, i32* @bsLive + store i32 %bsBuff.tmp.0217, i32* @bsBuff + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i34.i.i.i: ; preds = %bb3.i47.i.i.i + %1649 = load i8** %1628, align 4 ; [#uses=1] + %1650 = getelementptr i8* %1649, i32 %1646 ; [#uses=1] + %1651 = load i8* %1650, align 1 ; [#uses=1] + %1652 = add i32 %1646, 1 ; [#uses=1] + store i32 %1652, i32* %1626, align 8 + %1653 = zext i8 %1651 to i32 ; [#uses=1] + %1654 = shl i32 %bsBuff.tmp.0217, 8 ; [#uses=1] + %1655 = or i32 %1654, %1653 ; [#uses=2] + %1656 = add i32 %1658, 8 ; [#uses=2] + br label %bb3.i35.i.i.i + +bb3.i35.i.i.i: ; preds = %bb2.i34.i.i.i, %bsR.exit42.i.i.i + %bsBuff.tmp.0217 = phi i32 [ %bsBuff.tmp.0213, %bsR.exit42.i.i.i ], [ %1655, %bb2.i34.i.i.i ] ; [#uses=4] + %1657 = phi i32 [ %1655, %bb2.i34.i.i.i ], [ %bsBuff.tmp.0213, %bsR.exit42.i.i.i ] ; [#uses=2] + %1658 = phi i32 [ %1643, %bsR.exit42.i.i.i ], [ %1656, %bb2.i34.i.i.i ] ; [#uses=3] + %1659 = phi i32 [ %1656, %bb2.i34.i.i.i ], [ %1643, %bsR.exit42.i.i.i ] ; [#uses=1] + %1660 = icmp slt i32 %1659, 15 ; [#uses=1] + br i1 %1660, label %bb3.i47.i.i.i, label %bsR.exit36.i.i.i + +bsR.exit36.i.i.i: ; preds = %bb3.i35.i.i.i + store i32 %bsBuff.tmp.0217, i32* @bsBuff + %1661 = add i32 %1658, -15 ; [#uses=4] + %1662 = lshr i32 %1657, %1661 ; [#uses=1] + %1663 = and i32 %1662, 32767 ; [#uses=4] + store i32 %1661, i32* @bsLive, align 4 + br label %bb22.i.i.i + +bb19.i.i.i: ; preds = %bsR.exit30.i.i.i + %1664 = add i32 %.ph178, 1 ; [#uses=1] + br label %bb3.i29.i.i.i + +bb3.i61.i.i.i: ; preds = %bb3.i29.i.i.i + %1665 = load i32* %1626, align 8 ; [#uses=3] + %1666 = load i32* %1627, align 4 ; [#uses=1] + %1667 = icmp slt i32 %1665, %1666 ; [#uses=1] + br i1 %1667, label %bb2.i28.i.i.i, label %bb1.i27.i.i.i + +bb1.i27.i.i.i: ; preds = %bb3.i61.i.i.i + store i32 %bsBuff.tmp.0220, i32* @bsBuff + store i32 %bsLive.tmp.0221, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i28.i.i.i: ; preds = %bb3.i61.i.i.i + %1668 = load i8** %1628, align 4 ; [#uses=1] + %1669 = getelementptr i8* %1668, i32 %1665 ; [#uses=1] + %1670 = load i8* %1669, align 1 ; [#uses=1] + %1671 = add i32 %1665, 1 ; [#uses=1] + store i32 %1671, i32* %1626, align 8 + %1672 = zext i8 %1670 to i32 ; [#uses=1] + %1673 = shl i32 %bsBuff.tmp.0220, 8 ; [#uses=1] + %1674 = or i32 %1673, %1672 ; [#uses=2] + %1675 = add i32 %bsLive.tmp.0221, 8 ; [#uses=3] + br label %bb3.i29.i.i.i + +bb3.i29.i.i.i: ; preds = %bb22.i.i.i, %bb2.i28.i.i.i, %bb19.i.i.i + %.ph178 = phi i32 [ %1664, %bb19.i.i.i ], [ %.ph178, %bb2.i28.i.i.i ], [ 0, %bb22.i.i.i ] ; [#uses=3] + %bsLive.tmp.0221 = phi i32 [ %1675, %bb2.i28.i.i.i ], [ %1680, %bb19.i.i.i ], [ %bsLive.tmp.0229, %bb22.i.i.i ] ; [#uses=2] + %bsBuff.tmp.0220 = phi i32 [ %1674, %bb2.i28.i.i.i ], [ %bsBuff.tmp.0220, %bb19.i.i.i ], [ %bsBuff.tmp.0228, %bb22.i.i.i ] ; [#uses=4] + %1676 = phi i32 [ %1675, %bb2.i28.i.i.i ], [ %1680, %bb19.i.i.i ], [ %.pre.i25.rle108.i.i.i, %bb22.i.i.i ] ; [#uses=1] + %1677 = phi i32 [ %1674, %bb2.i28.i.i.i ], [ %1677, %bb19.i.i.i ], [ %.rle110.i.i.i, %bb22.i.i.i ] ; [#uses=3] + %1678 = phi i32 [ %1675, %bb2.i28.i.i.i ], [ %1680, %bb19.i.i.i ], [ %.pre.i25.rle108.i.i.i, %bb22.i.i.i ] ; [#uses=1] + %1679 = icmp slt i32 %1678, 1 ; [#uses=1] + br i1 %1679, label %bb3.i61.i.i.i, label %bsR.exit30.i.i.i + +bsR.exit30.i.i.i: ; preds = %bb3.i29.i.i.i + %1680 = add i32 %1676, -1 ; [#uses=6] + %tmp.i.i.i = shl i32 1, %1680 ; [#uses=1] + %1681 = and i32 %tmp.i.i.i, %1677 ; [#uses=1] + %1682 = icmp eq i32 %1681, 0 ; [#uses=1] + br i1 %1682, label %bb21.i.i.i, label %bb19.i.i.i + +bb21.i.i.i: ; preds = %bsR.exit30.i.i.i + %1683 = trunc i32 %.ph178 to i8 ; [#uses=1] + store i8 %1683, i8* %scevgep95.i.i.i, align 1 + %1684 = add i32 %1685, 1 ; [#uses=1] + br label %bb22.i.i.i + +bb22.i.i.i: ; preds = %bb21.i.i.i, %bsR.exit36.i.i.i + %bsLive.tmp.0229 = phi i32 [ %1661, %bsR.exit36.i.i.i ], [ %1680, %bb21.i.i.i ] ; [#uses=3] + %bsBuff.tmp.0228 = phi i32 [ %bsBuff.tmp.0217, %bsR.exit36.i.i.i ], [ %bsBuff.tmp.0220, %bb21.i.i.i ] ; [#uses=3] + %.rle110.i.i.i = phi i32 [ %1677, %bb21.i.i.i ], [ %1657, %bsR.exit36.i.i.i ] ; [#uses=2] + %.pre.i25.rle108.i.i.i = phi i32 [ %1680, %bb21.i.i.i ], [ %1661, %bsR.exit36.i.i.i ] ; [#uses=3] + %1685 = phi i32 [ 0, %bsR.exit36.i.i.i ], [ %1684, %bb21.i.i.i ] ; [#uses=3] + %scevgep95.i.i.i = getelementptr [18002 x i8]* @selectorMtf, i32 0, i32 %1685 ; [#uses=1] + %1686 = icmp slt i32 %1685, %1663 ; [#uses=1] + br i1 %1686, label %bb3.i29.i.i.i, label %bb25.loopexit.i.i.i + +bb24.i.i.i: ; preds = %bb25.loopexit.i.i.i, %bb24.i.i.i + %1687 = phi i8 [ %1690, %bb24.i.i.i ], [ 0, %bb25.loopexit.i.i.i ] ; [#uses=3] + %1688 = zext i8 %1687 to i32 ; [#uses=1] + %1689 = getelementptr [6 x i8]* %pos.i.i.i, i32 0, i32 %1688 ; [#uses=1] + store i8 %1687, i8* %1689, align 1 + %1690 = add i8 %1687, 1 ; [#uses=2] + %phitmp.i.i.i = zext i8 %1690 to i32 ; [#uses=1] + %1691 = icmp ult i32 %phitmp.i.i.i, %1645 ; [#uses=1] + br i1 %1691, label %bb24.i.i.i, label %bb31.loopexit.i.i.i + +bb25.loopexit.i.i.i: ; preds = %bb22.i.i.i + store i32 %bsBuff.tmp.0228, i32* @bsBuff + store i32 %bsLive.tmp.0229, i32* @bsLive + %1692 = icmp eq i32 %1645, 0 ; [#uses=2] + br i1 %1692, label %bb31.loopexit.i.i.i, label %bb24.i.i.i + +bb.nph62.i.i.i: ; preds = %bb31.loopexit.i.i.i + %tmp88.i.i.i = icmp ugt i32 %1663, 1 ; [#uses=1] + %smax89.i.i.i = select i1 %tmp88.i.i.i, i32 %1663, i32 1 ; [#uses=1] + br label %bb27.i.i.i + +bb27.i.i.i: ; preds = %bb30.i.i.i, %bb.nph62.i.i.i + %i.461.i.i.i = phi i32 [ 0, %bb.nph62.i.i.i ], [ %1703, %bb30.i.i.i ] ; [#uses=3] + %scevgep91.i.i.i = getelementptr [18002 x i8]* @selectorMtf, i32 0, i32 %i.461.i.i.i ; [#uses=1] + %scevgep92.i.i.i = getelementptr [18002 x i8]* @selector, i32 0, i32 %i.461.i.i.i ; [#uses=1] + %1693 = load i8* %scevgep91.i.i.i, align 1 ; [#uses=4] + %1694 = zext i8 %1693 to i32 ; [#uses=1] + %1695 = getelementptr [6 x i8]* %pos.i.i.i, i32 0, i32 %1694 ; [#uses=1] + %1696 = load i8* %1695, align 1 ; [#uses=2] + %1697 = icmp eq i8 %1693, 0 ; [#uses=1] + br i1 %1697, label %bb30.i.i.i, label %bb28.i.i.i + +bb28.i.i.i: ; preds = %bb28.i.i.i, %bb27.i.i.i + %indvar.i.i.i = phi i8 [ %indvar.next.i.i.i, %bb28.i.i.i ], [ 0, %bb27.i.i.i ] ; [#uses=2] + %v.159.i.i.i = sub i8 %1693, %indvar.i.i.i ; [#uses=1] + %1698 = zext i8 %v.159.i.i.i to i32 ; [#uses=2] + %1699 = add i32 %1698, -1 ; [#uses=1] + %1700 = getelementptr [6 x i8]* %pos.i.i.i, i32 0, i32 %1699 ; [#uses=1] + %1701 = load i8* %1700, align 1 ; [#uses=1] + %1702 = getelementptr [6 x i8]* %pos.i.i.i, i32 0, i32 %1698 ; [#uses=1] + store i8 %1701, i8* %1702, align 1 + %indvar.next.i.i.i = add i8 %indvar.i.i.i, 1 ; [#uses=2] + %exitcond83.i.i.i = icmp eq i8 %indvar.next.i.i.i, %1693 ; [#uses=1] + br i1 %exitcond83.i.i.i, label %bb30.i.i.i, label %bb28.i.i.i + +bb30.i.i.i: ; preds = %bb28.i.i.i, %bb27.i.i.i + store i8 %1696, i8* %84, align 1 + store i8 %1696, i8* %scevgep92.i.i.i, align 1 + %1703 = add i32 %i.461.i.i.i, 1 ; [#uses=2] + %exitcond90.i.i.i = icmp eq i32 %1703, %smax89.i.i.i ; [#uses=1] + br i1 %exitcond90.i.i.i, label %bb41.i.i.i.preheader, label %bb27.i.i.i + +bb31.loopexit.i.i.i: ; preds = %bb25.loopexit.i.i.i, %bb24.i.i.i + %1704 = icmp eq i32 %1663, 0 ; [#uses=1] + br i1 %1704, label %bb41.i.i.i.preheader, label %bb.nph62.i.i.i + +bb41.i.i.i.preheader: ; preds = %bb31.loopexit.i.i.i, %bb30.i.i.i + %1705 = zext i1 %.b.i to i32 ; [#uses=3] + %1706 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1705, i32 2 ; [#uses=6] + %1707 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1705, i32 1 ; [#uses=3] + %1708 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1705, i32 3 ; [#uses=3] + br label %bb41.i.i.i + +bb3.i54.i.i.i: ; preds = %bb3.i23.i.i.i + %1709 = load i32* %1706, align 8 ; [#uses=3] + %1710 = load i32* %1707, align 4 ; [#uses=1] + %1711 = icmp slt i32 %1709, %1710 ; [#uses=1] + br i1 %1711, label %bb2.i22.i.i.i, label %bb1.i21.i.i.i + +bb1.i21.i.i.i: ; preds = %bb3.i54.i.i.i + store i32 %bsBuff.tmp.0232, i32* @bsBuff + store i32 %bsLive.tmp.0233, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i22.i.i.i: ; preds = %bb3.i54.i.i.i + %1712 = load i8** %1708, align 4 ; [#uses=1] + %1713 = getelementptr i8* %1712, i32 %1709 ; [#uses=1] + %1714 = load i8* %1713, align 1 ; [#uses=1] + %1715 = add i32 %1709, 1 ; [#uses=1] + store i32 %1715, i32* %1706, align 8 + %1716 = zext i8 %1714 to i32 ; [#uses=1] + %1717 = shl i32 %bsBuff.tmp.0232, 8 ; [#uses=1] + %1718 = or i32 %1717, %1716 ; [#uses=2] + %1719 = add i32 %bsLive.tmp.0233, 8 ; [#uses=3] + br label %bb3.i23.i.i.i + +bb3.i23.i.i.i: ; preds = %bb41.i.i.i, %bb2.i22.i.i.i + %bsLive.tmp.0233 = phi i32 [ %1719, %bb2.i22.i.i.i ], [ %bsLive.tmp.0253, %bb41.i.i.i ] ; [#uses=2] + %bsBuff.tmp.0232 = phi i32 [ %1718, %bb2.i22.i.i.i ], [ %bsBuff.tmp.0252, %bb41.i.i.i ] ; [#uses=3] + %1720 = phi i32 [ %1719, %bb2.i22.i.i.i ], [ %.pre.i19.i.i.i, %bb41.i.i.i ] ; [#uses=1] + %1721 = phi i32 [ %1718, %bb2.i22.i.i.i ], [ %.rle118.i.i.i, %bb41.i.i.i ] ; [#uses=2] + %1722 = phi i32 [ %1719, %bb2.i22.i.i.i ], [ %.pre.i19.i.i.i, %bb41.i.i.i ] ; [#uses=1] + %1723 = icmp slt i32 %1722, 5 ; [#uses=1] + br i1 %1723, label %bb3.i54.i.i.i, label %bsR.exit24.i.i.i + +bsR.exit24.i.i.i: ; preds = %bb3.i23.i.i.i + %1724 = add i32 %1720, -5 ; [#uses=3] + %1725 = lshr i32 %1721, %1724 ; [#uses=1] + %1726 = and i32 %1725, 31 ; [#uses=1] + br label %bb39.i.i.i + +bb3.i39.i.i.i: ; preds = %bb3.i17.i.i.i + %1727 = load i32* %1706, align 8 ; [#uses=3] + %1728 = load i32* %1707, align 4 ; [#uses=1] + %1729 = icmp slt i32 %1727, %1728 ; [#uses=1] + br i1 %1729, label %bb2.i16.i.i.i, label %bb1.i15.i.i.i + +bb1.i15.i.i.i: ; preds = %bb3.i39.i.i.i + store i32 %bsBuff.tmp.0236, i32* @bsBuff + store i32 %bsLive.tmp.0237, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i16.i.i.i: ; preds = %bb3.i39.i.i.i + %1730 = load i8** %1708, align 4 ; [#uses=1] + %1731 = getelementptr i8* %1730, i32 %1727 ; [#uses=1] + %1732 = load i8* %1731, align 1 ; [#uses=1] + %1733 = add i32 %1727, 1 ; [#uses=1] + store i32 %1733, i32* %1706, align 8 + %1734 = zext i8 %1732 to i32 ; [#uses=1] + %1735 = shl i32 %bsBuff.tmp.0236, 8 ; [#uses=1] + %1736 = or i32 %1735, %1734 ; [#uses=2] + %1737 = add i32 %bsLive.tmp.0237, 8 ; [#uses=3] + br label %bb3.i17.i.i.i + +bb3.i17.i.i.i: ; preds = %bsR.exit12.i.i.i, %bb2.i16.i.i.i + %bsLive.tmp.0237 = phi i32 [ %1737, %bb2.i16.i.i.i ], [ %1760, %bsR.exit12.i.i.i ] ; [#uses=2] + %bsBuff.tmp.0236 = phi i32 [ %1736, %bb2.i16.i.i.i ], [ %bsBuff.tmp.0240, %bsR.exit12.i.i.i ] ; [#uses=3] + %1738 = phi i32 [ %1737, %bb2.i16.i.i.i ], [ %1760, %bsR.exit12.i.i.i ] ; [#uses=1] + %1739 = phi i32 [ %1736, %bb2.i16.i.i.i ], [ %1757, %bsR.exit12.i.i.i ] ; [#uses=2] + %1740 = phi i32 [ %1737, %bb2.i16.i.i.i ], [ %1760, %bsR.exit12.i.i.i ] ; [#uses=1] + %1741 = icmp slt i32 %1740, 1 ; [#uses=1] + br i1 %1741, label %bb3.i39.i.i.i, label %bsR.exit18.i.i.i + +bsR.exit18.i.i.i: ; preds = %bb3.i17.i.i.i + %1742 = add i32 %1738, -1 ; [#uses=4] + %tmp46.i.i.i = shl i32 1, %1742 ; [#uses=1] + %1743 = and i32 %tmp46.i.i.i, %1739 ; [#uses=1] + %1744 = icmp eq i32 %1743, 0 ; [#uses=1] + %curr.0.be.v.i.i.i = select i1 %1744, i32 1, i32 -1 ; [#uses=1] + %curr.0.be.i.i.i = add i32 %curr.0.i.i.i.ph, %curr.0.be.v.i.i.i ; [#uses=1] + br label %bb3.i11.i.i.i + +bb3.i25.i.i.i: ; preds = %bb3.i11.i.i.i + %1745 = load i32* %1706, align 8 ; [#uses=3] + %1746 = load i32* %1707, align 4 ; [#uses=1] + %1747 = icmp slt i32 %1745, %1746 ; [#uses=1] + br i1 %1747, label %bb2.i10.i.i.i, label %bb1.i9.i.i.i + +bb1.i9.i.i.i: ; preds = %bb3.i25.i.i.i + store i32 %bsBuff.tmp.0240, i32* @bsBuff + store i32 %bsLive.tmp.0241, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i10.i.i.i: ; preds = %bb3.i25.i.i.i + %1748 = load i8** %1708, align 4 ; [#uses=1] + %1749 = getelementptr i8* %1748, i32 %1745 ; [#uses=1] + %1750 = load i8* %1749, align 1 ; [#uses=1] + %1751 = add i32 %1745, 1 ; [#uses=1] + store i32 %1751, i32* %1706, align 8 + %1752 = zext i8 %1750 to i32 ; [#uses=1] + %1753 = shl i32 %bsBuff.tmp.0240, 8 ; [#uses=1] + %1754 = or i32 %1753, %1752 ; [#uses=2] + %1755 = add i32 %bsLive.tmp.0241, 8 ; [#uses=3] + br label %bb3.i11.i.i.i + +bb3.i11.i.i.i: ; preds = %bb39.i.i.i, %bb2.i10.i.i.i, %bsR.exit18.i.i.i + %curr.0.i.i.i.ph = phi i32 [ %curr.0.be.i.i.i, %bsR.exit18.i.i.i ], [ %curr.0.i.i.i.ph, %bb2.i10.i.i.i ], [ %curr.1.i.i.i, %bb39.i.i.i ] ; [#uses=4] + %bsLive.tmp.0241 = phi i32 [ %1755, %bb2.i10.i.i.i ], [ %1742, %bsR.exit18.i.i.i ], [ %bsLive.tmp.0249, %bb39.i.i.i ] ; [#uses=2] + %bsBuff.tmp.0240 = phi i32 [ %1754, %bb2.i10.i.i.i ], [ %bsBuff.tmp.0236, %bsR.exit18.i.i.i ], [ %bsBuff.tmp.0248, %bb39.i.i.i ] ; [#uses=4] + %1756 = phi i32 [ %1755, %bb2.i10.i.i.i ], [ %1742, %bsR.exit18.i.i.i ], [ %.pre.i19.rle117.i.i.i, %bb39.i.i.i ] ; [#uses=1] + %1757 = phi i32 [ %1754, %bb2.i10.i.i.i ], [ %1739, %bsR.exit18.i.i.i ], [ %.rle125.i.i.i, %bb39.i.i.i ] ; [#uses=3] + %1758 = phi i32 [ %1755, %bb2.i10.i.i.i ], [ %1742, %bsR.exit18.i.i.i ], [ %.pre.i19.rle117.i.i.i, %bb39.i.i.i ] ; [#uses=1] + %1759 = icmp slt i32 %1758, 1 ; [#uses=1] + br i1 %1759, label %bb3.i25.i.i.i, label %bsR.exit12.i.i.i + +bsR.exit12.i.i.i: ; preds = %bb3.i11.i.i.i + %1760 = add i32 %1756, -1 ; [#uses=6] + %tmp47.i.i.i = shl i32 1, %1760 ; [#uses=1] + %1761 = and i32 %tmp47.i.i.i, %1757 ; [#uses=1] + %1762 = icmp eq i32 %1761, 0 ; [#uses=1] + br i1 %1762, label %bb38.i.i.i, label %bb3.i17.i.i.i + +bb38.i.i.i: ; preds = %bsR.exit12.i.i.i + %1763 = trunc i32 %curr.0.i.i.i.ph to i8 ; [#uses=1] + store i8 %1763, i8* %scevgep82.i.i.i, align 1 + %1764 = add i32 %1765, 1 ; [#uses=1] + br label %bb39.i.i.i + +bb39.i.i.i: ; preds = %bb38.i.i.i, %bsR.exit24.i.i.i + %bsLive.tmp.0249 = phi i32 [ %1724, %bsR.exit24.i.i.i ], [ %1760, %bb38.i.i.i ] ; [#uses=2] + %bsBuff.tmp.0248 = phi i32 [ %bsBuff.tmp.0232, %bsR.exit24.i.i.i ], [ %bsBuff.tmp.0240, %bb38.i.i.i ] ; [#uses=2] + %.rle125.i.i.i = phi i32 [ %1757, %bb38.i.i.i ], [ %1721, %bsR.exit24.i.i.i ] ; [#uses=2] + %.pre.i19.rle117.i.i.i = phi i32 [ %1760, %bb38.i.i.i ], [ %1724, %bsR.exit24.i.i.i ] ; [#uses=3] + %1765 = phi i32 [ 0, %bsR.exit24.i.i.i ], [ %1764, %bb38.i.i.i ] ; [#uses=3] + %curr.1.i.i.i = phi i32 [ %1726, %bsR.exit24.i.i.i ], [ %curr.0.i.i.i.ph, %bb38.i.i.i ] ; [#uses=1] + %scevgep82.i.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %1768, i32 %1765 ; [#uses=1] + %1766 = icmp slt i32 %1765, %1624 ; [#uses=1] + br i1 %1766, label %bb3.i11.i.i.i, label %bb40.i.i.i + +bb40.i.i.i: ; preds = %bb39.i.i.i + %1767 = add i32 %1768, 1 ; [#uses=1] + br label %bb41.i.i.i + +bb41.i.i.i: ; preds = %bb40.i.i.i, %bb41.i.i.i.preheader + %bsLive.tmp.0253 = phi i32 [ %bsLive.tmp.0229, %bb41.i.i.i.preheader ], [ %bsLive.tmp.0249, %bb40.i.i.i ] ; [#uses=5] + %bsBuff.tmp.0252 = phi i32 [ %bsBuff.tmp.0228, %bb41.i.i.i.preheader ], [ %bsBuff.tmp.0248, %bb40.i.i.i ] ; [#uses=3] + %.rle118.i.i.i = phi i32 [ %.rle125.i.i.i, %bb40.i.i.i ], [ %.rle110.i.i.i, %bb41.i.i.i.preheader ] ; [#uses=1] + %.pre.i19.i.i.i = phi i32 [ %.pre.i19.rle117.i.i.i, %bb40.i.i.i ], [ %.pre.i25.rle108.i.i.i, %bb41.i.i.i.preheader ] ; [#uses=2] + %1768 = phi i32 [ %1767, %bb40.i.i.i ], [ 0, %bb41.i.i.i.preheader ] ; [#uses=3] + %1769 = icmp slt i32 %1768, %1645 ; [#uses=1] + br i1 %1769, label %bb3.i23.i.i.i, label %bb51.loopexit.i.i.i + +bb44.i.i.i: ; preds = %bb49.preheader.i.i.i, %bb44.i.i.i + %i.652.i.i.i = phi i32 [ %1774, %bb44.i.i.i ], [ 0, %bb49.preheader.i.i.i ] ; [#uses=2] + %maxLen.151.i.i.i = phi i32 [ %maxLen.0.i.i.i, %bb44.i.i.i ], [ 0, %bb49.preheader.i.i.i ] ; [#uses=2] + %minLen.150.i.i.i = phi i32 [ %minLen.0.i.i.i, %bb44.i.i.i ], [ 32, %bb49.preheader.i.i.i ] ; [#uses=2] + %scevgep.i.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %1809, i32 %i.652.i.i.i ; [#uses=1] + %1770 = load i8* %scevgep.i.i.i, align 1 ; [#uses=1] + %1771 = zext i8 %1770 to i32 ; [#uses=4] + %1772 = icmp sgt i32 %1771, %maxLen.151.i.i.i ; [#uses=1] + %maxLen.0.i.i.i = select i1 %1772, i32 %1771, i32 %maxLen.151.i.i.i ; [#uses=2] + %1773 = icmp slt i32 %1771, %minLen.150.i.i.i ; [#uses=1] + %minLen.0.i.i.i = select i1 %1773, i32 %1771, i32 %minLen.150.i.i.i ; [#uses=2] + %1774 = add i32 %i.652.i.i.i, 1 ; [#uses=2] + %exitcond.i.i.i = icmp eq i32 %1774, %1624 ; [#uses=1] + br i1 %exitcond.i.i.i, label %bb50.i.i.i, label %bb44.i.i.i + +bb50.i.i.i: ; preds = %bb49.preheader.i.i.i, %bb44.i.i.i + %maxLen.1.lcssa.i.i.i = phi i32 [ 0, %bb49.preheader.i.i.i ], [ %maxLen.0.i.i.i, %bb44.i.i.i ] ; [#uses=5] + %minLen.1.lcssa.i.i.i = phi i32 [ 32, %bb49.preheader.i.i.i ], [ %minLen.0.i.i.i, %bb44.i.i.i ] ; [#uses=9] + %1775 = icmp sgt i32 %minLen.1.lcssa.i.i.i, %maxLen.1.lcssa.i.i.i ; [#uses=2] + %.not.i.i.i.i = xor i1 %1775, true ; [#uses=1] + %or.cond.i.i.i.i = and i1 %1808, %.not.i.i.i.i ; [#uses=1] + br i1 %or.cond.i.i.i.i, label %bb.nph21.split.i.i.i.i, label %bb9.loopexit.i.i.i.i + +bb1.i11.i.i.i: ; preds = %bb4.preheader.i.i.i.i, %bb3.i13.i.i.i + %pp.116.i.i.i.i = phi i32 [ %pp.220.i.i.i.i, %bb4.preheader.i.i.i.i ], [ %pp.0.i.i.i.i, %bb3.i13.i.i.i ] ; [#uses=3] + %1776 = phi i32 [ 0, %bb4.preheader.i.i.i.i ], [ %1782, %bb3.i13.i.i.i ] ; [#uses=3] + %scevgep50.i.i.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %1809, i32 %1776 ; [#uses=1] + %1777 = load i8* %scevgep50.i.i.i.i, align 1 ; [#uses=1] + %1778 = zext i8 %1777 to i32 ; [#uses=1] + %1779 = icmp eq i32 %1778, %i.019.i.i.i.i ; [#uses=1] + br i1 %1779, label %bb2.i12.i.i.i, label %bb3.i13.i.i.i + +bb2.i12.i.i.i: ; preds = %bb1.i11.i.i.i + %1780 = getelementptr [6 x [258 x i32]]* @perm, i32 0, i32 %1809, i32 %pp.116.i.i.i.i ; [#uses=1] + store i32 %1776, i32* %1780, align 4 + %1781 = add i32 %pp.116.i.i.i.i, 1 ; [#uses=1] + br label %bb3.i13.i.i.i + +bb3.i13.i.i.i: ; preds = %bb2.i12.i.i.i, %bb1.i11.i.i.i + %pp.0.i.i.i.i = phi i32 [ %1781, %bb2.i12.i.i.i ], [ %pp.116.i.i.i.i, %bb1.i11.i.i.i ] ; [#uses=2] + %1782 = add i32 %1776, 1 ; [#uses=2] + %exitcond49.i.i.i.i = icmp eq i32 %1782, %1624 ; [#uses=1] + br i1 %exitcond49.i.i.i.i, label %bb5.i.i.i.i, label %bb1.i11.i.i.i + +bb5.i.i.i.i: ; preds = %bb3.i13.i.i.i + %1783 = icmp sgt i32 %tmp55.i.i.i.i, %maxLen.1.lcssa.i.i.i ; [#uses=1] + %indvar.next52.i.i.i.i = add i32 %indvar51.i.i.i.i, 1 ; [#uses=1] + br i1 %1783, label %bb9.loopexit.i.i.i.i, label %bb4.preheader.i.i.i.i + +bb.nph21.split.i.i.i.i: ; preds = %bb50.i.i.i + %tmp54.i.i.i.i = add i32 %minLen.1.lcssa.i.i.i, 1 ; [#uses=1] + br label %bb4.preheader.i.i.i.i + +bb4.preheader.i.i.i.i: ; preds = %bb.nph21.split.i.i.i.i, %bb5.i.i.i.i + %indvar51.i.i.i.i = phi i32 [ 0, %bb.nph21.split.i.i.i.i ], [ %indvar.next52.i.i.i.i, %bb5.i.i.i.i ] ; [#uses=3] + %pp.220.i.i.i.i = phi i32 [ 0, %bb.nph21.split.i.i.i.i ], [ %pp.0.i.i.i.i, %bb5.i.i.i.i ] ; [#uses=1] + %i.019.i.i.i.i = add i32 %indvar51.i.i.i.i, %minLen.1.lcssa.i.i.i ; [#uses=1] + %tmp55.i.i.i.i = add i32 %indvar51.i.i.i.i, %tmp54.i.i.i.i ; [#uses=1] + br label %bb1.i11.i.i.i + +bb9.loopexit.i.i.i.i: ; preds = %bb5.i.i.i.i, %bb50.i.i.i + store i32 0, i32* %scevgep77.i.i.i, align 8 + %scevgep48.1.i.i.i.i = getelementptr [6 x [258 x i32]]* @base, i32 0, i32 %1809, i32 1 ; [#uses=1] + %scevgep48.156.i.i.i.i = bitcast i32* %scevgep48.1.i.i.i.i to i8* ; [#uses=1] + call void @llvm.memset.i64(i8* %scevgep48.156.i.i.i.i, i8 0, i64 88, i32 4) nounwind + br i1 %1808, label %bb11.i.i.i.i, label %bb14.i.i.i.i + +bb11.i.i.i.i: ; preds = %bb11.i.i.i.i, %bb9.loopexit.i.i.i.i + %i.211.i.i.i.i = phi i32 [ %1790, %bb11.i.i.i.i ], [ 0, %bb9.loopexit.i.i.i.i ] ; [#uses=2] + %scevgep46.i.i.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %1809, i32 %i.211.i.i.i.i ; [#uses=1] + %1784 = load i8* %scevgep46.i.i.i.i, align 1 ; [#uses=1] + %1785 = zext i8 %1784 to i32 ; [#uses=1] + %1786 = add i32 %1785, 1 ; [#uses=1] + %1787 = getelementptr [6 x [258 x i32]]* @base, i32 0, i32 %1809, i32 %1786 ; [#uses=2] + %1788 = load i32* %1787, align 4 ; [#uses=1] + %1789 = add i32 %1788, 1 ; [#uses=1] + store i32 %1789, i32* %1787, align 4 + %1790 = add i32 %i.211.i.i.i.i, 1 ; [#uses=2] + %exitcond45.i.i.i.i = icmp eq i32 %1790, %1624 ; [#uses=1] + br i1 %exitcond45.i.i.i.i, label %bb14.i.i.i.i, label %bb11.i.i.i.i + +bb14.i.i.i.i: ; preds = %bb14.i.i.i.i, %bb11.i.i.i.i, %bb9.loopexit.i.i.i.i + %indvar39.i.i.i.i = phi i32 [ %tmp42.i.i.i.i, %bb14.i.i.i.i ], [ 0, %bb11.i.i.i.i ], [ 0, %bb9.loopexit.i.i.i.i ] ; [#uses=2] + %tmp42.i.i.i.i = add i32 %indvar39.i.i.i.i, 1 ; [#uses=3] + %scevgep43.i.i.i.i = getelementptr [6 x [258 x i32]]* @base, i32 0, i32 %1809, i32 %tmp42.i.i.i.i ; [#uses=2] + %scevgep44.i.i.i.i = getelementptr [6 x [258 x i32]]* @base, i32 0, i32 %1809, i32 %indvar39.i.i.i.i ; [#uses=1] + %1791 = load i32* %scevgep43.i.i.i.i, align 4 ; [#uses=1] + %1792 = load i32* %scevgep44.i.i.i.i, align 4 ; [#uses=1] + %1793 = add i32 %1792, %1791 ; [#uses=1] + store i32 %1793, i32* %scevgep43.i.i.i.i, align 4 + %exitcond41.i.i.i.i = icmp eq i32 %tmp42.i.i.i.i, 22 ; [#uses=1] + br i1 %exitcond41.i.i.i.i, label %bb18.loopexit.i.i.i.i, label %bb14.i.i.i.i + +bb18.loopexit.i.i.i.i: ; preds = %bb14.i.i.i.i + store i32 0, i32* %scevgep76.i.i.i, align 8 + %scevgep38.1.i.i.i.i = getelementptr [6 x [258 x i32]]* @limit, i32 0, i32 %1809, i32 1 ; [#uses=1] + %scevgep38.157.i.i.i.i = bitcast i32* %scevgep38.1.i.i.i.i to i8* ; [#uses=1] + call void @llvm.memset.i64(i8* %scevgep38.157.i.i.i.i, i8 0, i64 88, i32 4) nounwind + br i1 %1775, label %bb24.loopexit.i.i.i.i, label %bb.nph6.i.i.i.i + +bb.nph6.i.i.i.i: ; preds = %bb18.loopexit.i.i.i.i + %tmp35.i.i.i.i = add i32 %minLen.1.lcssa.i.i.i, 1 ; [#uses=1] + br label %bb20.i.i.i.i + +bb20.i.i.i.i: ; preds = %bb20.i.i.i.i, %bb.nph6.i.i.i.i + %indvar29.i.i.i.i = phi i32 [ 0, %bb.nph6.i.i.i.i ], [ %indvar.next30.i.i.i.i, %bb20.i.i.i.i ] ; [#uses=3] + %vec.04.i.i.i.i = phi i32 [ 0, %bb.nph6.i.i.i.i ], [ %1799, %bb20.i.i.i.i ] ; [#uses=1] + %tmp31.i.i.i.i = add i32 %indvar29.i.i.i.i, %minLen.1.lcssa.i.i.i ; [#uses=2] + %scevgep32.i.i.i.i = getelementptr [6 x [258 x i32]]* @base, i32 0, i32 %1809, i32 %tmp31.i.i.i.i ; [#uses=1] + %scevgep33.i.i.i.i = getelementptr [6 x [258 x i32]]* @limit, i32 0, i32 %1809, i32 %tmp31.i.i.i.i ; [#uses=1] + %scevgep34.sum.i.i.i.i = add i32 %indvar29.i.i.i.i, %tmp35.i.i.i.i ; [#uses=2] + %scevgep36.i.i.i.i = getelementptr [6 x [258 x i32]]* @base, i32 0, i32 %1809, i32 %scevgep34.sum.i.i.i.i ; [#uses=1] + %1794 = load i32* %scevgep36.i.i.i.i, align 4 ; [#uses=1] + %1795 = load i32* %scevgep32.i.i.i.i, align 4 ; [#uses=1] + %1796 = sub i32 %1794, %1795 ; [#uses=1] + %1797 = add i32 %1796, %vec.04.i.i.i.i ; [#uses=2] + %1798 = add i32 %1797, -1 ; [#uses=1] + store i32 %1798, i32* %scevgep33.i.i.i.i, align 4 + %1799 = shl i32 %1797, 1 ; [#uses=1] + %1800 = icmp sgt i32 %scevgep34.sum.i.i.i.i, %maxLen.1.lcssa.i.i.i ; [#uses=1] + %indvar.next30.i.i.i.i = add i32 %indvar29.i.i.i.i, 1 ; [#uses=1] + br i1 %1800, label %bb24.loopexit.i.i.i.i, label %bb20.i.i.i.i + +bb.nph.i.i.i.i: ; preds = %bb24.loopexit.i.i.i.i + %tmp.i14.i.i.i = add i32 %minLen.1.lcssa.i.i.i, 2 ; [#uses=1] + br label %bb23.i.i.i.i + +bb23.i.i.i.i: ; preds = %bb23.i.i.i.i, %bb.nph.i.i.i.i + %indvar.i.i.i.i = phi i32 [ 0, %bb.nph.i.i.i.i ], [ %indvar.next.i.i.i.i, %bb23.i.i.i.i ] ; [#uses=4] + %scevgep.sum.i.i.i.i = add i32 %indvar.i.i.i.i, %i.62.i.i.i.i ; [#uses=1] + %scevgep26.i.i.i.i = getelementptr [6 x [258 x i32]]* @base, i32 0, i32 %1809, i32 %scevgep.sum.i.i.i.i ; [#uses=2] + %tmp27.i.i.i.i = add i32 %indvar.i.i.i.i, %minLen.1.lcssa.i.i.i ; [#uses=1] + %scevgep28.i.i.i.i = getelementptr [6 x [258 x i32]]* @limit, i32 0, i32 %1809, i32 %tmp27.i.i.i.i ; [#uses=1] + %1801 = load i32* %scevgep28.i.i.i.i, align 4 ; [#uses=1] + %1802 = shl i32 %1801, 1 ; [#uses=1] + %1803 = load i32* %scevgep26.i.i.i.i, align 4 ; [#uses=1] + %sum.i.i.i.i = add i32 %1803, -2 ; [#uses=1] + %1804 = sub i32 %1802, %sum.i.i.i.i ; [#uses=1] + store i32 %1804, i32* %scevgep26.i.i.i.i, align 4 + %i.6.i.i.i.i = add i32 %indvar.i.i.i.i, %tmp.i14.i.i.i ; [#uses=1] + %1805 = icmp sgt i32 %i.6.i.i.i.i, %maxLen.1.lcssa.i.i.i ; [#uses=1] + %indvar.next.i.i.i.i = add i32 %indvar.i.i.i.i, 1 ; [#uses=1] + br i1 %1805, label %hbCreateDecodeTables.exit.i.i.i, label %bb23.i.i.i.i + +bb24.loopexit.i.i.i.i: ; preds = %bb20.i.i.i.i, %bb18.loopexit.i.i.i.i + %i.62.i.i.i.i = add i32 %minLen.1.lcssa.i.i.i, 1 ; [#uses=2] + %1806 = icmp sgt i32 %i.62.i.i.i.i, %maxLen.1.lcssa.i.i.i ; [#uses=1] + br i1 %1806, label %hbCreateDecodeTables.exit.i.i.i, label %bb.nph.i.i.i.i + +hbCreateDecodeTables.exit.i.i.i: ; preds = %bb24.loopexit.i.i.i.i, %bb23.i.i.i.i + store i32 %minLen.1.lcssa.i.i.i, i32* %scevgep75.i.i.i, align 4 + %1807 = add i32 %1809, 1 ; [#uses=2] + %exitcond74.i.i.i = icmp eq i32 %1807, %smax.i.i.i ; [#uses=1] + br i1 %exitcond74.i.i.i, label %recvDecodingTables.exit.i.i, label %bb49.preheader.i.i.i + +bb51.loopexit.i.i.i: ; preds = %bb41.i.i.i + store i32 %bsBuff.tmp.0252, i32* @bsBuff + store i32 %bsLive.tmp.0253, i32* @bsLive + br i1 %1692, label %recvDecodingTables.exit.i.i, label %bb.nph56.i.i.i + +bb.nph56.i.i.i: ; preds = %bb51.loopexit.i.i.i + %1808 = icmp sgt i32 %1624, 0 ; [#uses=3] + %tmp73.i.i.i = icmp ugt i32 %1645, 1 ; [#uses=1] + %smax.i.i.i = select i1 %tmp73.i.i.i, i32 %1645, i32 1 ; [#uses=1] + br label %bb49.preheader.i.i.i + +bb49.preheader.i.i.i: ; preds = %bb.nph56.i.i.i, %hbCreateDecodeTables.exit.i.i.i + %1809 = phi i32 [ 0, %bb.nph56.i.i.i ], [ %1807, %hbCreateDecodeTables.exit.i.i.i ] ; [#uses=18] + %scevgep75.i.i.i = getelementptr [6 x i32]* @minLens, i32 0, i32 %1809 ; [#uses=1] + %scevgep76.i.i.i = getelementptr [6 x [258 x i32]]* @limit, i32 0, i32 %1809, i32 0 ; [#uses=1] + %scevgep77.i.i.i = getelementptr [6 x [258 x i32]]* @base, i32 0, i32 %1809, i32 0 ; [#uses=1] + br i1 %1808, label %bb44.i.i.i, label %bb50.i.i.i + +recvDecodingTables.exit.i.i: ; preds = %bb51.loopexit.i.i.i, %hbCreateDecodeTables.exit.i.i.i + %1810 = add i32 %nInUse.tmp.0.i.i.i.i, 1 ; [#uses=1] + br label %bb.i34.i + +bb.i34.i: ; preds = %bb.i34.i, %recvDecodingTables.exit.i.i + %i.039.i.i = phi i32 [ 0, %recvDecodingTables.exit.i.i ], [ %1811, %bb.i34.i ] ; [#uses=2] + %scevgep119.i.i = getelementptr [256 x i32]* @unzftab, i32 0, i32 %i.039.i.i ; [#uses=1] + store i32 0, i32* %scevgep119.i.i, align 4 + %1811 = add i32 %i.039.i.i, 1 ; [#uses=2] + %exitcond118.i.i = icmp eq i32 %1811, 256 ; [#uses=1] + br i1 %exitcond118.i.i, label %bb13.i35.i, label %bb.i34.i + +bb13.i35.i: ; preds = %bb13.i35.i, %bb.i34.i + %i.137.i.i = phi i32 [ %1812, %bb13.i35.i ], [ 0, %bb.i34.i ] ; [#uses=3] + %scevgep116.i.i = getelementptr [256 x i8]* %yy.i.i, i32 0, i32 %i.137.i.i ; [#uses=1] + %tmp117.i.i = trunc i32 %i.137.i.i to i8 ; [#uses=1] + store i8 %tmp117.i.i, i8* %scevgep116.i.i, align 1 + %1812 = add i32 %i.137.i.i, 1 ; [#uses=2] + %exitcond115.i.i = icmp eq i32 %1812, 256 ; [#uses=1] + br i1 %exitcond115.i.i, label %bb15.i36.i, label %bb13.i35.i + +bb15.i36.i: ; preds = %bb13.i35.i + store i32 -1, i32* @last, align 4 + %1813 = load i8* getelementptr ([18002 x i8]* @selector, i32 0, i32 0), align 32 ; [#uses=1] + %1814 = zext i8 %1813 to i32 ; [#uses=4] + %1815 = getelementptr [6 x i32]* @minLens, i32 0, i32 %1814 ; [#uses=1] + %1816 = load i32* %1815, align 4 ; [#uses=5] + %1817 = zext i1 %.b.i to i32 ; [#uses=3] + %1818 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1817, i32 2 ; [#uses=12] + %1819 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1817, i32 1 ; [#uses=6] + %1820 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1817, i32 3 ; [#uses=6] + br label %bb3.i.i41.i + +bb3.i26.i.i: ; preds = %bb3.i.i41.i + %1821 = load i32* %1818, align 8 ; [#uses=3] + %1822 = load i32* %1819, align 4 ; [#uses=1] + %1823 = icmp slt i32 %1821, %1822 ; [#uses=1] + br i1 %1823, label %bb2.i.i40.i, label %bb1.i.i39.i + +bb1.i.i39.i: ; preds = %bb3.i26.i.i + store i32 %bsBuff.tmp.0256, i32* @bsBuff + store i32 %bsLive.tmp.0257, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i.i40.i: ; preds = %bb3.i26.i.i + %1824 = load i8** %1820, align 4 ; [#uses=1] + %1825 = getelementptr i8* %1824, i32 %1821 ; [#uses=1] + %1826 = load i8* %1825, align 1 ; [#uses=1] + %1827 = add i32 %1821, 1 ; [#uses=1] + store i32 %1827, i32* %1818, align 8 + %1828 = zext i8 %1826 to i32 ; [#uses=1] + %1829 = shl i32 %bsBuff.tmp.0256, 8 ; [#uses=1] + %1830 = or i32 %1829, %1828 ; [#uses=1] + %1831 = add i32 %bsLive.tmp.0257, 8 ; [#uses=3] + br label %bb3.i.i41.i + +bb3.i.i41.i: ; preds = %bb2.i.i40.i, %bb15.i36.i + %bsLive.tmp.0257 = phi i32 [ %bsLive.tmp.0253, %bb15.i36.i ], [ %1831, %bb2.i.i40.i ] ; [#uses=2] + %bsBuff.tmp.0256 = phi i32 [ %bsBuff.tmp.0252, %bb15.i36.i ], [ %1830, %bb2.i.i40.i ] ; [#uses=6] + %1832 = phi i32 [ %1831, %bb2.i.i40.i ], [ %bsLive.tmp.0253, %bb15.i36.i ] ; [#uses=1] + %1833 = phi i32 [ %1831, %bb2.i.i40.i ], [ %bsLive.tmp.0253, %bb15.i36.i ] ; [#uses=1] + %1834 = icmp slt i32 %1833, %1816 ; [#uses=1] + br i1 %1834, label %bb3.i26.i.i, label %bsR.exit.i.i + +bsR.exit.i.i: ; preds = %bb3.i.i41.i + store i32 %bsBuff.tmp.0256, i32* @bsBuff + %1835 = sub i32 %1832, %1816 ; [#uses=4] + %1836 = lshr i32 %bsBuff.tmp.0256, %1835 ; [#uses=1] + %1837 = shl i32 1, %1816 ; [#uses=1] + %1838 = add i32 %1837, -1 ; [#uses=1] + %1839 = and i32 %1836, %1838 ; [#uses=1] + store i32 %1835, i32* @bsLive, align 4 + %tmp112.i.i = mul i32 %1814, 258 ; [#uses=1] + %tmp113.i.i = add i32 %1816, %tmp112.i.i ; [#uses=1] + br label %bb24.i.i + +bb3.i40.i.i: ; preds = %bb22.i45.i + %1840 = load i32* %1818, align 8 ; [#uses=3] + %1841 = load i32* %1819, align 4 ; [#uses=1] + %1842 = icmp slt i32 %1840, %1841 ; [#uses=1] + br i1 %1842, label %bb21.i44.i, label %bb20.i43.i + +bb20.i43.i: ; preds = %bb3.i40.i.i + store i32 %bsBuff.tmp.0260, i32* @bsBuff + store i32 %bsLive.tmp.0261, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb21.i44.i: ; preds = %bb3.i40.i.i + %1843 = load i8** %1820, align 4 ; [#uses=1] + %1844 = getelementptr i8* %1843, i32 %1840 ; [#uses=1] + %1845 = load i8* %1844, align 1 ; [#uses=1] + %1846 = add i32 %1840, 1 ; [#uses=1] + store i32 %1846, i32* %1818, align 8 + %1847 = zext i8 %1845 to i32 ; [#uses=1] + %1848 = shl i32 %bsBuff.tmp.0260, 8 ; [#uses=1] + %1849 = or i32 %1848, %1847 ; [#uses=2] + %1850 = add i32 %bsLive.tmp.0261, 8 ; [#uses=3] + br label %bb22.i45.i + +bb22.i45.i: ; preds = %bb24.i.i, %bb21.i44.i + %bsLive.tmp.0261 = phi i32 [ %1850, %bb21.i44.i ], [ %bsLive.tmp.0265, %bb24.i.i ] ; [#uses=2] + %bsBuff.tmp.0260 = phi i32 [ %1849, %bb21.i44.i ], [ %bsBuff.tmp.0264, %bb24.i.i ] ; [#uses=3] + %1851 = phi i32 [ %1850, %bb21.i44.i ], [ %.pr.i47.i, %bb24.i.i ] ; [#uses=1] + %1852 = phi i32 [ %1849, %bb21.i44.i ], [ %.rle125.i.i, %bb24.i.i ] ; [#uses=2] + %1853 = phi i32 [ %1850, %bb21.i44.i ], [ %.pr.i47.i, %bb24.i.i ] ; [#uses=1] + %1854 = icmp sgt i32 %1853, 0 ; [#uses=1] + br i1 %1854, label %bb23.i46.i, label %bb3.i40.i.i + +bb23.i46.i: ; preds = %bb22.i45.i + %1855 = add i32 %1851, -1 ; [#uses=3] + %1856 = lshr i32 %1852, %1855 ; [#uses=1] + %1857 = and i32 %1856, 1 ; [#uses=1] + %1858 = shl i32 %zvec8.0.i.i, 1 ; [#uses=1] + %1859 = or i32 %1857, %1858 ; [#uses=1] + %indvar.next108.i.i = add i32 %indvar107.i.i, 1 ; [#uses=1] + br label %bb24.i.i + +bb24.i.i: ; preds = %bb23.i46.i, %bsR.exit.i.i + %bsLive.tmp.0265 = phi i32 [ %1835, %bsR.exit.i.i ], [ %1855, %bb23.i46.i ] ; [#uses=3] + %bsBuff.tmp.0264 = phi i32 [ %bsBuff.tmp.0256, %bsR.exit.i.i ], [ %bsBuff.tmp.0260, %bb23.i46.i ] ; [#uses=3] + %.rle125.i.i = phi i32 [ %1852, %bb23.i46.i ], [ %bsBuff.tmp.0256, %bsR.exit.i.i ] ; [#uses=1] + %.pr.i47.i = phi i32 [ %1855, %bb23.i46.i ], [ %1835, %bsR.exit.i.i ] ; [#uses=2] + %indvar107.i.i = phi i32 [ 0, %bsR.exit.i.i ], [ %indvar.next108.i.i, %bb23.i46.i ] ; [#uses=3] + %zvec8.0.i.i = phi i32 [ %1839, %bsR.exit.i.i ], [ %1859, %bb23.i46.i ] ; [#uses=3] + %scevgep110.sum.i.i = add i32 %indvar107.i.i, %tmp113.i.i ; [#uses=1] + %scevgep114.i.i = getelementptr [6 x [258 x i32]]* @limit, i32 0, i32 0, i32 %scevgep110.sum.i.i ; [#uses=1] + %1860 = load i32* %scevgep114.i.i, align 4 ; [#uses=1] + %1861 = icmp slt i32 %1860, %zvec8.0.i.i ; [#uses=1] + br i1 %1861, label %bb22.i45.i, label %bb25.i48.i + +bb25.i48.i: ; preds = %bb24.i.i + store i32 %bsBuff.tmp.0264, i32* @bsBuff + store i32 %bsLive.tmp.0265, i32* @bsLive + %zn9.0.i.i = add i32 %indvar107.i.i, %1816 ; [#uses=1] + %1862 = getelementptr [6 x [258 x i32]]* @base, i32 0, i32 %1814, i32 %zn9.0.i.i ; [#uses=1] + %1863 = load i32* %1862, align 4 ; [#uses=1] + %1864 = sub i32 %zvec8.0.i.i, %1863 ; [#uses=1] + %1865 = getelementptr [6 x [258 x i32]]* @perm, i32 0, i32 %1814, i32 %1864 ; [#uses=1] + %1866 = load i32* %1865, align 4 ; [#uses=1] + br label %bb26.i49.i + +bb26.i49.i: ; preds = %bb71.i.i, %bb49.i.i, %bb25.i48.i + %1867 = phi i32 [ -1, %bb25.i48.i ], [ %1942, %bb71.i.i ], [ %last.tmp.2, %bb49.i.i ] ; [#uses=10] + %bsLive.tmp.1300 = phi i32 [ %bsLive.tmp.0265, %bb25.i48.i ], [ %bsLive.tmp.0277, %bb71.i.i ], [ %bsLive.tmp.0289, %bb49.i.i ] ; [#uses=6] + %bsBuff.tmp.1298 = phi i32 [ %bsBuff.tmp.0264, %bb25.i48.i ], [ %bsBuff.tmp.0276, %bb71.i.i ], [ %bsBuff.tmp.0288, %bb49.i.i ] ; [#uses=4] + %groupPos.2.i.i = phi i32 [ 49, %bb25.i48.i ], [ %1965, %bb71.i.i ], [ %1876, %bb49.i.i ] ; [#uses=3] + %groupNo.2.i.i = phi i32 [ 0, %bb25.i48.i ], [ %.groupNo.2.i.i, %bb71.i.i ], [ %.groupNo.3.i.i, %bb49.i.i ] ; [#uses=2] + %nextSym.0.i.i = phi i32 [ %1866, %bb25.i48.i ], [ %2016, %bb71.i.i ], [ %1927, %bb49.i.i ] ; [#uses=8] + %1868 = icmp eq i32 %nextSym.0.i.i, %1810 ; [#uses=1] + br i1 %1868, label %getAndMoveToFrontDecode.exit.i, label %bb27.i.i + +bb27.i.i: ; preds = %bb26.i49.i + %1869 = icmp ugt i32 %nextSym.0.i.i, 1 ; [#uses=1] + br i1 %1869, label %bb51.i.i, label %bb29.i50.i + +bb29.i50.i: ; preds = %bb43.i.i, %bb27.i.i + %bsLive.tmp.0293 = phi i32 [ %bsLive.tmp.0289, %bb43.i.i ], [ %bsLive.tmp.1300, %bb27.i.i ] ; [#uses=3] + %bsBuff.tmp.0292 = phi i32 [ %bsBuff.tmp.0288, %bb43.i.i ], [ %bsBuff.tmp.1298, %bb27.i.i ] ; [#uses=1] + %s.1.i.i = phi i32 [ %s.0.i.i, %bb43.i.i ], [ -1, %bb27.i.i ] ; [#uses=3] + %N.0.i.i = phi i32 [ %1873, %bb43.i.i ], [ 1, %bb27.i.i ] ; [#uses=3] + %groupPos.3.i.i = phi i32 [ %1876, %bb43.i.i ], [ %groupPos.2.i.i, %bb27.i.i ] ; [#uses=2] + %groupNo.3.i.i = phi i32 [ %.groupNo.3.i.i, %bb43.i.i ], [ %groupNo.2.i.i, %bb27.i.i ] ; [#uses=1] + %nextSym.1.i.i = phi i32 [ %1927, %bb43.i.i ], [ %nextSym.0.i.i, %bb27.i.i ] ; [#uses=1] + switch i32 %nextSym.1.i.i, label %bb33.i52.i [ + i32 0, label %bb30.i51.i + i32 1, label %bb32.i.i + ] + +bb30.i51.i: ; preds = %bb29.i50.i + %1870 = add i32 %N.0.i.i, %s.1.i.i ; [#uses=1] + br label %bb33.i52.i + +bb32.i.i: ; preds = %bb29.i50.i + %1871 = shl i32 %N.0.i.i, 1 ; [#uses=1] + %1872 = add i32 %1871, %s.1.i.i ; [#uses=1] + br label %bb33.i52.i + +bb33.i52.i: ; preds = %bb32.i.i, %bb30.i51.i, %bb29.i50.i + %s.0.i.i = phi i32 [ %1870, %bb30.i51.i ], [ %1872, %bb32.i.i ], [ %s.1.i.i, %bb29.i50.i ] ; [#uses=2] + %1873 = shl i32 %N.0.i.i, 1 ; [#uses=1] + %1874 = icmp eq i32 %groupPos.3.i.i, 0 ; [#uses=2] + %1875 = zext i1 %1874 to i32 ; [#uses=1] + %.groupNo.3.i.i = add i32 %1875, %groupNo.3.i.i ; [#uses=3] + %groupPos.3.op.i.i = add i32 %groupPos.3.i.i, -1 ; [#uses=1] + %1876 = select i1 %1874, i32 49, i32 %groupPos.3.op.i.i ; [#uses=2] + %1877 = getelementptr [18002 x i8]* @selector, i32 0, i32 %.groupNo.3.i.i ; [#uses=1] + %1878 = load i8* %1877, align 1 ; [#uses=1] + %1879 = zext i8 %1878 to i32 ; [#uses=4] + %1880 = getelementptr [6 x i32]* @minLens, i32 0, i32 %1879 ; [#uses=1] + %1881 = load i32* %1880, align 4 ; [#uses=5] + br label %bb3.i5.i.i + +bb3.i47.i.i: ; preds = %bb3.i5.i.i + %1882 = load i32* %1818, align 8 ; [#uses=3] + %1883 = load i32* %1819, align 4 ; [#uses=1] + %1884 = icmp slt i32 %1882, %1883 ; [#uses=1] + br i1 %1884, label %bb2.i4.i.i, label %bb1.i3.i.i + +bb1.i3.i.i: ; preds = %bb3.i47.i.i + store i32 %1867, i32* @last + store i32 %bsBuff.tmp.0280, i32* @bsBuff + store i32 %bsLive.tmp.0281, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i4.i.i: ; preds = %bb3.i47.i.i + %1885 = load i8** %1820, align 4 ; [#uses=1] + %1886 = getelementptr i8* %1885, i32 %1882 ; [#uses=1] + %1887 = load i8* %1886, align 1 ; [#uses=1] + %1888 = add i32 %1882, 1 ; [#uses=1] + store i32 %1888, i32* %1818, align 8 + %1889 = zext i8 %1887 to i32 ; [#uses=1] + %1890 = shl i32 %bsBuff.tmp.0280, 8 ; [#uses=1] + %1891 = or i32 %1890, %1889 ; [#uses=1] + %1892 = add i32 %bsLive.tmp.0281, 8 ; [#uses=3] + br label %bb3.i5.i.i + +bb3.i5.i.i: ; preds = %bb2.i4.i.i, %bb33.i52.i + %bsLive.tmp.0281 = phi i32 [ %bsLive.tmp.0293, %bb33.i52.i ], [ %1892, %bb2.i4.i.i ] ; [#uses=2] + %bsBuff.tmp.0280 = phi i32 [ %bsBuff.tmp.0292, %bb33.i52.i ], [ %1891, %bb2.i4.i.i ] ; [#uses=5] + %1893 = phi i32 [ %1892, %bb2.i4.i.i ], [ %bsLive.tmp.0293, %bb33.i52.i ] ; [#uses=1] + %1894 = phi i32 [ %1892, %bb2.i4.i.i ], [ %bsLive.tmp.0293, %bb33.i52.i ] ; [#uses=1] + %1895 = icmp slt i32 %1894, %1881 ; [#uses=1] + br i1 %1895, label %bb3.i47.i.i, label %bsR.exit6.i.i + +bsR.exit6.i.i: ; preds = %bb3.i5.i.i + %1896 = sub i32 %1893, %1881 ; [#uses=3] + %1897 = lshr i32 %bsBuff.tmp.0280, %1896 ; [#uses=1] + %1898 = shl i32 1, %1881 ; [#uses=1] + %1899 = add i32 %1898, -1 ; [#uses=1] + %1900 = and i32 %1897, %1899 ; [#uses=1] + %tmp53.i.i = mul i32 %1879, 258 ; [#uses=1] + %tmp54.i.i = add i32 %1881, %tmp53.i.i ; [#uses=1] + br label %bb42.i.i + +bb3.i54.i.i: ; preds = %bb40.i.i + %1901 = load i32* %1818, align 8 ; [#uses=3] + %1902 = load i32* %1819, align 4 ; [#uses=1] + %1903 = icmp slt i32 %1901, %1902 ; [#uses=1] + br i1 %1903, label %bb39.i.i, label %bb38.i.i + +bb38.i.i: ; preds = %bb3.i54.i.i + store i32 %1867, i32* @last + store i32 %bsBuff.tmp.0284, i32* @bsBuff + store i32 %bsLive.tmp.0285, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb39.i.i: ; preds = %bb3.i54.i.i + %1904 = load i8** %1820, align 4 ; [#uses=1] + %1905 = getelementptr i8* %1904, i32 %1901 ; [#uses=1] + %1906 = load i8* %1905, align 1 ; [#uses=1] + %1907 = add i32 %1901, 1 ; [#uses=1] + store i32 %1907, i32* %1818, align 8 + %1908 = zext i8 %1906 to i32 ; [#uses=1] + %1909 = shl i32 %bsBuff.tmp.0284, 8 ; [#uses=1] + %1910 = or i32 %1909, %1908 ; [#uses=2] + %1911 = add i32 %bsLive.tmp.0285, 8 ; [#uses=3] + br label %bb40.i.i + +bb40.i.i: ; preds = %bb42.i.i, %bb39.i.i + %bsLive.tmp.0285 = phi i32 [ %1911, %bb39.i.i ], [ %bsLive.tmp.0289, %bb42.i.i ] ; [#uses=2] + %bsBuff.tmp.0284 = phi i32 [ %1910, %bb39.i.i ], [ %bsBuff.tmp.0288, %bb42.i.i ] ; [#uses=3] + %1912 = phi i32 [ %1911, %bb39.i.i ], [ %.pr13.i.i, %bb42.i.i ] ; [#uses=1] + %1913 = phi i32 [ %1910, %bb39.i.i ], [ %.rle127.i.i, %bb42.i.i ] ; [#uses=2] + %1914 = phi i32 [ %1911, %bb39.i.i ], [ %.pr13.i.i, %bb42.i.i ] ; [#uses=1] + %1915 = icmp sgt i32 %1914, 0 ; [#uses=1] + br i1 %1915, label %bb41.i.i, label %bb3.i54.i.i + +bb41.i.i: ; preds = %bb40.i.i + %1916 = add i32 %1912, -1 ; [#uses=3] + %1917 = lshr i32 %1913, %1916 ; [#uses=1] + %1918 = and i32 %1917, 1 ; [#uses=1] + %1919 = shl i32 %zvec3.0.i.i, 1 ; [#uses=1] + %1920 = or i32 %1918, %1919 ; [#uses=1] + %indvar.next50.i.i = add i32 %indvar49.i.i, 1 ; [#uses=1] + br label %bb42.i.i + +bb42.i.i: ; preds = %bb41.i.i, %bsR.exit6.i.i + %bsLive.tmp.0289 = phi i32 [ %1896, %bsR.exit6.i.i ], [ %1916, %bb41.i.i ] ; [#uses=4] + %bsBuff.tmp.0288 = phi i32 [ %bsBuff.tmp.0280, %bsR.exit6.i.i ], [ %bsBuff.tmp.0284, %bb41.i.i ] ; [#uses=4] + %.rle127.i.i = phi i32 [ %1913, %bb41.i.i ], [ %bsBuff.tmp.0280, %bsR.exit6.i.i ] ; [#uses=1] + %.pr13.i.i = phi i32 [ %1916, %bb41.i.i ], [ %1896, %bsR.exit6.i.i ] ; [#uses=2] + %indvar49.i.i = phi i32 [ 0, %bsR.exit6.i.i ], [ %indvar.next50.i.i, %bb41.i.i ] ; [#uses=3] + %zvec3.0.i.i = phi i32 [ %1900, %bsR.exit6.i.i ], [ %1920, %bb41.i.i ] ; [#uses=3] + %scevgep.sum.i.i = add i32 %indvar49.i.i, %tmp54.i.i ; [#uses=1] + %scevgep55.i.i = getelementptr [6 x [258 x i32]]* @limit, i32 0, i32 0, i32 %scevgep.sum.i.i ; [#uses=1] + %1921 = load i32* %scevgep55.i.i, align 4 ; [#uses=1] + %1922 = icmp slt i32 %1921, %zvec3.0.i.i ; [#uses=1] + br i1 %1922, label %bb40.i.i, label %bb43.i.i + +bb43.i.i: ; preds = %bb42.i.i + %zn4.0.i.i = add i32 %indvar49.i.i, %1881 ; [#uses=1] + %1923 = getelementptr [6 x [258 x i32]]* @base, i32 0, i32 %1879, i32 %zn4.0.i.i ; [#uses=1] + %1924 = load i32* %1923, align 4 ; [#uses=1] + %1925 = sub i32 %zvec3.0.i.i, %1924 ; [#uses=1] + %1926 = getelementptr [6 x [258 x i32]]* @perm, i32 0, i32 %1879, i32 %1925 ; [#uses=1] + %1927 = load i32* %1926, align 4 ; [#uses=3] + %1928 = icmp ugt i32 %1927, 1 ; [#uses=1] + br i1 %1928, label %bb44.i.i, label %bb29.i50.i + +bb44.i.i: ; preds = %bb43.i.i + %1929 = add i32 %s.0.i.i, 1 ; [#uses=3] + %1930 = load i8* %85, align 1 ; [#uses=1] + %1931 = zext i8 %1930 to i32 ; [#uses=1] + %1932 = getelementptr [256 x i8]* @seqToUnseq, i32 0, i32 %1931 ; [#uses=1] + %1933 = load i8* %1932, align 1 ; [#uses=2] + %1934 = zext i8 %1933 to i32 ; [#uses=1] + %1935 = getelementptr [256 x i32]* @unzftab, i32 0, i32 %1934 ; [#uses=2] + %1936 = load i32* %1935, align 4 ; [#uses=1] + %1937 = add i32 %1936, %1929 ; [#uses=1] + store i32 %1937, i32* %1935, align 4 + %1938 = icmp sgt i32 %1929, 0 ; [#uses=1] + br i1 %1938, label %bb47.i.i, label %bb49.i.i + +bb47.i.i: ; preds = %bb47.i.i, %bb44.i.i + %last.tmp.0 = phi i32 [ %1939, %bb47.i.i ], [ %1867, %bb44.i.i ] ; [#uses=1] + %indvar.i53.i = phi i32 [ %indvar.next.i.i, %bb47.i.i ], [ 0, %bb44.i.i ] ; [#uses=1] + %1939 = add i32 %last.tmp.0, 1 ; [#uses=3] + %1940 = getelementptr i8* %ll8.0, i32 %1939 ; [#uses=1] + store i8 %1933, i8* %1940, align 1 + %indvar.next.i.i = add i32 %indvar.i53.i, 1 ; [#uses=2] + %exitcond.i54.i = icmp eq i32 %indvar.next.i.i, %1929 ; [#uses=1] + br i1 %exitcond.i54.i, label %bb49.i.i, label %bb47.i.i + +bb49.i.i: ; preds = %bb47.i.i, %bb44.i.i + %last.tmp.2 = phi i32 [ %1867, %bb44.i.i ], [ %1939, %bb47.i.i ] ; [#uses=3] + %1941 = icmp slt i32 %last.tmp.2, %1554 ; [#uses=1] + br i1 %1941, label %bb26.i49.i, label %bb50.i.i + +bb50.i.i: ; preds = %bb49.i.i + store i32 %bsBuff.tmp.0288, i32* @bsBuff + store i32 %bsLive.tmp.0289, i32* @bsLive + store i32 %last.tmp.2, i32* @last + call fastcc void @blockOverrun() nounwind ssp + unreachable + +bb51.i.i: ; preds = %bb27.i.i + %1942 = add i32 %1867, 1 ; [#uses=6] + %1943 = icmp slt i32 %1942, %1554 ; [#uses=1] + br i1 %1943, label %bb53.i.i, label %bb52.i.i + +bb52.i.i: ; preds = %bb51.i.i + store i32 %bsBuff.tmp.1298, i32* @bsBuff + store i32 %bsLive.tmp.1300, i32* @bsLive + store i32 %1942, i32* @last + call fastcc void @blockOverrun() nounwind ssp + unreachable + +bb53.i.i: ; preds = %bb51.i.i + %1944 = add i32 %nextSym.0.i.i, -1 ; [#uses=4] + %1945 = getelementptr [256 x i8]* %yy.i.i, i32 0, i32 %1944 ; [#uses=1] + %1946 = load i8* %1945, align 1 ; [#uses=2] + %1947 = zext i8 %1946 to i32 ; [#uses=1] + %1948 = getelementptr [256 x i8]* @seqToUnseq, i32 0, i32 %1947 ; [#uses=1] + %1949 = load i8* %1948, align 1 ; [#uses=2] + %1950 = zext i8 %1949 to i32 ; [#uses=1] + %1951 = getelementptr [256 x i32]* @unzftab, i32 0, i32 %1950 ; [#uses=2] + %1952 = load i32* %1951, align 4 ; [#uses=1] + %1953 = add i32 %1952, 1 ; [#uses=1] + store i32 %1953, i32* %1951, align 4 + %1954 = getelementptr i8* %ll8.0, i32 %1942 ; [#uses=1] + store i8 %1949, i8* %1954, align 1 + %1955 = icmp sgt i32 %1944, 3 ; [#uses=1] + br i1 %1955, label %bb.nph29.i.i, label %bb60.preheader.i.i + +bb.nph29.i.i: ; preds = %bb53.i.i + %tmp74.i.i = add i32 %nextSym.0.i.i, -2 ; [#uses=1] + %tmp77.i.i = add i32 %nextSym.0.i.i, -3 ; [#uses=1] + %tmp80.i.i = add i32 %nextSym.0.i.i, -4 ; [#uses=1] + %tmp83.i.i = add i32 %nextSym.0.i.i, -5 ; [#uses=1] + br label %bb57.i.i + +bb57.i.i: ; preds = %bb57.i.i, %bb.nph29.i.i + %indvar68.i.i = phi i32 [ 0, %bb.nph29.i.i ], [ %indvar.next69.i.i, %bb57.i.i ] ; [#uses=2] + %tmp70.i.i = mul i32 %indvar68.i.i, -4 ; [#uses=5] + %tmp72.i.i = add i32 %tmp70.i.i, %1944 ; [#uses=1] + %scevgep73.i.i = getelementptr [256 x i8]* %yy.i.i, i32 0, i32 %tmp72.i.i ; [#uses=1] + %tmp75.i.i = add i32 %tmp70.i.i, %tmp74.i.i ; [#uses=1] + %scevgep76.i.i = getelementptr [256 x i8]* %yy.i.i, i32 0, i32 %tmp75.i.i ; [#uses=2] + %tmp78.i.i = add i32 %tmp70.i.i, %tmp77.i.i ; [#uses=1] + %scevgep79.i.i = getelementptr [256 x i8]* %yy.i.i, i32 0, i32 %tmp78.i.i ; [#uses=2] + %tmp81.i.i = add i32 %tmp70.i.i, %tmp80.i.i ; [#uses=1] + %scevgep82.i.i = getelementptr [256 x i8]* %yy.i.i, i32 0, i32 %tmp81.i.i ; [#uses=2] + %tmp84.i.i = add i32 %tmp70.i.i, %tmp83.i.i ; [#uses=3] + %scevgep85.i.i = getelementptr [256 x i8]* %yy.i.i, i32 0, i32 %tmp84.i.i ; [#uses=1] + %1956 = load i8* %scevgep76.i.i, align 1 ; [#uses=1] + store i8 %1956, i8* %scevgep73.i.i, align 1 + %1957 = load i8* %scevgep79.i.i, align 1 ; [#uses=1] + store i8 %1957, i8* %scevgep76.i.i, align 1 + %1958 = load i8* %scevgep82.i.i, align 1 ; [#uses=1] + store i8 %1958, i8* %scevgep79.i.i, align 1 + %1959 = load i8* %scevgep85.i.i, align 1 ; [#uses=1] + store i8 %1959, i8* %scevgep82.i.i, align 1 + %1960 = icmp sgt i32 %tmp84.i.i, 3 ; [#uses=1] + %indvar.next69.i.i = add i32 %indvar68.i.i, 1 ; [#uses=1] + br i1 %1960, label %bb57.i.i, label %bb60.preheader.i.i + +bb60.preheader.i.i: ; preds = %bb57.i.i, %bb53.i.i + %j.0.lcssa.i.i = phi i32 [ %1944, %bb53.i.i ], [ %tmp84.i.i, %bb57.i.i ] ; [#uses=4] + %1961 = icmp sgt i32 %j.0.lcssa.i.i, 0 ; [#uses=1] + br i1 %1961, label %bb.nph32.i.i, label %bb61.i.i + +bb.nph32.i.i: ; preds = %bb60.preheader.i.i + %tmp92.i.i = add i32 %j.0.lcssa.i.i, -1 ; [#uses=1] + br label %bb59.i.i + +bb59.i.i: ; preds = %bb59.i.i, %bb.nph32.i.i + %indvar86.i.i = phi i32 [ 0, %bb.nph32.i.i ], [ %indvar.next87.i.i, %bb59.i.i ] ; [#uses=3] + %tmp90.i.i = sub i32 %j.0.lcssa.i.i, %indvar86.i.i ; [#uses=1] + %scevgep91.i.i = getelementptr [256 x i8]* %yy.i.i, i32 0, i32 %tmp90.i.i ; [#uses=1] + %tmp93.i.i = sub i32 %tmp92.i.i, %indvar86.i.i ; [#uses=1] + %scevgep94.i.i = getelementptr [256 x i8]* %yy.i.i, i32 0, i32 %tmp93.i.i ; [#uses=1] + %1962 = load i8* %scevgep94.i.i, align 1 ; [#uses=1] + store i8 %1962, i8* %scevgep91.i.i, align 1 + %indvar.next87.i.i = add i32 %indvar86.i.i, 1 ; [#uses=2] + %exitcond88.i.i = icmp eq i32 %indvar.next87.i.i, %j.0.lcssa.i.i ; [#uses=1] + br i1 %exitcond88.i.i, label %bb61.i.i, label %bb59.i.i + +bb61.i.i: ; preds = %bb59.i.i, %bb60.preheader.i.i + store i8 %1946, i8* %85, align 1 + %1963 = icmp eq i32 %groupPos.2.i.i, 0 ; [#uses=2] + %1964 = zext i1 %1963 to i32 ; [#uses=1] + %.groupNo.2.i.i = add i32 %1964, %groupNo.2.i.i ; [#uses=2] + %groupPos.2.op.i.i = add i32 %groupPos.2.i.i, -1 ; [#uses=1] + %1965 = select i1 %1963, i32 49, i32 %groupPos.2.op.i.i ; [#uses=1] + %1966 = getelementptr [18002 x i8]* @selector, i32 0, i32 %.groupNo.2.i.i ; [#uses=1] + %1967 = load i8* %1966, align 1 ; [#uses=1] + %1968 = zext i8 %1967 to i32 ; [#uses=4] + %1969 = getelementptr [6 x i32]* @minLens, i32 0, i32 %1968 ; [#uses=1] + %1970 = load i32* %1969, align 4 ; [#uses=5] + br label %bb3.i11.i.i + +bb3.i33.i.i: ; preds = %bb3.i11.i.i + %1971 = load i32* %1818, align 8 ; [#uses=3] + %1972 = load i32* %1819, align 4 ; [#uses=1] + %1973 = icmp slt i32 %1971, %1972 ; [#uses=1] + br i1 %1973, label %bb2.i10.i.i, label %bb1.i9.i.i + +bb1.i9.i.i: ; preds = %bb3.i33.i.i + store i32 %1942, i32* @last + store i32 %bsBuff.tmp.0268, i32* @bsBuff + store i32 %bsLive.tmp.0269, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb2.i10.i.i: ; preds = %bb3.i33.i.i + %1974 = load i8** %1820, align 4 ; [#uses=1] + %1975 = getelementptr i8* %1974, i32 %1971 ; [#uses=1] + %1976 = load i8* %1975, align 1 ; [#uses=1] + %1977 = add i32 %1971, 1 ; [#uses=1] + store i32 %1977, i32* %1818, align 8 + %1978 = zext i8 %1976 to i32 ; [#uses=1] + %1979 = shl i32 %bsBuff.tmp.0268, 8 ; [#uses=1] + %1980 = or i32 %1979, %1978 ; [#uses=1] + %1981 = add i32 %bsLive.tmp.0269, 8 ; [#uses=3] + br label %bb3.i11.i.i + +bb3.i11.i.i: ; preds = %bb2.i10.i.i, %bb61.i.i + %bsLive.tmp.0269 = phi i32 [ %bsLive.tmp.1300, %bb61.i.i ], [ %1981, %bb2.i10.i.i ] ; [#uses=2] + %bsBuff.tmp.0268 = phi i32 [ %bsBuff.tmp.1298, %bb61.i.i ], [ %1980, %bb2.i10.i.i ] ; [#uses=5] + %1982 = phi i32 [ %1981, %bb2.i10.i.i ], [ %bsLive.tmp.1300, %bb61.i.i ] ; [#uses=1] + %1983 = phi i32 [ %1981, %bb2.i10.i.i ], [ %bsLive.tmp.1300, %bb61.i.i ] ; [#uses=1] + %1984 = icmp slt i32 %1983, %1970 ; [#uses=1] + br i1 %1984, label %bb3.i33.i.i, label %bsR.exit12.i.i + +bsR.exit12.i.i: ; preds = %bb3.i11.i.i + %1985 = sub i32 %1982, %1970 ; [#uses=3] + %1986 = lshr i32 %bsBuff.tmp.0268, %1985 ; [#uses=1] + %1987 = shl i32 1, %1970 ; [#uses=1] + %1988 = add i32 %1987, -1 ; [#uses=1] + %1989 = and i32 %1986, %1988 ; [#uses=1] + %tmp102.i.i = mul i32 %1968, 258 ; [#uses=1] + %tmp103.i.i = add i32 %1970, %tmp102.i.i ; [#uses=1] + br label %bb70.i.i + +bb3.i19.i.i: ; preds = %bb68.i.i + %1990 = load i32* %1818, align 8 ; [#uses=3] + %1991 = load i32* %1819, align 4 ; [#uses=1] + %1992 = icmp slt i32 %1990, %1991 ; [#uses=1] + br i1 %1992, label %bb67.i.i, label %bb66.i.i + +bb66.i.i: ; preds = %bb3.i19.i.i + store i32 %1942, i32* @last + store i32 %bsBuff.tmp.0272, i32* @bsBuff + store i32 %bsLive.tmp.0273, i32* @bsLive + call fastcc void @compressedStreamEOF() nounwind ssp + unreachable + +bb67.i.i: ; preds = %bb3.i19.i.i + %1993 = load i8** %1820, align 4 ; [#uses=1] + %1994 = getelementptr i8* %1993, i32 %1990 ; [#uses=1] + %1995 = load i8* %1994, align 1 ; [#uses=1] + %1996 = add i32 %1990, 1 ; [#uses=1] + store i32 %1996, i32* %1818, align 8 + %1997 = zext i8 %1995 to i32 ; [#uses=1] + %1998 = shl i32 %bsBuff.tmp.0272, 8 ; [#uses=1] + %1999 = or i32 %1998, %1997 ; [#uses=2] + %2000 = add i32 %bsLive.tmp.0273, 8 ; [#uses=3] + br label %bb68.i.i + +bb68.i.i: ; preds = %bb70.i.i, %bb67.i.i + %bsLive.tmp.0273 = phi i32 [ %2000, %bb67.i.i ], [ %bsLive.tmp.0277, %bb70.i.i ] ; [#uses=2] + %bsBuff.tmp.0272 = phi i32 [ %1999, %bb67.i.i ], [ %bsBuff.tmp.0276, %bb70.i.i ] ; [#uses=3] + %2001 = phi i32 [ %2000, %bb67.i.i ], [ %.pr14.i.i, %bb70.i.i ] ; [#uses=1] + %2002 = phi i32 [ %1999, %bb67.i.i ], [ %.rle126.i.i, %bb70.i.i ] ; [#uses=2] + %2003 = phi i32 [ %2000, %bb67.i.i ], [ %.pr14.i.i, %bb70.i.i ] ; [#uses=1] + %2004 = icmp sgt i32 %2003, 0 ; [#uses=1] + br i1 %2004, label %bb69.i.i, label %bb3.i19.i.i + +bb69.i.i: ; preds = %bb68.i.i + %2005 = add i32 %2001, -1 ; [#uses=3] + %2006 = lshr i32 %2002, %2005 ; [#uses=1] + %2007 = and i32 %2006, 1 ; [#uses=1] + %2008 = shl i32 %zvec.0.i.i, 1 ; [#uses=1] + %2009 = or i32 %2007, %2008 ; [#uses=1] + %indvar.next98.i.i = add i32 %indvar97.i.i, 1 ; [#uses=1] + br label %bb70.i.i + +bb70.i.i: ; preds = %bb69.i.i, %bsR.exit12.i.i + %bsLive.tmp.0277 = phi i32 [ %1985, %bsR.exit12.i.i ], [ %2005, %bb69.i.i ] ; [#uses=2] + %bsBuff.tmp.0276 = phi i32 [ %bsBuff.tmp.0268, %bsR.exit12.i.i ], [ %bsBuff.tmp.0272, %bb69.i.i ] ; [#uses=2] + %.rle126.i.i = phi i32 [ %2002, %bb69.i.i ], [ %bsBuff.tmp.0268, %bsR.exit12.i.i ] ; [#uses=1] + %.pr14.i.i = phi i32 [ %2005, %bb69.i.i ], [ %1985, %bsR.exit12.i.i ] ; [#uses=2] + %indvar97.i.i = phi i32 [ 0, %bsR.exit12.i.i ], [ %indvar.next98.i.i, %bb69.i.i ] ; [#uses=3] + %zvec.0.i.i = phi i32 [ %1989, %bsR.exit12.i.i ], [ %2009, %bb69.i.i ] ; [#uses=3] + %scevgep100.sum.i.i = add i32 %indvar97.i.i, %tmp103.i.i ; [#uses=1] + %scevgep104.i.i = getelementptr [6 x [258 x i32]]* @limit, i32 0, i32 0, i32 %scevgep100.sum.i.i ; [#uses=1] + %2010 = load i32* %scevgep104.i.i, align 4 ; [#uses=1] + %2011 = icmp slt i32 %2010, %zvec.0.i.i ; [#uses=1] + br i1 %2011, label %bb68.i.i, label %bb71.i.i + +bb71.i.i: ; preds = %bb70.i.i + %zn.0.i.i = add i32 %indvar97.i.i, %1970 ; [#uses=1] + %2012 = getelementptr [6 x [258 x i32]]* @base, i32 0, i32 %1968, i32 %zn.0.i.i ; [#uses=1] + %2013 = load i32* %2012, align 4 ; [#uses=1] + %2014 = sub i32 %zvec.0.i.i, %2013 ; [#uses=1] + %2015 = getelementptr [6 x [258 x i32]]* @perm, i32 0, i32 %1968, i32 %2014 ; [#uses=1] + %2016 = load i32* %2015, align 4 ; [#uses=1] + br label %bb26.i49.i + +getAndMoveToFrontDecode.exit.i: ; preds = %bb26.i49.i + store i32 %bsBuff.tmp.1298, i32* @bsBuff + store i32 %bsLive.tmp.1300, i32* @bsLive + store i32 %1867, i32* @last + store i32 -1, i32* @globalCrc, align 4 + store i32 0, i32* %86, align 4 + br label %bb.i30.i + +bb.i30.i: ; preds = %bb.i30.i, %getAndMoveToFrontDecode.exit.i + %indvar41.i.i = phi i32 [ 0, %getAndMoveToFrontDecode.exit.i ], [ %tmp44.i.i, %bb.i30.i ] ; [#uses=2] + %tmp44.i.i = add i32 %indvar41.i.i, 1 ; [#uses=3] + %scevgep45.i.i = getelementptr [257 x i32]* %cftab.i.i, i32 0, i32 %tmp44.i.i ; [#uses=1] + %scevgep46.i.i = getelementptr [256 x i32]* @unzftab, i32 0, i32 %indvar41.i.i ; [#uses=1] + %2017 = load i32* %scevgep46.i.i, align 4 ; [#uses=1] + store i32 %2017, i32* %scevgep45.i.i, align 4 + %exitcond43.i.i = icmp eq i32 %tmp44.i.i, 256 ; [#uses=1] + br i1 %exitcond43.i.i, label %bb5.i.i, label %bb.i30.i + +bb5.i.i: ; preds = %bb5.i.i, %bb.i30.i + %indvar.i.i = phi i32 [ %tmp38.i.i, %bb5.i.i ], [ 0, %bb.i30.i ] ; [#uses=2] + %tmp38.i.i = add i32 %indvar.i.i, 1 ; [#uses=3] + %scevgep39.i.i = getelementptr [257 x i32]* %cftab.i.i, i32 0, i32 %tmp38.i.i ; [#uses=2] + %scevgep40.i.i = getelementptr [257 x i32]* %cftab.i.i, i32 0, i32 %indvar.i.i ; [#uses=1] + %2018 = load i32* %scevgep39.i.i, align 4 ; [#uses=1] + %2019 = load i32* %scevgep40.i.i, align 4 ; [#uses=1] + %2020 = add i32 %2019, %2018 ; [#uses=1] + store i32 %2020, i32* %scevgep39.i.i, align 4 + %exitcond.i.i = icmp eq i32 %tmp38.i.i, 256 ; [#uses=1] + br i1 %exitcond.i.i, label %bb9.loopexit.i.i, label %bb5.i.i + +bb8.i.i: ; preds = %bb9.loopexit.i.i, %bb8.i.i + %2021 = phi i32 [ %2029, %bb8.i.i ], [ 0, %bb9.loopexit.i.i ] ; [#uses=3] + %scevgep.i.i = getelementptr i8* %ll8.0, i32 %2021 ; [#uses=1] + %2022 = load i8* %scevgep.i.i, align 1 ; [#uses=1] + %2023 = zext i8 %2022 to i32 ; [#uses=1] + %2024 = getelementptr [257 x i32]* %cftab.i.i, i32 0, i32 %2023 ; [#uses=3] + %2025 = load i32* %2024, align 4 ; [#uses=1] + %2026 = getelementptr i32* %tt.0, i32 %2025 ; [#uses=1] + store i32 %2021, i32* %2026, align 4 + %2027 = load i32* %2024, align 4 ; [#uses=1] + %2028 = add i32 %2027, 1 ; [#uses=1] + store i32 %2028, i32* %2024, align 4 + %2029 = add i32 %2021, 1 ; [#uses=2] + %2030 = icmp sgt i32 %2029, %1867 ; [#uses=1] + br i1 %2030, label %bb10.i.i.loopexit, label %bb8.i.i + +bb9.loopexit.i.i: ; preds = %bb5.i.i + %2031 = icmp slt i32 %1867, 0 ; [#uses=1] + br i1 %2031, label %bb10.i.i, label %bb8.i.i + +bb10.i.i.loopexit: ; preds = %bb8.i.i + %.pre = load i32* @globalCrc, align 4 ; [#uses=1] + br label %bb10.i.i + +bb10.i.i: ; preds = %bb10.i.i.loopexit, %bb9.loopexit.i.i + %2032 = phi i32 [ %.pre, %bb10.i.i.loopexit ], [ -1, %bb9.loopexit.i.i ] ; [#uses=2] + %2033 = getelementptr i32* %tt.0, i32 %1571 ; [#uses=1] + %2034 = load i32* %2033, align 4 ; [#uses=2] + %tmp759 = shl i32 1, %1552 ; [#uses=1] + %storemerge.i757760 = and i32 %bsBuff.tmp.0185, %tmp759 ; [#uses=1] + %2035 = icmp eq i32 %storemerge.i757760, 0 ; [#uses=1] + %.pre.i33.i = load i32* @last, align 4 ; [#uses=6] + br i1 %2035, label %bb33.i.i, label %bb25.i.i + +bb12.i.i: ; preds = %bb25.i.i + %2036 = getelementptr i8* %ll8.0, i32 %tPos.0.i.i ; [#uses=1] + %2037 = load i8* %2036, align 1 ; [#uses=1] + %2038 = zext i8 %2037 to i32 ; [#uses=1] + %2039 = getelementptr i32* %tt.0, i32 %tPos.0.i.i ; [#uses=1] + %2040 = load i32* %2039, align 4 ; [#uses=4] + %2041 = icmp eq i32 %rNToGo.1.i.i, 0 ; [#uses=1] + br i1 %2041, label %bb13.i.i, label %bb15.i.i + +bb13.i.i: ; preds = %bb12.i.i + %2042 = getelementptr [512 x i32]* @rNums, i32 0, i32 %rTPos.1.i.i ; [#uses=1] + %2043 = load i32* %2042, align 4 ; [#uses=2] + %2044 = add i32 %rTPos.1.i.i, 1 ; [#uses=2] + %2045 = icmp eq i32 %2044, 512 ; [#uses=1] + br i1 %2045, label %bb14.i.i, label %bb15.i.i + +bb14.i.i: ; preds = %bb13.i.i + br label %bb15.i.i + +bb15.i.i: ; preds = %bb14.i.i, %bb13.i.i, %bb12.i.i + %rNToGo.0.i.i = phi i32 [ %2043, %bb14.i.i ], [ %rNToGo.1.i.i, %bb12.i.i ], [ %2043, %bb13.i.i ] ; [#uses=2] + %rTPos.0.i.i = phi i32 [ 0, %bb14.i.i ], [ %rTPos.1.i.i, %bb12.i.i ], [ %2044, %bb13.i.i ] ; [#uses=5] + %2046 = add i32 %rNToGo.0.i.i, -1 ; [#uses=4] + %2047 = icmp eq i32 %2046, 1 ; [#uses=1] + %2048 = zext i1 %2047 to i32 ; [#uses=1] + %2049 = xor i32 %2048, %2038 ; [#uses=7] + %2050 = add i32 %i2.0.i.i, 1 ; [#uses=2] + %2051 = trunc i32 %2049 to i8 ; [#uses=2] + %2052 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 3), align 4 ; [#uses=1] + %2053 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 2), align 8 ; [#uses=2] + %2054 = getelementptr i8* %2052, i32 %2053 ; [#uses=1] + store i8 %2051, i8* %2054, align 1 + %2055 = add i32 %2053, 1 ; [#uses=2] + store i32 %2055, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 2), align 8 + %2056 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=1] + %2057 = add i32 %2056, 1 ; [#uses=1] + store i32 %2057, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 + %2058 = shl i32 %localCrc.0.i.i, 8 ; [#uses=1] + %2059 = lshr i32 %localCrc.0.i.i, 24 ; [#uses=1] + %2060 = xor i32 %2049, %2059 ; [#uses=1] + %2061 = getelementptr [256 x i32]* @crc32Table, i32 0, i32 %2060 ; [#uses=1] + %2062 = load i32* %2061, align 4 ; [#uses=1] + %2063 = xor i32 %2062, %2058 ; [#uses=3] + %2064 = icmp eq i32 %2049, %ch2.0.i.i ; [#uses=1] + br i1 %2064, label %bb17.i.i, label %bb25.i.i + +bb17.i.i: ; preds = %bb15.i.i + %2065 = add i32 %count.0.i.i, 1 ; [#uses=2] + %2066 = icmp sgt i32 %2065, 3 ; [#uses=1] + br i1 %2066, label %bb18.i.i, label %bb25.i.i + +bb18.i.i: ; preds = %bb17.i.i + %2067 = getelementptr i8* %ll8.0, i32 %2040 ; [#uses=1] + %2068 = load i8* %2067, align 1 ; [#uses=1] + %2069 = getelementptr i32* %tt.0, i32 %2040 ; [#uses=1] + %2070 = load i32* %2069, align 4 ; [#uses=1] + %2071 = icmp eq i32 %rNToGo.0.i.i, 1 ; [#uses=1] + br i1 %2071, label %bb19.i.i, label %bb21.i.i + +bb19.i.i: ; preds = %bb18.i.i + %2072 = getelementptr [512 x i32]* @rNums, i32 0, i32 %rTPos.0.i.i ; [#uses=1] + %2073 = load i32* %2072, align 4 ; [#uses=2] + %2074 = add i32 %rTPos.0.i.i, 1 ; [#uses=2] + %2075 = icmp eq i32 %2074, 512 ; [#uses=1] + br i1 %2075, label %bb20.i.i, label %bb21.i.i + +bb20.i.i: ; preds = %bb19.i.i + br label %bb21.i.i + +bb21.i.i: ; preds = %bb20.i.i, %bb19.i.i, %bb18.i.i + %rNToGo.2.i.i = phi i32 [ %2073, %bb20.i.i ], [ %2046, %bb18.i.i ], [ %2073, %bb19.i.i ] ; [#uses=1] + %rTPos.2.i.i = phi i32 [ 0, %bb20.i.i ], [ %rTPos.0.i.i, %bb18.i.i ], [ %2074, %bb19.i.i ] ; [#uses=1] + %2076 = add i32 %rNToGo.2.i.i, -1 ; [#uses=2] + %2077 = icmp eq i32 %2076, 1 ; [#uses=1] + %2078 = zext i1 %2077 to i8 ; [#uses=1] + %2079 = xor i8 %2078, %2068 ; [#uses=1] + %2080 = zext i8 %2079 to i32 ; [#uses=1] + br label %bb23.i.i + +bb22.i.i: ; preds = %bb23.i.i + %2081 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 3), align 4 ; [#uses=1] + %2082 = getelementptr i8* %2081, i32 %2093 ; [#uses=1] + store i8 %2051, i8* %2082, align 1 + %2083 = add i32 %2093, 1 ; [#uses=2] + store i32 %2083, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 2), align 8 + %2084 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=1] + %2085 = add i32 %2084, 1 ; [#uses=1] + store i32 %2085, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 + %2086 = shl i32 %localCrc.2.i.i, 8 ; [#uses=1] + %2087 = lshr i32 %localCrc.2.i.i, 24 ; [#uses=1] + %2088 = xor i32 %2087, %2049 ; [#uses=1] + %2089 = getelementptr [256 x i32]* @crc32Table, i32 0, i32 %2088 ; [#uses=1] + %2090 = load i32* %2089, align 4 ; [#uses=1] + %2091 = xor i32 %2090, %2086 ; [#uses=1] + %2092 = add i32 %2094, 1 ; [#uses=1] + br label %bb23.i.i + +bb23.i.i: ; preds = %bb22.i.i, %bb21.i.i + %2093 = phi i32 [ %2083, %bb22.i.i ], [ %2055, %bb21.i.i ] ; [#uses=2] + %localCrc.2.i.i = phi i32 [ %2091, %bb22.i.i ], [ %2063, %bb21.i.i ] ; [#uses=3] + %2094 = phi i32 [ %2092, %bb22.i.i ], [ 0, %bb21.i.i ] ; [#uses=2] + %2095 = icmp sgt i32 %2080, %2094 ; [#uses=1] + br i1 %2095, label %bb22.i.i, label %bb24.split.i.i + +bb24.split.i.i: ; preds = %bb23.i.i + %2096 = add i32 %i2.0.i.i, 2 ; [#uses=1] + br label %bb25.i.i + +bb25.i.i: ; preds = %bb24.split.i.i, %bb17.i.i, %bb15.i.i, %bb10.i.i + %2097 = phi i32 [ %1867, %bb10.i.i ], [ %.pre.i33.i, %bb24.split.i.i ], [ %.pre.i33.i, %bb17.i.i ], [ %.pre.i33.i, %bb15.i.i ] ; [#uses=1] + %i2.0.i.i = phi i32 [ 0, %bb10.i.i ], [ %2096, %bb24.split.i.i ], [ %2050, %bb15.i.i ], [ %2050, %bb17.i.i ] ; [#uses=3] + %count.0.i.i = phi i32 [ 0, %bb10.i.i ], [ 0, %bb24.split.i.i ], [ 1, %bb15.i.i ], [ %2065, %bb17.i.i ] ; [#uses=1] + %ch2.0.i.i = phi i32 [ 256, %bb10.i.i ], [ %2049, %bb24.split.i.i ], [ %2049, %bb17.i.i ], [ %2049, %bb15.i.i ] ; [#uses=1] + %localCrc.0.i.i = phi i32 [ %2032, %bb10.i.i ], [ %localCrc.2.i.i, %bb24.split.i.i ], [ %2063, %bb15.i.i ], [ %2063, %bb17.i.i ] ; [#uses=3] + %rNToGo.1.i.i = phi i32 [ 0, %bb10.i.i ], [ %2076, %bb24.split.i.i ], [ %2046, %bb15.i.i ], [ %2046, %bb17.i.i ] ; [#uses=2] + %rTPos.1.i.i = phi i32 [ 0, %bb10.i.i ], [ %rTPos.2.i.i, %bb24.split.i.i ], [ %rTPos.0.i.i, %bb15.i.i ], [ %rTPos.0.i.i, %bb17.i.i ] ; [#uses=3] + %tPos.0.i.i = phi i32 [ %2034, %bb10.i.i ], [ %2070, %bb24.split.i.i ], [ %2040, %bb15.i.i ], [ %2040, %bb17.i.i ] ; [#uses=2] + %2098 = icmp sgt i32 %i2.0.i.i, %2097 ; [#uses=1] + br i1 %2098, label %undoReversibleTransformation_fast.exit.i, label %bb12.i.i + +bb26.i.i: ; preds = %bb33.i.i + %2099 = getelementptr i8* %ll8.0, i32 %tPos.1.i.i ; [#uses=1] + %2100 = load i8* %2099, align 1 ; [#uses=3] + %2101 = zext i8 %2100 to i32 ; [#uses=6] + %2102 = getelementptr i32* %tt.0, i32 %tPos.1.i.i ; [#uses=1] + %2103 = load i32* %2102, align 4 ; [#uses=4] + %2104 = add i32 %i2.1.i.i, 1 ; [#uses=2] + %2105 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 3), align 4 ; [#uses=1] + %2106 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 2), align 8 ; [#uses=2] + %2107 = getelementptr i8* %2105, i32 %2106 ; [#uses=1] + store i8 %2100, i8* %2107, align 1 + %2108 = add i32 %2106, 1 ; [#uses=2] + store i32 %2108, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 2), align 8 + %2109 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=1] + %2110 = add i32 %2109, 1 ; [#uses=1] + store i32 %2110, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 + %2111 = shl i32 %localCrc.3.i.i, 8 ; [#uses=1] + %2112 = lshr i32 %localCrc.3.i.i, 24 ; [#uses=1] + %2113 = xor i32 %2101, %2112 ; [#uses=1] + %2114 = getelementptr [256 x i32]* @crc32Table, i32 0, i32 %2113 ; [#uses=1] + %2115 = load i32* %2114, align 4 ; [#uses=1] + %2116 = xor i32 %2115, %2111 ; [#uses=3] + %2117 = icmp eq i32 %2101, %ch2.1.i.i ; [#uses=1] + br i1 %2117, label %bb28.i.i, label %bb33.i.i + +bb28.i.i: ; preds = %bb26.i.i + %2118 = add i32 %count.1.i.i, 1 ; [#uses=2] + %2119 = icmp sgt i32 %2118, 3 ; [#uses=1] + br i1 %2119, label %bb29.i.i, label %bb33.i.i + +bb29.i.i: ; preds = %bb28.i.i + %2120 = getelementptr i8* %ll8.0, i32 %2103 ; [#uses=1] + %2121 = load i8* %2120, align 1 ; [#uses=1] + %2122 = getelementptr i32* %tt.0, i32 %2103 ; [#uses=1] + %2123 = load i32* %2122, align 4 ; [#uses=1] + %2124 = zext i8 %2121 to i32 ; [#uses=1] + br label %bb31.i.i + +bb30.i.i: ; preds = %bb31.i.i + %2125 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 3), align 4 ; [#uses=1] + %2126 = getelementptr i8* %2125, i32 %2137 ; [#uses=1] + store i8 %2100, i8* %2126, align 1 + %2127 = add i32 %2137, 1 ; [#uses=2] + store i32 %2127, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 2), align 8 + %2128 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=1] + %2129 = add i32 %2128, 1 ; [#uses=1] + store i32 %2129, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 + %2130 = shl i32 %localCrc.4.i.i, 8 ; [#uses=1] + %2131 = lshr i32 %localCrc.4.i.i, 24 ; [#uses=1] + %2132 = xor i32 %2131, %2101 ; [#uses=1] + %2133 = getelementptr [256 x i32]* @crc32Table, i32 0, i32 %2132 ; [#uses=1] + %2134 = load i32* %2133, align 4 ; [#uses=1] + %2135 = xor i32 %2134, %2130 ; [#uses=1] + %2136 = add i32 %2138, 1 ; [#uses=1] + br label %bb31.i.i + +bb31.i.i: ; preds = %bb30.i.i, %bb29.i.i + %2137 = phi i32 [ %2127, %bb30.i.i ], [ %2108, %bb29.i.i ] ; [#uses=2] + %localCrc.4.i.i = phi i32 [ %2135, %bb30.i.i ], [ %2116, %bb29.i.i ] ; [#uses=3] + %2138 = phi i32 [ %2136, %bb30.i.i ], [ 0, %bb29.i.i ] ; [#uses=2] + %2139 = icmp sgt i32 %2124, %2138 ; [#uses=1] + br i1 %2139, label %bb30.i.i, label %bb32.split.i.i + +bb32.split.i.i: ; preds = %bb31.i.i + %2140 = add i32 %i2.1.i.i, 2 ; [#uses=1] + br label %bb33.i.i + +bb33.i.i: ; preds = %bb32.split.i.i, %bb28.i.i, %bb26.i.i, %bb10.i.i + %2141 = phi i32 [ %.pre.i33.i, %bb32.split.i.i ], [ %.pre.i33.i, %bb28.i.i ], [ %.pre.i33.i, %bb26.i.i ], [ %1867, %bb10.i.i ] ; [#uses=1] + %i2.1.i.i = phi i32 [ %2140, %bb32.split.i.i ], [ %2104, %bb26.i.i ], [ %2104, %bb28.i.i ], [ 0, %bb10.i.i ] ; [#uses=3] + %count.1.i.i = phi i32 [ 0, %bb32.split.i.i ], [ 1, %bb26.i.i ], [ %2118, %bb28.i.i ], [ 0, %bb10.i.i ] ; [#uses=1] + %ch2.1.i.i = phi i32 [ %2101, %bb32.split.i.i ], [ %2101, %bb28.i.i ], [ %2101, %bb26.i.i ], [ 256, %bb10.i.i ] ; [#uses=1] + %localCrc.3.i.i = phi i32 [ %localCrc.4.i.i, %bb32.split.i.i ], [ %2116, %bb26.i.i ], [ %2116, %bb28.i.i ], [ %2032, %bb10.i.i ] ; [#uses=3] + %tPos.1.i.i = phi i32 [ %2123, %bb32.split.i.i ], [ %2103, %bb26.i.i ], [ %2103, %bb28.i.i ], [ %2034, %bb10.i.i ] ; [#uses=2] + %2142 = icmp sgt i32 %i2.1.i.i, %2141 ; [#uses=1] + br i1 %2142, label %undoReversibleTransformation_fast.exit.i, label %bb26.i.i + +undoReversibleTransformation_fast.exit.i: ; preds = %bb33.i.i, %bb25.i.i + %localCrc.1.i.i = phi i32 [ %localCrc.0.i.i, %bb25.i.i ], [ %localCrc.3.i.i, %bb33.i.i ] ; [#uses=2] + store i32 %localCrc.1.i.i, i32* @globalCrc, align 4 + %not.i.i = xor i32 %localCrc.1.i.i, -1 ; [#uses=3] + %2143 = icmp eq i32 %1533, %not.i.i ; [#uses=1] + br i1 %2143, label %bb54.i, label %bb53.i + +bb53.i: ; preds = %undoReversibleTransformation_fast.exit.i + tail call fastcc void @crcError(i32 %1533, i32 %not.i.i) nounwind ssp + unreachable + +bb54.i: ; preds = %undoReversibleTransformation_fast.exit.i + %2144 = lshr i32 %computedCombinedCRC.0.i, 31 ; [#uses=1] + %2145 = shl i32 %computedCombinedCRC.0.i, 1 ; [#uses=1] + %2146 = or i32 %2144, %2145 ; [#uses=1] + %2147 = xor i32 %2146, %not.i.i ; [#uses=1] + %.pre.i.i22.i.pre = load i32* @bsLive, align 4 ; [#uses=2] + %.b6.i.pre = load i1* @bsStream.b ; [#uses=1] + %bsBuff.promoted302.pre = load i32* @bsBuff ; [#uses=1] + %phitmp758 = zext i1 %.b6.i.pre to i32 ; [#uses=1] + br label %bb13.i + +bb55.i: ; preds = %bb21.i + %2148 = tail call fastcc i32 @bsGetUInt32() nounwind ssp ; [#uses=2] + %2149 = icmp eq i32 %2148, %computedCombinedCRC.0.i ; [#uses=1] + br i1 %2149, label %bb23, label %bb60.i + +bb60.i: ; preds = %bb55.i + tail call fastcc void @crcError(i32 %2148, i32 %computedCombinedCRC.0.i) nounwind ssp + unreachable + +bb23: ; preds = %bb55.i, %bb.i, %bsGetUChar.exit21.i + %ll8.1 = phi i8* [ %ll8.2, %bsGetUChar.exit21.i ], [ %ll8.2, %bb.i ], [ %ll8.0, %bb55.i ] ; [#uses=1] + %tt.1 = phi i32* [ %tt.2, %bsGetUChar.exit21.i ], [ %tt.2, %bb.i ], [ %tt.0, %bb55.i ] ; [#uses=1] + store i1 false, i1* @bsStream.b + %2150 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=1] + %2151 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([38 x i8]* @"\01LC2694", i32 0, i32 0), i32 %2150) nounwind ; [#uses=0] + br label %bb28 + +bb25: ; preds = %bb28 + %scevgep2 = getelementptr i8* %62, i32 %i.1 ; [#uses=1] + %2152 = load i8* %scevgep2, align 1 ; [#uses=1] + %2153 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 3), align 4 ; [#uses=1] + %scevgep = getelementptr i8* %2153, i32 %tmp ; [#uses=1] + %2154 = load i8* %scevgep, align 1 ; [#uses=1] + %2155 = icmp eq i8 %2152, %2154 ; [#uses=1] + br i1 %2155, label %bb27, label %bb26 + +bb26: ; preds = %bb25 + %2156 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([35 x i8]* @"\01LC2795", i32 0, i32 0), i32 %input_size.0) nounwind ; [#uses=0] + ret i32 1 + +bb27: ; preds = %bb25 + %2157 = add i32 %i.1, 1 ; [#uses=1] + br label %bb28 + +bb28: ; preds = %bb27, %bb23 + %i.1 = phi i32 [ %2157, %bb27 ], [ 0, %bb23 ] ; [#uses=3] + %tmp = mul i32 %i.1, 1027 ; [#uses=2] + %2158 = icmp slt i32 %tmp, %11 ; [#uses=1] + br i1 %2158, label %bb25, label %bb31 + +bb31: ; preds = %bb28 + %2159 = tail call i32 @puts(i8* getelementptr ([37 x i8]* @"\01LC2896", i32 0, i32 0)) nounwind ; [#uses=0] + %2160 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 1), align 4 ; [#uses=1] + %2161 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 3), align 4 ; [#uses=1] + tail call void @llvm.memset.i32(i8* %2161, i8 0, i32 %2160, i32 1) nounwind + store i32 0, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 1), align 4 + store i32 0, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 + store i32 0, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 2), align 8 + %indvar.next = add i32 %indvar, 1 ; [#uses=1] + br label %bb32 + +bb32: ; preds = %bb31, %spec_initbufs.exit + %ll8.2 = phi i8* [ null, %spec_initbufs.exit ], [ %ll8.1, %bb31 ] ; [#uses=6] + %tt.2 = phi i32* [ null, %spec_initbufs.exit ], [ %tt.1, %bb31 ] ; [#uses=6] + %indvar = phi i32 [ 0, %spec_initbufs.exit ], [ %indvar.next, %bb31 ] ; [#uses=2] + %tmp3 = shl i32 %indvar, 1 ; [#uses=1] + %level.0 = add i32 %tmp3, 7 ; [#uses=3] + %2162 = icmp sgt i32 %level.0, 9 ; [#uses=1] + br i1 %2162, label %bb33, label %bb18 + +bb33: ; preds = %bb32 + %2163 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([25 x i8]* @"\01LC2997", i32 0, i32 0), i32 %input_size.0) nounwind ; [#uses=0] + ret i32 0 +} + +declare fastcc void @generateMTFValues() nounwind ssp + +declare i32 @fprintf(%struct.FILE* nocapture, i8* nocapture, ...) nounwind + +declare fastcc void @cleanUpAndFail(i32) noreturn nounwind ssp + +declare void @exit(i32) noreturn nounwind + +declare fastcc void @panic(i8*) noreturn nounwind ssp + +declare i32 @"\01_fwrite$UNIX2003"(i8*, i32, i32, i8*) + +declare fastcc void @blockOverrun() noreturn nounwind ssp + +declare fastcc void @compressedStreamEOF() noreturn nounwind ssp + +declare fastcc void @crcError(i32, i32) noreturn nounwind ssp + +declare fastcc void @sortIt() nounwind ssp + +declare fastcc i32 @bsGetUInt32() nounwind ssp + +declare fastcc void @loadAndRLEsource() nounwind ssp + +declare i32 @printf(i8* nocapture, ...) nounwind + +declare i32 @puts(i8* nocapture) nounwind + +declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind + +declare void @llvm.memset.i32(i8* nocapture, i8, i32, i32) nounwind + +declare i32 @"\01_open$UNIX2003"(i8*, i32, ...) + +declare i32* @__error() + +declare i8* @"\01_strerror$UNIX2003"(i32) + +declare i32 @read(...) + +declare i32 @close(...) + +declare i32 @atoi(i8* nocapture) nounwind readonly + +declare void @llvm.memset.i64(i8* nocapture, i8, i64, i32) nounwind From daniel at zuster.org Tue Jul 21 04:19:30 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 09:19:30 -0000 Subject: [llvm-commits] [llvm] r76559 - in /llvm/trunk: include/llvm/ADT/StringRef.h unittests/ADT/StringRefTest.cpp Message-ID: <200907210919.n6L9JW4h019241@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Jul 21 04:18:49 2009 New Revision: 76559 URL: http://llvm.org/viewvc/llvm-project?rev=76559&view=rev Log: Add StringRef::{substr, startswith}. Modified: llvm/trunk/include/llvm/ADT/StringRef.h llvm/trunk/unittests/ADT/StringRefTest.cpp Modified: llvm/trunk/include/llvm/ADT/StringRef.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=76559&r1=76558&r2=76559&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/StringRef.h (original) +++ llvm/trunk/include/llvm/ADT/StringRef.h Tue Jul 21 04:18:49 2009 @@ -14,6 +14,7 @@ #include namespace llvm { + /// StringRef - Represent a constant reference to a string, i.e. a character /// array and a length, which need not be null terminated. /// @@ -24,13 +25,14 @@ class StringRef { public: typedef const char *iterator; + static const size_t npos = std::string::npos; private: /// The start of the string, in an external buffer. const char *Data; /// The length of the string. - unsigned Length; + size_t Length; public: /// @name Constructors @@ -121,7 +123,31 @@ } /// @} + /// @name Utility Functions + /// @{ + + /// substr - Return a reference to a substring of this object. + /// + /// \param Start - The index of the starting character in the substring; if + /// the index is greater than the length of the string then the empty + /// substring will be returned. + /// + /// \param N - The number of characters to included in the substring. If N + /// exceeds the number of characters remaining in the string, the string + /// suffix (starting with \arg Start) will be returned. + StringRef substr(size_t Start, size_t N = npos) const { + Start = std::min(Start, Length); + return StringRef(Data + Start, std::min(N, Length - Start)); + } + + /// startswith - Check if this string starts with the given \arg Prefix. + bool startswith(const StringRef &Prefix) const { + return substr(0, Prefix.Length) == Prefix; + } + + /// @} }; + } #endif Modified: llvm/trunk/unittests/ADT/StringRefTest.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/StringRefTest.cpp?rev=76559&r1=76558&r2=76559&view=diff ============================================================================== --- llvm/trunk/unittests/ADT/StringRefTest.cpp (original) +++ llvm/trunk/unittests/ADT/StringRefTest.cpp Tue Jul 21 04:18:49 2009 @@ -56,4 +56,16 @@ EXPECT_EQ('a', StringRef("aab")[1]); } +TEST(StringRefTest, Utilities) { + StringRef Str("hello"); + EXPECT_TRUE(Str.substr(3) == "lo"); + EXPECT_TRUE(Str.substr(100) == ""); + EXPECT_TRUE(Str.substr(0, 100) == "hello"); + EXPECT_TRUE(Str.substr(4, 10) == "o"); + + EXPECT_TRUE(Str.startswith("he")); + EXPECT_FALSE(Str.startswith("helloworld")); + EXPECT_FALSE(Str.startswith("hi")); +} + } // end anonymous namespace From daniel at zuster.org Tue Jul 21 04:33:15 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 02:33:15 -0700 Subject: [llvm-commits] [PATCH] StringRef class. In-Reply-To: <23AF8E62-D807-4B5D-BEA0-1BE403D5BA5B@apple.com> References: <6a8523d60907201705y5221663bi48a2042bdeb5bc58@mail.gmail.com> <23AF8E62-D807-4B5D-BEA0-1BE403D5BA5B@apple.com> Message-ID: <6a8523d60907210233q5942198p225694865df94c21@mail.gmail.com> On Mon, Jul 20, 2009 at 11:36 PM, Chris Lattner wrote: > Otherwise, looks great. ?Thanks Daniel! ?Bonus points if you actually > change the Value "name" apis to use it. :) Oh dear. I had no idea how std::string happy you backend folks were! :) The change to the Value API is straightforward, but the problem is the getName() API gets used a lot in the following two situations: -- ... "hello" + Foo->getName() + "bar" ... -- and -- cerr << ... << Foo->getName() << ... -- Support for writing strings to output streams is pretty desirable. Concatenation is actually quite useful, as the number of uses of it in LLVM would suggest, but I'm not sure its something StringRef should support directly. FWIW, if I add stream support then with the following additions the API change to Value is almost transparent (there are a few places that rely on being able to call c_str on the result): -- // Support string concatenation using StringRef. Clients should use .str() // instead, but this is pervasive enough in LLVM that we provide these as a // convenience. inline std::string operator+(const std::string &LHS, const StringRef &RHS) { return LHS + RHS.str(); } inline std::string operator+(const StringRef &LHS, const std::string &RHS) { return LHS.str() + RHS; } inline bool operator==(const std::string &LHS, const StringRef &RHS) { return RHS == LHS; } inline bool operator!=(const std::string &LHS, const StringRef &RHS) { return RHS != LHS; } -- - Daniel From baldrick at free.fr Tue Jul 21 05:34:48 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 10:34:48 -0000 Subject: [llvm-commits] [gcc-plugin] r76562 - /gcc-plugin/trunk/llvm-convert.cpp Message-ID: <200907211034.n6LAYmLK021486@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 05:34:44 2009 New Revision: 76562 URL: http://llvm.org/viewvc/llvm-project?rev=76562&view=rev Log: Update to llvm-gcc revision 76542. Modified: gcc-plugin/trunk/llvm-convert.cpp Modified: gcc-plugin/trunk/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-convert.cpp?rev=76562&r1=76561&r2=76562&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-convert.cpp (original) +++ gcc-plugin/trunk/llvm-convert.cpp Tue Jul 21 05:34:44 2009 @@ -38,6 +38,7 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Target/TargetAsmInfo.h" #include "llvm/Target/TargetData.h" +#include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/DenseMap.h" @@ -530,10 +531,14 @@ else if (flag_stack_protect == 2) Fn->addFnAttr(Attribute::StackProtectReq); + // Handle naked attribute + if (lookup_attribute ("naked", DECL_ATTRIBUTES (FnDecl))) + Fn->addFnAttr(Attribute::Naked); + // Handle annotate attributes if (DECL_ATTRIBUTES(FnDecl)) AddAnnotateAttrsToGlobal(Fn, FnDecl); - + // Mark the function "nounwind" if not doing exception handling. if (!flag_exceptions) Fn->setDoesNotThrow(); @@ -2177,6 +2182,24 @@ // ... Expressions ... //===----------------------------------------------------------------------===// +static bool canEmitRegisterVariable(tree exp) { + // Only variables can be marked as 'register'. + if (TREE_CODE(exp) != VAR_DECL || !DECL_REGISTER(exp)) + return false; + + // We can emit inline assembler for access to global register variables. + if (TREE_STATIC(exp) || DECL_EXTERNAL(exp) || TREE_PUBLIC(exp)) + return true; + + // Emit inline asm if this is local variable with assembler name on it. + if (DECL_ASSEMBLER_NAME_SET_P(exp)) + return true; + + // Otherwise - it's normal automatic variable. + return false; +} + + /// EmitLoadOfLValue - When an l-value expression is used in a context that /// requires an r-value, this method emits the lvalue computation, then loads /// the result. @@ -2194,8 +2217,7 @@ //FIXME DECL_GIMPLE_FORMAL_TEMP_P(exp) = 0; EmitAutomaticVariableDecl(exp); // Fall through. - } else if (TREE_CODE(exp) == VAR_DECL && DECL_REGISTER(exp) && - TREE_STATIC(exp)) { + } else if (canEmitRegisterVariable(exp)) { // If this is a register variable, EmitLV can't handle it (there is no // l-value of a register variable). Emit an inline asm node that copies the // value out of the specified register. @@ -2887,8 +2909,7 @@ Builder.Insert(Cast); SET_DECL_LLVM(lhs, Cast); return Cast; - } else if (TREE_CODE(lhs) == VAR_DECL && DECL_REGISTER(lhs) && - TREE_STATIC(lhs)) { + } else if (canEmitRegisterVariable(lhs)) { // If this is a store to a register variable, EmitLV can't handle the dest // (there is no l-value of a register variable). Emit an inline asm node // that copies the value into the specified register. @@ -3811,19 +3832,20 @@ Value *TreeToLLVM::EmitReadOfRegisterVariable(tree decl, const MemRef *DestLoc) { const Type *Ty = ConvertType(TREE_TYPE(decl)); - + // If there was an error, return something bogus. if (ValidateRegisterVariable(decl)) { if (Ty->isSingleValueType()) return Context.getUndef(Ty); return 0; // Just don't copy something into DestLoc. } - + // Turn this into a 'tmp = call Ty asm "", "={reg}"()'. FunctionType *FTy = Context.getFunctionType(Ty, std::vector(),false); - - const char *Name = extractRegisterName(decl); + + const char *Name = reg_names[decode_reg_name(extractRegisterName(decl))]; + InlineAsm *IA = InlineAsm::get(FTy, "", "={"+std::string(Name)+"}", false); CallInst *Call = Builder.CreateCall(IA); Call->setDoesNotThrow(); @@ -3836,13 +3858,14 @@ // If there was an error, bail out. if (ValidateRegisterVariable(decl)) return; - + // Turn this into a 'call void asm sideeffect "", "{reg}"(Ty %RHS)'. std::vector ArgTys; ArgTys.push_back(ConvertType(TREE_TYPE(decl))); FunctionType *FTy = Context.getFunctionType(Type::VoidTy, ArgTys, false); - - const char *Name = extractRegisterName(decl); + + const char *Name = reg_names[decode_reg_name(extractRegisterName(decl))]; + InlineAsm *IA = InlineAsm::get(FTy, "", "{"+std::string(Name)+"}", true); CallInst *Call = Builder.CreateCall(IA, RHS); Call->setDoesNotThrow(); @@ -4212,6 +4235,22 @@ free((char *)ReplacementStrings[i]); } +// When extracting a register name from a DECL_HARD_REGISTER variable, +// we normally want to look up RegNum in reg_names. This works on most +// targets, where ADDITIONAL_REGISTER_NAMES are true synonyms. It does not +// work on x86, where ADDITIONAL_REGISTER_NAMES are overlapping subregisters; +// in particular AH and AL can't be distinguished if we go through reg_names. +static const char* getConstraintRegNameFromGccTables(const char *RegName, + unsigned int RegNum) { +#ifdef LLVM_DO_NOT_USE_REG_NAMES + if (*RegName == '%') + RegName++; + return RegName; +#else + return reg_names[RegNum]; +#endif +} + Value *TreeToLLVM::EmitASM_EXPR(tree exp) { unsigned NumInputs = list_length(ASM_INPUTS(exp)); unsigned NumOutputs = list_length(ASM_OUTPUTS(exp)); @@ -4330,9 +4369,7 @@ const char* RegName = extractRegisterName(Operand); int RegNum = decode_reg_name(RegName); if (RegNum >= 0) { - // Constraints don't have the leading %, the variable names do - if (*RegName == '%') - RegName++; + RegName = getConstraintRegNameFromGccTables(RegName, RegNum); unsigned RegNameLen = strlen(RegName); char *NewConstraint = (char*)alloca(RegNameLen+4); NewConstraint[0] = '='; @@ -4484,8 +4521,7 @@ const char *RegName = extractRegisterName(Val); int RegNum = decode_reg_name(RegName); if (RegNum >= 0) { - if (*RegName == '%') // Variables have leading %. - RegName++; // Constraints don't. + RegName = getConstraintRegNameFromGccTables(RegName, RegNum); ConstraintStr += '{'; ConstraintStr += RegName; ConstraintStr += '}'; @@ -4522,8 +4558,7 @@ ConstraintStr += ",~{memory}"; break; default: // Normal register name. - if (*RegName == '%') - RegName++; + RegName = getConstraintRegNameFromGccTables(RegName, RegCode); ConstraintStr += ",~{"; ConstraintStr += RegName; ConstraintStr += "}"; @@ -4576,8 +4611,8 @@ // Give the backend a chance to upgrade the inline asm to LLVM code. This // handles some common cases that LLVM has intrinsics for, e.g. x86 bswap -> // llvm.bswap. - if (const TargetAsmInfo *TAI = TheTarget->getTargetAsmInfo()) - TAI->ExpandInlineAsm(CV); + if (const TargetLowering *TLI = TheTarget->getTargetLowering()) + TLI->ExpandInlineAsm(CV); if (NumChoices>1) FreeConstTupleStrings(ReplacementStrings, NumInputs+NumOutputs); From baldrick at free.fr Tue Jul 21 05:46:37 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 10:46:37 -0000 Subject: [llvm-commits] [gcc-plugin] r76564 - /gcc-plugin/trunk/i386/llvm-i386-target.h Message-ID: <200907211046.n6LAkcKP021842@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 05:46:07 2009 New Revision: 76564 URL: http://llvm.org/viewvc/llvm-project?rev=76564&view=rev Log: Guard against multiple inclusion. Modified: gcc-plugin/trunk/i386/llvm-i386-target.h Modified: gcc-plugin/trunk/i386/llvm-i386-target.h URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/i386/llvm-i386-target.h?rev=76564&r1=76563&r2=76564&view=diff ============================================================================== --- gcc-plugin/trunk/i386/llvm-i386-target.h (original) +++ gcc-plugin/trunk/i386/llvm-i386-target.h Tue Jul 21 05:46:07 2009 @@ -19,6 +19,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef LLVM_I386_TARGET_H +#define LLVM_I386_TARGET_H + /* LLVM specific stuff for supporting calling convention output */ #define TARGET_ADJUST_LLVM_CC(CC, type) \ { \ @@ -223,3 +226,5 @@ false) #endif /* LLVM_ABI_H */ + +#endif /* LLVM_I386_TARGET_H */ From baldrick at free.fr Tue Jul 21 05:55:56 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 10:55:56 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r76565 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h Message-ID: <200907211056.n6LAu0vX022115@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 05:55:23 2009 New Revision: 76565 URL: http://llvm.org/viewvc/llvm-project?rev=76565&view=rev Log: Guard against multiple inclusion. Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h?rev=76565&r1=76564&r2=76565&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h Tue Jul 21 05:55:23 2009 @@ -21,6 +21,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef LLVM_I386_TARGET_H +#define LLVM_I386_TARGET_H + /* LLVM specific stuff for supporting calling convention output */ #define TARGET_ADJUST_LLVM_CC(CC, type) \ { \ @@ -226,5 +229,6 @@ #endif /* LLVM_ABI_H */ #endif /* ENABLE_LLVM */ -/* LLVM LOCAL end (ENTIRE FILE!) */ +#endif /* LLVM_I386_TARGET_H */ +/* LLVM LOCAL end (ENTIRE FILE!) */ From baldrick at free.fr Tue Jul 21 06:04:39 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 11:04:39 -0000 Subject: [llvm-commits] [gcc-plugin] r76566 - /gcc-plugin/trunk/i386/llvm-i386-target.h Message-ID: <200907211104.n6LB4hYY022389@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 06:04:20 2009 New Revision: 76566 URL: http://llvm.org/viewvc/llvm-project?rev=76566&view=rev Log: Merge in LLVM specific parts of config/i386/i386.h (llvm-gcc revision 76542). Modified: gcc-plugin/trunk/i386/llvm-i386-target.h Modified: gcc-plugin/trunk/i386/llvm-i386-target.h URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/i386/llvm-i386-target.h?rev=76566&r1=76565&r2=76566&view=diff ============================================================================== --- gcc-plugin/trunk/i386/llvm-i386-target.h (original) +++ gcc-plugin/trunk/i386/llvm-i386-target.h Tue Jul 21 06:04:20 2009 @@ -227,4 +227,672 @@ #endif /* LLVM_ABI_H */ +/* Register class used for passing given 64bit part of the argument. + These represent classes as documented by the PS ABI, with the exception + of SSESF, SSEDF classes, that are basically SSE class, just gcc will + use SF or DFmode move instead of DImode to avoid reformatting penalties. + + Similarly we play games with INTEGERSI_CLASS to use cheaper SImode moves + whenever possible (upper half does contain padding). + */ +enum x86_64_reg_class + { + X86_64_NO_CLASS, + X86_64_INTEGER_CLASS, + X86_64_INTEGERSI_CLASS, + X86_64_SSE_CLASS, + X86_64_SSESF_CLASS, + X86_64_SSEDF_CLASS, + X86_64_SSEUP_CLASS, + X86_64_X87_CLASS, + X86_64_X87UP_CLASS, + X86_64_COMPLEX_X87_CLASS, + X86_64_MEMORY_CLASS + }; + +/* Codes for all the SSE/MMX builtins. */ +enum ix86_builtins +{ + IX86_BUILTIN_ADDPS, + IX86_BUILTIN_ADDSS, + IX86_BUILTIN_DIVPS, + IX86_BUILTIN_DIVSS, + IX86_BUILTIN_MULPS, + IX86_BUILTIN_MULSS, + IX86_BUILTIN_SUBPS, + IX86_BUILTIN_SUBSS, + + IX86_BUILTIN_CMPEQPS, + IX86_BUILTIN_CMPLTPS, + IX86_BUILTIN_CMPLEPS, + IX86_BUILTIN_CMPGTPS, + IX86_BUILTIN_CMPGEPS, + IX86_BUILTIN_CMPNEQPS, + IX86_BUILTIN_CMPNLTPS, + IX86_BUILTIN_CMPNLEPS, + IX86_BUILTIN_CMPNGTPS, + IX86_BUILTIN_CMPNGEPS, + IX86_BUILTIN_CMPORDPS, + IX86_BUILTIN_CMPUNORDPS, + IX86_BUILTIN_CMPNEPS, + IX86_BUILTIN_CMPEQSS, + IX86_BUILTIN_CMPLTSS, + IX86_BUILTIN_CMPLESS, + IX86_BUILTIN_CMPNEQSS, + IX86_BUILTIN_CMPNLTSS, + IX86_BUILTIN_CMPNLESS, + IX86_BUILTIN_CMPNGTSS, + IX86_BUILTIN_CMPNGESS, + IX86_BUILTIN_CMPORDSS, + IX86_BUILTIN_CMPUNORDSS, + IX86_BUILTIN_CMPNESS, + + IX86_BUILTIN_COMIEQSS, + IX86_BUILTIN_COMILTSS, + IX86_BUILTIN_COMILESS, + IX86_BUILTIN_COMIGTSS, + IX86_BUILTIN_COMIGESS, + IX86_BUILTIN_COMINEQSS, + IX86_BUILTIN_UCOMIEQSS, + IX86_BUILTIN_UCOMILTSS, + IX86_BUILTIN_UCOMILESS, + IX86_BUILTIN_UCOMIGTSS, + IX86_BUILTIN_UCOMIGESS, + IX86_BUILTIN_UCOMINEQSS, + + IX86_BUILTIN_CVTPI2PS, + IX86_BUILTIN_CVTPS2PI, + IX86_BUILTIN_CVTSI2SS, + IX86_BUILTIN_CVTSI642SS, + IX86_BUILTIN_CVTSS2SI, + IX86_BUILTIN_CVTSS2SI64, + IX86_BUILTIN_CVTTPS2PI, + IX86_BUILTIN_CVTTSS2SI, + IX86_BUILTIN_CVTTSS2SI64, + + IX86_BUILTIN_MAXPS, + IX86_BUILTIN_MAXSS, + IX86_BUILTIN_MINPS, + IX86_BUILTIN_MINSS, + + IX86_BUILTIN_LOADUPS, + IX86_BUILTIN_STOREUPS, + IX86_BUILTIN_MOVSS, + + IX86_BUILTIN_MOVHLPS, + IX86_BUILTIN_MOVLHPS, + IX86_BUILTIN_LOADHPS, + IX86_BUILTIN_LOADLPS, + IX86_BUILTIN_STOREHPS, + IX86_BUILTIN_STORELPS, + + IX86_BUILTIN_MASKMOVQ, + IX86_BUILTIN_MOVMSKPS, + IX86_BUILTIN_PMOVMSKB, + + IX86_BUILTIN_MOVNTPS, + IX86_BUILTIN_MOVNTQ, + + IX86_BUILTIN_LOADDQU, + IX86_BUILTIN_STOREDQU, + + IX86_BUILTIN_PACKSSWB, + IX86_BUILTIN_PACKSSDW, + IX86_BUILTIN_PACKUSWB, + + IX86_BUILTIN_PADDB, + IX86_BUILTIN_PADDW, + IX86_BUILTIN_PADDD, + IX86_BUILTIN_PADDQ, + IX86_BUILTIN_PADDSB, + IX86_BUILTIN_PADDSW, + IX86_BUILTIN_PADDUSB, + IX86_BUILTIN_PADDUSW, + IX86_BUILTIN_PSUBB, + IX86_BUILTIN_PSUBW, + IX86_BUILTIN_PSUBD, + IX86_BUILTIN_PSUBQ, + IX86_BUILTIN_PSUBSB, + IX86_BUILTIN_PSUBSW, + IX86_BUILTIN_PSUBUSB, + IX86_BUILTIN_PSUBUSW, + + IX86_BUILTIN_PAND, + IX86_BUILTIN_PANDN, + IX86_BUILTIN_POR, + IX86_BUILTIN_PXOR, + + IX86_BUILTIN_PAVGB, + IX86_BUILTIN_PAVGW, + + IX86_BUILTIN_PCMPEQB, + IX86_BUILTIN_PCMPEQW, + IX86_BUILTIN_PCMPEQD, + IX86_BUILTIN_PCMPGTB, + IX86_BUILTIN_PCMPGTW, + IX86_BUILTIN_PCMPGTD, + + IX86_BUILTIN_PMADDWD, + + IX86_BUILTIN_PMAXSW, + IX86_BUILTIN_PMAXUB, + IX86_BUILTIN_PMINSW, + IX86_BUILTIN_PMINUB, + + IX86_BUILTIN_PMULHUW, + IX86_BUILTIN_PMULHW, + IX86_BUILTIN_PMULLW, + + IX86_BUILTIN_PSADBW, + IX86_BUILTIN_PSHUFW, + + IX86_BUILTIN_PSLLW, + IX86_BUILTIN_PSLLD, + IX86_BUILTIN_PSLLQ, + IX86_BUILTIN_PSRAW, + IX86_BUILTIN_PSRAD, + IX86_BUILTIN_PSRLW, + IX86_BUILTIN_PSRLD, + IX86_BUILTIN_PSRLQ, + IX86_BUILTIN_PSLLWI, + IX86_BUILTIN_PSLLDI, + IX86_BUILTIN_PSLLQI, + IX86_BUILTIN_PSRAWI, + IX86_BUILTIN_PSRADI, + IX86_BUILTIN_PSRLWI, + IX86_BUILTIN_PSRLDI, + IX86_BUILTIN_PSRLQI, + + IX86_BUILTIN_PUNPCKHBW, + IX86_BUILTIN_PUNPCKHWD, + IX86_BUILTIN_PUNPCKHDQ, + IX86_BUILTIN_PUNPCKLBW, + IX86_BUILTIN_PUNPCKLWD, + IX86_BUILTIN_PUNPCKLDQ, + + IX86_BUILTIN_SHUFPS, + + IX86_BUILTIN_RCPPS, + IX86_BUILTIN_RCPSS, + IX86_BUILTIN_RSQRTPS, + IX86_BUILTIN_RSQRTSS, + IX86_BUILTIN_SQRTPS, + IX86_BUILTIN_SQRTSS, + + IX86_BUILTIN_UNPCKHPS, + IX86_BUILTIN_UNPCKLPS, + + IX86_BUILTIN_ANDPS, + IX86_BUILTIN_ANDNPS, + IX86_BUILTIN_ORPS, + IX86_BUILTIN_XORPS, + + IX86_BUILTIN_EMMS, + IX86_BUILTIN_LDMXCSR, + IX86_BUILTIN_STMXCSR, + IX86_BUILTIN_SFENCE, + + /* 3DNow! Original */ + IX86_BUILTIN_FEMMS, + IX86_BUILTIN_PAVGUSB, + IX86_BUILTIN_PF2ID, + IX86_BUILTIN_PFACC, + IX86_BUILTIN_PFADD, + IX86_BUILTIN_PFCMPEQ, + IX86_BUILTIN_PFCMPGE, + IX86_BUILTIN_PFCMPGT, + IX86_BUILTIN_PFMAX, + IX86_BUILTIN_PFMIN, + IX86_BUILTIN_PFMUL, + IX86_BUILTIN_PFRCP, + IX86_BUILTIN_PFRCPIT1, + IX86_BUILTIN_PFRCPIT2, + IX86_BUILTIN_PFRSQIT1, + IX86_BUILTIN_PFRSQRT, + IX86_BUILTIN_PFSUB, + IX86_BUILTIN_PFSUBR, + IX86_BUILTIN_PI2FD, + IX86_BUILTIN_PMULHRW, + + /* 3DNow! Athlon Extensions */ + IX86_BUILTIN_PF2IW, + IX86_BUILTIN_PFNACC, + IX86_BUILTIN_PFPNACC, + IX86_BUILTIN_PI2FW, + IX86_BUILTIN_PSWAPDSI, + IX86_BUILTIN_PSWAPDSF, + + /* SSE2 */ + IX86_BUILTIN_ADDPD, + IX86_BUILTIN_ADDSD, + IX86_BUILTIN_DIVPD, + IX86_BUILTIN_DIVSD, + IX86_BUILTIN_MULPD, + IX86_BUILTIN_MULSD, + IX86_BUILTIN_SUBPD, + IX86_BUILTIN_SUBSD, + + IX86_BUILTIN_CMPEQPD, + IX86_BUILTIN_CMPLTPD, + IX86_BUILTIN_CMPLEPD, + IX86_BUILTIN_CMPGTPD, + IX86_BUILTIN_CMPGEPD, + IX86_BUILTIN_CMPNEQPD, + IX86_BUILTIN_CMPNLTPD, + IX86_BUILTIN_CMPNLEPD, + IX86_BUILTIN_CMPNGTPD, + IX86_BUILTIN_CMPNGEPD, + IX86_BUILTIN_CMPORDPD, + IX86_BUILTIN_CMPUNORDPD, + IX86_BUILTIN_CMPNEPD, + IX86_BUILTIN_CMPEQSD, + IX86_BUILTIN_CMPLTSD, + IX86_BUILTIN_CMPLESD, + IX86_BUILTIN_CMPNEQSD, + IX86_BUILTIN_CMPNLTSD, + IX86_BUILTIN_CMPNLESD, + IX86_BUILTIN_CMPORDSD, + IX86_BUILTIN_CMPUNORDSD, + IX86_BUILTIN_CMPNESD, + + IX86_BUILTIN_COMIEQSD, + IX86_BUILTIN_COMILTSD, + IX86_BUILTIN_COMILESD, + IX86_BUILTIN_COMIGTSD, + IX86_BUILTIN_COMIGESD, + IX86_BUILTIN_COMINEQSD, + IX86_BUILTIN_UCOMIEQSD, + IX86_BUILTIN_UCOMILTSD, + IX86_BUILTIN_UCOMILESD, + IX86_BUILTIN_UCOMIGTSD, + IX86_BUILTIN_UCOMIGESD, + IX86_BUILTIN_UCOMINEQSD, + + IX86_BUILTIN_MAXPD, + IX86_BUILTIN_MAXSD, + IX86_BUILTIN_MINPD, + IX86_BUILTIN_MINSD, + + IX86_BUILTIN_ANDPD, + IX86_BUILTIN_ANDNPD, + IX86_BUILTIN_ORPD, + IX86_BUILTIN_XORPD, + + IX86_BUILTIN_SQRTPD, + IX86_BUILTIN_SQRTSD, + + IX86_BUILTIN_UNPCKHPD, + IX86_BUILTIN_UNPCKLPD, + + IX86_BUILTIN_SHUFPD, + + IX86_BUILTIN_LOADUPD, + IX86_BUILTIN_STOREUPD, + IX86_BUILTIN_MOVSD, + + IX86_BUILTIN_LOADHPD, + IX86_BUILTIN_LOADLPD, + + IX86_BUILTIN_CVTDQ2PD, + IX86_BUILTIN_CVTDQ2PS, + + IX86_BUILTIN_CVTPD2DQ, + IX86_BUILTIN_CVTPD2PI, + IX86_BUILTIN_CVTPD2PS, + IX86_BUILTIN_CVTTPD2DQ, + IX86_BUILTIN_CVTTPD2PI, + + IX86_BUILTIN_CVTPI2PD, + IX86_BUILTIN_CVTSI2SD, + IX86_BUILTIN_CVTSI642SD, + + IX86_BUILTIN_CVTSD2SI, + IX86_BUILTIN_CVTSD2SI64, + IX86_BUILTIN_CVTSD2SS, + IX86_BUILTIN_CVTSS2SD, + IX86_BUILTIN_CVTTSD2SI, + IX86_BUILTIN_CVTTSD2SI64, + + IX86_BUILTIN_CVTPS2DQ, + IX86_BUILTIN_CVTPS2PD, + IX86_BUILTIN_CVTTPS2DQ, + + IX86_BUILTIN_MOVNTI, + IX86_BUILTIN_MOVNTPD, + IX86_BUILTIN_MOVNTDQ, + + /* SSE2 MMX */ + IX86_BUILTIN_MASKMOVDQU, + IX86_BUILTIN_MOVMSKPD, + IX86_BUILTIN_PMOVMSKB128, + + /* APPLE LOCAL begin 4099020 */ + IX86_BUILTIN_MOVQ, + IX86_BUILTIN_LOADQ, + IX86_BUILTIN_STOREQ, + /* APPLE LOCAL end 4099020 */ + + IX86_BUILTIN_PACKSSWB128, + IX86_BUILTIN_PACKSSDW128, + IX86_BUILTIN_PACKUSWB128, + + IX86_BUILTIN_PADDB128, + IX86_BUILTIN_PADDW128, + IX86_BUILTIN_PADDD128, + IX86_BUILTIN_PADDQ128, + IX86_BUILTIN_PADDSB128, + IX86_BUILTIN_PADDSW128, + IX86_BUILTIN_PADDUSB128, + IX86_BUILTIN_PADDUSW128, + IX86_BUILTIN_PSUBB128, + IX86_BUILTIN_PSUBW128, + IX86_BUILTIN_PSUBD128, + IX86_BUILTIN_PSUBQ128, + IX86_BUILTIN_PSUBSB128, + IX86_BUILTIN_PSUBSW128, + IX86_BUILTIN_PSUBUSB128, + IX86_BUILTIN_PSUBUSW128, + + IX86_BUILTIN_PAND128, + IX86_BUILTIN_PANDN128, + IX86_BUILTIN_POR128, + IX86_BUILTIN_PXOR128, + + IX86_BUILTIN_PAVGB128, + IX86_BUILTIN_PAVGW128, + + IX86_BUILTIN_PCMPEQB128, + IX86_BUILTIN_PCMPEQW128, + IX86_BUILTIN_PCMPEQD128, + IX86_BUILTIN_PCMPGTB128, + IX86_BUILTIN_PCMPGTW128, + IX86_BUILTIN_PCMPGTD128, + + IX86_BUILTIN_PMADDWD128, + + IX86_BUILTIN_PMAXSW128, + IX86_BUILTIN_PMAXUB128, + IX86_BUILTIN_PMINSW128, + IX86_BUILTIN_PMINUB128, + + IX86_BUILTIN_PMULUDQ, + IX86_BUILTIN_PMULUDQ128, + IX86_BUILTIN_PMULHUW128, + IX86_BUILTIN_PMULHW128, + IX86_BUILTIN_PMULLW128, + + IX86_BUILTIN_PSADBW128, + IX86_BUILTIN_PSHUFHW, + IX86_BUILTIN_PSHUFLW, + IX86_BUILTIN_PSHUFD, + + IX86_BUILTIN_PSLLW128, + IX86_BUILTIN_PSLLD128, + IX86_BUILTIN_PSLLQ128, + IX86_BUILTIN_PSRAW128, + IX86_BUILTIN_PSRAD128, + IX86_BUILTIN_PSRLW128, + IX86_BUILTIN_PSRLD128, + IX86_BUILTIN_PSRLQ128, + IX86_BUILTIN_PSLLDQI128, + /* APPLE LOCAL 591583 */ + IX86_BUILTIN_PSLLDQI128_BYTESHIFT, + IX86_BUILTIN_PSLLWI128, + IX86_BUILTIN_PSLLDI128, + IX86_BUILTIN_PSLLQI128, + IX86_BUILTIN_PSRAWI128, + IX86_BUILTIN_PSRADI128, + IX86_BUILTIN_PSRLDQI128, + /* APPLE LOCAL 591583 */ + IX86_BUILTIN_PSRLDQI128_BYTESHIFT, + IX86_BUILTIN_PSRLWI128, + IX86_BUILTIN_PSRLDI128, + IX86_BUILTIN_PSRLQI128, + + IX86_BUILTIN_PUNPCKHBW128, + IX86_BUILTIN_PUNPCKHWD128, + IX86_BUILTIN_PUNPCKHDQ128, + IX86_BUILTIN_PUNPCKHQDQ128, + IX86_BUILTIN_PUNPCKLBW128, + IX86_BUILTIN_PUNPCKLWD128, + IX86_BUILTIN_PUNPCKLDQ128, + IX86_BUILTIN_PUNPCKLQDQ128, + + IX86_BUILTIN_CLFLUSH, + IX86_BUILTIN_MFENCE, + IX86_BUILTIN_LFENCE, + + /* Prescott New Instructions. */ + IX86_BUILTIN_ADDSUBPS, + IX86_BUILTIN_HADDPS, + IX86_BUILTIN_HSUBPS, + IX86_BUILTIN_MOVSHDUP, + IX86_BUILTIN_MOVSLDUP, + IX86_BUILTIN_ADDSUBPD, + IX86_BUILTIN_HADDPD, + IX86_BUILTIN_HSUBPD, + IX86_BUILTIN_LDDQU, + + IX86_BUILTIN_MONITOR, + IX86_BUILTIN_MWAIT, + + /* Merom New Instructions. */ + IX86_BUILTIN_PHADDW, + IX86_BUILTIN_PHADDD, + IX86_BUILTIN_PHADDSW, + IX86_BUILTIN_PHSUBW, + IX86_BUILTIN_PHSUBD, + IX86_BUILTIN_PHSUBSW, + IX86_BUILTIN_PMADDUBSW, + IX86_BUILTIN_PMULHRSW, + IX86_BUILTIN_PSHUFB, + IX86_BUILTIN_PSIGNB, + IX86_BUILTIN_PSIGNW, + IX86_BUILTIN_PSIGND, + IX86_BUILTIN_PALIGNR, + IX86_BUILTIN_PABSB, + IX86_BUILTIN_PABSW, + IX86_BUILTIN_PABSD, + + IX86_BUILTIN_PHADDW128, + IX86_BUILTIN_PHADDD128, + IX86_BUILTIN_PHADDSW128, + IX86_BUILTIN_PHSUBW128, + IX86_BUILTIN_PHSUBD128, + IX86_BUILTIN_PHSUBSW128, + IX86_BUILTIN_PMADDUBSW128, + IX86_BUILTIN_PMULHRSW128, + IX86_BUILTIN_PSHUFB128, + IX86_BUILTIN_PSIGNB128, + IX86_BUILTIN_PSIGNW128, + IX86_BUILTIN_PSIGND128, + IX86_BUILTIN_PALIGNR128, + IX86_BUILTIN_PABSB128, + IX86_BUILTIN_PABSW128, + IX86_BUILTIN_PABSD128, + /* APPLE LOCAL begin 5612787 mainline sse4 */ + /* AMDFAM10 - SSE4A New Instructions. */ + IX86_BUILTIN_MOVNTSD, + IX86_BUILTIN_MOVNTSS, + IX86_BUILTIN_EXTRQI, + IX86_BUILTIN_EXTRQ, + IX86_BUILTIN_INSERTQI, + IX86_BUILTIN_INSERTQ, + + /* SSE4.1. */ + IX86_BUILTIN_BLENDPD, + IX86_BUILTIN_BLENDPS, + IX86_BUILTIN_BLENDVPD, + IX86_BUILTIN_BLENDVPS, + IX86_BUILTIN_PBLENDVB128, + IX86_BUILTIN_PBLENDW128, + + IX86_BUILTIN_DPPD, + IX86_BUILTIN_DPPS, + + IX86_BUILTIN_INSERTPS128, + + IX86_BUILTIN_MOVNTDQA, + IX86_BUILTIN_MPSADBW128, + IX86_BUILTIN_PACKUSDW128, + IX86_BUILTIN_PCMPEQQ, + IX86_BUILTIN_PHMINPOSUW128, + + IX86_BUILTIN_PMAXSB128, + IX86_BUILTIN_PMAXSD128, + IX86_BUILTIN_PMAXUD128, + IX86_BUILTIN_PMAXUW128, + + IX86_BUILTIN_PMINSB128, + IX86_BUILTIN_PMINSD128, + IX86_BUILTIN_PMINUD128, + IX86_BUILTIN_PMINUW128, + + IX86_BUILTIN_PMOVSXBW128, + IX86_BUILTIN_PMOVSXBD128, + IX86_BUILTIN_PMOVSXBQ128, + IX86_BUILTIN_PMOVSXWD128, + IX86_BUILTIN_PMOVSXWQ128, + IX86_BUILTIN_PMOVSXDQ128, + + IX86_BUILTIN_PMOVZXBW128, + IX86_BUILTIN_PMOVZXBD128, + IX86_BUILTIN_PMOVZXBQ128, + IX86_BUILTIN_PMOVZXWD128, + IX86_BUILTIN_PMOVZXWQ128, + IX86_BUILTIN_PMOVZXDQ128, + + IX86_BUILTIN_PMULDQ128, + IX86_BUILTIN_PMULLD128, + + IX86_BUILTIN_ROUNDPD, + IX86_BUILTIN_ROUNDPS, + IX86_BUILTIN_ROUNDSD, + IX86_BUILTIN_ROUNDSS, + + IX86_BUILTIN_PTESTZ, + IX86_BUILTIN_PTESTC, + IX86_BUILTIN_PTESTNZC, + /* APPLE LOCAL end 5612787 mainline sse4 */ + /* APPLE LOCAL end mainline */ + IX86_BUILTIN_VEC_INIT_V2SI, + IX86_BUILTIN_VEC_INIT_V4HI, + IX86_BUILTIN_VEC_INIT_V8QI, + IX86_BUILTIN_VEC_EXT_V2DF, + IX86_BUILTIN_VEC_EXT_V2DI, + IX86_BUILTIN_VEC_EXT_V4SF, + IX86_BUILTIN_VEC_EXT_V4SI, + IX86_BUILTIN_VEC_EXT_V8HI, + /* APPLE LOCAL begin 5612787 mainline sse4 */ + /* deletion */ + /* APPLE LOCAL end 5612787 mainline sse4 */ + IX86_BUILTIN_VEC_EXT_V2SI, + IX86_BUILTIN_VEC_EXT_V4HI, + /* APPLE LOCAL begin 5612787 mainline sse4 */ + IX86_BUILTIN_VEC_EXT_V16QI, + IX86_BUILTIN_VEC_SET_V2DI, + IX86_BUILTIN_VEC_SET_V4SF, + IX86_BUILTIN_VEC_SET_V4SI, + /* APPLE LOCAL end 5612787 mainline sse4 */ + IX86_BUILTIN_VEC_SET_V8HI, + IX86_BUILTIN_VEC_SET_V4HI, + /* APPLE LOCAL begin 5612787 mainline sse4 */ + IX86_BUILTIN_VEC_SET_V16QI, + + IX86_BUILTIN_VEC_PACK_SFIX, + + /* SSE4.2. */ + IX86_BUILTIN_CRC32QI, + IX86_BUILTIN_CRC32HI, + IX86_BUILTIN_CRC32SI, + IX86_BUILTIN_CRC32DI, + + IX86_BUILTIN_PCMPESTRI128, + IX86_BUILTIN_PCMPESTRM128, + IX86_BUILTIN_PCMPESTRA128, + IX86_BUILTIN_PCMPESTRC128, + IX86_BUILTIN_PCMPESTRO128, + IX86_BUILTIN_PCMPESTRS128, + IX86_BUILTIN_PCMPESTRZ128, + IX86_BUILTIN_PCMPISTRI128, + IX86_BUILTIN_PCMPISTRM128, + IX86_BUILTIN_PCMPISTRA128, + IX86_BUILTIN_PCMPISTRC128, + IX86_BUILTIN_PCMPISTRO128, + IX86_BUILTIN_PCMPISTRS128, + IX86_BUILTIN_PCMPISTRZ128, + + IX86_BUILTIN_PCMPGTQ, + + /* TFmode support builtins. */ + IX86_BUILTIN_INFQ, + IX86_BUILTIN_FABSQ, + IX86_BUILTIN_COPYSIGNQ, + /* APPLE LOCAL end 5612787 mainline sse4 */ + + IX86_BUILTIN_MAX +}; + +/* LLVM_TARGET_INTRINSIC_PREFIX - Specify what prefix this target uses for its + * intrinsics. + */ +#define LLVM_TARGET_INTRINSIC_PREFIX "x86" + +/* LLVM_TARGET_NAME - This specifies the name of the target, which correlates to + * the llvm::InitializeXXXTarget() function. + */ +#define LLVM_TARGET_NAME X86 + +/* Turn -march=xx into a CPU type. + */ +#define LLVM_SET_SUBTARGET_FEATURES(F) \ + { if (TARGET_MACHO && ! strcmp (ix86_arch_string, "apple")) \ + F.setCPU(TARGET_64BIT ? "core2" : "yonah"); \ + else \ + F.setCPU(ix86_arch_string); \ + if (TARGET_64BIT) F.AddFeature("64bit"); \ + if (TARGET_MMX) F.AddFeature("mmx"); \ + else if (target_flags_explicit & MASK_MMX) F.AddFeature("mmx", false); \ + if (TARGET_SSE) F.AddFeature("sse"); \ + else if (target_flags_explicit & MASK_SSE) F.AddFeature("sse", false); \ + if (TARGET_SSE2) F.AddFeature("sse2"); \ + else if (target_flags_explicit & MASK_SSE2) F.AddFeature("sse2", false); \ + if (TARGET_SSE3) F.AddFeature("sse3"); \ + else if (target_flags_explicit & MASK_SSE3) F.AddFeature("sse3", false); \ + if (TARGET_SSSE3) F.AddFeature("ssse3"); \ + if (TARGET_SSE4_1) F.AddFeature("sse41"); \ + if (TARGET_SSE4_2) F.AddFeature("sse42"); \ + if (TARGET_3DNOW) F.AddFeature("3dnow"); \ + if (TARGET_3DNOW_A) F.AddFeature("3dnowa"); \ + } + +#define LLVM_SET_IMPLICIT_FLOAT(flag_no_implicit_float) \ + if (!TARGET_80387) \ + flag_no_implicit_float = 1; \ + else \ + flag_no_implicit_float = 0; + +/* LLVM ABI definition macros. */ + +/* When -m64 is specified, set the architecture to x86_64-os-blah even if the + * compiler was configured for i[3456]86-os-blah. + */ +#define LLVM_OVERRIDE_TARGET_ARCH() \ + (TARGET_64BIT ? "x86_64" : "i386") + +/* LLVM_TARGET_INTRINSIC_LOWER - To handle builtins, we want to expand the + * invocation into normal LLVM code. If the target can handle the builtin, this + * macro should call the target TreeToLLVM::TargetIntrinsicLower method and + * return true.This macro is invoked from a method in the TreeToLLVM class. + */ +#define LLVM_TARGET_INTRINSIC_LOWER(EXP, BUILTIN_CODE, DESTLOC, RESULT, \ + DESTTY, OPS) \ + TargetIntrinsicLower(EXP, BUILTIN_CODE, DESTLOC, RESULT, DESTTY, OPS); + +/* When extracting a register name for a constraint, use the string extracted + from the magic symbol built for that register, rather than reg_names. + The latter maps both AH and AL to the same thing, which means we can't + distinguish them. */ +#define LLVM_DO_NOT_USE_REG_NAMES + #endif /* LLVM_I386_TARGET_H */ From baldrick at free.fr Tue Jul 21 06:07:59 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 11:07:59 -0000 Subject: [llvm-commits] [gcc-plugin] r76567 - /gcc-plugin/trunk/i386/llvm-i386.cpp Message-ID: <200907211107.n6LB7xim022541@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 06:07:46 2009 New Revision: 76567 URL: http://llvm.org/viewvc/llvm-project?rev=76567&view=rev Log: Rearrange headers to something that works with gcc mainline (which is much more picky than gcc-4.2). Get rid of the use of "%H" in error lines: use error_at instead. Modified: gcc-plugin/trunk/i386/llvm-i386.cpp Modified: gcc-plugin/trunk/i386/llvm-i386.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/i386/llvm-i386.cpp?rev=76567&r1=76566&r2=76567&view=diff ============================================================================== --- gcc-plugin/trunk/i386/llvm-i386.cpp (original) +++ gcc-plugin/trunk/i386/llvm-i386.cpp Tue Jul 21 06:07:46 2009 @@ -23,18 +23,30 @@ // This is a C++ source file that implements specific llvm IA-32 ABI. //===----------------------------------------------------------------------===// -#include "llvm-abi.h" -#include "llvm-internal.h" +// LLVM headers #include "llvm/DerivedTypes.h" #include "llvm/Instructions.h" #include "llvm/Intrinsics.h" #include "llvm/LLVMContext.h" #include "llvm/Module.h" -#include "llvm-i386-target.h" +// GCC headers +#undef VISIBILITY_HIDDEN +#define IN_GCC + +#include "config.h" extern "C" { -#include "toplev.h" +#include "system.h" } +#include "coretypes.h" +#include "target.h" +#include "toplev.h" +#include "tree.h" + +// Plugin headers +#include "llvm-abi.h" +#include "llvm-internal.h" +#include "llvm-target.h" static LLVMContext &Context = getGlobalContext(); @@ -147,7 +159,7 @@ ((EV & 0x03) >> 0), ((EV & 0x0c) >> 2), ((EV & 0x30) >> 4)+4, ((EV & 0xc0) >> 6)+4); } else { - error("%Hmask must be an immediate", &EXPR_LOCATION(exp)); + error_at(EXPR_LOCATION(exp), "mask must be an immediate"); Result = Ops[0]; } return true; @@ -157,7 +169,7 @@ Result = BuildVectorShuffle(Ops[0], Ops[1], ((EV & 0x01) >> 0), ((EV & 0x02) >> 1)+2); } else { - error("%Hmask must be an immediate", &EXPR_LOCATION(exp)); + error_at(EXPR_LOCATION(exp), "mask must be an immediate"); Result = Ops[0]; } return true; @@ -169,7 +181,7 @@ ((EV & 0x03) >> 0), ((EV & 0x0c) >> 2), ((EV & 0x30) >> 4), ((EV & 0xc0) >> 6)); } else { - error("%Hmask must be an immediate", &EXPR_LOCATION(exp)); + error_at(EXPR_LOCATION(exp), "mask must be an immediate"); Result = Ops[0]; } return true; @@ -191,7 +203,7 @@ ((EV & 0x30) >> 4), ((EV & 0xc0) >> 6), 4, 5, 6, 7); } else { - error("%Hmask must be an immediate", &EXPR_LOCATION(exp)); + error_at(EXPR_LOCATION(exp), "mask must be an immediate"); Result = Ops[0]; } From baldrick at free.fr Tue Jul 21 07:20:13 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 12:20:13 -0000 Subject: [llvm-commits] [gcc-plugin] r76568 - /gcc-plugin/trunk/llvm-abi.h Message-ID: <200907211220.n6LCKLq0024973@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 07:19:45 2009 New Revision: 76568 URL: http://llvm.org/viewvc/llvm-project?rev=76568&view=rev Log: Include the target (in llvm-gcc it is included automatically when you include tm.h, but that is not possible here). Modified: gcc-plugin/trunk/llvm-abi.h Modified: gcc-plugin/trunk/llvm-abi.h URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-abi.h?rev=76568&r1=76567&r2=76568&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-abi.h (original) +++ gcc-plugin/trunk/llvm-abi.h Tue Jul 21 07:19:45 2009 @@ -29,6 +29,7 @@ #define LLVM_ABI_H #include "llvm-internal.h" +#include "llvm-target.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Attributes.h" @@ -1125,4 +1126,4 @@ } }; -#endif +#endif /* LLVM_ABI_H */ From baldrick at free.fr Tue Jul 21 07:22:27 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 12:22:27 -0000 Subject: [llvm-commits] [gcc-plugin] r76569 - /gcc-plugin/trunk/llvm-backend.cpp Message-ID: <200907211222.n6LCMR4N025090@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 07:22:25 2009 New Revision: 76569 URL: http://llvm.org/viewvc/llvm-project?rev=76569&view=rev Log: Determine the target from the target header. Turn off subfeatures for the moment (doesn't compile). Modified: gcc-plugin/trunk/llvm-backend.cpp Modified: gcc-plugin/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76569&r1=76568&r2=76569&view=diff ============================================================================== --- gcc-plugin/trunk/llvm-backend.cpp (original) +++ gcc-plugin/trunk/llvm-backend.cpp Tue Jul 21 07:22:25 2009 @@ -87,6 +87,7 @@ // Plugin headers #include "llvm-internal.h" #include "llvm-debug.h" +#include "llvm-target.h" //TODO#include "llvm-file-ostream.h" #include "bits_and_bobs.h" @@ -346,9 +347,6 @@ } } -// FIXME: For the moment, all the world's an x86 -#define LLVM_TARGET_NAME X86 - #ifndef LLVM_TARGET_NAME #error LLVM_TARGET_NAME macro not specified by GCC backend #endif @@ -496,13 +494,13 @@ // Figure out the subtarget feature string we pass to the target. std::string FeatureStr; - // The target can set LLVM_SET_SUBTARGET_FEATURES to configure the LLVM - // backend. -#ifdef LLVM_SET_SUBTARGET_FEATURES - SubtargetFeatures Features; - LLVM_SET_SUBTARGET_FEATURES(Features); - FeatureStr = Features.getString(); -#endif +//TODO // The target can set LLVM_SET_SUBTARGET_FEATURES to configure the LLVM +//TODO // backend. +//TODO#ifdef LLVM_SET_SUBTARGET_FEATURES +//TODO SubtargetFeatures Features; +//TODO LLVM_SET_SUBTARGET_FEATURES(Features); +//TODO FeatureStr = Features.getString(); +//TODO#endif TheTarget = TME->createTargetMachine(*TheModule, FeatureStr); assert(TheTarget->getTargetData()->isBigEndian() == BYTES_BIG_ENDIAN); From baldrick at free.fr Tue Jul 21 07:24:11 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 12:24:11 -0000 Subject: [llvm-commits] [gcc-plugin] r76570 - /gcc-plugin/trunk/i386/llvm-i386-target.h Message-ID: <200907211224.n6LCOBTt025167@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 07:24:08 2009 New Revision: 76570 URL: http://llvm.org/viewvc/llvm-project?rev=76570&view=rev Log: Correct a linkage type. Rename contains_128bit_aligned_vector_p to contains_aligned_value_p, like in gcc mainline (doesn't help much though because this is a static function in mainline). Modified: gcc-plugin/trunk/i386/llvm-i386-target.h Modified: gcc-plugin/trunk/i386/llvm-i386-target.h URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/i386/llvm-i386-target.h?rev=76570&r1=76569&r2=76570&view=diff ============================================================================== --- gcc-plugin/trunk/i386/llvm-i386-target.h (original) +++ gcc-plugin/trunk/i386/llvm-i386-target.h Tue Jul 21 07:24:08 2009 @@ -45,7 +45,7 @@ `inreg` parameter attribute */ #define LLVM_TARGET_ENABLE_REGPARM -extern int ix86_regparm; +extern "C" int ix86_regparm; #define LLVM_TARGET_INIT_REGPARM(local_regparm, local_fp_regparm, type) \ { \ @@ -99,10 +99,10 @@ /* On x86-32 objects containing SSE vectors are 16 byte aligned, everything else 4. On x86-64 vectors are 8-byte aligned, everything else can be figured out by the back end. */ -extern "C" bool contains_128bit_aligned_vector_p(tree); +extern "C" bool contains_aligned_value_p(tree); #define LLVM_BYVAL_ALIGNMENT(T) \ (TARGET_64BIT ? (TREE_CODE(T)==VECTOR_TYPE ? 8 : 0) : \ - TARGET_SSE && contains_128bit_aligned_vector_p(T) ? 16 : 4) + TARGET_SSE && contains_aligned_value_p(T) ? 16 : 4) extern tree llvm_x86_should_return_selt_struct_as_scalar(tree); From baldrick at free.fr Tue Jul 21 07:25:43 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 12:25:43 -0000 Subject: [llvm-commits] [gcc-plugin] r76571 - /gcc-plugin/trunk/bits_and_bobs.cpp Message-ID: <200907211225.n6LCPiXL025218@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 07:25:34 2009 New Revision: 76571 URL: http://llvm.org/viewvc/llvm-project?rev=76571&view=rev Log: These routines are all declared as static in gcc mainline - need to figure out how best to get at the info they provide. Modified: gcc-plugin/trunk/bits_and_bobs.cpp Modified: gcc-plugin/trunk/bits_and_bobs.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/bits_and_bobs.cpp?rev=76571&r1=76570&r2=76571&view=diff ============================================================================== --- gcc-plugin/trunk/bits_and_bobs.cpp (original) +++ gcc-plugin/trunk/bits_and_bobs.cpp Tue Jul 21 07:25:34 2009 @@ -41,3 +41,21 @@ void llvmEraseLType(const Type *Ty) { abort(); } + +int ix86_regparm; + +extern "C" bool contains_aligned_value_p (tree type) { +abort(); +} + +extern "C" enum machine_mode ix86_getNaturalModeForType(tree type) { +abort(); +} + +extern "C" int ix86_HowToPassArgument(...) { +abort(); +} + +extern "C" int ix86_ClassifyArgument(...) { +abort(); +} From baldrick at free.fr Tue Jul 21 07:30:48 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 21 Jul 2009 12:30:48 -0000 Subject: [llvm-commits] [gcc-plugin] r76572 - in /gcc-plugin/trunk: Makefile llvm-target.cpp llvm-target.h Message-ID: <200907211230.n6LCUxbn025390@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 21 07:30:26 2009 New Revision: 76572 URL: http://llvm.org/viewvc/llvm-project?rev=76572&view=rev Log: For the moment, determine the target by symbolically linking to the right files (ugh!). Added: gcc-plugin/trunk/llvm-target.cpp (with props) gcc-plugin/trunk/llvm-target.h (with props) Modified: gcc-plugin/trunk/Makefile Modified: gcc-plugin/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/Makefile?rev=76572&r1=76571&r2=76572&view=diff ============================================================================== --- gcc-plugin/trunk/Makefile (original) +++ gcc-plugin/trunk/Makefile Tue Jul 21 07:30:26 2009 @@ -1,5 +1,5 @@ C_SOURCE_FILES=llvm-cache.c -CPP_SOURCE_FILES=llvm-convert.cpp llvm-backend.cpp llvm-debug.cpp llvm-types.cpp bits_and_bobs.cpp +CPP_SOURCE_FILES=llvm-convert.cpp llvm-backend.cpp llvm-debug.cpp llvm-target.cpp llvm-types.cpp bits_and_bobs.cpp PLUGIN_OBJECT_FILES=$(C_SOURCE_FILES:.c=.o) $(CPP_SOURCE_FILES:.cpp=.o) #GCCPLUGIN_DIR:=$(shell $(GCC) -print-file-name=plugin) Added: gcc-plugin/trunk/llvm-target.cpp URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-target.cpp?rev=76572&view=auto ============================================================================== --- gcc-plugin/trunk/llvm-target.cpp (added) +++ gcc-plugin/trunk/llvm-target.cpp Tue Jul 21 07:30:26 2009 @@ -0,0 +1 @@ +link i386/llvm-i386.cpp \ No newline at end of file Propchange: gcc-plugin/trunk/llvm-target.cpp ------------------------------------------------------------------------------ svn:special = * Added: gcc-plugin/trunk/llvm-target.h URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-target.h?rev=76572&view=auto ============================================================================== --- gcc-plugin/trunk/llvm-target.h (added) +++ gcc-plugin/trunk/llvm-target.h Tue Jul 21 07:30:26 2009 @@ -0,0 +1 @@ +link i386/llvm-i386-target.h \ No newline at end of file Propchange: gcc-plugin/trunk/llvm-target.h ------------------------------------------------------------------------------ svn:special = * From dgregor at apple.com Tue Jul 21 10:04:57 2009 From: dgregor at apple.com (Douglas Gregor) Date: Tue, 21 Jul 2009 08:04:57 -0700 Subject: [llvm-commits] [PATCH] StringRef class. In-Reply-To: <6a8523d60907201705y5221663bi48a2042bdeb5bc58@mail.gmail.com> References: <6a8523d60907201705y5221663bi48a2042bdeb5bc58@mail.gmail.com> Message-ID: On Jul 20, 2009, at 5:05 PM, Daniel Dunbar wrote: > Hi, > > The attached patch provides a new StringRef helper class, which is > used to represent a constant string (pointer & length) which is not > owned. Very nice. A few nitpicks: + bool operator==(const StringRef &RHS) const { return compare(RHS) == 0; } + + bool operator!=(const StringRef &RHS) const { return compare(RHS) != 0; } + + bool operator<(const StringRef &RHS) const { return compare(RHS) == -1; } One gets more uniform conversions for the left- and right-hand arguments if these are written as friend function definitions, e.g., friend bool operator==(const StringRef& LHS, const StringRef &RHS) { return LHS.compare(RHS) == 0; } Also, for the concatenation operators, one can make them slightly more efficient with, e.g., inline std::string operator+(std::string LHS, const StringRef &RHS) { LHS.append(RHS.begin(), RHS.end()); return LHS; } That eliminates one unnecessary temporary (RHS.str()), and in some cases allows copy elision when passing a parameter to LHS. It probably doesn't matter much. > The downside is that combining unowned memory and implicit > construction provides some opportunities for shooting oneself in the > foot. To mitigate this risk, the general idiom is that one should > generally avoid explicitly naming the StringRef and only use it as a > compiler generated temporary. Storage of a StringRef should be limited > to contexts when the reference strings are available in some long term > storage (like a MemoryBuffer). Overall I think this is a good > compromise, and will allow us to have cleaner, more uniform, and > somewhat more efficient APIs, with a minimum of risk. I'm not particularly concerned by this downside, since LLVM doesn't perform *that* much string manipulation. - Doug From clattner at apple.com Tue Jul 21 10:23:09 2009 From: clattner at apple.com (Chris Lattner) Date: Tue, 21 Jul 2009 08:23:09 -0700 Subject: [llvm-commits] [llvm] r76536 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td In-Reply-To: <981121B8-E9AF-4CE2-A73C-C711B0EB85B1@apple.com> References: <200907210600.n6L60JhT031982@zion.cs.uiuc.edu> <981121B8-E9AF-4CE2-A73C-C711B0EB85B1@apple.com> Message-ID: <6B41AA07-D745-48FD-8725-EB0BA623BA18@apple.com> On Jul 21, 2009, at 2:09 AM, Evan Cheng wrote: > > On Jul 20, 2009, at 11:27 PM, Chris Lattner wrote: > >> >> On Jul 20, 2009, at 11:00 PM, Evan Cheng wrote: >> >>> Author: evancheng >>> Date: Tue Jul 21 01:00:18 2009 >>> New Revision: 76536 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=76536&view=rev >>> Log: >>> Add jumps with 8-bit relocation for assembler / disassembler. Patch >>> by Sean Callanan. >> >> Very nice, thanks Sean. Doesn't Sean have commit access? > > Sean does. I think he is just too nice so he allows us to review his > patches first. :-) I'm just suggesting that you say "ok" and let sean commit them :) -Chris From clattner at apple.com Tue Jul 21 11:25:43 2009 From: clattner at apple.com (Chris Lattner) Date: Tue, 21 Jul 2009 09:25:43 -0700 Subject: [llvm-commits] [llvm] r76555 - /llvm/trunk/lib/Target/MSIL/MSILWriter.h In-Reply-To: <200907210858.n6L8wtgP013572@zion.cs.uiuc.edu> References: <200907210858.n6L8wtgP013572@zion.cs.uiuc.edu> Message-ID: <3F7BCDA7-B85A-4C00-8D16-01ECC2BCFD04@apple.com> On Jul 21, 2009, at 1:58 AM, Daniel Dunbar wrote: > Author: ddunbar > Date: Tue Jul 21 03:58:44 2009 > New Revision: 76555 > > URL: http://llvm.org/viewvc/llvm-project?rev=76555&view=rev > Log: > Add missing include. Not that it matters that much, but I think this can be a forward decl. -Chris > > Modified: > llvm/trunk/lib/Target/MSIL/MSILWriter.h > > Modified: llvm/trunk/lib/Target/MSIL/MSILWriter.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSIL/MSILWriter.h?rev=76555&r1=76554&r2=76555&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Target/MSIL/MSILWriter.h (original) > +++ llvm/trunk/lib/Target/MSIL/MSILWriter.h Tue Jul 21 03:58:44 2009 > @@ -19,6 +19,7 @@ > #include "llvm/IntrinsicInst.h" > #include "llvm/Pass.h" > #include "llvm/PassManager.h" > +#include "llvm/ADT/StringRef.h" > #include "llvm/Analysis/FindUsedTypes.h" > #include "llvm/Analysis/LoopInfo.h" > #include "llvm/Support/FormattedStream.h" > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From clattner at apple.com Tue Jul 21 11:26:23 2009 From: clattner at apple.com (Chris Lattner) Date: Tue, 21 Jul 2009 09:26:23 -0700 Subject: [llvm-commits] [llvm] r76558 - in /llvm/trunk: lib/CodeGen/VirtRegRewriter.cpp test/CodeGen/X86/2009-07-21-RewriterBug.ll In-Reply-To: <200907210915.n6L9Fe27018490@zion.cs.uiuc.edu> References: <200907210915.n6L9Fe27018490@zion.cs.uiuc.edu> Message-ID: <3085B6C3-CAF7-4E9B-9FDA-5540E8D1BF40@apple.com> On Jul 21, 2009, at 2:15 AM, Evan Cheng wrote: > Author: evancheng > Date: Tue Jul 21 04:15:00 2009 > New Revision: 76558 > > URL: http://llvm.org/viewvc/llvm-project?rev=76558&view=rev > Log: > Another rewriter bug exposed by recent coalescer changes. > ReuseInfo::GetRegForReload() should make sure the "switched" > register is in the desired register class. I'm surprised this hasn't > caused more failures in the past. Thanks Evan, can you reduce this testcase though? It is huge, and doesn't appear to have been run through bugpoint. -Chris From sabre at nondot.org Tue Jul 21 11:45:00 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 16:45:00 -0000 Subject: [llvm-commits] [llvm] r76578 - /llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp Message-ID: <200907211645.n6LGj1L9001086@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 11:44:47 2009 New Revision: 76578 URL: http://llvm.org/viewvc/llvm-project?rev=76578&view=rev Log: some simple whitespace cleanup, avoid copying vectors for no reason as much, etc. Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp?rev=76578&r1=76577&r2=76578&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp Tue Jul 21 11:44:47 2009 @@ -64,7 +64,7 @@ SectionFlags::Code); // Start the Code Section. O << "\n"; - SwitchToSection (fCodeSection); + SwitchToSection(fCodeSection); // Emit the frame address of the function at the beginning of code. O << "\tretlw low(" << PAN::getFrameLabel(CurrentFnName) << ")\n"; @@ -190,7 +190,7 @@ /// One task that we do here is to sectionize all global variables. /// The MemSelOptimizer pass depends on the sectionizing. /// -bool PIC16AsmPrinter::doInitialization (Module &M) { +bool PIC16AsmPrinter::doInitialization(Module &M) { bool Result = AsmPrinter::doInitialization(M); // FIXME:: This is temporary solution to generate the include file. @@ -218,7 +218,7 @@ /// global declarations for function defined in this module and which are /// available to other modules. /// -void PIC16AsmPrinter::EmitFunctionDecls (Module &M) { +void PIC16AsmPrinter::EmitFunctionDecls(Module &M) { // Emit declarations for external functions. O <<"\n"<getCommentString() << "Function Declarations - BEGIN." <<"\n"; for (Module::iterator I = M.begin(), E = M.end(); I != E; I++) { @@ -230,7 +230,7 @@ if (Name.find("llvm.") != std::string::npos) continue; - if (! (I->isDeclaration() || I->hasExternalLinkage())) + if (!I->isDeclaration() && !I->hasExternalLinkage()) continue; const char *directive = I->isDeclaration() ? TAI->getExternDirective() : @@ -245,10 +245,9 @@ } // Emit variables imported from other Modules. -void PIC16AsmPrinter::EmitUndefinedVars (Module &M) -{ +void PIC16AsmPrinter::EmitUndefinedVars(Module &M) { std::vector Items = PTAI->ExternalVarDecls->Items; - if (! Items.size()) return; + if (!Items.size()) return; O << "\n" << TAI->getCommentString() << "Imported Variables - BEGIN" << "\n"; for (unsigned j = 0; j < Items.size(); j++) { @@ -258,10 +257,9 @@ } // Emit variables defined in this module and are available to other modules. -void PIC16AsmPrinter::EmitDefinedVars (Module &M) -{ +void PIC16AsmPrinter::EmitDefinedVars(Module &M) { std::vector Items = PTAI->ExternalVarDefs->Items; - if (! Items.size()) return; + if (!Items.size()) return; O << "\n" << TAI->getCommentString() << "Exported Variables - BEGIN" << "\n"; for (unsigned j = 0; j < Items.size(); j++) { @@ -271,13 +269,12 @@ } // Emit initialized data placed in ROM. -void PIC16AsmPrinter::EmitRomData (Module &M) -{ +void PIC16AsmPrinter::EmitRomData(Module &M) { // Print ROM Data section. - std::vector ROSections = PTAI->ROSections; + const std::vector &ROSections = PTAI->ROSections; for (unsigned i = 0; i < ROSections.size(); i++) { - std::vector Items = ROSections[i]->Items; - if (! Items.size()) continue; + const std::vector &Items = ROSections[i]->Items; + if (!Items.size()) continue; O << "\n"; SwitchToSection(PTAI->ROSections[i]->S_); for (unsigned j = 0; j < Items.size(); j++) { @@ -339,14 +336,14 @@ // Emit temporary space int TempSize = PTLI->GetTmpSize(); - if (TempSize > 0 ) - O << PAN::getTempdataLabel(CurrentFnName) << " RES " << TempSize <<"\n"; + if (TempSize > 0) + O << PAN::getTempdataLabel(CurrentFnName) << " RES " << TempSize << '\n'; } -void PIC16AsmPrinter::EmitIData (Module &M) { +void PIC16AsmPrinter::EmitIData(Module &M) { // Print all IDATA sections. - std::vector IDATASections = PTAI->IDATASections; + const std::vector &IDATASections = PTAI->IDATASections; for (unsigned i = 0; i < IDATASections.size(); i++) { O << "\n"; if (IDATASections[i]->S_->getName().find("llvm.") != std::string::npos) @@ -363,11 +360,11 @@ } } -void PIC16AsmPrinter::EmitUData (Module &M) { +void PIC16AsmPrinter::EmitUData(Module &M) { const TargetData *TD = TM.getTargetData(); // Print all BSS sections. - std::vector BSSSections = PTAI->BSSSections; + const std::vector &BSSSections = PTAI->BSSSections; for (unsigned i = 0; i < BSSSections.size(); i++) { O << "\n"; SwitchToSection(BSSSections[i]->S_); @@ -378,28 +375,25 @@ const Type *Ty = C->getType(); unsigned Size = TD->getTypeAllocSize(Ty); - O << Name << " " <<"RES"<< " " << Size ; - O << "\n"; + O << Name << " RES " << Size << "\n"; } } } -void PIC16AsmPrinter::EmitAutos (std::string FunctName) -{ +void PIC16AsmPrinter::EmitAutos(std::string FunctName) { // Section names for all globals are already set. - const TargetData *TD = TM.getTargetData(); // Now print Autos section for this function. std::string SectionName = PAN::getAutosSectionName(FunctName); - std::vector AutosSections = PTAI->AutosSections; + const std::vector &AutosSections = PTAI->AutosSections; for (unsigned i = 0; i < AutosSections.size(); i++) { O << "\n"; if (AutosSections[i]->S_->getName() == SectionName) { // Set the printing status to true AutosSections[i]->setPrintedStatus(true); SwitchToSection(AutosSections[i]->S_); - std::vector Items = AutosSections[i]->Items; + const std::vector &Items = AutosSections[i]->Items; for (unsigned j = 0; j < Items.size(); j++) { std::string VarName = Mang->getMangledName(Items[j]); Constant *C = Items[j]->getInitializer(); @@ -415,8 +409,7 @@ // Print autos that were not printed during the code printing of functions. // As the functions might themselves would have got deleted by the optimizer. -void PIC16AsmPrinter::EmitRemainingAutos() -{ +void PIC16AsmPrinter::EmitRemainingAutos() { const TargetData *TD = TM.getTargetData(); // Now print Autos section for this function. @@ -432,7 +425,7 @@ O << "\n"; SwitchToSection(AutosSections[i]->S_); - std::vector Items = AutosSections[i]->Items; + const std::vector &Items = AutosSections[i]->Items; for (unsigned j = 0; j < Items.size(); j++) { std::string VarName = Mang->getMangledName(Items[j]); Constant *C = Items[j]->getInitializer(); From sabre at nondot.org Tue Jul 21 11:48:32 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 16:48:32 -0000 Subject: [llvm-commits] [llvm] r76579 - /llvm/trunk/test/CodeGen/PIC16/globals.ll Message-ID: <200907211648.n6LGmYgP001200@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 11:48:20 2009 New Revision: 76579 URL: http://llvm.org/viewvc/llvm-project?rev=76579&view=rev Log: add a testcase for the pic16 section handling stuff. Added: llvm/trunk/test/CodeGen/PIC16/globals.ll Added: llvm/trunk/test/CodeGen/PIC16/globals.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PIC16/globals.ll?rev=76579&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/PIC16/globals.ll (added) +++ llvm/trunk/test/CodeGen/PIC16/globals.ll Tue Jul 21 11:48:20 2009 @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | llc -march=pic16 | FileCheck %s + + at G1 = global i32 4712, section "Address=412" +; CHECK: @G1.412.idata.0.# IDATA 412 +; CHECK: @G1 dl 4712 + + at G2 = global i32 0, section "Address=412" +; CHECK: @G2.412.udata.0.# UDATA 412 +; CHECK: @G2 RES 4 + + at G3 = addrspace(1) constant i32 4712, section "Address=412" +; CHECK: @G3.412.romdata.1.# ROMDATA 412 +; CHECK: @G3 rom_dl 4712 + + From devang.patel at gmail.com Tue Jul 21 11:51:40 2009 From: devang.patel at gmail.com (Devang Patel) Date: Tue, 21 Jul 2009 09:51:40 -0700 Subject: [llvm-commits] patch: mdnode .bc format change In-Reply-To: <4A655324.9020902@mxc.ca> References: <4A4ED86B.6000007@mxc.ca> <352a1fb20907201713p799a59b3i8ab66e9c47446058@mail.gmail.com> <4A655324.9020902@mxc.ca> Message-ID: <352a1fb20907210951r50f84ca5u54a4abdd2dbf9842@mail.gmail.com> On Mon, Jul 20, 2009 at 10:33 PM, Nick Lewycky wrote: >> - Reusing ConstantPlaceHolder for Metadata is not a good idea, I've >> doubts that this will work. ConstantPlaceHolder is meant for >> ConstExprs. > > It works fine :) If you like I can refactor it into a > MetadataPlaceHolder, but I don't see the benefit. What in particular are > you worried about (ie. why does it matter that ConstantPlaceHolder was > meant for ConstExprs)? I don't think dyn_cast(CPH) would work where CPH is ConstantPlaceHolder. Anyway, we are moving away from Constants from metadata, so this is mute. >> I am moving in a direction where metadata is not derived from >> Constant. I will introduce new block in bitcode to hold metadata >> strings and nodes. > > Okay. I assume this goes with removing the uniqueness property from MDNode? No. - Devang From evan.cheng at apple.com Tue Jul 21 12:06:19 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 10:06:19 -0700 Subject: [llvm-commits] [llvm] r76558 - in /llvm/trunk: lib/CodeGen/VirtRegRewriter.cpp test/CodeGen/X86/2009-07-21-RewriterBug.ll In-Reply-To: <3085B6C3-CAF7-4E9B-9FDA-5540E8D1BF40@apple.com> References: <200907210915.n6L9Fe27018490@zion.cs.uiuc.edu> <3085B6C3-CAF7-4E9B-9FDA-5540E8D1BF40@apple.com> Message-ID: <50706115-8D6B-4A69-9B2D-879C161C7CB5@apple.com> On Jul 21, 2009, at 9:26 AM, Chris Lattner wrote: > > On Jul 21, 2009, at 2:15 AM, Evan Cheng wrote: > >> Author: evancheng >> Date: Tue Jul 21 04:15:00 2009 >> New Revision: 76558 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=76558&view=rev >> Log: >> Another rewriter bug exposed by recent coalescer changes. >> ReuseInfo::GetRegForReload() should make sure the "switched" >> register is in the desired register class. I'm surprised this hasn't >> caused more failures in the past. > > Thanks Evan, can you reduce this testcase though? It is huge, and > doesn't appear to have been run through bugpoint. That's a bugpoint reduced test case. I can't reduce it any further. Evan > > -Chris > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Tue Jul 21 12:20:34 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 17:20:34 -0000 Subject: [llvm-commits] [llvm] r76585 - in /llvm/trunk/lib/Target/PIC16: PIC16AsmPrinter.cpp PIC16TargetAsmInfo.cpp PIC16TargetAsmInfo.h Message-ID: <200907211720.n6LHKZ18002491@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 12:20:18 2009 New Revision: 76585 URL: http://llvm.org/viewvc/llvm-project?rev=76585&view=rev Log: more random whitespace cleanup, eliminate #define, avoid copying vectors needlessly, doxygenify comments, improve constness, etc. Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp?rev=76585&r1=76584&r2=76585&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp Tue Jul 21 12:20:18 2009 @@ -261,7 +261,7 @@ std::vector Items = PTAI->ExternalVarDefs->Items; if (!Items.size()) return; - O << "\n" << TAI->getCommentString() << "Exported Variables - BEGIN" << "\n"; + O << "\n" << TAI->getCommentString() << "Exported Variables - BEGIN" << "\n"; for (unsigned j = 0; j < Items.size(); j++) { O << TAI->getGlobalDirective() << Mang->getMangledName(Items[j]) << "\n"; } Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp?rev=76585&r1=76584&r2=76585&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp Tue Jul 21 12:20:18 2009 @@ -73,9 +73,9 @@ const Section * PIC16TargetAsmInfo::getBSSSectionForGlobal(const GlobalVariable *GV) const { - assert (GV->hasInitializer() && "This global doesn't need space"); + assert(GV->hasInitializer() && "This global doesn't need space"); Constant *C = GV->getInitializer(); - assert (C->isNullValue() && "Unitialized globals has non-zero initializer"); + assert(C->isNullValue() && "Unitialized globals has non-zero initializer"); // Find how much space this global needs. const TargetData *TD = TM.getTargetData(); @@ -93,9 +93,9 @@ } // No BSS section spacious enough was found. Crate a new one. - if (! FoundBSS) { + if (!FoundBSS) { std::string name = PAN::getUdataSectionName(BSSSections.size()); - const Section *NewSection = getNamedSection (name.c_str()); + const Section *NewSection = getNamedSection(name.c_str()); FoundBSS = new PIC16Section(NewSection); @@ -106,21 +106,16 @@ // Insert the GV into this BSS. FoundBSS->Items.push_back(GV); FoundBSS->Size += ValSize; - - // We can't do this here because GV is const . - // const std::string SName = FoundBSS->S_->getName(); - // GV->setSection(SName); - return FoundBSS->S_; } const Section * PIC16TargetAsmInfo::getIDATASectionForGlobal(const GlobalVariable *GV) const { - assert (GV->hasInitializer() && "This global doesn't need space"); + assert(GV->hasInitializer() && "This global doesn't need space"); Constant *C = GV->getInitializer(); - assert (!C->isNullValue() && "initialized globals has zero initializer"); - assert (GV->getType()->getAddressSpace() == PIC16ISD::RAM_SPACE && - "can split initialized RAM data only"); + assert(!C->isNullValue() && "initialized globals has zero initializer"); + assert(GV->getType()->getAddressSpace() == PIC16ISD::RAM_SPACE && + "can split initialized RAM data only"); // Find how much space this global needs. const TargetData *TD = TM.getTargetData(); @@ -131,16 +126,16 @@ // to the first available section having enough space. PIC16Section *FoundIDATA = NULL; for (unsigned i = 0; i < IDATASections.size(); i++) { - if ( DataBankSize - IDATASections[i]->Size >= ValSize) { + if (DataBankSize - IDATASections[i]->Size >= ValSize) { FoundIDATA = IDATASections[i]; break; } } // No IDATA section spacious enough was found. Crate a new one. - if (! FoundIDATA) { + if (!FoundIDATA) { std::string name = PAN::getIdataSectionName(IDATASections.size()); - const Section *NewSection = getNamedSection (name.c_str()); + const Section *NewSection = getNamedSection(name.c_str()); FoundIDATA = new PIC16Section(NewSection); @@ -151,10 +146,6 @@ // Insert the GV into this IDATA. FoundIDATA->Items.push_back(GV); FoundIDATA->Size += ValSize; - - // We can't do this here because GV is const . - // GV->setSection(FoundIDATA->S->getName()); - return FoundIDATA->S_; } @@ -169,15 +160,15 @@ // to the appropriate section. PIC16Section *FoundAutoSec = NULL; for (unsigned i = 0; i < AutosSections.size(); i++) { - if ( AutosSections[i]->S_->getName() == name) { + if (AutosSections[i]->S_->getName() == name) { FoundAutoSec = AutosSections[i]; break; } } // No Auto section was found. Crate a new one. - if (! FoundAutoSec) { - const Section *NewSection = getNamedSection (name.c_str()); + if (!FoundAutoSec) { + const Section *NewSection = getNamedSection(name.c_str()); FoundAutoSec = new PIC16Section(NewSection); @@ -199,7 +190,6 @@ // We select the section based on the initializer here, so it really // has to be a GlobalVariable. const GlobalVariable *GV = dyn_cast(GV1); - if (!GV) return TargetAsmInfo::SelectSectionForGlobal(GV1); @@ -209,7 +199,7 @@ return ExternalVarDecls->S_; } - assert (GV->hasInitializer() && "A def without initializer?"); + assert(GV->hasInitializer() && "A def without initializer?"); // First, if this is an automatic variable for a function, get the section // name for it and return. @@ -308,9 +298,9 @@ const Section * PIC16TargetAsmInfo::CreateBSSSectionForGlobal(const GlobalVariable *GV, std::string Addr) const { - assert (GV->hasInitializer() && "This global doesn't need space"); - assert (GV->getInitializer()->isNullValue() && - "Unitialized global has non-zero initializer"); + assert(GV->hasInitializer() && "This global doesn't need space"); + assert(GV->getInitializer()->isNullValue() && + "Unitialized global has non-zero initializer"); std::string Name; // If address is given then create a section at that address else create a // section by section name specified in GV. @@ -323,15 +313,14 @@ break; } } - } - else { + } else { std::string Prefix = GV->getName() + "." + Addr + "."; Name = PAN::getUdataSectionName(BSSSections.size(), Prefix) + " " + Addr; } PIC16Section *NewBSS = FoundBSS; if (NewBSS == NULL) { - const Section *NewSection = getNamedSection (Name.c_str()); + const Section *NewSection = getNamedSection(Name.c_str()); NewBSS = new PIC16Section(NewSection); BSSSections.push_back(NewBSS); } @@ -357,11 +346,11 @@ const Section * PIC16TargetAsmInfo::CreateIDATASectionForGlobal(const GlobalVariable *GV, std::string Addr) const { - assert (GV->hasInitializer() && "This global doesn't need space"); - assert (!GV->getInitializer()->isNullValue() && - "initialized global has zero initializer"); - assert (GV->getType()->getAddressSpace() == PIC16ISD::RAM_SPACE && - "can be used for initialized RAM data only"); + assert(GV->hasInitializer() && "This global doesn't need space"); + assert(!GV->getInitializer()->isNullValue() && + "initialized global has zero initializer"); + assert(GV->getType()->getAddressSpace() == PIC16ISD::RAM_SPACE && + "can be used for initialized RAM data only"); std::string Name; // If address is given then create a section at that address else create a @@ -375,15 +364,14 @@ break; } } - } - else { + } else { std::string Prefix = GV->getName() + "." + Addr + "."; Name = PAN::getIdataSectionName(IDATASections.size(), Prefix) + " " + Addr; } PIC16Section *NewIDATASec = FoundIDATASec; if (NewIDATASec == NULL) { - const Section *NewSection = getNamedSection (Name.c_str()); + const Section *NewSection = getNamedSection(Name.c_str()); NewIDATASec = new PIC16Section(NewSection); IDATASections.push_back(NewIDATASec); } @@ -399,8 +387,8 @@ const Section * PIC16TargetAsmInfo::CreateROSectionForGlobal(const GlobalVariable *GV, std::string Addr) const { - assert (GV->getType()->getAddressSpace() == PIC16ISD::ROM_SPACE && - "can be used for ROM data only"); + assert(GV->getType()->getAddressSpace() == PIC16ISD::ROM_SPACE && + "can be used for ROM data only"); std::string Name; // If address is given then create a section at that address else create a @@ -414,15 +402,14 @@ break; } } - } - else { + } else { std::string Prefix = GV->getName() + "." + Addr + "."; Name = PAN::getRomdataSectionName(ROSections.size(), Prefix) + " " + Addr; } PIC16Section *NewRomSec = FoundROSec; if (NewRomSec == NULL) { - const Section *NewSection = getNamedSection (Name.c_str()); + const Section *NewSection = getNamedSection(Name.c_str()); NewRomSec = new PIC16Section(NewSection); ROSections.push_back(NewRomSec); } Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h?rev=76585&r1=76584&r2=76585&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h Tue Jul 21 12:20:18 2009 @@ -18,28 +18,33 @@ #include "llvm/Target/TargetAsmInfo.h" #include #include "llvm/Module.h" -#define DataBankSize 80 + namespace llvm { + enum { DataBankSize = 80 }; + // Forward declaration. class PIC16TargetMachine; class GlobalVariable; - // PIC16 Splits the global data into mulitple udata and idata sections. - // Each udata and idata section needs to contain a list of globals that - // they contain, in order to avoid scanning over all the global values - // again and printing only those that match the current section. - // Keeping values inside the sections make printing a section much easier. + /// PIC16 Splits the global data into mulitple udata and idata sections. + /// Each udata and idata section needs to contain a list of globals that + /// they contain, in order to avoid scanning over all the global values + /// again and printing only those that match the current section. + /// Keeping values inside the sections make printing a section much easier. struct PIC16Section { - const Section *S_; // Connection to actual Section. - unsigned Size; // Total size of the objects contained. - bool SectionPrinted; - std::vector Items; - - PIC16Section (const Section *s) { S_ = s; Size = 0; - SectionPrinted = false;} - bool isPrinted() { return SectionPrinted ; } - void setPrintedStatus(bool status) { SectionPrinted = status ;} + const Section *S_; // Connection to actual Section. + unsigned Size; // Total size of the objects contained. + bool SectionPrinted; + std::vector Items; + + PIC16Section(const Section *s) { + S_ = s; + Size = 0; + SectionPrinted = false; + } + bool isPrinted() const { return SectionPrinted; } + void setPrintedStatus(bool status) { SectionPrinted = status; } }; struct PIC16TargetAsmInfo : public TargetAsmInfo { @@ -53,7 +58,7 @@ mutable PIC16Section *ExternalVarDefs; virtual ~PIC16TargetAsmInfo(); - private: + private: const char *RomData8bitsDirective; const char *RomData16bitsDirective; const char *RomData32bitsDirective; @@ -72,21 +77,21 @@ virtual const Section *SelectSectionForGlobal(const GlobalValue *GV) const; const Section * CreateSectionForGlobal(const GlobalValue *GV, std::string Addr = "") const; - public: + public: void SetSectionForGVs(Module &M); - std::vector getBSSSections() const { + const std::vector &getBSSSections() const { return BSSSections; } - std::vector getIDATASections() const { + const std::vector &getIDATASections() const { return IDATASections; } - std::vector getAutosSections() const { + const std::vector &getAutosSections() const { return AutosSections; } - std::vector getROSections() const { + const std::vector &getROSections() const { return ROSections; } - virtual const Section* SectionForGlobal(const GlobalValue *GV) const; + virtual const Section *SectionForGlobal(const GlobalValue *GV) const; }; } // namespace llvm From sabre at nondot.org Tue Jul 21 12:23:47 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 17:23:47 -0000 Subject: [llvm-commits] [llvm] r76586 - /llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp Message-ID: <200907211723.n6LHNlpd002620@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 12:23:41 2009 New Revision: 76586 URL: http://llvm.org/viewvc/llvm-project?rev=76586&view=rev Log: remove an unneeded override. Modified: llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp Modified: llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp?rev=76586&r1=76585&r2=76586&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp Tue Jul 21 12:23:41 2009 @@ -59,7 +59,6 @@ void emitFunctionHeader(const MachineFunction &MF); bool runOnMachineFunction(MachineFunction &F); bool doInitialization(Module &M); - bool doFinalization(Module &M); void getAnalysisUsage(AnalysisUsage &AU) const { AsmPrinter::getAnalysisUsage(AU); @@ -88,10 +87,6 @@ } -bool MSP430AsmPrinter::doFinalization(Module &M) { - return AsmPrinter::doFinalization(M); -} - void MSP430AsmPrinter::emitFunctionHeader(const MachineFunction &MF) { const Function *F = MF.getFunction(); From sabre at nondot.org Tue Jul 21 12:25:14 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 17:25:14 -0000 Subject: [llvm-commits] [llvm] r76587 - /llvm/trunk/lib/Target/TargetAsmInfo.cpp Message-ID: <200907211725.n6LHPEC9002673@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 12:25:13 2009 New Revision: 76587 URL: http://llvm.org/viewvc/llvm-project?rev=76587&view=rev Log: fix indentation Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=76587&r1=76586&r2=76587&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Tue Jul 21 12:25:13 2009 @@ -251,34 +251,34 @@ if (GV) { SectionKind::Kind Kind = SectionKindForGlobal(GV); switch (Kind) { - case SectionKind::Text: + case SectionKind::Text: Flags |= SectionFlags::Code; break; - case SectionKind::ThreadData: - case SectionKind::ThreadBSS: + case SectionKind::ThreadData: + case SectionKind::ThreadBSS: Flags |= SectionFlags::TLS; // FALLS THROUGH - case SectionKind::Data: - case SectionKind::DataRel: - case SectionKind::DataRelLocal: - case SectionKind::DataRelRO: - case SectionKind::DataRelROLocal: - case SectionKind::BSS: + case SectionKind::Data: + case SectionKind::DataRel: + case SectionKind::DataRelLocal: + case SectionKind::DataRelRO: + case SectionKind::DataRelROLocal: + case SectionKind::BSS: Flags |= SectionFlags::Writeable; break; - case SectionKind::ROData: - case SectionKind::RODataMergeStr: - case SectionKind::RODataMergeConst: + case SectionKind::ROData: + case SectionKind::RODataMergeStr: + case SectionKind::RODataMergeConst: // No additional flags here break; - case SectionKind::SmallData: - case SectionKind::SmallBSS: + case SectionKind::SmallData: + case SectionKind::SmallBSS: Flags |= SectionFlags::Writeable; // FALLS THROUGH - case SectionKind::SmallROData: + case SectionKind::SmallROData: Flags |= SectionFlags::Small; break; - default: + default: llvm_unreachable("Unexpected section kind!"); } From daniel at zuster.org Tue Jul 21 12:25:52 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 17:25:52 -0000 Subject: [llvm-commits] [llvm] r76588 - /llvm/trunk/include/llvm/ADT/StringRef.h Message-ID: <200907211725.n6LHPqaS002706@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Jul 21 12:25:46 2009 New Revision: 76588 URL: http://llvm.org/viewvc/llvm-project?rev=76588&view=rev Log: Move StringRef comparison operators out of class. Also, tweak the return type of size(). Modified: llvm/trunk/include/llvm/ADT/StringRef.h Modified: llvm/trunk/include/llvm/ADT/StringRef.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=76588&r1=76587&r2=76588&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/StringRef.h (original) +++ llvm/trunk/include/llvm/ADT/StringRef.h Tue Jul 21 12:25:46 2009 @@ -73,7 +73,14 @@ bool empty() const { return Length == 0; } /// size - Get the string size. - unsigned size() const { return Length; } + size_t size() const { return Length; } + + /// equals - Check for string equality, this is more efficient than + /// compare() in when the relative ordering of inequal strings isn't needed. + bool equals(const StringRef &RHS) const { + return (Length == RHS.Length && + memcmp(Data, RHS.Data, Length) == 0); + } /// compare - Compare two strings; the result is -1, 0, or 1 if this string /// is lexicographically less than, equal to, or greater than the \arg RHS. @@ -95,20 +102,6 @@ /// @name Operator Overloads /// @{ - bool operator==(const StringRef &RHS) const { - return Length == RHS.Length && memcmp(Data, RHS.Data, Length) == 0; - } - - bool operator!=(const StringRef &RHS) const { return !(*this == RHS); } - - bool operator<(const StringRef &RHS) const { return compare(RHS) == -1; } - - bool operator<=(const StringRef &RHS) const { return compare(RHS) != 1; } - - bool operator>(const StringRef &RHS) const { return compare(RHS) == 1; } - - bool operator>=(const StringRef &RHS) const { return compare(RHS) != -1; } - char operator[](size_t Index) const { assert(Index < Length && "Invalid index!"); return Data[Index]; @@ -142,12 +135,41 @@ /// startswith - Check if this string starts with the given \arg Prefix. bool startswith(const StringRef &Prefix) const { - return substr(0, Prefix.Length) == Prefix; + return substr(0, Prefix.Length).equals(Prefix); } /// @} }; + /// @name StringRef Comparison Operators + /// @{ + + inline bool operator==(const StringRef &LHS, const StringRef &RHS) { + return LHS.equals(RHS); + } + + inline bool operator!=(const StringRef &LHS, const StringRef &RHS) { + return !(LHS == RHS); + } + + inline bool operator<(const StringRef &LHS, const StringRef &RHS) { + return LHS.compare(RHS) == -1; + } + + inline bool operator<=(const StringRef &LHS, const StringRef &RHS) { + return LHS.compare(RHS) != 1; + } + + inline bool operator>(const StringRef &LHS, const StringRef &RHS) { + return LHS.compare(RHS) == 1; + } + + inline bool operator>=(const StringRef &LHS, const StringRef &RHS) { + return LHS.compare(RHS) != -1; + } + + /// @} + } #endif From daniel at zuster.org Tue Jul 21 12:30:09 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 10:30:09 -0700 Subject: [llvm-commits] [llvm] r76555 - /llvm/trunk/lib/Target/MSIL/MSILWriter.h In-Reply-To: <3F7BCDA7-B85A-4C00-8D16-01ECC2BCFD04@apple.com> References: <200907210858.n6L8wtgP013572@zion.cs.uiuc.edu> <3F7BCDA7-B85A-4C00-8D16-01ECC2BCFD04@apple.com> Message-ID: <6a8523d60907211030o37044c93xe5d51b69e16b7b6b@mail.gmail.com> It can. I'm leaving as is since there is -- and may only ever be -- one user of MSILWriter.h - Daniel On Tue, Jul 21, 2009 at 9:25 AM, Chris Lattner wrote: > > On Jul 21, 2009, at 1:58 AM, Daniel Dunbar wrote: > >> Author: ddunbar >> Date: Tue Jul 21 03:58:44 2009 >> New Revision: 76555 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=76555&view=rev >> Log: >> Add missing include. > > Not that it matters that much, but I think this can be a forward decl. > > -Chris > >> >> Modified: >> ? ?llvm/trunk/lib/Target/MSIL/MSILWriter.h >> >> Modified: llvm/trunk/lib/Target/MSIL/MSILWriter.h >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSIL/MSILWriter.h?rev=76555&r1=76554&r2=76555&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> ====================================================================== >> --- llvm/trunk/lib/Target/MSIL/MSILWriter.h (original) >> +++ llvm/trunk/lib/Target/MSIL/MSILWriter.h Tue Jul 21 03:58:44 2009 >> @@ -19,6 +19,7 @@ >> #include "llvm/IntrinsicInst.h" >> #include "llvm/Pass.h" >> #include "llvm/PassManager.h" >> +#include "llvm/ADT/StringRef.h" >> #include "llvm/Analysis/FindUsedTypes.h" >> #include "llvm/Analysis/LoopInfo.h" >> #include "llvm/Support/FormattedStream.h" >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From sabre at nondot.org Tue Jul 21 12:30:56 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 17:30:56 -0000 Subject: [llvm-commits] [llvm] r76590 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/MachOWriter.cpp lib/Target/DarwinTargetAsmInfo.cpp lib/Target/MSP430/MSP430AsmPrinter.cpp lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp lib/Target/TargetAsmInfo.cpp Message-ID: <200907211730.n6LHUwr5002899@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 12:30:51 2009 New Revision: 76590 URL: http://llvm.org/viewvc/llvm-project?rev=76590&view=rev Log: Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the LLVM IR concept. Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/trunk/lib/CodeGen/MachOWriter.cpp llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp llvm/trunk/lib/Target/TargetAsmInfo.cpp Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=76590&r1=76589&r2=76590&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Tue Jul 21 12:30:51 2009 @@ -239,10 +239,10 @@ /// have names in the .o file. This is often "." or "L". const char *PrivateGlobalPrefix; // Defaults to "." - /// LessPrivateGlobalPrefix - This prefix is used for symbols that should + /// LinkerPrivateGlobalPrefix - This prefix is used for symbols that should /// be passed through the assembler but be removed by the linker. This /// is "l" on Darwin, currently used for some ObjC metadata. - const char *LessPrivateGlobalPrefix; // Defaults to "" + const char *LinkerPrivateGlobalPrefix; // Defaults to "" /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is /// emitted before jump tables with the specified prefix. @@ -708,8 +708,8 @@ const char *getPrivateGlobalPrefix() const { return PrivateGlobalPrefix; } - const char *getLessPrivateGlobalPrefix() const { - return LessPrivateGlobalPrefix; + const char *getLinkerPrivateGlobalPrefix() const { + return LinkerPrivateGlobalPrefix; } const char *getJumpTableSpecialLabelPrefix() const { return JumpTableSpecialLabelPrefix; Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=76590&r1=76589&r2=76590&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Jul 21 12:30:51 2009 @@ -155,7 +155,7 @@ bool AsmPrinter::doInitialization(Module &M) { Mang = new Mangler(M, TAI->getGlobalPrefix(), TAI->getPrivateGlobalPrefix(), - TAI->getLessPrivateGlobalPrefix()); + TAI->getLinkerPrivateGlobalPrefix()); if (TAI->doesAllowQuotesInName()) Mang->setUseQuotes(true); Modified: llvm/trunk/lib/CodeGen/MachOWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachOWriter.cpp?rev=76590&r1=76589&r2=76590&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachOWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/MachOWriter.cpp Tue Jul 21 12:30:51 2009 @@ -747,6 +747,7 @@ GV(gv), n_strx(0), n_type(sect == NO_SECT ? N_UNDF : N_SECT), n_sect(sect), n_desc(0), n_value(0) { + // FIXME: This is completely broken, it should use the mangler interface. switch (GV->getLinkage()) { default: llvm_unreachable("Unexpected linkage type!"); @@ -765,7 +766,7 @@ GVName = TAI->getPrivateGlobalPrefix() + name; break; case GlobalValue::LinkerPrivateLinkage: - GVName = TAI->getLessPrivateGlobalPrefix() + name; + GVName = TAI->getLinkerPrivateGlobalPrefix() + name; break; case GlobalValue::InternalLinkage: GVName = TAI->getGlobalPrefix() + name; Modified: llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp?rev=76590&r1=76589&r2=76590&view=diff ============================================================================== --- llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Tue Jul 21 12:30:51 2009 @@ -57,7 +57,7 @@ // Syntax: GlobalPrefix = "_"; PrivateGlobalPrefix = "L"; - LessPrivateGlobalPrefix = "l"; // Marker for some ObjC metadata + LinkerPrivateGlobalPrefix = "l"; // Marker for some ObjC metadata NeedsSet = true; NeedsIndirectEncoding = true; AllowQuotesInName = true; @@ -105,17 +105,18 @@ } /// emitUsedDirectiveFor - On Darwin, internally linked data beginning with -/// the PrivateGlobalPrefix or the LessPrivateGlobalPrefix does not have the +/// the PrivateGlobalPrefix or the LinkerPrivateGlobalPrefix does not have the /// directive emitted (this occurs in ObjC metadata). bool DarwinTargetAsmInfo::emitUsedDirectiveFor(const GlobalValue* GV, Mangler *Mang) const { if (!GV) return false; - // Check whether the mangled name has the "Private" or "LessPrivate" prefix. + // Check whether the mangled name has the "Private" or "LinkerPrivate" prefix. if (GV->hasLocalLinkage() && !isa(GV)) { const std::string &Name = Mang->getMangledName(GV); + // FIXME: Always "L" and "l", simplify! const char *PGPrefix = getPrivateGlobalPrefix(); - const char *LPGPrefix = getLessPrivateGlobalPrefix(); + const char *LPGPrefix = getLinkerPrivateGlobalPrefix(); unsigned PGPLen = strlen(PGPrefix); unsigned LPGPLen = strlen(LPGPrefix); Modified: llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp?rev=76590&r1=76589&r2=76590&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp Tue Jul 21 12:30:51 2009 @@ -82,7 +82,7 @@ bool MSP430AsmPrinter::doInitialization(Module &M) { Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), - TAI->getLessPrivateGlobalPrefix()); + TAI->getLinkerPrivateGlobalPrefix()); return false; // success } Modified: llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp?rev=76590&r1=76589&r2=76590&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp Tue Jul 21 12:30:51 2009 @@ -452,7 +452,7 @@ doInitialization(Module &M) { Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), - TAI->getLessPrivateGlobalPrefix()); + TAI->getLinkerPrivateGlobalPrefix()); // Tell the assembler which ABI we are using O << "\t.section .mdebug." << emitCurrentABIString() << '\n'; Modified: llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp?rev=76590&r1=76589&r2=76590&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp Tue Jul 21 12:30:51 2009 @@ -224,7 +224,7 @@ bool SparcAsmPrinter::doInitialization(Module &M) { Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), - TAI->getLessPrivateGlobalPrefix()); + TAI->getLinkerPrivateGlobalPrefix()); return false; // success } Modified: llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp?rev=76590&r1=76589&r2=76590&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp Tue Jul 21 12:30:51 2009 @@ -93,7 +93,7 @@ bool SystemZAsmPrinter::doInitialization(Module &M) { Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), - TAI->getLessPrivateGlobalPrefix()); + TAI->getLinkerPrivateGlobalPrefix()); return false; // success } Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=76590&r1=76589&r2=76590&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Tue Jul 21 12:30:51 2009 @@ -49,7 +49,7 @@ MaxOperandLength = 0; GlobalPrefix = ""; PrivateGlobalPrefix = "."; - LessPrivateGlobalPrefix = ""; + LinkerPrivateGlobalPrefix = ""; JumpTableSpecialLabelPrefix = 0; GlobalVarAddrPrefix = ""; GlobalVarAddrSuffix = ""; From daniel at zuster.org Tue Jul 21 12:35:18 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 10:35:18 -0700 Subject: [llvm-commits] [PATCH] poison freed memory in DenseMap.h In-Reply-To: <4A656BA8.8080801@gmail.com> References: <4A656BA8.8080801@gmail.com> Message-ID: <6a8523d60907211035g2fde6bt32bd75c156b399b4@mail.gmail.com> Is there an easy way to do this more globally? I would support enabling this globally in Debug (but not Release) mode, it increases determinism across platforms, frequently small memory errors only show up on one platform or another. - Daniel 2009/7/21 T?r?k Edwin : > Hi, > > Attached patch helps finding bugs such as PR4575 in !NDEBUG mode, > because it makes it reproducible. > > Ok to commit? > > Best regards, > --Edwin > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > From sabre at nondot.org Tue Jul 21 12:36:28 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 17:36:28 -0000 Subject: [llvm-commits] [llvm] r76591 - /llvm/trunk/test/CodeGen/SystemZ/05-MemRegStores.ll Message-ID: <200907211736.n6LHaVwm003063@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 12:36:24 2009 New Revision: 76591 URL: http://llvm.org/viewvc/llvm-project?rev=76591&view=rev Log: convert this test to filecheck format, which is faster and avoids false matches of "st" -> "stdin" Modified: llvm/trunk/test/CodeGen/SystemZ/05-MemRegStores.ll Modified: llvm/trunk/test/CodeGen/SystemZ/05-MemRegStores.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SystemZ/05-MemRegStores.ll?rev=76591&r1=76590&r2=76591&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/SystemZ/05-MemRegStores.ll (original) +++ llvm/trunk/test/CodeGen/SystemZ/05-MemRegStores.ll Tue Jul 21 12:36:24 2009 @@ -1,14 +1,14 @@ ; RUN: llvm-as < %s | llc | not grep aghi -; RUN: llvm-as < %s | llc | grep stg | count 1 -; RUN: llvm-as < %s | llc | grep st | count 8 -; RUN: llvm-as < %s | llc | grep sth | count 2 -; RUN: llvm-as < %s | llc | grep stc | count 2 +; RUN: llvm-as < %s | llc | FileCheck %s target datalayout = "E-p:64:64:64-i1:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128" target triple = "s390x-unknown-linux-gnu" define void @foo1(i64* nocapture %a, i64 %idx, i64 %val) nounwind { entry: + +; CHECK: foo1: +; CHECK: stg %r4, 8(%r1,%r2) %add.ptr.sum = add i64 %idx, 1 ; [#uses=1] %add.ptr2 = getelementptr i64* %a, i64 %add.ptr.sum ; [#uses=1] store i64 %val, i64* %add.ptr2 @@ -17,6 +17,8 @@ define void @foo2(i32* nocapture %a, i64 %idx, i32 %val) nounwind { entry: +; CHECK: foo2: +; CHECK: st %r4, 4(%r1,%r2) %add.ptr.sum = add i64 %idx, 1 ; [#uses=1] %add.ptr2 = getelementptr i32* %a, i64 %add.ptr.sum ; [#uses=1] store i32 %val, i32* %add.ptr2 @@ -25,6 +27,8 @@ define void @foo3(i16* nocapture %a, i64 %idx, i16 zeroext %val) nounwind { entry: +; CHECK: foo3: +; CHECK: sth %r4, 2(%r1,%r2) %add.ptr.sum = add i64 %idx, 1 ; [#uses=1] %add.ptr2 = getelementptr i16* %a, i64 %add.ptr.sum ; [#uses=1] store i16 %val, i16* %add.ptr2 @@ -33,6 +37,8 @@ define void @foo4(i8* nocapture %a, i64 %idx, i8 zeroext %val) nounwind { entry: +; CHECK: foo4: +; CHECK: stc %r4, 1(%r3,%r2) %add.ptr.sum = add i64 %idx, 1 ; [#uses=1] %add.ptr2 = getelementptr i8* %a, i64 %add.ptr.sum ; [#uses=1] store i8 %val, i8* %add.ptr2 @@ -41,6 +47,8 @@ define void @foo5(i8* nocapture %a, i64 %idx, i64 %val) nounwind { entry: +; CHECK: foo5: +; CHECK: stc %r4, 1(%r3,%r2) %add.ptr.sum = add i64 %idx, 1 ; [#uses=1] %add.ptr2 = getelementptr i8* %a, i64 %add.ptr.sum ; [#uses=1] %conv = trunc i64 %val to i8 ; [#uses=1] @@ -50,6 +58,8 @@ define void @foo6(i16* nocapture %a, i64 %idx, i64 %val) nounwind { entry: +; CHECK: foo6: +; CHECK: sth %r4, 2(%r1,%r2) %add.ptr.sum = add i64 %idx, 1 ; [#uses=1] %add.ptr2 = getelementptr i16* %a, i64 %add.ptr.sum ; [#uses=1] %conv = trunc i64 %val to i16 ; [#uses=1] @@ -59,6 +69,8 @@ define void @foo7(i32* nocapture %a, i64 %idx, i64 %val) nounwind { entry: +; CHECK: foo7: +; CHECK: st %r4, 4(%r1,%r2) %add.ptr.sum = add i64 %idx, 1 ; [#uses=1] %add.ptr2 = getelementptr i32* %a, i64 %add.ptr.sum ; [#uses=1] %conv = trunc i64 %val to i32 ; [#uses=1] From sabre at nondot.org Tue Jul 21 12:37:37 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 17:37:37 -0000 Subject: [llvm-commits] [llvm] r76592 - in /llvm/trunk/lib/Target: MSP430/MSP430AsmPrinter.cpp Sparc/AsmPrinter/SparcAsmPrinter.cpp SystemZ/AsmPrinter/SystemZAsmPrinter.cpp Message-ID: <200907211737.n6LHbbe6003106@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 12:37:35 2009 New Revision: 76592 URL: http://llvm.org/viewvc/llvm-project?rev=76592&view=rev Log: fix Sparc, SystemZ, and MSP430 to not override AsmPrinter::doInitialization. This eliminates redundancy setting up the mangler and adds support to them for module-level inline asm and a .file directive. Modified: llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp Modified: llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp?rev=76592&r1=76591&r2=76592&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp Tue Jul 21 12:37:35 2009 @@ -58,7 +58,6 @@ void emitFunctionHeader(const MachineFunction &MF); bool runOnMachineFunction(MachineFunction &F); - bool doInitialization(Module &M); void getAnalysisUsage(AnalysisUsage &AU) const { AsmPrinter::getAnalysisUsage(AU); @@ -80,12 +79,6 @@ return new MSP430AsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose); } -bool MSP430AsmPrinter::doInitialization(Module &M) { - Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), - TAI->getLinkerPrivateGlobalPrefix()); - return false; // success -} - void MSP430AsmPrinter::emitFunctionHeader(const MachineFunction &MF) { const Function *F = MF.getFunction(); Modified: llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp?rev=76592&r1=76591&r2=76592&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp Tue Jul 21 12:37:35 2009 @@ -67,7 +67,6 @@ bool printInstruction(const MachineInstr *MI); // autogenerated. bool runOnMachineFunction(MachineFunction &F); - bool doInitialization(Module &M); bool doFinalization(Module &M); bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode); @@ -222,12 +221,6 @@ O << SPARCCondCodeToString((SPCC::CondCodes)CC); } -bool SparcAsmPrinter::doInitialization(Module &M) { - Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), - TAI->getLinkerPrivateGlobalPrefix()); - return false; // success -} - bool SparcAsmPrinter::doFinalization(Module &M) { // Print out module-level global variables here. for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); Modified: llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp?rev=76592&r1=76591&r2=76592&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp Tue Jul 21 12:37:35 2009 @@ -67,7 +67,6 @@ void emitFunctionHeader(const MachineFunction &MF); bool runOnMachineFunction(MachineFunction &F); - bool doInitialization(Module &M); bool doFinalization(Module &M); void printModuleLevelGV(const GlobalVariable* GVar); @@ -91,13 +90,6 @@ return new SystemZAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose); } -bool SystemZAsmPrinter::doInitialization(Module &M) { - Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), - TAI->getLinkerPrivateGlobalPrefix()); - return false; // success -} - - bool SystemZAsmPrinter::doFinalization(Module &M) { // Print out module-level global variables here. for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); From sabre at nondot.org Tue Jul 21 12:39:55 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 17:39:55 -0000 Subject: [llvm-commits] [llvm] r76593 - /llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp Message-ID: <200907211739.n6LHdupd003172@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 12:39:48 2009 New Revision: 76593 URL: http://llvm.org/viewvc/llvm-project?rev=76593&view=rev Log: whitespace cleanups, make the MipsAsmPrinter::doInitialization chain to the super class instead of initializing mangler directly. This gives it .file and module level inline asm support among other things. Modified: llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp Modified: llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp?rev=76593&r1=76592&r2=76593&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp Tue Jul 21 12:39:48 2009 @@ -411,8 +411,7 @@ } void MipsAsmPrinter:: -printUnsignedImm(const MachineInstr *MI, int opNum) -{ +printUnsignedImm(const MachineInstr *MI, int opNum) { const MachineOperand &MO = MI->getOperand(opNum); if (MO.getType() == MachineOperand::MO_Immediate) O << (unsigned short int)MO.getImm(); @@ -421,8 +420,7 @@ } void MipsAsmPrinter:: -printMemOperand(const MachineInstr *MI, int opNum, const char *Modifier) -{ +printMemOperand(const MachineInstr *MI, int opNum, const char *Modifier) { // when using stack locations for not load/store instructions // print the same way as all normal 3 operand instructions. if (Modifier && !strcmp(Modifier, "stackloc")) { @@ -442,18 +440,14 @@ } void MipsAsmPrinter:: -printFCCOperand(const MachineInstr *MI, int opNum, const char *Modifier) -{ +printFCCOperand(const MachineInstr *MI, int opNum, const char *Modifier) { const MachineOperand& MO = MI->getOperand(opNum); O << Mips::MipsFCCToString((Mips::CondCode)MO.getImm()); } -bool MipsAsmPrinter:: -doInitialization(Module &M) -{ - Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), - TAI->getLinkerPrivateGlobalPrefix()); - +bool MipsAsmPrinter::doInitialization(Module &M) { + // FIXME: Use SwitchToDataSection. + // Tell the assembler which ABI we are using O << "\t.section .mdebug." << emitCurrentABIString() << '\n'; @@ -465,11 +459,11 @@ // return to previous section O << "\t.previous" << '\n'; - return false; // success + return AsmPrinter::doInitialization(M); } void MipsAsmPrinter:: -printModuleLevelGV(const GlobalVariable* GVar) { +printModuleLevelGV(const GlobalVariable *GVar) { const TargetData *TD = TM.getTargetData(); if (!GVar->hasInitializer()) From daniel at zuster.org Tue Jul 21 12:33:00 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 10:33:00 -0700 Subject: [llvm-commits] [PATCH] StringRef class. In-Reply-To: References: <6a8523d60907201705y5221663bi48a2042bdeb5bc58@mail.gmail.com> Message-ID: <6a8523d60907211033l4613c05v887e1274ade68f5f@mail.gmail.com> On Tue, Jul 21, 2009 at 8:04 AM, Douglas Gregor wrote: > On Jul 20, 2009, at 5:05 PM, Daniel Dunbar wrote: >> The attached patch provides a new StringRef helper class, which is >> used to represent a constant string (pointer & length) which is not >> owned. ... > One gets more uniform conversions for the left- and right-hand > arguments if these are written as friend function definitions, e.g., Fixed. > Also, for the concatenation operators, one can make them slightly more > efficient with, e.g., Thanks. You didn't comment on whether you thought adding them was a good idea or not, though. :) - Daniel From kremenek at apple.com Tue Jul 21 12:42:01 2009 From: kremenek at apple.com (Ted Kremenek) Date: Tue, 21 Jul 2009 17:42:01 -0000 Subject: [llvm-commits] [llvm] r76594 - /llvm/trunk/utils/UpdateCMakeLists.pl Message-ID: <200907211742.n6LHg3Ag003238@zion.cs.uiuc.edu> Author: kremenek Date: Tue Jul 21 12:41:55 2009 New Revision: 76594 URL: http://llvm.org/viewvc/llvm-project?rev=76594&view=rev Log: Use string comparison instead of numeric comparison when comparing digests. Modified: llvm/trunk/utils/UpdateCMakeLists.pl Modified: llvm/trunk/utils/UpdateCMakeLists.pl URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/UpdateCMakeLists.pl?rev=76594&r1=76593&r2=76594&view=diff ============================================================================== --- llvm/trunk/utils/UpdateCMakeLists.pl (original) +++ llvm/trunk/utils/UpdateCMakeLists.pl Tue Jul 21 12:41:55 2009 @@ -96,7 +96,7 @@ my $digestB = Digest::MD5->new->addfile(*FILE)->hexdigest; close(FILE); - if ($digestA != $digestB) { + if ($digestA ne $digestB) { move($cmakeListNew, $cmakeList); return 1; } From kremenek at apple.com Tue Jul 21 12:43:22 2009 From: kremenek at apple.com (Ted Kremenek) Date: Tue, 21 Jul 2009 17:43:22 -0000 Subject: [llvm-commits] [llvm] r76595 - in /llvm/trunk/lib: Target/CMakeLists.txt Transforms/IPO/CMakeLists.txt Transforms/Utils/CMakeLists.txt Message-ID: <200907211743.n6LHhOO0003315@zion.cs.uiuc.edu> Author: kremenek Date: Tue Jul 21 12:43:20 2009 New Revision: 76595 URL: http://llvm.org/viewvc/llvm-project?rev=76595&view=rev Log: Update CMake files. Modified: llvm/trunk/lib/Target/CMakeLists.txt llvm/trunk/lib/Transforms/IPO/CMakeLists.txt llvm/trunk/lib/Transforms/Utils/CMakeLists.txt Modified: llvm/trunk/lib/Target/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CMakeLists.txt?rev=76595&r1=76594&r2=76595&view=diff ============================================================================== --- llvm/trunk/lib/Target/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/CMakeLists.txt Tue Jul 21 12:43:20 2009 @@ -8,6 +8,7 @@ TargetELFWriterInfo.cpp TargetFrameInfo.cpp TargetInstrInfo.cpp + TargetIntrinsicInfo.cpp TargetMachOWriterInfo.cpp TargetMachine.cpp TargetRegisterInfo.cpp Modified: llvm/trunk/lib/Transforms/IPO/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/CMakeLists.txt?rev=76595&r1=76594&r2=76595&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/CMakeLists.txt (original) +++ llvm/trunk/lib/Transforms/IPO/CMakeLists.txt Tue Jul 21 12:43:20 2009 @@ -1,18 +1,19 @@ add_llvm_library(LLVMipo - FunctionAttrs.cpp ArgumentPromotion.cpp ConstantMerge.cpp DeadArgumentElimination.cpp DeadTypeElimination.cpp ExtractGV.cpp + FunctionAttrs.cpp GlobalDCE.cpp GlobalOpt.cpp + IPConstantPropagation.cpp + IPO.cpp IndMemRemoval.cpp InlineAlways.cpp - Inliner.cpp InlineSimple.cpp + Inliner.cpp Internalize.cpp - IPConstantPropagation.cpp LoopExtractor.cpp LowerSetJmp.cpp MergeFunctions.cpp Modified: llvm/trunk/lib/Transforms/Utils/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CMakeLists.txt?rev=76595&r1=76594&r2=76595&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/CMakeLists.txt (original) +++ llvm/trunk/lib/Transforms/Utils/CMakeLists.txt Tue Jul 21 12:43:20 2009 @@ -11,6 +11,7 @@ DemoteRegToStack.cpp InlineCost.cpp InlineFunction.cpp + InstructionNamer.cpp LCSSA.cpp Local.cpp LoopSimplify.cpp @@ -19,12 +20,11 @@ LowerSwitch.cpp Mem2Reg.cpp PromoteMemoryToRegister.cpp - SimplifyCFG.cpp SSI.cpp + SimplifyCFG.cpp UnifyFunctionExitNodes.cpp UnrollLoop.cpp ValueMapper.cpp - InstructionNamer.cpp ) target_link_libraries (LLVMTransformUtils LLVMSupport) From clattner at apple.com Tue Jul 21 12:52:24 2009 From: clattner at apple.com (Chris Lattner) Date: Tue, 21 Jul 2009 10:52:24 -0700 Subject: [llvm-commits] [llvm] r76558 - in /llvm/trunk: lib/CodeGen/VirtRegRewriter.cpp test/CodeGen/X86/2009-07-21-RewriterBug.ll In-Reply-To: <50706115-8D6B-4A69-9B2D-879C161C7CB5@apple.com> References: <200907210915.n6L9Fe27018490@zion.cs.uiuc.edu> <3085B6C3-CAF7-4E9B-9FDA-5540E8D1BF40@apple.com> <50706115-8D6B-4A69-9B2D-879C161C7CB5@apple.com> Message-ID: <6BD73220-29D1-4242-849D-3545640F3F81@apple.com> On Jul 21, 2009, at 10:06 AM, Evan Cheng wrote: >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=76558&view=rev >>> Log: >>> Another rewriter bug exposed by recent coalescer changes. >>> ReuseInfo::GetRegForReload() should make sure the "switched" >>> register is in the desired register class. I'm surprised this hasn't >>> caused more failures in the past. >> >> Thanks Evan, can you reduce this testcase though? It is huge, and >> doesn't appear to have been run through bugpoint. > > That's a bugpoint reduced test case. Ok > I can't reduce it any further. I don't believe you. It has tons of global variable inits etc that don't impact codegen. Knowing the problem, can't you hand synthesize a testcase to expose the problem? -Chris From clattner at apple.com Tue Jul 21 12:53:06 2009 From: clattner at apple.com (Chris Lattner) Date: Tue, 21 Jul 2009 10:53:06 -0700 Subject: [llvm-commits] [PATCH] poison freed memory in DenseMap.h In-Reply-To: <4A656BA8.8080801@gmail.com> References: <4A656BA8.8080801@gmail.com> Message-ID: <5E8144EC-DC51-4D32-BC8B-7FAC34B9F68C@apple.com> On Jul 21, 2009, at 12:18 AM, T?r?k Edwin wrote: > Hi, > > Attached patch helps finding bugs such as PR4575 in !NDEBUG mode, > because it makes it reproducible. Nice, please commit. -Chris From edwintorok at gmail.com Tue Jul 21 12:59:03 2009 From: edwintorok at gmail.com (=?ISO-8859-1?Q?T=F6r=F6k_Edwin?=) Date: Tue, 21 Jul 2009 20:59:03 +0300 Subject: [llvm-commits] [PATCH] poison freed memory in DenseMap.h In-Reply-To: <6a8523d60907211035g2fde6bt32bd75c156b399b4@mail.gmail.com> References: <4A656BA8.8080801@gmail.com> <6a8523d60907211035g2fde6bt32bd75c156b399b4@mail.gmail.com> Message-ID: <4A6601E7.3090008@gmail.com> On 2009-07-21 20:35, Daniel Dunbar wrote: > Is there an easy way to do this more globally? I would love to have an easy way to do it globally. Short of patching everything to poison memory before free I don't know of another easy way. I was hoping that providing a custom delete operator would work, but that only takes the pointer as parameter, and not the size :( Another option would be to use our own memory manager, but that would cause problems such as valgrind not being able to trace allocations, and different behavior versus release mode where system's MM is used. > I would support > enabling this globally in Debug (but not Release) mode, it increases > determinism across platforms, frequently small memory errors only show > up on one platform or another. > > Yes, this can be a useful debug tool, especially when running llvm-gcc under valgrind is too slow to be bugpointable. Best regards, --Edwin From sabre at nondot.org Tue Jul 21 13:00:16 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 18:00:16 -0000 Subject: [llvm-commits] [llvm] r76596 - /llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp Message-ID: <200907211800.n6LI0KUg004077@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 12:59:36 2009 New Revision: 76596 URL: http://llvm.org/viewvc/llvm-project?rev=76596&view=rev Log: reduce indentation by using an early exit. Modified: llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp Modified: llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp?rev=76596&r1=76595&r2=76596&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp Tue Jul 21 12:59:36 2009 @@ -136,87 +136,82 @@ } } -void XCoreAsmPrinter:: -emitGlobal(const GlobalVariable *GV) -{ +void XCoreAsmPrinter::emitGlobal(const GlobalVariable *GV) { + // Check to see if this is a special global used by LLVM, if so, emit it. + if (!GV->hasInitializer() || + EmitSpecialLLVMGlobal(GV)) + return; + const TargetData *TD = TM.getTargetData(); + + SwitchToSection(TAI->SectionForGlobal(GV)); + + std::string name = Mang->getMangledName(GV); + Constant *C = GV->getInitializer(); + unsigned Align = (unsigned)TD->getPreferredTypeAlignmentShift(C->getType()); + + // Mark the start of the global + O << "\t.cc_top " << name << ".data," << name << "\n"; - if (GV->hasInitializer()) { - // Check to see if this is a special global used by LLVM, if so, emit it. - if (EmitSpecialLLVMGlobal(GV)) - return; - - SwitchToSection(TAI->SectionForGlobal(GV)); - - std::string name = Mang->getMangledName(GV); - Constant *C = GV->getInitializer(); - unsigned Align = (unsigned)TD->getPreferredTypeAlignmentShift(C->getType()); - - // Mark the start of the global - O << "\t.cc_top " << name << ".data," << name << "\n"; - - switch (GV->getLinkage()) { - case GlobalValue::AppendingLinkage: - llvm_report_error("AppendingLinkage is not supported by this target!"); - case GlobalValue::LinkOnceAnyLinkage: - case GlobalValue::LinkOnceODRLinkage: - case GlobalValue::WeakAnyLinkage: - case GlobalValue::WeakODRLinkage: - case GlobalValue::ExternalLinkage: - emitArrayBound(name, GV); - emitGlobalDirective(name); - // TODO Use COMDAT groups for LinkOnceLinkage - if (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage()) { - O << TAI->getWeakDefDirective() << name << "\n"; - } - // FALL THROUGH - case GlobalValue::InternalLinkage: - case GlobalValue::PrivateLinkage: - case GlobalValue::LinkerPrivateLinkage: - break; - case GlobalValue::GhostLinkage: - llvm_unreachable("Should not have any unmaterialized functions!"); - case GlobalValue::DLLImportLinkage: - llvm_unreachable("DLLImport linkage is not supported by this target!"); - case GlobalValue::DLLExportLinkage: - llvm_unreachable("DLLExport linkage is not supported by this target!"); - default: - llvm_unreachable("Unknown linkage type!"); + switch (GV->getLinkage()) { + case GlobalValue::AppendingLinkage: + llvm_report_error("AppendingLinkage is not supported by this target!"); + case GlobalValue::LinkOnceAnyLinkage: + case GlobalValue::LinkOnceODRLinkage: + case GlobalValue::WeakAnyLinkage: + case GlobalValue::WeakODRLinkage: + case GlobalValue::ExternalLinkage: + emitArrayBound(name, GV); + emitGlobalDirective(name); + // TODO Use COMDAT groups for LinkOnceLinkage + if (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage()) { + O << TAI->getWeakDefDirective() << name << "\n"; } + // FALL THROUGH + case GlobalValue::InternalLinkage: + case GlobalValue::PrivateLinkage: + case GlobalValue::LinkerPrivateLinkage: + break; + case GlobalValue::GhostLinkage: + llvm_unreachable("Should not have any unmaterialized functions!"); + case GlobalValue::DLLImportLinkage: + llvm_unreachable("DLLImport linkage is not supported by this target!"); + case GlobalValue::DLLExportLinkage: + llvm_unreachable("DLLExport linkage is not supported by this target!"); + default: + llvm_unreachable("Unknown linkage type!"); + } - EmitAlignment(Align, GV, 2); - - unsigned Size = TD->getTypeAllocSize(C->getType()); - if (GV->isThreadLocal()) { - Size *= MaxThreads; - } - if (TAI->hasDotTypeDotSizeDirective()) { - O << "\t.type " << name << ", at object\n"; - O << "\t.size " << name << "," << Size << "\n"; - } - O << name << ":\n"; - - EmitGlobalConstant(C); - if (GV->isThreadLocal()) { - for (unsigned i = 1; i < MaxThreads; ++i) { - EmitGlobalConstant(C); - } - } - if (Size < 4) { - // The ABI requires that unsigned scalar types smaller than 32 bits - // are are padded to 32 bits. - EmitZeros(4 - Size); + EmitAlignment(Align, GV, 2); + + unsigned Size = TD->getTypeAllocSize(C->getType()); + if (GV->isThreadLocal()) { + Size *= MaxThreads; + } + if (TAI->hasDotTypeDotSizeDirective()) { + O << "\t.type " << name << ", at object\n"; + O << "\t.size " << name << "," << Size << "\n"; + } + O << name << ":\n"; + + EmitGlobalConstant(C); + if (GV->isThreadLocal()) { + for (unsigned i = 1; i < MaxThreads; ++i) { + EmitGlobalConstant(C); } - - // Mark the end of the global - O << "\t.cc_bottom " << name << ".data\n"; } + if (Size < 4) { + // The ABI requires that unsigned scalar types smaller than 32 bits + // are are padded to 32 bits. + EmitZeros(4 - Size); + } + + // Mark the end of the global + O << "\t.cc_bottom " << name << ".data\n"; } /// Emit the directives on the start of functions -void XCoreAsmPrinter:: -emitFunctionStart(MachineFunction &MF) -{ +void XCoreAsmPrinter::emitFunctionStart(MachineFunction &MF) { // Print out the label for the function. const Function *F = MF.getFunction(); From edwintorok at gmail.com Tue Jul 21 13:01:41 2009 From: edwintorok at gmail.com (Torok Edwin) Date: Tue, 21 Jul 2009 18:01:41 -0000 Subject: [llvm-commits] [llvm] r76597 - /llvm/trunk/include/llvm/ADT/DenseMap.h Message-ID: <200907211801.n6LI1hdo004158@zion.cs.uiuc.edu> Author: edwin Date: Tue Jul 21 13:01:37 2009 New Revision: 76597 URL: http://llvm.org/viewvc/llvm-project?rev=76597&view=rev Log: Add freed memory poisoning in !NDEBUG mode for DenseMap. Modified: llvm/trunk/include/llvm/ADT/DenseMap.h Modified: llvm/trunk/include/llvm/ADT/DenseMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=76597&r1=76596&r2=76597&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/DenseMap.h (original) +++ llvm/trunk/include/llvm/ADT/DenseMap.h Tue Jul 21 13:01:37 2009 @@ -17,6 +17,7 @@ #include "llvm/Support/PointerLikeTypeTraits.h" #include "llvm/Support/MathExtras.h" #include +#include #include #include @@ -160,6 +161,9 @@ P->second.~ValueT(); P->first.~KeyT(); } +#ifndef NDEBUG + memset(Buckets, 0x5a, sizeof(BucketT)*NumBuckets); +#endif operator delete(Buckets); } @@ -318,8 +322,12 @@ NumEntries = other.NumEntries; NumTombstones = other.NumTombstones; - if (NumBuckets) + if (NumBuckets) { +#ifndef NDEBUG + memset(Buckets, 0x5a, sizeof(BucketT)*NumBuckets); +#endif operator delete(Buckets); + } Buckets = static_cast(operator new(sizeof(BucketT) * other.NumBuckets)); @@ -465,6 +473,9 @@ B->first.~KeyT(); } +#ifndef NDEBUG + memset(OldBuckets, 0x5a, sizeof(BucketT)*OldNumBuckets); +#endif // Free the old table. operator delete(OldBuckets); } @@ -495,6 +506,9 @@ B->first.~KeyT(); } +#ifndef NDEBUG + memset(OldBuckets, 0x5a, sizeof(BucketT)*OldNumBuckets); +#endif // Free the old table. operator delete(OldBuckets); From resistor at mac.com Tue Jul 21 13:03:51 2009 From: resistor at mac.com (Owen Anderson) Date: Tue, 21 Jul 2009 18:03:51 -0000 Subject: [llvm-commits] [llvm] r76598 - in /llvm/trunk: include/llvm/ lib/Analysis/ lib/AsmParser/ lib/CodeGen/SelectionDAG/ lib/Transforms/IPO/ lib/Transforms/Scalar/ lib/VMCore/ Message-ID: <200907211803.n6LI3wx9004278@zion.cs.uiuc.edu> Author: resistor Date: Tue Jul 21 13:03:38 2009 New Revision: 76598 URL: http://llvm.org/viewvc/llvm-project?rev=76598&view=rev Log: Rename getConstantInt{True|False} to get{True|False} at Chris' behest. Modified: llvm/trunk/include/llvm/LLVMContext.h llvm/trunk/lib/Analysis/SparsePropagation.cpp llvm/trunk/lib/AsmParser/LLParser.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp llvm/trunk/lib/Transforms/Scalar/GVN.cpp llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp llvm/trunk/lib/Transforms/Scalar/SCCP.cpp llvm/trunk/lib/VMCore/ConstantFold.cpp llvm/trunk/lib/VMCore/LLVMContext.cpp llvm/trunk/lib/VMCore/LLVMContextImpl.h Modified: llvm/trunk/include/llvm/LLVMContext.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LLVMContext.h?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/include/llvm/LLVMContext.h (original) +++ llvm/trunk/include/llvm/LLVMContext.h Tue Jul 21 13:03:38 2009 @@ -68,8 +68,8 @@ UndefValue* getUndef(const Type* Ty); // ConstantInt accessors - ConstantInt* getConstantIntTrue(); - ConstantInt* getConstantIntFalse(); + ConstantInt* getTrue(); + ConstantInt* getFalse(); /// If Ty is a vector type, return a Constant with a splat of the given /// value. Otherwise return a ConstantInt for the given value. Modified: llvm/trunk/lib/Analysis/SparsePropagation.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/SparsePropagation.cpp?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/SparsePropagation.cpp (original) +++ llvm/trunk/lib/Analysis/SparsePropagation.cpp Tue Jul 21 13:03:38 2009 @@ -154,7 +154,7 @@ } // Constant condition variables mean the branch can only go a single way - Succs[C == Context->getConstantIntFalse()] = true; + Succs[C == Context->getFalse()] = true; return; } Modified: llvm/trunk/lib/AsmParser/LLParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/LLParser.cpp (original) +++ llvm/trunk/lib/AsmParser/LLParser.cpp Tue Jul 21 13:03:38 2009 @@ -1706,11 +1706,11 @@ ID.Kind = ValID::t_APFloat; break; case lltok::kw_true: - ID.ConstantVal = Context.getConstantIntTrue(); + ID.ConstantVal = Context.getTrue(); ID.Kind = ValID::t_Constant; break; case lltok::kw_false: - ID.ConstantVal = Context.getConstantIntFalse(); + ID.ConstantVal = Context.getFalse(); ID.Kind = ValID::t_Constant; break; case lltok::kw_null: ID.Kind = ValID::t_Null; break; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Tue Jul 21 13:03:38 2009 @@ -1149,7 +1149,7 @@ } // Create a CaseBlock record representing this branch. - CaseBlock CB(ISD::SETEQ, Cond, DAG.getContext()->getConstantIntTrue(), + CaseBlock CB(ISD::SETEQ, Cond, DAG.getContext()->getTrue(), NULL, TBB, FBB, CurBB); SwitchCases.push_back(CB); } @@ -1304,7 +1304,7 @@ } // Create a CaseBlock record representing this branch. - CaseBlock CB(ISD::SETEQ, CondVal, DAG.getContext()->getConstantIntTrue(), + CaseBlock CB(ISD::SETEQ, CondVal, DAG.getContext()->getTrue(), NULL, Succ0MBB, Succ1MBB, CurMBB); // Use visitSwitchCase to actually insert the fast branch sequence for this // cond branch. @@ -1322,10 +1322,10 @@ if (CB.CmpMHS == NULL) { // Fold "(X == true)" to X and "(X == false)" to !X to // handle common cases produced by branch lowering. - if (CB.CmpRHS == DAG.getContext()->getConstantIntTrue() && + if (CB.CmpRHS == DAG.getContext()->getTrue() && CB.CC == ISD::SETEQ) Cond = CondLHS; - else if (CB.CmpRHS == DAG.getContext()->getConstantIntFalse() && + else if (CB.CmpRHS == DAG.getContext()->getFalse() && CB.CC == ISD::SETEQ) { SDValue True = DAG.getConstant(1, CondLHS.getValueType()); Cond = DAG.getNode(ISD::XOR, dl, CondLHS.getValueType(), CondLHS, True); Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Tue Jul 21 13:03:38 2009 @@ -865,7 +865,7 @@ GlobalVariable *InitBool = new GlobalVariable(*Context, Type::Int1Ty, false, GlobalValue::InternalLinkage, - Context->getConstantIntFalse(), GV->getName()+".init", + Context->getFalse(), GV->getName()+".init", GV->isThreadLocal()); bool InitBoolUsed = false; @@ -886,7 +886,7 @@ default: llvm_unreachable("Unknown ICmp Predicate!"); case ICmpInst::ICMP_ULT: case ICmpInst::ICMP_SLT: - LV = Context->getConstantIntFalse(); // X < null -> always false + LV = Context->getFalse(); // X < null -> always false break; case ICmpInst::ICMP_ULE: case ICmpInst::ICMP_SLE: @@ -908,7 +908,7 @@ } else { StoreInst *SI = cast(GV->use_back()); // The global is initialized when the store to it occurs. - new StoreInst(Context->getConstantIntTrue(), InitBool, SI); + new StoreInst(Context->getTrue(), InitBool, SI); SI->eraseFromParent(); } @@ -1583,7 +1583,7 @@ // Create the new global, initializing it to false. GlobalVariable *NewGV = new GlobalVariable(*Context, Type::Int1Ty, false, - GlobalValue::InternalLinkage, Context->getConstantIntFalse(), + GlobalValue::InternalLinkage, Context->getFalse(), GV->getName()+".b", GV->isThreadLocal()); GV->getParent()->getGlobalList().insert(GV, NewGV); Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Jul 21 13:03:38 2009 @@ -1384,9 +1384,9 @@ BasicBlock* falseSucc = BI->getSuccessor(1); if (trueSucc->getSinglePredecessor()) - localAvail[trueSucc]->table[condVN] = Context->getConstantIntTrue(); + localAvail[trueSucc]->table[condVN] = Context->getTrue(); if (falseSucc->getSinglePredecessor()) - localAvail[falseSucc]->table[condVN] = Context->getConstantIntFalse(); + localAvail[falseSucc]->table[condVN] = Context->getFalse(); return false; Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Tue Jul 21 13:03:38 2009 @@ -2876,8 +2876,8 @@ *I = SI->getOperand(NonNullOperand); AddToWorkList(BBI); } else if (*I == SelectCond) { - *I = NonNullOperand == 1 ? Context->getConstantIntTrue() : - Context->getConstantIntFalse(); + *I = NonNullOperand == 1 ? Context->getTrue() : + Context->getFalse(); AddToWorkList(BBI); } } @@ -3371,7 +3371,7 @@ LLVMContext *Context) { switch (code) { default: llvm_unreachable("Illegal ICmp code!"); - case 0: return Context->getConstantIntFalse(); + case 0: return Context->getFalse(); case 1: if (sign) return new ICmpInst(*Context, ICmpInst::ICMP_SGT, LHS, RHS); @@ -3394,7 +3394,7 @@ return new ICmpInst(*Context, ICmpInst::ICMP_SLE, LHS, RHS); else return new ICmpInst(*Context, ICmpInst::ICMP_ULE, LHS, RHS); - case 7: return Context->getConstantIntTrue(); + case 7: return Context->getTrue(); } } @@ -3440,7 +3440,7 @@ return new FCmpInst(*Context, FCmpInst::FCMP_OLE, LHS, RHS); else return new FCmpInst(*Context, FCmpInst::FCMP_ULE, LHS, RHS); - case 7: return Context->getConstantIntTrue(); + case 7: return Context->getTrue(); } } @@ -3825,7 +3825,7 @@ case ICmpInst::ICMP_EQ: // (X == 13 & X == 15) -> false case ICmpInst::ICMP_UGT: // (X == 13 & X > 15) -> false case ICmpInst::ICMP_SGT: // (X == 13 & X > 15) -> false - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); case ICmpInst::ICMP_NE: // (X == 13 & X != 15) -> X == 13 case ICmpInst::ICMP_ULT: // (X == 13 & X < 15) -> X == 13 case ICmpInst::ICMP_SLT: // (X == 13 & X < 15) -> X == 13 @@ -3863,7 +3863,7 @@ default: llvm_unreachable("Unknown integer condition code!"); case ICmpInst::ICMP_EQ: // (X u< 13 & X == 15) -> false case ICmpInst::ICMP_UGT: // (X u< 13 & X u> 15) -> false - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); case ICmpInst::ICMP_SGT: // (X u< 13 & X s> 15) -> no change break; case ICmpInst::ICMP_NE: // (X u< 13 & X != 15) -> X u< 13 @@ -3878,7 +3878,7 @@ default: llvm_unreachable("Unknown integer condition code!"); case ICmpInst::ICMP_EQ: // (X s< 13 & X == 15) -> false case ICmpInst::ICMP_SGT: // (X s< 13 & X s> 15) -> false - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); case ICmpInst::ICMP_UGT: // (X s< 13 & X u> 15) -> no change break; case ICmpInst::ICMP_NE: // (X s< 13 & X != 15) -> X < 13 @@ -4211,7 +4211,7 @@ // If either of the constants are nans, then the whole thing returns // false. if (LHSC->getValueAPF().isNaN() || RHSC->getValueAPF().isNaN()) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); return new FCmpInst(*Context, FCmpInst::FCMP_ORD, LHS->getOperand(0), RHS->getOperand(0)); } @@ -4234,7 +4234,7 @@ Op0LHS, Op0RHS); else if (Op0CC == FCmpInst::FCMP_FALSE || Op1CC == FCmpInst::FCMP_FALSE) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); else if (Op0CC == FCmpInst::FCMP_TRUE) return ReplaceInstUsesWith(I, Op1); else if (Op1CC == FCmpInst::FCMP_TRUE) @@ -4256,7 +4256,7 @@ // uno && oeq -> uno && (ord && eq) -> false // uno && ord -> false if (!Op0Ordered) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); // ord && ueq -> ord && (uno || eq) -> oeq return cast(getFCmpValue(true, Op1Pred, Op0LHS, Op0RHS, Context)); @@ -4541,7 +4541,7 @@ case ICmpInst::ICMP_NE: // (X != 13 | X != 15) -> true case ICmpInst::ICMP_ULT: // (X != 13 | X u< 15) -> true case ICmpInst::ICMP_SLT: // (X != 13 | X s< 15) -> true - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); } break; case ICmpInst::ICMP_ULT: @@ -4596,7 +4596,7 @@ break; case ICmpInst::ICMP_NE: // (X u> 13 | X != 15) -> true case ICmpInst::ICMP_ULT: // (X u> 13 | X u< 15) -> true - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); case ICmpInst::ICMP_SLT: // (X u> 13 | X s< 15) -> no change break; } @@ -4611,7 +4611,7 @@ break; case ICmpInst::ICMP_NE: // (X s> 13 | X != 15) -> true case ICmpInst::ICMP_SLT: // (X s> 13 | X s< 15) -> true - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); case ICmpInst::ICMP_ULT: // (X s> 13 | X u< 15) -> no change break; } @@ -4919,7 +4919,7 @@ // If either of the constants are nans, then the whole thing returns // true. if (LHSC->getValueAPF().isNaN() || RHSC->getValueAPF().isNaN()) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); // Otherwise, no need to compare the two constants, compare the // rest. @@ -4945,7 +4945,7 @@ Op0LHS, Op0RHS); else if (Op0CC == FCmpInst::FCMP_TRUE || Op1CC == FCmpInst::FCMP_TRUE) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); else if (Op0CC == FCmpInst::FCMP_FALSE) return ReplaceInstUsesWith(I, Op1); else if (Op1CC == FCmpInst::FCMP_FALSE) @@ -5037,7 +5037,7 @@ if (ConstantInt *RHS = dyn_cast(Op1)) { - if (RHS == Context->getConstantIntTrue() && Op0->hasOneUse()) { + if (RHS == Context->getTrue() && Op0->hasOneUse()) { // xor (cmp A, B), true = not (cmp A, B) = !cmp A, B if (ICmpInst *ICI = dyn_cast(Op0)) return new ICmpInst(*Context, ICI->getInversePredicate(), @@ -5055,7 +5055,7 @@ Instruction::CastOps Opcode = Op0C->getOpcode(); if (Opcode == Instruction::ZExt || Opcode == Instruction::SExt) { if (RHS == Context->getConstantExprCast(Opcode, - Context->getConstantIntTrue(), + Context->getTrue(), Op0C->getDestTy())) { Instruction *NewCI = InsertNewInstBefore(CmpInst::Create( *Context, @@ -5706,9 +5706,9 @@ Pred = ICmpInst::ICMP_NE; break; case FCmpInst::FCMP_ORD: - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); case FCmpInst::FCMP_UNO: - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); } const IntegerType *IntTy = cast(LHSI->getOperand(0)->getType()); @@ -5728,8 +5728,8 @@ if (SMax.compare(RHS) == APFloat::cmpLessThan) { // smax < 13123.0 if (Pred == ICmpInst::ICMP_NE || Pred == ICmpInst::ICMP_SLT || Pred == ICmpInst::ICMP_SLE) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getTrue()); + return ReplaceInstUsesWith(I, Context->getFalse()); } } else { // If the RHS value is > UnsignedMax, fold the comparison. This handles @@ -5740,8 +5740,8 @@ if (UMax.compare(RHS) == APFloat::cmpLessThan) { // umax < 13123.0 if (Pred == ICmpInst::ICMP_NE || Pred == ICmpInst::ICMP_ULT || Pred == ICmpInst::ICMP_ULE) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getTrue()); + return ReplaceInstUsesWith(I, Context->getFalse()); } } @@ -5753,8 +5753,8 @@ if (SMin.compare(RHS) == APFloat::cmpGreaterThan) { // smin > 12312.0 if (Pred == ICmpInst::ICMP_NE || Pred == ICmpInst::ICMP_SGT || Pred == ICmpInst::ICMP_SGE) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getTrue()); + return ReplaceInstUsesWith(I, Context->getFalse()); } } @@ -5776,14 +5776,14 @@ switch (Pred) { default: llvm_unreachable("Unexpected integer comparison!"); case ICmpInst::ICMP_NE: // (float)int != 4.4 --> true - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); case ICmpInst::ICMP_EQ: // (float)int == 4.4 --> false - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); case ICmpInst::ICMP_ULE: // (float)int <= 4.4 --> int <= 4 // (float)int <= -4.4 --> false if (RHS.isNegative()) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); break; case ICmpInst::ICMP_SLE: // (float)int <= 4.4 --> int <= 4 @@ -5795,7 +5795,7 @@ // (float)int < -4.4 --> false // (float)int < 4.4 --> int <= 4 if (RHS.isNegative()) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); Pred = ICmpInst::ICMP_ULE; break; case ICmpInst::ICMP_SLT: @@ -5808,7 +5808,7 @@ // (float)int > 4.4 --> int > 4 // (float)int > -4.4 --> true if (RHS.isNegative()) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); break; case ICmpInst::ICMP_SGT: // (float)int > 4.4 --> int > 4 @@ -5820,7 +5820,7 @@ // (float)int >= -4.4 --> true // (float)int >= 4.4 --> int > 4 if (!RHS.isNegative()) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); Pred = ICmpInst::ICMP_UGT; break; case ICmpInst::ICMP_SGE: @@ -5844,9 +5844,9 @@ // Fold trivial predicates. if (I.getPredicate() == FCmpInst::FCMP_FALSE) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); if (I.getPredicate() == FCmpInst::FCMP_TRUE) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); // Simplify 'fcmp pred X, X' if (Op0 == Op1) { @@ -5855,11 +5855,11 @@ case FCmpInst::FCMP_UEQ: // True if unordered or equal case FCmpInst::FCMP_UGE: // True if unordered, greater than, or equal case FCmpInst::FCMP_ULE: // True if unordered, less than, or equal - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); case FCmpInst::FCMP_OGT: // True if ordered and greater than case FCmpInst::FCMP_OLT: // True if ordered and less than case FCmpInst::FCMP_ONE: // True if ordered and operands are unequal - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); case FCmpInst::FCMP_UNO: // True if unordered: isnan(X) | isnan(Y) case FCmpInst::FCMP_ULT: // True if unordered or less than @@ -5890,11 +5890,11 @@ if (ConstantFP *CFP = dyn_cast(RHSC)) { if (CFP->getValueAPF().isNaN()) { if (FCmpInst::isOrdered(I.getPredicate())) // True if ordered and... - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); assert(FCmpInst::isUnordered(I.getPredicate()) && "Comparison must be either ordered or unordered!"); // True if unordered. - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); } } @@ -6044,22 +6044,22 @@ default: break; case ICmpInst::ICMP_ULE: if (CI->isMaxValue(false)) // A <=u MAX -> TRUE - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); return new ICmpInst(*Context, ICmpInst::ICMP_ULT, Op0, AddOne(CI, Context)); case ICmpInst::ICMP_SLE: if (CI->isMaxValue(true)) // A <=s MAX -> TRUE - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); return new ICmpInst(*Context, ICmpInst::ICMP_SLT, Op0, AddOne(CI, Context)); case ICmpInst::ICMP_UGE: if (CI->isMinValue(false)) // A >=u MIN -> TRUE - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); return new ICmpInst(*Context, ICmpInst::ICMP_UGT, Op0, SubOne(CI, Context)); case ICmpInst::ICMP_SGE: if (CI->isMinValue(true)) // A >=s MIN -> TRUE - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); return new ICmpInst(*Context, ICmpInst::ICMP_SGT, Op0, SubOne(CI, Context)); } @@ -6119,17 +6119,17 @@ default: llvm_unreachable("Unknown icmp opcode!"); case ICmpInst::ICMP_EQ: if (Op0Max.ult(Op1Min) || Op0Min.ugt(Op1Max)) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); break; case ICmpInst::ICMP_NE: if (Op0Max.ult(Op1Min) || Op0Min.ugt(Op1Max)) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); break; case ICmpInst::ICMP_ULT: if (Op0Max.ult(Op1Min)) // A true if max(A) < min(B) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); if (Op0Min.uge(Op1Max)) // A false if min(A) >= max(B) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); if (Op1Min == Op0Max) // A A != B if max(A) == min(B) return new ICmpInst(*Context, ICmpInst::ICMP_NE, Op0, Op1); if (ConstantInt *CI = dyn_cast(Op1)) { @@ -6145,9 +6145,9 @@ break; case ICmpInst::ICMP_UGT: if (Op0Min.ugt(Op1Max)) // A >u B -> true if min(A) > max(B) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); if (Op0Max.ule(Op1Min)) // A >u B -> false if max(A) <= max(B) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); if (Op1Max == Op0Min) // A >u B -> A != B if min(A) == max(B) return new ICmpInst(*Context, ICmpInst::ICMP_NE, Op0, Op1); @@ -6164,9 +6164,9 @@ break; case ICmpInst::ICMP_SLT: if (Op0Max.slt(Op1Min)) // A true if max(A) < min(C) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); if (Op0Min.sge(Op1Max)) // A false if min(A) >= max(C) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); if (Op1Min == Op0Max) // A A != B if max(A) == min(B) return new ICmpInst(*Context, ICmpInst::ICMP_NE, Op0, Op1); if (ConstantInt *CI = dyn_cast(Op1)) { @@ -6177,9 +6177,9 @@ break; case ICmpInst::ICMP_SGT: if (Op0Min.sgt(Op1Max)) // A >s B -> true if min(A) > max(B) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); if (Op0Max.sle(Op1Min)) // A >s B -> false if max(A) <= min(B) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); if (Op1Max == Op0Min) // A >s B -> A != B if min(A) == max(B) return new ICmpInst(*Context, ICmpInst::ICMP_NE, Op0, Op1); @@ -6192,30 +6192,30 @@ case ICmpInst::ICMP_SGE: assert(!isa(Op1) && "ICMP_SGE with ConstantInt not folded!"); if (Op0Min.sge(Op1Max)) // A >=s B -> true if min(A) >= max(B) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); if (Op0Max.slt(Op1Min)) // A >=s B -> false if max(A) < min(B) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); break; case ICmpInst::ICMP_SLE: assert(!isa(Op1) && "ICMP_SLE with ConstantInt not folded!"); if (Op0Max.sle(Op1Min)) // A <=s B -> true if max(A) <= min(B) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); if (Op0Min.sgt(Op1Max)) // A <=s B -> false if min(A) > max(B) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); break; case ICmpInst::ICMP_UGE: assert(!isa(Op1) && "ICMP_UGE with ConstantInt not folded!"); if (Op0Min.uge(Op1Max)) // A >=u B -> true if min(A) >= max(B) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); if (Op0Max.ult(Op1Min)) // A >=u B -> false if max(A) < min(B) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); break; case ICmpInst::ICMP_ULE: assert(!isa(Op1) && "ICMP_ULE with ConstantInt not folded!"); if (Op0Max.ule(Op1Min)) // A <=u B -> true if max(A) <= min(B) - return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(I, Context->getTrue()); if (Op0Min.ugt(Op1Max)) // A <=u B -> false if min(A) > max(B) - return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(I, Context->getFalse()); break; } @@ -6628,7 +6628,7 @@ default: llvm_unreachable("Unhandled icmp opcode!"); case ICmpInst::ICMP_EQ: if (LoOverflow && HiOverflow) - return ReplaceInstUsesWith(ICI, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(ICI, Context->getFalse()); else if (HiOverflow) return new ICmpInst(*Context, DivIsSigned ? ICmpInst::ICMP_SGE : ICmpInst::ICMP_UGE, X, LoBound); @@ -6639,7 +6639,7 @@ return InsertRangeTest(X, LoBound, HiBound, DivIsSigned, true, ICI); case ICmpInst::ICMP_NE: if (LoOverflow && HiOverflow) - return ReplaceInstUsesWith(ICI, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(ICI, Context->getTrue()); else if (HiOverflow) return new ICmpInst(*Context, DivIsSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT, X, LoBound); @@ -6651,16 +6651,16 @@ case ICmpInst::ICMP_ULT: case ICmpInst::ICMP_SLT: if (LoOverflow == +1) // Low bound is greater than input range. - return ReplaceInstUsesWith(ICI, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(ICI, Context->getTrue()); if (LoOverflow == -1) // Low bound is less than input range. - return ReplaceInstUsesWith(ICI, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(ICI, Context->getFalse()); return new ICmpInst(*Context, Pred, X, LoBound); case ICmpInst::ICMP_UGT: case ICmpInst::ICMP_SGT: if (HiOverflow == +1) // High bound greater than input range. - return ReplaceInstUsesWith(ICI, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(ICI, Context->getFalse()); else if (HiOverflow == -1) // High bound less than input range. - return ReplaceInstUsesWith(ICI, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(ICI, Context->getTrue()); if (Pred == ICmpInst::ICMP_UGT) return new ICmpInst(*Context, ICmpInst::ICMP_UGE, X, HiBound); else @@ -6829,9 +6829,9 @@ // As a special case, check to see if this means that the // result is always true or false now. if (ICI.getPredicate() == ICmpInst::ICMP_EQ) - return ReplaceInstUsesWith(ICI, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(ICI, Context->getFalse()); if (ICI.getPredicate() == ICmpInst::ICMP_NE) - return ReplaceInstUsesWith(ICI, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(ICI, Context->getTrue()); } else { ICI.setOperand(1, NewCst); Constant *NewAndCST; @@ -7252,9 +7252,9 @@ // First, handle some easy cases. We know the result cannot be equal at this // point so handle the ICI.isEquality() cases if (ICI.getPredicate() == ICmpInst::ICMP_EQ) - return ReplaceInstUsesWith(ICI, Context->getConstantIntFalse()); + return ReplaceInstUsesWith(ICI, Context->getFalse()); if (ICI.getPredicate() == ICmpInst::ICMP_NE) - return ReplaceInstUsesWith(ICI, Context->getConstantIntTrue()); + return ReplaceInstUsesWith(ICI, Context->getTrue()); // Evaluate the comparison for LT (we invert for GT below). LE and GE cases // should have been folded away previously and not enter in here. @@ -7262,9 +7262,9 @@ if (isSignedCmp) { // We're performing a signed comparison. if (cast(CI)->getValue().isNegative()) - Result = Context->getConstantIntFalse(); // X < (small) --> false + Result = Context->getFalse(); // X < (small) --> false else - Result = Context->getConstantIntTrue(); // X < (large) --> true + Result = Context->getTrue(); // X < (large) --> true } else { // We're performing an unsigned comparison. if (isSignedExt) { @@ -7275,7 +7275,7 @@ LHSCIOp, NegOne, ICI.getName()), ICI); } else { // Unsigned extend & unsigned compare -> always true. - Result = Context->getConstantIntTrue(); + Result = Context->getTrue(); } } @@ -8406,7 +8406,7 @@ // cast (xor bool X, true) to int --> xor (cast bool X to int), 1 if (isa(CI) && SrcBitSize == 1 && SrcI->getOpcode() == Instruction::Xor && - Op1 == Context->getConstantIntTrue() && + Op1 == Context->getTrue() && (!Op0->hasOneUse() || !isa(Op0))) { Value *New = InsertCastBefore(Instruction::ZExt, Op0, DestTy, CI); return BinaryOperator::CreateXor(New, @@ -10021,7 +10021,7 @@ Instruction *OldCall = CS.getInstruction(); // If the call and callee calling conventions don't match, this call must // be unreachable, as the call is undefined. - new StoreInst(Context->getConstantIntTrue(), + new StoreInst(Context->getTrue(), Context->getUndef(Context->getPointerTypeUnqual(Type::Int1Ty)), OldCall); if (!OldCall->use_empty()) @@ -10035,7 +10035,7 @@ // This instruction is not reachable, just remove it. We insert a store to // undef so that we know that this code is not reachable, despite the fact // that we can't modify the CFG here. - new StoreInst(Context->getConstantIntTrue(), + new StoreInst(Context->getTrue(), Context->getUndef(Context->getPointerTypeUnqual(Type::Int1Ty)), CS.getInstruction()); @@ -10046,7 +10046,7 @@ if (InvokeInst *II = dyn_cast(CS.getInstruction())) { // Don't break the CFG, insert a dummy cond branch. BranchInst::Create(II->getNormalDest(), II->getUnwindDest(), - Context->getConstantIntTrue(), II); + Context->getTrue(), II); } return EraseInstFromFunction(*CS.getInstruction()); } @@ -11354,7 +11354,7 @@ // free undef -> unreachable. if (isa(Op)) { // Insert a new store to null because we cannot modify the CFG here. - new StoreInst(Context->getConstantIntTrue(), + new StoreInst(Context->getTrue(), Context->getUndef(Context->getPointerTypeUnqual(Type::Int1Ty)), &FI); return EraseInstFromFunction(FI); } Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Tue Jul 21 13:03:38 2009 @@ -718,7 +718,7 @@ // Next, figure out which successor we are threading to. BasicBlock *SuccBB; if (BranchInst *BI = dyn_cast(BB->getTerminator())) - SuccBB = BI->getSuccessor(PredCst == Context->getConstantIntFalse()); + SuccBB = BI->getSuccessor(PredCst == Context->getFalse()); else { SwitchInst *SI = cast(BB->getTerminator()); SuccBB = SI->getSuccessor(SI->findCaseValue(PredCst)); @@ -803,7 +803,7 @@ if (LHS == RHS) if (isa(LHS->getType()) || isa(LHS->getType())) return ICmpInst::isTrueWhenEqual(pred) ? - Context->getConstantIntTrue() : Context->getConstantIntFalse(); + Context->getTrue() : Context->getFalse(); return 0; } Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Tue Jul 21 13:03:38 2009 @@ -233,7 +233,7 @@ Value *LoopCond = FindLIVLoopCondition(BI->getCondition(), currentLoop, Changed); if (LoopCond && UnswitchIfProfitable(LoopCond, - Context->getConstantIntTrue())) { + Context->getTrue())) { ++NumBranches; return true; } @@ -263,7 +263,7 @@ Value *LoopCond = FindLIVLoopCondition(SI->getCondition(), currentLoop, Changed); if (LoopCond && UnswitchIfProfitable(LoopCond, - Context->getConstantIntTrue())) { + Context->getTrue())) { ++NumSelects; return true; } @@ -351,10 +351,10 @@ // this. if ((LoopExitBB = isTrivialLoopExitBlock(currentLoop, BI->getSuccessor(0)))) { - if (Val) *Val = Context->getConstantIntTrue(); + if (Val) *Val = Context->getTrue(); } else if ((LoopExitBB = isTrivialLoopExitBlock(currentLoop, BI->getSuccessor(1)))) { - if (Val) *Val = Context->getConstantIntFalse(); + if (Val) *Val = Context->getFalse(); } } else if (SwitchInst *SI = dyn_cast(HeaderTerm)) { // If this isn't a switch on Cond, we can't handle it. @@ -510,7 +510,7 @@ Value *BranchVal = LIC; if (!isa(Val) || Val->getType() != Type::Int1Ty) BranchVal = new ICmpInst(InsertPt, ICmpInst::ICMP_EQ, LIC, Val, "tmp"); - else if (Val != Context->getConstantIntTrue()) + else if (Val != Context->getTrue()) // We want to enter the new loop when the condition is true. std::swap(TrueDest, FalseDest); @@ -947,7 +947,7 @@ Instruction* OldTerm = Old->getTerminator(); BranchInst::Create(Split, SISucc, - Context->getConstantIntTrue(), OldTerm); + Context->getTrue(), OldTerm); LPM->deleteSimpleAnalysisValue(Old->getTerminator(), L); Old->getTerminator()->eraseFromParent(); Modified: llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp Tue Jul 21 13:03:38 2009 @@ -1691,7 +1691,7 @@ if (Constant *C1 = dyn_cast(V1)) if (Constant *C2 = dyn_cast(V2)) return Context->getConstantExprCompare(Pred, C1, C2) == - Context->getConstantIntTrue(); + Context->getTrue(); unsigned n1 = VN.valueNumber(V1, Top); unsigned n2 = VN.valueNumber(V2, Top); @@ -1803,10 +1803,10 @@ // "icmp ult i32 %a, %y" EQ true then %a u< y // etc. - if (Canonical == Context->getConstantIntTrue()) { + if (Canonical == Context->getTrue()) { add(IC->getOperand(0), IC->getOperand(1), IC->getPredicate(), NewContext); - } else if (Canonical == Context->getConstantIntFalse()) { + } else if (Canonical == Context->getFalse()) { add(IC->getOperand(0), IC->getOperand(1), ICmpInst::getInversePredicate(IC->getPredicate()), NewContext); } @@ -1822,11 +1822,11 @@ if (isRelatedBy(True, False, ICmpInst::ICMP_NE)) { if (Canonical == VN.canonicalize(True, Top) || isRelatedBy(Canonical, False, ICmpInst::ICMP_NE)) - add(SI->getCondition(), Context->getConstantIntTrue(), + add(SI->getCondition(), Context->getTrue(), ICmpInst::ICMP_EQ, NewContext); else if (Canonical == VN.canonicalize(False, Top) || isRelatedBy(Canonical, True, ICmpInst::ICMP_NE)) - add(SI->getCondition(), Context->getConstantIntFalse(), + add(SI->getCondition(), Context->getFalse(), ICmpInst::ICMP_EQ, NewContext); } } else if (GetElementPtrInst *GEPI = dyn_cast(I)) { @@ -2050,9 +2050,9 @@ ICmpInst::Predicate Pred = IC->getPredicate(); if (isRelatedBy(Op0, Op1, Pred)) - add(IC, Context->getConstantIntTrue(), ICmpInst::ICMP_EQ, NewContext); + add(IC, Context->getTrue(), ICmpInst::ICMP_EQ, NewContext); else if (isRelatedBy(Op0, Op1, ICmpInst::getInversePredicate(Pred))) - add(IC, Context->getConstantIntFalse(), + add(IC, Context->getFalse(), ICmpInst::ICMP_EQ, NewContext); } else if (SelectInst *SI = dyn_cast(I)) { @@ -2064,9 +2064,9 @@ // %b EQ %c then %a EQ %b Value *Canonical = VN.canonicalize(SI->getCondition(), Top); - if (Canonical == Context->getConstantIntTrue()) { + if (Canonical == Context->getTrue()) { add(SI, SI->getTrueValue(), ICmpInst::ICMP_EQ, NewContext); - } else if (Canonical == Context->getConstantIntFalse()) { + } else if (Canonical == Context->getFalse()) { add(SI, SI->getFalseValue(), ICmpInst::ICMP_EQ, NewContext); } else if (VN.canonicalize(SI->getTrueValue(), Top) == VN.canonicalize(SI->getFalseValue(), Top)) { @@ -2156,7 +2156,7 @@ if (Constant *CI_L = dyn_cast(O.LHS)) { if (Constant *CI_R = dyn_cast(O.RHS)) { if (Context->getConstantExprCompare(O.Op, CI_L, CI_R) == - Context->getConstantIntFalse()) + Context->getFalse()) UB.mark(TopBB); WorkList.pop_front(); @@ -2458,7 +2458,7 @@ if (Dest == TrueDest) { DOUT << "(" << DTNode->getBlock()->getName() << ") true set:\n"; VRPSolver VRP(VN, IG, UB, VR, PS->DTDFS, PS->modified, Dest); - VRP.add(Context->getConstantIntTrue(), Condition, ICmpInst::ICMP_EQ); + VRP.add(Context->getTrue(), Condition, ICmpInst::ICMP_EQ); VRP.solve(); DEBUG(VN.dump()); DEBUG(IG.dump()); @@ -2466,7 +2466,7 @@ } else if (Dest == FalseDest) { DOUT << "(" << DTNode->getBlock()->getName() << ") false set:\n"; VRPSolver VRP(VN, IG, UB, VR, PS->DTDFS, PS->modified, Dest); - VRP.add(Context->getConstantIntFalse(), Condition, ICmpInst::ICMP_EQ); + VRP.add(Context->getFalse(), Condition, ICmpInst::ICMP_EQ); VRP.solve(); DEBUG(VN.dump()); DEBUG(IG.dump()); Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Tue Jul 21 13:03:38 2009 @@ -441,7 +441,7 @@ Succs[0] = Succs[1] = true; } else if (BCValue.isConstant()) { // Constant condition variables mean the branch can only go a single way - Succs[BCValue.getConstant() == Context->getConstantIntFalse()] = true; + Succs[BCValue.getConstant() == Context->getFalse()] = true; } } } else if (isa(&TI)) { @@ -486,7 +486,7 @@ // Constant condition variables mean the branch can only go a single way return BI->getSuccessor(BCValue.getConstant() == - Context->getConstantIntFalse()) == To; + Context->getFalse()) == To; } return false; } @@ -1487,7 +1487,7 @@ // as undef, then further analysis could think the undef went another way // leading to an inconsistent set of conclusions. if (BranchInst *BI = dyn_cast(TI)) { - BI->setCondition(Context->getConstantIntFalse()); + BI->setCondition(Context->getFalse()); } else { SwitchInst *SI = cast(TI); SI->setCondition(SI->getCaseValue(1)); Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Tue Jul 21 13:03:38 2009 @@ -1398,9 +1398,9 @@ // Don't try to evaluate aliases. External weak GV can be null. if (!isa(GV) && !GV->hasExternalWeakLinkage()) { if (pred == ICmpInst::ICMP_EQ) - return Context.getConstantIntFalse(); + return Context.getFalse(); else if (pred == ICmpInst::ICMP_NE) - return Context.getConstantIntTrue(); + return Context.getTrue(); } // icmp eq/ne(GV,null) -> false/true } else if (C2->isNullValue()) { @@ -1408,9 +1408,9 @@ // Don't try to evaluate aliases. External weak GV can be null. if (!isa(GV) && !GV->hasExternalWeakLinkage()) { if (pred == ICmpInst::ICMP_EQ) - return Context.getConstantIntFalse(); + return Context.getFalse(); else if (pred == ICmpInst::ICMP_NE) - return Context.getConstantIntTrue(); + return Context.getTrue(); } } @@ -1446,8 +1446,8 @@ APFloat::cmpResult R = C1V.compare(C2V); switch (pred) { default: llvm_unreachable("Invalid FCmp Predicate"); return 0; - case FCmpInst::FCMP_FALSE: return Context.getConstantIntFalse(); - case FCmpInst::FCMP_TRUE: return Context.getConstantIntTrue(); + case FCmpInst::FCMP_FALSE: return Context.getFalse(); + case FCmpInst::FCMP_TRUE: return Context.getTrue(); case FCmpInst::FCMP_UNO: return Context.getConstantInt(Type::Int1Ty, R==APFloat::cmpUnordered); case FCmpInst::FCMP_ORD: Modified: llvm/trunk/lib/VMCore/LLVMContext.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContext.cpp?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/LLVMContext.cpp (original) +++ llvm/trunk/lib/VMCore/LLVMContext.cpp Tue Jul 21 13:03:38 2009 @@ -80,16 +80,16 @@ } // ConstantInt accessors. -ConstantInt* LLVMContext::getConstantIntTrue() { +ConstantInt* LLVMContext::getTrue() { assert(this && "Context not initialized!"); assert(pImpl && "Context not initialized!"); - return pImpl->getConstantIntTrue(); + return pImpl->getTrue(); } -ConstantInt* LLVMContext::getConstantIntFalse() { +ConstantInt* LLVMContext::getFalse() { assert(this && "Context not initialized!"); assert(pImpl && "Context not initialized!"); - return pImpl->getConstantIntFalse(); + return pImpl->getFalse(); } Constant* LLVMContext::getConstantInt(const Type* Ty, uint64_t V, Modified: llvm/trunk/lib/VMCore/LLVMContextImpl.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContextImpl.h?rev=76598&r1=76597&r2=76598&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/LLVMContextImpl.h (original) +++ llvm/trunk/lib/VMCore/LLVMContextImpl.h Tue Jul 21 13:03:38 2009 @@ -120,14 +120,14 @@ MDNode *getMDNode(Value*const* Vals, unsigned NumVals); - ConstantInt *getConstantIntTrue() { + ConstantInt *getTrue() { if (TheTrueVal) return TheTrueVal; else return (TheTrueVal = Context.getConstantInt(IntegerType::get(1), 1)); } - ConstantInt *getConstantIntFalse() { + ConstantInt *getFalse() { if (TheFalseVal) return TheFalseVal; else From evan.cheng at apple.com Tue Jul 21 13:15:48 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 18:15:48 -0000 Subject: [llvm-commits] [llvm] r76600 - in /llvm/trunk: lib/Target/ARM/ARMInstrThumb.td test/CodeGen/Thumb2/2009-07-21-ISelBug.ll Message-ID: <200907211815.n6LIFsQp004887@zion.cs.uiuc.edu> Author: evancheng Date: Tue Jul 21 13:15:26 2009 New Revision: 76600 URL: http://llvm.org/viewvc/llvm-project?rev=76600&view=rev Log: Do not select tSXTB / tSXTH in thumb2 mode. Added: llvm/trunk/test/CodeGen/Thumb2/2009-07-21-ISelBug.ll Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=76600&r1=76599&r2=76600&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Tue Jul 21 13:15:26 2009 @@ -624,10 +624,10 @@ // If it's possible to use [r,r] address mode for sextload, select to // ldr{b|h} + sxt{b|h} instead. -def : TPat<(sextloadi8 t_addrmode_s1:$addr), - (tSXTB (tLDRB t_addrmode_s1:$addr))>; -def : TPat<(sextloadi16 t_addrmode_s2:$addr), - (tSXTH (tLDRH t_addrmode_s2:$addr))>; +def : T1Pat<(sextloadi8 t_addrmode_s1:$addr), + (tSXTB (tLDRB t_addrmode_s1:$addr))>; +def : T1Pat<(sextloadi16 t_addrmode_s2:$addr), + (tSXTH (tLDRH t_addrmode_s2:$addr))>; // Large immediate handling. Added: llvm/trunk/test/CodeGen/Thumb2/2009-07-21-ISelBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/2009-07-21-ISelBug.ll?rev=76600&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Thumb2/2009-07-21-ISelBug.ll (added) +++ llvm/trunk/test/CodeGen/Thumb2/2009-07-21-ISelBug.ll Tue Jul 21 13:15:26 2009 @@ -0,0 +1,34 @@ +; RUN: llvm-as < %s | llc -mtriple=thumbv7-apple-darwin9 -mattr=+vfp2,+thumb2 +; rdar://7076238 + +@"\01LC" = external constant [36 x i8], align 1 ; <[36 x i8]*> [#uses=1] + +define arm_apcscc i32 @getUnknown(i32, ...) nounwind { +entry: + %1 = load i8** undef, align 4 ; [#uses=3] + %2 = getelementptr i8* %1, i32 4 ; [#uses=1] + %3 = getelementptr i8* %1, i32 8 ; [#uses=1] + %4 = bitcast i8* %2 to i32* ; [#uses=1] + %5 = load i32* %4, align 4 ; [#uses=1] + %6 = trunc i32 %5 to i8 ; [#uses=1] + %7 = getelementptr i8* %1, i32 12 ; [#uses=1] + %8 = bitcast i8* %3 to i32* ; [#uses=1] + %9 = load i32* %8, align 4 ; [#uses=1] + %10 = trunc i32 %9 to i16 ; [#uses=1] + %11 = bitcast i8* %7 to i32* ; [#uses=1] + %12 = load i32* %11, align 4 ; [#uses=1] + %13 = trunc i32 %12 to i16 ; [#uses=1] + %14 = load i32* undef, align 4 ; [#uses=2] + %15 = sext i8 %6 to i32 ; [#uses=2] + %16 = sext i16 %10 to i32 ; [#uses=2] + %17 = sext i16 %13 to i32 ; [#uses=2] + %18 = call arm_apcscc i32 (i8*, ...)* @printf(i8* getelementptr ([36 x i8]* @"\01LC", i32 0, i32 0), i32 -128, i32 0, i32 %15, i32 %16, i32 %17, i32 0, i32 %14) nounwind ; [#uses=0] + %19 = add i32 0, %15 ; [#uses=1] + %20 = add i32 %19, %16 ; [#uses=1] + %21 = add i32 %20, %14 ; [#uses=1] + %22 = add i32 %21, %17 ; [#uses=1] + %23 = add i32 %22, 0 ; [#uses=1] + ret i32 %23 +} + +declare arm_apcscc i32 @printf(i8* nocapture, ...) nounwind From greened at obbligato.org Tue Jul 21 13:16:26 2009 From: greened at obbligato.org (David Greene) Date: Tue, 21 Jul 2009 18:16:26 -0000 Subject: [llvm-commits] [llvm] r76601 - /llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Message-ID: <200907211816.n6LIGRZV004913@zion.cs.uiuc.edu> Author: greened Date: Tue Jul 21 13:16:24 2009 New Revision: 76601 URL: http://llvm.org/viewvc/llvm-project?rev=76601&view=rev Log: Make a bunch of changes suggested by Chris and others to improve efficiency. Fix a few formatting bugs along the way. Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=76601&r1=76600&r2=76601&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Tue Jul 21 13:16:24 2009 @@ -97,10 +97,17 @@ /// GroupDelim - Remember the delimeter for a group operand. char GroupDelim[MAX_GROUP_NESTING_LEVEL]; + /// ReadingWhitespace - Tell whether we just read some whitespace. + bool ReadingWhitespace; + /// InGroup - Determine whether we are in the middle of an /// operand group. bool InGroup() const { return GroupLevel != -1; } + /// InWhitespace - Determine whether we are in the middle of + /// emitting whitespace. + bool InWhitespace() const { return ReadingWhitespace; } + AsmWriterInst(const CodeGenInstruction &CGI, unsigned Variant); /// MatchesAllButOneOp - If this instruction is exactly identical to the @@ -112,70 +119,6 @@ void AddLiteralString(const std::string &Str) { // If the last operand was already a literal text string, append this to // it, otherwise add a new operand. - - std::string::size_type SearchStart = 0; - std::string::size_type SpaceStartPos = std::string::npos; - do { - // Search for whitespace and replace with calls to set the - // output column. - SpaceStartPos = Str.find_first_of(" \t", SearchStart); - // Assume grouped text is one operand. - std::string::size_type StartDelimPos = Str.find_first_of("[{(", SearchStart); - - SearchStart = std::string::npos; - - if (StartDelimPos != std::string::npos) { - ++GroupLevel; - assert(GroupLevel < MAX_GROUP_NESTING_LEVEL - && "Exceeded maximum operand group nesting level"); - GroupDelim[GroupLevel] = Str[StartDelimPos]; - if (SpaceStartPos != std::string::npos && - SpaceStartPos > StartDelimPos) { - // This space doesn't count. - SpaceStartPos = std::string::npos; - } - } - - if (InGroup()) { - // Find the end delimiter. - char EndDelim = (GroupDelim[GroupLevel] == '{' ? '}' : - (GroupDelim[GroupLevel] == '(' ? ')' : ']')); - std::string::size_type EndDelimSearchStart = - StartDelimPos == std::string::npos ? 0 : StartDelimPos+1; - std::string::size_type EndDelimPos = Str.find(EndDelim, - EndDelimSearchStart); - SearchStart = EndDelimPos; - if (EndDelimPos != std::string::npos) { - // Iterate. - SearchStart = EndDelimPos + 1; - --GroupLevel; - assert(GroupLevel > -2 && "Too many end delimeters!"); - } - if (InGroup()) - SpaceStartPos = std::string::npos; - } - } while (SearchStart != std::string::npos); - - - if (SpaceStartPos != std::string::npos) { - std::string::size_type SpaceEndPos = - Str.find_first_not_of(" \t", SpaceStartPos+1); - if (SpaceStartPos != 0) { - // Emit the first part of the string. - AddLiteralString(Str.substr(0, SpaceStartPos)); - } - Operands.push_back( - AsmWriterOperand( - "O.PadToColumn(TAI->getOperandColumn(OperandColumn++), 1);\n", - AsmWriterOperand::isLiteralStatementOperand)); - if (SpaceEndPos != std::string::npos) { - // Emit the last part of the string. - AddLiteralString(Str.substr(SpaceEndPos)); - } - // We've emitted the whole string. - return; - } - if (!Operands.empty() && Operands.back().OperandType == AsmWriterOperand::isLiteralTextOperand) Operands.back().Str.append(Str); @@ -215,7 +158,7 @@ /// AsmWriterInst. /// AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI, unsigned Variant) - : GroupLevel(-1) { + : GroupLevel(-1), ReadingWhitespace(false) { this->CGI = &CGI; unsigned CurVariant = ~0U; // ~0 if we are outside a {.|.|.} region, other #. @@ -230,15 +173,92 @@ if (DollarPos == std::string::npos) DollarPos = AsmString.size(); // Emit a constant string fragment. + + // TODO: Recognize an operand separator to determine when to pad + // to the next operator. if (DollarPos != LastEmitted) { if (CurVariant == Variant || CurVariant == ~0U) { for (; LastEmitted != DollarPos; ++LastEmitted) switch (AsmString[LastEmitted]) { - case '\n': AddLiteralString("\\n"); break; - case '\t': AddLiteralString("\\t"); break; - case '"': AddLiteralString("\\\""); break; - case '\\': AddLiteralString("\\\\"); break; + case '\n': + assert(!InGroup() && "Missing matching group delimeter"); + ReadingWhitespace = false; + AddLiteralString("\\n"); + break; + case '\t': + if (!InGroup()) { + ReadingWhitespace = true; + } + AddLiteralString("\\t"); + break; + case '"': + if (InWhitespace() && !InGroup()) + Operands.push_back( + AsmWriterOperand( + "O.PadToColumn(TAI->getOperandColumn(OperandColumn++));\n", + AsmWriterOperand::isLiteralStatementOperand)); + ReadingWhitespace = false; + AddLiteralString("\\\""); + break; + case '\\': + if (InWhitespace() && !InGroup()) + Operands.push_back( + AsmWriterOperand( + "O.PadToColumn(TAI->getOperandColumn(OperandColumn++));\n", + AsmWriterOperand::isLiteralStatementOperand)); + ReadingWhitespace = false; + AddLiteralString("\\\\"); + break; + + case '(': // Fallthrough + case '[': + if (InWhitespace() && !InGroup()) + Operands.push_back( + AsmWriterOperand( + "O.PadToColumn(TAI->getOperandColumn(OperandColumn++));\n", + AsmWriterOperand::isLiteralStatementOperand)); + ReadingWhitespace = false; + + ++GroupLevel; + assert(GroupLevel < MAX_GROUP_NESTING_LEVEL + && "Exceeded maximum operand group nesting level"); + GroupDelim[GroupLevel] = AsmString[LastEmitted]; + AddLiteralString(std::string(1, AsmString[LastEmitted])); + break; + + case ')': // Fallthrough + case ']': + if (InWhitespace() && !InGroup()) + Operands.push_back( + AsmWriterOperand( + "O.PadToColumn(TAI->getOperandColumn(OperandColumn++));\n", + AsmWriterOperand::isLiteralStatementOperand)); + ReadingWhitespace = false; + + if (AsmString[LastEmitted] == ')') + assert(GroupDelim[GroupLevel] == '(' && "Mismatched delimeters"); + else + assert(GroupDelim[GroupLevel] == '[' && "Mismatched delimeters"); + + --GroupLevel; + assert(GroupLevel > -2 && "Too many end delimeters!"); + AddLiteralString(std::string(1, AsmString[LastEmitted])); + break; + default: + if (AsmString[LastEmitted] != ' ' && + AsmString[LastEmitted] != '\t') { + if (!InGroup() && InWhitespace()) + Operands.push_back( + AsmWriterOperand( + "O.PadToColumn(TAI->getOperandColumn(OperandColumn++));\n", + AsmWriterOperand::isLiteralStatementOperand)); + ReadingWhitespace = false; + } + else + if (!InGroup()) + ReadingWhitespace = true; + AddLiteralString(std::string(1, AsmString[LastEmitted])); break; } @@ -249,11 +269,33 @@ if (DollarPos+1 != AsmString.size() && (CurVariant == Variant || CurVariant == ~0U)) { if (AsmString[DollarPos+1] == 'n') { + assert(!InGroup() && "Missing matching group delimeter"); + ReadingWhitespace = false; AddLiteralString("\\n"); } else if (AsmString[DollarPos+1] == 't') { + if (!InGroup()) { + ReadingWhitespace = true; + } AddLiteralString("\\t"); } else if (std::string("${|}\\").find(AsmString[DollarPos+1]) != std::string::npos) { + if (InWhitespace() && !InGroup()) + Operands.push_back( + AsmWriterOperand( + "O.PadToColumn(TAI->getOperandColumn(OperandColumn++));\n", + AsmWriterOperand::isLiteralStatementOperand)); + ReadingWhitespace = false; + + if (AsmString[DollarPos+1] == '{') { + ++GroupLevel; + assert(GroupLevel < MAX_GROUP_NESTING_LEVEL + && "Exceeded maximum operand group nesting level"); + GroupDelim[GroupLevel] = AsmString[DollarPos+1]; + } else if (AsmString[DollarPos+1] == '}') { + assert(GroupDelim[GroupLevel] == '{' && "Mismatched delimeters"); + --GroupLevel; + assert(GroupLevel > -2 && "Too many end delimeters!"); + } AddLiteralString(std::string(1, AsmString[DollarPos+1])); } else { throw "Non-supported escaped character found in instruction '" + @@ -282,10 +324,24 @@ CurVariant = ~0U; } else if (DollarPos+1 != AsmString.size() && AsmString[DollarPos+1] == '$') { - if (CurVariant == Variant || CurVariant == ~0U) + if (CurVariant == Variant || CurVariant == ~0U) { + if (InWhitespace() && !InGroup()) + Operands.push_back( + AsmWriterOperand( + "O.PadToColumn(TAI->getOperandColumn(OperandColumn++));\n", + AsmWriterOperand::isLiteralStatementOperand)); + ReadingWhitespace = false; AddLiteralString("$"); // "$$" -> $ + } LastEmitted = DollarPos+2; } else { + if (InWhitespace() && !InGroup()) + Operands.push_back( + AsmWriterOperand( + "O.PadToColumn(TAI->getOperandColumn(OperandColumn++));\n", + AsmWriterOperand::isLiteralStatementOperand)); + ReadingWhitespace = false; + // Get the name of the variable. std::string::size_type VarEnd = DollarPos+1; @@ -791,15 +847,27 @@ O << " // Emit the opcode for the instruction.\n" << " unsigned Bits = OpInfo[MI->getOpcode()];\n" << " if (Bits == 0) return false;\n\n"; - - O << " std::string OpStr(AsmStrs+(Bits & " << (1 << AsmStrBits)-1 << "));\n" - << " unsigned OperandColumn = 1;\n" - << " O << OpStr;\n\n"; - - O << " if (OpStr.find_last_of(\" \\t\") == OpStr.size()-1) {\n" - << " O.PadToColumn(TAI->getOperandColumn(1));\n" - << " OperandColumn = 2;\n" + + O << " unsigned OperandColumn = 1;\n\n" + << " if (TAI->getOperandColumn(1) > 0) {\n" + << " // Don't emit trailing whitespace, let the column padding do it. This\n" + << " // guarantees that a stray long opcode + tab won't upset the alignment.\n" + << " unsigned OpLength = std::strlen(AsmStrs+(Bits & " << (1 << AsmStrBits)-1 << "));\n" + << " if (OpLength > 0 &&\n" + << " ((AsmStrs+(Bits & " << (1 << AsmStrBits)-1 << "))[OpLength-1] == ' ' ||\n" + << " (AsmStrs+(Bits & " << (1 << AsmStrBits)-1 << "))[OpLength-1] == '\\t')) {\n" + << " do {\n" + << " --OpLength;\n" + << " } while ((AsmStrs+(Bits & " << (1 << AsmStrBits)-1 << "))[OpLength-1] == ' ' ||\n" + << " (AsmStrs+(Bits & " << (1 << AsmStrBits)-1 << "))[OpLength-1] == '\\t');\n" + << " for (unsigned Idx = 0; Idx < OpLength; ++Idx)\n" + << " O << (AsmStrs+(Bits & " << (1 << AsmStrBits)-1 << "))[Idx];\n" + << " O.PadToColumn(TAI->getOperandColumn(OperandColumn++), 1);\n" + << " }\n" + << " } else {\n" + << " O << AsmStrs+(Bits & " << (1 << AsmStrBits)-1 << ");\n" << " }\n\n"; + // Output the table driven operand information. BitsLeft = 32-AsmStrBits; From greened at obbligato.org Tue Jul 21 13:21:48 2009 From: greened at obbligato.org (David Greene) Date: Tue, 21 Jul 2009 18:21:48 -0000 Subject: [llvm-commits] [llvm] r76602 - /llvm/trunk/include/llvm/Support/Dump.h Message-ID: <200907211821.n6LILmRe005187@zion.cs.uiuc.edu> Author: greened Date: Tue Jul 21 13:21:46 2009 New Revision: 76602 URL: http://llvm.org/viewvc/llvm-project?rev=76602&view=rev Log: Add a small utility class to configure IR printers. This will allow printers to do neat and wonderful things when printing debug information. The ideas is to allow passes to configer printers to emit pass-specific information when dumping IR. Added: llvm/trunk/include/llvm/Support/Dump.h Added: llvm/trunk/include/llvm/Support/Dump.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Dump.h?rev=76602&view=auto ============================================================================== --- llvm/trunk/include/llvm/Support/Dump.h (added) +++ llvm/trunk/include/llvm/Support/Dump.h Tue Jul 21 13:21:46 2009 @@ -0,0 +1,41 @@ +//===- llvm/Support/Dump.h - Easy way to tailor dump output -----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file provides the PrefixPrinter interface to pass to MachineFunction +// and MachineBasicBlock print methods to output additional information before +// blocks and instructions are printed. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_SUPPORT_DUMP_H +#define LLVM_SUPPORT_DUMP_H + +namespace llvm { + +class MachineBasicBlock; +class MachineInstr; + +// PrefixPrinter - Print some additional information before printing +// basic blocks and instructions. +class PrefixPrinter { +public: + virtual ~PrefixPrinter() {} + + virtual std::string operator()(const MachineBasicBlock &) const { + return(""); + }; + + virtual std::string operator()(const MachineInstr &) const { + return(""); + }; +}; + +} // End llvm namespace + +#endif From greened at obbligato.org Tue Jul 21 13:27:10 2009 From: greened at obbligato.org (David Greene) Date: Tue, 21 Jul 2009 18:27:10 -0000 Subject: [llvm-commits] [llvm] r76603 - in /llvm/trunk: include/llvm/CodeGen/MachineBasicBlock.h include/llvm/CodeGen/MachineFunction.h lib/CodeGen/MachineBasicBlock.cpp lib/CodeGen/MachineFunction.cpp Message-ID: <200907211827.n6LIRCdq005411@zion.cs.uiuc.edu> Author: greened Date: Tue Jul 21 13:27:05 2009 New Revision: 76603 URL: http://llvm.org/viewvc/llvm-project?rev=76603&view=rev Log: Add PrefixPrinter arguments to the dump routines for MachineFunction and MachineBasicBlock. We'll use these shortly. Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h llvm/trunk/include/llvm/CodeGen/MachineFunction.h llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp llvm/trunk/lib/CodeGen/MachineFunction.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h?rev=76603&r1=76602&r2=76603&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h Tue Jul 21 13:27:05 2009 @@ -16,6 +16,7 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/ADT/GraphTraits.h" +#include "llvm/Support/Dump.h" namespace llvm { @@ -309,8 +310,12 @@ // Debugging methods. void dump() const; - void print(std::ostream &OS) const; - void print(std::ostream *OS) const { if (OS) print(*OS); } + void print(std::ostream &OS, + const PrefixPrinter &prefix = PrefixPrinter()) const; + void print(std::ostream *OS, + const PrefixPrinter &prefix = PrefixPrinter()) const { + if (OS) print(*OS, prefix); + } /// getNumber - MachineBasicBlocks are uniquely numbered at the function /// level, unless they're not in a MachineFunction yet, in which case this Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=76603&r1=76602&r2=76603&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Tue Jul 21 13:27:05 2009 @@ -20,6 +20,7 @@ #include "llvm/ADT/ilist.h" #include "llvm/Support/DebugLoc.h" +#include "llvm/Support/Dump.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/Support/Annotation.h" #include "llvm/Support/Allocator.h" @@ -207,8 +208,12 @@ /// print - Print out the MachineFunction in a format suitable for debugging /// to the specified stream. /// - void print(std::ostream &OS) const; - void print(std::ostream *OS) const { if (OS) print(*OS); } + void print(std::ostream &OS, + const PrefixPrinter &prefix = PrefixPrinter()) const; + void print(std::ostream *OS, + const PrefixPrinter &prefix = PrefixPrinter()) const { + if (OS) print(*OS, prefix); + } /// viewCFG - This function is meant for use from the debugger. You can just /// say 'call F->viewCFG()' and a ghostview window should pop up from the Modified: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=76603&r1=76602&r2=76603&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp Tue Jul 21 13:27:05 2009 @@ -148,7 +148,8 @@ os << " %reg" << RegNo; } -void MachineBasicBlock::print(std::ostream &OS) const { +void MachineBasicBlock::print(std::ostream &OS, + const PrefixPrinter &prefix) const { const MachineFunction *MF = getParent(); if(!MF) { OS << "Can't print out MachineBasicBlock because parent MachineFunction" @@ -181,6 +182,7 @@ } for (const_iterator I = begin(); I != end(); ++I) { + OS << prefix(*I); OS << "\t"; I->print(OS, &getParent()->getTarget()); } Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=76603&r1=76602&r2=76603&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Tue Jul 21 13:27:05 2009 @@ -252,7 +252,8 @@ print(*cerr.stream()); } -void MachineFunction::print(std::ostream &OS) const { +void MachineFunction::print(std::ostream &OS, + const PrefixPrinter &prefix) const { OS << "# Machine code for " << Fn->getName () << "():\n"; // Print Frame Information @@ -294,8 +295,10 @@ OS << "\n"; } - for (const_iterator BB = begin(); BB != end(); ++BB) - BB->print(OS); + for (const_iterator BB = begin(); BB != end(); ++BB) { + OS << prefix(*BB); + BB->print(OS, prefix); + } OS << "\n# End machine code for " << Fn->getName () << "().\n\n"; } From dgregor at apple.com Tue Jul 21 13:36:25 2009 From: dgregor at apple.com (Douglas Gregor) Date: Tue, 21 Jul 2009 11:36:25 -0700 Subject: [llvm-commits] [PATCH] StringRef class. In-Reply-To: <6a8523d60907211033l4613c05v887e1274ade68f5f@mail.gmail.com> References: <6a8523d60907201705y5221663bi48a2042bdeb5bc58@mail.gmail.com> <6a8523d60907211033l4613c05v887e1274ade68f5f@mail.gmail.com> Message-ID: <117B700E-A98A-47D1-AF48-6FFCFA33EE2A@apple.com> On Jul 21, 2009, at 10:33 AM, Daniel Dunbar wrote: > On Tue, Jul 21, 2009 at 8:04 AM, Douglas Gregor > wrote: >> On Jul 20, 2009, at 5:05 PM, Daniel Dunbar wrote: >>> The attached patch provides a new StringRef helper class, which is >>> used to represent a constant string (pointer & length) which is not >>> owned. > ... >> One gets more uniform conversions for the left- and right-hand >> arguments if these are written as friend function definitions, e.g., > > Fixed. > >> Also, for the concatenation operators, one can make them slightly >> more >> efficient with, e.g., > > Thanks. You didn't comment on whether you thought adding them was a > good idea or not, though. :) I think adding the concatenation operators is a good idea. - Doug From sabre at nondot.org Tue Jul 21 13:39:05 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 18:39:05 -0000 Subject: [llvm-commits] [llvm] r76604 - in /llvm/trunk: include/llvm/CodeGen/ lib/CodeGen/AsmPrinter/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPrinter/ lib/Target/CellSPU/AsmPrinter/ lib/Target/IA64/AsmPrinter/ lib/Target/MSP430/ lib/Target/Mips/AsmPrinter/ lib/Target/PIC16/ lib/Target/PowerPC/AsmPrinter/ lib/Target/Sparc/AsmPrinter/ lib/Target/SystemZ/AsmPrinter/ lib/Target/X86/AsmPrinter/ lib/Target/XCore/ Message-ID: <200907211839.n6LId8Uf005817@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 13:38:57 2009 New Revision: 76604 URL: http://llvm.org/viewvc/llvm-project?rev=76604&view=rev Log: make AsmPrinter::doFinalization iterate over the global variables and call PrintGlobalVariable, allowing elimination and simplification of various targets. Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp llvm/trunk/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original) +++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Tue Jul 21 13:38:57 2009 @@ -211,6 +211,11 @@ unsigned AsmVariant, const char *ExtraCode); + + /// PrintGlobalVariable - Emit the specified global variable and its + /// initializer to the output stream. + virtual void PrintGlobalVariable(const GlobalVariable *GV) = 0; + /// SetupMachineFunction - This should be called when a new MachineFunction /// is being processed from runOnMachineFunction. void SetupMachineFunction(MachineFunction &MF); Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -196,6 +196,11 @@ } bool AsmPrinter::doFinalization(Module &M) { + // Emit global variables. + for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ++I) + PrintGlobalVariable(I); + // Emit final debug information. if (TAI->doesSupportDebugInformation() || TAI->doesSupportExceptionHandling()) DW->EndModule(); Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -166,7 +166,7 @@ unsigned AsmVariant, const char *ExtraCode); - void printModuleLevelGV(const GlobalVariable* GVar); + void PrintGlobalVariable(const GlobalVariable* GVar); bool printInstruction(const MachineInstr *MI); // autogenerated. void printMachineInstruction(const MachineInstr *MI); bool runOnMachineFunction(MachineFunction &F); @@ -1066,7 +1066,7 @@ OS << *Name; } -void ARMAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { +void ARMAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) { const TargetData *TD = TM.getTargetData(); if (!GVar->hasInitializer()) // External global require no code @@ -1207,10 +1207,6 @@ bool ARMAsmPrinter::doFinalization(Module &M) { - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) - printModuleLevelGV(I); - if (Subtarget->isTargetDarwin()) { SwitchToDataSection(""); Modified: llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -49,11 +49,10 @@ bool printInstruction(const MachineInstr *MI); void printOp(const MachineOperand &MO, bool IsCallOp = false); void printOperand(const MachineInstr *MI, int opNum); - void printBaseOffsetPair (const MachineInstr *MI, int i, bool brackets=true); - void printModuleLevelGV(const GlobalVariable* GVar); + void printBaseOffsetPair(const MachineInstr *MI, int i, bool brackets=true); + void PrintGlobalVariable(const GlobalVariable *GVar); bool runOnMachineFunction(MachineFunction &F); bool doInitialization(Module &M); - bool doFinalization(Module &M); bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode); @@ -209,7 +208,7 @@ return AsmPrinter::doInitialization(M); } -void AlphaAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { +void AlphaAsmPrinter::PrintGlobalVariable(const GlobalVariable *GVar) { const TargetData *TD = TM.getTargetData(); if (!GVar->hasInitializer()) return; // External global require no code @@ -266,14 +265,6 @@ O << '\n'; } -bool AlphaAsmPrinter::doFinalization(Module &M) { - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) - printModuleLevelGV(I); - - return AsmPrinter::doFinalization(M); -} - /// PrintAsmOperand - Print out an operand for an inline asm expression. /// bool AlphaAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, Modified: llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -282,8 +282,6 @@ } virtual bool runOnMachineFunction(MachineFunction &F) = 0; - //! Assembly printer cleanup after function has been emitted - virtual bool doFinalization(Module &M) = 0; }; /// LinuxAsmPrinter - SPU assembly printer, customized for Linux @@ -300,8 +298,6 @@ bool runOnMachineFunction(MachineFunction &F); bool doInitialization(Module &M); - //! Dump globals, perform cleanup after function emission - bool doFinalization(Module &M); void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); @@ -311,7 +307,7 @@ } //! Emit a global variable according to its section and type - void printModuleLevelGV(const GlobalVariable* GVar); + void PrintGlobalVariable(const GlobalVariable* GVar); }; } // end of anonymous namespace @@ -507,7 +503,7 @@ \note This code was shamelessly copied from the PowerPC's assembly printer, which sort of screams for some kind of refactorization of common code. */ -void LinuxAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { +void LinuxAsmPrinter::PrintGlobalVariable(const GlobalVariable *GVar) { const TargetData *TD = TM.getTargetData(); if (!GVar->hasInitializer()) @@ -588,15 +584,6 @@ O << '\n'; } -bool LinuxAsmPrinter::doFinalization(Module &M) { - // Print out module-level global variables here. - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) - printModuleLevelGV(I); - - return AsmPrinter::doFinalization(M); -} - /// createSPUCodePrinterPass - Returns a pass that prints the Cell SPU /// assembly code for a MachineFunction to the given output stream, in a format /// that the Linux SPU assembler can deal with. Modified: llvm/trunk/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -111,7 +111,7 @@ void printMachineInstruction(const MachineInstr *MI); void printOp(const MachineOperand &MO, bool isBRCALLinsn= false); - void printModuleLevelGV(const GlobalVariable* GVar); + void PrintGlobalVariable(const GlobalVariable *GVar); bool runOnMachineFunction(MachineFunction &F); bool doInitialization(Module &M); bool doFinalization(Module &M); @@ -258,7 +258,7 @@ return Result; } -void IA64AsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { +void IA64AsmPrinter::PrintGlobalVariable(const GlobalVariable *GVar) { const TargetData *TD = TM.getTargetData(); if (!GVar->hasInitializer()) @@ -342,11 +342,6 @@ bool IA64AsmPrinter::doFinalization(Module &M) { - // Print out module-level global variables here. - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) - printModuleLevelGV(I); - // we print out ".global X \n .type X, @function" for each external function O << "\n\n// br.call targets referenced (and not defined) above: \n"; for (std::set::iterator i = ExternalFunctionNames.begin(), Modified: llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -59,6 +59,10 @@ void emitFunctionHeader(const MachineFunction &MF); bool runOnMachineFunction(MachineFunction &F); + virtual void PrintGlobalVariable(const GlobalVariable *GV) { + // FIXME: No support for global variables? + } + void getAnalysisUsage(AnalysisUsage &AU) const { AsmPrinter::getAnalysisUsage(AU); AU.setPreservesAll(); Modified: llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -70,7 +70,7 @@ const char *Modifier = 0); void printFCCOperand(const MachineInstr *MI, int opNum, const char *Modifier = 0); - void printModuleLevelGV(const GlobalVariable* GVar); + void PrintGlobalVariable(const GlobalVariable *GVar); void printSavedRegsBitmask(MachineFunction &MF); void printHex32(unsigned int Value); @@ -82,7 +82,6 @@ bool printInstruction(const MachineInstr *MI); // autogenerated. bool runOnMachineFunction(MachineFunction &F); bool doInitialization(Module &M); - bool doFinalization(Module &M); }; } // end of anonymous namespace @@ -462,8 +461,7 @@ return AsmPrinter::doInitialization(M); } -void MipsAsmPrinter:: -printModuleLevelGV(const GlobalVariable *GVar) { +void MipsAsmPrinter::PrintGlobalVariable(const GlobalVariable *GVar) { const TargetData *TD = TM.getTargetData(); if (!GVar->hasInitializer()) @@ -559,18 +557,6 @@ EmitGlobalConstant(C); } -bool MipsAsmPrinter:: -doFinalization(Module &M) -{ - // Print out module-level global variables here. - for (Module::const_global_iterator I = M.global_begin(), - E = M.global_end(); I != E; ++I) - printModuleLevelGV(I); - - O << '\n'; - - return AsmPrinter::doFinalization(M); -} // Force static initialization. extern "C" void LLVMInitializeMipsAsmPrinter() { Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -291,8 +291,7 @@ EmitRemainingAutos(); DbgInfo.EndModule(M); O << "\n\t" << "END\n"; - bool Result = AsmPrinter::doFinalization(M); - return Result; + return AsmPrinter::doFinalization(M); } void PIC16AsmPrinter::EmitFunctionFrame(MachineFunction &MF) { Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h Tue Jul 21 13:38:57 2009 @@ -1,4 +1,4 @@ -//===-- PIC16AsmPrinter.h - PIC16 LLVM assembly writer ------------------===// +//===-- PIC16AsmPrinter.h - PIC16 LLVM assembly writer ----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -35,7 +35,7 @@ PTLI = static_cast (TM.getTargetLowering()); PTAI = static_cast (T); } - private : + private: virtual const char *getPassName() const { return "PIC16 Assembly Printer"; } @@ -55,11 +55,17 @@ void EmitRomData (Module &M); void EmitFunctionFrame(MachineFunction &MF); void printLibcallDecls(void); - protected: + protected: bool doInitialization(Module &M); bool doFinalization(Module &M); - private: + /// PrintGlobalVariable - Emit the specified global variable and its + /// initializer to the output stream. + virtual void PrintGlobalVariable(const GlobalVariable *GV) { + // PIC16 doesn't use normal hooks for this. + } + + private: PIC16TargetLowering *PTLI; PIC16DbgInfo DbgInfo; const PIC16TargetAsmInfo *PTAI; Modified: llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -313,7 +313,6 @@ const char *Modifier); virtual bool runOnMachineFunction(MachineFunction &F) = 0; - virtual bool doFinalization(Module &M) = 0; virtual void EmitExternalGlobal(const GlobalVariable *GV); }; @@ -330,7 +329,6 @@ } bool runOnMachineFunction(MachineFunction &F); - bool doFinalization(Module &M); void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); @@ -339,7 +337,7 @@ PPCAsmPrinter::getAnalysisUsage(AU); } - void printModuleLevelGV(const GlobalVariable* GVar); + void PrintGlobalVariable(const GlobalVariable *GVar); }; /// PPCDarwinAsmPrinter - PowerPC assembly printer, customized for Darwin/Mac @@ -366,7 +364,7 @@ PPCAsmPrinter::getAnalysisUsage(AU); } - void printModuleLevelGV(const GlobalVariable* GVar); + void PrintGlobalVariable(const GlobalVariable *GVar); }; } // end of anonymous namespace @@ -661,7 +659,7 @@ OS << *Name; } -void PPCLinuxAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { +void PPCLinuxAsmPrinter::PrintGlobalVariable(const GlobalVariable *GVar) { const TargetData *TD = TM.getTargetData(); if (!GVar->hasInitializer()) @@ -748,14 +746,6 @@ O << '\n'; } -bool PPCLinuxAsmPrinter::doFinalization(Module &M) { - // Print out module-level global variables here. - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) - printModuleLevelGV(I); - - return AsmPrinter::doFinalization(M); -} /// runOnMachineFunction - This uses the printMachineInstruction() /// method to print assembly for each instruction. @@ -875,7 +865,7 @@ return Result; } -void PPCDarwinAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { +void PPCDarwinAsmPrinter::PrintGlobalVariable(const GlobalVariable *GVar) { const TargetData *TD = TM.getTargetData(); if (!GVar->hasInitializer()) @@ -982,11 +972,6 @@ bool PPCDarwinAsmPrinter::doFinalization(Module &M) { const TargetData *TD = TM.getTargetData(); - // Print out module-level global variables here. - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) - printModuleLevelGV(I); - bool isPPC64 = TD->getPointerSizeInBits() == 64; // Output stubs for dynamically-linked functions @@ -1093,11 +1078,9 @@ bool verbose) { const PPCSubtarget *Subtarget = &tm.getSubtarget(); - if (Subtarget->isDarwin()) { + if (Subtarget->isDarwin()) return new PPCDarwinAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose); - } else { - return new PPCLinuxAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose); - } + return new PPCLinuxAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose); } // Force static initialization. Modified: llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -59,7 +59,7 @@ return "Sparc Assembly Printer"; } - void printModuleLevelGV(const GlobalVariable* GVar); + void PrintGlobalVariable(const GlobalVariable *GVar); void printOperand(const MachineInstr *MI, int opNum); void printMemOperand(const MachineInstr *MI, int opNum, const char *Modifier = 0); @@ -67,7 +67,6 @@ bool printInstruction(const MachineInstr *MI); // autogenerated. bool runOnMachineFunction(MachineFunction &F); - bool doFinalization(Module &M); bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode); bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, @@ -221,18 +220,7 @@ O << SPARCCondCodeToString((SPCC::CondCodes)CC); } -bool SparcAsmPrinter::doFinalization(Module &M) { - // Print out module-level global variables here. - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) - printModuleLevelGV(I); - - O << '\n'; - - return AsmPrinter::doFinalization(M); -} - -void SparcAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { +void SparcAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) { const TargetData *TD = TM.getTargetData(); if (!GVar->hasInitializer()) Modified: llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -67,8 +67,7 @@ void emitFunctionHeader(const MachineFunction &MF); bool runOnMachineFunction(MachineFunction &F); - bool doFinalization(Module &M); - void printModuleLevelGV(const GlobalVariable* GVar); + void PrintGlobalVariable(const GlobalVariable* GVar); void getAnalysisUsage(AnalysisUsage &AU) const { AsmPrinter::getAnalysisUsage(AU); @@ -90,15 +89,6 @@ return new SystemZAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose); } -bool SystemZAsmPrinter::doFinalization(Module &M) { - // Print out module-level global variables here. - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) - printModuleLevelGV(I); - - return AsmPrinter::doFinalization(M); -} - void SystemZAsmPrinter::emitFunctionHeader(const MachineFunction &MF) { unsigned FnAlign = MF.getAlignment(); const Function *F = MF.getFunction(); @@ -331,7 +321,7 @@ OS << *Name; } -void SystemZAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { +void SystemZAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) { const TargetData *TD = TM.getTargetData(); if (!GVar->hasInitializer()) Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -763,7 +763,7 @@ return AsmPrinter::doInitialization(M); } -void X86ATTAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { +void X86ATTAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) { const TargetData *TD = TM.getTargetData(); if (!GVar->hasInitializer()) @@ -902,8 +902,6 @@ // Print out module-level global variables here. for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) { - printModuleLevelGV(I); - if (I->hasDLLExportLinkage()) DLLExportedGVs.insert(Mang->getMangledName(I)); } Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h Tue Jul 21 13:38:57 2009 @@ -191,7 +191,7 @@ unsigned uid) const; void printPICLabel(const MachineInstr *MI, unsigned Op); - void printModuleLevelGV(const GlobalVariable* GVar); + void PrintGlobalVariable(const GlobalVariable* GVar); void PrintPICBaseSymbol() const; Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -474,71 +474,68 @@ return Result; } -bool X86IntelAsmPrinter::doFinalization(Module &M) { +void X86IntelAsmPrinter::PrintGlobalVariable(const GlobalVariable *GV) { + // Check to see if this is a special global used by LLVM, if so, emit it. + if (GV->isDeclaration() || + EmitSpecialLLVMGlobal(GV)) + return; + const TargetData *TD = TM.getTargetData(); - // Print out module-level global variables here. - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) { - if (I->isDeclaration()) continue; // External global require no code - - // Check to see if this is a special global used by LLVM, if so, emit it. - if (EmitSpecialLLVMGlobal(I)) - continue; - - std::string name = Mang->getMangledName(I); - Constant *C = I->getInitializer(); - unsigned Align = TD->getPreferredAlignmentLog(I); - bool bCustomSegment = false; - - switch (I->getLinkage()) { - case GlobalValue::CommonLinkage: - case GlobalValue::LinkOnceAnyLinkage: - case GlobalValue::LinkOnceODRLinkage: - case GlobalValue::WeakAnyLinkage: - case GlobalValue::WeakODRLinkage: - SwitchToDataSection(""); - O << name << "?\tSEGEMNT PARA common 'COMMON'\n"; - bCustomSegment = true; - // FIXME: the default alignment is 16 bytes, but 1, 2, 4, and 256 - // are also available. - break; - case GlobalValue::AppendingLinkage: - SwitchToDataSection(""); - O << name << "?\tSEGMENT PARA public 'DATA'\n"; - bCustomSegment = true; - // FIXME: the default alignment is 16 bytes, but 1, 2, 4, and 256 - // are also available. - break; - case GlobalValue::DLLExportLinkage: - DLLExportedGVs.insert(name); - // FALL THROUGH - case GlobalValue::ExternalLinkage: - O << "\tpublic " << name << "\n"; - // FALL THROUGH - case GlobalValue::InternalLinkage: - SwitchToSection(TAI->getDataSection()); - break; - default: - llvm_unreachable("Unknown linkage type!"); - } - - if (!bCustomSegment) - EmitAlignment(Align, I); - - O << name << ":"; - if (VerboseAsm) - O << "\t\t\t\t" << TAI->getCommentString() - << " " << I->getName(); - O << '\n'; - - EmitGlobalConstant(C); - - if (bCustomSegment) - O << name << "?\tends\n"; + std::string name = Mang->getMangledName(GV); + Constant *C = GV->getInitializer(); + unsigned Align = TD->getPreferredAlignmentLog(GV); + bool bCustomSegment = false; + + switch (GV->getLinkage()) { + case GlobalValue::CommonLinkage: + case GlobalValue::LinkOnceAnyLinkage: + case GlobalValue::LinkOnceODRLinkage: + case GlobalValue::WeakAnyLinkage: + case GlobalValue::WeakODRLinkage: + SwitchToDataSection(""); + O << name << "?\tSEGEMNT PARA common 'COMMON'\n"; + bCustomSegment = true; + // FIXME: the default alignment is 16 bytes, but 1, 2, 4, and 256 + // are also available. + break; + case GlobalValue::AppendingLinkage: + SwitchToDataSection(""); + O << name << "?\tSEGMENT PARA public 'DATA'\n"; + bCustomSegment = true; + // FIXME: the default alignment is 16 bytes, but 1, 2, 4, and 256 + // are also available. + break; + case GlobalValue::DLLExportLinkage: + DLLExportedGVs.insert(name); + // FALL THROUGH + case GlobalValue::ExternalLinkage: + O << "\tpublic " << name << "\n"; + // FALL THROUGH + case GlobalValue::InternalLinkage: + SwitchToSection(TAI->getDataSection()); + break; + default: + llvm_unreachable("Unknown linkage type!"); } + + if (!bCustomSegment) + EmitAlignment(Align, GV); + + O << name << ":"; + if (VerboseAsm) + O << "\t\t\t\t" << TAI->getCommentString() + << " " << GV->getName(); + O << '\n'; + + EmitGlobalConstant(C); + + if (bCustomSegment) + O << name << "?\tends\n"; +} - // Output linker support code for dllexported globals +bool X86IntelAsmPrinter::doFinalization(Module &M) { + // Output linker support code for dllexported globals if (!DLLExportedGVs.empty() || !DLLExportedFns.empty()) { SwitchToDataSection(""); O << "; WARNING: The following code is valid only with MASM v8.x" Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h Tue Jul 21 13:38:57 2009 @@ -135,6 +135,8 @@ bool doInitialization(Module &M); bool doFinalization(Module &M); + void PrintGlobalVariable(const GlobalVariable *GV); + // We have to propagate some information about MachineFunction to // AsmPrinter. It's ok, when we're printing the function, since we have // access to MachineFunction and can get the appropriate MachineFunctionInfo. Modified: llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp?rev=76604&r1=76603&r2=76604&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp Tue Jul 21 13:38:57 2009 @@ -70,7 +70,7 @@ void emitExternDirective(const std::string &name); void emitArrayBound(const std::string &name, const GlobalVariable *GV); - void emitGlobal(const GlobalVariable *GV); + virtual void PrintGlobalVariable(const GlobalVariable *GV); void emitFunctionStart(MachineFunction &MF); void emitFunctionEnd(MachineFunction &MF); @@ -79,7 +79,6 @@ void printMachineInstruction(const MachineInstr *MI); bool runOnMachineFunction(MachineFunction &F); bool doInitialization(Module &M); - bool doFinalization(Module &M); void getAnalysisUsage(AnalysisUsage &AU) const { AsmPrinter::getAnalysisUsage(AU); @@ -136,7 +135,7 @@ } } -void XCoreAsmPrinter::emitGlobal(const GlobalVariable *GV) { +void XCoreAsmPrinter::PrintGlobalVariable(const GlobalVariable *GV) { // Check to see if this is a special global used by LLVM, if so, emit it. if (!GV->hasInitializer() || EmitSpecialLLVMGlobal(GV)) @@ -387,13 +386,4 @@ return Result; } -bool XCoreAsmPrinter::doFinalization(Module &M) { - // Print out module-level global variables. - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) { - emitGlobal(I); - } - - return AsmPrinter::doFinalization(M); -} From evan.cheng at apple.com Tue Jul 21 13:54:15 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 18:54:15 -0000 Subject: [llvm-commits] [llvm] r76612 - in /llvm/trunk/lib/Target/ARM: ARM.td ARMSchedule.td ARMScheduleV7.td Message-ID: <200907211854.n6LIsGF4006479@zion.cs.uiuc.edu> Author: evancheng Date: Tue Jul 21 13:54:14 2009 New Revision: 76612 URL: http://llvm.org/viewvc/llvm-project?rev=76612&view=rev Log: Add fake v7 itineraries for now. Added: llvm/trunk/lib/Target/ARM/ARMScheduleV7.td Modified: llvm/trunk/lib/Target/ARM/ARM.td llvm/trunk/lib/Target/ARM/ARMSchedule.td Modified: llvm/trunk/lib/Target/ARM/ARM.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARM.td?rev=76612&r1=76611&r2=76612&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARM.td (original) +++ llvm/trunk/lib/Target/ARM/ARM.td Tue Jul 21 13:54:14 2009 @@ -103,14 +103,16 @@ [ArchV6, FeatureVFP2]>; // V6T2 Processors. -def : Processor<"arm1156t2-s", V6Itineraries, +def : Processor<"arm1156t2-s", V6Itineraries, [ArchV6T2, FeatureThumb2]>; -def : Processor<"arm1156t2f-s", V6Itineraries, +def : Processor<"arm1156t2f-s", V6Itineraries, [ArchV6T2, FeatureThumb2, FeatureVFP2]>; // V7 Processors. -def : ProcNoItin<"cortex-a8", [ArchV7A, FeatureThumb2, FeatureNEON]>; -def : ProcNoItin<"cortex-a9", [ArchV7A, FeatureThumb2, FeatureNEON]>; +def : Processor<"cortex-a8", CortexA8Itineraries, + [ArchV7A, FeatureThumb2, FeatureNEON]>; +def : Processor<"cortex-a9", V7Itineraries, + [ArchV7A, FeatureThumb2, FeatureNEON]>; //===----------------------------------------------------------------------===// // Register File Description Modified: llvm/trunk/lib/Target/ARM/ARMSchedule.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSchedule.td?rev=76612&r1=76611&r2=76612&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMSchedule.td (original) +++ llvm/trunk/lib/Target/ARM/ARMSchedule.td Tue Jul 21 13:54:14 2009 @@ -33,3 +33,4 @@ def GenericItineraries : ProcessorItineraries<[]>; include "ARMScheduleV6.td" +include "ARMScheduleV7.td" Added: llvm/trunk/lib/Target/ARM/ARMScheduleV7.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMScheduleV7.td?rev=76612&view=auto ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMScheduleV7.td (added) +++ llvm/trunk/lib/Target/ARM/ARMScheduleV7.td Tue Jul 21 13:54:14 2009 @@ -0,0 +1,33 @@ +//===- ARMScheduleV7.td - ARM v7 Scheduling Definitions ----*- tablegen -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the itinerary class data for the ARM v7 processors. +// +//===----------------------------------------------------------------------===// + +def V7Itineraries : ProcessorItineraries<[ + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]> +]>; + + +def CortexA8Itineraries : ProcessorItineraries<[ + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]> +]>; From greened at obbligato.org Tue Jul 21 13:56:33 2009 From: greened at obbligato.org (David Greene) Date: Tue, 21 Jul 2009 18:56:33 -0000 Subject: [llvm-commits] [llvm] r76615 - in /llvm/trunk: include/llvm/CodeGen/LiveIntervalAnalysis.h lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200907211856.n6LIuXSV006629@zion.cs.uiuc.edu> Author: greened Date: Tue Jul 21 13:56:32 2009 New Revision: 76615 URL: http://llvm.org/viewvc/llvm-project?rev=76615&view=rev Log: Prefix IR dumps with LiveInterval indices when possible. This turns this: %ESI = MOV32rr %EDI ADJCALLSTACKDOWN64 0, %RSP, %EFLAGS, %RSP %reg1027 = MOVZX64rr32 %ESI %reg1027 = ADD64ri8 %reg1027, 15, %EFLAGS %reg1027 = AND64ri8 %reg1027, -16, %EFLAGS %RDI = MOV64rr %RSP %RDI = SUB64rr %RDI, %reg1027, %EFLAGS %RSP = MOV64rr %RDI into this: 4 %reg1024 = MOV32rr %EDI 12 ADJCALLSTACKDOWN64 0, %RSP, %EFLAGS, %RSP 20 %reg1025 = MOVZX64rr32 %reg1024 28 %reg1026 = MOV64rr %reg1025 36 %reg1026 = ADD64ri8 %reg1026, 15, %EFLAGS 44 %reg1027 = MOV64rr %reg1026 52 %reg1027 = AND64ri8 %reg1027, -16, %EFLAGS 60 %reg1028 = MOV64rr %RSP 68 %reg1029 = MOV64rr %reg1028 76 %reg1029 = SUB64rr %reg1029, %reg1027, %EFLAGS 84 %RSP = MOV64rr %reg1029 This helps greatly when debugging register allocation and coalescing problems. Modified: llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Modified: llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h?rev=76615&r1=76614&r2=76615&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h (original) +++ llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h Tue Jul 21 13:56:32 2009 @@ -27,7 +27,9 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Allocator.h" +#include "llvm/Support/Dump.h" #include +#include namespace llvm { @@ -79,7 +81,7 @@ /// FunctionSize - The number of instructions present in the function uint64_t FunctionSize; - typedef DenseMap Mi2IndexMap; + typedef DenseMap Mi2IndexMap; Mi2IndexMap mi2iMap_; typedef std::vector Index2MiMap; @@ -198,7 +200,7 @@ } /// getInstructionIndex - returns the base index of instr - unsigned getInstructionIndex(MachineInstr* instr) const { + unsigned getInstructionIndex(const MachineInstr* instr) const { Mi2IndexMap::const_iterator it = mi2iMap_.find(instr); assert(it != mi2iMap_.end() && "Invalid instruction!"); return it->second; @@ -538,6 +540,26 @@ void printRegName(unsigned reg) const; }; + // IntervalPrefixPrinter - Print live interval indices before each + // instruction. + class IntervalPrefixPrinter : public PrefixPrinter { + private: + const LiveIntervals &liinfo; + + public: + IntervalPrefixPrinter(const LiveIntervals &lii) + : liinfo(lii) {}; + + std::string operator()(const MachineBasicBlock &) const { + return(""); + }; + + std::string operator()(const MachineInstr &instr) const { + std::stringstream out; + out << liinfo.getInstructionIndex(&instr); + return(out.str()); + }; + }; } // End llvm namespace #endif Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=76615&r1=76614&r2=76615&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Jul 21 13:56:32 2009 @@ -464,7 +464,7 @@ i2miMap_.resize(highestSlot + 1); for (Mi2IndexMap::iterator MI = mi2iMap_.begin(), ME = mi2iMap_.end(); MI != ME; ++MI) { - i2miMap_[MI->second] = MI->first; + i2miMap_[MI->second] = const_cast(MI->first); } } @@ -501,14 +501,7 @@ } O << "********** MACHINEINSTRS **********\n"; - for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end(); - mbbi != mbbe; ++mbbi) { - O << ((Value*)mbbi->getBasicBlock())->getName() << ":\n"; - for (MachineBasicBlock::iterator mii = mbbi->begin(), - mie = mbbi->end(); mii != mie; ++mii) { - O << getInstructionIndex(mii) << '\t' << *mii; - } - } + mf_->print(O, IntervalPrefixPrinter(*this)); } /// conflictsWithPhysRegDef - Returns true if the specified register From mai4 at uiuc.edu Tue Jul 21 13:57:48 2009 From: mai4 at uiuc.edu (Haohui Mai) Date: Tue, 21 Jul 2009 18:57:48 -0000 Subject: [llvm-commits] [poolalloc] r76618 - /poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp Message-ID: <200907211857.n6LIvn7C006715@zion.cs.uiuc.edu> Author: mai4 Date: Tue Jul 21 13:57:48 2009 New Revision: 76618 URL: http://llvm.org/viewvc/llvm-project?rev=76618&view=rev Log: Put __poolalloc_init() in llvm.used so it won't get killed. Modified: poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp Modified: poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp?rev=76618&r1=76617&r2=76618&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp Tue Jul 21 13:57:48 2009 @@ -339,6 +339,20 @@ (FunctionType::get(Type::VoidTy, std::vector(), false), GlobalValue::ExternalLinkage, "__poolalloc_init", &M); + // put it into llvm.used so that it won't get killed. + + Type * VoidPtrTy = PointerType::getUnqual(Type::Int8Ty); + ArrayType * LLVMUsedTy = ArrayType::get(VoidPtrTy, 1); + Constant * C = ConstantExpr::getBitCast (cast(InitFunc), VoidPtrTy); + std::vector UsedFunctions(1,C); + Constant * NewInit = + ConstantArray::get (LLVMUsedTy, UsedFunctions); + + new GlobalVariable (M, LLVMUsedTy, false, + GlobalValue::AppendingLinkage, + NewInit, "llvm.used"); + + BasicBlock * BB = BasicBlock::Create("entry", InitFunc); SteensgaardDataStructures * DS = dynamic_cast(Graphs); From evan.cheng at apple.com Tue Jul 21 14:25:19 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 19:25:19 -0000 Subject: [llvm-commits] [llvm] r76629 - /llvm/trunk/tools/bugpoint/ExecutionDriver.cpp Message-ID: <200907211925.n6LJPKnD007836@zion.cs.uiuc.edu> Author: evancheng Date: Tue Jul 21 14:25:09 2009 New Revision: 76629 URL: http://llvm.org/viewvc/llvm-project?rev=76629&view=rev Log: 80 col violation. Modified: llvm/trunk/tools/bugpoint/ExecutionDriver.cpp Modified: llvm/trunk/tools/bugpoint/ExecutionDriver.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ExecutionDriver.cpp?rev=76629&r1=76628&r2=76629&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/ExecutionDriver.cpp (original) +++ llvm/trunk/tools/bugpoint/ExecutionDriver.cpp Tue Jul 21 14:25:09 2009 @@ -55,19 +55,19 @@ cl::opt SafeInterpreterSel(cl::desc("Specify \"safe\" i.e. known-good backend:"), - cl::values(clEnumValN(AutoPick, "safe-auto", "Use best guess"), - clEnumValN(RunLLC, "safe-run-llc", "Compile with LLC"), - clEnumValN(RunCBE, "safe-run-cbe", "Compile with CBE"), - clEnumValN(Custom, "safe-run-custom", - "Use -exec-command to define a command to execute " - "the bitcode. Useful for cross-compilation."), - clEnumValEnd), + cl::values(clEnumValN(AutoPick, "safe-auto", "Use best guess"), + clEnumValN(RunLLC, "safe-run-llc", "Compile with LLC"), + clEnumValN(RunCBE, "safe-run-cbe", "Compile with CBE"), + clEnumValN(Custom, "safe-run-custom", + "Use -exec-command to define a command to execute " + "the bitcode. Useful for cross-compilation."), + clEnumValEnd), cl::init(AutoPick)); cl::opt SafeInterpreterPath("safe-path", - cl::desc("Specify the path to the \"safe\" backend program"), - cl::init("")); + cl::desc("Specify the path to the \"safe\" backend program"), + cl::init("")); cl::opt AppendProgramExitCode("append-exit-code", From eli.friedman at gmail.com Tue Jul 21 15:05:50 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 21 Jul 2009 20:05:50 -0000 Subject: [llvm-commits] [llvm] r76631 - /llvm/trunk/lib/Target/README.txt Message-ID: <200907212005.n6LK5pRN009270@zion.cs.uiuc.edu> Author: efriedma Date: Tue Jul 21 15:05:43 2009 New Revision: 76631 URL: http://llvm.org/viewvc/llvm-project?rev=76631&view=rev Log: Remove a couple of already-implemented notes. Modified: llvm/trunk/lib/Target/README.txt Modified: llvm/trunk/lib/Target/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=76631&r1=76630&r2=76631&view=diff ============================================================================== --- llvm/trunk/lib/Target/README.txt (original) +++ llvm/trunk/lib/Target/README.txt Tue Jul 21 15:05:43 2009 @@ -197,13 +197,6 @@ //===---------------------------------------------------------------------===// -Legalize should lower ctlz like this: - ctlz(x) = popcnt((x-1) & ~x) - -on targets that have popcnt but not ctlz. itanium, what else? - -//===---------------------------------------------------------------------===// - quantum_sigma_x in 462.libquantum contains the following loop: for(i=0; isize; i++) @@ -335,11 +328,6 @@ //===---------------------------------------------------------------------===// -Promote for i32 bswap can use i64 bswap + shr. Useful on targets with 64-bit -regs and bswap, like itanium. - -//===---------------------------------------------------------------------===// - LSR should know what GPR types a target has. This code: volatile short X, Y; // globals From clattner at apple.com Tue Jul 21 15:09:49 2009 From: clattner at apple.com (Chris Lattner) Date: Tue, 21 Jul 2009 13:09:49 -0700 Subject: [llvm-commits] [llvm] r76615 - in /llvm/trunk: include/llvm/CodeGen/LiveIntervalAnalysis.h lib/CodeGen/LiveIntervalAnalysis.cpp In-Reply-To: <200907211856.n6LIuXSV006629@zion.cs.uiuc.edu> References: <200907211856.n6LIuXSV006629@zion.cs.uiuc.edu> Message-ID: On Jul 21, 2009, at 11:56 AM, David Greene wrote: > Author: greened > Date: Tue Jul 21 13:56:32 2009 > New Revision: 76615 > > URL: http://llvm.org/viewvc/llvm-project?rev=76615&view=rev > Log: > > Prefix IR dumps with LiveInterval indices when possible. This turns > this: This is nice, but: > +++ llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h Tue Jul > 21 13:56:32 2009 > @@ -27,7 +27,9 @@ > #include "llvm/ADT/SmallPtrSet.h" > #include "llvm/ADT/SmallVector.h" > #include "llvm/Support/Allocator.h" > +#include "llvm/Support/Dump.h" > #include > +#include You're adding more std::*stream stuff to header files. > > + // IntervalPrefixPrinter - Print live interval indices before each > + // instruction. > + class IntervalPrefixPrinter : public PrefixPrinter { David, please talk about general infrastructure like this before just applying it to mainline with no review. Remember that you have *commit after approval* access, with exceptions for "obvious" patches. This is not obvious and you are not a maintainer for these areas. Please read this for more information: http://llvm.org/docs/DeveloperPolicy.html#commitaccess Please revert r76602+ and propose them to llvm-commits. -Chris > + private: > + const LiveIntervals &liinfo; > + > + public: > + IntervalPrefixPrinter(const LiveIntervals &lii) > + : liinfo(lii) {}; > + > + std::string operator()(const MachineBasicBlock &) const { > + return(""); > + }; > + > + std::string operator()(const MachineInstr &instr) const { > + std::stringstream out; > + out << liinfo.getInstructionIndex(&instr); > + return(out.str()); > + }; > + }; > } // End llvm namespace > > #endif > > Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=76615&r1=76614&r2=76615&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) > +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Jul 21 > 13:56:32 2009 > @@ -464,7 +464,7 @@ > i2miMap_.resize(highestSlot + 1); > for (Mi2IndexMap::iterator MI = mi2iMap_.begin(), ME = > mi2iMap_.end(); > MI != ME; ++MI) { > - i2miMap_[MI->second] = MI->first; > + i2miMap_[MI->second] = const_cast(MI->first); > } > > } > @@ -501,14 +501,7 @@ > } > > O << "********** MACHINEINSTRS **********\n"; > - for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_- > >end(); > - mbbi != mbbe; ++mbbi) { > - O << ((Value*)mbbi->getBasicBlock())->getName() << ":\n"; > - for (MachineBasicBlock::iterator mii = mbbi->begin(), > - mie = mbbi->end(); mii != mie; ++mii) { > - O << getInstructionIndex(mii) << '\t' << *mii; > - } > - } > + mf_->print(O, IntervalPrefixPrinter(*this)); > } > > /// conflictsWithPhysRegDef - Returns true if the specified register > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From eli.friedman at gmail.com Tue Jul 21 15:12:17 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 21 Jul 2009 20:12:17 -0000 Subject: [llvm-commits] [llvm] r76633 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/PIC16/PIC16ISelLowering.cpp lib/Target/X86/X86ISelLowering.cpp lib/Target/XCore/XCoreISelLowering.cpp Message-ID: <200907212012.n6LKCI9q009548@zion.cs.uiuc.edu> Author: efriedma Date: Tue Jul 21 15:12:16 2009 New Revision: 76633 URL: http://llvm.org/viewvc/llvm-project?rev=76633&view=rev Log: Remove shift amount flavor. It isn't actually complete enough to be useful, and it's currently unused. (Some issues: it isn't actually rich enough to capture the semantics on many architectures, and semantics can vary depending on the type being shifted.) Modified: llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=76633&r1=76632&r2=76633&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Tue Jul 21 15:12:16 2009 @@ -87,12 +87,6 @@ Custom // Use the LowerOperation hook to implement custom lowering. }; - enum OutOfRangeShiftAmount { - Undefined, // Oversized shift amounts are undefined (default). - Mask, // Shift amounts are auto masked (anded) to value size. - Extend // Oversized shift pulls in zeros or sign bits. - }; - enum BooleanContent { // How the target represents true/false values. UndefinedBooleanContent, // Only bit 0 counts, the rest can hold garbage. ZeroOrOneBooleanContent, // All bits zero except for bit 0. @@ -114,7 +108,6 @@ bool isLittleEndian() const { return IsLittleEndian; } MVT getPointerTy() const { return PointerTy; } MVT getShiftAmountTy() const { return ShiftAmountTy; } - OutOfRangeShiftAmount getShiftAmountFlavor() const {return ShiftAmtHandling; } /// usesGlobalOffsetTable - Return true if this target uses a GOT for PIC /// codegen. @@ -878,12 +871,6 @@ SchedPreferenceInfo = Pref; } - /// setShiftAmountFlavor - Describe how the target handles out of range shift - /// amounts. - void setShiftAmountFlavor(OutOfRangeShiftAmount OORSA) { - ShiftAmtHandling = OORSA; - } - /// setUseUnderscoreSetJmp - Indicate whether this target prefers to /// use _setjmp to implement llvm.setjmp or the non _ version. /// Defaults to false. @@ -1525,8 +1512,6 @@ /// PointerTy is. MVT ShiftAmountTy; - OutOfRangeShiftAmount ShiftAmtHandling; - /// BooleanContents - Information about the contents of the high-bits in /// boolean values held in a type wider than i1. See getBooleanContents. BooleanContent BooleanContents; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=76633&r1=76632&r2=76633&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Jul 21 15:12:16 2009 @@ -492,7 +492,6 @@ IsLittleEndian = TD->isLittleEndian(); UsesGlobalOffsetTable = false; ShiftAmountTy = PointerTy = getValueType(TD->getIntPtrType()); - ShiftAmtHandling = Undefined; memset(RegClassForVT, 0,MVT::LAST_VALUETYPE*sizeof(TargetRegisterClass*)); memset(TargetDAGCombineArray, 0, array_lengthof(TargetDAGCombineArray)); maxStoresPerMemset = maxStoresPerMemcpy = maxStoresPerMemmove = 8; Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp?rev=76633&r1=76632&r2=76633&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp Tue Jul 21 15:12:16 2009 @@ -130,7 +130,6 @@ addRegisterClass(MVT::i8, PIC16::GPRRegisterClass); setShiftAmountType(MVT::i8); - setShiftAmountFlavor(Extend); // SRA library call names setPIC16LibcallName(PIC16ISD::SRA_I8, getIntrinsicName(PIC16ISD::SRA_I8)); Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=76633&r1=76632&r2=76633&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Jul 21 15:12:16 2009 @@ -66,7 +66,6 @@ setShiftAmountType(MVT::i8); setBooleanContents(ZeroOrOneBooleanContent); setSchedulingPreference(SchedulingForRegPressure); - setShiftAmountFlavor(Mask); // shl X, 32 == shl X, 0 setStackPointerRegisterToSaveRestore(X86StackPtr); if (Subtarget->isTargetDarwin()) { Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp?rev=76633&r1=76632&r2=76633&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp Tue Jul 21 15:12:16 2009 @@ -68,8 +68,6 @@ setIntDivIsCheap(false); setShiftAmountType(MVT::i32); - // shl X, 32 == 0 - setShiftAmountFlavor(Extend); setStackPointerRegisterToSaveRestore(XCore::SP); setSchedulingPreference(SchedulingForRegPressure); From resistor at mac.com Tue Jul 21 15:13:12 2009 From: resistor at mac.com (Owen Anderson) Date: Tue, 21 Jul 2009 20:13:12 -0000 Subject: [llvm-commits] [llvm] r76634 - in /llvm/trunk: include/llvm/Constants.h include/llvm/LLVMContext.h lib/VMCore/Constants.cpp lib/VMCore/LLVMContext.cpp lib/VMCore/LLVMContextImpl.cpp lib/VMCore/LLVMContextImpl.h Message-ID: <200907212013.n6LKDCHg009608@zion.cs.uiuc.edu> Author: resistor Date: Tue Jul 21 15:13:12 2009 New Revision: 76634 URL: http://llvm.org/viewvc/llvm-project?rev=76634&view=rev Log: Privatize the first of the value maps. Modified: llvm/trunk/include/llvm/Constants.h llvm/trunk/include/llvm/LLVMContext.h llvm/trunk/lib/VMCore/Constants.cpp llvm/trunk/lib/VMCore/LLVMContext.cpp llvm/trunk/lib/VMCore/LLVMContextImpl.cpp llvm/trunk/lib/VMCore/LLVMContextImpl.h Modified: llvm/trunk/include/llvm/Constants.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=76634&r1=76633&r2=76634&view=diff ============================================================================== --- llvm/trunk/include/llvm/Constants.h (original) +++ llvm/trunk/include/llvm/Constants.h Tue Jul 21 15:13:12 2009 @@ -264,10 +264,6 @@ return User::operator new(s, 0); } public: - /// get() - static factory method for creating a null aggregate. It is - /// illegal to call this method with a non-aggregate type. - static ConstantAggregateZero *get(const Type *Ty); - /// isNullValue - Return true if this is the value that would be returned by /// getNullValue. virtual bool isNullValue() const { return true; } Modified: llvm/trunk/include/llvm/LLVMContext.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LLVMContext.h?rev=76634&r1=76633&r2=76634&view=diff ============================================================================== --- llvm/trunk/include/llvm/LLVMContext.h (original) +++ llvm/trunk/include/llvm/LLVMContext.h Tue Jul 21 15:13:12 2009 @@ -272,6 +272,7 @@ // Methods for erasing constants void erase(MDString *M); void erase(MDNode *M); + void erase(ConstantAggregateZero *Z); }; /// FOR BACKWARDS COMPATIBILITY - Returns a global context. Modified: llvm/trunk/lib/VMCore/Constants.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=76634&r1=76633&r2=76634&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Constants.cpp (original) +++ llvm/trunk/lib/VMCore/Constants.cpp Tue Jul 21 15:13:12 2009 @@ -1025,49 +1025,11 @@ }; } - - -//---- ConstantAggregateZero::get() implementation... -// -namespace llvm { - // ConstantAggregateZero does not take extra "value" argument... - template - struct ConstantCreator { - static ConstantAggregateZero *create(const Type *Ty, const ValType &V){ - return new ConstantAggregateZero(Ty); - } - }; - - template<> - struct ConvertConstantType { - static void convert(ConstantAggregateZero *OldC, const Type *NewTy) { - // Make everyone now use a constant of the new type... - Constant *New = ConstantAggregateZero::get(NewTy); - assert(New != OldC && "Didn't replace constant??"); - OldC->uncheckedReplaceAllUsesWith(New); - OldC->destroyConstant(); // This constant is now dead, destroy it. - } - }; -} - -static ManagedStatic > AggZeroConstants; - -static char getValType(ConstantAggregateZero *CPZ) { return 0; } - -ConstantAggregateZero *ConstantAggregateZero::get(const Type *Ty) { - assert((isa(Ty) || isa(Ty) || isa(Ty)) && - "Cannot create an aggregate zero of non-aggregate type!"); - - // Implicitly locked. - return AggZeroConstants->getOrCreate(Ty, 0); -} - /// destroyConstant - Remove the constant from the constant table... /// void ConstantAggregateZero::destroyConstant() { // Implicitly locked. - AggZeroConstants->remove(this); + getType()->getContext().erase(this); destroyConstantImpl(); } @@ -1117,7 +1079,7 @@ } } - return ConstantAggregateZero::get(Ty); + return Ty->getContext().getConstantAggregateZero(Ty); } /// destroyConstant - Remove the constant from the constant table... @@ -1218,7 +1180,7 @@ // Implicitly locked. return StructConstants->getOrCreate(Ty, V); - return ConstantAggregateZero::get(Ty); + return Ty->getContext().getConstantAggregateZero(Ty); } // destroyConstant - Remove the constant from the constant table... @@ -1276,7 +1238,7 @@ } if (isZero) - return ConstantAggregateZero::get(Ty); + return Ty->getContext().getConstantAggregateZero(Ty); if (isUndef) return UndefValue::get(Ty); @@ -2236,7 +2198,8 @@ Constant *Replacement = 0; if (isAllZeros) { - Replacement = ConstantAggregateZero::get(getType()); + Replacement = + From->getType()->getContext().getConstantAggregateZero(getType()); } else { // Check to see if we have this array type already. sys::SmartScopedWriter Writer(*ConstantsLock); @@ -2312,7 +2275,7 @@ Constant *Replacement = 0; if (isAllZeros) { - Replacement = ConstantAggregateZero::get(getType()); + Replacement = getType()->getContext().getConstantAggregateZero(getType()); } else { // Check to see if we have this array type already. sys::SmartScopedWriter Writer(*ConstantsLock); Modified: llvm/trunk/lib/VMCore/LLVMContext.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContext.cpp?rev=76634&r1=76633&r2=76634&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/LLVMContext.cpp (original) +++ llvm/trunk/lib/VMCore/LLVMContext.cpp Tue Jul 21 15:13:12 2009 @@ -167,7 +167,7 @@ // ConstantAggregateZero accessors. ConstantAggregateZero* LLVMContext::getConstantAggregateZero(const Type* Ty) { - return ConstantAggregateZero::get(Ty); + return pImpl->getConstantAggregateZero(Ty); } @@ -649,3 +649,7 @@ void LLVMContext::erase(MDNode *M) { pImpl->erase(M); } + +void LLVMContext::erase(ConstantAggregateZero *Z) { + pImpl->erase(Z); +} \ No newline at end of file Modified: llvm/trunk/lib/VMCore/LLVMContextImpl.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContextImpl.cpp?rev=76634&r1=76633&r2=76634&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/LLVMContextImpl.cpp (original) +++ llvm/trunk/lib/VMCore/LLVMContextImpl.cpp Tue Jul 21 15:13:12 2009 @@ -19,6 +19,294 @@ #include "llvm/MDNode.h" using namespace llvm; +static char getValType(ConstantAggregateZero *CPZ) { return 0; } + +namespace llvm { +template +struct VISIBILITY_HIDDEN ConstantTraits< std::vector > { + static unsigned uses(const std::vector& v) { + return v.size(); + } +}; + +template +struct VISIBILITY_HIDDEN ConstantCreator { + static ConstantClass *create(const TypeClass *Ty, const ValType &V) { + return new(ConstantTraits::uses(V)) ConstantClass(Ty, V); + } +}; + +template +struct VISIBILITY_HIDDEN ConvertConstantType { + static void convert(ConstantClass *OldC, const TypeClass *NewTy) { + llvm_unreachable("This type cannot be converted!"); + } +}; + +// ConstantAggregateZero does not take extra "value" argument... +template +struct ConstantCreator { + static ConstantAggregateZero *create(const Type *Ty, const ValType &V){ + return new ConstantAggregateZero(Ty); + } +}; + +template<> +struct ConvertConstantType { + static void convert(ConstantAggregateZero *OldC, const Type *NewTy) { + // Make everyone now use a constant of the new type... + Constant *New = NewTy->getContext().getConstantAggregateZero(NewTy); + assert(New != OldC && "Didn't replace constant??"); + OldC->uncheckedReplaceAllUsesWith(New); + OldC->destroyConstant(); // This constant is now dead, destroy it. + } +}; +} + +template +class VISIBILITY_HIDDEN ContextValueMap : public AbstractTypeUser { +public: + typedef std::pair MapKey; + typedef std::map MapTy; + typedef std::map InverseMapTy; + typedef std::map AbstractTypeMapTy; +private: + /// Map - This is the main map from the element descriptor to the Constants. + /// This is the primary way we avoid creating two of the same shape + /// constant. + MapTy Map; + + /// InverseMap - If "HasLargeKey" is true, this contains an inverse mapping + /// from the constants to their element in Map. This is important for + /// removal of constants from the array, which would otherwise have to scan + /// through the map with very large keys. + InverseMapTy InverseMap; + + /// AbstractTypeMap - Map for abstract type constants. + /// + AbstractTypeMapTy AbstractTypeMap; + + /// ValueMapLock - Mutex for this map. + sys::SmartMutex ValueMapLock; + +public: + // NOTE: This function is not locked. It is the caller's responsibility + // to enforce proper synchronization. + typename MapTy::iterator map_end() { return Map.end(); } + + /// InsertOrGetItem - Return an iterator for the specified element. + /// If the element exists in the map, the returned iterator points to the + /// entry and Exists=true. If not, the iterator points to the newly + /// inserted entry and returns Exists=false. Newly inserted entries have + /// I->second == 0, and should be filled in. + /// NOTE: This function is not locked. It is the caller's responsibility + // to enforce proper synchronization. + typename MapTy::iterator InsertOrGetItem(std::pair + &InsertVal, + bool &Exists) { + std::pair IP = Map.insert(InsertVal); + Exists = !IP.second; + return IP.first; + } + +private: + typename MapTy::iterator FindExistingElement(ConstantClass *CP) { + if (HasLargeKey) { + typename InverseMapTy::iterator IMI = InverseMap.find(CP); + assert(IMI != InverseMap.end() && IMI->second != Map.end() && + IMI->second->second == CP && + "InverseMap corrupt!"); + return IMI->second; + } + + typename MapTy::iterator I = + Map.find(MapKey(static_cast(CP->getRawType()), + getValType(CP))); + if (I == Map.end() || I->second != CP) { + // FIXME: This should not use a linear scan. If this gets to be a + // performance problem, someone should look at this. + for (I = Map.begin(); I != Map.end() && I->second != CP; ++I) + /* empty */; + } + return I; + } + + ConstantClass* Create(const TypeClass *Ty, const ValType &V, + typename MapTy::iterator I) { + ConstantClass* Result = + ConstantCreator::create(Ty, V); + + assert(Result->getType() == Ty && "Type specified is not correct!"); + I = Map.insert(I, std::make_pair(MapKey(Ty, V), Result)); + + if (HasLargeKey) // Remember the reverse mapping if needed. + InverseMap.insert(std::make_pair(Result, I)); + + // If the type of the constant is abstract, make sure that an entry + // exists for it in the AbstractTypeMap. + if (Ty->isAbstract()) { + typename AbstractTypeMapTy::iterator TI = + AbstractTypeMap.find(Ty); + + if (TI == AbstractTypeMap.end()) { + // Add ourselves to the ATU list of the type. + cast(Ty)->addAbstractTypeUser(this); + + AbstractTypeMap.insert(TI, std::make_pair(Ty, I)); + } + } + + return Result; + } +public: + + /// getOrCreate - Return the specified constant from the map, creating it if + /// necessary. + ConstantClass *getOrCreate(const TypeClass *Ty, const ValType &V) { + sys::SmartScopedLock Lock(ValueMapLock); + MapKey Lookup(Ty, V); + ConstantClass* Result = 0; + + typename MapTy::iterator I = Map.find(Lookup); + // Is it in the map? + if (I != Map.end()) + Result = static_cast(I->second); + + if (!Result) { + // If no preexisting value, create one now... + Result = Create(Ty, V, I); + } + + return Result; + } + + void remove(ConstantClass *CP) { + sys::SmartScopedLock Lock(ValueMapLock); + typename MapTy::iterator I = FindExistingElement(CP); + assert(I != Map.end() && "Constant not found in constant table!"); + assert(I->second == CP && "Didn't find correct element?"); + + if (HasLargeKey) // Remember the reverse mapping if needed. + InverseMap.erase(CP); + + // Now that we found the entry, make sure this isn't the entry that + // the AbstractTypeMap points to. + const TypeClass *Ty = static_cast(I->first.first); + if (Ty->isAbstract()) { + assert(AbstractTypeMap.count(Ty) && + "Abstract type not in AbstractTypeMap?"); + typename MapTy::iterator &ATMEntryIt = AbstractTypeMap[Ty]; + if (ATMEntryIt == I) { + // Yes, we are removing the representative entry for this type. + // See if there are any other entries of the same type. + typename MapTy::iterator TmpIt = ATMEntryIt; + + // First check the entry before this one... + if (TmpIt != Map.begin()) { + --TmpIt; + if (TmpIt->first.first != Ty) // Not the same type, move back... + ++TmpIt; + } + + // If we didn't find the same type, try to move forward... + if (TmpIt == ATMEntryIt) { + ++TmpIt; + if (TmpIt == Map.end() || TmpIt->first.first != Ty) + --TmpIt; // No entry afterwards with the same type + } + + // If there is another entry in the map of the same abstract type, + // update the AbstractTypeMap entry now. + if (TmpIt != ATMEntryIt) { + ATMEntryIt = TmpIt; + } else { + // Otherwise, we are removing the last instance of this type + // from the table. Remove from the ATM, and from user list. + cast(Ty)->removeAbstractTypeUser(this); + AbstractTypeMap.erase(Ty); + } + } + } + + Map.erase(I); + } + + + /// MoveConstantToNewSlot - If we are about to change C to be the element + /// specified by I, update our internal data structures to reflect this + /// fact. + /// NOTE: This function is not locked. It is the responsibility of the + /// caller to enforce proper synchronization if using this method. + void MoveConstantToNewSlot(ConstantClass *C, typename MapTy::iterator I) { + // First, remove the old location of the specified constant in the map. + typename MapTy::iterator OldI = FindExistingElement(C); + assert(OldI != Map.end() && "Constant not found in constant table!"); + assert(OldI->second == C && "Didn't find correct element?"); + + // If this constant is the representative element for its abstract type, + // update the AbstractTypeMap so that the representative element is I. + if (C->getType()->isAbstract()) { + typename AbstractTypeMapTy::iterator ATI = + AbstractTypeMap.find(C->getType()); + assert(ATI != AbstractTypeMap.end() && + "Abstract type not in AbstractTypeMap?"); + if (ATI->second == OldI) + ATI->second = I; + } + + // Remove the old entry from the map. + Map.erase(OldI); + + // Update the inverse map so that we know that this constant is now + // located at descriptor I. + if (HasLargeKey) { + assert(I->second == C && "Bad inversemap entry!"); + InverseMap[C] = I; + } + } + + void refineAbstractType(const DerivedType *OldTy, const Type *NewTy) { + sys::SmartScopedLock Lock(ValueMapLock); + typename AbstractTypeMapTy::iterator I = + AbstractTypeMap.find(cast(OldTy)); + + assert(I != AbstractTypeMap.end() && + "Abstract type not in AbstractTypeMap?"); + + // Convert a constant at a time until the last one is gone. The last one + // leaving will remove() itself, causing the AbstractTypeMapEntry to be + // eliminated eventually. + do { + ConvertConstantType::convert( + static_cast(I->second->second), + cast(NewTy)); + + I = AbstractTypeMap.find(cast(OldTy)); + } while (I != AbstractTypeMap.end()); + } + + // If the type became concrete without being refined to any other existing + // type, we just remove ourselves from the ATU list. + void typeBecameConcrete(const DerivedType *AbsTy) { + AbsTy->removeAbstractTypeUser(this); + } + + void dump() const { + DOUT << "Constant.cpp: ValueMap\n"; + } +}; + +LLVMContextImpl::LLVMContextImpl(LLVMContext &C) : + Context(C), TheTrueVal(0), TheFalseVal(0) { + AggZeroConstants = new ContextValueMap(); +} + +LLVMContextImpl::~LLVMContextImpl() { + delete AggZeroConstants; +} + // Get a ConstantInt from an APInt. Note that the value stored in the DenseMap // as the key, is a DenseMapAPIntKeyInfo::KeyTy which has provided the // operator== and operator!= to ensure that the DenseMap doesn't attempt to @@ -116,6 +404,14 @@ return N; } +ConstantAggregateZero* +LLVMContextImpl::getConstantAggregateZero(const Type *Ty) { + assert((isa(Ty) || isa(Ty) || isa(Ty)) && + "Cannot create an aggregate zero of non-aggregate type!"); + + // Implicitly locked. + return AggZeroConstants->getOrCreate(Ty, 0); +} // *** erase methods *** @@ -128,3 +424,7 @@ sys::SmartScopedWriter Writer(ConstantsLock); MDNodeSet.RemoveNode(M); } + +void LLVMContextImpl::erase(ConstantAggregateZero *Z) { + AggZeroConstants->remove(Z); +} Modified: llvm/trunk/lib/VMCore/LLVMContextImpl.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContextImpl.h?rev=76634&r1=76633&r2=76634&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/LLVMContextImpl.h (original) +++ llvm/trunk/lib/VMCore/LLVMContextImpl.h Tue Jul 21 15:13:12 2009 @@ -17,14 +17,24 @@ #include "llvm/LLVMContext.h" #include "llvm/DerivedTypes.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/System/Mutex.h" #include "llvm/System/RWMutex.h" #include "llvm/ADT/APFloat.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/StringMap.h" +#include + +template +class ContextValueMap; namespace llvm { +template +struct ConstantTraits; class ConstantInt; class ConstantFP; @@ -101,6 +111,8 @@ FoldingSet MDNodeSet; + ContextValueMap *AggZeroConstants; + LLVMContext &Context; ConstantInt *TheTrueVal; ConstantInt *TheFalseVal; @@ -108,7 +120,8 @@ LLVMContextImpl(); LLVMContextImpl(const LLVMContextImpl&); public: - LLVMContextImpl(LLVMContext &C) : Context(C), TheTrueVal(0), TheFalseVal(0) {} + LLVMContextImpl(LLVMContext &C); + ~LLVMContextImpl(); /// Return a ConstantInt with the specified value and an implied Type. The /// type is the integer type that corresponds to the bit width of the value. @@ -120,6 +133,8 @@ MDNode *getMDNode(Value*const* Vals, unsigned NumVals); + ConstantAggregateZero *getConstantAggregateZero(const Type *Ty); + ConstantInt *getTrue() { if (TheTrueVal) return TheTrueVal; @@ -136,6 +151,7 @@ void erase(MDString *M); void erase(MDNode *M); + void erase(ConstantAggregateZero *Z); }; } From eli.friedman at gmail.com Tue Jul 21 15:15:25 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 21 Jul 2009 20:15:25 -0000 Subject: [llvm-commits] [llvm] r76635 - /llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp Message-ID: <200907212015.n6LKFPvJ009693@zion.cs.uiuc.edu> Author: efriedma Date: Tue Jul 21 15:15:24 2009 New Revision: 76635 URL: http://llvm.org/viewvc/llvm-project?rev=76635&view=rev Log: Missed a piece of the commit to remove the shift flavor. Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp?rev=76635&r1=76634&r2=76635&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp (original) +++ llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp Tue Jul 21 15:15:24 2009 @@ -61,7 +61,6 @@ computeRegisterProperties(); // Set shifts properties - setShiftAmountFlavor(Extend); setShiftAmountType(MVT::i64); // Provide all sorts of operation actions From edwintorok at gmail.com Tue Jul 21 15:27:16 2009 From: edwintorok at gmail.com (Torok Edwin) Date: Tue, 21 Jul 2009 20:27:16 -0000 Subject: [llvm-commits] [llvm] r76636 - /llvm/trunk/docs/ReleaseNotes-2.6.html Message-ID: <200907212027.n6LKRHs6010200@zion.cs.uiuc.edu> Author: edwin Date: Tue Jul 21 15:27:10 2009 New Revision: 76636 URL: http://llvm.org/viewvc/llvm-project?rev=76636&view=rev Log: Add a few fairly obvious API changes I noticed while porting some old code. Modified: llvm/trunk/docs/ReleaseNotes-2.6.html Modified: llvm/trunk/docs/ReleaseNotes-2.6.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes-2.6.html?rev=76636&r1=76635&r2=76636&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes-2.6.html (original) +++ llvm/trunk/docs/ReleaseNotes-2.6.html Tue Jul 21 15:27:10 2009 @@ -457,6 +457,14 @@ already exists. If Force is set to true, the file will be silently truncated (which is the behavior before this flag was added).
      6. +
      7. SCEVHandle no longer exists, because reference counting is no +longer done for SCEV* objects, instead const SCEV* should be +used.
      8. +
      9. llvm-dis now fails if output file exists, instead of dumping to stdout. +FIXME: describe any other tool changes due to the raw_fd_ostream change
      10. +
      11. temporarely due to Context API change passes should call doInitialization() +method of the pass they inherit from, otherwise Context is NULL. +FIXME: remove this entry when this is no longer needed.
      12. From daniel at zuster.org Tue Jul 21 15:36:17 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 13:36:17 -0700 Subject: [llvm-commits] [llvm] r76598 - in /llvm/trunk: include/llvm/ lib/Analysis/ lib/AsmParser/ lib/CodeGen/SelectionDAG/ lib/Transforms/IPO/ lib/Transforms/Scalar/ lib/VMCore/ In-Reply-To: <200907211803.n6LI3wx9004278@zion.cs.uiuc.edu> References: <200907211803.n6LI3wx9004278@zion.cs.uiuc.edu> Message-ID: <6a8523d60907211336m6720c986x1022871c411db757@mail.gmail.com> Hi Owen, Before forging on with more LLVMContextification, can you please fix the Pass interfaces? See the comments from Bob, Devang, and myself. - Daniel On Tue, Jul 21, 2009 at 11:03 AM, Owen Anderson wrote: > Author: resistor > Date: Tue Jul 21 13:03:38 2009 > New Revision: 76598 > > URL: http://llvm.org/viewvc/llvm-project?rev=76598&view=rev > Log: > Rename getConstantInt{True|False} to get{True|False} at Chris' behest. > > Modified: > ? ?llvm/trunk/include/llvm/LLVMContext.h > ? ?llvm/trunk/lib/Analysis/SparsePropagation.cpp > ? ?llvm/trunk/lib/AsmParser/LLParser.cpp > ? ?llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > ? ?llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp > ? ?llvm/trunk/lib/Transforms/Scalar/GVN.cpp > ? ?llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp > ? ?llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp > ? ?llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp > ? ?llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp > ? ?llvm/trunk/lib/Transforms/Scalar/SCCP.cpp > ? ?llvm/trunk/lib/VMCore/ConstantFold.cpp > ? ?llvm/trunk/lib/VMCore/LLVMContext.cpp > ? ?llvm/trunk/lib/VMCore/LLVMContextImpl.h > > Modified: llvm/trunk/include/llvm/LLVMContext.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LLVMContext.h?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/include/llvm/LLVMContext.h (original) > +++ llvm/trunk/include/llvm/LLVMContext.h Tue Jul 21 13:03:38 2009 > @@ -68,8 +68,8 @@ > ? UndefValue* getUndef(const Type* Ty); > > ? // ConstantInt accessors > - ?ConstantInt* getConstantIntTrue(); > - ?ConstantInt* getConstantIntFalse(); > + ?ConstantInt* getTrue(); > + ?ConstantInt* getFalse(); > > ? /// If Ty is a vector type, return a Constant with a splat of the given > ? /// value. Otherwise return a ConstantInt for the given value. > > Modified: llvm/trunk/lib/Analysis/SparsePropagation.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/SparsePropagation.cpp?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/Analysis/SparsePropagation.cpp (original) > +++ llvm/trunk/lib/Analysis/SparsePropagation.cpp Tue Jul 21 13:03:38 2009 > @@ -154,7 +154,7 @@ > ? ? } > > ? ? // Constant condition variables mean the branch can only go a single way > - ? ?Succs[C == Context->getConstantIntFalse()] = true; > + ? ?Succs[C == Context->getFalse()] = true; > ? ? return; > ? } > > > Modified: llvm/trunk/lib/AsmParser/LLParser.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/AsmParser/LLParser.cpp (original) > +++ llvm/trunk/lib/AsmParser/LLParser.cpp Tue Jul 21 13:03:38 2009 > @@ -1706,11 +1706,11 @@ > ? ? ID.Kind = ValID::t_APFloat; > ? ? break; > ? case lltok::kw_true: > - ? ?ID.ConstantVal = Context.getConstantIntTrue(); > + ? ?ID.ConstantVal = Context.getTrue(); > ? ? ID.Kind = ValID::t_Constant; > ? ? break; > ? case lltok::kw_false: > - ? ?ID.ConstantVal = Context.getConstantIntFalse(); > + ? ?ID.ConstantVal = Context.getFalse(); > ? ? ID.Kind = ValID::t_Constant; > ? ? break; > ? case lltok::kw_null: ID.Kind = ValID::t_Null; break; > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Tue Jul 21 13:03:38 2009 > @@ -1149,7 +1149,7 @@ > ? } > > ? // Create a CaseBlock record representing this branch. > - ?CaseBlock CB(ISD::SETEQ, Cond, DAG.getContext()->getConstantIntTrue(), > + ?CaseBlock CB(ISD::SETEQ, Cond, DAG.getContext()->getTrue(), > ? ? ? ? ? ? ? ?NULL, TBB, FBB, CurBB); > ? SwitchCases.push_back(CB); > ?} > @@ -1304,7 +1304,7 @@ > ? } > > ? // Create a CaseBlock record representing this branch. > - ?CaseBlock CB(ISD::SETEQ, CondVal, DAG.getContext()->getConstantIntTrue(), > + ?CaseBlock CB(ISD::SETEQ, CondVal, DAG.getContext()->getTrue(), > ? ? ? ? ? ? ? ?NULL, Succ0MBB, Succ1MBB, CurMBB); > ? // Use visitSwitchCase to actually insert the fast branch sequence for this > ? // cond branch. > @@ -1322,10 +1322,10 @@ > ? if (CB.CmpMHS == NULL) { > ? ? // Fold "(X == true)" to X and "(X == false)" to !X to > ? ? // handle common cases produced by branch lowering. > - ? ?if (CB.CmpRHS == DAG.getContext()->getConstantIntTrue() && > + ? ?if (CB.CmpRHS == DAG.getContext()->getTrue() && > ? ? ? ? CB.CC == ISD::SETEQ) > ? ? ? Cond = CondLHS; > - ? ?else if (CB.CmpRHS == DAG.getContext()->getConstantIntFalse() && > + ? ?else if (CB.CmpRHS == DAG.getContext()->getFalse() && > ? ? ? ? ? ? ?CB.CC == ISD::SETEQ) { > ? ? ? SDValue True = DAG.getConstant(1, CondLHS.getValueType()); > ? ? ? Cond = DAG.getNode(ISD::XOR, dl, CondLHS.getValueType(), CondLHS, True); > > Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original) > +++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Tue Jul 21 13:03:38 2009 > @@ -865,7 +865,7 @@ > ? GlobalVariable *InitBool = > ? ? new GlobalVariable(*Context, Type::Int1Ty, false, > ? ? ? ? ? ? ? ? ? ? ? ?GlobalValue::InternalLinkage, > - ? ? ? ? ? ? ? ? ? ? ? Context->getConstantIntFalse(), GV->getName()+".init", > + ? ? ? ? ? ? ? ? ? ? ? Context->getFalse(), GV->getName()+".init", > ? ? ? ? ? ? ? ? ? ? ? ?GV->isThreadLocal()); > ? bool InitBoolUsed = false; > > @@ -886,7 +886,7 @@ > ? ? ? ? ? default: llvm_unreachable("Unknown ICmp Predicate!"); > ? ? ? ? ? case ICmpInst::ICMP_ULT: > ? ? ? ? ? case ICmpInst::ICMP_SLT: > - ? ? ? ? ? ?LV = Context->getConstantIntFalse(); ? // X < null -> always false > + ? ? ? ? ? ?LV = Context->getFalse(); ? // X < null -> always false > ? ? ? ? ? ? break; > ? ? ? ? ? case ICmpInst::ICMP_ULE: > ? ? ? ? ? case ICmpInst::ICMP_SLE: > @@ -908,7 +908,7 @@ > ? ? } else { > ? ? ? StoreInst *SI = cast(GV->use_back()); > ? ? ? // The global is initialized when the store to it occurs. > - ? ? ?new StoreInst(Context->getConstantIntTrue(), InitBool, SI); > + ? ? ?new StoreInst(Context->getTrue(), InitBool, SI); > ? ? ? SI->eraseFromParent(); > ? ? } > > @@ -1583,7 +1583,7 @@ > > ? // Create the new global, initializing it to false. > ? GlobalVariable *NewGV = new GlobalVariable(*Context, Type::Int1Ty, false, > - ? ? ? ? GlobalValue::InternalLinkage, Context->getConstantIntFalse(), > + ? ? ? ? GlobalValue::InternalLinkage, Context->getFalse(), > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?GV->getName()+".b", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?GV->isThreadLocal()); > ? GV->getParent()->getGlobalList().insert(GV, NewGV); > > Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) > +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Jul 21 13:03:38 2009 > @@ -1384,9 +1384,9 @@ > ? ? BasicBlock* falseSucc = BI->getSuccessor(1); > > ? ? if (trueSucc->getSinglePredecessor()) > - ? ? ?localAvail[trueSucc]->table[condVN] = Context->getConstantIntTrue(); > + ? ? ?localAvail[trueSucc]->table[condVN] = Context->getTrue(); > ? ? if (falseSucc->getSinglePredecessor()) > - ? ? ?localAvail[falseSucc]->table[condVN] = Context->getConstantIntFalse(); > + ? ? ?localAvail[falseSucc]->table[condVN] = Context->getFalse(); > > ? ? return false; > > > Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) > +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Tue Jul 21 13:03:38 2009 > @@ -2876,8 +2876,8 @@ > ? ? ? ? *I = SI->getOperand(NonNullOperand); > ? ? ? ? AddToWorkList(BBI); > ? ? ? } else if (*I == SelectCond) { > - ? ? ? ?*I = NonNullOperand == 1 ? Context->getConstantIntTrue() : > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Context->getConstantIntFalse(); > + ? ? ? ?*I = NonNullOperand == 1 ? Context->getTrue() : > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Context->getFalse(); > ? ? ? ? AddToWorkList(BBI); > ? ? ? } > ? ? } > @@ -3371,7 +3371,7 @@ > ? ? ? ? ? ? ? ? ? ? ? ? ? ?LLVMContext *Context) { > ? switch (code) { > ? default: llvm_unreachable("Illegal ICmp code!"); > - ?case ?0: return Context->getConstantIntFalse(); > + ?case ?0: return Context->getFalse(); > ? case ?1: > ? ? if (sign) > ? ? ? return new ICmpInst(*Context, ICmpInst::ICMP_SGT, LHS, RHS); > @@ -3394,7 +3394,7 @@ > ? ? ? return new ICmpInst(*Context, ICmpInst::ICMP_SLE, LHS, RHS); > ? ? else > ? ? ? return new ICmpInst(*Context, ICmpInst::ICMP_ULE, LHS, RHS); > - ?case ?7: return Context->getConstantIntTrue(); > + ?case ?7: return Context->getTrue(); > ? } > ?} > > @@ -3440,7 +3440,7 @@ > ? ? ? return new FCmpInst(*Context, FCmpInst::FCMP_OLE, LHS, RHS); > ? ? else > ? ? ? return new FCmpInst(*Context, FCmpInst::FCMP_ULE, LHS, RHS); > - ?case ?7: return Context->getConstantIntTrue(); > + ?case ?7: return Context->getTrue(); > ? } > ?} > > @@ -3825,7 +3825,7 @@ > ? ? case ICmpInst::ICMP_EQ: ? ? ? ? // (X == 13 & X == 15) -> false > ? ? case ICmpInst::ICMP_UGT: ? ? ? ?// (X == 13 & X > ?15) -> false > ? ? case ICmpInst::ICMP_SGT: ? ? ? ?// (X == 13 & X > ?15) -> false > - ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? case ICmpInst::ICMP_NE: ? ? ? ? // (X == 13 & X != 15) -> X == 13 > ? ? case ICmpInst::ICMP_ULT: ? ? ? ?// (X == 13 & X < ?15) -> X == 13 > ? ? case ICmpInst::ICMP_SLT: ? ? ? ?// (X == 13 & X < ?15) -> X == 13 > @@ -3863,7 +3863,7 @@ > ? ? default: llvm_unreachable("Unknown integer condition code!"); > ? ? case ICmpInst::ICMP_EQ: ? ? ? ? // (X u< 13 & X == 15) -> false > ? ? case ICmpInst::ICMP_UGT: ? ? ? ?// (X u< 13 & X u> 15) -> false > - ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? case ICmpInst::ICMP_SGT: ? ? ? ?// (X u< 13 & X s> 15) -> no change > ? ? ? break; > ? ? case ICmpInst::ICMP_NE: ? ? ? ? // (X u< 13 & X != 15) -> X u< 13 > @@ -3878,7 +3878,7 @@ > ? ? default: llvm_unreachable("Unknown integer condition code!"); > ? ? case ICmpInst::ICMP_EQ: ? ? ? ? // (X s< 13 & X == 15) -> false > ? ? case ICmpInst::ICMP_SGT: ? ? ? ?// (X s< 13 & X s> 15) -> false > - ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? case ICmpInst::ICMP_UGT: ? ? ? ?// (X s< 13 & X u> 15) -> no change > ? ? ? break; > ? ? case ICmpInst::ICMP_NE: ? ? ? ? // (X s< 13 & X != 15) -> X < 13 > @@ -4211,7 +4211,7 @@ > ? ? ? ? ? ? // If either of the constants are nans, then the whole thing returns > ? ? ? ? ? ? // false. > ? ? ? ? ? ? if (LHSC->getValueAPF().isNaN() || RHSC->getValueAPF().isNaN()) > - ? ? ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? ? ? ? return new FCmpInst(*Context, FCmpInst::FCMP_ORD, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? LHS->getOperand(0), RHS->getOperand(0)); > ? ? ? ? ? } > @@ -4234,7 +4234,7 @@ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Op0LHS, Op0RHS); > ? ? ? ? ? ? else if (Op0CC == FCmpInst::FCMP_FALSE || > ? ? ? ? ? ? ? ? ? ? ?Op1CC == FCmpInst::FCMP_FALSE) > - ? ? ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? ? ? ? else if (Op0CC == FCmpInst::FCMP_TRUE) > ? ? ? ? ? ? ? return ReplaceInstUsesWith(I, Op1); > ? ? ? ? ? ? else if (Op1CC == FCmpInst::FCMP_TRUE) > @@ -4256,7 +4256,7 @@ > ? ? ? ? ? ? ? // uno && oeq -> uno && (ord && eq) -> false > ? ? ? ? ? ? ? // uno && ord -> false > ? ? ? ? ? ? ? if (!Op0Ordered) > - ? ? ? ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? ? ? ? ? // ord && ueq -> ord && (uno || eq) -> oeq > ? ? ? ? ? ? ? return cast(getFCmpValue(true, Op1Pred, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Op0LHS, Op0RHS, Context)); > @@ -4541,7 +4541,7 @@ > ? ? case ICmpInst::ICMP_NE: ? ? ? ? ?// (X != 13 | X != 15) -> true > ? ? case ICmpInst::ICMP_ULT: ? ? ? ? // (X != 13 | X u< 15) -> true > ? ? case ICmpInst::ICMP_SLT: ? ? ? ? // (X != 13 | X s< 15) -> true > - ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? } > ? ? break; > ? case ICmpInst::ICMP_ULT: > @@ -4596,7 +4596,7 @@ > ? ? ? break; > ? ? case ICmpInst::ICMP_NE: ? ? ? ? // (X u> 13 | X != 15) -> true > ? ? case ICmpInst::ICMP_ULT: ? ? ? ?// (X u> 13 | X u< 15) -> true > - ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? case ICmpInst::ICMP_SLT: ? ? ? ?// (X u> 13 | X s< 15) -> no change > ? ? ? break; > ? ? } > @@ -4611,7 +4611,7 @@ > ? ? ? break; > ? ? case ICmpInst::ICMP_NE: ? ? ? ? // (X s> 13 | X != 15) -> true > ? ? case ICmpInst::ICMP_SLT: ? ? ? ?// (X s> 13 | X s< 15) -> true > - ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? case ICmpInst::ICMP_ULT: ? ? ? ?// (X s> 13 | X u< 15) -> no change > ? ? ? break; > ? ? } > @@ -4919,7 +4919,7 @@ > ? ? ? ? ? ? // If either of the constants are nans, then the whole thing returns > ? ? ? ? ? ? // true. > ? ? ? ? ? ? if (LHSC->getValueAPF().isNaN() || RHSC->getValueAPF().isNaN()) > - ? ? ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > > ? ? ? ? ? ? // Otherwise, no need to compare the two constants, compare the > ? ? ? ? ? ? // rest. > @@ -4945,7 +4945,7 @@ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Op0LHS, Op0RHS); > ? ? ? ? ? ? else if (Op0CC == FCmpInst::FCMP_TRUE || > ? ? ? ? ? ? ? ? ? ? ?Op1CC == FCmpInst::FCMP_TRUE) > - ? ? ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? ? ? ? else if (Op0CC == FCmpInst::FCMP_FALSE) > ? ? ? ? ? ? ? return ReplaceInstUsesWith(I, Op1); > ? ? ? ? ? ? else if (Op1CC == FCmpInst::FCMP_FALSE) > @@ -5037,7 +5037,7 @@ > > > ? if (ConstantInt *RHS = dyn_cast(Op1)) { > - ? ?if (RHS == Context->getConstantIntTrue() && Op0->hasOneUse()) { > + ? ?if (RHS == Context->getTrue() && Op0->hasOneUse()) { > ? ? ? // xor (cmp A, B), true = not (cmp A, B) = !cmp A, B > ? ? ? if (ICmpInst *ICI = dyn_cast(Op0)) > ? ? ? ? return new ICmpInst(*Context, ICI->getInversePredicate(), > @@ -5055,7 +5055,7 @@ > ? ? ? ? ? Instruction::CastOps Opcode = Op0C->getOpcode(); > ? ? ? ? ? if (Opcode == Instruction::ZExt || Opcode == Instruction::SExt) { > ? ? ? ? ? ? if (RHS == Context->getConstantExprCast(Opcode, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Context->getConstantIntTrue(), > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Context->getTrue(), > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Op0C->getDestTy())) { > ? ? ? ? ? ? ? Instruction *NewCI = InsertNewInstBefore(CmpInst::Create( > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?*Context, > @@ -5706,9 +5706,9 @@ > ? ? Pred = ICmpInst::ICMP_NE; > ? ? break; > ? case FCmpInst::FCMP_ORD: > - ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? case FCmpInst::FCMP_UNO: > - ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? } > > ? const IntegerType *IntTy = cast(LHSI->getOperand(0)->getType()); > @@ -5728,8 +5728,8 @@ > ? ? if (SMax.compare(RHS) == APFloat::cmpLessThan) { ?// smax < 13123.0 > ? ? ? if (Pred == ICmpInst::ICMP_NE ?|| Pred == ICmpInst::ICMP_SLT || > ? ? ? ? ? Pred == ICmpInst::ICMP_SLE) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > - ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > + ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? } > ? } else { > ? ? // If the RHS value is > UnsignedMax, fold the comparison. This handles > @@ -5740,8 +5740,8 @@ > ? ? if (UMax.compare(RHS) == APFloat::cmpLessThan) { ?// umax < 13123.0 > ? ? ? if (Pred == ICmpInst::ICMP_NE ?|| Pred == ICmpInst::ICMP_ULT || > ? ? ? ? ? Pred == ICmpInst::ICMP_ULE) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > - ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > + ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? } > ? } > > @@ -5753,8 +5753,8 @@ > ? ? if (SMin.compare(RHS) == APFloat::cmpGreaterThan) { // smin > 12312.0 > ? ? ? if (Pred == ICmpInst::ICMP_NE || Pred == ICmpInst::ICMP_SGT || > ? ? ? ? ? Pred == ICmpInst::ICMP_SGE) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > - ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > + ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? } > ? } > > @@ -5776,14 +5776,14 @@ > ? ? ? switch (Pred) { > ? ? ? default: llvm_unreachable("Unexpected integer comparison!"); > ? ? ? case ICmpInst::ICMP_NE: ?// (float)int != 4.4 ? --> true > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? case ICmpInst::ICMP_EQ: ?// (float)int == 4.4 ? --> false > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? case ICmpInst::ICMP_ULE: > ? ? ? ? // (float)int <= 4.4 ? --> int <= 4 > ? ? ? ? // (float)int <= -4.4 ?--> false > ? ? ? ? if (RHS.isNegative()) > - ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? ? break; > ? ? ? case ICmpInst::ICMP_SLE: > ? ? ? ? // (float)int <= 4.4 ? --> int <= 4 > @@ -5795,7 +5795,7 @@ > ? ? ? ? // (float)int < -4.4 ? --> false > ? ? ? ? // (float)int < 4.4 ? ?--> int <= 4 > ? ? ? ? if (RHS.isNegative()) > - ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? ? Pred = ICmpInst::ICMP_ULE; > ? ? ? ? break; > ? ? ? case ICmpInst::ICMP_SLT: > @@ -5808,7 +5808,7 @@ > ? ? ? ? // (float)int > 4.4 ? ?--> int > 4 > ? ? ? ? // (float)int > -4.4 ? --> true > ? ? ? ? if (RHS.isNegative()) > - ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? ? break; > ? ? ? case ICmpInst::ICMP_SGT: > ? ? ? ? // (float)int > 4.4 ? ?--> int > 4 > @@ -5820,7 +5820,7 @@ > ? ? ? ? // (float)int >= -4.4 ? --> true > ? ? ? ? // (float)int >= 4.4 ? ?--> int > 4 > ? ? ? ? if (!RHS.isNegative()) > - ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? ? Pred = ICmpInst::ICMP_UGT; > ? ? ? ? break; > ? ? ? case ICmpInst::ICMP_SGE: > @@ -5844,9 +5844,9 @@ > > ? // Fold trivial predicates. > ? if (I.getPredicate() == FCmpInst::FCMP_FALSE) > - ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? if (I.getPredicate() == FCmpInst::FCMP_TRUE) > - ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > > ? // Simplify 'fcmp pred X, X' > ? if (Op0 == Op1) { > @@ -5855,11 +5855,11 @@ > ? ? case FCmpInst::FCMP_UEQ: ? ?// True if unordered or equal > ? ? case FCmpInst::FCMP_UGE: ? ?// True if unordered, greater than, or equal > ? ? case FCmpInst::FCMP_ULE: ? ?// True if unordered, less than, or equal > - ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? case FCmpInst::FCMP_OGT: ? ?// True if ordered and greater than > ? ? case FCmpInst::FCMP_OLT: ? ?// True if ordered and less than > ? ? case FCmpInst::FCMP_ONE: ? ?// True if ordered and operands are unequal > - ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > > ? ? case FCmpInst::FCMP_UNO: ? ?// True if unordered: isnan(X) | isnan(Y) > ? ? case FCmpInst::FCMP_ULT: ? ?// True if unordered or less than > @@ -5890,11 +5890,11 @@ > ? ? if (ConstantFP *CFP = dyn_cast(RHSC)) { > ? ? ? if (CFP->getValueAPF().isNaN()) { > ? ? ? ? if (FCmpInst::isOrdered(I.getPredicate())) ? // True if ordered and... > - ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? ? assert(FCmpInst::isUnordered(I.getPredicate()) && > ? ? ? ? ? ? ? ?"Comparison must be either ordered or unordered!"); > ? ? ? ? // True if unordered. > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? } > ? ? } > > @@ -6044,22 +6044,22 @@ > ? ? default: break; > ? ? case ICmpInst::ICMP_ULE: > ? ? ? if (CI->isMaxValue(false)) ? ? ? ? ? ? ? ? // A <=u MAX -> TRUE > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? return new ICmpInst(*Context, ICmpInst::ICMP_ULT, Op0, > ? ? ? ? ? ? ? ? ? ? ? ? ? AddOne(CI, Context)); > ? ? case ICmpInst::ICMP_SLE: > ? ? ? if (CI->isMaxValue(true)) ? ? ? ? ? ? ? ? ?// A <=s MAX -> TRUE > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? return new ICmpInst(*Context, ICmpInst::ICMP_SLT, Op0, > ? ? ? ? ? ? ? ? ? ? ? ? ? AddOne(CI, Context)); > ? ? case ICmpInst::ICMP_UGE: > ? ? ? if (CI->isMinValue(false)) ? ? ? ? ? ? ? ? // A >=u MIN -> TRUE > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? return new ICmpInst(*Context, ICmpInst::ICMP_UGT, Op0, > ? ? ? ? ? ? ? ? ? ? ? ? ? SubOne(CI, Context)); > ? ? case ICmpInst::ICMP_SGE: > ? ? ? if (CI->isMinValue(true)) ? ? ? ? ? ? ? ? ?// A >=s MIN -> TRUE > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? return new ICmpInst(*Context, ICmpInst::ICMP_SGT, Op0, > ? ? ? ? ? ? ? ? ? ? ? ? ? SubOne(CI, Context)); > ? ? } > @@ -6119,17 +6119,17 @@ > ? ? default: llvm_unreachable("Unknown icmp opcode!"); > ? ? case ICmpInst::ICMP_EQ: > ? ? ? if (Op0Max.ult(Op1Min) || Op0Min.ugt(Op1Max)) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? break; > ? ? case ICmpInst::ICMP_NE: > ? ? ? if (Op0Max.ult(Op1Min) || Op0Min.ugt(Op1Max)) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? break; > ? ? case ICmpInst::ICMP_ULT: > ? ? ? if (Op0Max.ult(Op1Min)) ? ? ? ? ?// A true if max(A) < min(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? if (Op0Min.uge(Op1Max)) ? ? ? ? ?// A false if min(A) >= max(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? if (Op1Min == Op0Max) ? ? ? ? ? ?// A A != B if max(A) == min(B) > ? ? ? ? return new ICmpInst(*Context, ICmpInst::ICMP_NE, Op0, Op1); > ? ? ? if (ConstantInt *CI = dyn_cast(Op1)) { > @@ -6145,9 +6145,9 @@ > ? ? ? break; > ? ? case ICmpInst::ICMP_UGT: > ? ? ? if (Op0Min.ugt(Op1Max)) ? ? ? ? ?// A >u B -> true if min(A) > max(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? if (Op0Max.ule(Op1Min)) ? ? ? ? ?// A >u B -> false if max(A) <= max(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > > ? ? ? if (Op1Max == Op0Min) ? ? ? ? ? ?// A >u B -> A != B if min(A) == max(B) > ? ? ? ? return new ICmpInst(*Context, ICmpInst::ICMP_NE, Op0, Op1); > @@ -6164,9 +6164,9 @@ > ? ? ? break; > ? ? case ICmpInst::ICMP_SLT: > ? ? ? if (Op0Max.slt(Op1Min)) ? ? ? ? ?// A true if max(A) < min(C) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? if (Op0Min.sge(Op1Max)) ? ? ? ? ?// A false if min(A) >= max(C) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? if (Op1Min == Op0Max) ? ? ? ? ? ?// A A != B if max(A) == min(B) > ? ? ? ? return new ICmpInst(*Context, ICmpInst::ICMP_NE, Op0, Op1); > ? ? ? if (ConstantInt *CI = dyn_cast(Op1)) { > @@ -6177,9 +6177,9 @@ > ? ? ? break; > ? ? case ICmpInst::ICMP_SGT: > ? ? ? if (Op0Min.sgt(Op1Max)) ? ? ? ? ?// A >s B -> true if min(A) > max(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? if (Op0Max.sle(Op1Min)) ? ? ? ? ?// A >s B -> false if max(A) <= min(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > > ? ? ? if (Op1Max == Op0Min) ? ? ? ? ? ?// A >s B -> A != B if min(A) == max(B) > ? ? ? ? return new ICmpInst(*Context, ICmpInst::ICMP_NE, Op0, Op1); > @@ -6192,30 +6192,30 @@ > ? ? case ICmpInst::ICMP_SGE: > ? ? ? assert(!isa(Op1) && "ICMP_SGE with ConstantInt not folded!"); > ? ? ? if (Op0Min.sge(Op1Max)) ? ? ? ? ?// A >=s B -> true if min(A) >= max(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? if (Op0Max.slt(Op1Min)) ? ? ? ? ?// A >=s B -> false if max(A) < min(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? break; > ? ? case ICmpInst::ICMP_SLE: > ? ? ? assert(!isa(Op1) && "ICMP_SLE with ConstantInt not folded!"); > ? ? ? if (Op0Max.sle(Op1Min)) ? ? ? ? ?// A <=s B -> true if max(A) <= min(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? if (Op0Min.sgt(Op1Max)) ? ? ? ? ?// A <=s B -> false if min(A) > max(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? break; > ? ? case ICmpInst::ICMP_UGE: > ? ? ? assert(!isa(Op1) && "ICMP_UGE with ConstantInt not folded!"); > ? ? ? if (Op0Min.uge(Op1Max)) ? ? ? ? ?// A >=u B -> true if min(A) >= max(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? if (Op0Max.ult(Op1Min)) ? ? ? ? ?// A >=u B -> false if max(A) < min(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? break; > ? ? case ICmpInst::ICMP_ULE: > ? ? ? assert(!isa(Op1) && "ICMP_ULE with ConstantInt not folded!"); > ? ? ? if (Op0Max.ule(Op1Min)) ? ? ? ? ?// A <=u B -> true if max(A) <= min(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntTrue()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getTrue()); > ? ? ? if (Op0Min.ugt(Op1Max)) ? ? ? ? ?// A <=u B -> false if min(A) > max(B) > - ? ? ? ?return ReplaceInstUsesWith(I, Context->getConstantIntFalse()); > + ? ? ? ?return ReplaceInstUsesWith(I, Context->getFalse()); > ? ? ? break; > ? ? } > > @@ -6628,7 +6628,7 @@ > ? default: llvm_unreachable("Unhandled icmp opcode!"); > ? case ICmpInst::ICMP_EQ: > ? ? if (LoOverflow && HiOverflow) > - ? ? ?return ReplaceInstUsesWith(ICI, Context->getConstantIntFalse()); > + ? ? ?return ReplaceInstUsesWith(ICI, Context->getFalse()); > ? ? else if (HiOverflow) > ? ? ? return new ICmpInst(*Context, DivIsSigned ? ICmpInst::ICMP_SGE : > ? ? ? ? ? ? ? ? ? ? ? ? ? ICmpInst::ICMP_UGE, X, LoBound); > @@ -6639,7 +6639,7 @@ > ? ? ? return InsertRangeTest(X, LoBound, HiBound, DivIsSigned, true, ICI); > ? case ICmpInst::ICMP_NE: > ? ? if (LoOverflow && HiOverflow) > - ? ? ?return ReplaceInstUsesWith(ICI, Context->getConstantIntTrue()); > + ? ? ?return ReplaceInstUsesWith(ICI, Context->getTrue()); > ? ? else if (HiOverflow) > ? ? ? return new ICmpInst(*Context, DivIsSigned ? ICmpInst::ICMP_SLT : > ? ? ? ? ? ? ? ? ? ? ? ? ? ICmpInst::ICMP_ULT, X, LoBound); > @@ -6651,16 +6651,16 @@ > ? case ICmpInst::ICMP_ULT: > ? case ICmpInst::ICMP_SLT: > ? ? if (LoOverflow == +1) ? // Low bound is greater than input range. > - ? ? ?return ReplaceInstUsesWith(ICI, Context->getConstantIntTrue()); > + ? ? ?return ReplaceInstUsesWith(ICI, Context->getTrue()); > ? ? if (LoOverflow == -1) ? // Low bound is less than input range. > - ? ? ?return ReplaceInstUsesWith(ICI, Context->getConstantIntFalse()); > + ? ? ?return ReplaceInstUsesWith(ICI, Context->getFalse()); > ? ? return new ICmpInst(*Context, Pred, X, LoBound); > ? case ICmpInst::ICMP_UGT: > ? case ICmpInst::ICMP_SGT: > ? ? if (HiOverflow == +1) ? ? ? // High bound greater than input range. > - ? ? ?return ReplaceInstUsesWith(ICI, Context->getConstantIntFalse()); > + ? ? ?return ReplaceInstUsesWith(ICI, Context->getFalse()); > ? ? else if (HiOverflow == -1) ?// High bound less than input range. > - ? ? ?return ReplaceInstUsesWith(ICI, Context->getConstantIntTrue()); > + ? ? ?return ReplaceInstUsesWith(ICI, Context->getTrue()); > ? ? if (Pred == ICmpInst::ICMP_UGT) > ? ? ? return new ICmpInst(*Context, ICmpInst::ICMP_UGE, X, HiBound); > ? ? else > @@ -6829,9 +6829,9 @@ > ? ? ? ? ? ? // As a special case, check to see if this means that the > ? ? ? ? ? ? // result is always true or false now. > ? ? ? ? ? ? if (ICI.getPredicate() == ICmpInst::ICMP_EQ) > - ? ? ? ? ? ? ?return ReplaceInstUsesWith(ICI, Context->getConstantIntFalse()); > + ? ? ? ? ? ? ?return ReplaceInstUsesWith(ICI, Context->getFalse()); > ? ? ? ? ? ? if (ICI.getPredicate() == ICmpInst::ICMP_NE) > - ? ? ? ? ? ? ?return ReplaceInstUsesWith(ICI, Context->getConstantIntTrue()); > + ? ? ? ? ? ? ?return ReplaceInstUsesWith(ICI, Context->getTrue()); > ? ? ? ? ? } else { > ? ? ? ? ? ? ICI.setOperand(1, NewCst); > ? ? ? ? ? ? Constant *NewAndCST; > @@ -7252,9 +7252,9 @@ > ? // First, handle some easy cases. We know the result cannot be equal at this > ? // point so handle the ICI.isEquality() cases > ? if (ICI.getPredicate() == ICmpInst::ICMP_EQ) > - ? ?return ReplaceInstUsesWith(ICI, Context->getConstantIntFalse()); > + ? ?return ReplaceInstUsesWith(ICI, Context->getFalse()); > ? if (ICI.getPredicate() == ICmpInst::ICMP_NE) > - ? ?return ReplaceInstUsesWith(ICI, Context->getConstantIntTrue()); > + ? ?return ReplaceInstUsesWith(ICI, Context->getTrue()); > > ? // Evaluate the comparison for LT (we invert for GT below). LE and GE cases > ? // should have been folded away previously and not enter in here. > @@ -7262,9 +7262,9 @@ > ? if (isSignedCmp) { > ? ? // We're performing a signed comparison. > ? ? if (cast(CI)->getValue().isNegative()) > - ? ? ?Result = Context->getConstantIntFalse(); ? ? ? ? ?// X < (small) --> false > + ? ? ?Result = Context->getFalse(); ? ? ? ? ?// X < (small) --> false > ? ? else > - ? ? ?Result = Context->getConstantIntTrue(); ? ? ? ? ? // X < (large) --> true > + ? ? ?Result = Context->getTrue(); ? ? ? ? ? // X < (large) --> true > ? } else { > ? ? // We're performing an unsigned comparison. > ? ? if (isSignedExt) { > @@ -7275,7 +7275,7 @@ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?LHSCIOp, NegOne, ICI.getName()), ICI); > ? ? } else { > ? ? ? // Unsigned extend & unsigned compare -> always true. > - ? ? ?Result = Context->getConstantIntTrue(); > + ? ? ?Result = Context->getTrue(); > ? ? } > ? } > > @@ -8406,7 +8406,7 @@ > ? ? // cast (xor bool X, true) to int ?--> xor (cast bool X to int), 1 > ? ? if (isa(CI) && SrcBitSize == 1 && > ? ? ? ? SrcI->getOpcode() == Instruction::Xor && > - ? ? ? ?Op1 == Context->getConstantIntTrue() && > + ? ? ? ?Op1 == Context->getTrue() && > ? ? ? ? (!Op0->hasOneUse() || !isa(Op0))) { > ? ? ? Value *New = InsertCastBefore(Instruction::ZExt, Op0, DestTy, CI); > ? ? ? return BinaryOperator::CreateXor(New, > @@ -10021,7 +10021,7 @@ > ? ? ? Instruction *OldCall = CS.getInstruction(); > ? ? ? // If the call and callee calling conventions don't match, this call must > ? ? ? // be unreachable, as the call is undefined. > - ? ? ?new StoreInst(Context->getConstantIntTrue(), > + ? ? ?new StoreInst(Context->getTrue(), > ? ? ? ? ? ? ? ? Context->getUndef(Context->getPointerTypeUnqual(Type::Int1Ty)), > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? OldCall); > ? ? ? if (!OldCall->use_empty()) > @@ -10035,7 +10035,7 @@ > ? ? // This instruction is not reachable, just remove it. ?We insert a store to > ? ? // undef so that we know that this code is not reachable, despite the fact > ? ? // that we can't modify the CFG here. > - ? ?new StoreInst(Context->getConstantIntTrue(), > + ? ?new StoreInst(Context->getTrue(), > ? ? ? ? ? ? ? ?Context->getUndef(Context->getPointerTypeUnqual(Type::Int1Ty)), > ? ? ? ? ? ? ? ? ? CS.getInstruction()); > > @@ -10046,7 +10046,7 @@ > ? ? if (InvokeInst *II = dyn_cast(CS.getInstruction())) { > ? ? ? // Don't break the CFG, insert a dummy cond branch. > ? ? ? BranchInst::Create(II->getNormalDest(), II->getUnwindDest(), > - ? ? ? ? ? ? ? ? ? ? ? ? Context->getConstantIntTrue(), II); > + ? ? ? ? ? ? ? ? ? ? ? ? Context->getTrue(), II); > ? ? } > ? ? return EraseInstFromFunction(*CS.getInstruction()); > ? } > @@ -11354,7 +11354,7 @@ > ? // free undef -> unreachable. > ? if (isa(Op)) { > ? ? // Insert a new store to null because we cannot modify the CFG here. > - ? ?new StoreInst(Context->getConstantIntTrue(), > + ? ?new StoreInst(Context->getTrue(), > ? ? ? ? ? ?Context->getUndef(Context->getPointerTypeUnqual(Type::Int1Ty)), &FI); > ? ? return EraseInstFromFunction(FI); > ? } > > Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original) > +++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Tue Jul 21 13:03:38 2009 > @@ -718,7 +718,7 @@ > ? // Next, figure out which successor we are threading to. > ? BasicBlock *SuccBB; > ? if (BranchInst *BI = dyn_cast(BB->getTerminator())) > - ? ?SuccBB = BI->getSuccessor(PredCst == Context->getConstantIntFalse()); > + ? ?SuccBB = BI->getSuccessor(PredCst == Context->getFalse()); > ? else { > ? ? SwitchInst *SI = cast(BB->getTerminator()); > ? ? SuccBB = SI->getSuccessor(SI->findCaseValue(PredCst)); > @@ -803,7 +803,7 @@ > ? if (LHS == RHS) > ? ? if (isa(LHS->getType()) || isa(LHS->getType())) > ? ? ? return ICmpInst::isTrueWhenEqual(pred) ? > - ? ? ? ? ? ? ? ? Context->getConstantIntTrue() : Context->getConstantIntFalse(); > + ? ? ? ? ? ? ? ? Context->getTrue() : Context->getFalse(); > > ? return 0; > ?} > > Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original) > +++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Tue Jul 21 13:03:38 2009 > @@ -233,7 +233,7 @@ > ? ? ? ? Value *LoopCond = FindLIVLoopCondition(BI->getCondition(), > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?currentLoop, Changed); > ? ? ? ? if (LoopCond && UnswitchIfProfitable(LoopCond, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Context->getConstantIntTrue())) { > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Context->getTrue())) { > ? ? ? ? ? ++NumBranches; > ? ? ? ? ? return true; > ? ? ? ? } > @@ -263,7 +263,7 @@ > ? ? ? ? Value *LoopCond = FindLIVLoopCondition(SI->getCondition(), > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?currentLoop, Changed); > ? ? ? ? if (LoopCond && UnswitchIfProfitable(LoopCond, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Context->getConstantIntTrue())) { > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Context->getTrue())) { > ? ? ? ? ? ++NumSelects; > ? ? ? ? ? return true; > ? ? ? ? } > @@ -351,10 +351,10 @@ > ? ? // this. > ? ? if ((LoopExitBB = isTrivialLoopExitBlock(currentLoop, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?BI->getSuccessor(0)))) { > - ? ? ?if (Val) *Val = Context->getConstantIntTrue(); > + ? ? ?if (Val) *Val = Context->getTrue(); > ? ? } else if ((LoopExitBB = isTrivialLoopExitBlock(currentLoop, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? BI->getSuccessor(1)))) { > - ? ? ?if (Val) *Val = Context->getConstantIntFalse(); > + ? ? ?if (Val) *Val = Context->getFalse(); > ? ? } > ? } else if (SwitchInst *SI = dyn_cast(HeaderTerm)) { > ? ? // If this isn't a switch on Cond, we can't handle it. > @@ -510,7 +510,7 @@ > ? Value *BranchVal = LIC; > ? if (!isa(Val) || Val->getType() != Type::Int1Ty) > ? ? BranchVal = new ICmpInst(InsertPt, ICmpInst::ICMP_EQ, LIC, Val, "tmp"); > - ?else if (Val != Context->getConstantIntTrue()) > + ?else if (Val != Context->getTrue()) > ? ? // We want to enter the new loop when the condition is true. > ? ? std::swap(TrueDest, FalseDest); > > @@ -947,7 +947,7 @@ > > ? ? ? ? ? ? ? Instruction* OldTerm = Old->getTerminator(); > ? ? ? ? ? ? ? BranchInst::Create(Split, SISucc, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Context->getConstantIntTrue(), OldTerm); > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Context->getTrue(), OldTerm); > > ? ? ? ? ? ? ? LPM->deleteSimpleAnalysisValue(Old->getTerminator(), L); > ? ? ? ? ? ? ? Old->getTerminator()->eraseFromParent(); > > Modified: llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp (original) > +++ llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp Tue Jul 21 13:03:38 2009 > @@ -1691,7 +1691,7 @@ > ? ? ? if (Constant *C1 = dyn_cast(V1)) > ? ? ? ? if (Constant *C2 = dyn_cast(V2)) > ? ? ? ? ? return Context->getConstantExprCompare(Pred, C1, C2) == > - ? ? ? ? ? ? ? ? Context->getConstantIntTrue(); > + ? ? ? ? ? ? ? ? Context->getTrue(); > > ? ? ? unsigned n1 = VN.valueNumber(V1, Top); > ? ? ? unsigned n2 = VN.valueNumber(V2, Top); > @@ -1803,10 +1803,10 @@ > ? ? ? ? // "icmp ult i32 %a, %y" EQ true then %a u< y > ? ? ? ? // etc. > > - ? ? ? ?if (Canonical == Context->getConstantIntTrue()) { > + ? ? ? ?if (Canonical == Context->getTrue()) { > ? ? ? ? ? add(IC->getOperand(0), IC->getOperand(1), IC->getPredicate(), > ? ? ? ? ? ? ? NewContext); > - ? ? ? ?} else if (Canonical == Context->getConstantIntFalse()) { > + ? ? ? ?} else if (Canonical == Context->getFalse()) { > ? ? ? ? ? add(IC->getOperand(0), IC->getOperand(1), > ? ? ? ? ? ? ? ICmpInst::getInversePredicate(IC->getPredicate()), NewContext); > ? ? ? ? } > @@ -1822,11 +1822,11 @@ > ? ? ? ? if (isRelatedBy(True, False, ICmpInst::ICMP_NE)) { > ? ? ? ? ? if (Canonical == VN.canonicalize(True, Top) || > ? ? ? ? ? ? ? isRelatedBy(Canonical, False, ICmpInst::ICMP_NE)) > - ? ? ? ? ? ?add(SI->getCondition(), Context->getConstantIntTrue(), > + ? ? ? ? ? ?add(SI->getCondition(), Context->getTrue(), > ? ? ? ? ? ? ? ? ICmpInst::ICMP_EQ, NewContext); > ? ? ? ? ? else if (Canonical == VN.canonicalize(False, Top) || > ? ? ? ? ? ? ? ? ? ?isRelatedBy(Canonical, True, ICmpInst::ICMP_NE)) > - ? ? ? ? ? ?add(SI->getCondition(), Context->getConstantIntFalse(), > + ? ? ? ? ? ?add(SI->getCondition(), Context->getFalse(), > ? ? ? ? ? ? ? ? ICmpInst::ICMP_EQ, NewContext); > ? ? ? ? } > ? ? ? } else if (GetElementPtrInst *GEPI = dyn_cast(I)) { > @@ -2050,9 +2050,9 @@ > > ? ? ? ? ICmpInst::Predicate Pred = IC->getPredicate(); > ? ? ? ? if (isRelatedBy(Op0, Op1, Pred)) > - ? ? ? ? ?add(IC, Context->getConstantIntTrue(), ICmpInst::ICMP_EQ, NewContext); > + ? ? ? ? ?add(IC, Context->getTrue(), ICmpInst::ICMP_EQ, NewContext); > ? ? ? ? else if (isRelatedBy(Op0, Op1, ICmpInst::getInversePredicate(Pred))) > - ? ? ? ? ?add(IC, Context->getConstantIntFalse(), > + ? ? ? ? ?add(IC, Context->getFalse(), > ? ? ? ? ? ? ? ICmpInst::ICMP_EQ, NewContext); > > ? ? ? } else if (SelectInst *SI = dyn_cast(I)) { > @@ -2064,9 +2064,9 @@ > ? ? ? ? // %b EQ %c then %a EQ %b > > ? ? ? ? Value *Canonical = VN.canonicalize(SI->getCondition(), Top); > - ? ? ? ?if (Canonical == Context->getConstantIntTrue()) { > + ? ? ? ?if (Canonical == Context->getTrue()) { > ? ? ? ? ? add(SI, SI->getTrueValue(), ICmpInst::ICMP_EQ, NewContext); > - ? ? ? ?} else if (Canonical == Context->getConstantIntFalse()) { > + ? ? ? ?} else if (Canonical == Context->getFalse()) { > ? ? ? ? ? add(SI, SI->getFalseValue(), ICmpInst::ICMP_EQ, NewContext); > ? ? ? ? } else if (VN.canonicalize(SI->getTrueValue(), Top) == > ? ? ? ? ? ? ? ? ? ?VN.canonicalize(SI->getFalseValue(), Top)) { > @@ -2156,7 +2156,7 @@ > ? ? ? ? if (Constant *CI_L = dyn_cast(O.LHS)) { > ? ? ? ? ? if (Constant *CI_R = dyn_cast(O.RHS)) { > ? ? ? ? ? ? if (Context->getConstantExprCompare(O.Op, CI_L, CI_R) == > - ? ? ? ? ? ? ? ?Context->getConstantIntFalse()) > + ? ? ? ? ? ? ? ?Context->getFalse()) > ? ? ? ? ? ? ? UB.mark(TopBB); > > ? ? ? ? ? ? WorkList.pop_front(); > @@ -2458,7 +2458,7 @@ > ? ? ? if (Dest == TrueDest) { > ? ? ? ? DOUT << "(" << DTNode->getBlock()->getName() << ") true set:\n"; > ? ? ? ? VRPSolver VRP(VN, IG, UB, VR, PS->DTDFS, PS->modified, Dest); > - ? ? ? ?VRP.add(Context->getConstantIntTrue(), Condition, ICmpInst::ICMP_EQ); > + ? ? ? ?VRP.add(Context->getTrue(), Condition, ICmpInst::ICMP_EQ); > ? ? ? ? VRP.solve(); > ? ? ? ? DEBUG(VN.dump()); > ? ? ? ? DEBUG(IG.dump()); > @@ -2466,7 +2466,7 @@ > ? ? ? } else if (Dest == FalseDest) { > ? ? ? ? DOUT << "(" << DTNode->getBlock()->getName() << ") false set:\n"; > ? ? ? ? VRPSolver VRP(VN, IG, UB, VR, PS->DTDFS, PS->modified, Dest); > - ? ? ? ?VRP.add(Context->getConstantIntFalse(), Condition, ICmpInst::ICMP_EQ); > + ? ? ? ?VRP.add(Context->getFalse(), Condition, ICmpInst::ICMP_EQ); > ? ? ? ? VRP.solve(); > ? ? ? ? DEBUG(VN.dump()); > ? ? ? ? DEBUG(IG.dump()); > > Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original) > +++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Tue Jul 21 13:03:38 2009 > @@ -441,7 +441,7 @@ > ? ? ? ? Succs[0] = Succs[1] = true; > ? ? ? } else if (BCValue.isConstant()) { > ? ? ? ? // Constant condition variables mean the branch can only go a single way > - ? ? ? ?Succs[BCValue.getConstant() == Context->getConstantIntFalse()] = true; > + ? ? ? ?Succs[BCValue.getConstant() == Context->getFalse()] = true; > ? ? ? } > ? ? } > ? } else if (isa(&TI)) { > @@ -486,7 +486,7 @@ > > ? ? ? ? // Constant condition variables mean the branch can only go a single way > ? ? ? ? return BI->getSuccessor(BCValue.getConstant() == > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Context->getConstantIntFalse()) == To; > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Context->getFalse()) == To; > ? ? ? } > ? ? ? return false; > ? ? } > @@ -1487,7 +1487,7 @@ > ? ? // as undef, then further analysis could think the undef went another way > ? ? // leading to an inconsistent set of conclusions. > ? ? if (BranchInst *BI = dyn_cast(TI)) { > - ? ? ?BI->setCondition(Context->getConstantIntFalse()); > + ? ? ?BI->setCondition(Context->getFalse()); > ? ? } else { > ? ? ? SwitchInst *SI = cast(TI); > ? ? ? SI->setCondition(SI->getCaseValue(1)); > > Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) > +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Tue Jul 21 13:03:38 2009 > @@ -1398,9 +1398,9 @@ > ? ? ? // Don't try to evaluate aliases. ?External weak GV can be null. > ? ? ? if (!isa(GV) && !GV->hasExternalWeakLinkage()) { > ? ? ? ? if (pred == ICmpInst::ICMP_EQ) > - ? ? ? ? ?return Context.getConstantIntFalse(); > + ? ? ? ? ?return Context.getFalse(); > ? ? ? ? else if (pred == ICmpInst::ICMP_NE) > - ? ? ? ? ?return Context.getConstantIntTrue(); > + ? ? ? ? ?return Context.getTrue(); > ? ? ? } > ? // icmp eq/ne(GV,null) -> false/true > ? } else if (C2->isNullValue()) { > @@ -1408,9 +1408,9 @@ > ? ? ? // Don't try to evaluate aliases. ?External weak GV can be null. > ? ? ? if (!isa(GV) && !GV->hasExternalWeakLinkage()) { > ? ? ? ? if (pred == ICmpInst::ICMP_EQ) > - ? ? ? ? ?return Context.getConstantIntFalse(); > + ? ? ? ? ?return Context.getFalse(); > ? ? ? ? else if (pred == ICmpInst::ICMP_NE) > - ? ? ? ? ?return Context.getConstantIntTrue(); > + ? ? ? ? ?return Context.getTrue(); > ? ? ? } > ? } > > @@ -1446,8 +1446,8 @@ > ? ? APFloat::cmpResult R = C1V.compare(C2V); > ? ? switch (pred) { > ? ? default: llvm_unreachable("Invalid FCmp Predicate"); return 0; > - ? ?case FCmpInst::FCMP_FALSE: return Context.getConstantIntFalse(); > - ? ?case FCmpInst::FCMP_TRUE: ?return Context.getConstantIntTrue(); > + ? ?case FCmpInst::FCMP_FALSE: return Context.getFalse(); > + ? ?case FCmpInst::FCMP_TRUE: ?return Context.getTrue(); > ? ? case FCmpInst::FCMP_UNO: > ? ? ? return Context.getConstantInt(Type::Int1Ty, R==APFloat::cmpUnordered); > ? ? case FCmpInst::FCMP_ORD: > > Modified: llvm/trunk/lib/VMCore/LLVMContext.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContext.cpp?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/VMCore/LLVMContext.cpp (original) > +++ llvm/trunk/lib/VMCore/LLVMContext.cpp Tue Jul 21 13:03:38 2009 > @@ -80,16 +80,16 @@ > ?} > > ?// ConstantInt accessors. > -ConstantInt* LLVMContext::getConstantIntTrue() { > +ConstantInt* LLVMContext::getTrue() { > ? assert(this && "Context not initialized!"); > ? assert(pImpl && "Context not initialized!"); > - ?return pImpl->getConstantIntTrue(); > + ?return pImpl->getTrue(); > ?} > > -ConstantInt* LLVMContext::getConstantIntFalse() { > +ConstantInt* LLVMContext::getFalse() { > ? assert(this && "Context not initialized!"); > ? assert(pImpl && "Context not initialized!"); > - ?return pImpl->getConstantIntFalse(); > + ?return pImpl->getFalse(); > ?} > > ?Constant* LLVMContext::getConstantInt(const Type* Ty, uint64_t V, > > Modified: llvm/trunk/lib/VMCore/LLVMContextImpl.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContextImpl.h?rev=76598&r1=76597&r2=76598&view=diff > > ============================================================================== > --- llvm/trunk/lib/VMCore/LLVMContextImpl.h (original) > +++ llvm/trunk/lib/VMCore/LLVMContextImpl.h Tue Jul 21 13:03:38 2009 > @@ -120,14 +120,14 @@ > > ? MDNode *getMDNode(Value*const* Vals, unsigned NumVals); > > - ?ConstantInt *getConstantIntTrue() { > + ?ConstantInt *getTrue() { > ? ? if (TheTrueVal) > ? ? ? return TheTrueVal; > ? ? else > ? ? ? return (TheTrueVal = Context.getConstantInt(IntegerType::get(1), 1)); > ? } > > - ?ConstantInt *getConstantIntFalse() { > + ?ConstantInt *getFalse() { > ? ? if (TheFalseVal) > ? ? ? return TheFalseVal; > ? ? else > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From daniel at zuster.org Tue Jul 21 15:38:16 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 13:38:16 -0700 Subject: [llvm-commits] [PATCH] StringRef class. In-Reply-To: <117B700E-A98A-47D1-AF48-6FFCFA33EE2A@apple.com> References: <6a8523d60907201705y5221663bi48a2042bdeb5bc58@mail.gmail.com> <6a8523d60907211033l4613c05v887e1274ade68f5f@mail.gmail.com> <117B700E-A98A-47D1-AF48-6FFCFA33EE2A@apple.com> Message-ID: <6a8523d60907211338y77e58286rb86b6fb90be0a734@mail.gmail.com> On Tue, Jul 21, 2009 at 11:36 AM, Douglas Gregor wrote: > > On Jul 21, 2009, at 10:33 AM, Daniel Dunbar wrote: > >> On Tue, Jul 21, 2009 at 8:04 AM, Douglas Gregor >> wrote: >>> On Jul 20, 2009, at 5:05 PM, Daniel Dunbar wrote: >>>> The attached patch provides a new StringRef helper class, which is >>>> used to represent a constant string (pointer & length) which is not >>>> owned. >> ... >>> One gets more uniform conversions for the left- and right-hand >>> arguments if these are written as friend function definitions, e.g., >> >> Fixed. >> >>> Also, for the concatenation operators, one can make them slightly >>> more >>> efficient with, e.g., >> >> Thanks. You didn't comment on whether you thought adding them was a >> good idea or not, though. :) > > > > I think adding the concatenation operators is a good idea. FYI, Chris and I sketched out what I think is a nice solution to this and other problems, patch to come... - Daniel From resistor at mac.com Tue Jul 21 15:55:28 2009 From: resistor at mac.com (Owen Anderson) Date: Tue, 21 Jul 2009 20:55:28 -0000 Subject: [llvm-commits] [llvm] r76639 - in /llvm/trunk: include/llvm/Constants.h include/llvm/LLVMContext.h lib/VMCore/Constants.cpp lib/VMCore/LLVMContext.cpp lib/VMCore/LLVMContextImpl.cpp lib/VMCore/LLVMContextImpl.h Message-ID: <200907212055.n6LKtTjk011290@zion.cs.uiuc.edu> Author: resistor Date: Tue Jul 21 15:55:28 2009 New Revision: 76639 URL: http://llvm.org/viewvc/llvm-project?rev=76639&view=rev Log: Privatize the ConstantArray table. Modified: llvm/trunk/include/llvm/Constants.h llvm/trunk/include/llvm/LLVMContext.h llvm/trunk/lib/VMCore/Constants.cpp llvm/trunk/lib/VMCore/LLVMContext.cpp llvm/trunk/lib/VMCore/LLVMContextImpl.cpp llvm/trunk/lib/VMCore/LLVMContextImpl.h Modified: llvm/trunk/include/llvm/Constants.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=76639&r1=76638&r2=76639&view=diff ============================================================================== --- llvm/trunk/include/llvm/Constants.h (original) +++ llvm/trunk/include/llvm/Constants.h Tue Jul 21 15:55:28 2009 @@ -286,12 +286,10 @@ friend struct ConstantCreator >; ConstantArray(const ConstantArray &); // DO NOT IMPLEMENT + friend class LLVMContextImpl; protected: ConstantArray(const ArrayType *T, const std::vector &Val); public: - /// get() - Static factory methods - Return objects of the specified value - static Constant *get(const ArrayType *T, const std::vector &); - /// Transparently provide more efficient getOperand methods. DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant); Modified: llvm/trunk/include/llvm/LLVMContext.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LLVMContext.h?rev=76639&r1=76638&r2=76639&view=diff ============================================================================== --- llvm/trunk/include/llvm/LLVMContext.h (original) +++ llvm/trunk/include/llvm/LLVMContext.h Tue Jul 21 15:55:28 2009 @@ -44,6 +44,7 @@ class APInt; class APFloat; class Value; +class Use; /// This is an important class for using LLVM in a threaded context. It /// (opaquely) owns and manages the core "global" data of LLVM's core @@ -273,6 +274,11 @@ void erase(MDString *M); void erase(MDNode *M); void erase(ConstantAggregateZero *Z); + void erase(ConstantArray *Z); + + // RAUW helpers + Constant *replaceUsesOfWithOnConstant(ConstantArray *CA, + Value *From, Value *To, Use *U); }; /// FOR BACKWARDS COMPATIBILITY - Returns a global context. Modified: llvm/trunk/lib/VMCore/Constants.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=76639&r1=76638&r2=76639&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Constants.cpp (original) +++ llvm/trunk/lib/VMCore/Constants.cpp Tue Jul 21 15:55:28 2009 @@ -1033,60 +1033,11 @@ destroyConstantImpl(); } -//---- ConstantArray::get() implementation... -// -namespace llvm { - template<> - struct ConvertConstantType { - static void convert(ConstantArray *OldC, const ArrayType *NewTy) { - // Make everyone now use a constant of the new type... - std::vector C; - for (unsigned i = 0, e = OldC->getNumOperands(); i != e; ++i) - C.push_back(cast(OldC->getOperand(i))); - Constant *New = ConstantArray::get(NewTy, C); - assert(New != OldC && "Didn't replace constant??"); - OldC->uncheckedReplaceAllUsesWith(New); - OldC->destroyConstant(); // This constant is now dead, destroy it. - } - }; -} - -static std::vector getValType(ConstantArray *CA) { - std::vector Elements; - Elements.reserve(CA->getNumOperands()); - for (unsigned i = 0, e = CA->getNumOperands(); i != e; ++i) - Elements.push_back(cast(CA->getOperand(i))); - return Elements; -} - -typedef ValueMap, ArrayType, - ConstantArray, true /*largekey*/> ArrayConstantsTy; -static ManagedStatic ArrayConstants; - -Constant *ConstantArray::get(const ArrayType *Ty, - const std::vector &V) { - // If this is an all-zero array, return a ConstantAggregateZero object - if (!V.empty()) { - Constant *C = V[0]; - if (!C->isNullValue()) { - // Implicitly locked. - return ArrayConstants->getOrCreate(Ty, V); - } - for (unsigned i = 1, e = V.size(); i != e; ++i) - if (V[i] != C) { - // Implicitly locked. - return ArrayConstants->getOrCreate(Ty, V); - } - } - - return Ty->getContext().getConstantAggregateZero(Ty); -} - /// destroyConstant - Remove the constant from the constant table... /// void ConstantArray::destroyConstant() { // Implicitly locked. - ArrayConstants->remove(this); + getType()->getContext().erase(this); destroyConstantImpl(); } @@ -2160,77 +2111,10 @@ /// array instance. void ConstantArray::replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) { - assert(isa(To) && "Cannot make Constant refer to non-constant!"); - Constant *ToC = cast(To); - - std::pair Lookup; - Lookup.first.first = getType(); - Lookup.second = this; - - std::vector &Values = Lookup.first.second; - Values.reserve(getNumOperands()); // Build replacement array. - - // Fill values with the modified operands of the constant array. Also, - // compute whether this turns into an all-zeros array. - bool isAllZeros = false; - unsigned NumUpdated = 0; - if (!ToC->isNullValue()) { - for (Use *O = OperandList, *E = OperandList+getNumOperands(); O != E; ++O) { - Constant *Val = cast(O->get()); - if (Val == From) { - Val = ToC; - ++NumUpdated; - } - Values.push_back(Val); - } - } else { - isAllZeros = true; - for (Use *O = OperandList, *E = OperandList+getNumOperands(); O != E; ++O) { - Constant *Val = cast(O->get()); - if (Val == From) { - Val = ToC; - ++NumUpdated; - } - Values.push_back(Val); - if (isAllZeros) isAllZeros = Val->isNullValue(); - } - } - - Constant *Replacement = 0; - if (isAllZeros) { - Replacement = - From->getType()->getContext().getConstantAggregateZero(getType()); - } else { - // Check to see if we have this array type already. - sys::SmartScopedWriter Writer(*ConstantsLock); - bool Exists; - ArrayConstantsTy::MapTy::iterator I = - ArrayConstants->InsertOrGetItem(Lookup, Exists); - - if (Exists) { - Replacement = I->second; - } else { - // Okay, the new shape doesn't exist in the system yet. Instead of - // creating a new constant array, inserting it, replaceallusesof'ing the - // old with the new, then deleting the old... just update the current one - // in place! - ArrayConstants->MoveConstantToNewSlot(this, I); - - // Update to the new value. Optimize for the case when we have a single - // operand that we're changing, but handle bulk updates efficiently. - if (NumUpdated == 1) { - unsigned OperandToUpdate = U-OperandList; - assert(getOperand(OperandToUpdate) == From && - "ReplaceAllUsesWith broken!"); - setOperand(OperandToUpdate, ToC); - } else { - for (unsigned i = 0, e = getNumOperands(); i != e; ++i) - if (getOperand(i) == From) - setOperand(i, ToC); - } - return; - } - } + Constant *Replacement = + getType()->getContext().replaceUsesOfWithOnConstant(this, From, To, U); + + if (!Replacement) return; // Otherwise, I do need to replace this with an existing value. assert(Replacement != this && "I didn't contain From!"); Modified: llvm/trunk/lib/VMCore/LLVMContext.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContext.cpp?rev=76639&r1=76638&r2=76639&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/LLVMContext.cpp (original) +++ llvm/trunk/lib/VMCore/LLVMContext.cpp Tue Jul 21 15:55:28 2009 @@ -174,7 +174,7 @@ // ConstantArray accessors. Constant* LLVMContext::getConstantArray(const ArrayType* T, const std::vector& V) { - return ConstantArray::get(T, V); + return pImpl->getConstantArray(T, V); } Constant* LLVMContext::getConstantArray(const ArrayType* T, @@ -652,4 +652,13 @@ void LLVMContext::erase(ConstantAggregateZero *Z) { pImpl->erase(Z); +} + +void LLVMContext::erase(ConstantArray *C) { + pImpl->erase(C); +} + +Constant *LLVMContext::replaceUsesOfWithOnConstant(ConstantArray *CA, + Value *From, Value *To, Use *U) { + return pImpl->replaceUsesOfWithOnConstant(CA, From, To, U); } \ No newline at end of file Modified: llvm/trunk/lib/VMCore/LLVMContextImpl.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContextImpl.cpp?rev=76639&r1=76638&r2=76639&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/LLVMContextImpl.cpp (original) +++ llvm/trunk/lib/VMCore/LLVMContextImpl.cpp Tue Jul 21 15:55:28 2009 @@ -21,6 +21,14 @@ static char getValType(ConstantAggregateZero *CPZ) { return 0; } +static std::vector getValType(ConstantArray *CA) { + std::vector Elements; + Elements.reserve(CA->getNumOperands()); + for (unsigned i = 0, e = CA->getNumOperands(); i != e; ++i) + Elements.push_back(cast(CA->getOperand(i))); + return Elements; +} + namespace llvm { template struct VISIBILITY_HIDDEN ConstantTraits< std::vector > { @@ -61,11 +69,25 @@ OldC->destroyConstant(); // This constant is now dead, destroy it. } }; + +template<> +struct ConvertConstantType { + static void convert(ConstantArray *OldC, const ArrayType *NewTy) { + // Make everyone now use a constant of the new type... + std::vector C; + for (unsigned i = 0, e = OldC->getNumOperands(); i != e; ++i) + C.push_back(cast(OldC->getOperand(i))); + Constant *New = NewTy->getContext().getConstantArray(NewTy, C); + assert(New != OldC && "Didn't replace constant??"); + OldC->uncheckedReplaceAllUsesWith(New); + OldC->destroyConstant(); // This constant is now dead, destroy it. + } +}; } template -class VISIBILITY_HIDDEN ContextValueMap : public AbstractTypeUser { +class VISIBILITY_HIDDEN ValueMap : public AbstractTypeUser { public: typedef std::pair MapKey; typedef std::map MapTy; @@ -300,11 +322,13 @@ LLVMContextImpl::LLVMContextImpl(LLVMContext &C) : Context(C), TheTrueVal(0), TheFalseVal(0) { - AggZeroConstants = new ContextValueMap(); + AggZeroConstants = new ValueMap(); + ArrayConstants = new ArrayConstantsTy(); } LLVMContextImpl::~LLVMContextImpl() { delete AggZeroConstants; + delete ArrayConstants; } // Get a ConstantInt from an APInt. Note that the value stored in the DenseMap @@ -413,6 +437,25 @@ return AggZeroConstants->getOrCreate(Ty, 0); } +Constant *LLVMContextImpl::getConstantArray(const ArrayType *Ty, + const std::vector &V) { + // If this is an all-zero array, return a ConstantAggregateZero object + if (!V.empty()) { + Constant *C = V[0]; + if (!C->isNullValue()) { + // Implicitly locked. + return ArrayConstants->getOrCreate(Ty, V); + } + for (unsigned i = 1, e = V.size(); i != e; ++i) + if (V[i] != C) { + // Implicitly locked. + return ArrayConstants->getOrCreate(Ty, V); + } + } + + return Context.getConstantAggregateZero(Ty); +} + // *** erase methods *** void LLVMContextImpl::erase(MDString *M) { @@ -428,3 +471,87 @@ void LLVMContextImpl::erase(ConstantAggregateZero *Z) { AggZeroConstants->remove(Z); } + +void LLVMContextImpl::erase(ConstantArray *C) { + ArrayConstants->remove(C); +} + +// *** RAUW helpers *** +Constant *LLVMContextImpl::replaceUsesOfWithOnConstant(ConstantArray *CA, + Value *From, Value *To, Use *U) { + assert(isa(To) && "Cannot make Constant refer to non-constant!"); + Constant *ToC = cast(To); + + std::pair Lookup; + Lookup.first.first = CA->getType(); + Lookup.second = CA; + + std::vector &Values = Lookup.first.second; + Values.reserve(CA->getNumOperands()); // Build replacement array. + + // Fill values with the modified operands of the constant array. Also, + // compute whether this turns into an all-zeros array. + bool isAllZeros = false; + unsigned NumUpdated = 0; + if (!ToC->isNullValue()) { + for (Use *O = CA->OperandList, *E = CA->OperandList + CA->getNumOperands(); + O != E; ++O) { + Constant *Val = cast(O->get()); + if (Val == From) { + Val = ToC; + ++NumUpdated; + } + Values.push_back(Val); + } + } else { + isAllZeros = true; + for (Use *O = CA->OperandList, *E = CA->OperandList + CA->getNumOperands(); + O != E; ++O) { + Constant *Val = cast(O->get()); + if (Val == From) { + Val = ToC; + ++NumUpdated; + } + Values.push_back(Val); + if (isAllZeros) isAllZeros = Val->isNullValue(); + } + } + + Constant *Replacement = 0; + if (isAllZeros) { + Replacement = Context.getConstantAggregateZero(CA->getType()); + } else { + // Check to see if we have this array type already. + sys::SmartScopedWriter Writer(ConstantsLock); + bool Exists; + ArrayConstantsTy::MapTy::iterator I = + ArrayConstants->InsertOrGetItem(Lookup, Exists); + + if (Exists) { + Replacement = I->second; + } else { + // Okay, the new shape doesn't exist in the system yet. Instead of + // creating a new constant array, inserting it, replaceallusesof'ing the + // old with the new, then deleting the old... just update the current one + // in place! + ArrayConstants->MoveConstantToNewSlot(CA, I); + + // Update to the new value. Optimize for the case when we have a single + // operand that we're changing, but handle bulk updates efficiently. + if (NumUpdated == 1) { + unsigned OperandToUpdate = U - CA->OperandList; + assert(CA->getOperand(OperandToUpdate) == From && + "ReplaceAllUsesWith broken!"); + CA->setOperand(OperandToUpdate, ToC); + } else { + for (unsigned i = 0, e = CA->getNumOperands(); i != e; ++i) + if (CA->getOperand(i) == From) + CA->setOperand(i, ToC); + } + return 0; + } + } + + return Replacement; +} + Modified: llvm/trunk/lib/VMCore/LLVMContextImpl.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContextImpl.h?rev=76639&r1=76638&r2=76639&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/LLVMContextImpl.h (original) +++ llvm/trunk/lib/VMCore/LLVMContextImpl.h Tue Jul 21 15:55:28 2009 @@ -30,7 +30,7 @@ template -class ContextValueMap; +class ValueMap; namespace llvm { template @@ -111,7 +111,11 @@ FoldingSet MDNodeSet; - ContextValueMap *AggZeroConstants; + ValueMap *AggZeroConstants; + + typedef ValueMap, ArrayType, + ConstantArray, true /*largekey*/> ArrayConstantsTy; + ArrayConstantsTy *ArrayConstants; LLVMContext &Context; ConstantInt *TheTrueVal; @@ -135,6 +139,9 @@ ConstantAggregateZero *getConstantAggregateZero(const Type *Ty); + Constant *getConstantArray(const ArrayType *Ty, + const std::vector &V); + ConstantInt *getTrue() { if (TheTrueVal) return TheTrueVal; @@ -152,6 +159,12 @@ void erase(MDString *M); void erase(MDNode *M); void erase(ConstantAggregateZero *Z); + void erase(ConstantArray *C); + + // RAUW helpers + + Constant *replaceUsesOfWithOnConstant(ConstantArray *CA, Value *From, + Value *To, Use *U); }; } From sabre at nondot.org Tue Jul 21 16:09:35 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 21:09:35 -0000 Subject: [llvm-commits] [llvm] r76645 - /llvm/trunk/lib/Target/TargetAsmInfo.cpp Message-ID: <200907212109.n6LL9ZQZ011802@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 16:09:35 2009 New Revision: 76645 URL: http://llvm.org/viewvc/llvm-project?rev=76645&view=rev Log: minor cleanups. Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=76645&r1=76644&r2=76645&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Tue Jul 21 16:09:35 2009 @@ -311,21 +311,16 @@ return Flags; } -const Section* -TargetAsmInfo::SectionForGlobal(const GlobalValue *GV) const { - const Section* S; +const Section *TargetAsmInfo::SectionForGlobal(const GlobalValue *GV) const { // Select section name if (GV->hasSection()) { - // Honour section already set, if any - unsigned Flags = SectionFlagsForGlobal(GV, - GV->getSection().c_str()); - S = getNamedSection(GV->getSection().c_str(), Flags); - } else { - // Use default section depending on the 'type' of global - S = SelectSectionForGlobal(GV); + // Honour section already set, if any. + unsigned Flags = SectionFlagsForGlobal(GV, GV->getSection().c_str()); + return getNamedSection(GV->getSection().c_str(), Flags); } - - return S; + + // Use default section depending on the 'type' of global + return SelectSectionForGlobal(GV); } // Lame default implementation. Calculate the section name for global. @@ -394,10 +389,9 @@ return NULL; } -const Section* -TargetAsmInfo::getNamedSection(const char *Name, unsigned Flags, - bool Override) const { - Section& S = Sections[Name]; +const Section *TargetAsmInfo::getNamedSection(const char *Name, unsigned Flags, + bool Override) const { + Section &S = Sections[Name]; // This is newly-created section, set it up properly. if (S.Flags == SectionFlags::Invalid || Override) { From rnk at mit.edu Tue Jul 21 16:09:52 2009 From: rnk at mit.edu (Reid Kleckner) Date: Tue, 21 Jul 2009 14:09:52 -0700 Subject: [llvm-commits] Changes to BumpPtrAllocator so it can be used for JITed function stubs and globals In-Reply-To: <9a9942200907201426m3ca80fe0n86cd5b03ff0041a5@mail.gmail.com> References: <9a9942200907201426m3ca80fe0n86cd5b03ff0041a5@mail.gmail.com> Message-ID: <9a9942200907211409g70b85b21ia2b261de02cbb0f9@mail.gmail.com> I made some changes in response to djg's comments on IRC. BumpPtrAllocatorBase now takes a template parameter for the slab allocator, and BumpPtrAllocator just fills in the default malloc allocator. PTAL. Thanks, Reid On Mon, Jul 20, 2009 at 2:26 PM, Reid Kleckner wrote: > This parameterizes the BumpPtrAllocator over a slab allocation > strategy. ?It defaults to using malloc, and there should be no > functional changes to other code. ?It passes make check. ?These > changes are needed so I don't have to write a second bump allocator in > the JIT memory manager, which can't use malloc since the memory must > be marked executable. ?Please review! > > Thanks, > Reid > -------------- next part -------------- A non-text attachment was scrubbed... Name: SupportAllocatorPatch.diff Type: text/x-diff Size: 12722 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090721/45d655f7/attachment.bin From sabre at nondot.org Tue Jul 21 16:12:58 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 21:12:58 -0000 Subject: [llvm-commits] [llvm] r76646 - in /llvm/trunk: include/llvm/CodeGen/LiveIntervalAnalysis.h include/llvm/CodeGen/MachineBasicBlock.h include/llvm/CodeGen/MachineFunction.h include/llvm/Support/Dump.h lib/CodeGen/LiveIntervalAnalysis.cpp lib/CodeGen/MachineBasicBlock.cpp lib/CodeGen/MachineFunction.cpp Message-ID: <200907212112.n6LLCwnm011944@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 16:12:58 2009 New Revision: 76646 URL: http://llvm.org/viewvc/llvm-project?rev=76646&view=rev Log: revert r76602, 76603, and r76615, pending design discussions. Removed: llvm/trunk/include/llvm/Support/Dump.h Modified: llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h llvm/trunk/include/llvm/CodeGen/MachineFunction.h llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp llvm/trunk/lib/CodeGen/MachineFunction.cpp Modified: llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h?rev=76646&r1=76645&r2=76646&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h (original) +++ llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h Tue Jul 21 16:12:58 2009 @@ -27,9 +27,7 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Allocator.h" -#include "llvm/Support/Dump.h" #include -#include namespace llvm { @@ -81,7 +79,7 @@ /// FunctionSize - The number of instructions present in the function uint64_t FunctionSize; - typedef DenseMap Mi2IndexMap; + typedef DenseMap Mi2IndexMap; Mi2IndexMap mi2iMap_; typedef std::vector Index2MiMap; @@ -200,7 +198,7 @@ } /// getInstructionIndex - returns the base index of instr - unsigned getInstructionIndex(const MachineInstr* instr) const { + unsigned getInstructionIndex(MachineInstr* instr) const { Mi2IndexMap::const_iterator it = mi2iMap_.find(instr); assert(it != mi2iMap_.end() && "Invalid instruction!"); return it->second; @@ -540,26 +538,6 @@ void printRegName(unsigned reg) const; }; - // IntervalPrefixPrinter - Print live interval indices before each - // instruction. - class IntervalPrefixPrinter : public PrefixPrinter { - private: - const LiveIntervals &liinfo; - - public: - IntervalPrefixPrinter(const LiveIntervals &lii) - : liinfo(lii) {}; - - std::string operator()(const MachineBasicBlock &) const { - return(""); - }; - - std::string operator()(const MachineInstr &instr) const { - std::stringstream out; - out << liinfo.getInstructionIndex(&instr); - return(out.str()); - }; - }; } // End llvm namespace #endif Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h?rev=76646&r1=76645&r2=76646&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h Tue Jul 21 16:12:58 2009 @@ -16,7 +16,6 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/ADT/GraphTraits.h" -#include "llvm/Support/Dump.h" namespace llvm { @@ -310,12 +309,8 @@ // Debugging methods. void dump() const; - void print(std::ostream &OS, - const PrefixPrinter &prefix = PrefixPrinter()) const; - void print(std::ostream *OS, - const PrefixPrinter &prefix = PrefixPrinter()) const { - if (OS) print(*OS, prefix); - } + void print(std::ostream &OS) const; + void print(std::ostream *OS) const { if (OS) print(*OS); } /// getNumber - MachineBasicBlocks are uniquely numbered at the function /// level, unless they're not in a MachineFunction yet, in which case this Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=76646&r1=76645&r2=76646&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Tue Jul 21 16:12:58 2009 @@ -20,7 +20,6 @@ #include "llvm/ADT/ilist.h" #include "llvm/Support/DebugLoc.h" -#include "llvm/Support/Dump.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/Support/Annotation.h" #include "llvm/Support/Allocator.h" @@ -208,12 +207,8 @@ /// print - Print out the MachineFunction in a format suitable for debugging /// to the specified stream. /// - void print(std::ostream &OS, - const PrefixPrinter &prefix = PrefixPrinter()) const; - void print(std::ostream *OS, - const PrefixPrinter &prefix = PrefixPrinter()) const { - if (OS) print(*OS, prefix); - } + void print(std::ostream &OS) const; + void print(std::ostream *OS) const { if (OS) print(*OS); } /// viewCFG - This function is meant for use from the debugger. You can just /// say 'call F->viewCFG()' and a ghostview window should pop up from the Removed: llvm/trunk/include/llvm/Support/Dump.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Dump.h?rev=76645&view=auto ============================================================================== --- llvm/trunk/include/llvm/Support/Dump.h (original) +++ llvm/trunk/include/llvm/Support/Dump.h (removed) @@ -1,41 +0,0 @@ -//===- llvm/Support/Dump.h - Easy way to tailor dump output -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides the PrefixPrinter interface to pass to MachineFunction -// and MachineBasicBlock print methods to output additional information before -// blocks and instructions are printed. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_SUPPORT_DUMP_H -#define LLVM_SUPPORT_DUMP_H - -namespace llvm { - -class MachineBasicBlock; -class MachineInstr; - -// PrefixPrinter - Print some additional information before printing -// basic blocks and instructions. -class PrefixPrinter { -public: - virtual ~PrefixPrinter() {} - - virtual std::string operator()(const MachineBasicBlock &) const { - return(""); - }; - - virtual std::string operator()(const MachineInstr &) const { - return(""); - }; -}; - -} // End llvm namespace - -#endif Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=76646&r1=76645&r2=76646&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Jul 21 16:12:58 2009 @@ -464,7 +464,7 @@ i2miMap_.resize(highestSlot + 1); for (Mi2IndexMap::iterator MI = mi2iMap_.begin(), ME = mi2iMap_.end(); MI != ME; ++MI) { - i2miMap_[MI->second] = const_cast(MI->first); + i2miMap_[MI->second] = MI->first; } } @@ -501,7 +501,14 @@ } O << "********** MACHINEINSTRS **********\n"; - mf_->print(O, IntervalPrefixPrinter(*this)); + for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end(); + mbbi != mbbe; ++mbbi) { + O << ((Value*)mbbi->getBasicBlock())->getName() << ":\n"; + for (MachineBasicBlock::iterator mii = mbbi->begin(), + mie = mbbi->end(); mii != mie; ++mii) { + O << getInstructionIndex(mii) << '\t' << *mii; + } + } } /// conflictsWithPhysRegDef - Returns true if the specified register Modified: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=76646&r1=76645&r2=76646&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp Tue Jul 21 16:12:58 2009 @@ -148,8 +148,7 @@ os << " %reg" << RegNo; } -void MachineBasicBlock::print(std::ostream &OS, - const PrefixPrinter &prefix) const { +void MachineBasicBlock::print(std::ostream &OS) const { const MachineFunction *MF = getParent(); if(!MF) { OS << "Can't print out MachineBasicBlock because parent MachineFunction" @@ -182,7 +181,6 @@ } for (const_iterator I = begin(); I != end(); ++I) { - OS << prefix(*I); OS << "\t"; I->print(OS, &getParent()->getTarget()); } Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=76646&r1=76645&r2=76646&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Tue Jul 21 16:12:58 2009 @@ -252,8 +252,7 @@ print(*cerr.stream()); } -void MachineFunction::print(std::ostream &OS, - const PrefixPrinter &prefix) const { +void MachineFunction::print(std::ostream &OS) const { OS << "# Machine code for " << Fn->getName () << "():\n"; // Print Frame Information @@ -295,10 +294,8 @@ OS << "\n"; } - for (const_iterator BB = begin(); BB != end(); ++BB) { - OS << prefix(*BB); - BB->print(OS, prefix); - } + for (const_iterator BB = begin(); BB != end(); ++BB) + BB->print(OS); OS << "\n# End machine code for " << Fn->getName () << "().\n\n"; } From kremenek at apple.com Tue Jul 21 16:22:14 2009 From: kremenek at apple.com (Ted Kremenek) Date: Tue, 21 Jul 2009 21:22:14 -0000 Subject: [llvm-commits] [llvm] r76649 - /llvm/tags/checker/checker-0.215/ Message-ID: <200907212122.n6LLMEt6012263@zion.cs.uiuc.edu> Author: kremenek Date: Tue Jul 21 16:22:13 2009 New Revision: 76649 URL: http://llvm.org/viewvc/llvm-project?rev=76649&view=rev Log: Removing checker-0.215. Removed: llvm/tags/checker/checker-0.215/ From kremenek at apple.com Tue Jul 21 16:22:33 2009 From: kremenek at apple.com (Ted Kremenek) Date: Tue, 21 Jul 2009 21:22:33 -0000 Subject: [llvm-commits] [llvm] r76651 - /llvm/tags/checker/checker-0.215/ Message-ID: <200907212122.n6LLMXdM012292@zion.cs.uiuc.edu> Author: kremenek Date: Tue Jul 21 16:22:33 2009 New Revision: 76651 URL: http://llvm.org/viewvc/llvm-project?rev=76651&view=rev Log: Tagging checker-0.215. Added: llvm/tags/checker/checker-0.215/ - copied from r76650, llvm/trunk/ From sabre at nondot.org Tue Jul 21 16:26:32 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 21:26:32 -0000 Subject: [llvm-commits] [llvm] r76653 - in /llvm/trunk: include/llvm/Target/ELFTargetAsmInfo.h lib/Target/ELFTargetAsmInfo.cpp lib/Target/XCore/XCoreTargetAsmInfo.cpp lib/Target/XCore/XCoreTargetAsmInfo.h Message-ID: <200907212126.n6LLQWZm012448@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 16:26:32 2009 New Revision: 76653 URL: http://llvm.org/viewvc/llvm-project?rev=76653&view=rev Log: Remove some overridden functions in XCoreTargetAsmInfo that are implemented exactly the same way as its ELFTargetAsmInfo subclass has them. Modified: llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h Modified: llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h?rev=76653&r1=76652&r2=76653&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h (original) +++ llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h Tue Jul 21 16:26:32 2009 @@ -29,7 +29,7 @@ virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; virtual std::string printSectionFlags(unsigned flags) const; const Section* MergeableConstSection(const GlobalVariable *GV) const; - inline const Section* MergeableConstSection(const Type *Ty) const; + const Section* MergeableConstSection(const Type *Ty) const; const Section* MergeableStringSection(const GlobalVariable *GV) const; virtual const Section* SelectSectionForMachineConst(const Type *Ty) const; Modified: llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp?rev=76653&r1=76652&r2=76653&view=diff ============================================================================== --- llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp Tue Jul 21 16:26:32 2009 @@ -142,11 +142,10 @@ const Section* ELFTargetAsmInfo::MergeableConstSection(const GlobalVariable *GV) const { - Constant *C = GV->getInitializer(); - return MergeableConstSection(C->getType()); + return MergeableConstSection(GV->getInitializer()->getType()); } -inline const Section* +const Section* ELFTargetAsmInfo::MergeableConstSection(const Type *Ty) const { const TargetData *TD = TM.getTargetData(); Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp?rev=76653&r1=76652&r2=76653&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Tue Jul 21 16:26:32 2009 @@ -72,12 +72,9 @@ XCoreTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { SectionKind::Kind Kind = SectionKindForGlobal(GV); - if (const GlobalVariable *GVar = dyn_cast(GV)) - { + if (const GlobalVariable *GVar = dyn_cast(GV)) { if (!GVar->isWeakForLinker()) { switch (Kind) { - case SectionKind::RODataMergeStr: - return MergeableStringSection(GVar); case SectionKind::RODataMergeConst: return getReadOnlySection(); case SectionKind::ThreadData: @@ -93,17 +90,6 @@ } const Section* -XCoreTargetAsmInfo::SelectSectionForMachineConst(const Type *Ty) const { - return MergeableConstSection(Ty); -} - -const Section* -XCoreTargetAsmInfo::MergeableConstSection(const GlobalVariable *GV) const { - Constant *C = GV->getInitializer(); - return MergeableConstSection(C->getType()); -} - -inline const Section* XCoreTargetAsmInfo::MergeableConstSection(const Type *Ty) const { const TargetData *TD = TM.getTargetData(); @@ -120,15 +106,8 @@ return getReadOnlySection(); } -const Section* XCoreTargetAsmInfo:: -MergeableStringSection(const GlobalVariable *GV) const { - // FIXME insert in correct mergable section - return getReadOnlySection(); -} - unsigned XCoreTargetAsmInfo:: -SectionFlagsForGlobal(const GlobalValue *GV, - const char* Name) const { +SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const { unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name); // Mask out unsupported flags Flags &= ~(SectionFlags::Small | SectionFlags::TLS); @@ -162,41 +141,3 @@ return Flags; } - -std::string XCoreTargetAsmInfo:: -printSectionFlags(unsigned flags) const { - std::string Flags = ",\""; - - if (!(flags & SectionFlags::Debug)) - Flags += 'a'; - if (flags & SectionFlags::Code) - Flags += 'x'; - if (flags & SectionFlags::Writeable) - Flags += 'w'; - if (flags & SectionFlags::Mergeable) - Flags += 'M'; - if (flags & SectionFlags::Strings) - Flags += 'S'; - if (flags & SectionFlags::TLS) - Flags += 'T'; - if (flags & SectionFlags::Small) { - if (flags & SectionFlags::Writeable) - Flags += 'd'; // DP relative - else - Flags += 'c'; // CP relative - } - - Flags += "\","; - - Flags += '@'; - - if (flags & SectionFlags::BSS) - Flags += "nobits"; - else - Flags += "progbits"; - - if (unsigned entitySize = SectionFlags::getEntitySize(flags)) - Flags += "," + utostr(entitySize); - - return Flags; -} Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h?rev=76653&r1=76652&r2=76653&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h (original) +++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h Tue Jul 21 16:26:32 2009 @@ -29,12 +29,7 @@ explicit XCoreTargetAsmInfo(const XCoreTargetMachine &TM); virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; - virtual std::string printSectionFlags(unsigned flags) const; - const Section* MergeableConstSection(const GlobalVariable *GV) const; - inline const Section* MergeableConstSection(const Type *Ty) const; - const Section* MergeableStringSection(const GlobalVariable *GV) const; - virtual const Section* - SelectSectionForMachineConst(const Type *Ty) const; + const Section* MergeableConstSection(const Type *Ty) const; virtual unsigned SectionFlagsForGlobal(const GlobalValue *GV = NULL, const char* name = NULL) const; From sabre at nondot.org Tue Jul 21 16:29:08 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 21:29:08 -0000 Subject: [llvm-commits] [llvm] r76654 - in /llvm/trunk: include/llvm/Target/ELFTargetAsmInfo.h lib/Target/ELFTargetAsmInfo.cpp Message-ID: <200907212129.n6LLT8M3012531@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 16:29:08 2009 New Revision: 76654 URL: http://llvm.org/viewvc/llvm-project?rev=76654&view=rev Log: inline a trivial method into its only call site and fix indentation of cases Modified: llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp Modified: llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h?rev=76654&r1=76653&r2=76654&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h (original) +++ llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h Tue Jul 21 16:29:08 2009 @@ -28,7 +28,6 @@ SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const; virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; virtual std::string printSectionFlags(unsigned flags) const; - const Section* MergeableConstSection(const GlobalVariable *GV) const; const Section* MergeableConstSection(const Type *Ty) const; const Section* MergeableStringSection(const GlobalVariable *GV) const; virtual const Section* Modified: llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp?rev=76654&r1=76653&r2=76654&view=diff ============================================================================== --- llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp Tue Jul 21 16:29:08 2009 @@ -97,34 +97,34 @@ return getNamedSection(Name.c_str(), Flags); } else { switch (Kind) { - case SectionKind::Data: - case SectionKind::SmallData: + case SectionKind::Data: + case SectionKind::SmallData: return DataSection; - case SectionKind::DataRel: + case SectionKind::DataRel: return DataRelSection; - case SectionKind::DataRelLocal: + case SectionKind::DataRelLocal: return DataRelLocalSection; - case SectionKind::DataRelRO: + case SectionKind::DataRelRO: return DataRelROSection; - case SectionKind::DataRelROLocal: + case SectionKind::DataRelROLocal: return DataRelROLocalSection; - case SectionKind::BSS: - case SectionKind::SmallBSS: + case SectionKind::BSS: + case SectionKind::SmallBSS: // ELF targets usually have BSS sections return getBSSSection_(); - case SectionKind::ROData: - case SectionKind::SmallROData: + case SectionKind::ROData: + case SectionKind::SmallROData: return getReadOnlySection(); - case SectionKind::RODataMergeStr: + case SectionKind::RODataMergeStr: return MergeableStringSection(GVar); - case SectionKind::RODataMergeConst: - return MergeableConstSection(GVar); - case SectionKind::ThreadData: + case SectionKind::RODataMergeConst: + return MergeableConstSection(GVar->getInitializer()->getType()); + case SectionKind::ThreadData: // ELF targets usually support TLS stuff return TLSDataSection; - case SectionKind::ThreadBSS: + case SectionKind::ThreadBSS: return TLSBSSSection; - default: + default: llvm_unreachable("Unsuported section kind for global"); } } @@ -141,11 +141,6 @@ } const Section* -ELFTargetAsmInfo::MergeableConstSection(const GlobalVariable *GV) const { - return MergeableConstSection(GV->getInitializer()->getType()); -} - -const Section* ELFTargetAsmInfo::MergeableConstSection(const Type *Ty) const { const TargetData *TD = TM.getTargetData(); From isanbard at gmail.com Tue Jul 21 16:29:09 2009 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 21 Jul 2009 14:29:09 -0700 Subject: [llvm-commits] [llvm] r76590 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/MachOWriter.cpp lib/Target/DarwinTargetAsmInfo.cpp lib/Target/MSP430/MSP430AsmPrinter.cpp lib/Target/Mips/AsmPrin Message-ID: <16e5fdf90907211429k51034cbfh504a7358cd178f07@mail.gmail.com> On Tue, Jul 21, 2009 at 10:30 AM, Chris Lattner wrote: > Author: lattner > Date: Tue Jul 21 12:30:51 2009 > New Revision: 76590 > > URL: http://llvm.org/viewvc/llvm-project?rev=76590&view=rev > Log: > Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the > LLVM IR concept. > Yay! Thanks. :-) (You beat me to it...) -bw From daniel at zuster.org Tue Jul 21 16:33:58 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 21 Jul 2009 21:33:58 -0000 Subject: [llvm-commits] [llvm] r76655 - /llvm/trunk/include/llvm/ADT/StringRef.h Message-ID: <200907212133.n6LLXwEH012697@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Jul 21 16:33:58 2009 New Revision: 76655 URL: http://llvm.org/viewvc/llvm-project?rev=76655&view=rev Log: Add missing include Modified: llvm/trunk/include/llvm/ADT/StringRef.h Modified: llvm/trunk/include/llvm/ADT/StringRef.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=76655&r1=76654&r2=76655&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/StringRef.h (original) +++ llvm/trunk/include/llvm/ADT/StringRef.h Tue Jul 21 16:33:58 2009 @@ -10,6 +10,7 @@ #ifndef LLVM_ADT_STRINGREF_H #define LLVM_ADT_STRINGREF_H +#include #include #include From isanbard at gmail.com Tue Jul 21 16:37:51 2009 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 21 Jul 2009 14:37:51 -0700 Subject: [llvm-commits] [llvm] r76602 - /llvm/trunk/include/llvm/Support/Dump.h In-Reply-To: <200907211821.n6LILmRe005187@zion.cs.uiuc.edu> References: <200907211821.n6LILmRe005187@zion.cs.uiuc.edu> Message-ID: <16e5fdf90907211437w40cb9ff1kc5afb6a1963aa812@mail.gmail.com> On Tue, Jul 21, 2009 at 11:21 AM, David Greene wrote: > Author: greened > Date: Tue Jul 21 13:21:46 2009 > New Revision: 76602 > > URL: http://llvm.org/viewvc/llvm-project?rev=76602&view=rev > Log: > > Add a small utility class to configure IR printers. ?This will allow > printers to do neat and wonderful things when printing debug > information. ?The ideas is to allow passes to configer printers to emit > pass-specific information when dumping IR. > > Added: > ? ?llvm/trunk/include/llvm/Support/Dump.h > > +#ifndef LLVM_SUPPORT_DUMP_H > +#define LLVM_SUPPORT_DUMP_H > + > +namespace llvm { > + > +class MachineBasicBlock; > +class MachineInstr; > + > +// PrefixPrinter - Print some additional information before printing > +// basic blocks and instructions. > +class PrefixPrinter { > +public: > + ?virtual ~PrefixPrinter() {} > + > + ?virtual std::string operator()(const MachineBasicBlock &) const { > + ? ?return(""); > + ?}; > + > + ?virtual std::string operator()(const MachineInstr &) const { > + ? ?return(""); > + ?}; > +}; This won't work because there's no "#include " in this header. And we don't want that in a header to begin with, if we can avoid it. :) Why not make these pure-virtual methods? I'm really not in love with this class at all... -bw From evan.cheng at apple.com Tue Jul 21 17:10:48 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 15:10:48 -0700 Subject: [llvm-commits] [llvm] r76558 - in /llvm/trunk: lib/CodeGen/VirtRegRewriter.cpp test/CodeGen/X86/2009-07-21-RewriterBug.ll In-Reply-To: <6BD73220-29D1-4242-849D-3545640F3F81@apple.com> References: <200907210915.n6L9Fe27018490@zion.cs.uiuc.edu> <3085B6C3-CAF7-4E9B-9FDA-5540E8D1BF40@apple.com> <50706115-8D6B-4A69-9B2D-879C161C7CB5@apple.com> <6BD73220-29D1-4242-849D-3545640F3F81@apple.com> Message-ID: On Jul 21, 2009, at 10:52 AM, Chris Lattner wrote: > > On Jul 21, 2009, at 10:06 AM, Evan Cheng wrote: > >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=76558&view=rev >>>> Log: >>>> Another rewriter bug exposed by recent coalescer changes. >>>> ReuseInfo::GetRegForReload() should make sure the "switched" >>>> register is in the desired register class. I'm surprised this >>>> hasn't >>>> caused more failures in the past. >>> >>> Thanks Evan, can you reduce this testcase though? It is huge, and >>> doesn't appear to have been run through bugpoint. >> >> That's a bugpoint reduced test case. > Ok > >> I can't reduce it any further. > > I don't believe you. It has tons of global variable inits etc that > don't impact codegen. Knowing the problem, can't you hand synthesize Fine. I can remove some of the global variables. > a testcase to expose the problem? Trust me. It's not possible. I welcome anyone who can hand construct register allocation miscompilation problems. Evan > > -Chris > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From clattner at apple.com Tue Jul 21 17:19:13 2009 From: clattner at apple.com (Chris Lattner) Date: Tue, 21 Jul 2009 15:19:13 -0700 Subject: [llvm-commits] [llvm] r76558 - in /llvm/trunk: lib/CodeGen/VirtRegRewriter.cpp test/CodeGen/X86/2009-07-21-RewriterBug.ll In-Reply-To: References: <200907210915.n6L9Fe27018490@zion.cs.uiuc.edu> <3085B6C3-CAF7-4E9B-9FDA-5540E8D1BF40@apple.com> <50706115-8D6B-4A69-9B2D-879C161C7CB5@apple.com> <6BD73220-29D1-4242-849D-3545640F3F81@apple.com> Message-ID: On Jul 21, 2009, at 3:10 PM, Evan Cheng wrote: >>> I can't reduce it any further. >> >> I don't believe you. It has tons of global variable inits etc that >> don't impact codegen. Knowing the problem, can't you hand synthesize > > Fine. I can remove some of the global variables. > >> a testcase to expose the problem? > > Trust me. It's not possible. I welcome anyone who can hand construct > register allocation miscompilation problems. Is the testcase worth it then? Having regression tests is always a balance between catching future bugs and slowing down all testing. If you add a large testcase, it becomes less interesting to have it in the suite. -Chris From sabre at nondot.org Tue Jul 21 17:25:52 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 22:25:52 -0000 Subject: [llvm-commits] [llvm] r76659 - in /llvm/trunk/lib/Target/XCore: XCoreTargetAsmInfo.cpp XCoreTargetAsmInfo.h Message-ID: <200907212225.n6LMPqTi014363@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 17:25:52 2009 New Revision: 76659 URL: http://llvm.org/viewvc/llvm-project?rev=76659&view=rev Log: Remove the XCore custom implementation of MergeableConstSection, relying on the generic ELF version instead. This will result in its mergable constant sections getting named ".rodata.cst4" instead of ".cp.const4", but the linker looks at the section flags, not the name of the section AFAICT. Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp?rev=76659&r1=76658&r2=76659&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Tue Jul 21 17:25:52 2009 @@ -89,23 +89,6 @@ return ELFTargetAsmInfo::SelectSectionForGlobal(GV); } -const Section* -XCoreTargetAsmInfo::MergeableConstSection(const Type *Ty) const { - const TargetData *TD = TM.getTargetData(); - - unsigned Size = TD->getTypeAllocSize(Ty); - if (Size == 4 || Size == 8 || Size == 16) { - std::string Name = ".cp.const" + utostr(Size); - - return getNamedSection(Name.c_str(), - SectionFlags::setEntitySize(SectionFlags::Mergeable | - SectionFlags::Small, - Size)); - } - - return getReadOnlySection(); -} - unsigned XCoreTargetAsmInfo:: SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const { unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name); Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h?rev=76659&r1=76658&r2=76659&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h (original) +++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h Tue Jul 21 17:25:52 2009 @@ -29,7 +29,6 @@ explicit XCoreTargetAsmInfo(const XCoreTargetMachine &TM); virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; - const Section* MergeableConstSection(const Type *Ty) const; virtual unsigned SectionFlagsForGlobal(const GlobalValue *GV = NULL, const char* name = NULL) const; From sabre at nondot.org Tue Jul 21 17:30:25 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 22:30:25 -0000 Subject: [llvm-commits] [llvm] r76660 - /llvm/trunk/include/llvm/Target/TargetAsmInfo.h Message-ID: <200907212230.n6LMUPuu014527@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 17:30:25 2009 New Revision: 76660 URL: http://llvm.org/viewvc/llvm-project?rev=76660&view=rev Log: improve comments. Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=76660&r1=76659&r2=76660&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Tue Jul 21 17:30:25 2009 @@ -33,20 +33,30 @@ namespace SectionKind { enum Kind { - Unknown = 0, ///< Custom section - Text, ///< Text section - Data, ///< Data section - DataRel, ///< Contains data that has relocations - DataRelLocal, ///< Contains data that has only local relocations - BSS, ///< BSS section - ROData, ///< Readonly data section - DataRelRO, ///< Contains data that is otherwise readonly - DataRelROLocal, ///< Contains r/o data with only local relocations - RODataMergeStr, ///< Readonly data section (mergeable strings) - RODataMergeConst, ///< Readonly data section (mergeable constants) + Unknown = 0, ///< Custom section. + Text, ///< Text section. + BSS, ///< BSS section. + + Data, ///< Data section. + DataRel, ///< Data that has relocations. + DataRelLocal, ///< Data that only has local relocations. + + // Readonly data. + ROData, ///< Readonly data section. + DataRelRO, ///< Readonly data with non-local relocations. + DataRelROLocal, ///< Readonly data with local relocations only. + + /// Mergable sections. + RODataMergeStr, ///< Readonly data section: nul-terminated strings. + RODataMergeConst, ///< Readonly data section: fixed-length constants. + + /// Small sections - These sections contains "short" data, and should be + /// placed "near" the GP. SmallData, ///< Small data section SmallBSS, ///< Small bss section SmallROData, ///< Small readonly section + + /// Thread local data. ThreadData, ///< Initialized TLS data objects ThreadBSS ///< Uninitialized TLS data objects }; From sabre at nondot.org Tue Jul 21 17:30:40 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 22:30:40 -0000 Subject: [llvm-commits] [llvm] r76661 - in /llvm/trunk: include/llvm/Target/DarwinTargetAsmInfo.h include/llvm/Target/ELFTargetAsmInfo.h lib/Target/DarwinTargetAsmInfo.cpp Message-ID: <200907212230.n6LMUegl014551@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 17:30:39 2009 New Revision: 76661 URL: http://llvm.org/viewvc/llvm-project?rev=76661&view=rev Log: make some stuff private. Modified: llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Modified: llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h?rev=76661&r1=76660&r2=76661&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h (original) +++ llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h Tue Jul 21 17:30:39 2009 @@ -39,10 +39,11 @@ SectionKind::Kind kind) const; virtual bool emitUsedDirectiveFor(const GlobalValue *GV, Mangler *Mang) const; - const Section* MergeableConstSection(const GlobalVariable *GV) const; + const Section* SelectSectionForMachineConst(const Type *Ty) const; + + private: const Section* MergeableConstSection(const Type *Ty) const; const Section* MergeableStringSection(const GlobalVariable *GV) const; - const Section* SelectSectionForMachineConst(const Type *Ty) const; }; } Modified: llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h?rev=76661&r1=76660&r2=76661&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h (original) +++ llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h Tue Jul 21 17:30:39 2009 @@ -28,8 +28,6 @@ SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const; virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; virtual std::string printSectionFlags(unsigned flags) const; - const Section* MergeableConstSection(const Type *Ty) const; - const Section* MergeableStringSection(const GlobalVariable *GV) const; virtual const Section* SelectSectionForMachineConst(const Type *Ty) const; @@ -37,6 +35,10 @@ const Section* DataRelLocalSection; const Section* DataRelROSection; const Section* DataRelROLocalSection; + + private: + const Section* MergeableConstSection(const Type *Ty) const; + const Section* MergeableStringSection(const GlobalVariable *GV) const; }; } Modified: llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp?rev=76661&r1=76660&r2=76661&view=diff ============================================================================== --- llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Tue Jul 21 17:30:39 2009 @@ -156,9 +156,9 @@ ConstTextCoalSection : MergeableStringSection(cast(GV))); case SectionKind::RODataMergeConst: - return (isWeak ? - ConstDataCoalSection: - MergeableConstSection(cast(GV))); + if (isWeak) return ConstDataCoalSection; + return MergeableConstSection(cast(GV) + ->getInitializer()->getType()); default: llvm_unreachable("Unsuported section kind for global"); } @@ -184,13 +184,6 @@ } const Section* -DarwinTargetAsmInfo::MergeableConstSection(const GlobalVariable *GV) const { - Constant *C = GV->getInitializer(); - - return MergeableConstSection(C->getType()); -} - -inline const Section* DarwinTargetAsmInfo::MergeableConstSection(const Type *Ty) const { const TargetData *TD = TM.getTargetData(); From sabre at nondot.org Tue Jul 21 17:32:55 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 22:32:55 -0000 Subject: [llvm-commits] [llvm] r76662 - /llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Message-ID: <200907212232.n6LMWtWW014627@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 17:32:55 2009 New Revision: 76662 URL: http://llvm.org/viewvc/llvm-project?rev=76662&view=rev Log: simplify based on the fact that darwin always uses L/l. Modified: llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Modified: llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp?rev=76662&r1=76661&r2=76662&view=diff ============================================================================== --- llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Tue Jul 21 17:32:55 2009 @@ -113,15 +113,11 @@ // Check whether the mangled name has the "Private" or "LinkerPrivate" prefix. if (GV->hasLocalLinkage() && !isa(GV)) { + // FIXME: ObjC metadata is currently emitted as internal symbols that have + // \1L and \0l prefixes on them. Fix them to be Private/LinkerPrivate and + // this horrible hack can go away. const std::string &Name = Mang->getMangledName(GV); - // FIXME: Always "L" and "l", simplify! - const char *PGPrefix = getPrivateGlobalPrefix(); - const char *LPGPrefix = getLinkerPrivateGlobalPrefix(); - unsigned PGPLen = strlen(PGPrefix); - unsigned LPGPLen = strlen(LPGPrefix); - - if ((PGPLen != 0 && Name.substr(0, PGPLen) == PGPrefix) || - (LPGPLen != 0 && Name.substr(0, LPGPLen) == LPGPrefix)) + if (Name[0] == 'L' || Name[0] == 'l') return false; } From sabre at nondot.org Tue Jul 21 17:36:54 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 22:36:54 -0000 Subject: [llvm-commits] [llvm] r76664 - in /llvm/trunk/lib/Target/XCore: XCoreTargetAsmInfo.cpp XCoreTargetAsmInfo.h Message-ID: <200907212236.n6LMasPb014800@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 17:36:53 2009 New Revision: 76664 URL: http://llvm.org/viewvc/llvm-project?rev=76664&view=rev Log: remove the Xcore implementation of SelectSectionForGlobal. While you have to twist your brain to see it, I believe it is the same as ELFTargetAsmInfo::SelectSectionForGlobal. Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp?rev=76664&r1=76663&r2=76664&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Tue Jul 21 17:36:53 2009 @@ -68,27 +68,6 @@ DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits"; } -const Section* -XCoreTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { - SectionKind::Kind Kind = SectionKindForGlobal(GV); - - if (const GlobalVariable *GVar = dyn_cast(GV)) { - if (!GVar->isWeakForLinker()) { - switch (Kind) { - case SectionKind::RODataMergeConst: - return getReadOnlySection(); - case SectionKind::ThreadData: - return DataSection; - case SectionKind::ThreadBSS: - return getBSSSection_(); - default: - break; - } - } - } - return ELFTargetAsmInfo::SelectSectionForGlobal(GV); -} - unsigned XCoreTargetAsmInfo:: SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const { unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name); Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h?rev=76664&r1=76663&r2=76664&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h (original) +++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h Tue Jul 21 17:36:53 2009 @@ -28,7 +28,6 @@ public: explicit XCoreTargetAsmInfo(const XCoreTargetMachine &TM); - virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; virtual unsigned SectionFlagsForGlobal(const GlobalValue *GV = NULL, const char* name = NULL) const; From sabre at nondot.org Tue Jul 21 17:37:39 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 22:37:39 -0000 Subject: [llvm-commits] [llvm] r76665 - /llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Message-ID: <200907212237.n6LMbd3Z014835@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 17:37:38 2009 New Revision: 76665 URL: http://llvm.org/viewvc/llvm-project?rev=76665&view=rev Log: if Xcore doesn't support TLS, it doesn't have to worry about thread local LLVM IR, it should be rejected by a front-end. Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp?rev=76665&r1=76664&r2=76665&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Tue Jul 21 17:37:38 2009 @@ -72,7 +72,7 @@ SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const { unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name); // Mask out unsupported flags - Flags &= ~(SectionFlags::Small | SectionFlags::TLS); + Flags &= ~SectionFlags::Small; // Set CP / DP relative flags if (GV) { From bob.wilson at apple.com Tue Jul 21 16:56:47 2009 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 21 Jul 2009 21:56:47 -0000 Subject: [llvm-commits] [llvm] r76658 - /llvm/trunk/test/Makefile Message-ID: <200907212156.n6LLulji013434@zion.cs.uiuc.edu> Author: bwilson Date: Tue Jul 21 16:56:46 2009 New Revision: 76658 URL: http://llvm.org/viewvc/llvm-project?rev=76658&view=rev Log: Fix ocaml tests for 64-bit MacOS systems. LLVM is currently built as 32-bit code by default, and if gcc defaults to 64-bit code then ocamlc requires a -cc "gcc -arch i386" option. We were hardcoding -cc g++ and throwing away any other compiler options that were determined when ocamlc was configured and built. Modified: llvm/trunk/test/Makefile Modified: llvm/trunk/test/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=76658&r1=76657&r2=76658&view=diff ============================================================================== --- llvm/trunk/test/Makefile (original) +++ llvm/trunk/test/Makefile Tue Jul 21 16:56:46 2009 @@ -99,6 +99,11 @@ BUGPOINT_TOPTS="" endif +ifneq ($(OCAMLC),) +CC_FOR_OCAMLC := $(shell $(OCAMLC) -config | grep native_c_compiler | sed -e 's/native_c_compiler: //') +CXX_FOR_OCAMLC := $(patsubst gcc,g++,$(CC_FOR_OCAMLC)) +endif + FORCE: site.exp: FORCE @@ -127,7 +132,7 @@ @echo 'set llvmgccmajvers "$(LLVMGCC_MAJVERS)"' >> site.tmp @echo 'set bugpoint_topts $(BUGPOINT_TOPTS)' >> site.tmp @echo 'set shlibext "$(SHLIBEXT)"' >> site.tmp - @echo 'set ocamlc "$(OCAMLC) -cc $(CXX) -I $(LibDir)/ocaml"' >> site.tmp + @echo 'set ocamlc "$(OCAMLC) -cc \"$(CXX_FOR_OCAMLC)\" -I $(LibDir)/ocaml"' >> site.tmp @echo 'set valgrind "$(VALGRIND)"' >> site.tmp @echo 'set grep "$(GREP)"' >>site.tmp @echo 'set gas "$(GAS)"' >>site.tmp From bob.wilson at apple.com Tue Jul 21 16:52:57 2009 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 21 Jul 2009 21:52:57 -0000 Subject: [llvm-commits] [llvm] r76657 - in /llvm/trunk/bindings/ocaml/llvm: llvm.ml llvm.mli Message-ID: <200907212152.n6LLqwDb013304@zion.cs.uiuc.edu> Author: bwilson Date: Tue Jul 21 16:52:57 2009 New Revision: 76657 URL: http://llvm.org/viewvc/llvm-project?rev=76657&view=rev Log: Reorder the "Metadata" entry to match the C bindings. This fixes a regression in the vmcore.ml dejagnu test. Modified: llvm/trunk/bindings/ocaml/llvm/llvm.ml llvm/trunk/bindings/ocaml/llvm/llvm.mli Modified: llvm/trunk/bindings/ocaml/llvm/llvm.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.ml?rev=76657&r1=76656&r2=76657&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm.ml (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm.ml Tue Jul 21 16:52:57 2009 @@ -26,7 +26,6 @@ | Fp128 | Ppc_fp128 | Label - | Metadata | Integer | Function | Struct @@ -34,6 +33,7 @@ | Pointer | Opaque | Vector + | Metadata end module Linkage = struct Modified: llvm/trunk/bindings/ocaml/llvm/llvm.mli URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.mli?rev=76657&r1=76656&r2=76657&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm.mli (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm.mli Tue Jul 21 16:52:57 2009 @@ -61,7 +61,6 @@ | Fp128 | Ppc_fp128 | Label - | Metadata | Integer | Function | Struct @@ -69,6 +68,7 @@ | Pointer | Opaque | Vector + | Metadata end (** The linkage of a global value, accessed with {!linkage} and From sabre at nondot.org Tue Jul 21 17:39:28 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 22:39:28 -0000 Subject: [llvm-commits] [llvm] r76666 - /llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Message-ID: <200907212239.n6LMdSMR014894@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 17:39:28 2009 New Revision: 76666 URL: http://llvm.org/viewvc/llvm-project?rev=76666&view=rev Log: don't mask out the small flag and then reapply it later. Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp?rev=76666&r1=76665&r2=76666&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Tue Jul 21 17:39:28 2009 @@ -71,31 +71,17 @@ unsigned XCoreTargetAsmInfo:: SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const { unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name); - // Mask out unsupported flags - Flags &= ~SectionFlags::Small; // Set CP / DP relative flags if (GV) { SectionKind::Kind Kind = SectionKindForGlobal(GV); switch (Kind) { - case SectionKind::ThreadData: - case SectionKind::ThreadBSS: - case SectionKind::Data: - case SectionKind::BSS: - case SectionKind::SmallData: - case SectionKind::SmallBSS: - Flags |= SectionFlags::Small; - break; case SectionKind::ROData: case SectionKind::RODataMergeStr: case SectionKind::SmallROData: - if (Subtarget->isXS1A()) { + if (Subtarget->isXS1A()) Flags |= SectionFlags::Writeable; - } - Flags |=SectionFlags::Small; break; - case SectionKind::RODataMergeConst: - Flags |=SectionFlags::Small; default: break; } From eocallaghan at auroraux.org Tue Jul 21 16:49:55 2009 From: eocallaghan at auroraux.org (Edward O'Callaghan) Date: Tue, 21 Jul 2009 22:49:55 +0100 Subject: [llvm-commits] [PATCH] - Site doc fixes. Message-ID: <521640720907211449o7cafbadeub2539fabb3cae2b1@mail.gmail.com> Good day all, Just a few fixes for some 'bugs' in the docs and a few improvements too. Please review & commit. http://junk.auroraux.org/llvm-docs.update.patch Best Regards, Edward O'Callaghan. -- -- Edward O'Callaghan http://www.auroraux.org/ eocallaghan at auroraux dot org -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm-docs.update.patch Type: application/octet-stream Size: 3297 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090721/1318f236/attachment.obj From sabre at nondot.org Tue Jul 21 17:42:37 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 22:42:37 -0000 Subject: [llvm-commits] [llvm] r76667 - in /llvm/trunk/lib/Target/XCore: XCoreTargetAsmInfo.cpp XCoreTargetAsmInfo.h Message-ID: <200907212242.n6LMgcki015008@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 17:42:37 2009 New Revision: 76667 URL: http://llvm.org/viewvc/llvm-project?rev=76667&view=rev Log: remove the last bits of SectionFlagsForGlobal. There is some flag here that depends on XS1A, but I think the ReadOnlySection is already set up for this and there is no testcase that this breaks. If this is really needed, we can add the appropriate parameterization to TargetAsmInfo in the future to support this. Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp?rev=76667&r1=76666&r2=76667&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Tue Jul 21 17:42:37 2009 @@ -22,15 +22,14 @@ using namespace llvm; XCoreTargetAsmInfo::XCoreTargetAsmInfo(const XCoreTargetMachine &TM) - : ELFTargetAsmInfo(TM), - Subtarget(TM.getSubtargetImpl()) { + : ELFTargetAsmInfo(TM) { SupportsDebugInformation = true; TextSection = getUnnamedSection("\t.text", SectionFlags::Code); DataSection = getNamedSection("\t.dp.data", SectionFlags::Writeable | SectionFlags::Small); BSSSection_ = getNamedSection("\t.dp.bss", SectionFlags::Writeable | SectionFlags::BSS | SectionFlags::Small); - if (Subtarget->isXS1A()) { + if (TM.getSubtargetImpl()->isXS1A()) { ReadOnlySection = getNamedSection("\t.dp.rodata", SectionFlags::None | SectionFlags::Writeable | SectionFlags::Small); @@ -68,24 +67,3 @@ DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits"; } -unsigned XCoreTargetAsmInfo:: -SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const { - unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name); - - // Set CP / DP relative flags - if (GV) { - SectionKind::Kind Kind = SectionKindForGlobal(GV); - switch (Kind) { - case SectionKind::ROData: - case SectionKind::RODataMergeStr: - case SectionKind::SmallROData: - if (Subtarget->isXS1A()) - Flags |= SectionFlags::Writeable; - break; - default: - break; - } - } - - return Flags; -} Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h?rev=76667&r1=76666&r2=76667&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h (original) +++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h Tue Jul 21 17:42:37 2009 @@ -23,14 +23,8 @@ class XCoreSubtarget; class XCoreTargetAsmInfo : public ELFTargetAsmInfo { - private: - const XCoreSubtarget *Subtarget; public: explicit XCoreTargetAsmInfo(const XCoreTargetMachine &TM); - - virtual unsigned - SectionFlagsForGlobal(const GlobalValue *GV = NULL, - const char* name = NULL) const; }; } // namespace llvm From evan.cheng at apple.com Tue Jul 21 17:44:35 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 15:44:35 -0700 Subject: [llvm-commits] [llvm] r76558 - in /llvm/trunk: lib/CodeGen/VirtRegRewriter.cpp test/CodeGen/X86/2009-07-21-RewriterBug.ll In-Reply-To: References: <200907210915.n6L9Fe27018490@zion.cs.uiuc.edu> <3085B6C3-CAF7-4E9B-9FDA-5540E8D1BF40@apple.com> <50706115-8D6B-4A69-9B2D-879C161C7CB5@apple.com> <6BD73220-29D1-4242-849D-3545640F3F81@apple.com> Message-ID: <30543B18-EFDE-4DAF-ADFD-078071AD180E@apple.com> On Jul 21, 2009, at 3:19 PM, Chris Lattner wrote: > > On Jul 21, 2009, at 3:10 PM, Evan Cheng wrote: > >>>> I can't reduce it any further. >>> >>> I don't believe you. It has tons of global variable inits etc that >>> don't impact codegen. Knowing the problem, can't you hand >>> synthesize >> >> Fine. I can remove some of the global variables. >> >>> a testcase to expose the problem? >> >> Trust me. It's not possible. I welcome anyone who can hand construct >> register allocation miscompilation problems. > > Is the testcase worth it then? Having regression tests is always a > balance between catching future bugs and slowing down all testing. If > you add a large testcase, it becomes less interesting to have it in > the suite. I've fine with removing the test case. Evan > > -Chris > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Tue Jul 21 17:47:03 2009 From: sabre at nondot.org (Chris Lattner) Date: Tue, 21 Jul 2009 22:47:03 -0000 Subject: [llvm-commits] [llvm] r76668 - in /llvm/trunk/docs: GettingStarted.html ReleaseNotes-2.6.html tutorial/JITTutorial1.html tutorial/LangImpl3.html Message-ID: <200907212247.n6LMl3Zq015175@zion.cs.uiuc.edu> Author: lattner Date: Tue Jul 21 17:47:03 2009 New Revision: 76668 URL: http://llvm.org/viewvc/llvm-project?rev=76668&view=rev Log: Various doc updates from Edward O'Callaghan! Modified: llvm/trunk/docs/GettingStarted.html llvm/trunk/docs/ReleaseNotes-2.6.html llvm/trunk/docs/tutorial/JITTutorial1.html llvm/trunk/docs/tutorial/LangImpl3.html Modified: llvm/trunk/docs/GettingStarted.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GettingStarted.html?rev=76668&r1=76667&r2=76668&view=diff ============================================================================== --- llvm/trunk/docs/GettingStarted.html (original) +++ llvm/trunk/docs/GettingStarted.html Tue Jul 21 17:47:03 2009 @@ -216,6 +216,11 @@ Compilers + AuroraUX + x861 + GCC + + Linux x861 GCC Modified: llvm/trunk/docs/ReleaseNotes-2.6.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes-2.6.html?rev=76668&r1=76667&r2=76668&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes-2.6.html (original) +++ llvm/trunk/docs/ReleaseNotes-2.6.html Tue Jul 21 17:47:03 2009 @@ -483,7 +483,7 @@
        • Intel and AMD machines (IA32, X86-64, AMD64, EMT-64) running Red Hat -Linux, Fedora Core and FreeBSD (and probably other unix-like systems).
        • +Linux, Fedora Core, FreeBSD and AuroraUX (and probably other unix-like systems).
        • PowerPC and X86-based Mac OS X systems, running 10.3 and above in 32-bit and 64-bit modes.
        • Intel and AMD machines running on Win32 using MinGW libraries (native).
        • @@ -514,6 +514,15 @@ href="http://llvm.org/bugs/">LLVM bug database and submit a bug if there isn't already one.

          +
            +
          • LLVM will not correctly complie on Solaris and/or OpenSolaris +using the stock GCC 3.x.x series 'out the box', +See: Broken versions of GCC and other tools. +However, A Modern GCC Build +for x86/x64 has been made available from the third party AuroraUX Project +that has been meticulously tested for bootstrapping LLVM & Clang.
          • +
          + Modified: llvm/trunk/docs/tutorial/JITTutorial1.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/JITTutorial1.html?rev=76668&r1=76667&r2=76668&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/JITTutorial1.html (original) +++ llvm/trunk/docs/tutorial/JITTutorial1.html Tue Jul 21 17:47:03 2009 @@ -107,7 +107,7 @@
           Module* makeLLVMModule() {
             // Module Construction
          -  Module* mod = new Module("test");
          +  Module* mod = new Module("test", getGlobalContext());
           
          @@ -200,7 +200,7 @@ Owen Anderson
          The LLVM Compiler Infrastructure
          - Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date: 2009-07-21 11:05:13 -0700 (Tue, 21 Jul 2009) $ Modified: llvm/trunk/docs/tutorial/LangImpl3.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl3.html?rev=76668&r1=76667&r2=76668&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl3.html (original) +++ llvm/trunk/docs/tutorial/LangImpl3.html Tue Jul 21 17:47:03 2009 @@ -1028,7 +1028,7 @@ //===----------------------------------------------------------------------===// static Module *TheModule; -static IRBuilder<> Builder; +static IRBuilder<> Builder(getGlobalContext()); static std::map<std::string, Value*> NamedValues; Value *ErrorV(const char *Str) { Error(Str); return 0; } @@ -1249,7 +1249,7 @@ Chris Lattner
          The LLVM Compiler Infrastructure
          - Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date: 2009-07-21 11:05:13 -0700 (Tue, 21 Jul 2009) $ From clattner at apple.com Tue Jul 21 17:47:12 2009 From: clattner at apple.com (Chris Lattner) Date: Tue, 21 Jul 2009 15:47:12 -0700 Subject: [llvm-commits] [PATCH] - Site doc fixes. In-Reply-To: <521640720907211449o7cafbadeub2539fabb3cae2b1@mail.gmail.com> References: <521640720907211449o7cafbadeub2539fabb3cae2b1@mail.gmail.com> Message-ID: <6828B59F-D3BC-497F-9DA6-4B4973F299D8@apple.com> On Jul 21, 2009, at 2:49 PM, Edward O'Callaghan wrote: > Good day all, > > Just a few fixes for some 'bugs' in the docs and a few improvements > too. > Please review & commit. > > http://junk.auroraux.org/llvm-docs.update.patch Thanks, applied in r76668, -Chris From clattner at apple.com Tue Jul 21 17:47:27 2009 From: clattner at apple.com (Chris Lattner) Date: Tue, 21 Jul 2009 15:47:27 -0700 Subject: [llvm-commits] [llvm] r76558 - in /llvm/trunk: lib/CodeGen/VirtRegRewriter.cpp test/CodeGen/X86/2009-07-21-RewriterBug.ll In-Reply-To: <30543B18-EFDE-4DAF-ADFD-078071AD180E@apple.com> References: <200907210915.n6L9Fe27018490@zion.cs.uiuc.edu> <3085B6C3-CAF7-4E9B-9FDA-5540E8D1BF40@apple.com> <50706115-8D6B-4A69-9B2D-879C161C7CB5@apple.com> <6BD73220-29D1-4242-849D-3545640F3F81@apple.com> <30543B18-EFDE-4DAF-ADFD-078071AD180E@apple.com> Message-ID: On Jul 21, 2009, at 3:44 PM, Evan Cheng wrote: >> >> Is the testcase worth it then? Having regression tests is always a >> balance between catching future bugs and slowing down all testing. >> If >> you add a large testcase, it becomes less interesting to have it in >> the suite. > > I've fine with removing the test case. Ok, please do, thanks. -Chris From evan.cheng at apple.com Tue Jul 21 17:52:05 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 21 Jul 2009 22:52:05 -0000 Subject: [llvm-commits] [llvm] r76669 - /llvm/trunk/test/CodeGen/X86/2009-07-21-RewriterBug.ll Message-ID: <200907212252.n6LMq5Nf015359@zion.cs.uiuc.edu> Author: evancheng Date: Tue Jul 21 17:52:04 2009 New Revision: 76669 URL: http://llvm.org/viewvc/llvm-project?rev=76669&view=rev Log: Remove a big test case. Removed: llvm/trunk/test/CodeGen/X86/2009-07-21-RewriterBug.ll Removed: llvm/trunk/test/CodeGen/X86/2009-07-21-RewriterBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-07-21-RewriterBug.ll?rev=76668&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-07-21-RewriterBug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2009-07-21-RewriterBug.ll (removed) @@ -1,5384 +0,0 @@ -; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin10.0 -relocation-model=pic -disable-fp-elim | not grep dil - - %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.__sFILEX = type opaque - %struct.__sbuf = type { i8*, i32 } - %struct.spec_fd_t = type { i32, i32, i32, i8* } - at globalCrc = internal global i32 0 ; [#uses=6] - at bsStream.b = internal global i1 false ; [#uses=41] - at bsLive = internal global i32 0 ; [#uses=91] - at bsBuff = internal global i32 0 ; [#uses=91] - at bytesIn = internal global i32 0 ; [#uses=4] - at nInUse = internal global i32 0 ; [#uses=3] - at inUse = internal global [256 x i8] zeroinitializer, align 32 ; <[256 x i8]*> [#uses=7] - at seqToUnseq = internal global [256 x i8] zeroinitializer, align 32 ; <[256 x i8]*> [#uses=3] - at unseqToSeq = internal global [256 x i8] zeroinitializer, align 32 ; <[256 x i8]*> [#uses=1] - at mtfFreq = internal global [258 x i32] zeroinitializer, align 32 ; <[258 x i32]*> [#uses=2] - at block = internal global i8* null ; [#uses=3] - at zptr = internal global i32* null ; [#uses=2] - at szptr = internal global i16* null ; [#uses=3] - at last = internal global i32 0 ; [#uses=13] - at nMTF = internal global i32 0 ; [#uses=2] - at quadrant = internal global i16* null ; [#uses=1] - at workDone = internal global i32 0 ; [#uses=3] - at rNums = internal constant [512 x i32] [i32 619, i32 720, i32 127, i32 481, i32 931, i32 816, i32 813, i32 233, i32 566, i32 247, i32 985, i32 724, i32 205, i32 454, i32 863, i32 491, i32 741, i32 242, i32 949, i32 214, i32 733, i32 859, i32 335, i32 708, i32 621, i32 574, i32 73, i32 654, i32 730, i32 472, i32 419, i32 436, i32 278, i32 496, i32 867, i32 210, i32 399, i32 680, i32 480, i32 51, i32 878, i32 465, i32 811, i32 169, i32 869, i32 675, i32 611, i32 697, i32 867, i32 561, i32 862, i32 687, i32 507, i32 283, i32 482, i32 129, i32 807, i32 591, i32 733, i32 623, i32 150, i32 238, i32 59, i32 379, i32 684, i32 877, i32 625, i32 169, i32 643, i32 105, i32 170, i32 607, i32 520, i32 932, i32 727, i32 476, i32 693, i32 425, i32 174, i32 647, i32 73, i32 122, i32 335, i32 530, i32 442, i32 853, i32 695, i32 249, i32 445, i32 515, i32 909, i32 545, i32 703, i32 919, i32 874, i32 474, i32 882, i32 500, i32 594, i32 612, i32 641, i32 801, i32 220, i32 162, i32 819, i32 984! , i32 589, i32 513, i32 495, i32 799, i32 161, i32 604, i32 958, i32 533, i32 221, i32 400, i32 386, i32 867, i32 600, i32 782, i32 382, i32 596, i32 414, i32 171, i32 516, i32 375, i32 682, i32 485, i32 911, i32 276, i32 98, i32 553, i32 163, i32 354, i32 666, i32 933, i32 424, i32 341, i32 533, i32 870, i32 227, i32 730, i32 475, i32 186, i32 263, i32 647, i32 537, i32 686, i32 600, i32 224, i32 469, i32 68, i32 770, i32 919, i32 190, i32 373, i32 294, i32 822, i32 808, i32 206, i32 184, i32 943, i32 795, i32 384, i32 383, i32 461, i32 404, i32 758, i32 839, i32 887, i32 715, i32 67, i32 618, i32 276, i32 204, i32 918, i32 873, i32 777, i32 604, i32 560, i32 951, i32 160, i32 578, i32 722, i32 79, i32 804, i32 96, i32 409, i32 713, i32 940, i32 652, i32 934, i32 970, i32 447, i32 318, i32 353, i32 859, i32 672, i32 112, i32 785, i32 645, i32 863, i32 803, i32 350, i32 139, i32 93, i32 354, i32 99, i32 820, i32 908, i32 609, i32 772, i32 154, i32 274, i32 580, i32 184, i32! 79, i32 626, i32 630, i32 742, i32 653, i32 282, i32 762, i32! 623, i3 2 680, i32 81, i32 927, i32 626, i32 789, i32 125, i32 411, i32 521, i32 938, i32 300, i32 821, i32 78, i32 343, i32 175, i32 128, i32 250, i32 170, i32 774, i32 972, i32 275, i32 999, i32 639, i32 495, i32 78, i32 352, i32 126, i32 857, i32 956, i32 358, i32 619, i32 580, i32 124, i32 737, i32 594, i32 701, i32 612, i32 669, i32 112, i32 134, i32 694, i32 363, i32 992, i32 809, i32 743, i32 168, i32 974, i32 944, i32 375, i32 748, i32 52, i32 600, i32 747, i32 642, i32 182, i32 862, i32 81, i32 344, i32 805, i32 988, i32 739, i32 511, i32 655, i32 814, i32 334, i32 249, i32 515, i32 897, i32 955, i32 664, i32 981, i32 649, i32 113, i32 974, i32 459, i32 893, i32 228, i32 433, i32 837, i32 553, i32 268, i32 926, i32 240, i32 102, i32 654, i32 459, i32 51, i32 686, i32 754, i32 806, i32 760, i32 493, i32 403, i32 415, i32 394, i32 687, i32 700, i32 946, i32 670, i32 656, i32 610, i32 738, i32 392, i32 760, i32 799, i32 887, i32 653, i32 978, i32 321, i32 576, i32 617, i32 626! , i32 502, i32 894, i32 679, i32 243, i32 440, i32 680, i32 879, i32 194, i32 572, i32 640, i32 724, i32 926, i32 56, i32 204, i32 700, i32 707, i32 151, i32 457, i32 449, i32 797, i32 195, i32 791, i32 558, i32 945, i32 679, i32 297, i32 59, i32 87, i32 824, i32 713, i32 663, i32 412, i32 693, i32 342, i32 606, i32 134, i32 108, i32 571, i32 364, i32 631, i32 212, i32 174, i32 643, i32 304, i32 329, i32 343, i32 97, i32 430, i32 751, i32 497, i32 314, i32 983, i32 374, i32 822, i32 928, i32 140, i32 206, i32 73, i32 263, i32 980, i32 736, i32 876, i32 478, i32 430, i32 305, i32 170, i32 514, i32 364, i32 692, i32 829, i32 82, i32 855, i32 953, i32 676, i32 246, i32 369, i32 970, i32 294, i32 750, i32 807, i32 827, i32 150, i32 790, i32 288, i32 923, i32 804, i32 378, i32 215, i32 828, i32 592, i32 281, i32 565, i32 555, i32 710, i32 82, i32 896, i32 831, i32 547, i32 261, i32 524, i32 462, i32 293, i32 465, i32 502, i32 56, i32 661, i32 821, i32 976, i32 991, i32 658, i32 ! 869, i32 905, i32 758, i32 745, i32 193, i32 768, i32 550, i32! 608, i3 2 933, i32 378, i32 286, i32 215, i32 979, i32 792, i32 961, i32 61, i32 688, i32 793, i32 644, i32 986, i32 403, i32 106, i32 366, i32 905, i32 644, i32 372, i32 567, i32 466, i32 434, i32 645, i32 210, i32 389, i32 550, i32 919, i32 135, i32 780, i32 773, i32 635, i32 389, i32 707, i32 100, i32 626, i32 958, i32 165, i32 504, i32 920, i32 176, i32 193, i32 713, i32 857, i32 265, i32 203, i32 50, i32 668, i32 108, i32 645, i32 990, i32 626, i32 197, i32 510, i32 357, i32 358, i32 850, i32 858, i32 364, i32 936, i32 638], align 32 ; <[512 x i32]*> [#uses=3] - at __stderrp = external global %struct.FILE* ; <%struct.FILE**> [#uses=9] -@"\01LC" = internal constant [36 x i8] c"\09Input file = %s, output file = %s\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[36 x i8]*> [#uses=1] - at inName = internal global [1024 x i8] zeroinitializer, align 32 ; <[1024 x i8]*> [#uses=1] - at outName = internal global [1024 x i8] zeroinitializer, align 32 ; <[1024 x i8]*> [#uses=1] - at workLimit = internal global i32 0 ; [#uses=3] - at firstAttempt.b = internal global i1 false ; [#uses=3] -@"\01LC5" = internal constant [146 x i8] c"\0A%s: Can't allocate enough memory for compression.\0A\09Requested %d bytes for a block size of %d.\0A\09Try selecting a small block size (with flag -s).\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[146 x i8]*> [#uses=1] -@"\01LC6" = internal constant [206 x i8] c"\0A%s: Can't allocate enough memory for decompression.\0A\09Requested %d bytes for a block size of %d.\0A\09Try selecting space-economic decompress (with flag -s)\0A\09and failing that, find a machine with more memory.\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[206 x i8]*> [#uses=1] -@"\01LC11" = internal constant [21 x i8] c"hbMakeCodeLengths(1)\00", section "__TEXT,__cstring,cstring_literals" ; <[21 x i8]*> [#uses=1] -@"\01LC12" = internal constant [21 x i8] c"hbMakeCodeLengths(2)\00", section "__TEXT,__cstring,cstring_literals" ; <[21 x i8]*> [#uses=1] -@"\01LC13" = internal constant [243 x i8] c"\0AIt is possible that the compressed file(s) have become corrupted.\0AYou can use the -tvv option to test integrity of such files.\0A\0AYou can use the `bzip2recover' program to *attempt* to recover\0Adata from undamaged sections of corrupted files.\0A\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[243 x i8]*> [#uses=1] -@"\01LC17" = internal constant [86 x i8] c"\0A%s: bad block header in the compressed file,\0A\09which probably means it is corrupted.\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[86 x i8]*> [#uses=1] - at ftab = internal global i32* null ; [#uses=1] -@"\01LC32" = internal constant [27 x i8] c"doReversibleTransformation\00", section "__TEXT,__cstring,cstring_literals" ; <[27 x i8]*> [#uses=1] - at selectorMtf = internal global [18002 x i8] zeroinitializer, align 32 ; <[18002 x i8]*> [#uses=4] - at selector = internal global [18002 x i8] zeroinitializer, align 32 ; <[18002 x i8]*> [#uses=7] - at len = internal global [6 x [258 x i8]] zeroinitializer, align 32 ; <[6 x [258 x i8]]*> [#uses=24] - at perm = internal global [6 x [258 x i32]] zeroinitializer, align 32 ; <[6 x [258 x i32]]*> [#uses=4] - at base = internal global [6 x [258 x i32]] zeroinitializer, align 32 ; <[6 x [258 x i32]]*> [#uses=11] - at limit = internal global [6 x [258 x i32]] zeroinitializer, align 32 ; <[6 x [258 x i32]]*> [#uses=7] - at minLens = internal global [6 x i32] zeroinitializer ; <[6 x i32]*> [#uses=4] - at blockSize100k = internal global i32 0 ; [#uses=6] - at unzftab = internal global [256 x i32] zeroinitializer, align 32 ; <[256 x i32]*> [#uses=4] - at crc32Table = internal constant [256 x i32] [i32 0, i32 79764919, i32 159529838, i32 222504665, i32 319059676, i32 398814059, i32 445009330, i32 507990021, i32 638119352, i32 583659535, i32 797628118, i32 726387553, i32 890018660, i32 835552979, i32 1015980042, i32 944750013, i32 1276238704, i32 1221641927, i32 1167319070, i32 1095957929, i32 1595256236, i32 1540665371, i32 1452775106, i32 1381403509, i32 1780037320, i32 1859660671, i32 1671105958, i32 1733955601, i32 2031960084, i32 2111593891, i32 1889500026, i32 1952343757, i32 -1742489888, i32 -1662866601, i32 -1851683442, i32 -1788833735, i32 -1960329156, i32 -1880695413, i32 -2103051438, i32 -2040207643, i32 -1104454824, i32 -1159051537, i32 -1213636554, i32 -1284997759, i32 -1389417084, i32 -1444007885, i32 -1532160278, i32 -1603531939, i32 -734892656, i32 -789352409, i32 -575645954, i32 -646886583, i32 -952755380, i32 -1007220997, i32 -827056094, i32 -898286187, i32 -231047128, i32 -151282273, i32 -71779514, i32 -88! 04623, i32 -515967244, i32 -436212925, i32 -390279782, i32 -327299027, i32 881225847, i32 809987520, i32 1023691545, i32 969234094, i32 662832811, i32 591600412, i32 771767749, i32 717299826, i32 311336399, i32 374308984, i32 453813921, i32 533576470, i32 25881363, i32 88864420, i32 134795389, i32 214552010, i32 2023205639, i32 2086057648, i32 1897238633, i32 1976864222, i32 1804852699, i32 1867694188, i32 1645340341, i32 1724971778, i32 1587496639, i32 1516133128, i32 1461550545, i32 1406951526, i32 1302016099, i32 1230646740, i32 1142491917, i32 1087903418, i32 -1398421865, i32 -1469785312, i32 -1524105735, i32 -1578704818, i32 -1079922613, i32 -1151291908, i32 -1239184603, i32 -1293773166, i32 -1968362705, i32 -1905510760, i32 -2094067647, i32 -2014441994, i32 -1716953613, i32 -1654112188, i32 -1876203875, i32 -1796572374, i32 -525066777, i32 -462094256, i32 -382327159, i32 -302564546, i32 -206542021, i32 -143559028, i32 -97365931, i32 -17609246, i32 -960696225, i32 -103! 1934488, i32 -817968335, i32 -872425850, i32 -709327229, i32 -! 78055956 4, i32 -600130067, i32 -654598054, i32 1762451694, i32 1842216281, i32 1619975040, i32 1682949687, i32 2047383090, i32 2127137669, i32 1938468188, i32 2001449195, i32 1325665622, i32 1271206113, i32 1183200824, i32 1111960463, i32 1543535498, i32 1489069629, i32 1434599652, i32 1363369299, i32 622672798, i32 568075817, i32 748617968, i32 677256519, i32 907627842, i32 853037301, i32 1067152940, i32 995781531, i32 51762726, i32 131386257, i32 177728840, i32 240578815, i32 269590778, i32 349224269, i32 429104020, i32 491947555, i32 -248556018, i32 -168932423, i32 -122852000, i32 -60002089, i32 -500490030, i32 -420856475, i32 -341238852, i32 -278395381, i32 -685261898, i32 -739858943, i32 -559578920, i32 -630940305, i32 -1004286614, i32 -1058877219, i32 -845023740, i32 -916395085, i32 -1119974018, i32 -1174433591, i32 -1262701040, i32 -1333941337, i32 -1371866206, i32 -1426332139, i32 -1481064244, i32 -1552294533, i32 -1690935098, i32 -1611170447, i32 -1833673816, i32 -177069923! 3, i32 -2009983462, i32 -1930228819, i32 -2119160460, i32 -2056179517, i32 1569362073, i32 1498123566, i32 1409854455, i32 1355396672, i32 1317987909, i32 1246755826, i32 1192025387, i32 1137557660, i32 2072149281, i32 2135122070, i32 1912620623, i32 1992383480, i32 1753615357, i32 1816598090, i32 1627664531, i32 1707420964, i32 295390185, i32 358241886, i32 404320391, i32 483945776, i32 43990325, i32 106832002, i32 186451547, i32 266083308, i32 932423249, i32 861060070, i32 1041341759, i32 986742920, i32 613929101, i32 542559546, i32 756411363, i32 701822548, i32 -978770311, i32 -1050133554, i32 -869589737, i32 -924188512, i32 -693284699, i32 -764654318, i32 -550540341, i32 -605129092, i32 -475935807, i32 -413084042, i32 -366743377, i32 -287118056, i32 -257573603, i32 -194731862, i32 -114850189, i32 -35218492, i32 -1984365303, i32 -1921392450, i32 -2143631769, i32 -2063868976, i32 -1698919467, i32 -1635936670, i32 -1824608069, i32 -1744851700, i32 -1347415887, i32 -1418654! 458, i32 -1506661409, i32 -1561119128, i32 -1129027987, i32 -1! 20026013 4, i32 -1254728445, i32 -1309196108], align 32 ; <[256 x i32]*> [#uses=4] -@"\01LC35" = internal constant [17 x i8] c"sendMTFValues(0)\00", section "__TEXT,__cstring,cstring_literals" ; <[17 x i8]*> [#uses=1] - at rfreq = internal global [6 x [258 x i32]] zeroinitializer, align 32 ; <[6 x [258 x i32]]*> [#uses=3] -@"\01LC40" = internal constant [17 x i8] c"sendMTFValues(2)\00", section "__TEXT,__cstring,cstring_literals" ; <[17 x i8]*> [#uses=1] -@"\01LC41" = internal constant [17 x i8] c"sendMTFValues(3)\00", section "__TEXT,__cstring,cstring_literals" ; <[17 x i8]*> [#uses=1] -@"\01LC42" = internal constant [17 x i8] c"sendMTFValues(4)\00", section "__TEXT,__cstring,cstring_literals" ; <[17 x i8]*> [#uses=1] - at code = internal global [6 x [258 x i32]] zeroinitializer, align 32 ; <[6 x [258 x i32]]*> [#uses=2] -@"\01LC46" = internal constant [17 x i8] c"sendMTFValues(5)\00", section "__TEXT,__cstring,cstring_literals" ; <[17 x i8]*> [#uses=1] -@"\01LC54" = internal constant [28 x i8] c"setDecompressStructureSizes\00", section "__TEXT,__cstring,cstring_literals" ; <[28 x i8]*> [#uses=1] - at spec_fd = internal global [3 x %struct.spec_fd_t] zeroinitializer, align 32 ; <[3 x %struct.spec_fd_t]*> [#uses=128] -@"\01LC1179" = internal constant [10 x i8] c"spec_init\00", section "__TEXT,__cstring,cstring_literals" ; <[10 x i8]*> [#uses=1] -@"\01LC1280" = internal constant [35 x i8] c"spec_init: Error mallocing memory!\00", section "__TEXT,__cstring,cstring_literals" ; <[35 x i8]*> [#uses=1] -@"\01LC1684" = internal constant [24 x i8] c"Can't open file %s: %s\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[24 x i8]*> [#uses=1] -@"\01LC1785" = internal constant [27 x i8] c"Error reading from %s: %s\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[27 x i8]*> [#uses=1] -@"\01LC1886" = internal constant [22 x i8] c"Duplicating %d bytes\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[22 x i8]*> [#uses=1] -@"\01LC1987" = internal constant [15 x i8] c"input.combined\00", section "__TEXT,__cstring,cstring_literals" ; <[15 x i8]*> [#uses=1] -@"\01LC2088" = internal constant [19 x i8] c"Loading Input Data\00", section "__TEXT,__cstring,cstring_literals" ; <[19 x i8]*> [#uses=1] -@"\01LC2189" = internal constant [31 x i8] c"Input data %d bytes in length\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[31 x i8]*> [#uses=1] -@"\01LC2290" = internal constant [30 x i8] c"main: Error mallocing memory!\00", section "__TEXT,__cstring,cstring_literals" ; <[30 x i8]*> [#uses=1] -@"\01LC2391" = internal constant [34 x i8] c"Compressing Input Data, level %d\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[34 x i8]*> [#uses=1] -@"\01LC2492" = internal constant [36 x i8] c"Compressed data %d bytes in length\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[36 x i8]*> [#uses=1] -@"\01LC2593" = internal constant [19 x i8] c"Uncompressing Data\00", section "__TEXT,__cstring,cstring_literals" ; <[19 x i8]*> [#uses=1] -@"\01LC2694" = internal constant [38 x i8] c"Uncompressed data %d bytes in length\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[38 x i8]*> [#uses=1] -@"\01LC2795" = internal constant [35 x i8] c"Tested %dMB buffer: Miscompared!!\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[35 x i8]*> [#uses=1] -@"\01LC2896" = internal constant [37 x i8] c"Uncompressed data compared correctly\00", section "__TEXT,__cstring,cstring_literals" ; <[37 x i8]*> [#uses=1] -@"\01LC2997" = internal constant [25 x i8] c"Tested %dMB buffer: OK!\0A\00", section "__TEXT,__cstring,cstring_literals" ; <[25 x i8]*> [#uses=1] - at llvm.used = appending global [1 x i8*] [i8* bitcast (i32 (i32, i8**)* @main to i8*)], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] - -define i32 @main(i32 %argc, i8** nocapture %argv) nounwind ssp { -entry: - %parent.i.i.i = alloca [516 x i32], align 4 ; <[516 x i32]*> [#uses=8] - %weight.i.i.i = alloca [516 x i32], align 4 ; <[516 x i32]*> [#uses=19] - %heap.i.i.i = alloca [260 x i32], align 4 ; <[260 x i32]*> [#uses=25] - %inUse16.i.i = alloca [16 x i8], align 1 ; <[16 x i8]*> [#uses=3] - %pos.i.i = alloca [6 x i8], align 1 ; <[6 x i8]*> [#uses=3] - %fave.i.i = alloca [6 x i32], align 4 ; <[6 x i32]*> [#uses=2] - %cost.i.i = alloca [6 x i16], align 2 ; <[6 x i16]*> [#uses=9] - %pos.i.i.i = alloca [6 x i8], align 1 ; <[6 x i8]*> [#uses=5] - %inUse16.i.i.i = alloca [16 x i8], align 1 ; <[16 x i8]*> [#uses=2] - %yy.i.i = alloca [256 x i8], align 1 ; <[256 x i8]*> [#uses=10] - %cftab.i.i = alloca [257 x i32], align 4 ; <[257 x i32]*> [#uses=5] - %0 = icmp sgt i32 %argc, 1 ; [#uses=1] - br i1 %0, label %bb, label %bb1 - -bb: ; preds = %entry - %1 = getelementptr i8** %argv, i32 1 ; [#uses=1] - %2 = load i8** %1, align 4 ; [#uses=1] - br label %bb1 - -bb1: ; preds = %bb, %entry - %input_name.0 = phi i8* [ %2, %bb ], [ getelementptr ([15 x i8]* @"\01LC1987", i32 0, i32 0), %entry ] ; [#uses=3] - %3 = icmp sgt i32 %argc, 2 ; [#uses=1] - br i1 %3, label %bb2, label %bb3 - -bb2: ; preds = %bb1 - %4 = getelementptr i8** %argv, i32 2 ; [#uses=1] - %5 = load i8** %4, align 4 ; [#uses=1] - %6 = tail call i32 @atoi(i8* %5) nounwind ; [#uses=1] - br label %bb3 - -bb3: ; preds = %bb2, %bb1 - %input_size.0 = phi i32 [ %6, %bb2 ], [ 64, %bb1 ] ; [#uses=5] - %7 = icmp sgt i32 %argc, 3 ; [#uses=1] - br i1 %7, label %bb4, label %bb6 - -bb4: ; preds = %bb3 - %8 = getelementptr i8** %argv, i32 3 ; [#uses=1] - %9 = load i8** %8, align 4 ; [#uses=1] - %10 = tail call i32 @atoi(i8* %9) nounwind ; [#uses=1] - br label %bb6 - -bb6: ; preds = %bb4, %bb3 - %compressed_size.0 = phi i32 [ %10, %bb4 ], [ %input_size.0, %bb3 ] ; [#uses=1] - %11 = shl i32 %input_size.0, 20 ; [#uses=9] - store i32 %11, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 0), align 32 - %12 = shl i32 %compressed_size.0, 20 ; [#uses=1] - store i32 %12, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 0), align 16 - store i32 %11, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 2, i32 0), align 32 - %13 = tail call i32 @puts(i8* getelementptr ([10 x i8]* @"\01LC1179", i32 0, i32 0)) nounwind ; [#uses=0] - br label %bb11.i - -bb2.i: ; preds = %bb11.i - %scevgep35.i = bitcast i32* %scevgep3.i to i8* ; [#uses=1] - %14 = load i32* %scevgep3.i, align 16 ; [#uses=4] - tail call void @llvm.memset.i32(i8* %scevgep35.i, i8 0, i32 16, i32 16) nounwind - store i32 %14, i32* %scevgep3.i, align 16 - %15 = add i32 %14, 102400 ; [#uses=1] - %16 = malloc i8, i32 %15 ; [#uses=2] - store i8* %16, i8** %scevgep4.i, align 4 - %17 = icmp eq i8* %16, null ; [#uses=1] - br i1 %17, label %bb6.i, label %bb9.preheader.i - -bb9.preheader.i: ; preds = %bb2.i - %18 = icmp sgt i32 %14, 0 ; [#uses=1] - br i1 %18, label %bb8.i, label %bb10.i - -bb6.i: ; preds = %bb2.i - %19 = tail call i32 @puts(i8* getelementptr ([35 x i8]* @"\01LC1280", i32 0, i32 0)) nounwind ; [#uses=0] - tail call void @exit(i32 1) noreturn nounwind - unreachable - -bb8.i: ; preds = %bb8.i, %bb9.preheader.i - %indvar.i = phi i32 [ %indvar.next.i, %bb8.i ], [ 0, %bb9.preheader.i ] ; [#uses=2] - %tmp.i = shl i32 %indvar.i, 10 ; [#uses=2] - %20 = load i8** %scevgep4.i, align 4 ; [#uses=1] - %scevgep.i = getelementptr i8* %20, i32 %tmp.i ; [#uses=1] - store i8 0, i8* %scevgep.i, align 1 - %tmp2.i = add i32 %tmp.i, 1024 ; [#uses=1] - %21 = icmp slt i32 %tmp2.i, %14 ; [#uses=1] - %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=1] - br i1 %21, label %bb8.i, label %bb10.i - -bb10.i: ; preds = %bb8.i, %bb9.preheader.i - %22 = add i32 %23, 1 ; [#uses=1] - br label %bb11.i - -bb11.i: ; preds = %bb10.i, %bb6 - %23 = phi i32 [ %22, %bb10.i ], [ 0, %bb6 ] ; [#uses=4] - %scevgep3.i = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %23, i32 0 ; [#uses=3] - %scevgep4.i = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %23, i32 3 ; [#uses=2] - %24 = icmp sgt i32 %23, 2 ; [#uses=1] - br i1 %24, label %bb8, label %bb2.i - -bb8: ; preds = %bb11.i - %25 = tail call i32 @puts(i8* getelementptr ([19 x i8]* @"\01LC2088", i32 0, i32 0)) nounwind ; [#uses=0] - %26 = tail call i32 (i8*, i32, ...)* @"\01_open$UNIX2003"(i8* %input_name.0, i32 0) nounwind ; [#uses=3] - %27 = icmp slt i32 %26, 0 ; [#uses=1] - br i1 %27, label %bb.i77, label %bb1.i - -bb.i77: ; preds = %bb8 - %28 = tail call i32* @__error() nounwind ; [#uses=1] - %29 = load i32* %28, align 4 ; [#uses=1] - %30 = tail call i8* @"\01_strerror$UNIX2003"(i32 %29) nounwind ; [#uses=1] - %31 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] - %32 = tail call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %31, i8* getelementptr ([24 x i8]* @"\01LC1684", i32 0, i32 0), i8* %input_name.0, i8* %30) nounwind ; [#uses=0] - tail call void @exit(i32 1) noreturn nounwind - unreachable - -bb1.i: ; preds = %bb8 - store i32 0, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 - store i32 0, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 2), align 8 - br label %bb6.i80 - -bb2.i78: ; preds = %bb6.i80 - %33 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 3), align 4 ; [#uses=1] - %34 = getelementptr i8* %33, i32 %i.0.i ; [#uses=1] - %35 = tail call i32 (...)* @read(i32 %26, i8* %34, i32 131072) nounwind ; [#uses=4] - %36 = icmp eq i32 %35, 0 ; [#uses=1] - br i1 %36, label %bb7.i81, label %bb3.i - -bb3.i: ; preds = %bb2.i78 - %37 = icmp slt i32 %35, 0 ; [#uses=1] - br i1 %37, label %bb4.i, label %bb5.i79 - -bb4.i: ; preds = %bb3.i - %38 = tail call i32* @__error() nounwind ; [#uses=1] - %39 = load i32* %38, align 4 ; [#uses=1] - %40 = tail call i8* @"\01_strerror$UNIX2003"(i32 %39) nounwind ; [#uses=1] - %41 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] - %42 = tail call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %41, i8* getelementptr ([27 x i8]* @"\01LC1785", i32 0, i32 0), i8* %input_name.0, i8* %40) nounwind ; [#uses=0] - tail call void @exit(i32 1) noreturn nounwind - unreachable - -bb5.i79: ; preds = %bb3.i - %43 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=1] - %44 = add i32 %43, %35 ; [#uses=1] - store i32 %44, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 - %45 = add i32 %35, %i.0.i ; [#uses=1] - br label %bb6.i80 - -bb6.i80: ; preds = %bb5.i79, %bb1.i - %i.0.i = phi i32 [ 0, %bb1.i ], [ %45, %bb5.i79 ] ; [#uses=3] - %46 = icmp slt i32 %i.0.i, %11 ; [#uses=1] - br i1 %46, label %bb2.i78, label %bb7.i81 - -bb7.i81: ; preds = %bb6.i80, %bb2.i78 - %47 = tail call i32 (...)* @close(i32 %26) nounwind ; [#uses=0] - %48 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=3] - %49 = icmp slt i32 %48, %11 ; [#uses=1] - br i1 %49, label %bb14.i, label %bb10 - -bb14.i: ; preds = %bb14.i, %bb7.i81 - %50 = phi i32 [ %57, %bb14.i ], [ %48, %bb7.i81 ] ; [#uses=3] - %51 = sub i32 %11, %50 ; [#uses=2] - %52 = icmp slt i32 %50, %51 ; [#uses=1] - %tmp.0.i = select i1 %52, i32 %50, i32 %51 ; [#uses=3] - %53 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([22 x i8]* @"\01LC1886", i32 0, i32 0), i32 %tmp.0.i) nounwind ; [#uses=0] - %.pre.i = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=1] - %54 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 3), align 4 ; [#uses=2] - %55 = getelementptr i8* %54, i32 %.pre.i ; [#uses=1] - tail call void @llvm.memcpy.i32(i8* %55, i8* %54, i32 %tmp.0.i, i32 1) nounwind - %56 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 ; [#uses=1] - %57 = add i32 %56, %tmp.0.i ; [#uses=4] - store i32 %57, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 1), align 4 - %58 = icmp slt i32 %57, %11 ; [#uses=1] - br i1 %58, label %bb14.i, label %bb10 - -bb10: ; preds = %bb14.i, %bb7.i81 - %59 = phi i32 [ %48, %bb7.i81 ], [ %57, %bb14.i ] ; [#uses=1] - %60 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([31 x i8]* @"\01LC2189", i32 0, i32 0), i32 %59) nounwind ; [#uses=0] - %61 = shl i32 %input_size.0, 10 ; [#uses=1] - %62 = malloc i8, i32 %61 ; [#uses=3] - %63 = icmp eq i8* %62, null ; [#uses=1] - br i1 %63, label %bb11, label %bb14.preheader - -bb14.preheader: ; preds = %bb10 - %64 = icmp sgt i32 %11, 0 ; [#uses=1] - br i1 %64, label %bb13, label %bb15 - -bb11: ; preds = %bb10 - %65 = tail call i32 @puts(i8* getelementptr ([30 x i8]* @"\01LC2290", i32 0, i32 0)) nounwind ; [#uses=0] - ret i32 1 - -bb13: ; preds = %bb13, %bb14.preheader - %i.01 = phi i32 [ %68, %bb13 ], [ 0, %bb14.preheader ] ; [#uses=3] - %scevgep5 = getelementptr i8* %62, i32 %i.01 ; [#uses=1] - %tmp6 = mul i32 %i.01, 1027 ; [#uses=2] - %66 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 0, i32 3), align 4 ; [#uses=1] - %scevgep7 = getelementptr i8* %66, i32 %tmp6 ; [#uses=1] - %67 = load i8* %scevgep7, align 1 ; [#uses=1] - store i8 %67, i8* %scevgep5, align 1 - %68 = add i32 %i.01, 1 ; [#uses=1] - %phitmp = add i32 %tmp6, 1027 ; [#uses=1] - %69 = icmp slt i32 %phitmp, %11 ; [#uses=1] - br i1 %69, label %bb13, label %bb15 - -bb15: ; preds = %bb13, %bb14.preheader - store i32 9, i32* @blockSize100k, align 4 - store i1 false, i1* @bsStream.b - %70 = malloc [900021 x i8] ; <[900021 x i8]*> [#uses=3] - %.sub.i = getelementptr [900021 x i8]* %70, i32 0, i32 0 ; [#uses=1] - store i8* %.sub.i, i8** @block, align 4 - %71 = malloc [900020 x i16] ; <[900020 x i16]*> [#uses=2] - %.sub1.i = getelementptr [900020 x i16]* %71, i32 0, i32 0 ; [#uses=1] - store i16* %.sub1.i, i16** @quadrant, align 4 - %72 = malloc [900000 x i32] ; <[900000 x i32]*> [#uses=3] - %.sub2.i = getelementptr [900000 x i32]* %72, i32 0, i32 0 ; [#uses=1] - store i32* %.sub2.i, i32** @zptr, align 4 - %73 = malloc [65537 x i32] ; <[65537 x i32]*> [#uses=2] - %.sub.i.i = getelementptr [65537 x i32]* %73, i32 0, i32 0 ; [#uses=1] - store i32* %.sub.i.i, i32** @ftab, align 4 - %74 = icmp eq [900021 x i8]* %70, null ; [#uses=1] - %75 = icmp eq [900020 x i16]* %71, null ; [#uses=1] - %76 = icmp eq [900000 x i32]* %72, null ; [#uses=1] - %77 = icmp eq [65537 x i32]* %73, null ; [#uses=1] - %or.cond.i.i = or i1 %75, %74 ; [#uses=1] - %or.cond2.i.i = or i1 %or.cond.i.i, %76 ; [#uses=1] - %or.cond3.i.i = or i1 %or.cond2.i.i, %77 ; [#uses=1] - br i1 %or.cond3.i.i, label %bb3.i.i, label %spec_initbufs.exit - -bb3.i.i: ; preds = %bb15 - %78 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] - %79 = tail call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %78, i8* getelementptr ([146 x i8]* @"\01LC5", i32 0, i32 0), i8* null, i32 6562209, i32 900000) nounwind ; [#uses=0] - %80 = load %struct.FILE** @__stderrp, align 4 ; <%struct.FILE*> [#uses=1] - %81 = tail call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* %80, i8* getelementptr ([36 x i8]* @"\01LC", i32 0, i32 0), i8* getelementptr ([1024 x i8]* @inName, i32 0, i32 0), i8* getelementptr ([1024 x i8]* @outName, i32 0, i32 0)) nounwind ; [#uses=0] - tail call fastcc void @cleanUpAndFail(i32 1) nounwind ssp - unreachable - -spec_initbufs.exit: ; preds = %bb15 - %82 = getelementptr [900021 x i8]* %70, i32 0, i32 1 ; [#uses=1] - store i8* %82, i8** @block, align 4 - %83 = bitcast [900000 x i32]* %72 to i16* ; [#uses=1] - store i16* %83, i16** @szptr, align 4 - %84 = getelementptr [6 x i8]* %pos.i.i.i, i32 0, i32 0 ; [#uses=1] - %85 = getelementptr [256 x i8]* %yy.i.i, i32 0, i32 0 ; [#uses=2] - %86 = getelementptr [257 x i32]* %cftab.i.i, i32 0, i32 0 ; [#uses=1] - %87 = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 0 ; [#uses=1] - %88 = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 1 ; [#uses=1] - %89 = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 2 ; [#uses=1] - %90 = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 3 ; [#uses=1] - %91 = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 4 ; [#uses=1] - %92 = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 5 ; [#uses=1] - %93 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 0 ; [#uses=1] - %94 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 0 ; [#uses=1] - %95 = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 0 ; [#uses=1] - %96 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 1 ; [#uses=4] - %97 = getelementptr [6 x i8]* %pos.i.i, i32 0, i32 0 ; [#uses=2] - br label %bb32 - -bb18: ; preds = %bb32 - %98 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([34 x i8]* @"\01LC2391", i32 0, i32 0), i32 %level.0) nounwind ; [#uses=0] - store i32 %level.0, i32* @blockSize100k, align 4 - store i1 true, i1* @bsStream.b - store i32 0, i32* @bsLive, align 4 - store i32 0, i32* @bsBuff, align 4 - store i32 0, i32* @bytesIn, align 4 - br label %bb1.i.i9 - -bb.i.i8: ; preds = %bb1.i.i9 - %99 = lshr i32 %110, 24 ; [#uses=1] - %100 = trunc i32 %99 to i8 ; [#uses=1] - %101 = load i8** getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 3), align 4 ; [#uses=1] - %102 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 ; [#uses=2] - %103 = getelementptr i8* %101, i32 %102 ; [#uses=1] - store i8 %100, i8* %103, align 1 - %104 = add i32 %102, 1 ; [#uses=1] - store i32 %104, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 2), align 8 - %105 = load i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 1), align 4 ; [#uses=1] - %106 = add i32 %105, 1 ; [#uses=1] - store i32 %106, i32* getelementptr ([3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 1, i32 1), align 4 - %107 = shl i32 %bsBuff.tmp.0496, 8 ; [#uses=2] - %108 = add i32 %bsLive.tmp.0497, -8 ; [#uses=3] - %phitmp86 = icmp sgt i32 %108, 7 ; [#uses=1] - br label %bb1.i.i9 - -bb1.i.i9: ; preds = %bb.i.i8, %bb18 - %bsLive.tmp.0497 = phi i32 [ 0, %bb18 ], [ %108, %bb.i.i8 ] ; [#uses=1] - %bsBuff.tmp.0496 = phi i32 [ 0, %bb18 ], [ %107, %bb.i.i8 ] ; [#uses=2] - %109 = phi i32 [ %108, %bb.i.i8 ], [ 0, %bb18 ] ; [#uses=2] - %110 = phi i32 [ %107, %bb.i.i8 ], [ 0, %bb18 ] ; [#uses=1] - %111 = phi i1 [ %phitmp86, %bb.i.i8 ], [ false, %bb18 ] ; [#uses=1] - br i1 %111, label %bb.i.i8, label %bsW.exit.i - -bsW.exit.i: ; preds = %bb1.i.i9 - %112 = sub i32 24, %109 ; [#uses=1] - %113 = shl i32 66, %112 ; [#uses=1] - %114 = or i32 %113, %bsBuff.tmp.0496 ; [#uses=3] - store i32 %114, i32* @bsBuff, align 4 - %115 = add i32 %109, 8 ; [#uses=4] - store i32 %115, i32* @bsLive, align 4 - %.b.i68.i = load i1* @bsStream.b ; [#uses=1] - %116 = zext i1 %.b.i68.i to i32 ; [#uses=3] - %117 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %116, i32 3 ; [#uses=1] - %118 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %116, i32 2 ; [#uses=2] - %119 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %116, i32 1 ; [#uses=2] - br label %bb1.i70.i - -bb.i69.i: ; preds = %bb1.i70.i - %120 = lshr i32 %131, 24 ; [#uses=1] - %121 = trunc i32 %120 to i8 ; [#uses=1] - %122 = load i8** %117, align 4 ; [#uses=1] - %123 = load i32* %118, align 8 ; [#uses=2] - %124 = getelementptr i8* %122, i32 %123 ; [#uses=1] - store i8 %121, i8* %124, align 1 - %125 = add i32 %123, 1 ; [#uses=1] - store i32 %125, i32* %118, align 8 - %126 = load i32* %119, align 4 ; [#uses=1] - %127 = add i32 %126, 1 ; [#uses=1] - store i32 %127, i32* %119, align 4 - %128 = shl i32 %bsBuff.tmp.0500, 8 ; [#uses=2] - %129 = add i32 %bsLive.tmp.0501, -8 ; [#uses=3] - br label %bb1.i70.i - -bb1.i70.i: ; preds = %bb.i69.i, %bsW.exit.i - %bsLive.tmp.0501 = phi i32 [ %115, %bsW.exit.i ], [ %129, %bb.i69.i ] ; [#uses=1] - %bsBuff.tmp.0500 = phi i32 [ %114, %bsW.exit.i ], [ %128, %bb.i69.i ] ; [#uses=2] - %130 = phi i32 [ %129, %bb.i69.i ], [ %115, %bsW.exit.i ] ; [#uses=2] - %131 = phi i32 [ %128, %bb.i69.i ], [ %114, %bsW.exit.i ] ; [#uses=1] - %132 = phi i32 [ %129, %bb.i69.i ], [ %115, %bsW.exit.i ] ; [#uses=1] - %133 = icmp sgt i32 %132, 7 ; [#uses=1] - br i1 %133, label %bb.i69.i, label %bsW.exit71.i - -bsW.exit71.i: ; preds = %bb1.i70.i - %134 = sub i32 24, %130 ; [#uses=1] - %135 = shl i32 90, %134 ; [#uses=1] - %136 = or i32 %135, %bsBuff.tmp.0500 ; [#uses=3] - store i32 %136, i32* @bsBuff, align 4 - %137 = add i32 %130, 8 ; [#uses=4] - store i32 %137, i32* @bsLive, align 4 - %.b.i75.i = load i1* @bsStream.b ; [#uses=1] - %138 = zext i1 %.b.i75.i to i32 ; [#uses=3] - %139 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %138, i32 3 ; [#uses=1] - %140 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %138, i32 2 ; [#uses=2] - %141 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %138, i32 1 ; [#uses=2] - br label %bb1.i78.i - -bb.i76.i: ; preds = %bb1.i78.i - %142 = lshr i32 %153, 24 ; [#uses=1] - %143 = trunc i32 %142 to i8 ; [#uses=1] - %144 = load i8** %139, align 4 ; [#uses=1] - %145 = load i32* %140, align 8 ; [#uses=2] - %146 = getelementptr i8* %144, i32 %145 ; [#uses=1] - store i8 %143, i8* %146, align 1 - %147 = add i32 %145, 1 ; [#uses=1] - store i32 %147, i32* %140, align 8 - %148 = load i32* %141, align 4 ; [#uses=1] - %149 = add i32 %148, 1 ; [#uses=1] - store i32 %149, i32* %141, align 4 - %150 = shl i32 %bsBuff.tmp.0504, 8 ; [#uses=2] - %151 = add i32 %bsLive.tmp.0505, -8 ; [#uses=3] - br label %bb1.i78.i - -bb1.i78.i: ; preds = %bb.i76.i, %bsW.exit71.i - %bsLive.tmp.0505 = phi i32 [ %137, %bsW.exit71.i ], [ %151, %bb.i76.i ] ; [#uses=1] - %bsBuff.tmp.0504 = phi i32 [ %136, %bsW.exit71.i ], [ %150, %bb.i76.i ] ; [#uses=2] - %152 = phi i32 [ %151, %bb.i76.i ], [ %137, %bsW.exit71.i ] ; [#uses=2] - %153 = phi i32 [ %150, %bb.i76.i ], [ %136, %bsW.exit71.i ] ; [#uses=1] - %154 = phi i32 [ %151, %bb.i76.i ], [ %137, %bsW.exit71.i ] ; [#uses=1] - %155 = icmp sgt i32 %154, 7 ; [#uses=1] - br i1 %155, label %bb.i76.i, label %bsW.exit79.i - -bsW.exit79.i: ; preds = %bb1.i78.i - %156 = sub i32 24, %152 ; [#uses=1] - %157 = shl i32 104, %156 ; [#uses=1] - %158 = or i32 %157, %bsBuff.tmp.0504 ; [#uses=3] - store i32 %158, i32* @bsBuff, align 4 - %159 = add i32 %152, 8 ; [#uses=4] - store i32 %159, i32* @bsLive, align 4 - %160 = load i32* @blockSize100k, align 4 ; [#uses=1] - %161 = add i32 %160, 48 ; [#uses=1] - %162 = and i32 %161, 255 ; [#uses=1] - %.b.i189.i = load i1* @bsStream.b ; [#uses=1] - %163 = zext i1 %.b.i189.i to i32 ; [#uses=3] - %164 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %163, i32 3 ; [#uses=1] - %165 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %163, i32 2 ; [#uses=2] - %166 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %163, i32 1 ; [#uses=2] - br label %bb1.i192.i - -bb.i190.i: ; preds = %bb1.i192.i - %167 = lshr i32 %178, 24 ; [#uses=1] - %168 = trunc i32 %167 to i8 ; [#uses=1] - %169 = load i8** %164, align 4 ; [#uses=1] - %170 = load i32* %165, align 8 ; [#uses=2] - %171 = getelementptr i8* %169, i32 %170 ; [#uses=1] - store i8 %168, i8* %171, align 1 - %172 = add i32 %170, 1 ; [#uses=1] - store i32 %172, i32* %165, align 8 - %173 = load i32* %166, align 4 ; [#uses=1] - %174 = add i32 %173, 1 ; [#uses=1] - store i32 %174, i32* %166, align 4 - %175 = shl i32 %bsBuff.tmp.0508, 8 ; [#uses=2] - %176 = add i32 %bsLive.tmp.0509, -8 ; [#uses=3] - br label %bb1.i192.i - -bb1.i192.i: ; preds = %bb.i190.i, %bsW.exit79.i - %bsLive.tmp.0509 = phi i32 [ %159, %bsW.exit79.i ], [ %176, %bb.i190.i ] ; [#uses=1] - %bsBuff.tmp.0508 = phi i32 [ %158, %bsW.exit79.i ], [ %175, %bb.i190.i ] ; [#uses=2] - %177 = phi i32 [ %176, %bb.i190.i ], [ %159, %bsW.exit79.i ] ; [#uses=2] - %178 = phi i32 [ %175, %bb.i190.i ], [ %158, %bsW.exit79.i ] ; [#uses=1] - %179 = phi i32 [ %176, %bb.i190.i ], [ %159, %bsW.exit79.i ] ; [#uses=1] - %180 = icmp sgt i32 %179, 7 ; [#uses=1] - br i1 %180, label %bb.i190.i, label %bsW.exit193.i - -bsW.exit193.i: ; preds = %bb1.i192.i - %181 = sub i32 24, %177 ; [#uses=1] - %182 = shl i32 %162, %181 ; [#uses=1] - %183 = or i32 %182, %bsBuff.tmp.0508 ; [#uses=1] - store i32 %183, i32* @bsBuff, align 4 - %184 = add i32 %177, 8 ; [#uses=1] - store i32 %184, i32* @bsLive, align 4 - store i32 -1, i32* @globalCrc, align 4 - tail call fastcc void @loadAndRLEsource() nounwind ssp - %185 = load i32* @last, align 4 ; [#uses=2] - %186 = icmp eq i32 %185, -1 ; [#uses=1] - br i1 %186, label %bb8.i70, label %bb2.i11 - -bb2.i11: ; preds = %sendMTFValues.exit.i, %bsW.exit193.i - %187 = phi i32 [ %1058, %sendMTFValues.exit.i ], [ %185, %bsW.exit193.i ] ; [#uses=1] - %combinedCRC.01.i = phi i32 [ %192, %sendMTFValues.exit.i ], [ 0, %bsW.exit193.i ] ; [#uses=2] - %188 = load i32* @globalCrc, align 4 ; [#uses=1] - %not.i.i10 = xor i32 %188, -1 ; [#uses=5] - %189 = lshr i32 %combinedCRC.01.i, 31 ; [#uses=1] - %190 = shl i32 %combinedCRC.01.i, 1 ; [#uses=1] - %191 = or i32 %189, %190 ; [#uses=1] - %192 = xor i32 %191, %not.i.i10 ; [#uses=2] - %193 = mul i32 %187, 30 ; [#uses=1] - store i32 %193, i32* @workLimit, align 4 - store i32 0, i32* @workDone, align 4 - store i1 true, i1* @firstAttempt.b - tail call fastcc void @sortIt() nounwind ssp - %194 = load i32* @workDone, align 4 ; [#uses=1] - %195 = load i32* @workLimit, align 4 ; [#uses=1] - %196 = icmp sgt i32 %194, %195 ; [#uses=1] - br i1 %196, label %bb4.i174.i, label %bb9.i182.i - -bb4.i174.i: ; preds = %bb2.i11 - %.b.i173.i = load i1* @firstAttempt.b ; [#uses=1] - br i1 %.b.i173.i, label %bb.i.i176.i, label %bb9.i182.i - -bb.i.i176.i: ; preds = %bb.i.i176.i, %bb4.i174.i - %i.04.i.i.i = phi i32 [ %197, %bb.i.i176.i ], [ 0, %bb4.i174.i ] ; [#uses=2] - %scevgep8.i.i.i = getelementptr [256 x i8]* @inUse, i32 0, i32 %i.04.i.i.i ; [#uses=1] - store i8 0, i8* %scevgep8.i.i.i, align 1 - %197 = add i32 %i.04.i.i.i, 1 ; [#uses=2] - %exitcond.i175.i = icmp eq i32 %197, 256 ; [#uses=1] - br i1 %exitcond.i175.i, label %bb7.loopexit.i.i.i, label %bb.i.i176.i - -bb3.i.i178.i: ; preds = %bb3.i.i178.i.preheader, %bb6.i.i.i14 - %rTPos.13.i.i.i = phi i32 [ %rTPos.0.i.i.i, %bb6.i.i.i14 ], [ 0, %bb3.i.i178.i.preheader ] ; [#uses=3] - %rNToGo.12.i.i.i = phi i32 [ %203, %bb6.i.i.i14 ], [ 0, %bb3.i.i178.i.preheader ] ; [#uses=2] - %i.11.i.i.i = phi i32 [ %tmp.i.i177.i, %bb6.i.i.i14 ], [ 0, %bb3.i.i178.i.preheader ] ; [#uses=2] - %tmp.i.i177.i = add i32 %i.11.i.i.i, 1 ; [#uses=2] - %198 = icmp eq i32 %rNToGo.12.i.i.i, 0 ; [#uses=1] - br i1 %198, label %bb4.i.i.i13, label %bb6.i.i.i14 - -bb4.i.i.i13: ; preds = %bb3.i.i178.i - %199 = getelementptr [512 x i32]* @rNums, i32 0, i32 %rTPos.13.i.i.i ; [#uses=1] - %200 = load i32* %199, align 4 ; [#uses=2] - %201 = add i32 %rTPos.13.i.i.i, 1 ; [#uses=2] - %202 = icmp eq i32 %201, 512 ; [#uses=1] - br i1 %202, label %bb5.i.i179.i, label %bb6.i.i.i14 - -bb5.i.i179.i: ; preds = %bb4.i.i.i13 - br label %bb6.i.i.i14 - -bb6.i.i.i14: ; preds = %bb5.i.i179.i, %bb4.i.i.i13, %bb3.i.i178.i - %rNToGo.0.i.i.i = phi i32 [ %200, %bb5.i.i179.i ], [ %rNToGo.12.i.i.i, %bb3.i.i178.i ], [ %200, %bb4.i.i.i13 ] ; [#uses=1] - %rTPos.0.i.i.i = phi i32 [ 0, %bb5.i.i179.i ], [ %rTPos.13.i.i.i, %bb3.i.i178.i ], [ %201, %bb4.i.i.i13 ] ; [#uses=1] - %203 = add i32 %rNToGo.0.i.i.i, -1 ; [#uses=2] - %scevgep.i180.i = getelementptr i8* %213, i32 %i.11.i.i.i ; [#uses=2] - %204 = load i8* %scevgep.i180.i, align 1 ; [#uses=1] - %205 = icmp eq i32 %203, 1 ; [#uses=1] - %206 = zext i1 %205 to i8 ; [#uses=1] - %207 = xor i8 %204, %206 ; [#uses=2] - store i8 %207, i8* %scevgep.i180.i, align 1 - %208 = zext i8 %207 to i32 ; [#uses=1] - %209 = getelementptr [256 x i8]* @inUse, i32 0, i32 %208 ; [#uses=1] - store i8 1, i8* %209, align 1 - %210 = icmp sgt i32 %tmp.i.i177.i, %211 ; [#uses=1] - br i1 %210, label %randomiseBlock.exit.i.i, label %bb3.i.i178.i - -bb7.loopexit.i.i.i: ; preds = %bb.i.i176.i - %211 = load i32* @last, align 4 ; [#uses=2] - %212 = icmp slt i32 %211, 0 ; [#uses=1] - br i1 %212, label %randomiseBlock.exit.i.i, label %bb3.i.i178.i.preheader - -bb3.i.i178.i.preheader: ; preds = %bb7.loopexit.i.i.i - %213 = load i8** @block, align 4 ; [#uses=1] - br label %bb3.i.i178.i - -randomiseBlock.exit.i.i: ; preds = %bb7.loopexit.i.i.i, %bb6.i.i.i14 - store i32 0, i32* @workDone, align 4 - store i32 0, i32* @workLimit, align 4 - store i1 false, i1* @firstAttempt.b - tail call fastcc void @sortIt() nounwind ssp - br label %bb9.i182.i - -bb9.i182.i: ; preds = %randomiseBlock.exit.i.i, %bb4.i174.i, %bb2.i11 - %blockRandomised.0 = phi i8 [ 1, %randomiseBlock.exit.i.i ], [ 0, %bb4.i174.i ], [ 0, %bb2.i11 ] ; [#uses=1] - %214 = load i32* @last, align 4 ; [#uses=1] - %215 = load i32** @zptr, align 4 ; [#uses=1] - br label %bb13.i.i16 - -bb10.i183.i: ; preds = %bb13.i.i16 - %scevgep4.i.i = getelementptr i32* %215, i32 %219 ; [#uses=1] - %216 = load i32* %scevgep4.i.i, align 4 ; [#uses=1] - %217 = icmp eq i32 %216, 0 ; [#uses=1] - br i1 %217, label %bb14.i185.i, label %bb12.i184.i - -bb12.i184.i: ; preds = %bb10.i183.i - %218 = add i32 %219, 1 ; [#uses=1] - br label %bb13.i.i16 - -bb13.i.i16: ; preds = %bb12.i184.i, %bb9.i182.i - %219 = phi i32 [ 0, %bb9.i182.i ], [ %218, %bb12.i184.i ] ; [#uses=5] - %220 = icmp sgt i32 %219, %214 ; [#uses=1] - br i1 %220, label %bb15.i186.i, label %bb10.i183.i - -bb14.i185.i: ; preds = %bb10.i183.i - %221 = icmp eq i32 %219, -1 ; [#uses=1] - br i1 %221, label %bb15.i186.i, label %doReversibleTransformation.exit.i - -bb15.i186.i: ; preds = %bb14.i185.i, %bb13.i.i16 - tail call fastcc void @panic(i8* getelementptr ([27 x i8]* @"\01LC32", i32 0, i32 0)) nounwind ssp - unreachable - -doReversibleTransformation.exit.i: ; preds = %bb14.i185.i - %.pr.i164.i = load i32* @bsLive ; [#uses=3] - %.pre.i165.i = load i32* @bsBuff, align 4 ; [#uses=2] - %.b.i166.i = load i1* @bsStream.b ; [#uses=1] - %222 = zext i1 %.b.i166.i to i32 ; [#uses=3] - %223 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %222, i32 3 ; [#uses=1] - %224 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %222, i32 2 ; [#uses=2] - %225 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %222, i32 1 ; [#uses=2] - br label %bb1.i169.i - -bb.i167.i: ; preds = %bb1.i169.i - %226 = lshr i32 %237, 24 ; [#uses=1] - %227 = trunc i32 %226 to i8 ; [#uses=1] - %228 = load i8** %223, align 4 ; [#uses=1] - %229 = load i32* %224, align 8 ; [#uses=2] - %230 = getelementptr i8* %228, i32 %229 ; [#uses=1] - store i8 %227, i8* %230, align 1 - %231 = add i32 %229, 1 ; [#uses=1] - store i32 %231, i32* %224, align 8 - %232 = load i32* %225, align 4 ; [#uses=1] - %233 = add i32 %232, 1 ; [#uses=1] - store i32 %233, i32* %225, align 4 - %234 = shl i32 %bsBuff.tmp.0408, 8 ; [#uses=2] - %235 = add i32 %bsLive.tmp.0409, -8 ; [#uses=3] - br label %bb1.i169.i - -bb1.i169.i: ; preds = %bb.i167.i, %doReversibleTransformation.exit.i - %bsLive.tmp.0409 = phi i32 [ %.pr.i164.i, %doReversibleTransformation.exit.i ], [ %235, %bb.i167.i ] ; [#uses=1] - %bsBuff.tmp.0408 = phi i32 [ %.pre.i165.i, %doReversibleTransformation.exit.i ], [ %234, %bb.i167.i ] ; [#uses=2] - %236 = phi i32 [ %235, %bb.i167.i ], [ %.pr.i164.i, %doReversibleTransformation.exit.i ] ; [#uses=2] - %237 = phi i32 [ %234, %bb.i167.i ], [ %.pre.i165.i, %doReversibleTransformation.exit.i ] ; [#uses=1] - %238 = phi i32 [ %235, %bb.i167.i ], [ %.pr.i164.i, %doReversibleTransformation.exit.i ] ; [#uses=1] - %239 = icmp sgt i32 %238, 7 ; [#uses=1] - br i1 %239, label %bb.i167.i, label %bsW.exit170.i - -bsW.exit170.i: ; preds = %bb1.i169.i - %240 = sub i32 24, %236 ; [#uses=1] - %241 = shl i32 49, %240 ; [#uses=1] - %242 = or i32 %241, %bsBuff.tmp.0408 ; [#uses=3] - store i32 %242, i32* @bsBuff, align 4 - %243 = add i32 %236, 8 ; [#uses=4] - store i32 %243, i32* @bsLive, align 4 - %.b.i159.i = load i1* @bsStream.b ; [#uses=1] - %244 = zext i1 %.b.i159.i to i32 ; [#uses=3] - %245 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %244, i32 3 ; [#uses=1] - %246 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %244, i32 2 ; [#uses=2] - %247 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %244, i32 1 ; [#uses=2] - br label %bb1.i162.i - -bb.i160.i: ; preds = %bb1.i162.i - %248 = lshr i32 %259, 24 ; [#uses=1] - %249 = trunc i32 %248 to i8 ; [#uses=1] - %250 = load i8** %245, align 4 ; [#uses=1] - %251 = load i32* %246, align 8 ; [#uses=2] - %252 = getelementptr i8* %250, i32 %251 ; [#uses=1] - store i8 %249, i8* %252, align 1 - %253 = add i32 %251, 1 ; [#uses=1] - store i32 %253, i32* %246, align 8 - %254 = load i32* %247, align 4 ; [#uses=1] - %255 = add i32 %254, 1 ; [#uses=1] - store i32 %255, i32* %247, align 4 - %256 = shl i32 %bsBuff.tmp.0412, 8 ; [#uses=2] - %257 = add i32 %bsLive.tmp.0413, -8 ; [#uses=3] - br label %bb1.i162.i - -bb1.i162.i: ; preds = %bb.i160.i, %bsW.exit170.i - %bsLive.tmp.0413 = phi i32 [ %243, %bsW.exit170.i ], [ %257, %bb.i160.i ] ; [#uses=1] - %bsBuff.tmp.0412 = phi i32 [ %242, %bsW.exit170.i ], [ %256, %bb.i160.i ] ; [#uses=2] - %258 = phi i32 [ %257, %bb.i160.i ], [ %243, %bsW.exit170.i ] ; [#uses=2] - %259 = phi i32 [ %256, %bb.i160.i ], [ %242, %bsW.exit170.i ] ; [#uses=1] - %260 = phi i32 [ %257, %bb.i160.i ], [ %243, %bsW.exit170.i ] ; [#uses=1] - %261 = icmp sgt i32 %260, 7 ; [#uses=1] - br i1 %261, label %bb.i160.i, label %bsW.exit163.i - -bsW.exit163.i: ; preds = %bb1.i162.i - %262 = sub i32 24, %258 ; [#uses=1] - %263 = shl i32 65, %262 ; [#uses=1] - %264 = or i32 %263, %bsBuff.tmp.0412 ; [#uses=3] - store i32 %264, i32* @bsBuff, align 4 - %265 = add i32 %258, 8 ; [#uses=4] - store i32 %265, i32* @bsLive, align 4 - %.b.i152.i = load i1* @bsStream.b ; [#uses=1] - %266 = zext i1 %.b.i152.i to i32 ; [#uses=3] - %267 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %266, i32 3 ; [#uses=1] - %268 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %266, i32 2 ; [#uses=2] - %269 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %266, i32 1 ; [#uses=2] - br label %bb1.i155.i - -bb.i153.i: ; preds = %bb1.i155.i - %270 = lshr i32 %281, 24 ; [#uses=1] - %271 = trunc i32 %270 to i8 ; [#uses=1] - %272 = load i8** %267, align 4 ; [#uses=1] - %273 = load i32* %268, align 8 ; [#uses=2] - %274 = getelementptr i8* %272, i32 %273 ; [#uses=1] - store i8 %271, i8* %274, align 1 - %275 = add i32 %273, 1 ; [#uses=1] - store i32 %275, i32* %268, align 8 - %276 = load i32* %269, align 4 ; [#uses=1] - %277 = add i32 %276, 1 ; [#uses=1] - store i32 %277, i32* %269, align 4 - %278 = shl i32 %bsBuff.tmp.0416, 8 ; [#uses=2] - %279 = add i32 %bsLive.tmp.0417, -8 ; [#uses=3] - br label %bb1.i155.i - -bb1.i155.i: ; preds = %bb.i153.i, %bsW.exit163.i - %bsLive.tmp.0417 = phi i32 [ %265, %bsW.exit163.i ], [ %279, %bb.i153.i ] ; [#uses=1] - %bsBuff.tmp.0416 = phi i32 [ %264, %bsW.exit163.i ], [ %278, %bb.i153.i ] ; [#uses=2] - %280 = phi i32 [ %279, %bb.i153.i ], [ %265, %bsW.exit163.i ] ; [#uses=2] - %281 = phi i32 [ %278, %bb.i153.i ], [ %264, %bsW.exit163.i ] ; [#uses=1] - %282 = phi i32 [ %279, %bb.i153.i ], [ %265, %bsW.exit163.i ] ; [#uses=1] - %283 = icmp sgt i32 %282, 7 ; [#uses=1] - br i1 %283, label %bb.i153.i, label %bsW.exit156.i - -bsW.exit156.i: ; preds = %bb1.i155.i - %284 = sub i32 24, %280 ; [#uses=1] - %285 = shl i32 89, %284 ; [#uses=1] - %286 = or i32 %285, %bsBuff.tmp.0416 ; [#uses=3] - store i32 %286, i32* @bsBuff, align 4 - %287 = add i32 %280, 8 ; [#uses=4] - store i32 %287, i32* @bsLive, align 4 - %.b.i145.i = load i1* @bsStream.b ; [#uses=1] - %288 = zext i1 %.b.i145.i to i32 ; [#uses=3] - %289 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %288, i32 3 ; [#uses=1] - %290 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %288, i32 2 ; [#uses=2] - %291 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %288, i32 1 ; [#uses=2] - br label %bb1.i148.i - -bb.i146.i: ; preds = %bb1.i148.i - %292 = lshr i32 %303, 24 ; [#uses=1] - %293 = trunc i32 %292 to i8 ; [#uses=1] - %294 = load i8** %289, align 4 ; [#uses=1] - %295 = load i32* %290, align 8 ; [#uses=2] - %296 = getelementptr i8* %294, i32 %295 ; [#uses=1] - store i8 %293, i8* %296, align 1 - %297 = add i32 %295, 1 ; [#uses=1] - store i32 %297, i32* %290, align 8 - %298 = load i32* %291, align 4 ; [#uses=1] - %299 = add i32 %298, 1 ; [#uses=1] - store i32 %299, i32* %291, align 4 - %300 = shl i32 %bsBuff.tmp.0420, 8 ; [#uses=2] - %301 = add i32 %bsLive.tmp.0421, -8 ; [#uses=3] - br label %bb1.i148.i - -bb1.i148.i: ; preds = %bb.i146.i, %bsW.exit156.i - %bsLive.tmp.0421 = phi i32 [ %287, %bsW.exit156.i ], [ %301, %bb.i146.i ] ; [#uses=1] - %bsBuff.tmp.0420 = phi i32 [ %286, %bsW.exit156.i ], [ %300, %bb.i146.i ] ; [#uses=2] - %302 = phi i32 [ %301, %bb.i146.i ], [ %287, %bsW.exit156.i ] ; [#uses=2] - %303 = phi i32 [ %300, %bb.i146.i ], [ %286, %bsW.exit156.i ] ; [#uses=1] - %304 = phi i32 [ %301, %bb.i146.i ], [ %287, %bsW.exit156.i ] ; [#uses=1] - %305 = icmp sgt i32 %304, 7 ; [#uses=1] - br i1 %305, label %bb.i146.i, label %bsW.exit149.i - -bsW.exit149.i: ; preds = %bb1.i148.i - %306 = sub i32 24, %302 ; [#uses=1] - %307 = shl i32 38, %306 ; [#uses=1] - %308 = or i32 %307, %bsBuff.tmp.0420 ; [#uses=3] - store i32 %308, i32* @bsBuff, align 4 - %309 = add i32 %302, 8 ; [#uses=4] - store i32 %309, i32* @bsLive, align 4 - %.b.i138.i = load i1* @bsStream.b ; [#uses=1] - %310 = zext i1 %.b.i138.i to i32 ; [#uses=3] - %311 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %310, i32 3 ; [#uses=1] - %312 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %310, i32 2 ; [#uses=2] - %313 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %310, i32 1 ; [#uses=2] - br label %bb1.i141.i - -bb.i139.i: ; preds = %bb1.i141.i - %314 = lshr i32 %325, 24 ; [#uses=1] - %315 = trunc i32 %314 to i8 ; [#uses=1] - %316 = load i8** %311, align 4 ; [#uses=1] - %317 = load i32* %312, align 8 ; [#uses=2] - %318 = getelementptr i8* %316, i32 %317 ; [#uses=1] - store i8 %315, i8* %318, align 1 - %319 = add i32 %317, 1 ; [#uses=1] - store i32 %319, i32* %312, align 8 - %320 = load i32* %313, align 4 ; [#uses=1] - %321 = add i32 %320, 1 ; [#uses=1] - store i32 %321, i32* %313, align 4 - %322 = shl i32 %bsBuff.tmp.0424, 8 ; [#uses=2] - %323 = add i32 %bsLive.tmp.0425, -8 ; [#uses=3] - br label %bb1.i141.i - -bb1.i141.i: ; preds = %bb.i139.i, %bsW.exit149.i - %bsLive.tmp.0425 = phi i32 [ %309, %bsW.exit149.i ], [ %323, %bb.i139.i ] ; [#uses=1] - %bsBuff.tmp.0424 = phi i32 [ %308, %bsW.exit149.i ], [ %322, %bb.i139.i ] ; [#uses=2] - %324 = phi i32 [ %323, %bb.i139.i ], [ %309, %bsW.exit149.i ] ; [#uses=2] - %325 = phi i32 [ %322, %bb.i139.i ], [ %308, %bsW.exit149.i ] ; [#uses=1] - %326 = phi i32 [ %323, %bb.i139.i ], [ %309, %bsW.exit149.i ] ; [#uses=1] - %327 = icmp sgt i32 %326, 7 ; [#uses=1] - br i1 %327, label %bb.i139.i, label %bsW.exit142.i - -bsW.exit142.i: ; preds = %bb1.i141.i - %328 = sub i32 24, %324 ; [#uses=1] - %329 = shl i32 83, %328 ; [#uses=1] - %330 = or i32 %329, %bsBuff.tmp.0424 ; [#uses=3] - store i32 %330, i32* @bsBuff, align 4 - %331 = add i32 %324, 8 ; [#uses=4] - store i32 %331, i32* @bsLive, align 4 - %.b.i131.i = load i1* @bsStream.b ; [#uses=1] - %332 = zext i1 %.b.i131.i to i32 ; [#uses=3] - %333 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %332, i32 3 ; [#uses=1] - %334 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %332, i32 2 ; [#uses=2] - %335 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %332, i32 1 ; [#uses=2] - br label %bb1.i134.i - -bb.i132.i: ; preds = %bb1.i134.i - %336 = lshr i32 %347, 24 ; [#uses=1] - %337 = trunc i32 %336 to i8 ; [#uses=1] - %338 = load i8** %333, align 4 ; [#uses=1] - %339 = load i32* %334, align 8 ; [#uses=2] - %340 = getelementptr i8* %338, i32 %339 ; [#uses=1] - store i8 %337, i8* %340, align 1 - %341 = add i32 %339, 1 ; [#uses=1] - store i32 %341, i32* %334, align 8 - %342 = load i32* %335, align 4 ; [#uses=1] - %343 = add i32 %342, 1 ; [#uses=1] - store i32 %343, i32* %335, align 4 - %344 = shl i32 %bsBuff.tmp.0428, 8 ; [#uses=2] - %345 = add i32 %bsLive.tmp.0429, -8 ; [#uses=3] - br label %bb1.i134.i - -bb1.i134.i: ; preds = %bb.i132.i, %bsW.exit142.i - %bsLive.tmp.0429 = phi i32 [ %331, %bsW.exit142.i ], [ %345, %bb.i132.i ] ; [#uses=1] - %bsBuff.tmp.0428 = phi i32 [ %330, %bsW.exit142.i ], [ %344, %bb.i132.i ] ; [#uses=2] - %346 = phi i32 [ %345, %bb.i132.i ], [ %331, %bsW.exit142.i ] ; [#uses=2] - %347 = phi i32 [ %344, %bb.i132.i ], [ %330, %bsW.exit142.i ] ; [#uses=1] - %348 = phi i32 [ %345, %bb.i132.i ], [ %331, %bsW.exit142.i ] ; [#uses=1] - %349 = icmp sgt i32 %348, 7 ; [#uses=1] - br i1 %349, label %bb.i132.i, label %bsW.exit135.i - -bsW.exit135.i: ; preds = %bb1.i134.i - %350 = sub i32 24, %346 ; [#uses=1] - %351 = shl i32 89, %350 ; [#uses=1] - %352 = or i32 %351, %bsBuff.tmp.0428 ; [#uses=3] - store i32 %352, i32* @bsBuff, align 4 - %353 = add i32 %346, 8 ; [#uses=4] - store i32 %353, i32* @bsLive, align 4 - %354 = lshr i32 %not.i.i10, 24 ; [#uses=1] - %.b.i124.i = load i1* @bsStream.b ; [#uses=1] - %355 = zext i1 %.b.i124.i to i32 ; [#uses=3] - %356 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %355, i32 3 ; [#uses=1] - %357 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %355, i32 2 ; [#uses=2] - %358 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %355, i32 1 ; [#uses=2] - br label %bb1.i127.i - -bb.i125.i: ; preds = %bb1.i127.i - %359 = lshr i32 %370, 24 ; [#uses=1] - %360 = trunc i32 %359 to i8 ; [#uses=1] - %361 = load i8** %356, align 4 ; [#uses=1] - %362 = load i32* %357, align 8 ; [#uses=2] - %363 = getelementptr i8* %361, i32 %362 ; [#uses=1] - store i8 %360, i8* %363, align 1 - %364 = add i32 %362, 1 ; [#uses=1] - store i32 %364, i32* %357, align 8 - %365 = load i32* %358, align 4 ; [#uses=1] - %366 = add i32 %365, 1 ; [#uses=1] - store i32 %366, i32* %358, align 4 - %367 = shl i32 %bsBuff.tmp.0432, 8 ; [#uses=2] - %368 = add i32 %bsLive.tmp.0433, -8 ; [#uses=3] - br label %bb1.i127.i - -bb1.i127.i: ; preds = %bb.i125.i, %bsW.exit135.i - %bsLive.tmp.0433 = phi i32 [ %353, %bsW.exit135.i ], [ %368, %bb.i125.i ] ; [#uses=1] - %bsBuff.tmp.0432 = phi i32 [ %352, %bsW.exit135.i ], [ %367, %bb.i125.i ] ; [#uses=2] - %369 = phi i32 [ %368, %bb.i125.i ], [ %353, %bsW.exit135.i ] ; [#uses=2] - %370 = phi i32 [ %367, %bb.i125.i ], [ %352, %bsW.exit135.i ] ; [#uses=1] - %371 = phi i32 [ %368, %bb.i125.i ], [ %353, %bsW.exit135.i ] ; [#uses=1] - %372 = icmp sgt i32 %371, 7 ; [#uses=1] - br i1 %372, label %bb.i125.i, label %bsW.exit128.i - -bsW.exit128.i: ; preds = %bb1.i127.i - %373 = sub i32 24, %369 ; [#uses=1] - %374 = shl i32 %354, %373 ; [#uses=1] - %375 = or i32 %374, %bsBuff.tmp.0432 ; [#uses=3] - store i32 %375, i32* @bsBuff, align 4 - %376 = add i32 %369, 8 ; [#uses=4] - store i32 %376, i32* @bsLive, align 4 - %377 = lshr i32 %not.i.i10, 16 ; [#uses=1] - %378 = and i32 %377, 255 ; [#uses=1] - %.b.i117.i = load i1* @bsStream.b ; [#uses=1] - %379 = zext i1 %.b.i117.i to i32 ; [#uses=3] - %380 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %379, i32 3 ; [#uses=1] - %381 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %379, i32 2 ; [#uses=2] - %382 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %379, i32 1 ; [#uses=2] - br label %bb1.i120.i - -bb.i118.i: ; preds = %bb1.i120.i - %383 = lshr i32 %394, 24 ; [#uses=1] - %384 = trunc i32 %383 to i8 ; [#uses=1] - %385 = load i8** %380, align 4 ; [#uses=1] - %386 = load i32* %381, align 8 ; [#uses=2] - %387 = getelementptr i8* %385, i32 %386 ; [#uses=1] - store i8 %384, i8* %387, align 1 - %388 = add i32 %386, 1 ; [#uses=1] - store i32 %388, i32* %381, align 8 - %389 = load i32* %382, align 4 ; [#uses=1] - %390 = add i32 %389, 1 ; [#uses=1] - store i32 %390, i32* %382, align 4 - %391 = shl i32 %bsBuff.tmp.0436, 8 ; [#uses=2] - %392 = add i32 %bsLive.tmp.0437, -8 ; [#uses=3] - br label %bb1.i120.i - -bb1.i120.i: ; preds = %bb.i118.i, %bsW.exit128.i - %bsLive.tmp.0437 = phi i32 [ %376, %bsW.exit128.i ], [ %392, %bb.i118.i ] ; [#uses=1] - %bsBuff.tmp.0436 = phi i32 [ %375, %bsW.exit128.i ], [ %391, %bb.i118.i ] ; [#uses=2] - %393 = phi i32 [ %392, %bb.i118.i ], [ %376, %bsW.exit128.i ] ; [#uses=2] - %394 = phi i32 [ %391, %bb.i118.i ], [ %375, %bsW.exit128.i ] ; [#uses=1] - %395 = phi i32 [ %392, %bb.i118.i ], [ %376, %bsW.exit128.i ] ; [#uses=1] - %396 = icmp sgt i32 %395, 7 ; [#uses=1] - br i1 %396, label %bb.i118.i, label %bsW.exit121.i - -bsW.exit121.i: ; preds = %bb1.i120.i - %397 = sub i32 24, %393 ; [#uses=1] - %398 = shl i32 %378, %397 ; [#uses=1] - %399 = or i32 %398, %bsBuff.tmp.0436 ; [#uses=3] - store i32 %399, i32* @bsBuff, align 4 - %400 = add i32 %393, 8 ; [#uses=4] - store i32 %400, i32* @bsLive, align 4 - %401 = lshr i32 %not.i.i10, 8 ; [#uses=1] - %402 = and i32 %401, 255 ; [#uses=1] - %.b.i110.i = load i1* @bsStream.b ; [#uses=1] - %403 = zext i1 %.b.i110.i to i32 ; [#uses=3] - %404 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %403, i32 3 ; [#uses=1] - %405 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %403, i32 2 ; [#uses=2] - %406 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %403, i32 1 ; [#uses=2] - br label %bb1.i113.i - -bb.i111.i: ; preds = %bb1.i113.i - %407 = lshr i32 %418, 24 ; [#uses=1] - %408 = trunc i32 %407 to i8 ; [#uses=1] - %409 = load i8** %404, align 4 ; [#uses=1] - %410 = load i32* %405, align 8 ; [#uses=2] - %411 = getelementptr i8* %409, i32 %410 ; [#uses=1] - store i8 %408, i8* %411, align 1 - %412 = add i32 %410, 1 ; [#uses=1] - store i32 %412, i32* %405, align 8 - %413 = load i32* %406, align 4 ; [#uses=1] - %414 = add i32 %413, 1 ; [#uses=1] - store i32 %414, i32* %406, align 4 - %415 = shl i32 %bsBuff.tmp.0440, 8 ; [#uses=2] - %416 = add i32 %bsLive.tmp.0441, -8 ; [#uses=3] - br label %bb1.i113.i - -bb1.i113.i: ; preds = %bb.i111.i, %bsW.exit121.i - %bsLive.tmp.0441 = phi i32 [ %400, %bsW.exit121.i ], [ %416, %bb.i111.i ] ; [#uses=1] - %bsBuff.tmp.0440 = phi i32 [ %399, %bsW.exit121.i ], [ %415, %bb.i111.i ] ; [#uses=2] - %417 = phi i32 [ %416, %bb.i111.i ], [ %400, %bsW.exit121.i ] ; [#uses=2] - %418 = phi i32 [ %415, %bb.i111.i ], [ %399, %bsW.exit121.i ] ; [#uses=1] - %419 = phi i32 [ %416, %bb.i111.i ], [ %400, %bsW.exit121.i ] ; [#uses=1] - %420 = icmp sgt i32 %419, 7 ; [#uses=1] - br i1 %420, label %bb.i111.i, label %bsW.exit114.i - -bsW.exit114.i: ; preds = %bb1.i113.i - %421 = sub i32 24, %417 ; [#uses=1] - %422 = shl i32 %402, %421 ; [#uses=1] - %423 = or i32 %422, %bsBuff.tmp.0440 ; [#uses=3] - store i32 %423, i32* @bsBuff, align 4 - %424 = add i32 %417, 8 ; [#uses=4] - store i32 %424, i32* @bsLive, align 4 - %425 = and i32 %not.i.i10, 255 ; [#uses=1] - %.b.i103.i = load i1* @bsStream.b ; [#uses=1] - %426 = zext i1 %.b.i103.i to i32 ; [#uses=3] - %427 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %426, i32 3 ; [#uses=1] - %428 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %426, i32 2 ; [#uses=2] - %429 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %426, i32 1 ; [#uses=2] - br label %bb1.i106.i - -bb.i104.i: ; preds = %bb1.i106.i - %430 = lshr i32 %441, 24 ; [#uses=1] - %431 = trunc i32 %430 to i8 ; [#uses=1] - %432 = load i8** %427, align 4 ; [#uses=1] - %433 = load i32* %428, align 8 ; [#uses=2] - %434 = getelementptr i8* %432, i32 %433 ; [#uses=1] - store i8 %431, i8* %434, align 1 - %435 = add i32 %433, 1 ; [#uses=1] - store i32 %435, i32* %428, align 8 - %436 = load i32* %429, align 4 ; [#uses=1] - %437 = add i32 %436, 1 ; [#uses=1] - store i32 %437, i32* %429, align 4 - %438 = shl i32 %bsBuff.tmp.0444, 8 ; [#uses=2] - %439 = add i32 %bsLive.tmp.0445, -8 ; [#uses=3] - br label %bb1.i106.i - -bb1.i106.i: ; preds = %bb.i104.i, %bsW.exit114.i - %bsLive.tmp.0445 = phi i32 [ %424, %bsW.exit114.i ], [ %439, %bb.i104.i ] ; [#uses=1] - %bsBuff.tmp.0444 = phi i32 [ %423, %bsW.exit114.i ], [ %438, %bb.i104.i ] ; [#uses=2] - %440 = phi i32 [ %439, %bb.i104.i ], [ %424, %bsW.exit114.i ] ; [#uses=2] - %441 = phi i32 [ %438, %bb.i104.i ], [ %423, %bsW.exit114.i ] ; [#uses=1] - %442 = phi i32 [ %439, %bb.i104.i ], [ %424, %bsW.exit114.i ] ; [#uses=1] - %443 = icmp sgt i32 %442, 7 ; [#uses=1] - br i1 %443, label %bb.i104.i, label %bsW.exit107.i - -bsW.exit107.i: ; preds = %bb1.i106.i - %444 = sub i32 24, %440 ; [#uses=1] - %445 = shl i32 %425, %444 ; [#uses=1] - %446 = or i32 %445, %bsBuff.tmp.0444 ; [#uses=5] - store i32 %446, i32* @bsBuff, align 4 - %447 = add i32 %440, 8 ; [#uses=7] - store i32 %447, i32* @bsLive, align 4 - %448 = icmp eq i8 %blockRandomised.0, 0 ; [#uses=1] - %.b.i89.i = load i1* @bsStream.b ; [#uses=1] - %449 = zext i1 %.b.i89.i to i32 ; [#uses=3] - %450 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %449, i32 3 ; [#uses=2] - %451 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %449, i32 2 ; [#uses=4] - %452 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %449, i32 1 ; [#uses=4] - br i1 %448, label %bb1.i92.i, label %bb1.i99.i - -bb.i97.i: ; preds = %bb1.i99.i - %453 = lshr i32 %464, 24 ; [#uses=1] - %454 = trunc i32 %453 to i8 ; [#uses=1] - %455 = load i8** %450, align 4 ; [#uses=1] - %456 = load i32* %451, align 8 ; [#uses=2] - %457 = getelementptr i8* %455, i32 %456 ; [#uses=1] - store i8 %454, i8* %457, align 1 - %458 = add i32 %456, 1 ; [#uses=1] - store i32 %458, i32* %451, align 8 - %459 = load i32* %452, align 4 ; [#uses=1] - %460 = add i32 %459, 1 ; [#uses=1] - store i32 %460, i32* %452, align 4 - %461 = shl i32 %bsBuff.tmp.0448, 8 ; [#uses=2] - %462 = add i32 %bsLive.tmp.0449, -8 ; [#uses=3] - br label %bb1.i99.i - -bb1.i99.i: ; preds = %bb.i97.i, %bsW.exit107.i - %bsLive.tmp.0449 = phi i32 [ %462, %bb.i97.i ], [ %447, %bsW.exit107.i ] ; [#uses=1] - %bsBuff.tmp.0448 = phi i32 [ %461, %bb.i97.i ], [ %446, %bsW.exit107.i ] ; [#uses=2] - %463 = phi i32 [ %462, %bb.i97.i ], [ %447, %bsW.exit107.i ] ; [#uses=2] - %464 = phi i32 [ %461, %bb.i97.i ], [ %446, %bsW.exit107.i ] ; [#uses=1] - %465 = phi i32 [ %462, %bb.i97.i ], [ %447, %bsW.exit107.i ] ; [#uses=1] - %466 = icmp sgt i32 %465, 7 ; [#uses=1] - br i1 %466, label %bb.i97.i, label %bsW.exit100.i - -bsW.exit100.i: ; preds = %bb1.i99.i - %467 = sub i32 31, %463 ; [#uses=1] - %468 = shl i32 1, %467 ; [#uses=1] - %469 = or i32 %468, %bsBuff.tmp.0448 ; [#uses=2] - store i32 %469, i32* @bsBuff, align 4 - %470 = add i32 %463, 1 ; [#uses=2] - store i32 %470, i32* @bsLive, align 4 - br label %bb7.i18 - -bb.i90.i: ; preds = %bb1.i92.i - %471 = lshr i32 %482, 24 ; [#uses=1] - %472 = trunc i32 %471 to i8 ; [#uses=1] - %473 = load i8** %450, align 4 ; [#uses=1] - %474 = load i32* %451, align 8 ; [#uses=2] - %475 = getelementptr i8* %473, i32 %474 ; [#uses=1] - store i8 %472, i8* %475, align 1 - %476 = add i32 %474, 1 ; [#uses=1] - store i32 %476, i32* %451, align 8 - %477 = load i32* %452, align 4 ; [#uses=1] - %478 = add i32 %477, 1 ; [#uses=1] - store i32 %478, i32* %452, align 4 - %479 = shl i32 %bsBuff.tmp.0404, 8 ; [#uses=2] - %480 = add i32 %bsLive.tmp.0405, -8 ; [#uses=3] - br label %bb1.i92.i - -bb1.i92.i: ; preds = %bb.i90.i, %bsW.exit107.i - %bsLive.tmp.0405 = phi i32 [ %480, %bb.i90.i ], [ %447, %bsW.exit107.i ] ; [#uses=1] - %bsBuff.tmp.0404 = phi i32 [ %479, %bb.i90.i ], [ %446, %bsW.exit107.i ] ; [#uses=3] - %481 = phi i32 [ %480, %bb.i90.i ], [ %447, %bsW.exit107.i ] ; [#uses=1] - %482 = phi i32 [ %479, %bb.i90.i ], [ %446, %bsW.exit107.i ] ; [#uses=1] - %483 = phi i32 [ %480, %bb.i90.i ], [ %447, %bsW.exit107.i ] ; [#uses=1] - %484 = icmp sgt i32 %483, 7 ; [#uses=1] - br i1 %484, label %bb.i90.i, label %bsW.exit93.i - -bsW.exit93.i: ; preds = %bb1.i92.i - store i32 %bsBuff.tmp.0404, i32* @bsBuff - %485 = add i32 %481, 1 ; [#uses=2] - store i32 %485, i32* @bsLive, align 4 - br label %bb7.i18 - -bb7.i18: ; preds = %bsW.exit93.i, %bsW.exit100.i - %.pre.i81.i = phi i32 [ %bsBuff.tmp.0404, %bsW.exit93.i ], [ %469, %bsW.exit100.i ] ; [#uses=2] - %.pr.i80.i = phi i32 [ %485, %bsW.exit93.i ], [ %470, %bsW.exit100.i ] ; [#uses=3] - %.b.i82.i = load i1* @bsStream.b ; [#uses=1] - %486 = zext i1 %.b.i82.i to i32 ; [#uses=3] - %487 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %486, i32 3 ; [#uses=1] - %488 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %486, i32 2 ; [#uses=2] - %489 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %486, i32 1 ; [#uses=2] - br label %bb1.i85.i - -bb.i83.i: ; preds = %bb1.i85.i - %490 = lshr i32 %501, 24 ; [#uses=1] - %491 = trunc i32 %490 to i8 ; [#uses=1] - %492 = load i8** %487, align 4 ; [#uses=1] - %493 = load i32* %488, align 8 ; [#uses=2] - %494 = getelementptr i8* %492, i32 %493 ; [#uses=1] - store i8 %491, i8* %494, align 1 - %495 = add i32 %493, 1 ; [#uses=1] - store i32 %495, i32* %488, align 8 - %496 = load i32* %489, align 4 ; [#uses=1] - %497 = add i32 %496, 1 ; [#uses=1] - store i32 %497, i32* %489, align 4 - %498 = shl i32 %bsBuff.tmp.0452, 8 ; [#uses=2] - %499 = add i32 %bsLive.tmp.0453, -8 ; [#uses=3] - br label %bb1.i85.i - -bb1.i85.i: ; preds = %bb.i83.i, %bb7.i18 - %bsLive.tmp.0453 = phi i32 [ %.pr.i80.i, %bb7.i18 ], [ %499, %bb.i83.i ] ; [#uses=1] - %bsBuff.tmp.0452 = phi i32 [ %.pre.i81.i, %bb7.i18 ], [ %498, %bb.i83.i ] ; [#uses=2] - %500 = phi i32 [ %499, %bb.i83.i ], [ %.pr.i80.i, %bb7.i18 ] ; [#uses=2] - %501 = phi i32 [ %498, %bb.i83.i ], [ %.pre.i81.i, %bb7.i18 ] ; [#uses=1] - %502 = phi i32 [ %499, %bb.i83.i ], [ %.pr.i80.i, %bb7.i18 ] ; [#uses=1] - %503 = icmp sgt i32 %502, 7 ; [#uses=1] - br i1 %503, label %bb.i83.i, label %bsW.exit86.i - -bsW.exit86.i: ; preds = %bb1.i85.i - %504 = sub i32 8, %500 ; [#uses=1] - %505 = shl i32 %219, %504 ; [#uses=1] - %506 = or i32 %505, %bsBuff.tmp.0452 ; [#uses=1] - store i32 %506, i32* @bsBuff, align 4 - %507 = add i32 %500, 24 ; [#uses=1] - store i32 %507, i32* @bsLive, align 4 - tail call fastcc void @generateMTFValues() nounwind ssp - %508 = load i32* @nInUse, align 4 ; [#uses=4] - %509 = add i32 %508, 2 ; [#uses=20] - %510 = icmp sgt i32 %509, 0 ; [#uses=6] - br i1 %510, label %bb4.i.i19, label %bb8.i.i20 - -bb4.i.i19: ; preds = %bb4.i.i19, %bsW.exit86.i - %v.0107.i.i = phi i32 [ %511, %bb4.i.i19 ], [ 0, %bsW.exit86.i ] ; [#uses=2] - %scevgep268.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 0, i32 %v.0107.i.i ; [#uses=1] - store i8 15, i8* %scevgep268.i.i, align 1 - %511 = add i32 %v.0107.i.i, 1 ; [#uses=2] - %exitcond267.i.i = icmp eq i32 %511, %509 ; [#uses=1] - br i1 %exitcond267.i.i, label %bb4.1.i.i, label %bb4.i.i19 - -bb8.i.i20: ; preds = %bb4.5.i.i, %bsW.exit86.i - %512 = load i32* @nMTF, align 4 ; [#uses=8] - %513 = icmp sgt i32 %512, 0 ; [#uses=1] - br i1 %513, label %bb10.i.i21, label %bb9.i.i - -bb9.i.i: ; preds = %bb8.i.i20 - call fastcc void @panic(i8* getelementptr ([17 x i8]* @"\01LC35", i32 0, i32 0)) nounwind ssp - unreachable - -bb10.i.i21: ; preds = %bb8.i.i20 - %514 = icmp sgt i32 %512, 199 ; [#uses=1] - br i1 %514, label %bb12.i.i22, label %bb.nph106.i.i - -bb12.i.i22: ; preds = %bb10.i.i21 - %515 = icmp sgt i32 %512, 799 ; [#uses=1] - br i1 %515, label %bb.nph106.i.i, label %bb15.i.i24 - -bb15.i.i24: ; preds = %bb12.i.i22 - br label %bb.nph106.i.i - -bb.nph106.i.i: ; preds = %bb15.i.i24, %bb12.i.i22, %bb10.i.i21 - %nGroups.0.i.i.reg2mem.0 = phi i32 [ 4, %bb15.i.i24 ], [ 2, %bb10.i.i21 ], [ 6, %bb12.i.i22 ] ; [#uses=9] - %516 = add i32 %508, 1 ; [#uses=2] - %tmp254.i.i = mul i32 %nGroups.0.i.i.reg2mem.0, 258 ; [#uses=1] - %tmp255.i.i = add i32 %tmp254.i.i, -258 ; [#uses=1] - %tmp258.i.i = sub i32 0, %nGroups.0.i.i.reg2mem.0 ; [#uses=2] - %tmp259.i.i = icmp sgt i32 %tmp258.i.i, -1 ; [#uses=1] - %smax260.i.i = select i1 %tmp259.i.i, i32 %tmp258.i.i, i32 -1 ; [#uses=1] - %tmp261.i.i = add i32 %nGroups.0.i.i.reg2mem.0, %smax260.i.i ; [#uses=1] - %tmp262.i.i = add i32 %tmp261.i.i, 1 ; [#uses=1] - br label %bb16.i.i - -bb16.i.i: ; preds = %bb37.i.i32, %bb.nph106.i.i - %indvar251.i.i = phi i32 [ 0, %bb.nph106.i.i ], [ %indvar.next252.i.i, %bb37.i.i32 ] ; [#uses=5] - %gs.0105.i.i = phi i32 [ 0, %bb.nph106.i.i ], [ %540, %bb37.i.i32 ] ; [#uses=4] - %remF.0104.i.i = phi i32 [ %512, %bb.nph106.i.i ], [ %541, %bb37.i.i32 ] ; [#uses=2] - %tmp253.i.i = sub i32 0, %indvar251.i.i ; [#uses=1] - %nPart.0103.i.i = sub i32 %nGroups.0.i.i.reg2mem.0, %indvar251.i.i ; [#uses=2] - %517 = sdiv i32 %remF.0104.i.i, %nPart.0103.i.i ; [#uses=2] - %518 = add i32 %gs.0105.i.i, -1 ; [#uses=2] - %519 = icmp sgt i32 %517, 0 ; [#uses=1] - %520 = icmp sgt i32 %516, %518 ; [#uses=1] - %or.cond197.i.i = and i1 %519, %520 ; [#uses=1] - br i1 %or.cond197.i.i, label %bb17.i.i25, label %bb20.i.i27 - -bb17.i.i25: ; preds = %bb17.i.i25, %bb16.i.i - %indvar245.i.i = phi i32 [ %indvar.next246.i.i, %bb17.i.i25 ], [ 0, %bb16.i.i ] ; [#uses=2] - %aFreq.096.i.i = phi i32 [ %522, %bb17.i.i25 ], [ 0, %bb16.i.i ] ; [#uses=1] - %tmp247.i.i = add i32 %indvar245.i.i, %gs.0105.i.i ; [#uses=3] - %scevgep248.i.i = getelementptr [258 x i32]* @mtfFreq, i32 0, i32 %tmp247.i.i ; [#uses=1] - %521 = load i32* %scevgep248.i.i, align 4 ; [#uses=1] - %522 = add i32 %521, %aFreq.096.i.i ; [#uses=3] - %523 = icmp slt i32 %522, %517 ; [#uses=1] - %524 = icmp sgt i32 %516, %tmp247.i.i ; [#uses=1] - %or.cond1.i.i = and i1 %523, %524 ; [#uses=1] - %indvar.next246.i.i = add i32 %indvar245.i.i, 1 ; [#uses=1] - br i1 %or.cond1.i.i, label %bb17.i.i25, label %bb20.i.i27 - -bb20.i.i27: ; preds = %bb17.i.i25, %bb16.i.i - %aFreq.0.lcssa.i.i = phi i32 [ 0, %bb16.i.i ], [ %522, %bb17.i.i25 ] ; [#uses=3] - %ge.0.lcssa.i.i = phi i32 [ %518, %bb16.i.i ], [ %tmp247.i.i, %bb17.i.i25 ] ; [#uses=5] - %525 = icmp sgt i32 %ge.0.lcssa.i.i, %gs.0105.i.i ; [#uses=1] - %526 = icmp ne i32 %indvar251.i.i, 0 ; [#uses=1] - %527 = and i1 %525, %526 ; [#uses=1] - %.not.i.i = xor i1 %527, true ; [#uses=1] - %528 = icmp eq i32 %nPart.0103.i.i, 1 ; [#uses=1] - %or.cond.i.i26 = or i1 %528, %.not.i.i ; [#uses=1] - br i1 %or.cond.i.i26, label %bb26.i.i30, label %bb24.i.i28 - -bb24.i.i28: ; preds = %bb20.i.i27 - %529 = srem i32 %indvar251.i.i, 2 ; [#uses=1] - %530 = icmp eq i32 %529, 1 ; [#uses=1] - br i1 %530, label %bb25.i.i29, label %bb26.i.i30 - -bb25.i.i29: ; preds = %bb24.i.i28 - %531 = getelementptr [258 x i32]* @mtfFreq, i32 0, i32 %ge.0.lcssa.i.i ; [#uses=1] - %532 = load i32* %531, align 4 ; [#uses=1] - %533 = sub i32 %aFreq.0.lcssa.i.i, %532 ; [#uses=1] - %534 = add i32 %ge.0.lcssa.i.i, -1 ; [#uses=1] - br label %bb26.i.i30 - -bb26.i.i30: ; preds = %bb25.i.i29, %bb24.i.i28, %bb20.i.i27 - %ge.1.i.i = phi i32 [ %534, %bb25.i.i29 ], [ %ge.0.lcssa.i.i, %bb20.i.i27 ], [ %ge.0.lcssa.i.i, %bb24.i.i28 ] ; [#uses=2] - %aFreq.1.i.i = phi i32 [ %533, %bb25.i.i29 ], [ %aFreq.0.lcssa.i.i, %bb20.i.i27 ], [ %aFreq.0.lcssa.i.i, %bb24.i.i28 ] ; [#uses=1] - br i1 %510, label %bb29.i.i31, label %bb37.i.i32 - -bb29.i.i31: ; preds = %bb29.i.i31, %bb26.i.i30 - %535 = phi i32 [ %539, %bb29.i.i31 ], [ 0, %bb26.i.i30 ] ; [#uses=4] - %tmp256.i.i = add i32 %535, %tmp255.i.i ; [#uses=1] - %scevgep257.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %tmp253.i.i, i32 %tmp256.i.i ; [#uses=1] - %536 = icmp sge i32 %535, %gs.0105.i.i ; [#uses=1] - %537 = icmp sle i32 %535, %ge.1.i.i ; [#uses=1] - %538 = and i1 %536, %537 ; [#uses=1] - %storemerge.i.i = select i1 %538, i8 0, i8 15 ; [#uses=1] - store i8 %storemerge.i.i, i8* %scevgep257.i.i - %539 = add i32 %535, 1 ; [#uses=2] - %exitcond250.i.i = icmp eq i32 %539, %509 ; [#uses=1] - br i1 %exitcond250.i.i, label %bb37.i.i32, label %bb29.i.i31 - -bb37.i.i32: ; preds = %bb29.i.i31, %bb26.i.i30 - %540 = add i32 %ge.1.i.i, 1 ; [#uses=1] - %541 = sub i32 %remF.0104.i.i, %aFreq.1.i.i ; [#uses=1] - %indvar.next252.i.i = add i32 %indvar251.i.i, 1 ; [#uses=2] - %exitcond263.i.i = icmp eq i32 %indvar.next252.i.i, %tmp262.i.i ; [#uses=1] - br i1 %exitcond263.i.i, label %bb85.loopexit.i.i, label %bb16.i.i - -bb41.i.i33: ; preds = %bb41.i.i33.preheader, %bb41.i.i33 - %t.147.i.i = phi i32 [ %542, %bb41.i.i33 ], [ 0, %bb41.i.i33.preheader ] ; [#uses=2] - %scevgep183.i.i = getelementptr [6 x i32]* %fave.i.i, i32 0, i32 %t.147.i.i ; [#uses=1] - store i32 0, i32* %scevgep183.i.i, align 4 - %542 = add i32 %t.147.i.i, 1 ; [#uses=2] - %exitcond182.i.i = icmp eq i32 %542, %smax181.i.i ; [#uses=1] - br i1 %exitcond182.i.i, label %bb48.preheader.i.i, label %bb41.i.i33 - -bb48.preheader.i.i: ; preds = %bb41.i.i33 - br i1 %724, label %bb50.preheader.i.i, label %bb45.i.i - -bb45.i.i: ; preds = %bb47.i.i34, %bb45.i.i, %bb48.preheader.i.i - %.ph = phi i32 [ %544, %bb47.i.i34 ], [ 0, %bb48.preheader.i.i ], [ %.ph, %bb45.i.i ] ; [#uses=3] - %v.249.i.i = phi i32 [ %543, %bb45.i.i ], [ 0, %bb48.preheader.i.i ], [ 0, %bb47.i.i34 ] ; [#uses=2] - %scevgep186.i.i = getelementptr [6 x [258 x i32]]* @rfreq, i32 0, i32 %.ph, i32 %v.249.i.i ; [#uses=1] - store i32 0, i32* %scevgep186.i.i, align 4 - %543 = add i32 %v.249.i.i, 1 ; [#uses=2] - %exitcond185.i.i = icmp eq i32 %543, %509 ; [#uses=1] - br i1 %exitcond185.i.i, label %bb47.i.i34, label %bb45.i.i - -bb47.i.i34: ; preds = %bb45.i.i - %544 = add i32 %.ph, 1 ; [#uses=2] - %exitcond189.i.i = icmp eq i32 %544, %smax181.i.i ; [#uses=1] - br i1 %exitcond189.i.i, label %bb50.preheader.i.i, label %bb45.i.i - -bb50.preheader.i.i: ; preds = %bb47.i.i34, %bb48.preheader.i.i - br i1 %723, label %bb54.i.i.preheader, label %bb82.i.i - -bb54.i.i.preheader: ; preds = %bb75.i.i, %bb50.preheader.i.i - %gs.183.i.i = phi i32 [ %598, %bb75.i.i ], [ 0, %bb50.preheader.i.i ] ; [#uses=8] - %nSelectors.182.i.i = phi i32 [ %tmp231.i.i, %bb75.i.i ], [ 0, %bb50.preheader.i.i ] ; [#uses=2] - %scevgep230.i.i = getelementptr [18002 x i8]* @selector, i32 0, i32 %nSelectors.182.i.i ; [#uses=1] - %tmp231.i.i = add i32 %nSelectors.182.i.i, 1 ; [#uses=2] - %545 = add i32 %gs.183.i.i, 49 ; [#uses=2] - %546 = icmp slt i32 %545, %512 ; [#uses=1] - %..i.i = select i1 %546, i32 %545, i32 %726 ; [#uses=5] - br label %bb54.i.i - -bb54.i.i: ; preds = %bb54.i.i, %bb54.i.i.preheader - %t.357.i.i = phi i32 [ %547, %bb54.i.i ], [ 0, %bb54.i.i.preheader ] ; [#uses=2] - %scevgep205.i.i = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 %t.357.i.i ; [#uses=1] - store i16 0, i16* %scevgep205.i.i, align 2 - %547 = add i32 %t.357.i.i, 1 ; [#uses=2] - %exitcond204.i.i = icmp eq i32 %547, %smax181.i.i ; [#uses=1] - br i1 %exitcond204.i.i, label %bb56.i.i, label %bb54.i.i - -bb56.i.i: ; preds = %bb54.i.i - %548 = icmp sgt i32 %gs.183.i.i, %..i.i ; [#uses=3] - br i1 %722, label %bb59.preheader.i.i, label %bb66.preheader.i.i - -bb66.preheader.i.i: ; preds = %bb56.i.i - br i1 %548, label %bb68.i.i37, label %bb.nph56.split.i.i - -bb59.preheader.i.i: ; preds = %bb56.i.i - br i1 %548, label %bb60.i.i, label %bb.nph66.i.i - -bb.nph66.i.i: ; preds = %bb59.preheader.i.i - %tmp216.i.i = add i32 %gs.183.i.i, 1 ; [#uses=1] - br label %bb58.i.i - -bb58.i.i: ; preds = %bb58.i.i, %bb.nph66.i.i - %indvar212.i.i = phi i32 [ 0, %bb.nph66.i.i ], [ %indvar.next213.i.i, %bb58.i.i ] ; [#uses=3] - %cost5.064.i.i = phi i16 [ 0, %bb.nph66.i.i ], [ %574, %bb58.i.i ] ; [#uses=1] - %cost4.063.i.i = phi i16 [ 0, %bb.nph66.i.i ], [ %570, %bb58.i.i ] ; [#uses=1] - %cost3.062.i.i = phi i16 [ 0, %bb.nph66.i.i ], [ %566, %bb58.i.i ] ; [#uses=1] - %cost2.061.i.i = phi i16 [ 0, %bb.nph66.i.i ], [ %562, %bb58.i.i ] ; [#uses=1] - %cost1.060.i.i = phi i16 [ 0, %bb.nph66.i.i ], [ %558, %bb58.i.i ] ; [#uses=1] - %cost0.059.i.i = phi i16 [ 0, %bb.nph66.i.i ], [ %554, %bb58.i.i ] ; [#uses=1] - %tmp214.i.i = add i32 %indvar212.i.i, %gs.183.i.i ; [#uses=1] - %scevgep215.i.i = getelementptr i16* %727, i32 %tmp214.i.i ; [#uses=1] - %549 = load i16* %scevgep215.i.i, align 2 ; [#uses=1] - %550 = zext i16 %549 to i32 ; [#uses=6] - %551 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 0, i32 %550 ; [#uses=1] - %552 = load i8* %551, align 1 ; [#uses=1] - %553 = zext i8 %552 to i16 ; [#uses=1] - %554 = add i16 %553, %cost0.059.i.i ; [#uses=2] - %555 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 1, i32 %550 ; [#uses=1] - %556 = load i8* %555, align 1 ; [#uses=1] - %557 = zext i8 %556 to i16 ; [#uses=1] - %558 = add i16 %557, %cost1.060.i.i ; [#uses=2] - %559 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 2, i32 %550 ; [#uses=1] - %560 = load i8* %559, align 1 ; [#uses=1] - %561 = zext i8 %560 to i16 ; [#uses=1] - %562 = add i16 %561, %cost2.061.i.i ; [#uses=2] - %563 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 3, i32 %550 ; [#uses=1] - %564 = load i8* %563, align 1 ; [#uses=1] - %565 = zext i8 %564 to i16 ; [#uses=1] - %566 = add i16 %565, %cost3.062.i.i ; [#uses=2] - %567 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 4, i32 %550 ; [#uses=1] - %568 = load i8* %567, align 1 ; [#uses=1] - %569 = zext i8 %568 to i16 ; [#uses=1] - %570 = add i16 %569, %cost4.063.i.i ; [#uses=2] - %571 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 5, i32 %550 ; [#uses=1] - %572 = load i8* %571, align 1 ; [#uses=1] - %573 = zext i8 %572 to i16 ; [#uses=1] - %574 = add i16 %573, %cost5.064.i.i ; [#uses=2] - %tmp217.i.i = add i32 %indvar212.i.i, %tmp216.i.i ; [#uses=1] - %575 = icmp sgt i32 %tmp217.i.i, %..i.i ; [#uses=1] - %indvar.next213.i.i = add i32 %indvar212.i.i, 1 ; [#uses=1] - br i1 %575, label %bb60.i.i, label %bb58.i.i - -bb60.i.i: ; preds = %bb58.i.i, %bb59.preheader.i.i - %cost5.0.lcssa.i.i = phi i16 [ 0, %bb59.preheader.i.i ], [ %574, %bb58.i.i ] ; [#uses=1] - %cost4.0.lcssa.i.i = phi i16 [ 0, %bb59.preheader.i.i ], [ %570, %bb58.i.i ] ; [#uses=1] - %cost3.0.lcssa.i.i = phi i16 [ 0, %bb59.preheader.i.i ], [ %566, %bb58.i.i ] ; [#uses=1] - %cost2.0.lcssa.i.i = phi i16 [ 0, %bb59.preheader.i.i ], [ %562, %bb58.i.i ] ; [#uses=1] - %cost1.0.lcssa.i.i = phi i16 [ 0, %bb59.preheader.i.i ], [ %558, %bb58.i.i ] ; [#uses=1] - %cost0.0.lcssa.i.i = phi i16 [ 0, %bb59.preheader.i.i ], [ %554, %bb58.i.i ] ; [#uses=1] - store i16 %cost0.0.lcssa.i.i, i16* %87, align 2 - store i16 %cost1.0.lcssa.i.i, i16* %88, align 2 - store i16 %cost2.0.lcssa.i.i, i16* %89, align 2 - store i16 %cost3.0.lcssa.i.i, i16* %90, align 2 - store i16 %cost4.0.lcssa.i.i, i16* %91, align 2 - store i16 %cost5.0.lcssa.i.i, i16* %92, align 2 - br label %bb68.i.i37 - -bb.nph56.split.i.i: ; preds = %bb66.preheader.i.i - %tmp200.i.i = add i32 %gs.183.i.i, 1 ; [#uses=1] - br label %bb62.i.i - -bb62.i.i: ; preds = %bb65.i.i36, %bb.nph56.split.i.i - %indvar196.i.i = phi i32 [ 0, %bb.nph56.split.i.i ], [ %indvar.next197.i.i, %bb65.i.i36 ] ; [#uses=3] - %tmp201.i.i = add i32 %indvar196.i.i, %tmp200.i.i ; [#uses=1] - %tmp198.i.i = add i32 %indvar196.i.i, %gs.183.i.i ; [#uses=1] - %scevgep199.i.i = getelementptr i16* %727, i32 %tmp198.i.i ; [#uses=1] - %576 = load i16* %scevgep199.i.i, align 2 ; [#uses=1] - %tmp194.i.i = zext i16 %576 to i32 ; [#uses=1] - br label %bb63.i.i - -bb63.i.i: ; preds = %bb63.i.i, %bb62.i.i - %t.453.i.i = phi i32 [ 0, %bb62.i.i ], [ %581, %bb63.i.i ] ; [#uses=3] - %scevgep193.i.i = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 %t.453.i.i ; [#uses=2] - %scevgep195.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %t.453.i.i, i32 %tmp194.i.i ; [#uses=1] - %577 = load i16* %scevgep193.i.i, align 2 ; [#uses=1] - %578 = load i8* %scevgep195.i.i, align 1 ; [#uses=1] - %579 = zext i8 %578 to i16 ; [#uses=1] - %580 = add i16 %579, %577 ; [#uses=1] - store i16 %580, i16* %scevgep193.i.i, align 2 - %581 = add i32 %t.453.i.i, 1 ; [#uses=2] - %exitcond192.i.i = icmp eq i32 %581, %smax181.i.i ; [#uses=1] - br i1 %exitcond192.i.i, label %bb65.i.i36, label %bb63.i.i - -bb65.i.i36: ; preds = %bb63.i.i - %582 = icmp sgt i32 %tmp201.i.i, %..i.i ; [#uses=1] - %indvar.next197.i.i = add i32 %indvar196.i.i, 1 ; [#uses=1] - br i1 %582, label %bb68.i.i37, label %bb62.i.i - -bb68.i.i37: ; preds = %bb68.i.i37, %bb65.i.i36, %bb60.i.i, %bb66.preheader.i.i - %583 = phi i32 [ %587, %bb68.i.i37 ], [ 0, %bb65.i.i36 ], [ 0, %bb66.preheader.i.i ], [ 0, %bb60.i.i ] ; [#uses=3] - %bc.174.i.i = phi i32 [ %bc.0.i.i, %bb68.i.i37 ], [ 999999999, %bb65.i.i36 ], [ 999999999, %bb66.preheader.i.i ], [ 999999999, %bb60.i.i ] ; [#uses=2] - %bt.173.i.i = phi i32 [ %bt.0.i.i, %bb68.i.i37 ], [ -1, %bb65.i.i36 ], [ -1, %bb66.preheader.i.i ], [ -1, %bb60.i.i ] ; [#uses=1] - %scevgep221.i.i = getelementptr [6 x i16]* %cost.i.i, i32 0, i32 %583 ; [#uses=1] - %584 = load i16* %scevgep221.i.i, align 2 ; [#uses=1] - %585 = zext i16 %584 to i32 ; [#uses=2] - %586 = icmp slt i32 %585, %bc.174.i.i ; [#uses=2] - %bt.0.i.i = select i1 %586, i32 %583, i32 %bt.173.i.i ; [#uses=4] - %bc.0.i.i = select i1 %586, i32 %585, i32 %bc.174.i.i ; [#uses=1] - %587 = add i32 %583, 1 ; [#uses=2] - %exitcond220.i.i = icmp eq i32 %587, %smax181.i.i ; [#uses=1] - br i1 %exitcond220.i.i, label %bb72.i.i, label %bb68.i.i37 - -bb72.i.i: ; preds = %bb68.i.i37 - %588 = getelementptr [6 x i32]* %fave.i.i, i32 0, i32 %bt.0.i.i ; [#uses=2] - %589 = load i32* %588, align 4 ; [#uses=1] - %590 = add i32 %589, 1 ; [#uses=1] - store i32 %590, i32* %588, align 4 - %591 = trunc i32 %bt.0.i.i to i8 ; [#uses=1] - store i8 %591, i8* %scevgep230.i.i, align 1 - br i1 %548, label %bb75.i.i, label %bb.nph80.i.i - -bb.nph80.i.i: ; preds = %bb72.i.i - %tmp226.i.i = add i32 %gs.183.i.i, 1 ; [#uses=1] - br label %bb73.i.i - -bb73.i.i: ; preds = %bb73.i.i, %bb.nph80.i.i - %indvar222.i.i = phi i32 [ 0, %bb.nph80.i.i ], [ %indvar.next223.i.i, %bb73.i.i ] ; [#uses=3] - %tmp224.i.i = add i32 %indvar222.i.i, %gs.183.i.i ; [#uses=1] - %scevgep225.i.i = getelementptr i16* %727, i32 %tmp224.i.i ; [#uses=1] - %592 = load i16* %scevgep225.i.i, align 2 ; [#uses=1] - %593 = zext i16 %592 to i32 ; [#uses=1] - %594 = getelementptr [6 x [258 x i32]]* @rfreq, i32 0, i32 %bt.0.i.i, i32 %593 ; [#uses=2] - %595 = load i32* %594, align 4 ; [#uses=1] - %596 = add i32 %595, 1 ; [#uses=1] - store i32 %596, i32* %594, align 4 - %tmp227.i.i = add i32 %indvar222.i.i, %tmp226.i.i ; [#uses=1] - %597 = icmp sgt i32 %tmp227.i.i, %..i.i ; [#uses=1] - %indvar.next223.i.i = add i32 %indvar222.i.i, 1 ; [#uses=1] - br i1 %597, label %bb75.i.i, label %bb73.i.i - -bb75.i.i: ; preds = %bb73.i.i, %bb72.i.i - %598 = add i32 %..i.i, 1 ; [#uses=2] - %599 = icmp slt i32 %598, %512 ; [#uses=1] - br i1 %599, label %bb54.i.i.preheader, label %bb82.i.i - -bb82.i.i: ; preds = %hbMakeCodeLengths.exit.i.i, %bb75.i.i, %bb50.preheader.i.i - %nSelectors.1.lcssa.i.i = phi i32 [ 0, %bb50.preheader.i.i ], [ %tmp231.i.i, %bb75.i.i ], [ %nSelectors.1.lcssa.i.i, %hbMakeCodeLengths.exit.i.i ] ; [#uses=7] - %t.789.i.i = phi i32 [ %721, %hbMakeCodeLengths.exit.i.i ], [ 0, %bb75.i.i ], [ 0, %bb50.preheader.i.i ] ; [#uses=3] - br i1 %510, label %bb.i.i.i38, label %bb12.i.i.i39 - -bb.i.i.i38: ; preds = %bb.i.i.i38, %bb82.i.i - %i.026.i.i.i = phi i32 [ %tmp67.i.i.i, %bb.i.i.i38 ], [ 0, %bb82.i.i ] ; [#uses=2] - %scevgep66.i.i.i = getelementptr [6 x [258 x i32]]* @rfreq, i32 0, i32 %t.789.i.i, i32 %i.026.i.i.i ; [#uses=1] - %tmp67.i.i.i = add i32 %i.026.i.i.i, 1 ; [#uses=3] - %scevgep68.i.i.i = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %tmp67.i.i.i ; [#uses=1] - %600 = load i32* %scevgep66.i.i.i, align 4 ; [#uses=2] - %601 = shl i32 %600, 8 ; [#uses=1] - %602 = icmp eq i32 %600, 0 ; [#uses=1] - %.69.i.i.i = select i1 %602, i32 256, i32 %601 ; [#uses=1] - store i32 %.69.i.i.i, i32* %scevgep68.i.i.i, align 4 - %exitcond65.i.i.i = icmp eq i32 %tmp67.i.i.i, %509 ; [#uses=1] - br i1 %exitcond65.i.i.i, label %bb12.i.i.i39, label %bb.i.i.i38 - -bb12.i.i.i39: ; preds = %bb52.i.i.i, %bb53.preheader.i.i.i, %bb.i.i.i38, %bb82.i.i - store i32 0, i32* %93, align 4 - store i32 0, i32* %94, align 4 - store i32 -2, i32* %95, align 4 - br i1 %724, label %bb40.i.i.i52, label %bb13.i.i.i40 - -bb13.i.i.i40: ; preds = %bb16.i.i.i42, %bb12.i.i.i39 - %nHeap.06.i.i.i = phi i32 [ %i.15.i.i.i, %bb16.i.i.i42 ], [ 0, %bb12.i.i.i39 ] ; [#uses=5] - %i.15.i.i.i = add i32 %nHeap.06.i.i.i, 1 ; [#uses=13] - %tmp.i1.i.i = add i32 %nHeap.06.i.i.i, 2 ; [#uses=1] - %scevgep.i2.i.i = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %i.15.i.i.i ; [#uses=1] - %scevgep30.i.i.i = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %i.15.i.i.i ; [#uses=1] - %scevgep31.i.i.i = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %i.15.i.i.i ; [#uses=1] - store i32 -1, i32* %scevgep30.i.i.i, align 4 - store i32 %i.15.i.i.i, i32* %scevgep.i2.i.i, align 4 - %603 = load i32* %scevgep31.i.i.i, align 4 ; [#uses=2] - %604 = ashr i32 %i.15.i.i.i, 1 ; [#uses=1] - %605 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %604 ; [#uses=1] - %606 = load i32* %605, align 4 ; [#uses=1] - %607 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %606 ; [#uses=1] - %608 = load i32* %607, align 4 ; [#uses=1] - %609 = icmp slt i32 %603, %608 ; [#uses=1] - br i1 %609, label %bb14.i.i.i41, label %bb16.i.i.i42 - -bb14.i.i.i41: ; preds = %bb14.i.i.i41, %bb13.i.i.i40 - %zz7.03.i.i.i = phi i32 [ %610, %bb14.i.i.i41 ], [ %i.15.i.i.i, %bb13.i.i.i40 ] ; [#uses=3] - %610 = ashr i32 %zz7.03.i.i.i, 1 ; [#uses=3] - %611 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %610 ; [#uses=1] - %612 = load i32* %611, align 4 ; [#uses=1] - %613 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz7.03.i.i.i ; [#uses=1] - store i32 %612, i32* %613, align 4 - %614 = ashr i32 %zz7.03.i.i.i, 2 ; [#uses=1] - %615 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %614 ; [#uses=1] - %616 = load i32* %615, align 4 ; [#uses=1] - %617 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %616 ; [#uses=1] - %618 = load i32* %617, align 4 ; [#uses=1] - %619 = icmp slt i32 %603, %618 ; [#uses=1] - br i1 %619, label %bb14.i.i.i41, label %bb16.i.i.i42 - -bb16.i.i.i42: ; preds = %bb14.i.i.i41, %bb13.i.i.i40 - %zz7.0.lcssa.i.i.i = phi i32 [ %i.15.i.i.i, %bb13.i.i.i40 ], [ %610, %bb14.i.i.i41 ] ; [#uses=1] - %620 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz7.0.lcssa.i.i.i ; [#uses=1] - store i32 %i.15.i.i.i, i32* %620, align 4 - %621 = icmp sgt i32 %tmp.i1.i.i, %509 ; [#uses=1] - br i1 %621, label %bb18.i.i.i, label %bb13.i.i.i40 - -bb18.i.i.i: ; preds = %bb16.i.i.i42 - %622 = icmp sgt i32 %i.15.i.i.i, 259 ; [#uses=1] - br i1 %622, label %bb19.i.i.i43, label %bb39.preheader.i.i.i - -bb39.preheader.i.i.i: ; preds = %bb18.i.i.i - %623 = icmp sgt i32 %i.15.i.i.i, 1 ; [#uses=1] - br i1 %623, label %bb.nph14.i.i.i, label %bb40.i.i.i52 - -bb19.i.i.i43: ; preds = %bb18.i.i.i - call fastcc void @panic(i8* getelementptr ([21 x i8]* @"\01LC11", i32 0, i32 0)) nounwind ssp - unreachable - -bb.nph14.i.i.i: ; preds = %bb39.preheader.i.i.i - %tmp34.i.i.i = add i32 %i.15.i.i.i, %509 ; [#uses=1] - %tmp49.i.i.i44 = add i32 %nHeap.06.i.i.i, -1 ; [#uses=1] - br label %bb20.i.i.i - -bb20.i.i.i: ; preds = %bb38.i.i.i51, %bb.nph14.i.i.i - %indvar.i3.i.i = phi i32 [ 0, %bb.nph14.i.i.i ], [ %indvar.next.i4.i.i, %bb38.i.i.i51 ] ; [#uses=5] - %tmp38.i.i.i = add i32 %indvar.i3.i.i, %tmp37.i.i.i ; [#uses=6] - %scevgep40.i.i.i = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %tmp38.i.i.i ; [#uses=1] - %scevgep42.i.i.i = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %tmp38.i.i.i ; [#uses=1] - %tmp44.i.i.i = sub i32 %i.15.i.i.i, %indvar.i3.i.i ; [#uses=1] - %scevgep45.i.i.i = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %tmp44.i.i.i ; [#uses=1] - %scevgep46.sum.i.i.i = sub i32 %nHeap.06.i.i.i, %indvar.i3.i.i ; [#uses=6] - %scevgep47.i.i.i = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %scevgep46.sum.i.i.i ; [#uses=2] - %tmp50.i.i.i = sub i32 %tmp49.i.i.i44, %indvar.i3.i.i ; [#uses=2] - %624 = load i32* %96, align 4 ; [#uses=2] - %625 = load i32* %scevgep45.i.i.i, align 4 ; [#uses=3] - store i32 %625, i32* %96, align 4 - %626 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %625 ; [#uses=1] - br label %bb21.i.i.i45 - -bb21.i.i.i45: ; preds = %bb26.i.i.i, %bb20.i.i.i - %zz5.0.i.i.i = phi i32 [ 1, %bb20.i.i.i ], [ %yy4.0.i.i.i, %bb26.i.i.i ] ; [#uses=3] - %627 = shl i32 %zz5.0.i.i.i, 1 ; [#uses=6] - %628 = icmp sgt i32 %627, %scevgep46.sum.i.i.i ; [#uses=1] - br i1 %628, label %bb27.i.i.i47, label %bb22.i.i.i46 - -bb22.i.i.i46: ; preds = %bb21.i.i.i45 - %629 = icmp slt i32 %627, %scevgep46.sum.i.i.i ; [#uses=1] - br i1 %629, label %bb23.i.i.i, label %bb25.i.i.i - -bb23.i.i.i: ; preds = %bb22.i.i.i46 - %630 = or i32 %627, 1 ; [#uses=1] - %631 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %630 ; [#uses=1] - %632 = load i32* %631, align 4 ; [#uses=1] - %633 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %632 ; [#uses=1] - %634 = load i32* %633, align 4 ; [#uses=1] - %635 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %627 ; [#uses=1] - %636 = load i32* %635, align 4 ; [#uses=1] - %637 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %636 ; [#uses=1] - %638 = load i32* %637, align 4 ; [#uses=1] - %639 = icmp slt i32 %634, %638 ; [#uses=1] - %640 = zext i1 %639 to i32 ; [#uses=1] - %..i.i.i = or i32 %640, %627 ; [#uses=1] - br label %bb25.i.i.i - -bb25.i.i.i: ; preds = %bb23.i.i.i, %bb22.i.i.i46 - %yy4.0.i.i.i = phi i32 [ %..i.i.i, %bb23.i.i.i ], [ %627, %bb22.i.i.i46 ] ; [#uses=2] - %641 = load i32* %626, align 4 ; [#uses=1] - %642 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %yy4.0.i.i.i ; [#uses=1] - %643 = load i32* %642, align 4 ; [#uses=2] - %644 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %643 ; [#uses=1] - %645 = load i32* %644, align 4 ; [#uses=1] - %646 = icmp slt i32 %641, %645 ; [#uses=1] - br i1 %646, label %bb27.i.i.i47, label %bb26.i.i.i - -bb26.i.i.i: ; preds = %bb25.i.i.i - %647 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz5.0.i.i.i ; [#uses=1] - store i32 %643, i32* %647, align 4 - br label %bb21.i.i.i45 - -bb27.i.i.i47: ; preds = %bb25.i.i.i, %bb21.i.i.i45 - %648 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz5.0.i.i.i ; [#uses=1] - store i32 %625, i32* %648, align 4 - %649 = load i32* %96, align 4 ; [#uses=2] - %650 = load i32* %scevgep47.i.i.i, align 4 ; [#uses=3] - store i32 %650, i32* %96, align 4 - %651 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %650 ; [#uses=1] - br label %bb28.i.i.i48 - -bb28.i.i.i48: ; preds = %bb33.i.i.i, %bb27.i.i.i47 - %zz2.0.i.i.i = phi i32 [ 1, %bb27.i.i.i47 ], [ %yy.0.i.i.i, %bb33.i.i.i ] ; [#uses=3] - %652 = shl i32 %zz2.0.i.i.i, 1 ; [#uses=6] - %653 = icmp sgt i32 %652, %tmp50.i.i.i ; [#uses=1] - br i1 %653, label %bb34.i.i.i, label %bb29.i.i.i - -bb29.i.i.i: ; preds = %bb28.i.i.i48 - %654 = icmp slt i32 %652, %tmp50.i.i.i ; [#uses=1] - br i1 %654, label %bb30.i.i.i49, label %bb32.i.i.i - -bb30.i.i.i49: ; preds = %bb29.i.i.i - %655 = or i32 %652, 1 ; [#uses=1] - %656 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %655 ; [#uses=1] - %657 = load i32* %656, align 4 ; [#uses=1] - %658 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %657 ; [#uses=1] - %659 = load i32* %658, align 4 ; [#uses=1] - %660 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %652 ; [#uses=1] - %661 = load i32* %660, align 4 ; [#uses=1] - %662 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %661 ; [#uses=1] - %663 = load i32* %662, align 4 ; [#uses=1] - %664 = icmp slt i32 %659, %663 ; [#uses=1] - %665 = zext i1 %664 to i32 ; [#uses=1] - %.1.i.i.i = or i32 %665, %652 ; [#uses=1] - br label %bb32.i.i.i - -bb32.i.i.i: ; preds = %bb30.i.i.i49, %bb29.i.i.i - %yy.0.i.i.i = phi i32 [ %.1.i.i.i, %bb30.i.i.i49 ], [ %652, %bb29.i.i.i ] ; [#uses=2] - %666 = load i32* %651, align 4 ; [#uses=1] - %667 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %yy.0.i.i.i ; [#uses=1] - %668 = load i32* %667, align 4 ; [#uses=2] - %669 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %668 ; [#uses=1] - %670 = load i32* %669, align 4 ; [#uses=1] - %671 = icmp slt i32 %666, %670 ; [#uses=1] - br i1 %671, label %bb34.i.i.i, label %bb33.i.i.i - -bb33.i.i.i: ; preds = %bb32.i.i.i - %672 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz2.0.i.i.i ; [#uses=1] - store i32 %668, i32* %672, align 4 - br label %bb28.i.i.i48 - -bb34.i.i.i: ; preds = %bb32.i.i.i, %bb28.i.i.i48 - %673 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz2.0.i.i.i ; [#uses=1] - store i32 %650, i32* %673, align 4 - %674 = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %649 ; [#uses=1] - store i32 %tmp38.i.i.i, i32* %674, align 4 - %675 = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %624 ; [#uses=1] - store i32 %tmp38.i.i.i, i32* %675, align 4 - %676 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %624 ; [#uses=1] - %677 = load i32* %676, align 4 ; [#uses=2] - %678 = and i32 %677, -256 ; [#uses=1] - %679 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %649 ; [#uses=1] - %680 = load i32* %679, align 4 ; [#uses=2] - %681 = and i32 %680, -256 ; [#uses=1] - %682 = add i32 %681, %678 ; [#uses=1] - %683 = and i32 %680, 255 ; [#uses=2] - %684 = and i32 %677, 255 ; [#uses=2] - %685 = icmp uge i32 %683, %684 ; [#uses=1] - %max.i.i.i = select i1 %685, i32 %683, i32 %684 ; [#uses=1] - %686 = add i32 %max.i.i.i, 1 ; [#uses=1] - %687 = or i32 %686, %682 ; [#uses=3] - store i32 %687, i32* %scevgep40.i.i.i, align 4 - store i32 -1, i32* %scevgep42.i.i.i, align 4 - store i32 %tmp38.i.i.i, i32* %scevgep47.i.i.i, align 4 - %688 = ashr i32 %scevgep46.sum.i.i.i, 1 ; [#uses=1] - %689 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %688 ; [#uses=1] - %690 = load i32* %689, align 4 ; [#uses=1] - %691 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %690 ; [#uses=1] - %692 = load i32* %691, align 4 ; [#uses=1] - %693 = icmp slt i32 %687, %692 ; [#uses=1] - br i1 %693, label %bb36.i.i.i, label %bb38.i.i.i51 - -bb36.i.i.i: ; preds = %bb36.i.i.i, %bb34.i.i.i - %zz.09.i.i.i = phi i32 [ %694, %bb36.i.i.i ], [ %scevgep46.sum.i.i.i, %bb34.i.i.i ] ; [#uses=3] - %694 = ashr i32 %zz.09.i.i.i, 1 ; [#uses=3] - %695 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %694 ; [#uses=1] - %696 = load i32* %695, align 4 ; [#uses=1] - %697 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz.09.i.i.i ; [#uses=1] - store i32 %696, i32* %697, align 4 - %698 = ashr i32 %zz.09.i.i.i, 2 ; [#uses=1] - %699 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %698 ; [#uses=1] - %700 = load i32* %699, align 4 ; [#uses=1] - %701 = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %700 ; [#uses=1] - %702 = load i32* %701, align 4 ; [#uses=1] - %703 = icmp slt i32 %687, %702 ; [#uses=1] - br i1 %703, label %bb36.i.i.i, label %bb38.i.i.i51 - -bb38.i.i.i51: ; preds = %bb36.i.i.i, %bb34.i.i.i - %zz.0.lcssa.i.i.i = phi i32 [ %scevgep46.sum.i.i.i, %bb34.i.i.i ], [ %694, %bb36.i.i.i ] ; [#uses=1] - %704 = getelementptr [260 x i32]* %heap.i.i.i, i32 0, i32 %zz.0.lcssa.i.i.i ; [#uses=1] - store i32 %tmp38.i.i.i, i32* %704, align 4 - %indvar.next.i4.i.i = add i32 %indvar.i3.i.i, 1 ; [#uses=2] - %exitcond.i.i.i50 = icmp eq i32 %indvar.next.i4.i.i, %nHeap.06.i.i.i ; [#uses=1] - br i1 %exitcond.i.i.i50, label %bb39.bb40_crit_edge.i.i.i, label %bb20.i.i.i - -bb39.bb40_crit_edge.i.i.i: ; preds = %bb38.i.i.i51 - %tmp35.i.i.i = add i32 %tmp34.i.i.i, -1 ; [#uses=1] - br label %bb40.i.i.i52 - -bb40.i.i.i52: ; preds = %bb39.bb40_crit_edge.i.i.i, %bb39.preheader.i.i.i, %bb12.i.i.i39 - %nNodes.0.lcssa.i.i.i = phi i32 [ %tmp35.i.i.i, %bb39.bb40_crit_edge.i.i.i ], [ %509, %bb39.preheader.i.i.i ], [ %509, %bb12.i.i.i39 ] ; [#uses=1] - %705 = icmp sgt i32 %nNodes.0.lcssa.i.i.i, 515 ; [#uses=1] - br i1 %705, label %bb41.i.i.i54, label %bb49.preheader.i.i.i53 - -bb49.preheader.i.i.i53: ; preds = %bb40.i.i.i52 - br i1 %724, label %hbMakeCodeLengths.exit.i.i, label %bb45.preheader.i.i.i - -bb41.i.i.i54: ; preds = %bb40.i.i.i52 - call fastcc void @panic(i8* getelementptr ([21 x i8]* @"\01LC12", i32 0, i32 0)) nounwind ssp - unreachable - -bb44.i.i.i55: ; preds = %bb45.preheader.i.i.i, %bb44.i.i.i55 - %j.017.i.i.i = phi i32 [ %tmp52.i.i.i, %bb44.i.i.i55 ], [ 0, %bb45.preheader.i.i.i ] ; [#uses=1] - %k.016.i.i.i = phi i32 [ %707, %bb44.i.i.i55 ], [ %i.221.i.i.i, %bb45.preheader.i.i.i ] ; [#uses=1] - %tmp52.i.i.i = add i32 %j.017.i.i.i, 1 ; [#uses=2] - %706 = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %k.016.i.i.i ; [#uses=1] - %707 = load i32* %706, align 4 ; [#uses=2] - %708 = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %707 ; [#uses=1] - %709 = load i32* %708, align 4 ; [#uses=1] - %710 = icmp slt i32 %709, 0 ; [#uses=1] - br i1 %710, label %bb46.i.i.i, label %bb44.i.i.i55 - -bb46.i.i.i: ; preds = %bb45.preheader.i.i.i, %bb44.i.i.i55 - %j.0.lcssa.i.i.i = phi i32 [ 0, %bb45.preheader.i.i.i ], [ %tmp52.i.i.i, %bb44.i.i.i55 ] ; [#uses=2] - %711 = trunc i32 %j.0.lcssa.i.i.i to i8 ; [#uses=1] - store i8 %711, i8* %scevgep55.i.i.i, align 1 - %712 = icmp sgt i32 %j.0.lcssa.i.i.i, 20 ; [#uses=1] - %tooLong.0.i.i.i = select i1 %712, i8 1, i8 %tooLong.120.i.i.i ; [#uses=2] - %713 = icmp sgt i32 %tmp56.i.i.i, %509 ; [#uses=1] - br i1 %713, label %bb49.bb50_crit_edge.i.i.i, label %bb45.preheader.i.i.i - -bb49.bb50_crit_edge.i.i.i: ; preds = %bb46.i.i.i - %phitmp28.i.i.i = icmp eq i8 %tooLong.0.i.i.i, 0 ; [#uses=1] - br i1 %phitmp28.i.i.i, label %hbMakeCodeLengths.exit.i.i, label %bb53.preheader.i.i.i - -bb45.preheader.i.i.i: ; preds = %bb46.i.i.i, %bb49.preheader.i.i.i53 - %indvar53.i.i.i = phi i32 [ %i.221.i.i.i, %bb46.i.i.i ], [ 0, %bb49.preheader.i.i.i53 ] ; [#uses=3] - %tooLong.120.i.i.i = phi i8 [ %tooLong.0.i.i.i, %bb46.i.i.i ], [ 0, %bb49.preheader.i.i.i53 ] ; [#uses=1] - %scevgep55.i.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %t.789.i.i, i32 %indvar53.i.i.i ; [#uses=1] - %tmp56.i.i.i = add i32 %indvar53.i.i.i, 2 ; [#uses=1] - %i.221.i.i.i = add i32 %indvar53.i.i.i, 1 ; [#uses=3] - %scevgep58.i.i.i = getelementptr [516 x i32]* %parent.i.i.i, i32 0, i32 %i.221.i.i.i ; [#uses=1] - %714 = load i32* %scevgep58.i.i.i, align 4 ; [#uses=1] - %715 = icmp slt i32 %714, 0 ; [#uses=1] - br i1 %715, label %bb46.i.i.i, label %bb44.i.i.i55 - -bb53.preheader.i.i.i: ; preds = %bb49.bb50_crit_edge.i.i.i - br i1 %725, label %bb52.i.i.i, label %bb12.i.i.i39 - -bb52.i.i.i: ; preds = %bb52.i.i.i, %bb53.preheader.i.i.i - %indvar59.i.i.i = phi i32 [ %tmp63.i.i.i, %bb52.i.i.i ], [ 0, %bb53.preheader.i.i.i ] ; [#uses=1] - %tmp63.i.i.i = add i32 %indvar59.i.i.i, 1 ; [#uses=3] - %scevgep64.i.i.i = getelementptr [516 x i32]* %weight.i.i.i, i32 0, i32 %tmp63.i.i.i ; [#uses=2] - %716 = load i32* %scevgep64.i.i.i, align 4 ; [#uses=1] - %717 = ashr i32 %716, 8 ; [#uses=1] - %718 = sdiv i32 %717, 2 ; [#uses=1] - %719 = shl i32 %718, 8 ; [#uses=1] - %720 = add i32 %719, 256 ; [#uses=1] - store i32 %720, i32* %scevgep64.i.i.i, align 4 - %exitcond62.i.i.i = icmp eq i32 %tmp63.i.i.i, %tmp61.i.i.i ; [#uses=1] - br i1 %exitcond62.i.i.i, label %bb12.i.i.i39, label %bb52.i.i.i - -hbMakeCodeLengths.exit.i.i: ; preds = %bb49.bb50_crit_edge.i.i.i, %bb49.preheader.i.i.i53 - %721 = add i32 %t.789.i.i, 1 ; [#uses=2] - %exitcond238.i.i = icmp eq i32 %721, %smax181.i.i ; [#uses=1] - br i1 %exitcond238.i.i, label %bb84.i.i, label %bb82.i.i - -bb84.i.i: ; preds = %hbMakeCodeLengths.exit.i.i - %exitcond241.i.i = icmp eq i32 %tmp242.i.i, 4 ; [#uses=1] - br i1 %exitcond241.i.i, label %bb88.i.i, label %bb41.i.i33.preheader - -bb85.loopexit.i.i: ; preds = %bb37.i.i32 - %722 = icmp eq i32 %nGroups.0.i.i.reg2mem.0, 6 ; [#uses=1] - %tmp180.i.i = icmp ugt i32 %nGroups.0.i.i.reg2mem.0, 1 ; [#uses=1] - %smax181.i.i = select i1 %tmp180.i.i, i32 %nGroups.0.i.i.reg2mem.0, i32 1 ; [#uses=8] - %723 = icmp sgt i32 %512, 0 ; [#uses=1] - %724 = icmp slt i32 %509, 1 ; [#uses=3] - %725 = icmp sgt i32 %509, 1 ; [#uses=1] - %tmp37.i.i.i = add i32 %508, 3 ; [#uses=1] - %tmp61.i.i.i = add i32 %508, 1 ; [#uses=1] - %726 = add i32 %512, -1 ; [#uses=1] - %727 = load i16** @szptr, align 4 ; [#uses=3] - br label %bb41.i.i33.preheader - -bb41.i.i33.preheader: ; preds = %bb85.loopexit.i.i, %bb84.i.i - %iter.091.i.i = phi i32 [ 0, %bb85.loopexit.i.i ], [ %tmp242.i.i, %bb84.i.i ] ; [#uses=1] - %tmp242.i.i = add i32 %iter.091.i.i, 1 ; [#uses=2] - br label %bb41.i.i33 - -bb88.i.i: ; preds = %bb84.i.i - %728 = icmp sgt i32 %nSelectors.1.lcssa.i.i, 18002 ; [#uses=1] - br i1 %728, label %bb89.i.i, label %bb91.i.i - -bb89.i.i: ; preds = %bb88.i.i - call fastcc void @panic(i8* getelementptr ([17 x i8]* @"\01LC40", i32 0, i32 0)) nounwind ssp - unreachable - -bb91.i.i: ; preds = %bb91.i.i, %bb88.i.i - %i.345.i.i = phi i32 [ %729, %bb91.i.i ], [ 0, %bb88.i.i ] ; [#uses=3] - %scevgep178.i.i = getelementptr [6 x i8]* %pos.i.i, i32 0, i32 %i.345.i.i ; [#uses=1] - %tmp179.i.i = trunc i32 %i.345.i.i to i8 ; [#uses=1] - store i8 %tmp179.i.i, i8* %scevgep178.i.i, align 1 - %729 = add i32 %i.345.i.i, 1 ; [#uses=2] - %exitcond177.i.i = icmp eq i32 %729, %smax181.i.i ; [#uses=1] - br i1 %exitcond177.i.i, label %bb98.loopexit.i.i, label %bb91.i.i - -bb.nph44.i.i: ; preds = %bb98.loopexit.i.i - %.pre.i72.i = load i8* %97, align 1 ; [#uses=1] - br label %bb94.i.i - -bb94.i.i: ; preds = %bb97.i.i, %bb.nph44.i.i - %730 = phi i8 [ %.pre.i72.i, %bb.nph44.i.i ], [ %tmp.0.lcssa.i.i, %bb97.i.i ] ; [#uses=3] - %i.443.i.i = phi i32 [ 0, %bb.nph44.i.i ], [ %735, %bb97.i.i ] ; [#uses=3] - %scevgep173.i.i = getelementptr [18002 x i8]* @selector, i32 0, i32 %i.443.i.i ; [#uses=1] - %scevgep174.i.i = getelementptr [18002 x i8]* @selectorMtf, i32 0, i32 %i.443.i.i ; [#uses=1] - %731 = load i8* %scevgep173.i.i, align 1 ; [#uses=2] - %732 = icmp eq i8 %731, %730 ; [#uses=1] - br i1 %732, label %bb97.i.i, label %bb95.i.i - -bb95.i.i: ; preds = %bb95.i.i, %bb94.i.i - %tmp.039.i.i = phi i8 [ %733, %bb95.i.i ], [ %730, %bb94.i.i ] ; [#uses=1] - %j.038.i.i = phi i32 [ %tmp170.i.i, %bb95.i.i ], [ 0, %bb94.i.i ] ; [#uses=1] - %tmp170.i.i = add i32 %j.038.i.i, 1 ; [#uses=3] - %scevgep171.i.i = getelementptr [6 x i8]* %pos.i.i, i32 0, i32 %tmp170.i.i ; [#uses=2] - %733 = load i8* %scevgep171.i.i, align 1 ; [#uses=3] - store i8 %tmp.039.i.i, i8* %scevgep171.i.i, align 1 - %734 = icmp eq i8 %731, %733 ; [#uses=1] - br i1 %734, label %bb96.bb97_crit_edge.i.i, label %bb95.i.i - -bb96.bb97_crit_edge.i.i: ; preds = %bb95.i.i - %phitmp119.i.i = trunc i32 %tmp170.i.i to i8 ; [#uses=1] - br label %bb97.i.i - -bb97.i.i: ; preds = %bb96.bb97_crit_edge.i.i, %bb94.i.i - %tmp.0.lcssa.i.i = phi i8 [ %733, %bb96.bb97_crit_edge.i.i ], [ %730, %bb94.i.i ] ; [#uses=2] - %j.0.lcssa.i.i56 = phi i8 [ %phitmp119.i.i, %bb96.bb97_crit_edge.i.i ], [ 0, %bb94.i.i ] ; [#uses=1] - store i8 %tmp.0.lcssa.i.i, i8* %97, align 1 - store i8 %j.0.lcssa.i.i56, i8* %scevgep174.i.i, align 1 - %735 = add i32 %i.443.i.i, 1 ; [#uses=2] - %exitcond172.i.i = icmp eq i32 %735, %nSelectors.1.lcssa.i.i ; [#uses=1] - br i1 %exitcond172.i.i, label %bb112.i.i, label %bb94.i.i - -bb98.loopexit.i.i: ; preds = %bb91.i.i - %736 = icmp sgt i32 %nSelectors.1.lcssa.i.i, 0 ; [#uses=2] - br i1 %736, label %bb.nph44.i.i, label %bb112.i.i - -bb101.i.i: ; preds = %bb106.preheader.i.i, %bb101.i.i - %i.534.i.i = phi i32 [ %741, %bb101.i.i ], [ 0, %bb106.preheader.i.i ] ; [#uses=2] - %maxLen.133.i.i = phi i32 [ %maxLen.0.i.i, %bb101.i.i ], [ 0, %bb106.preheader.i.i ] ; [#uses=2] - %minLen.132.i.i = phi i32 [ %minLen.0.i.i, %bb101.i.i ], [ 32, %bb106.preheader.i.i ] ; [#uses=2] - %scevgep167.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %752, i32 %i.534.i.i ; [#uses=1] - %737 = load i8* %scevgep167.i.i, align 1 ; [#uses=1] - %738 = zext i8 %737 to i32 ; [#uses=4] - %739 = icmp sgt i32 %738, %maxLen.133.i.i ; [#uses=1] - %maxLen.0.i.i = select i1 %739, i32 %738, i32 %maxLen.133.i.i ; [#uses=3] - %740 = icmp slt i32 %738, %minLen.132.i.i ; [#uses=1] - %minLen.0.i.i = select i1 %740, i32 %738, i32 %minLen.132.i.i ; [#uses=3] - %741 = add i32 %i.534.i.i, 1 ; [#uses=2] - %exitcond166.i.i = icmp eq i32 %741, %509 ; [#uses=1] - br i1 %exitcond166.i.i, label %bb107.i.i, label %bb101.i.i - -bb107.i.i: ; preds = %bb101.i.i - %742 = icmp sgt i32 %maxLen.0.i.i, 20 ; [#uses=1] - br i1 %742, label %bb108.i.i, label %bb109.i.i - -bb108.i.i: ; preds = %bb107.i.i - call fastcc void @panic(i8* getelementptr ([17 x i8]* @"\01LC41", i32 0, i32 0)) nounwind ssp - unreachable - -bb109.i.i: ; preds = %bb107.i.i - %743 = icmp sgt i32 %minLen.0.i.i, 0 ; [#uses=1] - br i1 %743, label %bb111.i.i, label %bb110.i.i - -bb110.i.i: ; preds = %bb109.i.i - call fastcc void @panic(i8* getelementptr ([17 x i8]* @"\01LC42", i32 0, i32 0)) nounwind ssp - unreachable - -bb111.i.i: ; preds = %bb106.preheader.i.i, %bb109.i.i - %maxLen.1.lcssa.i.i.reg2mem.0 = phi i32 [ %maxLen.0.i.i, %bb109.i.i ], [ 0, %bb106.preheader.i.i ] ; [#uses=2] - %minLen.1.lcssa.i.i.reg2mem.0 = phi i32 [ %minLen.0.i.i, %bb109.i.i ], [ 32, %bb106.preheader.i.i ] ; [#uses=3] - %.not.i.i.i = icmp sle i32 %minLen.1.lcssa.i.i.reg2mem.0, %maxLen.1.lcssa.i.i.reg2mem.0 ; [#uses=1] - %or.cond.i.i.i = and i1 %.not.i.i.i, %510 ; [#uses=1] - br i1 %or.cond.i.i.i, label %bb.nph6.split.i.i.i, label %hbAssignCodes.exit.i.i - -bb1.i.i.i58: ; preds = %bb4.preheader.i.i.i, %bb3.i.i.i60 - %vec.12.i.i.i = phi i32 [ %vec.24.i.i.i, %bb4.preheader.i.i.i ], [ %vec.0.i.i.i, %bb3.i.i.i60 ] ; [#uses=3] - %i.01.i.i.i = phi i32 [ 0, %bb4.preheader.i.i.i ], [ %748, %bb3.i.i.i60 ] ; [#uses=3] - %scevgep.i.i.i57 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %752, i32 %i.01.i.i.i ; [#uses=1] - %744 = load i8* %scevgep.i.i.i57, align 1 ; [#uses=1] - %745 = zext i8 %744 to i32 ; [#uses=1] - %746 = icmp eq i32 %745, %n.05.i.i.i ; [#uses=1] - br i1 %746, label %bb2.i.i.i59, label %bb3.i.i.i60 - -bb2.i.i.i59: ; preds = %bb1.i.i.i58 - %scevgep7.i.i.i = getelementptr [6 x [258 x i32]]* @code, i32 0, i32 %752, i32 %i.01.i.i.i ; [#uses=1] - store i32 %vec.12.i.i.i, i32* %scevgep7.i.i.i, align 4 - %747 = add i32 %vec.12.i.i.i, 1 ; [#uses=1] - br label %bb3.i.i.i60 - -bb3.i.i.i60: ; preds = %bb2.i.i.i59, %bb1.i.i.i58 - %vec.0.i.i.i = phi i32 [ %747, %bb2.i.i.i59 ], [ %vec.12.i.i.i, %bb1.i.i.i58 ] ; [#uses=2] - %748 = add i32 %i.01.i.i.i, 1 ; [#uses=2] - %exitcond161.i.i = icmp eq i32 %748, %509 ; [#uses=1] - br i1 %exitcond161.i.i, label %bb5.i.i.i, label %bb1.i.i.i58 - -bb5.i.i.i: ; preds = %bb3.i.i.i60 - %749 = shl i32 %vec.0.i.i.i, 1 ; [#uses=1] - %750 = icmp sgt i32 %tmp8.i.i.i, %maxLen.1.lcssa.i.i.reg2mem.0 ; [#uses=1] - %indvar.next.i.i.i61 = add i32 %indvar.i.i.i63, 1 ; [#uses=1] - br i1 %750, label %hbAssignCodes.exit.i.i, label %bb4.preheader.i.i.i - -bb.nph6.split.i.i.i: ; preds = %bb111.i.i - %tmp.i.i.i62 = add i32 %minLen.1.lcssa.i.i.reg2mem.0, 1 ; [#uses=1] - br label %bb4.preheader.i.i.i - -bb4.preheader.i.i.i: ; preds = %bb.nph6.split.i.i.i, %bb5.i.i.i - %indvar.i.i.i63 = phi i32 [ 0, %bb.nph6.split.i.i.i ], [ %indvar.next.i.i.i61, %bb5.i.i.i ] ; [#uses=3] - %vec.24.i.i.i = phi i32 [ 0, %bb.nph6.split.i.i.i ], [ %749, %bb5.i.i.i ] ; [#uses=1] - %tmp8.i.i.i = add i32 %indvar.i.i.i63, %tmp.i.i.i62 ; [#uses=1] - %n.05.i.i.i = add i32 %indvar.i.i.i63, %minLen.1.lcssa.i.i.reg2mem.0 ; [#uses=1] - br label %bb1.i.i.i58 - -hbAssignCodes.exit.i.i: ; preds = %bb5.i.i.i, %bb111.i.i - %751 = add i32 %752, 1 ; [#uses=1] - br label %bb112.i.i - -bb112.i.i: ; preds = %hbAssignCodes.exit.i.i, %bb98.loopexit.i.i, %bb97.i.i - %752 = phi i32 [ %751, %hbAssignCodes.exit.i.i ], [ 0, %bb97.i.i ], [ 0, %bb98.loopexit.i.i ] ; [#uses=5] - %753 = icmp slt i32 %752, %nGroups.0.i.i.reg2mem.0 ; [#uses=1] - br i1 %753, label %bb106.preheader.i.i, label %bb114.i.i - -bb106.preheader.i.i: ; preds = %bb112.i.i - br i1 %510, label %bb101.i.i, label %bb111.i.i - -bb114.i.i: ; preds = %bb119.i.i, %bb112.i.i - %i.630.i.i = phi i32 [ %757, %bb119.i.i ], [ 0, %bb112.i.i ] ; [#uses=3] - %tmp154.i.i = shl i32 %i.630.i.i, 4 ; [#uses=1] - %scevgep159.i.i = getelementptr [16 x i8]* %inUse16.i.i, i32 0, i32 %i.630.i.i ; [#uses=2] - store i8 0, i8* %scevgep159.i.i, align 1 - br label %bb115.i.i - -bb115.i.i: ; preds = %bb117.i.i, %bb114.i.i - %j.128.i.i = phi i32 [ 0, %bb114.i.i ], [ %756, %bb117.i.i ] ; [#uses=2] - %tmp155.i.i = add i32 %j.128.i.i, %tmp154.i.i ; [#uses=1] - %scevgep156.i.i = getelementptr [256 x i8]* @inUse, i32 0, i32 %tmp155.i.i ; [#uses=1] - %754 = load i8* %scevgep156.i.i, align 1 ; [#uses=1] - %755 = icmp eq i8 %754, 0 ; [#uses=1] - br i1 %755, label %bb117.i.i, label %bb116.i.i - -bb116.i.i: ; preds = %bb115.i.i - store i8 1, i8* %scevgep159.i.i, align 1 - br label %bb117.i.i - -bb117.i.i: ; preds = %bb116.i.i, %bb115.i.i - %756 = add i32 %j.128.i.i, 1 ; [#uses=2] - %exitcond153.i.i = icmp eq i32 %756, 16 ; [#uses=1] - br i1 %exitcond153.i.i, label %bb119.i.i, label %bb115.i.i - -bb119.i.i: ; preds = %bb117.i.i - %757 = add i32 %i.630.i.i, 1 ; [#uses=2] - %exitcond157.i.i = icmp eq i32 %757, 16 ; [#uses=1] - br i1 %exitcond157.i.i, label %bb121.i.i, label %bb114.i.i - -bb121.i.i: ; preds = %bb119.i.i - %.b.i87.i.i = load i1* @bsStream.b ; [#uses=1] - %758 = zext i1 %.b.i87.i.i to i32 ; [#uses=3] - %759 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %758, i32 3 ; [#uses=2] - %760 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %758, i32 2 ; [#uses=4] - %761 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %758, i32 1 ; [#uses=4] - %bsBuff.promoted462 = load i32* @bsBuff ; [#uses=1] - %bsLive.promoted463 = load i32* @bsLive ; [#uses=1] - br label %bb122.i.i - -bb122.i.i: ; preds = %bb125.i.i, %bb121.i.i - %bsLive.tmp.0466 = phi i32 [ %bsLive.promoted463, %bb121.i.i ], [ %storemerge, %bb125.i.i ] ; [#uses=6] - %bsBuff.tmp.1465 = phi i32 [ %bsBuff.promoted462, %bb121.i.i ], [ %bsBuff.tmp.0464, %bb125.i.i ] ; [#uses=4] - %i.726.i.i = phi i32 [ 0, %bb121.i.i ], [ %795, %bb125.i.i ] ; [#uses=2] - %scevgep152.i.i = getelementptr [16 x i8]* %inUse16.i.i, i32 0, i32 %i.726.i.i ; [#uses=1] - %762 = load i8* %scevgep152.i.i, align 1 ; [#uses=1] - %763 = icmp eq i8 %762, 0 ; [#uses=1] - br i1 %763, label %bb1.i89.i.i, label %bb1.i6.i.i - -bb.i5.i.i: ; preds = %bb1.i6.i.i - %764 = lshr i32 %775, 24 ; [#uses=1] - %765 = trunc i32 %764 to i8 ; [#uses=1] - %766 = load i8** %759, align 4 ; [#uses=1] - %767 = load i32* %760, align 8 ; [#uses=2] - %768 = getelementptr i8* %766, i32 %767 ; [#uses=1] - store i8 %765, i8* %768, align 1 - %769 = add i32 %767, 1 ; [#uses=1] - store i32 %769, i32* %760, align 8 - %770 = load i32* %761, align 4 ; [#uses=1] - %771 = add i32 %770, 1 ; [#uses=1] - store i32 %771, i32* %761, align 4 - %772 = shl i32 %bsBuff.tmp.0456, 8 ; [#uses=2] - %773 = add i32 %bsLive.tmp.0457, -8 ; [#uses=3] - br label %bb1.i6.i.i - -bb1.i6.i.i: ; preds = %bb.i5.i.i, %bb122.i.i - %bsLive.tmp.0457 = phi i32 [ %773, %bb.i5.i.i ], [ %bsLive.tmp.0466, %bb122.i.i ] ; [#uses=1] - %bsBuff.tmp.0456 = phi i32 [ %772, %bb.i5.i.i ], [ %bsBuff.tmp.1465, %bb122.i.i ] ; [#uses=2] - %774 = phi i32 [ %773, %bb.i5.i.i ], [ %bsLive.tmp.0466, %bb122.i.i ] ; [#uses=2] - %775 = phi i32 [ %772, %bb.i5.i.i ], [ %bsBuff.tmp.1465, %bb122.i.i ] ; [#uses=1] - %776 = phi i32 [ %773, %bb.i5.i.i ], [ %bsLive.tmp.0466, %bb122.i.i ] ; [#uses=1] - %777 = icmp sgt i32 %776, 7 ; [#uses=1] - br i1 %777, label %bb.i5.i.i, label %bsW.exit.i.i - -bsW.exit.i.i: ; preds = %bb1.i6.i.i - %778 = sub i32 31, %774 ; [#uses=1] - %779 = shl i32 1, %778 ; [#uses=1] - %780 = or i32 %779, %bsBuff.tmp.0456 ; [#uses=1] - br label %bb125.i.i - -bb.i88.i.i: ; preds = %bb1.i89.i.i - %781 = lshr i32 %792, 24 ; [#uses=1] - %782 = trunc i32 %781 to i8 ; [#uses=1] - %783 = load i8** %759, align 4 ; [#uses=1] - %784 = load i32* %760, align 8 ; [#uses=2] - %785 = getelementptr i8* %783, i32 %784 ; [#uses=1] - store i8 %782, i8* %785, align 1 - %786 = add i32 %784, 1 ; [#uses=1] - store i32 %786, i32* %760, align 8 - %787 = load i32* %761, align 4 ; [#uses=1] - %788 = add i32 %787, 1 ; [#uses=1] - store i32 %788, i32* %761, align 4 - %789 = shl i32 %bsBuff.tmp.0460, 8 ; [#uses=2] - %790 = add i32 %bsLive.tmp.0461, -8 ; [#uses=3] - br label %bb1.i89.i.i - -bb1.i89.i.i: ; preds = %bb.i88.i.i, %bb122.i.i - %bsLive.tmp.0461 = phi i32 [ %790, %bb.i88.i.i ], [ %bsLive.tmp.0466, %bb122.i.i ] ; [#uses=1] - %bsBuff.tmp.0460 = phi i32 [ %789, %bb.i88.i.i ], [ %bsBuff.tmp.1465, %bb122.i.i ] ; [#uses=2] - %791 = phi i32 [ %790, %bb.i88.i.i ], [ %bsLive.tmp.0466, %bb122.i.i ] ; [#uses=1] - %792 = phi i32 [ %789, %bb.i88.i.i ], [ %bsBuff.tmp.1465, %bb122.i.i ] ; [#uses=1] - %793 = phi i32 [ %790, %bb.i88.i.i ], [ %bsLive.tmp.0466, %bb122.i.i ] ; [#uses=1] - %794 = icmp sgt i32 %793, 7 ; [#uses=1] - br i1 %794, label %bb.i88.i.i, label %bb125.i.i - -bb125.i.i: ; preds = %bb1.i89.i.i, %bsW.exit.i.i - %bsBuff.tmp.0464 = phi i32 [ %780, %bsW.exit.i.i ], [ %bsBuff.tmp.0460, %bb1.i89.i.i ] ; [#uses=3] - %storemerge.in = phi i32 [ %774, %bsW.exit.i.i ], [ %791, %bb1.i89.i.i ] ; [#uses=1] - %storemerge = add i32 %storemerge.in, 1 ; [#uses=3] - %795 = add i32 %i.726.i.i, 1 ; [#uses=2] - %exitcond151.i.i = icmp eq i32 %795, 16 ; [#uses=1] - br i1 %exitcond151.i.i, label %bb128.i.i.preheader, label %bb122.i.i - -bb128.i.i.preheader: ; preds = %bb125.i.i - store i32 %bsBuff.tmp.0464, i32* @bsBuff - store i32 %storemerge, i32* @bsLive - %.b.i73.i.i = load i1* @bsStream.b ; [#uses=1] - %796 = zext i1 %.b.i73.i.i to i32 ; [#uses=3] - %797 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %796, i32 3 ; [#uses=2] - %798 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %796, i32 2 ; [#uses=4] - %799 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %796, i32 1 ; [#uses=4] - br label %bb128.i.i - -bb128.i.i: ; preds = %bb135.i.i, %bb128.i.i.preheader - %bsLive.tmp.1485 = phi i32 [ %storemerge, %bb128.i.i.preheader ], [ %bsLive.tmp.0484, %bb135.i.i ] ; [#uses=2] - %bsBuff.tmp.1483 = phi i32 [ %bsBuff.tmp.0464, %bb128.i.i.preheader ], [ %bsBuff.tmp.0482, %bb135.i.i ] ; [#uses=2] - %i.824.i.i = phi i32 [ %836, %bb135.i.i ], [ 0, %bb128.i.i.preheader ] ; [#uses=3] - %tmp145.i.i = shl i32 %i.824.i.i, 4 ; [#uses=1] - %scevgep150.i.i = getelementptr [16 x i8]* %inUse16.i.i, i32 0, i32 %i.824.i.i ; [#uses=1] - %800 = load i8* %scevgep150.i.i, align 1 ; [#uses=1] - %801 = icmp eq i8 %800, 0 ; [#uses=1] - br i1 %801, label %bb135.i.i, label %bb130.i.i - -bb130.i.i: ; preds = %bb133.i.i, %bb128.i.i - %bsLive.tmp.0479 = phi i32 [ %storemerge85, %bb133.i.i ], [ %bsLive.tmp.1485, %bb128.i.i ] ; [#uses=6] - %bsBuff.tmp.1478 = phi i32 [ %bsBuff.tmp.0477, %bb133.i.i ], [ %bsBuff.tmp.1483, %bb128.i.i ] ; [#uses=4] - %j.222.i.i = phi i32 [ %835, %bb133.i.i ], [ 0, %bb128.i.i ] ; [#uses=2] - %tmp146.i.i = add i32 %j.222.i.i, %tmp145.i.i ; [#uses=1] - %scevgep147.i.i = getelementptr [256 x i8]* @inUse, i32 0, i32 %tmp146.i.i ; [#uses=1] - %802 = load i8* %scevgep147.i.i, align 1 ; [#uses=1] - %803 = icmp eq i8 %802, 0 ; [#uses=1] - br i1 %803, label %bb1.i75.i.i, label %bb1.i82.i.i - -bb.i81.i.i: ; preds = %bb1.i82.i.i - %804 = lshr i32 %815, 24 ; [#uses=1] - %805 = trunc i32 %804 to i8 ; [#uses=1] - %806 = load i8** %797, align 4 ; [#uses=1] - %807 = load i32* %798, align 8 ; [#uses=2] - %808 = getelementptr i8* %806, i32 %807 ; [#uses=1] - store i8 %805, i8* %808, align 1 - %809 = add i32 %807, 1 ; [#uses=1] - store i32 %809, i32* %798, align 8 - %810 = load i32* %799, align 4 ; [#uses=1] - %811 = add i32 %810, 1 ; [#uses=1] - store i32 %811, i32* %799, align 4 - %812 = shl i32 %bsBuff.tmp.0473, 8 ; [#uses=2] - %813 = add i32 %bsLive.tmp.0474, -8 ; [#uses=3] - br label %bb1.i82.i.i - -bb1.i82.i.i: ; preds = %bb.i81.i.i, %bb130.i.i - %bsLive.tmp.0474 = phi i32 [ %813, %bb.i81.i.i ], [ %bsLive.tmp.0479, %bb130.i.i ] ; [#uses=1] - %bsBuff.tmp.0473 = phi i32 [ %812, %bb.i81.i.i ], [ %bsBuff.tmp.1478, %bb130.i.i ] ; [#uses=2] - %814 = phi i32 [ %813, %bb.i81.i.i ], [ %bsLive.tmp.0479, %bb130.i.i ] ; [#uses=2] - %815 = phi i32 [ %812, %bb.i81.i.i ], [ %bsBuff.tmp.1478, %bb130.i.i ] ; [#uses=1] - %816 = phi i32 [ %813, %bb.i81.i.i ], [ %bsLive.tmp.0479, %bb130.i.i ] ; [#uses=1] - %817 = icmp sgt i32 %816, 7 ; [#uses=1] - br i1 %817, label %bb.i81.i.i, label %bsW.exit84.i.i - -bsW.exit84.i.i: ; preds = %bb1.i82.i.i - %818 = sub i32 31, %814 ; [#uses=1] - %819 = shl i32 1, %818 ; [#uses=1] - %820 = or i32 %819, %bsBuff.tmp.0473 ; [#uses=1] - br label %bb133.i.i - -bb.i74.i.i: ; preds = %bb1.i75.i.i - %821 = lshr i32 %832, 24 ; [#uses=1] - %822 = trunc i32 %821 to i8 ; [#uses=1] - %823 = load i8** %797, align 4 ; [#uses=1] - %824 = load i32* %798, align 8 ; [#uses=2] - %825 = getelementptr i8* %823, i32 %824 ; [#uses=1] - store i8 %822, i8* %825, align 1 - %826 = add i32 %824, 1 ; [#uses=1] - store i32 %826, i32* %798, align 8 - %827 = load i32* %799, align 4 ; [#uses=1] - %828 = add i32 %827, 1 ; [#uses=1] - store i32 %828, i32* %799, align 4 - %829 = shl i32 %bsBuff.tmp.0469, 8 ; [#uses=2] - %830 = add i32 %bsLive.tmp.0470, -8 ; [#uses=3] - br label %bb1.i75.i.i - -bb1.i75.i.i: ; preds = %bb.i74.i.i, %bb130.i.i - %bsLive.tmp.0470 = phi i32 [ %830, %bb.i74.i.i ], [ %bsLive.tmp.0479, %bb130.i.i ] ; [#uses=1] - %bsBuff.tmp.0469 = phi i32 [ %829, %bb.i74.i.i ], [ %bsBuff.tmp.1478, %bb130.i.i ] ; [#uses=2] - %831 = phi i32 [ %830, %bb.i74.i.i ], [ %bsLive.tmp.0479, %bb130.i.i ] ; [#uses=1] - %832 = phi i32 [ %829, %bb.i74.i.i ], [ %bsBuff.tmp.1478, %bb130.i.i ] ; [#uses=1] - %833 = phi i32 [ %830, %bb.i74.i.i ], [ %bsLive.tmp.0479, %bb130.i.i ] ; [#uses=1] - %834 = icmp sgt i32 %833, 7 ; [#uses=1] - br i1 %834, label %bb.i74.i.i, label %bb133.i.i - -bb133.i.i: ; preds = %bb1.i75.i.i, %bsW.exit84.i.i - %bsBuff.tmp.0477 = phi i32 [ %820, %bsW.exit84.i.i ], [ %bsBuff.tmp.0469, %bb1.i75.i.i ] ; [#uses=2] - %storemerge85.in = phi i32 [ %814, %bsW.exit84.i.i ], [ %831, %bb1.i75.i.i ] ; [#uses=1] - %storemerge85 = add i32 %storemerge85.in, 1 ; [#uses=2] - %835 = add i32 %j.222.i.i, 1 ; [#uses=2] - %exitcond144.i.i = icmp eq i32 %835, 16 ; [#uses=1] - br i1 %exitcond144.i.i, label %bb135.i.i, label %bb130.i.i - -bb135.i.i: ; preds = %bb133.i.i, %bb128.i.i - %bsLive.tmp.0484 = phi i32 [ %bsLive.tmp.1485, %bb128.i.i ], [ %storemerge85, %bb133.i.i ] ; [#uses=5] - %bsBuff.tmp.0482 = phi i32 [ %bsBuff.tmp.1483, %bb128.i.i ], [ %bsBuff.tmp.0477, %bb133.i.i ] ; [#uses=4] - %836 = add i32 %i.824.i.i, 1 ; [#uses=2] - %exitcond148.i.i = icmp eq i32 %836, 16 ; [#uses=1] - br i1 %exitcond148.i.i, label %bb137.i.i, label %bb128.i.i - -bb137.i.i: ; preds = %bb135.i.i - store i32 %bsBuff.tmp.0482, i32* @bsBuff - store i32 %bsLive.tmp.0484, i32* @bsLive - %.b.i66.i.i = load i1* @bsStream.b ; [#uses=1] - %837 = zext i1 %.b.i66.i.i to i32 ; [#uses=3] - %838 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %837, i32 3 ; [#uses=1] - %839 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %837, i32 2 ; [#uses=2] - %840 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %837, i32 1 ; [#uses=2] - br label %bb1.i68.i.i - -bb.i67.i.i: ; preds = %bb1.i68.i.i - %841 = lshr i32 %852, 24 ; [#uses=1] - %842 = trunc i32 %841 to i8 ; [#uses=1] - %843 = load i8** %838, align 4 ; [#uses=1] - %844 = load i32* %839, align 8 ; [#uses=2] - %845 = getelementptr i8* %843, i32 %844 ; [#uses=1] - store i8 %842, i8* %845, align 1 - %846 = add i32 %844, 1 ; [#uses=1] - store i32 %846, i32* %839, align 8 - %847 = load i32* %840, align 4 ; [#uses=1] - %848 = add i32 %847, 1 ; [#uses=1] - store i32 %848, i32* %840, align 4 - %849 = shl i32 %bsBuff.tmp.0488, 8 ; [#uses=2] - %850 = add i32 %bsLive.tmp.0489, -8 ; [#uses=3] - br label %bb1.i68.i.i - -bb1.i68.i.i: ; preds = %bb.i67.i.i, %bb137.i.i - %bsLive.tmp.0489 = phi i32 [ %bsLive.tmp.0484, %bb137.i.i ], [ %850, %bb.i67.i.i ] ; [#uses=1] - %bsBuff.tmp.0488 = phi i32 [ %bsBuff.tmp.0482, %bb137.i.i ], [ %849, %bb.i67.i.i ] ; [#uses=2] - %851 = phi i32 [ %850, %bb.i67.i.i ], [ %bsLive.tmp.0484, %bb137.i.i ] ; [#uses=2] - %852 = phi i32 [ %849, %bb.i67.i.i ], [ %bsBuff.tmp.0482, %bb137.i.i ] ; [#uses=1] - %853 = phi i32 [ %850, %bb.i67.i.i ], [ %bsLive.tmp.0484, %bb137.i.i ] ; [#uses=1] - %854 = icmp sgt i32 %853, 7 ; [#uses=1] - br i1 %854, label %bb.i67.i.i, label %bsW.exit70.i.i - -bsW.exit70.i.i: ; preds = %bb1.i68.i.i - %855 = sub i32 29, %851 ; [#uses=1] - %856 = shl i32 %nGroups.0.i.i.reg2mem.0, %855 ; [#uses=1] - %857 = or i32 %856, %bsBuff.tmp.0488 ; [#uses=3] - store i32 %857, i32* @bsBuff, align 4 - %858 = add i32 %851, 3 ; [#uses=4] - store i32 %858, i32* @bsLive, align 4 - %.b.i59.i.i = load i1* @bsStream.b ; [#uses=1] - %859 = zext i1 %.b.i59.i.i to i32 ; [#uses=3] - %860 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %859, i32 3 ; [#uses=1] - %861 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %859, i32 2 ; [#uses=2] - %862 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %859, i32 1 ; [#uses=2] - br label %bb1.i61.i.i - -bb.i60.i.i: ; preds = %bb1.i61.i.i - %863 = lshr i32 %874, 24 ; [#uses=1] - %864 = trunc i32 %863 to i8 ; [#uses=1] - %865 = load i8** %860, align 4 ; [#uses=1] - %866 = load i32* %861, align 8 ; [#uses=2] - %867 = getelementptr i8* %865, i32 %866 ; [#uses=1] - store i8 %864, i8* %867, align 1 - %868 = add i32 %866, 1 ; [#uses=1] - store i32 %868, i32* %861, align 8 - %869 = load i32* %862, align 4 ; [#uses=1] - %870 = add i32 %869, 1 ; [#uses=1] - store i32 %870, i32* %862, align 4 - %871 = shl i32 %bsBuff.tmp.0492, 8 ; [#uses=2] - %872 = add i32 %bsLive.tmp.0493, -8 ; [#uses=3] - br label %bb1.i61.i.i - -bb1.i61.i.i: ; preds = %bb.i60.i.i, %bsW.exit70.i.i - %bsLive.tmp.0493 = phi i32 [ %858, %bsW.exit70.i.i ], [ %872, %bb.i60.i.i ] ; [#uses=1] - %bsBuff.tmp.0492 = phi i32 [ %857, %bsW.exit70.i.i ], [ %871, %bb.i60.i.i ] ; [#uses=2] - %873 = phi i32 [ %872, %bb.i60.i.i ], [ %858, %bsW.exit70.i.i ] ; [#uses=2] - %874 = phi i32 [ %871, %bb.i60.i.i ], [ %857, %bsW.exit70.i.i ] ; [#uses=1] - %875 = phi i32 [ %872, %bb.i60.i.i ], [ %858, %bsW.exit70.i.i ] ; [#uses=1] - %876 = icmp sgt i32 %875, 7 ; [#uses=1] - br i1 %876, label %bb.i60.i.i, label %bsW.exit63.i.i - -bsW.exit63.i.i: ; preds = %bb1.i61.i.i - %877 = sub i32 17, %873 ; [#uses=1] - %878 = shl i32 %nSelectors.1.lcssa.i.i, %877 ; [#uses=1] - %879 = or i32 %878, %bsBuff.tmp.0492 ; [#uses=3] - store i32 %879, i32* @bsBuff, align 4 - %880 = add i32 %873, 15 ; [#uses=3] - store i32 %880, i32* @bsLive, align 4 - br i1 %736, label %bb142.preheader.i.i.preheader, label %bb.nph17.i.i - -bb142.preheader.i.i.preheader: ; preds = %bsW.exit63.i.i - %.b.i45.i.i = load i1* @bsStream.b ; [#uses=1] - %881 = zext i1 %.b.i45.i.i to i32 ; [#uses=3] - %882 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %881, i32 3 ; [#uses=2] - %883 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %881, i32 2 ; [#uses=4] - %884 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %881, i32 1 ; [#uses=4] - br label %bb142.preheader.i.i - -bb.i53.i.i: ; preds = %bb1.i54.i.i - %885 = lshr i32 %896, 24 ; [#uses=1] - %886 = trunc i32 %885 to i8 ; [#uses=1] - %887 = load i8** %882, align 4 ; [#uses=1] - %888 = load i32* %883, align 8 ; [#uses=2] - %889 = getelementptr i8* %887, i32 %888 ; [#uses=1] - store i8 %886, i8* %889, align 1 - %890 = add i32 %888, 1 ; [#uses=1] - store i32 %890, i32* %883, align 8 - %891 = load i32* %884, align 4 ; [#uses=1] - %892 = add i32 %891, 1 ; [#uses=1] - store i32 %892, i32* %884, align 4 - %893 = shl i32 %bsBuff.tmp.0386, 8 ; [#uses=2] - %894 = add i32 %bsLive.tmp.0387, -8 ; [#uses=3] - br label %bb1.i54.i.i - -bb1.i54.i.i: ; preds = %bb141.i.i.preheader, %bsW.exit56.i.i, %bb.i53.i.i - %j.318.i.i = phi i32 [ %903, %bsW.exit56.i.i ], [ 0, %bb141.i.i.preheader ], [ %j.318.i.i, %bb.i53.i.i ] ; [#uses=2] - %bsLive.tmp.0387 = phi i32 [ %894, %bb.i53.i.i ], [ %bsLive.tmp.0400, %bb141.i.i.preheader ], [ %902, %bsW.exit56.i.i ] ; [#uses=1] - %bsBuff.tmp.0386 = phi i32 [ %893, %bb.i53.i.i ], [ %bsBuff.tmp.0398, %bb141.i.i.preheader ], [ %901, %bsW.exit56.i.i ] ; [#uses=2] - %895 = phi i32 [ %894, %bb.i53.i.i ], [ %bsLive.tmp.0400, %bb141.i.i.preheader ], [ %902, %bsW.exit56.i.i ] ; [#uses=2] - %896 = phi i32 [ %893, %bb.i53.i.i ], [ %bsBuff.tmp.0398, %bb141.i.i.preheader ], [ %901, %bsW.exit56.i.i ] ; [#uses=1] - %897 = phi i32 [ %894, %bb.i53.i.i ], [ %bsLive.tmp.0400, %bb141.i.i.preheader ], [ %902, %bsW.exit56.i.i ] ; [#uses=1] - %898 = icmp sgt i32 %897, 7 ; [#uses=1] - br i1 %898, label %bb.i53.i.i, label %bsW.exit56.i.i - -bsW.exit56.i.i: ; preds = %bb1.i54.i.i - %899 = sub i32 31, %895 ; [#uses=1] - %900 = shl i32 1, %899 ; [#uses=1] - %901 = or i32 %900, %bsBuff.tmp.0386 ; [#uses=4] - %902 = add i32 %895, 1 ; [#uses=6] - %903 = add i32 %j.318.i.i, 1 ; [#uses=2] - %904 = icmp sgt i32 %923, %903 ; [#uses=1] - br i1 %904, label %bb1.i54.i.i, label %bb1.i47.i.i - -bb.i46.i.i: ; preds = %bb1.i47.i.i - %905 = lshr i32 %916, 24 ; [#uses=1] - %906 = trunc i32 %905 to i8 ; [#uses=1] - %907 = load i8** %882, align 4 ; [#uses=1] - %908 = load i32* %883, align 8 ; [#uses=2] - %909 = getelementptr i8* %907, i32 %908 ; [#uses=1] - store i8 %906, i8* %909, align 1 - %910 = add i32 %908, 1 ; [#uses=1] - store i32 %910, i32* %883, align 8 - %911 = load i32* %884, align 4 ; [#uses=1] - %912 = add i32 %911, 1 ; [#uses=1] - store i32 %912, i32* %884, align 4 - %913 = shl i32 %bsBuff.tmp.0394, 8 ; [#uses=2] - %914 = add i32 %bsLive.tmp.0395, -8 ; [#uses=3] - br label %bb1.i47.i.i - -bb1.i47.i.i: ; preds = %bb142.preheader.i.i, %bb.i46.i.i, %bsW.exit56.i.i - %bsLive.tmp.0395 = phi i32 [ %914, %bb.i46.i.i ], [ %bsLive.tmp.0400, %bb142.preheader.i.i ], [ %902, %bsW.exit56.i.i ] ; [#uses=1] - %bsBuff.tmp.0394 = phi i32 [ %913, %bb.i46.i.i ], [ %bsBuff.tmp.0398, %bb142.preheader.i.i ], [ %901, %bsW.exit56.i.i ] ; [#uses=4] - %915 = phi i32 [ %914, %bb.i46.i.i ], [ %bsLive.tmp.0400, %bb142.preheader.i.i ], [ %902, %bsW.exit56.i.i ] ; [#uses=1] - %916 = phi i32 [ %913, %bb.i46.i.i ], [ %bsBuff.tmp.0398, %bb142.preheader.i.i ], [ %901, %bsW.exit56.i.i ] ; [#uses=1] - %917 = phi i32 [ %914, %bb.i46.i.i ], [ %bsLive.tmp.0400, %bb142.preheader.i.i ], [ %902, %bsW.exit56.i.i ] ; [#uses=1] - %918 = icmp sgt i32 %917, 7 ; [#uses=1] - br i1 %918, label %bb.i46.i.i, label %bsW.exit49.i.i - -bsW.exit49.i.i: ; preds = %bb1.i47.i.i - %919 = add i32 %915, 1 ; [#uses=3] - %920 = add i32 %i.920.i.i, 1 ; [#uses=2] - %exitcond142.i.i = icmp eq i32 %920, %nSelectors.1.lcssa.i.i ; [#uses=1] - br i1 %exitcond142.i.i, label %bb145.i.i.loopexit, label %bb142.preheader.i.i - -bb142.preheader.i.i: ; preds = %bsW.exit49.i.i, %bb142.preheader.i.i.preheader - %bsLive.tmp.0400 = phi i32 [ %880, %bb142.preheader.i.i.preheader ], [ %919, %bsW.exit49.i.i ] ; [#uses=6] - %bsBuff.tmp.0398 = phi i32 [ %879, %bb142.preheader.i.i.preheader ], [ %bsBuff.tmp.0394, %bsW.exit49.i.i ] ; [#uses=4] - %i.920.i.i = phi i32 [ %920, %bsW.exit49.i.i ], [ 0, %bb142.preheader.i.i.preheader ] ; [#uses=2] - %scevgep143.i.i = getelementptr [18002 x i8]* @selectorMtf, i32 0, i32 %i.920.i.i ; [#uses=1] - %921 = load i8* %scevgep143.i.i, align 1 ; [#uses=2] - %922 = icmp eq i8 %921, 0 ; [#uses=1] - br i1 %922, label %bb1.i47.i.i, label %bb141.i.i.preheader - -bb141.i.i.preheader: ; preds = %bb142.preheader.i.i - %923 = zext i8 %921 to i32 ; [#uses=1] - br label %bb1.i54.i.i - -bb145.i.i.loopexit: ; preds = %bsW.exit49.i.i - store i32 %bsBuff.tmp.0394, i32* @bsBuff - store i32 %919, i32* @bsLive - br label %bb.nph17.i.i - -bb.nph17.i.i: ; preds = %bb145.i.i.loopexit, %bsW.exit63.i.i - %bsLive.promoted379 = phi i32 [ %919, %bb145.i.i.loopexit ], [ %880, %bsW.exit63.i.i ] ; [#uses=1] - %bsBuff.promoted378 = phi i32 [ %bsBuff.tmp.0394, %bb145.i.i.loopexit ], [ %879, %bsW.exit63.i.i ] ; [#uses=1] - %.b.i38.i.i = load i1* @bsStream.b ; [#uses=1] - %924 = zext i1 %.b.i38.i.i to i32 ; [#uses=3] - %925 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %924, i32 3 ; [#uses=4] - %926 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %924, i32 2 ; [#uses=8] - %927 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %924, i32 1 ; [#uses=8] - br label %bb148.i.i - -bb148.i.i: ; preds = %bb155.i.i, %bb.nph17.i.i - %bsLive.tmp.0382 = phi i32 [ %bsLive.promoted379, %bb.nph17.i.i ], [ %bsLive.tmp.1383, %bb155.i.i ] ; [#uses=3] - %bsBuff.tmp.0380 = phi i32 [ %bsBuff.promoted378, %bb.nph17.i.i ], [ %bsBuff.tmp.1381, %bb155.i.i ] ; [#uses=2] - %928 = phi i32 [ 0, %bb.nph17.i.i ], [ %1009, %bb155.i.i ] ; [#uses=3] - %scevgep140.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %928, i32 0 ; [#uses=1] - %929 = load i8* %scevgep140.i.i, align 2 ; [#uses=1] - %930 = zext i8 %929 to i32 ; [#uses=2] - br label %bb1.i40.i.i - -bb.i39.i.i: ; preds = %bb1.i40.i.i - %931 = lshr i32 %942, 24 ; [#uses=1] - %932 = trunc i32 %931 to i8 ; [#uses=1] - %933 = load i8** %925, align 4 ; [#uses=1] - %934 = load i32* %926, align 8 ; [#uses=2] - %935 = getelementptr i8* %933, i32 %934 ; [#uses=1] - store i8 %932, i8* %935, align 1 - %936 = add i32 %934, 1 ; [#uses=1] - store i32 %936, i32* %926, align 8 - %937 = load i32* %927, align 4 ; [#uses=1] - %938 = add i32 %937, 1 ; [#uses=1] - store i32 %938, i32* %927, align 4 - %939 = shl i32 %bsBuff.tmp.0376, 8 ; [#uses=2] - %940 = add i32 %bsLive.tmp.0377, -8 ; [#uses=3] - br label %bb1.i40.i.i - -bb1.i40.i.i: ; preds = %bb.i39.i.i, %bb148.i.i - %bsLive.tmp.0377 = phi i32 [ %bsLive.tmp.0382, %bb148.i.i ], [ %940, %bb.i39.i.i ] ; [#uses=1] - %bsBuff.tmp.0376 = phi i32 [ %bsBuff.tmp.0380, %bb148.i.i ], [ %939, %bb.i39.i.i ] ; [#uses=2] - %941 = phi i32 [ %940, %bb.i39.i.i ], [ %bsLive.tmp.0382, %bb148.i.i ] ; [#uses=2] - %942 = phi i32 [ %939, %bb.i39.i.i ], [ %bsBuff.tmp.0380, %bb148.i.i ] ; [#uses=1] - %943 = phi i32 [ %940, %bb.i39.i.i ], [ %bsLive.tmp.0382, %bb148.i.i ] ; [#uses=1] - %944 = icmp sgt i32 %943, 7 ; [#uses=1] - br i1 %944, label %bb.i39.i.i, label %bsW.exit42.i.i - -bsW.exit42.i.i: ; preds = %bb1.i40.i.i - %945 = sub i32 27, %941 ; [#uses=1] - %946 = shl i32 %930, %945 ; [#uses=1] - %947 = or i32 %946, %bsBuff.tmp.0376 ; [#uses=2] - %948 = add i32 %941, 5 ; [#uses=2] - br i1 %510, label %bb150.preheader.i.i, label %bb155.i.i - -bb.nph8.i.i: ; preds = %bb150.preheader.i.i - %tmp128.i.i = add i32 %curr.114.i.i, 1 ; [#uses=1] - br label %bb149.i.i - -bb149.i.i: ; preds = %bsW.exit35.i.i, %bb.nph8.i.i - %bsLive.tmp.0363 = phi i32 [ %bsLive.tmp.0372, %bb.nph8.i.i ], [ %966, %bsW.exit35.i.i ] ; [#uses=3] - %bsBuff.tmp.0362 = phi i32 [ %bsBuff.tmp.0370, %bb.nph8.i.i ], [ %965, %bsW.exit35.i.i ] ; [#uses=2] - %indvar126.i.i = phi i32 [ 0, %bb.nph8.i.i ], [ %indvar.next127.i.i, %bsW.exit35.i.i ] ; [#uses=2] - %tmp129.i.i = add i32 %indvar126.i.i, %tmp128.i.i ; [#uses=2] - br label %bb1.i33.i.i - -bb.i32.i.i: ; preds = %bb1.i33.i.i - %949 = lshr i32 %960, 24 ; [#uses=1] - %950 = trunc i32 %949 to i8 ; [#uses=1] - %951 = load i8** %925, align 4 ; [#uses=1] - %952 = load i32* %926, align 8 ; [#uses=2] - %953 = getelementptr i8* %951, i32 %952 ; [#uses=1] - store i8 %950, i8* %953, align 1 - %954 = add i32 %952, 1 ; [#uses=1] - store i32 %954, i32* %926, align 8 - %955 = load i32* %927, align 4 ; [#uses=1] - %956 = add i32 %955, 1 ; [#uses=1] - store i32 %956, i32* %927, align 4 - %957 = shl i32 %bsBuff.tmp.0358, 8 ; [#uses=2] - %958 = add i32 %bsLive.tmp.0359, -8 ; [#uses=3] - br label %bb1.i33.i.i - -bb1.i33.i.i: ; preds = %bb.i32.i.i, %bb149.i.i - %bsLive.tmp.0359 = phi i32 [ %bsLive.tmp.0363, %bb149.i.i ], [ %958, %bb.i32.i.i ] ; [#uses=1] - %bsBuff.tmp.0358 = phi i32 [ %bsBuff.tmp.0362, %bb149.i.i ], [ %957, %bb.i32.i.i ] ; [#uses=2] - %959 = phi i32 [ %958, %bb.i32.i.i ], [ %bsLive.tmp.0363, %bb149.i.i ] ; [#uses=2] - %960 = phi i32 [ %957, %bb.i32.i.i ], [ %bsBuff.tmp.0362, %bb149.i.i ] ; [#uses=1] - %961 = phi i32 [ %958, %bb.i32.i.i ], [ %bsLive.tmp.0363, %bb149.i.i ] ; [#uses=1] - %962 = icmp sgt i32 %961, 7 ; [#uses=1] - br i1 %962, label %bb.i32.i.i, label %bsW.exit35.i.i - -bsW.exit35.i.i: ; preds = %bb1.i33.i.i - %963 = sub i32 30, %959 ; [#uses=1] - %964 = shl i32 2, %963 ; [#uses=1] - %965 = or i32 %964, %bsBuff.tmp.0358 ; [#uses=2] - %966 = add i32 %959, 2 ; [#uses=2] - %967 = icmp sgt i32 %1007, %tmp129.i.i ; [#uses=1] - %indvar.next127.i.i = add i32 %indvar126.i.i, 1 ; [#uses=1] - br i1 %967, label %bb149.i.i, label %bb152.preheader.i.i - -bb152.preheader.i.i: ; preds = %bb150.preheader.i.i, %bsW.exit35.i.i - %bsLive.tmp.1373 = phi i32 [ %bsLive.tmp.0372, %bb150.preheader.i.i ], [ %966, %bsW.exit35.i.i ] ; [#uses=4] - %bsBuff.tmp.1371 = phi i32 [ %bsBuff.tmp.0370, %bb150.preheader.i.i ], [ %965, %bsW.exit35.i.i ] ; [#uses=3] - %curr.0.lcssa.i.i = phi i32 [ %curr.114.i.i, %bb150.preheader.i.i ], [ %tmp129.i.i, %bsW.exit35.i.i ] ; [#uses=3] - %968 = icmp slt i32 %1007, %curr.0.lcssa.i.i ; [#uses=1] - br i1 %968, label %bb.nph11.i.i, label %bb1.i19.i.i - -bb.nph11.i.i: ; preds = %bb152.preheader.i.i - %tmp134.i.i = add i32 %curr.0.lcssa.i.i, -1 ; [#uses=1] - %969 = load i8* %scevgep137.i.i, align 1 ; [#uses=1] - %970 = zext i8 %969 to i32 ; [#uses=1] - br label %bb151.i.i - -bb151.i.i: ; preds = %bsW.exit28.i.i, %bb.nph11.i.i - %bsLive.tmp.0355 = phi i32 [ %bsLive.tmp.1373, %bb.nph11.i.i ], [ %988, %bsW.exit28.i.i ] ; [#uses=3] - %bsBuff.tmp.0354 = phi i32 [ %bsBuff.tmp.1371, %bb.nph11.i.i ], [ %987, %bsW.exit28.i.i ] ; [#uses=2] - %indvar131.i.i = phi i32 [ 0, %bb.nph11.i.i ], [ %indvar.next132.i.i, %bsW.exit28.i.i ] ; [#uses=2] - %tmp135.i.i = sub i32 %tmp134.i.i, %indvar131.i.i ; [#uses=2] - br label %bb1.i26.i.i - -bb.i25.i.i: ; preds = %bb1.i26.i.i - %971 = lshr i32 %982, 24 ; [#uses=1] - %972 = trunc i32 %971 to i8 ; [#uses=1] - %973 = load i8** %925, align 4 ; [#uses=1] - %974 = load i32* %926, align 8 ; [#uses=2] - %975 = getelementptr i8* %973, i32 %974 ; [#uses=1] - store i8 %972, i8* %975, align 1 - %976 = add i32 %974, 1 ; [#uses=1] - store i32 %976, i32* %926, align 8 - %977 = load i32* %927, align 4 ; [#uses=1] - %978 = add i32 %977, 1 ; [#uses=1] - store i32 %978, i32* %927, align 4 - %979 = shl i32 %bsBuff.tmp.0350, 8 ; [#uses=2] - %980 = add i32 %bsLive.tmp.0351, -8 ; [#uses=3] - br label %bb1.i26.i.i - -bb1.i26.i.i: ; preds = %bb.i25.i.i, %bb151.i.i - %bsLive.tmp.0351 = phi i32 [ %bsLive.tmp.0355, %bb151.i.i ], [ %980, %bb.i25.i.i ] ; [#uses=1] - %bsBuff.tmp.0350 = phi i32 [ %bsBuff.tmp.0354, %bb151.i.i ], [ %979, %bb.i25.i.i ] ; [#uses=2] - %981 = phi i32 [ %980, %bb.i25.i.i ], [ %bsLive.tmp.0355, %bb151.i.i ] ; [#uses=2] - %982 = phi i32 [ %979, %bb.i25.i.i ], [ %bsBuff.tmp.0354, %bb151.i.i ] ; [#uses=1] - %983 = phi i32 [ %980, %bb.i25.i.i ], [ %bsLive.tmp.0355, %bb151.i.i ] ; [#uses=1] - %984 = icmp sgt i32 %983, 7 ; [#uses=1] - br i1 %984, label %bb.i25.i.i, label %bsW.exit28.i.i - -bsW.exit28.i.i: ; preds = %bb1.i26.i.i - %985 = sub i32 30, %981 ; [#uses=1] - %986 = shl i32 3, %985 ; [#uses=1] - %987 = or i32 %986, %bsBuff.tmp.0350 ; [#uses=3] - %988 = add i32 %981, 2 ; [#uses=4] - %989 = icmp slt i32 %970, %tmp135.i.i ; [#uses=1] - %indvar.next132.i.i = add i32 %indvar131.i.i, 1 ; [#uses=1] - br i1 %989, label %bb151.i.i, label %bb1.i19.i.i - -bb.i18.i.i: ; preds = %bb1.i19.i.i - %990 = lshr i32 %1001, 24 ; [#uses=1] - %991 = trunc i32 %990 to i8 ; [#uses=1] - %992 = load i8** %925, align 4 ; [#uses=1] - %993 = load i32* %926, align 8 ; [#uses=2] - %994 = getelementptr i8* %992, i32 %993 ; [#uses=1] - store i8 %991, i8* %994, align 1 - %995 = add i32 %993, 1 ; [#uses=1] - store i32 %995, i32* %926, align 8 - %996 = load i32* %927, align 4 ; [#uses=1] - %997 = add i32 %996, 1 ; [#uses=1] - store i32 %997, i32* %927, align 4 - %998 = shl i32 %bsBuff.tmp.0366, 8 ; [#uses=2] - %999 = add i32 %bsLive.tmp.0367, -8 ; [#uses=3] - br label %bb1.i19.i.i - -bb1.i19.i.i: ; preds = %bb.i18.i.i, %bsW.exit28.i.i, %bb152.preheader.i.i - %curr.2.lcssa.i.i = phi i32 [ %curr.0.lcssa.i.i, %bb152.preheader.i.i ], [ %tmp135.i.i, %bsW.exit28.i.i ], [ %curr.2.lcssa.i.i, %bb.i18.i.i ] ; [#uses=2] - %bsLive.tmp.0367 = phi i32 [ %999, %bb.i18.i.i ], [ %bsLive.tmp.1373, %bb152.preheader.i.i ], [ %988, %bsW.exit28.i.i ] ; [#uses=1] - %bsBuff.tmp.0366 = phi i32 [ %998, %bb.i18.i.i ], [ %bsBuff.tmp.1371, %bb152.preheader.i.i ], [ %987, %bsW.exit28.i.i ] ; [#uses=3] - %1000 = phi i32 [ %999, %bb.i18.i.i ], [ %bsLive.tmp.1373, %bb152.preheader.i.i ], [ %988, %bsW.exit28.i.i ] ; [#uses=1] - %1001 = phi i32 [ %998, %bb.i18.i.i ], [ %bsBuff.tmp.1371, %bb152.preheader.i.i ], [ %987, %bsW.exit28.i.i ] ; [#uses=1] - %1002 = phi i32 [ %999, %bb.i18.i.i ], [ %bsLive.tmp.1373, %bb152.preheader.i.i ], [ %988, %bsW.exit28.i.i ] ; [#uses=1] - %1003 = icmp sgt i32 %1002, 7 ; [#uses=1] - br i1 %1003, label %bb.i18.i.i, label %bsW.exit21.i.i - -bsW.exit21.i.i: ; preds = %bb1.i19.i.i - %1004 = add i32 %1000, 1 ; [#uses=2] - %1005 = add i32 %i.1013.i.i, 1 ; [#uses=2] - %exitcond.i.i66 = icmp eq i32 %1005, %509 ; [#uses=1] - br i1 %exitcond.i.i66, label %bb155.i.i, label %bb150.preheader.i.i - -bb150.preheader.i.i: ; preds = %bsW.exit21.i.i, %bsW.exit42.i.i - %bsLive.tmp.0372 = phi i32 [ %1004, %bsW.exit21.i.i ], [ %948, %bsW.exit42.i.i ] ; [#uses=2] - %bsBuff.tmp.0370 = phi i32 [ %bsBuff.tmp.0366, %bsW.exit21.i.i ], [ %947, %bsW.exit42.i.i ] ; [#uses=2] - %curr.114.i.i = phi i32 [ %curr.2.lcssa.i.i, %bsW.exit21.i.i ], [ %930, %bsW.exit42.i.i ] ; [#uses=3] - %i.1013.i.i = phi i32 [ %1005, %bsW.exit21.i.i ], [ 0, %bsW.exit42.i.i ] ; [#uses=2] - %scevgep137.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %928, i32 %i.1013.i.i ; [#uses=2] - %1006 = load i8* %scevgep137.i.i, align 1 ; [#uses=1] - %1007 = zext i8 %1006 to i32 ; [#uses=3] - %1008 = icmp sgt i32 %1007, %curr.114.i.i ; [#uses=1] - br i1 %1008, label %bb.nph8.i.i, label %bb152.preheader.i.i - -bb155.i.i: ; preds = %bsW.exit21.i.i, %bsW.exit42.i.i - %bsLive.tmp.1383 = phi i32 [ %948, %bsW.exit42.i.i ], [ %1004, %bsW.exit21.i.i ] ; [#uses=3] - %bsBuff.tmp.1381 = phi i32 [ %947, %bsW.exit42.i.i ], [ %bsBuff.tmp.0366, %bsW.exit21.i.i ] ; [#uses=3] - %1009 = add i32 %928, 1 ; [#uses=2] - %exitcond139.i.i = icmp eq i32 %1009, %smax181.i.i ; [#uses=1] - br i1 %exitcond139.i.i, label %bb157.i.i, label %bb148.i.i - -bb157.i.i: ; preds = %bb155.i.i - store i32 %bsBuff.tmp.1381, i32* @bsBuff - store i32 %bsLive.tmp.1383, i32* @bsLive - %1010 = load i32* @nMTF, align 4 ; [#uses=4] - %1011 = icmp sgt i32 %1010, 0 ; [#uses=1] - br i1 %1011, label %bb161.i.i.preheader, label %bb167.i.i - -bb161.i.i.preheader: ; preds = %bb157.i.i - %1012 = load i16** @szptr, align 4 ; [#uses=1] - %.b.i10.i.i = load i1* @bsStream.b ; [#uses=1] - %1013 = zext i1 %.b.i10.i.i to i32 ; [#uses=3] - %1014 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1013, i32 3 ; [#uses=1] - %1015 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1013, i32 2 ; [#uses=2] - %1016 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1013, i32 1 ; [#uses=2] - br label %bb161.i.i - -bb161.i.i: ; preds = %bb166.i.i, %bb161.i.i.preheader - %bsLive.tmp.1347 = phi i32 [ %bsLive.tmp.1383, %bb161.i.i.preheader ], [ %bsLive.tmp.0346, %bb166.i.i ] ; [#uses=2] - %bsBuff.tmp.1345 = phi i32 [ %bsBuff.tmp.1381, %bb161.i.i.preheader ], [ %bsBuff.tmp.0344, %bb166.i.i ] ; [#uses=2] - %gs.24.i.i = phi i32 [ %1050, %bb166.i.i ], [ 0, %bb161.i.i.preheader ] ; [#uses=4] - %selCtr.03.i.i = phi i32 [ %tmp124.i.i, %bb166.i.i ], [ 0, %bb161.i.i.preheader ] ; [#uses=2] - %tmp124.i.i = add i32 %selCtr.03.i.i, 1 ; [#uses=2] - %1017 = add i32 %gs.24.i.i, 49 ; [#uses=2] - %1018 = add i32 %1010, -1 ; [#uses=1] - %1019 = icmp slt i32 %1017, %1010 ; [#uses=1] - %.285.i.i = select i1 %1019, i32 %1017, i32 %1018 ; [#uses=3] - %1020 = icmp sgt i32 %gs.24.i.i, %.285.i.i ; [#uses=1] - br i1 %1020, label %bb166.i.i, label %bb.nph.i.i - -bb.nph.i.i: ; preds = %bb161.i.i - %scevgep123.i.i = getelementptr [18002 x i8]* @selector, i32 0, i32 %selCtr.03.i.i ; [#uses=1] - %tmp121.i.i = add i32 %gs.24.i.i, 1 ; [#uses=1] - %1021 = load i8* %scevgep123.i.i, align 1 ; [#uses=1] - %1022 = zext i8 %1021 to i32 ; [#uses=2] - br label %bb164.i.i - -bb164.i.i: ; preds = %bsW.exit14.i.i, %bb.nph.i.i - %bsLive.tmp.0341 = phi i32 [ %bsLive.tmp.1347, %bb.nph.i.i ], [ %1048, %bsW.exit14.i.i ] ; [#uses=3] - %bsBuff.tmp.0340 = phi i32 [ %bsBuff.tmp.1345, %bb.nph.i.i ], [ %1047, %bsW.exit14.i.i ] ; [#uses=2] - %indvar.i.i67 = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i69, %bsW.exit14.i.i ] ; [#uses=3] - %tmp.i.i = add i32 %indvar.i.i67, %gs.24.i.i ; [#uses=1] - %scevgep.i.i68 = getelementptr i16* %1012, i32 %tmp.i.i ; [#uses=1] - %1023 = load i16* %scevgep.i.i68, align 2 ; [#uses=1] - %1024 = zext i16 %1023 to i32 ; [#uses=2] - %1025 = getelementptr [6 x [258 x i32]]* @code, i32 0, i32 %1022, i32 %1024 ; [#uses=1] - %1026 = load i32* %1025, align 4 ; [#uses=1] - %1027 = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 %1022, i32 %1024 ; [#uses=1] - %1028 = load i8* %1027, align 1 ; [#uses=1] - %1029 = zext i8 %1028 to i32 ; [#uses=2] - br label %bb1.i12.i.i - -bb.i11.i.i: ; preds = %bb1.i12.i.i - %1030 = lshr i32 %1041, 24 ; [#uses=1] - %1031 = trunc i32 %1030 to i8 ; [#uses=1] - %1032 = load i8** %1014, align 4 ; [#uses=1] - %1033 = load i32* %1015, align 8 ; [#uses=2] - %1034 = getelementptr i8* %1032, i32 %1033 ; [#uses=1] - store i8 %1031, i8* %1034, align 1 - %1035 = add i32 %1033, 1 ; [#uses=1] - store i32 %1035, i32* %1015, align 8 - %1036 = load i32* %1016, align 4 ; [#uses=1] - %1037 = add i32 %1036, 1 ; [#uses=1] - store i32 %1037, i32* %1016, align 4 - %1038 = shl i32 %bsBuff.tmp.0336, 8 ; [#uses=2] - %1039 = add i32 %bsLive.tmp.0337, -8 ; [#uses=3] - br label %bb1.i12.i.i - -bb1.i12.i.i: ; preds = %bb.i11.i.i, %bb164.i.i - %bsLive.tmp.0337 = phi i32 [ %bsLive.tmp.0341, %bb164.i.i ], [ %1039, %bb.i11.i.i ] ; [#uses=1] - %bsBuff.tmp.0336 = phi i32 [ %bsBuff.tmp.0340, %bb164.i.i ], [ %1038, %bb.i11.i.i ] ; [#uses=2] - %1040 = phi i32 [ %1039, %bb.i11.i.i ], [ %bsLive.tmp.0341, %bb164.i.i ] ; [#uses=2] - %1041 = phi i32 [ %1038, %bb.i11.i.i ], [ %bsBuff.tmp.0340, %bb164.i.i ] ; [#uses=1] - %1042 = phi i32 [ %1039, %bb.i11.i.i ], [ %bsLive.tmp.0341, %bb164.i.i ] ; [#uses=1] - %1043 = icmp sgt i32 %1042, 7 ; [#uses=1] - br i1 %1043, label %bb.i11.i.i, label %bsW.exit14.i.i - -bsW.exit14.i.i: ; preds = %bb1.i12.i.i - %1044 = sub i32 32, %1029 ; [#uses=1] - %1045 = sub i32 %1044, %1040 ; [#uses=1] - %1046 = shl i32 %1026, %1045 ; [#uses=1] - %1047 = or i32 %1046, %bsBuff.tmp.0336 ; [#uses=2] - %1048 = add i32 %1040, %1029 ; [#uses=2] - %tmp122.i.i = add i32 %indvar.i.i67, %tmp121.i.i ; [#uses=1] - %1049 = icmp sgt i32 %tmp122.i.i, %.285.i.i ; [#uses=1] - %indvar.next.i.i69 = add i32 %indvar.i.i67, 1 ; [#uses=1] - br i1 %1049, label %bb166.i.i, label %bb164.i.i - -bb166.i.i: ; preds = %bsW.exit14.i.i, %bb161.i.i - %bsLive.tmp.0346 = phi i32 [ %bsLive.tmp.1347, %bb161.i.i ], [ %1048, %bsW.exit14.i.i ] ; [#uses=2] - %bsBuff.tmp.0344 = phi i32 [ %bsBuff.tmp.1345, %bb161.i.i ], [ %1047, %bsW.exit14.i.i ] ; [#uses=2] - %1050 = add i32 %.285.i.i, 1 ; [#uses=2] - %1051 = icmp slt i32 %1050, %1010 ; [#uses=1] - br i1 %1051, label %bb161.i.i, label %bb167.i.i.loopexit - -bb167.i.i.loopexit: ; preds = %bb166.i.i - store i32 %bsBuff.tmp.0344, i32* @bsBuff - store i32 %bsLive.tmp.0346, i32* @bsLive - br label %bb167.i.i - -bb167.i.i: ; preds = %bb167.i.i.loopexit, %bb157.i.i - %selCtr.0.lcssa.i.i = phi i32 [ 0, %bb157.i.i ], [ %tmp124.i.i, %bb167.i.i.loopexit ] ; [#uses=1] - %1052 = icmp eq i32 %selCtr.0.lcssa.i.i, %nSelectors.1.lcssa.i.i ; [#uses=1] - br i1 %1052, label %sendMTFValues.exit.i, label %bb168.i.i - -bb168.i.i: ; preds = %bb167.i.i - call fastcc void @panic(i8* getelementptr ([17 x i8]* @"\01LC46", i32 0, i32 0)) nounwind ssp - unreachable - -bb4.1.i.i: ; preds = %bb4.1.i.i, %bb4.i.i19 - %v.0107.1.i.i = phi i32 [ %1053, %bb4.1.i.i ], [ 0, %bb4.i.i19 ] ; [#uses=2] - %scevgep268.1.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 1, i32 %v.0107.1.i.i ; [#uses=1] - store i8 15, i8* %scevgep268.1.i.i, align 1 - %1053 = add i32 %v.0107.1.i.i, 1 ; [#uses=2] - %exitcond267.1.i.i = icmp eq i32 %1053, %509 ; [#uses=1] - br i1 %exitcond267.1.i.i, label %bb4.2.i.i, label %bb4.1.i.i - -bb4.2.i.i: ; preds = %bb4.2.i.i, %bb4.1.i.i - %v.0107.2.i.i = phi i32 [ %1054, %bb4.2.i.i ], [ 0, %bb4.1.i.i ] ; [#uses=2] - %scevgep268.2.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 2, i32 %v.0107.2.i.i ; [#uses=1] - store i8 15, i8* %scevgep268.2.i.i, align 1 - %1054 = add i32 %v.0107.2.i.i, 1 ; [#uses=2] - %exitcond267.2.i.i = icmp eq i32 %1054, %509 ; [#uses=1] - br i1 %exitcond267.2.i.i, label %bb4.3.i.i, label %bb4.2.i.i - -bb4.3.i.i: ; preds = %bb4.3.i.i, %bb4.2.i.i - %v.0107.3.i.i = phi i32 [ %1055, %bb4.3.i.i ], [ 0, %bb4.2.i.i ] ; [#uses=2] - %scevgep268.3.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 3, i32 %v.0107.3.i.i ; [#uses=1] - store i8 15, i8* %scevgep268.3.i.i, align 1 - %1055 = add i32 %v.0107.3.i.i, 1 ; [#uses=2] - %exitcond267.3.i.i = icmp eq i32 %1055, %509 ; [#uses=1] - br i1 %exitcond267.3.i.i, label %bb4.4.i.i, label %bb4.3.i.i - -bb4.4.i.i: ; preds = %bb4.4.i.i, %bb4.3.i.i - %v.0107.4.i.i = phi i32 [ %1056, %bb4.4.i.i ], [ 0, %bb4.3.i.i ] ; [#uses=2] - %scevgep268.4.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 4, i32 %v.0107.4.i.i ; [#uses=1] - store i8 15, i8* %scevgep268.4.i.i, align 1 - %1056 = add i32 %v.0107.4.i.i, 1 ; [#uses=2] - %exitcond267.4.i.i = icmp eq i32 %1056, %509 ; [#uses=1] - br i1 %exitcond267.4.i.i, label %bb4.5.i.i, label %bb4.4.i.i - -bb4.5.i.i: ; preds = %bb4.5.i.i, %bb4.4.i.i - %v.0107.5.i.i = phi i32 [ %1057, %bb4.5.i.i ], [ 0, %bb4.4.i.i ] ; [#uses=2] - %scevgep268.5.i.i = getelementptr [6 x [258 x i8]]* @len, i32 0, i32 5, i32 %v.0107.5.i.i ; [#uses=1] - store i8 15, i8* %scevgep268.5.i.i, align 1 - %1057 = add i32 %v.0107.5.i.i, 1 ; [#uses=2] - %exitcond267.5.i.i = icmp eq i32 %1057, %509 ; [#uses=1] - br i1 %exitcond267.5.i.i, label %bb8.i.i20, label %bb4.5.i.i - -sendMTFValues.exit.i: ; preds = %bb167.i.i - store i32 -1, i32* @globalCrc, align 4 - tail call fastcc void @loadAndRLEsource() nounwind ssp - %1058 = load i32* @last, align 4 ; [#uses=2] - %1059 = icmp eq i32 %1058, -1 ; [#uses=1] - br i1 %1059, label %bb8.i70, label %bb2.i11 - -bb8.i70: ; preds = %sendMTFValues.exit.i, %bsW.exit193.i - %combinedCRC.0.lcssa.i = phi i32 [ 0, %bsW.exit193.i ], [ %192, %sendMTFValues.exit.i ] ; [#uses=4] - %.pr.i60.i = load i32* @bsLive ; [#uses=3] - %.pre.i61.i = load i32* @bsBuff, align 4 ; [#uses=2] - %.b.i62.i = load i1* @bsStream.b ; [#uses=1] - %1060 = zext i1 %.b.i62.i to i32 ; [#uses=3] - %1061 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1060, i32 3 ; [#uses=1] - %1062 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1060, i32 2 ; [#uses=2] - %1063 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1060, i32 1 ; [#uses=2] - br label %bb1.i64.i71 - -bb.i63.i: ; preds = %bb1.i64.i71 - %1064 = lshr i32 %1075, 24 ; [#uses=1] - %1065 = trunc i32 %1064 to i8 ; [#uses=1] - %1066 = load i8** %1061, align 4 ; [#uses=1] - %1067 = load i32* %1062, align 8 ; [#uses=2] - %1068 = getelementptr i8* %1066, i32 %1067 ; [#uses=1] - store i8 %1065, i8* %1068, align 1 - %1069 = add i32 %1067, 1 ; [#uses=1] - store i32 %1069, i32* %1062, align 8 - %1070 = load i32* %1063, align 4 ; [#uses=1] - %1071 = add i32 %1070, 1 ; [#uses=1] - store i32 %1071, i32* %1063, align 4 - %1072 = shl i32 %bsBuff.tmp.0512, 8 ; [#uses=2] - %1073 = add i32 %bsLive.tmp.0513, -8 ; [#uses=3] - br label %bb1.i64.i71 - -bb1.i64.i71: ; preds = %bb.i63.i, %bb8.i70 - %bsLive.tmp.0513 = phi i32 [ %.pr.i60.i, %bb8.i70 ], [ %1073, %bb.i63.i ] ; [#uses=1] - %bsBuff.tmp.0512 = phi i32 [ %.pre.i61.i, %bb8.i70 ], [ %1072, %bb.i63.i ] ; [#uses=2] - %1074 = phi i32 [ %1073, %bb.i63.i ], [ %.pr.i60.i, %bb8.i70 ] ; [#uses=2] - %1075 = phi i32 [ %1072, %bb.i63.i ], [ %.pre.i61.i, %bb8.i70 ] ; [#uses=1] - %1076 = phi i32 [ %1073, %bb.i63.i ], [ %.pr.i60.i, %bb8.i70 ] ; [#uses=1] - %1077 = icmp sgt i32 %1076, 7 ; [#uses=1] - br i1 %1077, label %bb.i63.i, label %bsW.exit65.i - -bsW.exit65.i: ; preds = %bb1.i64.i71 - %1078 = sub i32 24, %1074 ; [#uses=1] - %1079 = shl i32 23, %1078 ; [#uses=1] - %1080 = or i32 %1079, %bsBuff.tmp.0512 ; [#uses=3] - store i32 %1080, i32* @bsBuff, align 4 - %1081 = add i32 %1074, 8 ; [#uses=4] - store i32 %1081, i32* @bsLive, align 4 - %.b.i56.i72 = load i1* @bsStream.b ; [#uses=1] - %1082 = zext i1 %.b.i56.i72 to i32 ; [#uses=3] - %1083 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1082, i32 3 ; [#uses=1] - %1084 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1082, i32 2 ; [#uses=2] - %1085 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1082, i32 1 ; [#uses=2] - br label %bb1.i58.i - -bb.i57.i: ; preds = %bb1.i58.i - %1086 = lshr i32 %1097, 24 ; [#uses=1] - %1087 = trunc i32 %1086 to i8 ; [#uses=1] - %1088 = load i8** %1083, align 4 ; [#uses=1] - %1089 = load i32* %1084, align 8 ; [#uses=2] - %1090 = getelementptr i8* %1088, i32 %1089 ; [#uses=1] - store i8 %1087, i8* %1090, align 1 - %1091 = add i32 %1089, 1 ; [#uses=1] - store i32 %1091, i32* %1084, align 8 - %1092 = load i32* %1085, align 4 ; [#uses=1] - %1093 = add i32 %1092, 1 ; [#uses=1] - store i32 %1093, i32* %1085, align 4 - %1094 = shl i32 %bsBuff.tmp.0516, 8 ; [#uses=2] - %1095 = add i32 %bsLive.tmp.0517, -8 ; [#uses=3] - br label %bb1.i58.i - -bb1.i58.i: ; preds = %bb.i57.i, %bsW.exit65.i - %bsLive.tmp.0517 = phi i32 [ %1081, %bsW.exit65.i ], [ %1095, %bb.i57.i ] ; [#uses=1] - %bsBuff.tmp.0516 = phi i32 [ %1080, %bsW.exit65.i ], [ %1094, %bb.i57.i ] ; [#uses=2] - %1096 = phi i32 [ %1095, %bb.i57.i ], [ %1081, %bsW.exit65.i ] ; [#uses=2] - %1097 = phi i32 [ %1094, %bb.i57.i ], [ %1080, %bsW.exit65.i ] ; [#uses=1] - %1098 = phi i32 [ %1095, %bb.i57.i ], [ %1081, %bsW.exit65.i ] ; [#uses=1] - %1099 = icmp sgt i32 %1098, 7 ; [#uses=1] - br i1 %1099, label %bb.i57.i, label %bsW.exit59.i - -bsW.exit59.i: ; preds = %bb1.i58.i - %1100 = sub i32 24, %1096 ; [#uses=1] - %1101 = shl i32 114, %1100 ; [#uses=1] - %1102 = or i32 %1101, %bsBuff.tmp.0516 ; [#uses=3] - store i32 %1102, i32* @bsBuff, align 4 - %1103 = add i32 %1096, 8 ; [#uses=4] - store i32 %1103, i32* @bsLive, align 4 - %.b.i50.i = load i1* @bsStream.b ; [#uses=1] - %1104 = zext i1 %.b.i50.i to i32 ; [#uses=3] - %1105 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1104, i32 3 ; [#uses=1] - %1106 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1104, i32 2 ; [#uses=2] - %1107 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1104, i32 1 ; [#uses=2] - br label %bb1.i52.i - -bb.i51.i: ; preds = %bb1.i52.i - %1108 = lshr i32 %1119, 24 ; [#uses=1] - %1109 = trunc i32 %1108 to i8 ; [#uses=1] - %1110 = load i8** %1105, align 4 ; [#uses=1] - %1111 = load i32* %1106, align 8 ; [#uses=2] - %1112 = getelementptr i8* %1110, i32 %1111 ; [#uses=1] - store i8 %1109, i8* %1112, align 1 - %1113 = add i32 %1111, 1 ; [#uses=1] - store i32 %1113, i32* %1106, align 8 - %1114 = load i32* %1107, align 4 ; [#uses=1] - %1115 = add i32 %1114, 1 ; [#uses=1] - store i32 %1115, i32* %1107, align 4 - %1116 = shl i32 %bsBuff.tmp.0520, 8 ; [#uses=2] - %1117 = add i32 %bsLive.tmp.0521, -8 ; [#uses=3] - br label %bb1.i52.i - -bb1.i52.i: ; preds = %bb.i51.i, %bsW.exit59.i - %bsLive.tmp.0521 = phi i32 [ %1103, %bsW.exit59.i ], [ %1117, %bb.i51.i ] ; [#uses=1] - %bsBuff.tmp.0520 = phi i32 [ %1102, %bsW.exit59.i ], [ %1116, %bb.i51.i ] ; [#uses=2] - %1118 = phi i32 [ %1117, %bb.i51.i ], [ %1103, %bsW.exit59.i ] ; [#uses=2] - %1119 = phi i32 [ %1116, %bb.i51.i ], [ %1102, %bsW.exit59.i ] ; [#uses=1] - %1120 = phi i32 [ %1117, %bb.i51.i ], [ %1103, %bsW.exit59.i ] ; [#uses=1] - %1121 = icmp sgt i32 %1120, 7 ; [#uses=1] - br i1 %1121, label %bb.i51.i, label %bsW.exit53.i - -bsW.exit53.i: ; preds = %bb1.i52.i - %1122 = sub i32 24, %1118 ; [#uses=1] - %1123 = shl i32 69, %1122 ; [#uses=1] - %1124 = or i32 %1123, %bsBuff.tmp.0520 ; [#uses=3] - store i32 %1124, i32* @bsBuff, align 4 - %1125 = add i32 %1118, 8 ; [#uses=4] - store i32 %1125, i32* @bsLive, align 4 - %.b.i44.i = load i1* @bsStream.b ; [#uses=1] - %1126 = zext i1 %.b.i44.i to i32 ; [#uses=3] - %1127 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1126, i32 3 ; [#uses=1] - %1128 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1126, i32 2 ; [#uses=2] - %1129 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1126, i32 1 ; [#uses=2] - br label %bb1.i46.i - -bb.i45.i: ; preds = %bb1.i46.i - %1130 = lshr i32 %1141, 24 ; [#uses=1] - %1131 = trunc i32 %1130 to i8 ; [#uses=1] - %1132 = load i8** %1127, align 4 ; [#uses=1] - %1133 = load i32* %1128, align 8 ; [#uses=2] - %1134 = getelementptr i8* %1132, i32 %1133 ; [#uses=1] - store i8 %1131, i8* %1134, align 1 - %1135 = add i32 %1133, 1 ; [#uses=1] - store i32 %1135, i32* %1128, align 8 - %1136 = load i32* %1129, align 4 ; [#uses=1] - %1137 = add i32 %1136, 1 ; [#uses=1] - store i32 %1137, i32* %1129, align 4 - %1138 = shl i32 %bsBuff.tmp.0524, 8 ; [#uses=2] - %1139 = add i32 %bsLive.tmp.0525, -8 ; [#uses=3] - br label %bb1.i46.i - -bb1.i46.i: ; preds = %bb.i45.i, %bsW.exit53.i - %bsLive.tmp.0525 = phi i32 [ %1125, %bsW.exit53.i ], [ %1139, %bb.i45.i ] ; [#uses=1] - %bsBuff.tmp.0524 = phi i32 [ %1124, %bsW.exit53.i ], [ %1138, %bb.i45.i ] ; [#uses=2] - %1140 = phi i32 [ %1139, %bb.i45.i ], [ %1125, %bsW.exit53.i ] ; [#uses=2] - %1141 = phi i32 [ %1138, %bb.i45.i ], [ %1124, %bsW.exit53.i ] ; [#uses=1] - %1142 = phi i32 [ %1139, %bb.i45.i ], [ %1125, %bsW.exit53.i ] ; [#uses=1] - %1143 = icmp sgt i32 %1142, 7 ; [#uses=1] - br i1 %1143, label %bb.i45.i, label %bsW.exit47.i - -bsW.exit47.i: ; preds = %bb1.i46.i - %1144 = sub i32 24, %1140 ; [#uses=1] - %1145 = shl i32 56, %1144 ; [#uses=1] - %1146 = or i32 %1145, %bsBuff.tmp.0524 ; [#uses=3] - store i32 %1146, i32* @bsBuff, align 4 - %1147 = add i32 %1140, 8 ; [#uses=4] - store i32 %1147, i32* @bsLive, align 4 - %.b.i38.i = load i1* @bsStream.b ; [#uses=1] - %1148 = zext i1 %.b.i38.i to i32 ; [#uses=3] - %1149 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1148, i32 3 ; [#uses=1] - %1150 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1148, i32 2 ; [#uses=2] - %1151 = getelementptr [3 x %struct.spec_fd_t]* @spec_fd, i32 0, i32 %1148, i32 1 ; [#uses=2] - br label %bb1.i40.i - -bb.i39.i: ; preds = %bb1.i40.i - %1152 = lshr i32 %1163, 24 ; [#uses=1] - %1153 = trunc i32 %1152 to i8 ; [#uses=1] - %1154 = load i8** %1149, align 4 ; [#uses=1] - %1155 = load i32* %1150, align 8 ; [#uses=2] - %1156 = getelementptr i8* %1154, i32 %1155 ; [#uses=1] - store i8 %1153, i8* %1156, align 1 - %1157 = add i32 %1155, 1 ; [#uses=1] - store i32 %1157, i32* %1150, align 8 - %1158 = load i32* %1151, align 4 ; [#uses=1] - %1159 = add i32 %1158, 1 ; [#uses=1] - store i32 %1159, i32* %1151, align 4 - %1160 = shl i32 %bsBuff.tmp.0528, 8 ; [#uses=2] - %1161 = add i32 %bsLive.tmp.0529, -8 ; [#uses=3] - br label %bb1.i40.i - -bb1.i40.i: ; preds = %bb.i39.i, %bsW.exit47.i - %bsLive.tmp.0529 = phi i32 [ %1147, %bsW.exit47.i ], [ %1161, %bb.i39.i ] ; [#uses=1] - %bsBuff.tmp.0528 = phi i32 [ %1146, %bsW.exit47.i ], [ %1160, %bb.i39.i ] ; [#uses=2] - %1162 = phi i32 [ %1161, %bb.i39.i ], [ %1147, %bsW.exit47.i ] ; [#uses=2] - %1163 = phi i32 [ %1160, %bb.i39.i ], [ %1146, %bsW.exit47.i ] ; [#uses=1] - %1164 = phi i32 [ %1161, %bb.i39.i ], [ %1147, %bsW.exit47.i ] ; [#uses=1] - %1165 = icmp sgt i32 %1164, 7 ; [#uses=1] - br i1 %1165, label %bb.i39.i, label %bsW.exit41.i - -bsW.exit41.i: