From sanjiv.gupta at microchip.com Mon May 11 01:01:38 2009 From: sanjiv.gupta at microchip.com (Sanjiv Gupta) Date: Mon, 11 May 2009 06:01:38 -0000 Subject: [llvm-commits] [llvm] r71423 - in /llvm/trunk/lib/Target/PIC16: PIC16.h PIC16AsmPrinter.cpp PIC16AsmPrinter.h PIC16MemSelOpt.cpp Message-ID: <200905110601.n4B61cDs021332@zion.cs.uiuc.edu> Author: sgupta Date: Mon May 11 01:01:38 2009 New Revision: 71423 URL: http://llvm.org/viewvc/llvm-project?rev=71423&view=rev Log: Detect calls to compiler intrinsics and emit an extern declarations only for those. These extern declarations to intrinsics are currently being emitted at the bottom of generated .s file, which works fine with gpasm(not sure about MPSAM though). PIC16 linker generates errors for few cases (function-args/struct_args_5) if you do not include any extern declarations (even if no intrinsics are being used), but that needs to be fixed in the linker itself. Modified: llvm/trunk/lib/Target/PIC16/PIC16.h llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h llvm/trunk/lib/Target/PIC16/PIC16MemSelOpt.cpp Modified: llvm/trunk/lib/Target/PIC16/PIC16.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16.h?rev=71423&r1=71422&r2=71423&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16.h Mon May 11 01:01:38 2009 @@ -114,7 +114,7 @@ case TEMPS_LABEL: return ".temp."; case ARGS_LABEL: return ".args."; case RET_LABEL: return ".ret."; - case LIBCALL: return ".lib."; + case LIBCALL: return "__intrinsics"; case FRAME_SECTION: return ".fpdata."; case AUTOS_SECTION: return ".fadata."; case CODE_SECTION: return "code"; @@ -234,6 +234,12 @@ return o.str(); } + static std::string getDeclSectionName(void) { + std::string dsname = "decl_section.1"; + dsname = addPrefix(dsname); + return dsname; + } + inline static bool isLocalName (const std::string &Name) { if (getSymbolTag(Name) == AUTOS_LABEL) return true; Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp?rev=71423&r1=71422&r2=71423&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp Mon May 11 01:01:38 2009 @@ -87,6 +87,7 @@ CurLine = line; } } + // Print the assembly for the instruction. printMachineInstruction(II); } @@ -106,6 +107,8 @@ return new PIC16AsmPrinter(o, tm, tm.getTargetAsmInfo(), OptLevel, verbose); } + +// printOperand - print operand of insn. void PIC16AsmPrinter::printOperand(const MachineInstr *MI, int opNum) { const MachineOperand &MO = MI->getOperand(opNum); @@ -126,8 +129,14 @@ break; } case MachineOperand::MO_ExternalSymbol: { - std::string Name = MO.getSymbolName(); - O << MO.getSymbolName(); + const char *Sname = MO.getSymbolName(); + + // If its a libcall name, record it to decls section. + if (PAN::getSymbolTag(Sname) == PAN::LIBCALL) { + Decls.push_back(Sname); + } + + O << Sname; break; } case MachineOperand::MO_MachineBasicBlock: @@ -144,6 +153,23 @@ O << PIC16CondCodeToString((PIC16CC::CondCodes)CC); } +void PIC16AsmPrinter::printDecls(void) { + // If no libcalls used, return. + if (Decls.empty()) return; + + const Section *S = TAI->getNamedSection(PAN::getDeclSectionName().c_str()); + SwitchToSection(S); + // Remove duplicate entries. + Decls.sort(); + Decls.unique(); + for (std::list::const_iterator I = Decls.begin(); + I != Decls.end(); I++) { + O << TAI->getExternDirective() << *I << "\n"; + // FIXME: Use PAN::getXXXLabel() funtions hrer. + O << TAI->getExternDirective() << *I << ".args." << "\n"; + O << TAI->getExternDirective() << *I << ".ret." << "\n"; + } +} bool PIC16AsmPrinter::doInitialization (Module &M) { bool Result = AsmPrinter::doInitialization(M); @@ -188,7 +214,7 @@ // Emit header file to include declaration of library functions // FIXME: find out libcall names. - O << "\t#include C16IntrinsicCalls.INC\n"; + // O << "\t#include C16IntrinsicCalls.INC\n"; // Emit declarations for external variable declarations and definitions. for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); @@ -212,7 +238,6 @@ void PIC16AsmPrinter::EmitRomData (Module &M) { SwitchToSection(TAI->getReadOnlySection()); - IsRomData = true; for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) { if (!I->hasInitializer()) // External global require no code. @@ -238,10 +263,10 @@ O << "\n"; } } - IsRomData = false; } bool PIC16AsmPrinter::doFinalization(Module &M) { + printDecls(); O << "\t" << "END\n"; bool Result = AsmPrinter::doFinalization(M); return Result; Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h?rev=71423&r1=71422&r2=71423&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h Mon May 11 01:01:38 2009 @@ -21,6 +21,8 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Target/TargetAsmInfo.h" #include "llvm/Target/TargetMachine.h" +#include +#include namespace llvm { struct VISIBILITY_HIDDEN PIC16AsmPrinter : public AsmPrinter { @@ -28,8 +30,6 @@ const TargetAsmInfo *T, CodeGenOpt::Level OL, bool V) : AsmPrinter(O, TM, T, OL, V) { - FunctionLabelBegin = '@'; - IsRomData = false; PTLI = TM.getTargetLowering(); } private : @@ -46,6 +46,7 @@ void EmitGlobalData (Module &M); void EmitRomData (Module &M); void emitFunctionData(MachineFunction &MF); + void printDecls(void); protected: bool doInitialization(Module &M); @@ -53,8 +54,7 @@ private: PIC16TargetLowering *PTLI; - bool IsRomData; - char FunctionLabelBegin; + std::list Decls; // List of extern decls. }; } // end of namespace Modified: llvm/trunk/lib/Target/PIC16/PIC16MemSelOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16MemSelOpt.cpp?rev=71423&r1=71422&r2=71423&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16MemSelOpt.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16MemSelOpt.cpp Mon May 11 01:01:38 2009 @@ -137,6 +137,8 @@ } // Get the section name(NewBank) for MemOp. + // This assumes that the section names for globals are laready set by + // AsmPrinter->doInitialization. std::string NewBank = CurBank; if (Op.getType() == MachineOperand::MO_GlobalAddress && Op.getGlobal()->getType()->getAddressSpace() == PIC16ISD::RAM_SPACE) { From mrs at apple.com Mon May 11 01:58:01 2009 From: mrs at apple.com (Mike Stump) Date: Sun, 10 May 2009 23:58:01 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r71287 - in /llvm-gcc-4.2/trunk: build_gcc gcc/ChangeLog.apple gcc/config/arm/arm.c gcc/cp/mangle.c gcc/objc/ChangeLog.apple gcc/objc/objc-act.c gcc/testsuite/ChangeLog.apple gcc/testsuite/g++.apple/anon-1.C gcc/testsuite/gcc.apple/weak.c gcc/testsuite/objc.dg/property-16.m gcc/tree-eh.c gcc/version.c In-Reply-To: <200905090837.04512.baldrick@free.fr> References: <200905082316.n48NGDbU031470@zion.cs.uiuc.edu> <200905090837.04512.baldrick@free.fr> Message-ID: On May 8, 2009, at 11:37 PM, Duncan Sands wrote: >> + /* APPLE LOCAL begin weak variables 6822086 */ >> + case VAR_DECL: >> + /* Assume that weak variables may trap. */ >> + if (DECL_WEAK (expr)) >> + return true; >> + return false; >> + /* APPLE LOCAL end weak variables 6822086 */ > > shouldn't this only be needed for weak references > (gets turned into ExternalWeakLinkage in LLVM)? I don't know why that would be the case. Also, chosen for symmetry with the case just before it. I don't see why one can't have a weak definition that winds up not being used that turns out to be not defined as runtime, thus, being 0. Anything prevent that case? From baldrick at free.fr Mon May 11 02:18:31 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 11 May 2009 09:18:31 +0200 Subject: [llvm-commits] =?iso-8859-1?q?=5Bllvm-gcc-4=2E2=5D_r71287_-_in_/l?= =?iso-8859-1?q?lvm-gcc-4=2E2/trunk=3A_build=5Fgcc_gcc/ChangeLog=2Eapple_g?= =?iso-8859-1?q?cc/config/arm/arm=2Ec=09gcc/cp/mangle=2Ec_gcc/objc/ChangeL?= =?iso-8859-1?q?og=2Eapple_gcc/objc/objc-act=2Ec=09gcc/testsuite/ChangeLog?= =?iso-8859-1?q?=2Eapple_gcc/testsuite/g++=2Eapple/anon-1=2EC=09gcc/testsu?= =?iso-8859-1?q?ite/gcc=2Eapple/weak=2Ec_gcc/testsuite/objc=2Edg/property-?= =?iso-8859-1?q?16=2Em_gcc/tree-eh=2Ec_gcc/version=2Ec?= In-Reply-To: References: <200905082316.n48NGDbU031470@zion.cs.uiuc.edu> <200905090837.04512.baldrick@free.fr> Message-ID: <200905110918.32499.baldrick@free.fr> Hi, On Monday 11 May 2009 08:58:01 am Mike Stump wrote: > On May 8, 2009, at 11:37 PM, Duncan Sands wrote: > >> + /* APPLE LOCAL begin weak variables 6822086 */ > >> + case VAR_DECL: > >> + /* Assume that weak variables may trap. */ > >> + if (DECL_WEAK (expr)) > >> + return true; > >> + return false; > >> + /* APPLE LOCAL end weak variables 6822086 */ > > > > shouldn't this only be needed for weak references > > (gets turned into ExternalWeakLinkage in LLVM)? > > I don't know why that would be the case. Also, chosen for symmetry > with the case just before it. I don't see why one can't have a weak > definition that winds up not being used that turns out to be not > defined as runtime, thus, being 0. Anything prevent that case? isn't that exactly what ExternalWeakLinkage is about? A variable that ends up with WeakLinkage in LLVM is always defined. The definition may change at link time, but it always has one. Its address is non-null. On the other hand a variable with ExternalWeakLinkage may never get a definition at all, and its address will be null if it is never defined. I'm not sure what this trapping logic is about exactly, but I guessed it was referring to this last case. If so, that means that returning "true" for anything with DECL_WEAK set is not wrong, but suboptimal. Ciao, Duncan. From sanjiv.gupta at microchip.com Mon May 11 03:52:14 2009 From: sanjiv.gupta at microchip.com (Sanjiv Gupta) Date: Mon, 11 May 2009 08:52:14 -0000 Subject: [llvm-commits] [llvm] r71424 - in /llvm/trunk/lib/Target/PIC16: PIC16.h PIC16AsmPrinter.cpp PIC16ISelLowering.cpp PIC16ISelLowering.h Message-ID: <200905110852.n4B8qGZ4005304@zion.cs.uiuc.edu> Author: sgupta Date: Mon May 11 03:52:04 2009 New Revision: 71424 URL: http://llvm.org/viewvc/llvm-project?rev=71424&view=rev Log: Fix more naming issues. compiler libcalls start with .lib. now. fixed section names. Modified: llvm/trunk/lib/Target/PIC16/PIC16.h llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h Modified: llvm/trunk/lib/Target/PIC16/PIC16.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16.h?rev=71424&r1=71423&r2=71424&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16.h Mon May 11 03:52:04 2009 @@ -72,11 +72,11 @@ // Its temp data: @foo.temp. // Its arg passing: @foo.args. //---------------------------------------------- - // Libcall - compiler generated libcall names must have a .lib. + // Libcall - compiler generated libcall names must start with .lib. // This id will be used to emit extern decls for libcalls. - // Example - libcall name: @sra_i8.lib. - // To pass args: @sra_i8.args. - // To return val: @sra_i8.ret. + // Example - libcall name: @.lib.sra.i8 + // To pass args: @.lib.sra.i8.args. + // To return val: @.lib.sra.i8.ret. //---------------------------------------------- // SECTION Names // uninitialized globals - @udata..# @@ -114,10 +114,10 @@ case TEMPS_LABEL: return ".temp."; case ARGS_LABEL: return ".args."; case RET_LABEL: return ".ret."; - case LIBCALL: return "__intrinsics"; - case FRAME_SECTION: return ".fpdata."; - case AUTOS_SECTION: return ".fadata."; - case CODE_SECTION: return "code"; + case LIBCALL: return ".lib."; + case FRAME_SECTION: return ".frame_section."; + case AUTOS_SECTION: return ".autos_section."; + case CODE_SECTION: return ".code_section."; } } @@ -205,19 +205,19 @@ static std::string getFrameSectionName(const std::string &Func) { std::string Func1 = addPrefix(Func); std::string tag = getTagName(FRAME_SECTION); - return Func1 + tag + " UDATA_OVR"; + return Func1 + tag + "# UDATA_OVR"; } static std::string getAutosSectionName(const std::string &Func) { std::string Func1 = addPrefix(Func); std::string tag = getTagName(AUTOS_SECTION); - return Func1 + tag + " UDATA_OVR"; + return Func1 + tag + "# UDATA_OVR"; } static std::string getCodeSectionName(const std::string &Func) { std::string Func1 = addPrefix(Func); std::string tag = getTagName(CODE_SECTION); - return Func1 + tag + " CODE"; + return Func1 + tag + "# CODE"; } // udata and idata section names are generated by a given number. @@ -235,7 +235,15 @@ } static std::string getDeclSectionName(void) { - std::string dsname = "decl_section.1"; + std::string dsname = "section.0"; + dsname = addPrefix(dsname); + return dsname; + } + + // FIXME: currently decls for libcalls are into a separate section. + // merge the rest of decls to one. + static std::string getLibDeclSectionName(void) { + std::string dsname = "lib_decls.0"; dsname = addPrefix(dsname); return dsname; } @@ -285,7 +293,6 @@ } } } - }; // class PAN. Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp?rev=71424&r1=71423&r2=71424&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp Mon May 11 03:52:04 2009 @@ -157,7 +157,7 @@ // If no libcalls used, return. if (Decls.empty()) return; - const Section *S = TAI->getNamedSection(PAN::getDeclSectionName().c_str()); + const Section *S = TAI->getNamedSection(PAN::getLibDeclSectionName().c_str()); SwitchToSection(S); // Remove duplicate entries. Decls.sort(); @@ -166,8 +166,8 @@ I != Decls.end(); I++) { O << TAI->getExternDirective() << *I << "\n"; // FIXME: Use PAN::getXXXLabel() funtions hrer. - O << TAI->getExternDirective() << *I << ".args." << "\n"; - O << TAI->getExternDirective() << *I << ".ret." << "\n"; + O << TAI->getExternDirective() << PAN::getArgsLabel(*I) << "\n"; + O << TAI->getExternDirective() << PAN::getRetvalLabel(*I) << "\n"; } } @@ -191,7 +191,7 @@ void PIC16AsmPrinter::EmitExternsAndGlobals (Module &M) { // Emit declarations for external functions. - O << "section.0" <<"\n"; + O << PAN::getDeclSectionName() <<"\n"; for (Module::iterator I = M.begin(), E = M.end(); I != E; I++) { std::string Name = Mang->getValueName(I); if (Name.compare("@abort") == 0) Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp?rev=71424&r1=71423&r2=71424&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp Mon May 11 03:52:04 2009 @@ -27,6 +27,38 @@ using namespace llvm; +static const char *getIntrinsicName(unsigned opcode) { + std::string Basename; + switch(opcode) { + default: assert (0 && "do not know intrinsic name"); + case PIC16ISD::SRA_I8: Basename = "sra.i8"; break; + case RTLIB::SRA_I16: Basename = "sra.i16"; break; + case RTLIB::SRA_I32: Basename = "sra.i32"; break; + + case PIC16ISD::SLL_I8: Basename = "sll.i8"; break; + case RTLIB::SHL_I16: Basename = "sll.i16"; break; + case RTLIB::SHL_I32: Basename = "sll.i32"; break; + + case PIC16ISD::SRL_I8: Basename = "srl.i8"; break; + case RTLIB::SRL_I16: Basename = "srl.i16"; break; + case RTLIB::SRL_I32: Basename = "srl.i32"; break; + + case PIC16ISD::MUL_I8: Basename = "mul.i8"; break; + case RTLIB::MUL_I16: Basename = "mul.i16"; break; + case RTLIB::MUL_I32: Basename = "mul.i32"; break; + } + + std::string prefix = PAN::getTagName(PAN::PREFIX_SYMBOL); + std::string tagname = PAN::getTagName(PAN::LIBCALL); + std::string Fullname = prefix + tagname + Basename; + + // The name has to live through program life. + char *tmp = new char[Fullname.size() + 1]; + strcpy (tmp, Fullname.c_str()); + + return tmp; +} + // PIC16TargetLowering Constructor. PIC16TargetLowering::PIC16TargetLowering(PIC16TargetMachine &TM) : TargetLowering(TM), TmpSize(0) { @@ -39,24 +71,24 @@ setShiftAmountFlavor(Extend); // SRA library call names - setPIC16LibcallName(PIC16ISD::SRA_I8, "@__intrinsics.sra.i8"); - setLibcallName(RTLIB::SRA_I16, "@__intrinsics.sra.i16"); - setLibcallName(RTLIB::SRA_I32, "@__intrinsics.sra.i32"); + setPIC16LibcallName(PIC16ISD::SRA_I8, getIntrinsicName(PIC16ISD::SRA_I8)); + setLibcallName(RTLIB::SRA_I16, getIntrinsicName(RTLIB::SRA_I16)); + setLibcallName(RTLIB::SRA_I32, getIntrinsicName(RTLIB::SRA_I32)); // SHL library call names - setPIC16LibcallName(PIC16ISD::SLL_I8, "@__intrinsics.sll.i8"); - setLibcallName(RTLIB::SHL_I16, "@__intrinsics.sll.i16"); - setLibcallName(RTLIB::SHL_I32, "@__intrinsics.sll.i32"); + setPIC16LibcallName(PIC16ISD::SLL_I8, getIntrinsicName(PIC16ISD::SLL_I8)); + setLibcallName(RTLIB::SHL_I16, getIntrinsicName(RTLIB::SHL_I16)); + setLibcallName(RTLIB::SHL_I32, getIntrinsicName(RTLIB::SHL_I32)); // SRL library call names - setPIC16LibcallName(PIC16ISD::SRL_I8, "@__intrinsics.srl.i8"); - setLibcallName(RTLIB::SRL_I16, "@__intrinsics.srl.i16"); - setLibcallName(RTLIB::SRL_I32, "@__intrinsics.srl.i32"); + setPIC16LibcallName(PIC16ISD::SRL_I8, getIntrinsicName(PIC16ISD::SRL_I8)); + setLibcallName(RTLIB::SRL_I16, getIntrinsicName(RTLIB::SRL_I16)); + setLibcallName(RTLIB::SRL_I32, getIntrinsicName(RTLIB::SRL_I32)); // MUL Library call names - setPIC16LibcallName(PIC16ISD::MUL_I8, "@__intrinsics.mul.i8"); - setLibcallName(RTLIB::MUL_I16, "@__intrinsics.mul.i16"); - setLibcallName(RTLIB::MUL_I32, "@__intrinsics.mul.i32"); + setPIC16LibcallName(PIC16ISD::MUL_I8, getIntrinsicName(PIC16ISD::MUL_I8)); + setLibcallName(RTLIB::MUL_I16, getIntrinsicName(RTLIB::MUL_I16)); + setLibcallName(RTLIB::MUL_I32, getIntrinsicName(RTLIB::MUL_I32)); setOperationAction(ISD::GlobalAddress, MVT::i16, Custom); setOperationAction(ISD::ExternalSymbol, MVT::i16, Custom); Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h?rev=71424&r1=71423&r2=71424&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h Mon May 11 03:52:04 2009 @@ -61,7 +61,7 @@ ROM_SPACE = 1 // ROM address space number is 1 }; enum PIC16Libcall { - MUL_I8, + MUL_I8 = RTLIB::UNKNOWN_LIBCALL + 1, SRA_I8, SLL_I8, SRL_I8, From baldrick at free.fr Mon May 11 06:00:42 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 11 May 2009 11:00:42 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r71425 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h Message-ID: <200905111100.n4BB0mhe010045@zion.cs.uiuc.edu> Author: baldrick Date: Mon May 11 06:00:10 2009 New Revision: 71425 URL: http://llvm.org/viewvc/llvm-project?rev=71425&view=rev Log: Sanity check that Emit and EmitLV return something with a type that matches that of the gcc tree node. This caught a bunch of small problems either in llvm-gcc bootstrap, "make check" or the full testsuite, so the patch fixes them. Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp llvm-gcc-4.2/trunk/gcc/llvm-internal.h 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=71425&r1=71424&r2=71425&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon May 11 06:00:10 2009 @@ -930,6 +930,12 @@ assert(((DestLoc && Result == 0) || DestLoc == 0) && "Expected a scalar or aggregate but got the wrong thing!"); + // Check that the type of the result matches that of the tree node. If the + // result is not used then GCC sometimes sets the tree type to VOID_TYPE, so + // don't take VOID_TYPE too seriously here. + assert((Result == 0 || VOID_TYPE_P(TREE_TYPE(exp)) || + Result->getType() == ConvertType(TREE_TYPE(exp))) && + "Value has wrong type!"); return Result; } @@ -937,6 +943,8 @@ /// the address of the result. LValue TreeToLLVM::EmitLV(tree exp) { // Needs to be in sync with EmitVIEW_CONVERT_EXPR. + LValue LV(0, 0); + switch (TREE_CODE(exp)) { default: std::cerr << "Unhandled lvalue expression!\n"; @@ -947,44 +955,80 @@ case VAR_DECL: case FUNCTION_DECL: case CONST_DECL: - case RESULT_DECL: return EmitLV_DECL(exp); + case RESULT_DECL: + LV = EmitLV_DECL(exp); + break; case ARRAY_RANGE_REF: - case ARRAY_REF: return EmitLV_ARRAY_REF(exp); - case COMPONENT_REF: return EmitLV_COMPONENT_REF(exp); - case BIT_FIELD_REF: return EmitLV_BIT_FIELD_REF(exp); - case REALPART_EXPR: return EmitLV_XXXXPART_EXPR(exp, 0); - case IMAGPART_EXPR: return EmitLV_XXXXPART_EXPR(exp, 1); + case ARRAY_REF: + LV = EmitLV_ARRAY_REF(exp); + break; + case COMPONENT_REF: + LV = EmitLV_COMPONENT_REF(exp); + break; + case BIT_FIELD_REF: + LV = EmitLV_BIT_FIELD_REF(exp); + break; + case REALPART_EXPR: + LV = EmitLV_XXXXPART_EXPR(exp, 0); + break; + case IMAGPART_EXPR: + LV = EmitLV_XXXXPART_EXPR(exp, 1); + break; // Constants. case LABEL_DECL: { Value *Ptr = TreeConstantToLLVM::EmitLV_LABEL_DECL(exp); - return LValue(Ptr, DECL_ALIGN(exp) / 8); + LV = LValue(Ptr, DECL_ALIGN(exp) / 8); + break; } case COMPLEX_CST: { Value *Ptr = TreeConstantToLLVM::EmitLV_COMPLEX_CST(exp); - return LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); + LV = LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); + break; } case STRING_CST: { Value *Ptr = TreeConstantToLLVM::EmitLV_STRING_CST(exp); - return LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); + LV = LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); + break; } // Type Conversion. - case VIEW_CONVERT_EXPR: return EmitLV_VIEW_CONVERT_EXPR(exp); + case VIEW_CONVERT_EXPR: + LV = EmitLV_VIEW_CONVERT_EXPR(exp); + break; // Exception Handling. - case EXC_PTR_EXPR: return EmitLV_EXC_PTR_EXPR(exp); - case FILTER_EXPR: return EmitLV_FILTER_EXPR(exp); + case EXC_PTR_EXPR: + LV = EmitLV_EXC_PTR_EXPR(exp); + break; + case FILTER_EXPR: + LV = EmitLV_FILTER_EXPR(exp); + break; // Trivial Cases. case WITH_SIZE_EXPR: // The address is the address of the operand. - return EmitLV(TREE_OPERAND(exp, 0)); + LV = EmitLV(TREE_OPERAND(exp, 0)); + break; case INDIRECT_REF: // The lvalue is just the address. - return LValue(Emit(TREE_OPERAND(exp, 0), 0), - expr_align(exp) / 8); + LV = LValue(Emit(TREE_OPERAND(exp, 0), 0), expr_align(exp) / 8); + // Correct for implicit type conversion: INDIRECT_REF can be applied to a + // void*, resulting in a non-void type. + LV.Ptr = BitCastToType(LV.Ptr, ConvertType(TREE_TYPE(exp))->getPointerTo()); + break; } + + // Check that the type of the lvalue is indeed that of a pointer to the tree + // node. This may not hold for bitfields because the type of a bitfield need + // not match the type of the value being loaded out of it. + assert((LV.isBitfield() || + cast(LV.Ptr->getType())->getElementType() == + (VOID_TYPE_P(TREE_TYPE(exp)) ? + Type::Int8Ty : ConvertType(TREE_TYPE(exp)))) && + "LValue of constant has wrong type!"); + + return LV; } //===----------------------------------------------------------------------===// @@ -1297,8 +1341,8 @@ Emit(TYPE_SIZE_UNIT(type), 0), DestLoc.Alignment); } -void TreeToLLVM::EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, - unsigned Align) { +Value *TreeToLLVM::EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, + unsigned Align) { const Type *SBP = PointerType::getUnqual(Type::Int8Ty); const Type *IntPtr = TD.getIntPtrType(); Value *Ops[4] = { @@ -1310,10 +1354,11 @@ Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memcpy, &IntPtr, 1), Ops, Ops+4); + return Ops[0]; } -void TreeToLLVM::EmitMemMove(Value *DestPtr, Value *SrcPtr, Value *Size, - unsigned Align) { +Value *TreeToLLVM::EmitMemMove(Value *DestPtr, Value *SrcPtr, Value *Size, + unsigned Align) { const Type *SBP = PointerType::getUnqual(Type::Int8Ty); const Type *IntPtr = TD.getIntPtrType(); Value *Ops[4] = { @@ -1325,10 +1370,11 @@ Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memmove, &IntPtr, 1), Ops, Ops+4); + return Ops[0]; } -void TreeToLLVM::EmitMemSet(Value *DestPtr, Value *SrcVal, Value *Size, - unsigned Align) { +Value *TreeToLLVM::EmitMemSet(Value *DestPtr, Value *SrcVal, Value *Size, + unsigned Align) { const Type *SBP = PointerType::getUnqual(Type::Int8Ty); const Type *IntPtr = TD.getIntPtrType(); Value *Ops[4] = { @@ -1340,6 +1386,7 @@ Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memset, &IntPtr, 1), Ops, Ops+4); + return Ops[0]; } @@ -3125,22 +3172,18 @@ Value *TreeToLLVM::EmitBIT_NOT_EXPR(tree exp) { Value *Op = Emit(TREE_OPERAND(exp, 0), 0); - if (isa(Op->getType())) { + const Type *Ty = Op->getType(); + if (isa(Ty)) { assert (TREE_CODE(TREE_TYPE(exp)) == INTEGER_TYPE && "Expected integer type here"); - Op = CastToType(Instruction::PtrToInt, Op, TREE_TYPE(exp)); - } - - const Type *Ty = Op->getType(); - if (Ty->isFloatingPoint() || - (isa(Ty) && - cast(Ty)->getElementType()->isFloatingPoint())) { - Ty = getSuitableBitCastIntType(Ty); - if (!Ty) - abort(); - Op = BitCastToType(Op, Ty); + Ty = ConvertType(TREE_TYPE(exp)); + Op = CastToType(Instruction::PtrToInt, Op, Ty); + } else if (Ty->isFloatingPoint() || + (isa(Ty) && + cast(Ty)->getElementType()->isFloatingPoint())) { + Op = BitCastToType(Op, getSuitableBitCastIntType(Ty)); } - return Builder.CreateNot(Op, (Op->getName()+"not").c_str()); + return BitCastToType(Builder.CreateNot(Op, (Op->getName()+"not").c_str()),Ty); } Value *TreeToLLVM::EmitTRUTH_NOT_EXPR(tree exp) { @@ -3237,13 +3280,11 @@ (isa(Ty) && cast(Ty)->getElementType()->isFloatingPoint()))) { Ty = getSuitableBitCastIntType(Ty); - if (!Ty) - abort(); LHS = BitCastToType(LHS, Ty); RHS = BitCastToType(RHS, Ty); } - Value * V = Builder.CreateBinOp((Instruction::BinaryOps)Opc, LHS, RHS); + Value *V = Builder.CreateBinOp((Instruction::BinaryOps)Opc, LHS, RHS); if (ResTy != Ty) V = BitCastToType(V, ResTy); return V; @@ -4375,7 +4416,8 @@ Ty, 2), C, C + 3); if (isBool) - Result = Builder.CreateICmpEQ(Result, C[1]); + Result = CastToUIntType(Builder.CreateICmpEQ(Result, C[1]), + ConvertType(boolean_type_node)); else Result = Builder.CreateIntToPtr(Result, ResultTy); return Result; @@ -4633,6 +4675,7 @@ Value *Amt = Emit(TREE_VALUE(TREE_OPERAND(exp, 1)), 0); EmitBuiltinUnaryOp(Amt, Result, Intrinsic::cttz); Result = Builder.CreateAdd(Result, ConstantInt::get(Result->getType(), 1)); + Result = CastToUIntType(Result, ConvertType(TREE_TYPE(exp))); Value *Cond = Builder.CreateICmpEQ(Amt, Constant::getNullValue(Amt->getType())); Result = Builder.CreateSelect(Cond, @@ -5063,7 +5106,7 @@ } bool TreeToLLVM::EmitBuiltinUnaryOp(Value *InVal, Value *&Result, - Intrinsic::ID Id) { + Intrinsic::ID Id) { // The intrinsic might be overloaded in which case the argument is of // varying type. Make sure that we specify the actual type for "iAny" // by passing it as the 3rd and 4th parameters. This isn't needed for @@ -5191,11 +5234,9 @@ return false; } - if (isMemMove) - EmitMemMove(DstV, SrcV, Len, std::min(SrcAlign, DstAlign)); - else + Result = isMemMove ? + EmitMemMove(DstV, SrcV, Len, std::min(SrcAlign, DstAlign)) : EmitMemCpy(DstV, SrcV, Len, std::min(SrcAlign, DstAlign)); - Result = DstV; return true; } @@ -5223,8 +5264,7 @@ if (!OptimizeIntoPlainBuiltIn(exp, Len, Size)) return false; } - EmitMemSet(DstV, Val, Len, DstAlign); - Result = DstV; + Result = EmitMemSet(DstV, Val, Len, DstAlign); return true; } @@ -6240,7 +6280,7 @@ const Type *EltTy = ConvertType(TREE_TYPE(exp)); FieldPtr = BitCastToType(FieldPtr, PointerType::getUnqual(EltTy)); } - + assert(BitStart == 0 && "It's a bitfield reference or we didn't get to the field!"); return LValue(FieldPtr, LVAlign); @@ -7228,6 +7268,8 @@ //===----------------------------------------------------------------------===// Constant *TreeConstantToLLVM::EmitLV(tree exp) { + Constant *LV; + switch (TREE_CODE(exp)) { default: debug_tree(exp); @@ -7235,16 +7277,29 @@ abort(); case FUNCTION_DECL: case CONST_DECL: - case VAR_DECL: return EmitLV_Decl(exp); - case LABEL_DECL: return EmitLV_LABEL_DECL(exp); - case COMPLEX_CST: return EmitLV_COMPLEX_CST(exp); - case STRING_CST: return EmitLV_STRING_CST(exp); - case COMPONENT_REF: return EmitLV_COMPONENT_REF(exp); + case VAR_DECL: + LV = EmitLV_Decl(exp); + break; + case LABEL_DECL: + LV = EmitLV_LABEL_DECL(exp); + break; + case COMPLEX_CST: + LV = EmitLV_COMPLEX_CST(exp); + break; + case STRING_CST: + LV = EmitLV_STRING_CST(exp); + break; + case COMPONENT_REF: + LV = EmitLV_COMPONENT_REF(exp); + break; case ARRAY_RANGE_REF: - case ARRAY_REF: return EmitLV_ARRAY_REF(exp); + case ARRAY_REF: + LV = EmitLV_ARRAY_REF(exp); + break; case INDIRECT_REF: // The lvalue is just the address. - return Convert(TREE_OPERAND(exp, 0)); + LV = Convert(TREE_OPERAND(exp, 0)); + break; case COMPOUND_LITERAL_EXPR: // FIXME: not gimple - defined by C front-end /* This used to read return EmitLV(COMPOUND_LITERAL_EXPR_DECL(exp)); @@ -7252,8 +7307,16 @@ with casts or the like. The following is equivalent with no checking (since we know TREE_CODE(exp) is COMPOUND_LITERAL_EXPR the checking doesn't accomplish anything anyway). */ - return EmitLV(DECL_EXPR_DECL (TREE_OPERAND (exp, 0))); + LV = EmitLV(DECL_EXPR_DECL (TREE_OPERAND (exp, 0))); + break; } + + assert(cast(LV->getType())->getElementType() == + (VOID_TYPE_P(TREE_TYPE(exp)) ? + Type::Int8Ty : ConvertType(TREE_TYPE(exp))) && + "LValue of constant has wrong type!"); + + return LV; } Constant *TreeConstantToLLVM::EmitLV_Decl(tree exp) { @@ -7283,8 +7346,13 @@ if (tree ID = DECL_ASSEMBLER_NAME(exp)) mark_referenced(ID); } - - return Val; + + // The type of the global value output for exp need not match that of exp. + // For example if the global's initializer has a different type to the global + // itself (allowed in GCC but not in LLVM) then the global is changed to have + // the type of the initializer. Correct for this now. + return TheFolder->CreateBitCast(Val, + ConvertType(TREE_TYPE(exp))->getPointerTo()); } /// EmitLV_LABEL_DECL - Someone took the address of a label. @@ -7385,18 +7453,6 @@ if (!integer_zerop(LowerBound)) Index = fold(build2(MINUS_EXPR, IndexType, Index, LowerBound)); ArrayAddr = EmitLV(Array); - - // The GCC array expression value may not compile to an LLVM array type if - // (for example) the array value is an array of unions. In this case, the - // array literal will turn into an LLVM constant struct, which has struct - // type. Do a cast to the correct type just to be certain everything is - // kosher. - const PointerType *ResPTy = cast(ArrayAddr->getType()); - if (!isa(ResPTy->getElementType())) { - const Type *RealArrayTy = ConvertType(ArrayType); - ResPTy = PointerType::getUnqual(RealArrayTy); - ArrayAddr = TheFolder->CreateBitCast(ArrayAddr, ResPTy); - } } else { ArrayAddr = Convert(Array); } Modified: llvm-gcc-4.2/trunk/gcc/llvm-internal.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-internal.h?rev=71425&r1=71424&r2=71425&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-internal.h (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-internal.h Mon May 11 06:00:10 2009 @@ -430,10 +430,11 @@ void EmitAggregateZero(MemRef DestLoc, tree_node *GCCType); /// EmitMemCpy/EmitMemMove/EmitMemSet - Emit an llvm.memcpy/llvm.memmove or - /// llvm.memset call with the specified operands. - void EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align); - void EmitMemMove(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align); - void EmitMemSet(Value *DestPtr, Value *SrcVal, Value *Size, unsigned Align); + /// llvm.memset call with the specified operands. Returns DestPtr bitcast + /// to i8*. + Value *EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align); + Value *EmitMemMove(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align); + Value *EmitMemSet(Value *DestPtr, Value *SrcVal, Value *Size, unsigned Align); /// EmitLandingPads - Emit EH landing pads. void EmitLandingPads(); From jay.foad at gmail.com Mon May 11 06:14:08 2009 From: jay.foad at gmail.com (Jay Foad) Date: Mon, 11 May 2009 11:14:08 -0000 Subject: [llvm-commits] [llvm] r71426 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/Target/TargetData.cpp Message-ID: <200905111114.n4BBEDAI010467@zion.cs.uiuc.edu> Author: foad Date: Mon May 11 06:13:47 2009 New Revision: 71426 URL: http://llvm.org/viewvc/llvm-project?rev=71426&view=rev Log: Change TargetData::getIntPtrType() to return an IntegerType instead of just a Type. Modified: llvm/trunk/include/llvm/Target/TargetData.h llvm/trunk/lib/Target/TargetData.cpp Modified: llvm/trunk/include/llvm/Target/TargetData.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetData.h?rev=71426&r1=71425&r2=71426&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetData.h (original) +++ llvm/trunk/include/llvm/Target/TargetData.h Mon May 11 06:13:47 2009 @@ -23,13 +23,12 @@ #include "llvm/Pass.h" #include "llvm/Support/DataTypes.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/DerivedTypes.h" #include namespace llvm { class Value; -class Type; -class StructType; class StructLayout; class GlobalVariable; @@ -228,7 +227,7 @@ /// getIntPtrType - Return an unsigned integer type that is the same size or /// greater to the host pointer size. /// - const Type *getIntPtrType() const; + const IntegerType *getIntPtrType() const; /// getIndexedOffset - return the offset from the beginning of the type for /// the specified indices. This is used to implement getelementptr. Modified: llvm/trunk/lib/Target/TargetData.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetData.cpp?rev=71426&r1=71425&r2=71426&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetData.cpp (original) +++ llvm/trunk/lib/Target/TargetData.cpp Mon May 11 06:13:47 2009 @@ -535,7 +535,7 @@ /// getIntPtrType - Return an unsigned integer type that is the same size or /// greater to the host pointer size. -const Type *TargetData::getIntPtrType() const { +const IntegerType *TargetData::getIntPtrType() const { return IntegerType::get(getPointerSizeInBits()); } From jay.foad at gmail.com Mon May 11 06:32:53 2009 From: jay.foad at gmail.com (Jay Foad) Date: Mon, 11 May 2009 11:32:53 -0000 Subject: [llvm-commits] [llvm] r71427 - /llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp Message-ID: <200905111132.n4BBWxYr011297@zion.cs.uiuc.edu> Author: foad Date: Mon May 11 06:32:25 2009 New Revision: 71427 URL: http://llvm.org/viewvc/llvm-project?rev=71427&view=rev Log: Don't generate redundant casts of constant values when lowering calls to memcpy, memmove and memset. Modified: llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp Modified: llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp?rev=71427&r1=71426&r2=71427&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp Mon May 11 06:32:25 2009 @@ -23,6 +23,26 @@ #include "llvm/ADT/STLExtras.h" using namespace llvm; +// Return the integer value Val zero-extended or truncated (if necessary) to +// type ITy. Any new instructions are inserted at InsertBefore. +template +static Value *getZExtOrTrunc(Value *Val, const IntegerType *ITy, + InsertType InsertPoint) { + const IntegerType *ValTy = cast(Val->getType()); + if (ValTy == ITy) + return Val; + Constant *CVal = dyn_cast(Val); + if (ValTy->getBitWidth() < ITy->getBitWidth()) { + if (CVal) + return ConstantExpr::getZExt(CVal, ITy); + return new ZExtInst(Val, ITy, "", InsertPoint); + } else { + if (CVal) + return ConstantExpr::getTrunc(CVal, ITy); + return new TruncInst(Val, ITy, "", InsertPoint); + } +} + template static void EnsureFunctionExists(Module &M, const char *Name, ArgIt ArgBegin, ArgIt ArgEnd, @@ -504,7 +524,6 @@ // Get some types we need const IntegerType* ValTy = cast(Val->getType()); const IntegerType* RepTy = cast(Rep->getType()); - uint32_t ValBits = ValTy->getBitWidth(); uint32_t RepBits = RepTy->getBitWidth(); // Constant Definitions @@ -532,13 +551,7 @@ BinaryOperator* NumBits = BinaryOperator::CreateSub(Hi_pn, Lo_pn, "",entry); NumBits = BinaryOperator::CreateAdd(NumBits, One, "", entry); // Now, convert Lo and Hi to ValTy bit width - if (ValBits > 32) { - Lo = new ZExtInst(Lo_pn, ValTy, "", entry); - } else if (ValBits < 32) { - Lo = new TruncInst(Lo_pn, ValTy, "", entry); - } else { - Lo = Lo_pn; - } + Lo = getZExtOrTrunc(Lo_pn, ValTy, entry); // Determine if the replacement bits are larger than the number of bits we // are replacing and deal with it. ICmpInst* is_large = @@ -560,11 +573,7 @@ Rep3->reserveOperandSpace(2); Rep3->addIncoming(Rep2, large); Rep3->addIncoming(Rep, entry); - Value* Rep4 = Rep3; - if (ValBits > RepBits) - Rep4 = new ZExtInst(Rep3, ValTy, "", small); - else if (ValBits < RepBits) - Rep4 = new TruncInst(Rep3, ValTy, "", small); + Value* Rep4 = getZExtOrTrunc(Rep3, ValTy, small); BranchInst::Create(result, reverse, is_forward, small); // BASIC BLOCK: reverse (reverses the bits of the replacement) @@ -788,14 +797,8 @@ case Intrinsic::memcpy: { static Constant *MemcpyFCache = 0; - Value *Size = CI->getOperand(3); - const Type *IntPtr = TD.getIntPtrType(); - if (Size->getType()->getPrimitiveSizeInBits() < - IntPtr->getPrimitiveSizeInBits()) - Size = new ZExtInst(Size, IntPtr, "", CI); - else if (Size->getType()->getPrimitiveSizeInBits() > - IntPtr->getPrimitiveSizeInBits()) - Size = new TruncInst(Size, IntPtr, "", CI); + const IntegerType *IntPtr = TD.getIntPtrType(); + Value *Size = getZExtOrTrunc(CI->getOperand(3), IntPtr, CI); Value *Ops[3]; Ops[0] = CI->getOperand(1); Ops[1] = CI->getOperand(2); @@ -806,14 +809,8 @@ } case Intrinsic::memmove: { static Constant *MemmoveFCache = 0; - Value *Size = CI->getOperand(3); - const Type *IntPtr = TD.getIntPtrType(); - if (Size->getType()->getPrimitiveSizeInBits() < - IntPtr->getPrimitiveSizeInBits()) - Size = new ZExtInst(Size, IntPtr, "", CI); - else if (Size->getType()->getPrimitiveSizeInBits() > - IntPtr->getPrimitiveSizeInBits()) - Size = new TruncInst(Size, IntPtr, "", CI); + const IntegerType *IntPtr = TD.getIntPtrType(); + Value *Size = getZExtOrTrunc(CI->getOperand(3), IntPtr, CI); Value *Ops[3]; Ops[0] = CI->getOperand(1); Ops[1] = CI->getOperand(2); @@ -824,18 +821,12 @@ } case Intrinsic::memset: { static Constant *MemsetFCache = 0; - Value *Size = CI->getOperand(3); - const Type *IntPtr = TD.getIntPtrType(); - if (Size->getType()->getPrimitiveSizeInBits() < - IntPtr->getPrimitiveSizeInBits()) - Size = new ZExtInst(Size, IntPtr, "", CI); - else if (Size->getType()->getPrimitiveSizeInBits() > - IntPtr->getPrimitiveSizeInBits()) - Size = new TruncInst(Size, IntPtr, "", CI); + const IntegerType *IntPtr = TD.getIntPtrType(); + Value *Size = getZExtOrTrunc(CI->getOperand(3), IntPtr, CI); Value *Ops[3]; Ops[0] = CI->getOperand(1); // Extend the amount to i32. - Ops[1] = new ZExtInst(CI->getOperand(2), Type::Int32Ty, "", CI); + Ops[1] = getZExtOrTrunc(CI->getOperand(2), Type::Int32Ty, CI); Ops[2] = Size; ReplaceCallWith("memset", CI, Ops, Ops+3, CI->getOperand(1)->getType(), MemsetFCache); From baldrick at free.fr Mon May 11 09:50:07 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 11 May 2009 16:50:07 +0200 Subject: [llvm-commits] [llvm] r71427 - /llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp In-Reply-To: <200905111132.n4BBWxYr011297@zion.cs.uiuc.edu> References: <200905111132.n4BBWxYr011297@zion.cs.uiuc.edu> Message-ID: <200905111650.07465.baldrick@free.fr> Hi, > +// Return the integer value Val zero-extended or truncated (if necessary) to > +// type ITy. Any new instructions are inserted at InsertBefore. this sounds like a generally useful thing, so shouldn't be here. > +template > +static Value *getZExtOrTrunc(Value *Val, const IntegerType *ITy, > + InsertType InsertPoint) { > + const IntegerType *ValTy = cast(Val->getType()); > + if (ValTy == ITy) > + return Val; > + Constant *CVal = dyn_cast(Val); > + if (ValTy->getBitWidth() < ITy->getBitWidth()) { > + if (CVal) > + return ConstantExpr::getZExt(CVal, ITy); > + return new ZExtInst(Val, ITy, "", InsertPoint); > + } else { > + if (CVal) > + return ConstantExpr::getTrunc(CVal, ITy); > + return new TruncInst(Val, ITy, "", InsertPoint); > + } > +} Doesn't the IRBuilder stuff already do this? If so, why not just use a builder here? Ciao, Duncan. From jay.foad at gmail.com Mon May 11 10:38:55 2009 From: jay.foad at gmail.com (Jay Foad) Date: Mon, 11 May 2009 16:38:55 +0100 Subject: [llvm-commits] [llvm] r71427 - /llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp In-Reply-To: <200905111650.07465.baldrick@free.fr> References: <200905111132.n4BBWxYr011297@zion.cs.uiuc.edu> <200905111650.07465.baldrick@free.fr> Message-ID: >> +// Return the integer value Val zero-extended or truncated (if necessary) to >> +// type ITy. Any new instructions are inserted at InsertBefore. > > this sounds like a generally useful thing, so shouldn't be here. I'll move it if you can suggest where it should go. I guess an extra "bool signed = false" argument would be in order, to make it a bit more generic. >> +template >> +static Value *getZExtOrTrunc(Value *Val, const IntegerType *ITy, >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? InsertType InsertPoint) { >> + ?const IntegerType *ValTy = cast(Val->getType()); >> + ?if (ValTy == ITy) >> + ? ?return Val; >> + ?Constant *CVal = dyn_cast(Val); >> + ?if (ValTy->getBitWidth() < ITy->getBitWidth()) { >> + ? ?if (CVal) >> + ? ? ?return ConstantExpr::getZExt(CVal, ITy); >> + ? ?return new ZExtInst(Val, ITy, "", InsertPoint); >> + ?} else { >> + ? ?if (CVal) >> + ? ? ?return ConstantExpr::getTrunc(CVal, ITy); >> + ? ?return new TruncInst(Val, ITy, "", InsertPoint); >> + ?} >> +} > > Doesn't the IRBuilder stuff already do this? ?If so, why not just > use a builder here? I'm not familiar with the IRBuilder. I was just following the style of the existing code. Cheers, Jay. From kremenek at apple.com Mon May 11 10:41:27 2009 From: kremenek at apple.com (Ted Kremenek) Date: Mon, 11 May 2009 15:41:27 -0000 Subject: [llvm-commits] [llvm] r71433 - /llvm/tags/checker/checker-0.200/ Message-ID: <200905111541.n4BFfRRh021821@zion.cs.uiuc.edu> Author: kremenek Date: Mon May 11 10:41:24 2009 New Revision: 71433 URL: http://llvm.org/viewvc/llvm-project?rev=71433&view=rev Log: Tagging checker-0.200. Added: llvm/tags/checker/checker-0.200/ - copied from r71432, llvm/trunk/ From clattner at apple.com Mon May 11 11:25:47 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 11 May 2009 09:25:47 -0700 Subject: [llvm-commits] [llvm] r71426 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/Target/TargetData.cpp In-Reply-To: <200905111114.n4BBEDAI010467@zion.cs.uiuc.edu> References: <200905111114.n4BBEDAI010467@zion.cs.uiuc.edu> Message-ID: <3F31145D-931B-46A1-BEF6-5484690886F5@apple.com> On May 11, 2009, at 4:14 AM, Jay Foad wrote: > Author: foad > Date: Mon May 11 06:13:47 2009 > New Revision: 71426 > > URL: http://llvm.org/viewvc/llvm-project?rev=71426&view=rev > Log: > Change TargetData::getIntPtrType() to return an IntegerType instead of > just a Type. Ok, > +++ llvm/trunk/include/llvm/Target/TargetData.h Mon May 11 06:13:47 > 2009 > @@ -23,13 +23,12 @@ > #include "llvm/Pass.h" > #include "llvm/Support/DataTypes.h" > #include "llvm/ADT/SmallVector.h" > +#include "llvm/DerivedTypes.h" Can you just use a forward declaration of IntegerType instead of a #include? -Chris > > #include > > namespace llvm { > > class Value; > -class Type; > -class StructType; > class StructLayout; > class GlobalVariable; > > @@ -228,7 +227,7 @@ > /// getIntPtrType - Return an unsigned integer type that is the > same size or > /// greater to the host pointer size. > /// > - const Type *getIntPtrType() const; > + const IntegerType *getIntPtrType() const; > > /// getIndexedOffset - return the offset from the beginning of the > type for > /// the specified indices. This is used to implement getelementptr. > > Modified: llvm/trunk/lib/Target/TargetData.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetData.cpp?rev=71426&r1=71425&r2=71426&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Target/TargetData.cpp (original) > +++ llvm/trunk/lib/Target/TargetData.cpp Mon May 11 06:13:47 2009 > @@ -535,7 +535,7 @@ > > /// getIntPtrType - Return an unsigned integer type that is the same > size or > /// greater to the host pointer size. > -const Type *TargetData::getIntPtrType() const { > +const IntegerType *TargetData::getIntPtrType() const { > return IntegerType::get(getPointerSizeInBits()); > } > > > > _______________________________________________ > 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 May 11 11:56:06 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 11 May 2009 16:56:06 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r71437 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h Message-ID: <200905111656.n4BGu7h3026231@zion.cs.uiuc.edu> Author: void Date: Mon May 11 11:56:01 2009 New Revision: 71437 URL: http://llvm.org/viewvc/llvm-project?rev=71437&view=rev Log: Getting this assert during a release full-bootstrap of llvm-gcc: Assertion failed: ((LV.isBitfield() || cast(LV.Ptr->getType())->getElementType() == (VOID_TYPE_P(TREE_TYPE(exp)) ? Type::Int8Ty : ConvertType(TREE_TYPE(exp)))) && "LValue of constant has wrong type!"), function EmitLV, file ../../llvm-gcc.src/gcc/llvm-convert.cpp, line 1029. ./../llvm-gcc.src/gcc/config/darwin-crt3.c: In function 'atexit': ./../llvm-gcc.src/gcc/config/darwin-crt3.c:530: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate. See for instructions. make[5]: *** [crt3.o] Error 1 make[4]: *** [extra] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [stmp-multilib] Error 2 Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp llvm-gcc-4.2/trunk/gcc/llvm-internal.h 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=71437&r1=71436&r2=71437&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon May 11 11:56:01 2009 @@ -930,12 +930,6 @@ assert(((DestLoc && Result == 0) || DestLoc == 0) && "Expected a scalar or aggregate but got the wrong thing!"); - // Check that the type of the result matches that of the tree node. If the - // result is not used then GCC sometimes sets the tree type to VOID_TYPE, so - // don't take VOID_TYPE too seriously here. - assert((Result == 0 || VOID_TYPE_P(TREE_TYPE(exp)) || - Result->getType() == ConvertType(TREE_TYPE(exp))) && - "Value has wrong type!"); return Result; } @@ -943,8 +937,6 @@ /// the address of the result. LValue TreeToLLVM::EmitLV(tree exp) { // Needs to be in sync with EmitVIEW_CONVERT_EXPR. - LValue LV(0, 0); - switch (TREE_CODE(exp)) { default: std::cerr << "Unhandled lvalue expression!\n"; @@ -955,80 +947,44 @@ case VAR_DECL: case FUNCTION_DECL: case CONST_DECL: - case RESULT_DECL: - LV = EmitLV_DECL(exp); - break; + case RESULT_DECL: return EmitLV_DECL(exp); case ARRAY_RANGE_REF: - case ARRAY_REF: - LV = EmitLV_ARRAY_REF(exp); - break; - case COMPONENT_REF: - LV = EmitLV_COMPONENT_REF(exp); - break; - case BIT_FIELD_REF: - LV = EmitLV_BIT_FIELD_REF(exp); - break; - case REALPART_EXPR: - LV = EmitLV_XXXXPART_EXPR(exp, 0); - break; - case IMAGPART_EXPR: - LV = EmitLV_XXXXPART_EXPR(exp, 1); - break; + case ARRAY_REF: return EmitLV_ARRAY_REF(exp); + case COMPONENT_REF: return EmitLV_COMPONENT_REF(exp); + case BIT_FIELD_REF: return EmitLV_BIT_FIELD_REF(exp); + case REALPART_EXPR: return EmitLV_XXXXPART_EXPR(exp, 0); + case IMAGPART_EXPR: return EmitLV_XXXXPART_EXPR(exp, 1); // Constants. case LABEL_DECL: { Value *Ptr = TreeConstantToLLVM::EmitLV_LABEL_DECL(exp); - LV = LValue(Ptr, DECL_ALIGN(exp) / 8); - break; + return LValue(Ptr, DECL_ALIGN(exp) / 8); } case COMPLEX_CST: { Value *Ptr = TreeConstantToLLVM::EmitLV_COMPLEX_CST(exp); - LV = LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); - break; + return LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); } case STRING_CST: { Value *Ptr = TreeConstantToLLVM::EmitLV_STRING_CST(exp); - LV = LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); - break; + return LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); } // Type Conversion. - case VIEW_CONVERT_EXPR: - LV = EmitLV_VIEW_CONVERT_EXPR(exp); - break; + case VIEW_CONVERT_EXPR: return EmitLV_VIEW_CONVERT_EXPR(exp); // Exception Handling. - case EXC_PTR_EXPR: - LV = EmitLV_EXC_PTR_EXPR(exp); - break; - case FILTER_EXPR: - LV = EmitLV_FILTER_EXPR(exp); - break; + case EXC_PTR_EXPR: return EmitLV_EXC_PTR_EXPR(exp); + case FILTER_EXPR: return EmitLV_FILTER_EXPR(exp); // Trivial Cases. case WITH_SIZE_EXPR: // The address is the address of the operand. - LV = EmitLV(TREE_OPERAND(exp, 0)); - break; + return EmitLV(TREE_OPERAND(exp, 0)); case INDIRECT_REF: // The lvalue is just the address. - LV = LValue(Emit(TREE_OPERAND(exp, 0), 0), expr_align(exp) / 8); - // Correct for implicit type conversion: INDIRECT_REF can be applied to a - // void*, resulting in a non-void type. - LV.Ptr = BitCastToType(LV.Ptr, ConvertType(TREE_TYPE(exp))->getPointerTo()); - break; + return LValue(Emit(TREE_OPERAND(exp, 0), 0), + expr_align(exp) / 8); } - - // Check that the type of the lvalue is indeed that of a pointer to the tree - // node. This may not hold for bitfields because the type of a bitfield need - // not match the type of the value being loaded out of it. - assert((LV.isBitfield() || - cast(LV.Ptr->getType())->getElementType() == - (VOID_TYPE_P(TREE_TYPE(exp)) ? - Type::Int8Ty : ConvertType(TREE_TYPE(exp)))) && - "LValue of constant has wrong type!"); - - return LV; } //===----------------------------------------------------------------------===// @@ -1341,8 +1297,8 @@ Emit(TYPE_SIZE_UNIT(type), 0), DestLoc.Alignment); } -Value *TreeToLLVM::EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, - unsigned Align) { +void TreeToLLVM::EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, + unsigned Align) { const Type *SBP = PointerType::getUnqual(Type::Int8Ty); const Type *IntPtr = TD.getIntPtrType(); Value *Ops[4] = { @@ -1354,11 +1310,10 @@ Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memcpy, &IntPtr, 1), Ops, Ops+4); - return Ops[0]; } -Value *TreeToLLVM::EmitMemMove(Value *DestPtr, Value *SrcPtr, Value *Size, - unsigned Align) { +void TreeToLLVM::EmitMemMove(Value *DestPtr, Value *SrcPtr, Value *Size, + unsigned Align) { const Type *SBP = PointerType::getUnqual(Type::Int8Ty); const Type *IntPtr = TD.getIntPtrType(); Value *Ops[4] = { @@ -1370,11 +1325,10 @@ Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memmove, &IntPtr, 1), Ops, Ops+4); - return Ops[0]; } -Value *TreeToLLVM::EmitMemSet(Value *DestPtr, Value *SrcVal, Value *Size, - unsigned Align) { +void TreeToLLVM::EmitMemSet(Value *DestPtr, Value *SrcVal, Value *Size, + unsigned Align) { const Type *SBP = PointerType::getUnqual(Type::Int8Ty); const Type *IntPtr = TD.getIntPtrType(); Value *Ops[4] = { @@ -1386,7 +1340,6 @@ Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memset, &IntPtr, 1), Ops, Ops+4); - return Ops[0]; } @@ -3172,18 +3125,22 @@ Value *TreeToLLVM::EmitBIT_NOT_EXPR(tree exp) { Value *Op = Emit(TREE_OPERAND(exp, 0), 0); - const Type *Ty = Op->getType(); - if (isa(Ty)) { + if (isa(Op->getType())) { assert (TREE_CODE(TREE_TYPE(exp)) == INTEGER_TYPE && "Expected integer type here"); - Ty = ConvertType(TREE_TYPE(exp)); - Op = CastToType(Instruction::PtrToInt, Op, Ty); - } else if (Ty->isFloatingPoint() || - (isa(Ty) && - cast(Ty)->getElementType()->isFloatingPoint())) { - Op = BitCastToType(Op, getSuitableBitCastIntType(Ty)); + Op = CastToType(Instruction::PtrToInt, Op, TREE_TYPE(exp)); + } + + const Type *Ty = Op->getType(); + if (Ty->isFloatingPoint() || + (isa(Ty) && + cast(Ty)->getElementType()->isFloatingPoint())) { + Ty = getSuitableBitCastIntType(Ty); + if (!Ty) + abort(); + Op = BitCastToType(Op, Ty); } - return BitCastToType(Builder.CreateNot(Op, (Op->getName()+"not").c_str()),Ty); + return Builder.CreateNot(Op, (Op->getName()+"not").c_str()); } Value *TreeToLLVM::EmitTRUTH_NOT_EXPR(tree exp) { @@ -3280,11 +3237,13 @@ (isa(Ty) && cast(Ty)->getElementType()->isFloatingPoint()))) { Ty = getSuitableBitCastIntType(Ty); + if (!Ty) + abort(); LHS = BitCastToType(LHS, Ty); RHS = BitCastToType(RHS, Ty); } - Value *V = Builder.CreateBinOp((Instruction::BinaryOps)Opc, LHS, RHS); + Value * V = Builder.CreateBinOp((Instruction::BinaryOps)Opc, LHS, RHS); if (ResTy != Ty) V = BitCastToType(V, ResTy); return V; @@ -4416,8 +4375,7 @@ Ty, 2), C, C + 3); if (isBool) - Result = CastToUIntType(Builder.CreateICmpEQ(Result, C[1]), - ConvertType(boolean_type_node)); + Result = Builder.CreateICmpEQ(Result, C[1]); else Result = Builder.CreateIntToPtr(Result, ResultTy); return Result; @@ -4675,7 +4633,6 @@ Value *Amt = Emit(TREE_VALUE(TREE_OPERAND(exp, 1)), 0); EmitBuiltinUnaryOp(Amt, Result, Intrinsic::cttz); Result = Builder.CreateAdd(Result, ConstantInt::get(Result->getType(), 1)); - Result = CastToUIntType(Result, ConvertType(TREE_TYPE(exp))); Value *Cond = Builder.CreateICmpEQ(Amt, Constant::getNullValue(Amt->getType())); Result = Builder.CreateSelect(Cond, @@ -5106,7 +5063,7 @@ } bool TreeToLLVM::EmitBuiltinUnaryOp(Value *InVal, Value *&Result, - Intrinsic::ID Id) { + Intrinsic::ID Id) { // The intrinsic might be overloaded in which case the argument is of // varying type. Make sure that we specify the actual type for "iAny" // by passing it as the 3rd and 4th parameters. This isn't needed for @@ -5234,9 +5191,11 @@ return false; } - Result = isMemMove ? - EmitMemMove(DstV, SrcV, Len, std::min(SrcAlign, DstAlign)) : + if (isMemMove) + EmitMemMove(DstV, SrcV, Len, std::min(SrcAlign, DstAlign)); + else EmitMemCpy(DstV, SrcV, Len, std::min(SrcAlign, DstAlign)); + Result = DstV; return true; } @@ -5264,7 +5223,8 @@ if (!OptimizeIntoPlainBuiltIn(exp, Len, Size)) return false; } - Result = EmitMemSet(DstV, Val, Len, DstAlign); + EmitMemSet(DstV, Val, Len, DstAlign); + Result = DstV; return true; } @@ -6280,7 +6240,7 @@ const Type *EltTy = ConvertType(TREE_TYPE(exp)); FieldPtr = BitCastToType(FieldPtr, PointerType::getUnqual(EltTy)); } - + assert(BitStart == 0 && "It's a bitfield reference or we didn't get to the field!"); return LValue(FieldPtr, LVAlign); @@ -7268,8 +7228,6 @@ //===----------------------------------------------------------------------===// Constant *TreeConstantToLLVM::EmitLV(tree exp) { - Constant *LV; - switch (TREE_CODE(exp)) { default: debug_tree(exp); @@ -7277,29 +7235,16 @@ abort(); case FUNCTION_DECL: case CONST_DECL: - case VAR_DECL: - LV = EmitLV_Decl(exp); - break; - case LABEL_DECL: - LV = EmitLV_LABEL_DECL(exp); - break; - case COMPLEX_CST: - LV = EmitLV_COMPLEX_CST(exp); - break; - case STRING_CST: - LV = EmitLV_STRING_CST(exp); - break; - case COMPONENT_REF: - LV = EmitLV_COMPONENT_REF(exp); - break; + case VAR_DECL: return EmitLV_Decl(exp); + case LABEL_DECL: return EmitLV_LABEL_DECL(exp); + case COMPLEX_CST: return EmitLV_COMPLEX_CST(exp); + case STRING_CST: return EmitLV_STRING_CST(exp); + case COMPONENT_REF: return EmitLV_COMPONENT_REF(exp); case ARRAY_RANGE_REF: - case ARRAY_REF: - LV = EmitLV_ARRAY_REF(exp); - break; + case ARRAY_REF: return EmitLV_ARRAY_REF(exp); case INDIRECT_REF: // The lvalue is just the address. - LV = Convert(TREE_OPERAND(exp, 0)); - break; + return Convert(TREE_OPERAND(exp, 0)); case COMPOUND_LITERAL_EXPR: // FIXME: not gimple - defined by C front-end /* This used to read return EmitLV(COMPOUND_LITERAL_EXPR_DECL(exp)); @@ -7307,16 +7252,8 @@ with casts or the like. The following is equivalent with no checking (since we know TREE_CODE(exp) is COMPOUND_LITERAL_EXPR the checking doesn't accomplish anything anyway). */ - LV = EmitLV(DECL_EXPR_DECL (TREE_OPERAND (exp, 0))); - break; + return EmitLV(DECL_EXPR_DECL (TREE_OPERAND (exp, 0))); } - - assert(cast(LV->getType())->getElementType() == - (VOID_TYPE_P(TREE_TYPE(exp)) ? - Type::Int8Ty : ConvertType(TREE_TYPE(exp))) && - "LValue of constant has wrong type!"); - - return LV; } Constant *TreeConstantToLLVM::EmitLV_Decl(tree exp) { @@ -7346,13 +7283,8 @@ if (tree ID = DECL_ASSEMBLER_NAME(exp)) mark_referenced(ID); } - - // The type of the global value output for exp need not match that of exp. - // For example if the global's initializer has a different type to the global - // itself (allowed in GCC but not in LLVM) then the global is changed to have - // the type of the initializer. Correct for this now. - return TheFolder->CreateBitCast(Val, - ConvertType(TREE_TYPE(exp))->getPointerTo()); + + return Val; } /// EmitLV_LABEL_DECL - Someone took the address of a label. @@ -7453,6 +7385,18 @@ if (!integer_zerop(LowerBound)) Index = fold(build2(MINUS_EXPR, IndexType, Index, LowerBound)); ArrayAddr = EmitLV(Array); + + // The GCC array expression value may not compile to an LLVM array type if + // (for example) the array value is an array of unions. In this case, the + // array literal will turn into an LLVM constant struct, which has struct + // type. Do a cast to the correct type just to be certain everything is + // kosher. + const PointerType *ResPTy = cast(ArrayAddr->getType()); + if (!isa(ResPTy->getElementType())) { + const Type *RealArrayTy = ConvertType(ArrayType); + ResPTy = PointerType::getUnqual(RealArrayTy); + ArrayAddr = TheFolder->CreateBitCast(ArrayAddr, ResPTy); + } } else { ArrayAddr = Convert(Array); } Modified: llvm-gcc-4.2/trunk/gcc/llvm-internal.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-internal.h?rev=71437&r1=71436&r2=71437&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-internal.h (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-internal.h Mon May 11 11:56:01 2009 @@ -430,11 +430,10 @@ void EmitAggregateZero(MemRef DestLoc, tree_node *GCCType); /// EmitMemCpy/EmitMemMove/EmitMemSet - Emit an llvm.memcpy/llvm.memmove or - /// llvm.memset call with the specified operands. Returns DestPtr bitcast - /// to i8*. - Value *EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align); - Value *EmitMemMove(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align); - Value *EmitMemSet(Value *DestPtr, Value *SrcVal, Value *Size, unsigned Align); + /// llvm.memset call with the specified operands. + void EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align); + void EmitMemMove(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align); + void EmitMemSet(Value *DestPtr, Value *SrcVal, Value *Size, unsigned Align); /// EmitLandingPads - Emit EH landing pads. void EmitLandingPads(); From isanbard at gmail.com Mon May 11 11:56:53 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 11 May 2009 09:56:53 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r71425 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h In-Reply-To: <200905111100.n4BB0mhe010045@zion.cs.uiuc.edu> References: <200905111100.n4BB0mhe010045@zion.cs.uiuc.edu> Message-ID: <16e5fdf90905110956m2f4ddb35x1de96fc5de763838@mail.gmail.com> On Mon, May 11, 2009 at 4:00 AM, Duncan Sands wrote: > Author: baldrick > Date: Mon May 11 06:00:10 2009 > New Revision: 71425 > > URL: http://llvm.org/viewvc/llvm-project?rev=71425&view=rev > Log: > Sanity check that Emit and EmitLV return something > with a type that matches that of the gcc tree node. > This caught a bunch of small problems either in > llvm-gcc bootstrap, "make check" or the full testsuite, > so the patch fixes them. > This is causing a bootstrap failure in release mode on Darwin. Please investigate. /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.6.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.6.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.6.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.6.0/sys-include -mmacosx-version-min=10.4 -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DL_fixunssfsi -DLIBGCC2_UNITS_PER_WORD=4 -c ../../llvm-gcc.src/gcc/libgcc2.c -o libgcc/./_fixunssfsi.o Assertion failed: ((LV.isBitfield() || cast(LV.Ptr->getType())->getElementType() == (VOID_TYPE_P(TREE_TYPE(exp)) ? Type::Int8Ty : ConvertType(TREE_TYPE(exp)))) && "LValue of constant has wrong type!"), function EmitLV, file ../../llvm-gcc.src/gcc/llvm-convert.cpp, line 1029. ../../llvm-gcc.src/gcc/config/darwin-crt3.c: In function 'atexit': ../../llvm-gcc.src/gcc/config/darwin-crt3.c:530: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate. See for instructions. make[5]: *** [crt3.o] Error 1 make[4]: *** [extra] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [stmp-multilib] Error 2 -bw From ojomojo at gmail.com Mon May 11 12:04:19 2009 From: ojomojo at gmail.com (John Mosby) Date: Mon, 11 May 2009 17:04:19 -0000 Subject: [llvm-commits] [llvm] r71438 - in /llvm/trunk: include/llvm/ADT/SparseBitVector.h lib/CodeGen/PrologEpilogInserter.cpp Message-ID: <200905111704.n4BH4Kr9026553@zion.cs.uiuc.edu> Author: jdm Date: Mon May 11 12:04:19 2009 New Revision: 71438 URL: http://llvm.org/viewvc/llvm-project?rev=71438&view=rev Log: Shrink wrapping in PEI: - reduces _static_ callee saved register spills and restores similar to Chow's original algorithm. - iterative implementation with simple heuristic limits to mitigate compile time impact. - handles placing spills/restores for multi-entry, multi-exit regions in the Machine CFG without splitting edges. - passes test-suite in LLCBETA mode. Added contains() method to ADT/SparseBitVector. Modified: llvm/trunk/include/llvm/ADT/SparseBitVector.h llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Modified: llvm/trunk/include/llvm/ADT/SparseBitVector.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SparseBitVector.h?rev=71438&r1=71437&r2=71438&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/SparseBitVector.h (original) +++ llvm/trunk/include/llvm/ADT/SparseBitVector.h Mon May 11 12:04:19 2009 @@ -641,8 +641,8 @@ return changed; } - // Intersect our bitmap with the complement of the RHS and return true if ours - // changed. + // Intersect our bitmap with the complement of the RHS and return true + // if ours changed. bool intersectWithComplement(const SparseBitVector &RHS) { bool changed = false; ElementListIter Iter1 = Elements.begin(); @@ -685,8 +685,8 @@ } - // Three argument version of intersectWithComplement. Result of RHS1 & ~RHS2 - // is stored into this bitmap. + // Three argument version of intersectWithComplement. + // Result of RHS1 & ~RHS2 is stored into this bitmap. void intersectWithComplement(const SparseBitVector &RHS1, const SparseBitVector &RHS2) { @@ -775,6 +775,14 @@ return false; } + // Return true iff all bits set in this SparseBitVector are + // also set in RHS. + bool contains(const SparseBitVector &RHS) const { + SparseBitVector Result(*this); + Result &= RHS; + return (Result == RHS); + } + // Return the first set bit in the bitmap. Return -1 if no bits are set. int find_first() const { if (Elements.empty()) @@ -875,6 +883,8 @@ } + + // Dump a SparseBitVector to a stream template void dump(const SparseBitVector &LHS, llvm::OStream &out) { Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=71438&r1=71437&r2=71438&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Mon May 11 12:04:19 2009 @@ -60,15 +60,41 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/Statistic.h" #include #include using namespace llvm; +STATISTIC(numSRReduced, "Number of CSR spills+restores reduced."); + // Shrink Wrapping: static cl::opt ShrinkWrapping("shrink-wrap", - cl::desc("Apply shrink wrapping to callee-saved register spills/restores")); + cl::desc("Shrink wrap callee-saved register spills/restores")); + +// Shrink wrap only the specified function, a debugging aid. +static cl::opt +ShrinkWrapFunc("shrink-wrap-func", cl::Hidden, + cl::desc("Shrink wrap the specified function"), + cl::value_desc("funcname"), + cl::init("")); + +// Debugging level for shrink wrapping. +enum ShrinkWrapDebugLevel { + None, BasicInfo, Iterations, Details +}; + +static cl::opt +ShrinkWrapDebugging("shrink-wrap-dbg", cl::Hidden, + cl::desc("Print shrink wrapping debugging information"), + cl::values( + clEnumVal(None , "disable debug output"), + clEnumVal(BasicInfo , "print basic DF sets"), + clEnumVal(Iterations, "print SR sets for each iteration"), + clEnumVal(Details , "print all DF sets"), + clEnumValEnd)); + namespace { struct VISIBILITY_HIDDEN PEI : public MachineFunctionPass { @@ -81,7 +107,7 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); - if (ShrinkWrapping) { + if (ShrinkWrapping || ShrinkWrapFunc != "") { AU.addRequired(); AU.addRequired(); } @@ -97,6 +123,8 @@ const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo(); RS = TRI->requiresRegisterScavenging(Fn) ? new RegScavenger() : NULL; + DEBUG(MF = &Fn); + // Get MachineModuleInfo so that we can track the construction of the // frame. if (MachineModuleInfo *MMI = getAnalysisIfAvailable()) @@ -127,7 +155,7 @@ // before the frame layout is finalized. TRI->processFunctionBeforeFrameFinalized(Fn); - // Calculate actual frame offsets for all of the abstract stack objects... + // Calculate actual frame offsets for all abstract stack objects... calculateFrameObjectOffsets(Fn); // Add prolog and epilog code to the function. This function is required @@ -143,6 +171,7 @@ replaceFrameIndices(Fn); delete RS; + clearAllSets(); return true; } @@ -172,7 +201,6 @@ // available in a basic block (Avail{In,Out}) // to be spilled at the entry to a basic block (CSRSave) // to be restored at the end of a basic block (CSRRestore) - CSRegSet UsedCSRegs; CSRegBlockMap CSRUsed; CSRegBlockMap AnticIn, AnticOut; @@ -184,22 +212,37 @@ MachineBasicBlock* EntryBlock; SmallVector ReturnBlocks; + // Map of MBBs to top level MachineLoops. + DenseMap TLLoops; + // Flag to control shrink wrapping per-function: // may choose to skip shrink wrapping for certain // functions. bool ShrinkWrapThisFunction; +#ifndef NDEBUG + // Machine function handle. + MachineFunction* MF; + + // Flag indicating that the current function + // has at least one "short" path in the machine + // CFG from the entry block to an exit block. + bool HasFastExitPath; +#endif + bool calculateSets(MachineFunction &Fn); + bool calcAnticInOut(MachineBasicBlock* MBB); + bool calcAvailInOut(MachineBasicBlock* MBB); void calculateAnticAvail(MachineFunction &Fn); - MachineBasicBlock* moveSpillsOutOfLoops(MachineFunction &Fn, - MachineBasicBlock* MBB); - void addRestoresForSBranchBlock(MachineFunction &Fn, - MachineBasicBlock* MBB); - void moveRestoresOutOfLoops(MachineFunction& Fn, - MachineBasicBlock* MBB, - std::vector& SBLKS); - void addSavesForRJoinBlocks(MachineFunction& Fn, - std::vector& SBLKS); + bool addUsesForMEMERegion(MachineBasicBlock* MBB, + SmallVector& blks); + bool addUsesForTopLevelLoops(SmallVector& blks); + bool calcSpillPlacements(MachineBasicBlock* MBB, + SmallVector &blks, + CSRegBlockMap &prevSpills); + bool calcRestorePlacements(MachineBasicBlock* MBB, + SmallVector &blks, + CSRegBlockMap &prevRestores); void placeSpillsAndRestores(MachineFunction &Fn); void placeCSRSpillsAndRestores(MachineFunction &Fn); void calculateCalleeSavedRegisters(MachineFunction &Fn); @@ -208,21 +251,13 @@ void replaceFrameIndices(MachineFunction &Fn); void insertPrologEpilogCode(MachineFunction &Fn); + // Initialize DFA sets, called before iterations. + void clearAnticAvailSets(); + // Clear all sets constructed by shrink wrapping. + void clearAllSets(); + // Initialize all shrink wrapping data. - void initShrinkWrappingInfo() { - UsedCSRegs.clear(); - CSRUsed.clear(); - AnticIn.clear(); - AnticOut.clear(); - AvailIn.clear(); - AvailOut.clear(); - CSRSave.clear(); - CSRRestore.clear(); - EntryBlock = 0; - if (! ReturnBlocks.empty()) - ReturnBlocks.clear(); - ShrinkWrapThisFunction = ShrinkWrapping; - } + void initShrinkWrappingInfo(); // Convienences for dealing with machine loops. MachineBasicBlock* getTopLevelLoopPreheader(MachineLoop* LP) { @@ -247,60 +282,79 @@ return LP; } + // Propgate CSRs used in MBB to all MBBs of loop LP. + void propagateUsesAroundLoop(MachineBasicBlock* MBB, MachineLoop* LP); + + // Convenience for recognizing return blocks. + bool isReturnBlock(MachineBasicBlock* MBB) { + return (MBB && !MBB->empty() && MBB->back().getDesc().isReturn()); + } + #ifndef NDEBUG // Debugging methods. - static std::string getBasicBlockName(const MachineBasicBlock* MBB) { - std::ostringstream name; - if (MBB) { - if (MBB->getBasicBlock()) - name << MBB->getBasicBlock()->getName(); - else - name << "_MBB_" << MBB->getNumber(); - } - return name.str(); - } - static std::string stringifyCSRegSet(const CSRegSet& s, - MachineFunction &Fn) { - const TargetRegisterInfo* TRI = Fn.getTarget().getRegisterInfo(); - const std::vector CSI = - Fn.getFrameInfo()->getCalleeSavedInfo(); - - std::ostringstream srep; - if (CSI.size() == 0) { - srep << "[]"; - return srep.str(); - } - srep << "["; - CSRegSet::iterator I = s.begin(), E = s.end(); - if (I != E) { - unsigned reg = CSI[*I].getReg(); - srep << TRI->getName(reg); - for (++I; I != E; ++I) { - reg = CSI[*I].getReg(); - srep << ","; - srep << TRI->getName(reg); - } - } - srep << "]"; - return srep.str(); - } + // Mark this function as having fast exit paths. + void findFastExitPath(); - static void dumpSet(const CSRegSet& s, MachineFunction &Fn) { - DOUT << stringifyCSRegSet(s, Fn) << "\n"; - } + // Verify placement of spills/restores. + void verifySpillRestorePlacement(); + + std::string getBasicBlockName(const MachineBasicBlock* MBB); + std::string stringifyCSRegSet(const CSRegSet& s); + void dumpSet(const CSRegSet& s); + void dumpUsed(MachineBasicBlock* MBB); + void dumpAllUsed(); + void dumpSets(MachineBasicBlock* MBB); + void dumpSets1(MachineBasicBlock* MBB); + void dumpAllSets(); + void dumpSRSets(); #endif }; char PEI::ID = 0; } +// Initialize shrink wrapping DFA sets, called before iterations. +void PEI::clearAnticAvailSets() { + AnticIn.clear(); + AnticOut.clear(); + AvailIn.clear(); + AvailOut.clear(); +} + +// Clear all sets constructed by shrink wrapping. +void PEI::clearAllSets() { + ReturnBlocks.clear(); + clearAnticAvailSets(); + UsedCSRegs.clear(); + CSRUsed.clear(); + TLLoops.clear(); + CSRSave.clear(); + CSRRestore.clear(); +} + +// Initialize all shrink wrapping data. +void PEI::initShrinkWrappingInfo() { + clearAllSets(); + EntryBlock = 0; + HasFastExitPath = false; + ShrinkWrapThisFunction = ShrinkWrapping; + // DEBUG: enable or disable shrink wrapping for the current function + // via --shrink-wrap-func=. +#ifndef NDEBUG + if (ShrinkWrapFunc != "") { + std::string MFName = MF->getFunction()->getName(); + ShrinkWrapThisFunction = (MFName == ShrinkWrapFunc); + } +#endif +} + + /// createPrologEpilogCodeInserter - This function returns a pass that inserts /// prolog and epilog code, and eliminates abstract frame references. /// FunctionPass *llvm::createPrologEpilogCodeInserter() { return new PEI(); } - /// placeCSRSpillsAndRestores - determine which MBBs of the function /// need save, restore code for callee-saved registers by doing a DF analysis /// similar to the one used in code motion (GVNPRE). This produces maps of MBBs @@ -316,167 +370,222 @@ /// void PEI::placeCSRSpillsAndRestores(MachineFunction &Fn) { -#ifndef NDEBUG - DOUT << "Place CSR spills/restores for " - << Fn.getFunction()->getName() << "\n"; -#endif - initShrinkWrappingInfo(); + DEBUG(if (ShrinkWrapThisFunction) { + DOUT << "Place CSR spills/restores for " + << MF->getFunction()->getName() << "\n"; + }); + if (calculateSets(Fn)) placeSpillsAndRestores(Fn); } -/// calculateAnticAvail - helper for computing the data flow -/// sets required for determining spill/restore placements. +/// calcAnticInOut - calculate the anticipated in/out reg sets +/// for the given MBB by looking forward in the MCFG at MBB's +/// successors. +/// +bool PEI::calcAnticInOut(MachineBasicBlock* MBB) { + bool changed = false; + + // AnticOut[MBB] = INTERSECT(AnticIn[S] for S in SUCCESSORS(MBB)) + SmallVector successors; + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), + SE = MBB->succ_end(); SI != SE; ++SI) { + MachineBasicBlock* SUCC = *SI; + if (SUCC != MBB) + successors.push_back(SUCC); + } + + unsigned i = 0, e = successors.size(); + if (i != e) { + CSRegSet prevAnticOut = AnticOut[MBB]; + MachineBasicBlock* SUCC = successors[i]; + + AnticOut[MBB] = AnticIn[SUCC]; + for (++i; i != e; ++i) { + SUCC = successors[i]; + AnticOut[MBB] &= AnticIn[SUCC]; + } + if (prevAnticOut != AnticOut[MBB]) + changed = true; + } + + // AnticIn[MBB] = UNION(CSRUsed[MBB], AnticOut[MBB]); + CSRegSet prevAnticIn = AnticIn[MBB]; + AnticIn[MBB] = CSRUsed[MBB] | AnticOut[MBB]; + if (prevAnticIn |= AnticIn[MBB]) + changed = true; + return changed; +} + +/// calcAvailInOut - calculate the available in/out reg sets +/// for the given MBB by looking backward in the MCFG at MBB's +/// predecessors. +/// +bool PEI::calcAvailInOut(MachineBasicBlock* MBB) { + bool changed = false; + + // AvailIn[MBB] = INTERSECT(AvailOut[P] for P in PREDECESSORS(MBB)) + SmallVector predecessors; + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), + PE = MBB->pred_end(); PI != PE; ++PI) { + MachineBasicBlock* PRED = *PI; + if (PRED != MBB) + predecessors.push_back(PRED); + } + + unsigned i = 0, e = predecessors.size(); + if (i != e) { + CSRegSet prevAvailIn = AvailIn[MBB]; + MachineBasicBlock* PRED = predecessors[i]; + + AvailIn[MBB] = AvailOut[PRED]; + for (++i; i != e; ++i) { + PRED = predecessors[i]; + AvailIn[MBB] &= AvailOut[PRED]; + } + if (prevAvailIn != AvailIn[MBB]) + changed = true; + } + + // AvailOut[MBB] = UNION(CSRUsed[MBB], AvailIn[MBB]); + CSRegSet prevAvailOut = AvailOut[MBB]; + AvailOut[MBB] = CSRUsed[MBB] | AvailIn[MBB]; + if (prevAvailOut |= AvailOut[MBB]) + changed = true; + return changed; +} + +/// calculateAnticAvail - build the sets anticipated and available +/// registers in the MCFG of the current function iteratively, +/// doing a combined forward and backward analysis. /// void PEI::calculateAnticAvail(MachineFunction &Fn) { + // Initialize data flow sets. + clearAnticAvailSets(); // Calulate Antic{In,Out} and Avail{In,Out} iteratively on the MCFG. bool changed = true; unsigned iterations = 0; while (changed) { changed = false; + ++iterations; for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); MBBI != MBBE; ++MBBI) { MachineBasicBlock* MBB = MBBI; - // AnticOut[MBB] = INTERSECT(AnticIn[S] for S in SUCC(MBB)) - MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), - SE = MBB->succ_end(); - if (SI != SE) { - CSRegSet prevAnticOut = AnticOut[MBB]; - MachineBasicBlock* SUCC = *SI; - AnticOut[MBB] = AnticIn[SUCC]; - for (++SI; SI != SE; ++SI) { - SUCC = *SI; - AnticOut[MBB] &= AnticIn[SUCC]; - } - if (prevAnticOut != AnticOut[MBB]) - changed = true; - } - // AnticIn[MBB] = CSRUsed[MBB] | AnticOut[MBB]; - CSRegSet prevAnticIn = AnticIn[MBB]; - AnticIn[MBB] = CSRUsed[MBB] | AnticOut[MBB]; - if (prevAnticIn |= AnticIn[MBB]) - changed = true; - - // AvailIn[MBB] = INTERSECT(AvailOut[S] for S in PRED(MBB)) - MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), - PE = MBB->pred_end(); - if (PI != PE) { - CSRegSet prevAvailIn = AvailIn[MBB]; - MachineBasicBlock* PRED = *PI; - AvailIn[MBB] = AvailOut[PRED]; - for (++PI; PI != PE; ++PI) { - PRED = *PI; - AvailIn[MBB] &= AvailOut[PRED]; - } - if (prevAvailIn != AvailIn[MBB]) - changed = true; - } - // AvailOut[MBB] = CSRUsed[MBB] | AvailIn[MBB]; - CSRegSet prevAvailOut = AvailOut[MBB]; - AvailOut[MBB] = CSRUsed[MBB] | AvailIn[MBB]; - if (prevAvailOut |= AvailOut[MBB]) - changed = true; + // Calculate anticipated in, out regs at MBB from + // anticipated at successors of MBB. + changed |= calcAnticInOut(MBB); + + // Calculate available in, out regs at MBB from + // available at predecessors of MBB. + changed |= calcAvailInOut(MBB); } - ++iterations; } - // EXP - AnticIn[EntryBlock].clear(); - AnticOut[EntryBlock].clear(); + DEBUG(if (ShrinkWrapDebugging >= Details) { + DOUT << "-----------------------------------------------------------\n"; + DOUT << " Antic/Avail Sets:\n"; + DOUT << "-----------------------------------------------------------\n"; + DOUT << "iterations = " << iterations << "\n"; + DOUT << "-----------------------------------------------------------\n"; + DOUT << "MBB | USED | ANTIC_IN | ANTIC_OUT | AVAIL_IN | AVAIL_OUT\n"; + DOUT << "-----------------------------------------------------------\n"; + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + dumpSets(MBB); + } + DOUT << "-----------------------------------------------------------\n"; + }); +} -#ifndef NDEBUG - DOUT << "-----------------------------------------------------------\n"; - DOUT << "iterations = " << iterations << "\n"; - DOUT << "-----------------------------------------------------------\n"; - DOUT << "MBB | ANTIC_IN | ANTIC_OUT | AVAIL_IN | AVAIL_OUT\n"; - DOUT << "-----------------------------------------------------------\n"; - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); - MBBI != MBBE; ++MBBI) { - MachineBasicBlock* MBB = MBBI; +/// propagateUsesAroundLoop - copy used register info from MBB to all blocks +/// of the loop given by LP and its parent loops. This prevents spills/restores +/// from being placed in the bodies of loops. +/// +void PEI::propagateUsesAroundLoop(MachineBasicBlock* MBB, MachineLoop* LP) { + if (! MBB || !LP) + return; - DOUT << getBasicBlockName(MBB) << " | " - << stringifyCSRegSet(AnticIn[MBB], Fn) - << " | " - << stringifyCSRegSet(AnticOut[MBB], Fn) - << " | " - << stringifyCSRegSet(AvailIn[MBB], Fn) - << " | " - << stringifyCSRegSet(AvailOut[MBB], Fn) - << "\n"; + std::vector loopBlocks = LP->getBlocks(); + for (unsigned i = 0, e = loopBlocks.size(); i != e; ++i) { + MachineBasicBlock* LBB = loopBlocks[i]; + if (LBB == MBB) + continue; + if (CSRUsed[LBB].contains(CSRUsed[MBB])) + continue; + CSRUsed[LBB] |= CSRUsed[MBB]; } -#endif } -/// calculateSets - helper function for placeCSRSpillsAndRestores, -/// collect the CSRs used in this function, develop the DF sets that -/// describe the minimal regions in the Machine CFG around which spills, -/// restores must be placed. -/// -/// This function decides if shrink wrapping should actually be done: -/// if all CSR uses are in the entry block, no shrink wrapping is possible, -/// so ShrinkWrapping is turned off (for the current function) and the -/// function returns false. +/// calculateSets - collect the CSRs used in this function, compute +/// the DF sets that describe the initial minimal regions in the +/// Machine CFG around which CSR spills and restores must be placed. +/// +/// Additionally, this function decides if shrink wrapping should +/// be disabled for the current function, checking the following: +/// 1. the current function has more than 500 MBBs: heuristic limit +/// on function size to reduce compile time impact of the current +/// iterative algorithm. +/// 2. all CSRs are used in the entry block. +/// 3. all CSRs are used in all immediate successors of the entry block. +/// 4. all CSRs are used in a subset of blocks, each of which dominates +/// all return blocks. These blocks, taken as a subgraph of the MCFG, +/// are equivalent to the entry block since all execution paths pass +/// through them. /// bool PEI::calculateSets(MachineFunction &Fn) { - // Sets used to compute spill, restore placement sets. const std::vector CSI = Fn.getFrameInfo()->getCalleeSavedInfo(); // If no CSRs used, we are done. if (CSI.empty()) { -#ifndef NDEBUG - DOUT << Fn.getFunction()->getName() - << " uses no callee-saved registers.\n"; -#endif + DEBUG(if (ShrinkWrapThisFunction) + DOUT << "DISABLED: " << Fn.getFunction()->getName() + << ": uses no callee-saved registers\n"); return false; } -#ifndef NDEBUG - DOUT << "-----------------------------------------------------------\n"; -#endif - - const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo(); - bool allCSRUsesInEntryBlock = true; - - // Initialize UsedCSRegs set, CSRUsed map. - // At the same time, put entry block directly into - // CSRSave, CSRRestore sets if any CSRs are used. - // - // Quick exit option (not implemented): - // Given N CSR uses in entry block, - // revert to default behavior, skip the placement - // step and put all saves in entry, restores in - // return blocks. - - // Set up entry and return blocks. + // Save refs to entry and return blocks. EntryBlock = Fn.begin(); for (MachineFunction::iterator MBB = Fn.begin(), E = Fn.end(); MBB != E; ++MBB) - if (!MBB->empty() && MBB->back().getDesc().isReturn()) + if (isReturnBlock(MBB)) ReturnBlocks.push_back(MBB); - // TODO -- check for a use of a CSR in each imm. successor of EntryBlock, - // do not shrink wrap this function if this is the case. + // Determine if this function has fast exit paths. + DEBUG(if (ShrinkWrapThisFunction) + findFastExitPath()); + + // Limit shrink wrapping via the current iterative bit vector + // implementation to functions with <= 500 MBBs. + if (Fn.size() > 500) { + DEBUG(if (ShrinkWrapThisFunction) + DOUT << "DISABLED: " << Fn.getFunction()->getName() + << ": too large (" << Fn.size() << " MBBs)\n"); + ShrinkWrapThisFunction = false; + } - // If not shrink wrapping (this function) at this point, set bits in - // CSR{Save,Restore}[] and UsedCSRegs, then return. - if (! ShrinkWrapThisFunction) { - for (unsigned inx = 0, e = CSI.size(); inx != e; ++inx) { - UsedCSRegs.set(inx); - CSRSave[EntryBlock].set(inx); - for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) - CSRRestore[ReturnBlocks[ri]].set(inx); - } + // Return now if not shrink wrapping. + if (! ShrinkWrapThisFunction) return false; + + // Collect set of used CSRs. + for (unsigned inx = 0, e = CSI.size(); inx != e; ++inx) { + UsedCSRegs.set(inx); } - // Walk instructions in all MBBs, create basic sets, choose + // Walk instructions in all MBBs, create CSRUsed[] sets, choose // whether or not to shrink wrap this function. + MachineLoopInfo &LI = getAnalysis(); + MachineDominatorTree &DT = getAnalysis(); + const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo(); + + bool allCSRUsesInEntryBlock = true; for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); MBBI != MBBE; ++MBBI) { MachineBasicBlock* MBB = MBBI; @@ -496,357 +605,453 @@ if (MOReg == Reg || (TargetRegisterInfo::isPhysicalRegister(MOReg) && TargetRegisterInfo::isPhysicalRegister(Reg) && - TRI->isSubRegister(MOReg, Reg))) { + TRI->isSubRegister(Reg, MOReg))) { // CSR Reg is defined/used in block MBB. - UsedCSRegs.set(inx); CSRUsed[MBB].set(inx); - // Short-circuit analysis for entry, return blocks: - // if a CSR is used in the entry block, add it directly - // to CSRSave[EntryBlock] and to CSRRestore[R] for R - // in ReturnBlocks. Note CSR uses in non-entry blocks. - if (ShrinkWrapThisFunction) { - if (MBB == EntryBlock) { - CSRSave[MBB].set(inx); - for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) - CSRRestore[ReturnBlocks[ri]].set(inx); - } else - allCSRUsesInEntryBlock = false; - } else { - // Not shrink wrapping => ensure saves/restores are correctly - // added for entry, return blocks. - CSRSave[EntryBlock].set(inx); - for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) - CSRRestore[ReturnBlocks[ri]].set(inx); - } + // Check for uses in EntryBlock. + if (MBB != EntryBlock) + allCSRUsesInEntryBlock = false; } } } } -#ifndef NDEBUG - DOUT << "CSRUsed[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(CSRUsed[MBB], Fn) << "\n"; -#endif - } -#ifndef NDEBUG - DOUT << "UsedCSRegs = " << stringifyCSRegSet(UsedCSRegs, Fn) << "\n"; -#endif + if (CSRUsed[MBB].empty()) + continue; - // Early exit: - // 1. Not asked to do shrink wrapping => just "place" all spills(restores) - // in the entry(return) block(s), already done above. - // 2. All CSR uses in entry block => same as case 1, but say we will - // not shrink wrap the current function. - ShrinkWrapThisFunction = (ShrinkWrapping && - ShrinkWrapThisFunction && - ! allCSRUsesInEntryBlock); - if (! ShrinkWrapThisFunction) { - return false; + // Propagate CSRUsed[MBB] in loops + if (MachineLoop* LP = LI.getLoopFor(MBB)) { + // Add top level loop to work list. + MachineBasicBlock* HDR = getTopLevelLoopPreheader(LP); + MachineLoop* PLP = getTopLevelLoopParent(LP); + + if (! HDR) { + HDR = PLP->getHeader(); + assert(HDR->pred_size() > 0 && "Loop header has no predecessors?"); + MachineBasicBlock::pred_iterator PI = HDR->pred_begin(); + HDR = *PI; + } + TLLoops[HDR] = PLP; + + // Push uses from inside loop to its parent loops, + // or to all other MBBs in its loop. + if (LP->getLoopDepth() > 1) { + for (MachineLoop* PLP = LP->getParentLoop(); PLP; + PLP = PLP->getParentLoop()) { + propagateUsesAroundLoop(MBB, PLP); + } + } else { + propagateUsesAroundLoop(MBB, LP); + } + } } - calculateAnticAvail(Fn); + if (allCSRUsesInEntryBlock) { + DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() + << ": all CSRs used in EntryBlock\n"); + ShrinkWrapThisFunction = false; + } else { + bool allCSRsUsedInEntryFanout = true; + for (MachineBasicBlock::succ_iterator SI = EntryBlock->succ_begin(), + SE = EntryBlock->succ_end(); SI != SE; ++SI) { + MachineBasicBlock* SUCC = *SI; + if (CSRUsed[SUCC] != UsedCSRegs) + allCSRsUsedInEntryFanout = false; + } + if (allCSRsUsedInEntryFanout) { + DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() + << ": all CSRs used in imm successors of EntryBlock\n"); + ShrinkWrapThisFunction = false; + } + } - return true; -} + if (ShrinkWrapThisFunction) { + // Check if MBB uses CSRs and dominates all exit nodes. + // Such nodes are equiv. to the entry node w.r.t. + // CSR uses: every path through the function must + // pass through this node. If each CSR is used at least + // once by these nodes, shrink wrapping is disabled. + CSRegSet CSRUsedInChokePoints; + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + if (MBB == EntryBlock || CSRUsed[MBB].empty() || MBB->succ_size() < 1) + continue; + bool dominatesExitNodes = true; + for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) + if (! DT.dominates(MBB, ReturnBlocks[ri])) { + dominatesExitNodes = false; + break; + } + if (dominatesExitNodes) { + CSRUsedInChokePoints |= CSRUsed[MBB]; + if (CSRUsedInChokePoints == UsedCSRegs) { + DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() + << ": all CSRs used in choke point(s) at " + << getBasicBlockName(MBB) << "\n"); + ShrinkWrapThisFunction = false; + break; + } + } + } + } -/// moveSpillsOutOfLoops - helper for placeSpillsAndRestores() which -/// relocates a spill from a subgraph in a loop to the loop preheader. -/// Returns the MBB to which saves have been moved, or the given MBB -/// if it is a branch point. -/// -MachineBasicBlock* PEI::moveSpillsOutOfLoops(MachineFunction &Fn, - MachineBasicBlock* MBB) { - if (MBB == 0 || CSRSave[MBB].empty()) - return 0; + // Return now if we have decided not to apply shrink wrapping + // to the current function. + if (! ShrinkWrapThisFunction) + return false; - // Block to which saves are moved. - MachineBasicBlock* DEST = 0; - MachineLoopInfo &LI = getAnalysis(); + DEBUG({ + DOUT << "ENABLED: " << Fn.getFunction()->getName(); + if (HasFastExitPath) + DOUT << " (fast exit path)"; + DOUT << "\n"; + if (ShrinkWrapDebugging >= BasicInfo) { + DOUT << "------------------------------" + << "-----------------------------\n"; + DOUT << "UsedCSRegs = " << stringifyCSRegSet(UsedCSRegs) << "\n"; + if (ShrinkWrapDebugging >= Details) { + DOUT << "------------------------------" + << "-----------------------------\n"; + dumpAllUsed(); + } + } + }); - if (MachineLoop* LP = LI.getLoopFor(MBB)) { - MachineBasicBlock* LPH = getTopLevelLoopPreheader(LP); - assert(LPH && "Loop has no top level preheader?"); + // Build initial DF sets to determine minimal regions in the + // Machine CFG around which CSRs must be spilled and restored. + calculateAnticAvail(Fn); -#ifndef NDEBUG - DOUT << "Moving saves of " - << stringifyCSRegSet(CSRSave[MBB], Fn) - << " from " << getBasicBlockName(MBB) - << " to " << getBasicBlockName(LPH) << "\n"; -#endif - // Add CSRegSet from MBB to LPH, empty out MBB's CSRegSet. - CSRSave[LPH] |= CSRSave[MBB]; - // If saves moved to entry block, add restores to returns. - if (LPH == EntryBlock) { - for (unsigned i = 0, e = ReturnBlocks.size(); i != e; ++i) - CSRRestore[ReturnBlocks[i]] |= CSRSave[MBB]; - } else { - // Remember where we moved the save so we can add - // restores on successor paths if necessary. - if (LPH->succ_size() > 1) - DEST = LPH; - } - CSRSave[MBB].clear(); - } else if (MBB->succ_size() > 1) - DEST = MBB; - return DEST; + return true; } -/// addRestoresForSBranchBlock - helper for placeSpillsAndRestores() which -/// adds restores of CSRs saved in branch point MBBs to the front of any -/// successor blocks connected to regions with no uses of the saved CSRs. +/// addUsesForMEMERegion - add uses of CSRs spilled or restored in +/// multi-entry, multi-exit (MEME) regions so spill and restore +/// placement will not break code that enters or leaves a +/// shrink-wrapped region by inducing spills with no matching +/// restores or restores with no matching spills. A MEME region +/// is a subgraph of the MCFG with multiple entry edges, multiple +/// exit edges, or both. This code propagates use information +/// through the MCFG until all paths requiring spills and restores +/// _outside_ the computed minimal placement regions have been covered. /// -void PEI::addRestoresForSBranchBlock(MachineFunction &Fn, - MachineBasicBlock* MBB) { +bool PEI::addUsesForMEMERegion(MachineBasicBlock* MBB, + SmallVector& blks) { + if (MBB->succ_size() < 2 && MBB->pred_size() < 2) { + bool processThisBlock = false; + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), + SE = MBB->succ_end(); SI != SE; ++SI) { + MachineBasicBlock* SUCC = *SI; + if (SUCC->pred_size() > 1) { + processThisBlock = true; + break; + } + } + if (!CSRRestore[MBB].empty() && MBB->succ_size() > 0) { + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), + PE = MBB->pred_end(); PI != PE; ++PI) { + MachineBasicBlock* PRED = *PI; + if (PRED->succ_size() > 1) { + processThisBlock = true; + break; + } + } + } + if (! processThisBlock) + return false; + } - if (MBB == 0 || CSRSave[MBB].empty() || MBB->succ_size() < 2) - return; + CSRegSet prop; + if (!CSRSave[MBB].empty()) + prop = CSRSave[MBB]; + else if (!CSRRestore[MBB].empty()) + prop = CSRRestore[MBB]; + else + prop = CSRUsed[MBB]; + if (prop.empty()) + return false; - // Add restores of CSRs saved in branch point MBBs to the - // front of any succ blocks flowing into regions that - // have no uses of MBB's CSRs. - bool hasCSRUses = false; + // Propagate selected bits to successors, predecessors of MBB. + bool addedUses = false; for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), SE = MBB->succ_end(); SI != SE; ++SI) { MachineBasicBlock* SUCC = *SI; - bool needsRestore = false; - if (CSRUsed[SUCC].intersects(CSRSave[MBB])) { - hasCSRUses = true; + // Self-loop + if (SUCC == MBB) continue; + if (! CSRUsed[SUCC].contains(prop)) { + CSRUsed[SUCC] |= prop; + addedUses = true; + blks.push_back(SUCC); + DEBUG(if (ShrinkWrapDebugging >= Iterations) + DOUT << getBasicBlockName(MBB) + << "(" << stringifyCSRegSet(prop) << ")->" + << "successor " << getBasicBlockName(SUCC) << "\n"); } - needsRestore = true; - for (df_iterator BI = df_begin(SUCC), - BE = df_end(SUCC); BI != BE; ++BI) { - MachineBasicBlock* SBB = *BI; - if (CSRUsed[SBB].intersects(CSRSave[MBB])) { - hasCSRUses = true; - needsRestore = false; - break; - } - } - // Additional restores are needed for SUCC iff there is at least - // one CSR use reachable from the successors of MBB and there - // are no uses in or below SUCC. - if (needsRestore && hasCSRUses) { -#ifndef NDEBUG - DOUT << "MBB " << getBasicBlockName(MBB) - << " needs a restore on path to successor " - << getBasicBlockName(SUCC) << "\n"; -#endif - // Add restores to SUCC for all CSRs saved in MBB... - CSRRestore[SUCC] = CSRSave[MBB]; + } + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), + PE = MBB->pred_end(); PI != PE; ++PI) { + MachineBasicBlock* PRED = *PI; + // Self-loop + if (PRED == MBB) + continue; + if (! CSRUsed[PRED].contains(prop)) { + CSRUsed[PRED] |= prop; + addedUses = true; + blks.push_back(PRED); + DEBUG(if (ShrinkWrapDebugging >= Iterations) + DOUT << getBasicBlockName(MBB) + << "(" << stringifyCSRegSet(prop) << ")->" + << "predecessor " << getBasicBlockName(PRED) << "\n"); } } + return addedUses; } -/// moveRestoresOutOfLoops - helper for placeSpillsAndRestores() which -/// relocates restores from a subgraph in a loop to the loop exit blocks. -/// This function records the MBBs to which restores have been moved in -/// SBLKS. If no restores are moved, SBLKS contains the input MBB if it -/// is a join point in the Machine CFG. +/// addUsesForTopLevelLoops - add uses for CSRs used inside top +/// level loops to the exit blocks of those loops. /// -void PEI::moveRestoresOutOfLoops(MachineFunction& Fn, - MachineBasicBlock* MBB, - std::vector& SBLKS) { - - SBLKS.clear(); - if (MBB == 0 || CSRRestore[MBB].empty()) - return; - - MachineLoopInfo &LI = getAnalysis(); - - if (MachineLoop* LP = LI.getLoopFor(MBB)) { - LP = getTopLevelLoopParent(LP); - assert(LP && "Loop with no top level parent?"); +bool PEI::addUsesForTopLevelLoops(SmallVector& blks) { + bool addedUses = false; + // Place restores for top level loops where needed. + for (DenseMap::iterator + I = TLLoops.begin(), E = TLLoops.end(); I != E; ++I) { + MachineBasicBlock* MBB = I->first; + MachineLoop* LP = I->second; + MachineBasicBlock* HDR = LP->getHeader(); SmallVector exitBlocks; + CSRegSet loopSpills; + + loopSpills = CSRSave[MBB]; + if (CSRSave[MBB].empty()) { + loopSpills = CSRUsed[HDR]; + assert(!loopSpills.empty() && "No CSRs used in loop?"); + } else if (CSRRestore[MBB].contains(CSRSave[MBB])) + continue; LP->getExitBlocks(exitBlocks); - assert(exitBlocks.size() > 0 && - "Loop has no top level exit blocks?"); + assert(exitBlocks.size() > 0 && "Loop has no top level exit blocks?"); for (unsigned i = 0, e = exitBlocks.size(); i != e; ++i) { MachineBasicBlock* EXB = exitBlocks[i]; - -#ifndef NDEBUG - DOUT << "Moving restores of " - << stringifyCSRegSet(CSRRestore[MBB], Fn) - << " from " << getBasicBlockName(MBB) - << " to " << getBasicBlockName(EXB) << "\n"; -#endif - - // Add CSRegSet from MBB to LPE, empty out MBB's CSRegSet. - CSRRestore[EXB] |= CSRRestore[MBB]; - if (EXB->pred_size() > 1) - SBLKS.push_back(EXB); + if (! CSRUsed[EXB].contains(loopSpills)) { + CSRUsed[EXB] |= loopSpills; + addedUses = true; + DEBUG(if (ShrinkWrapDebugging >= Iterations) + DOUT << "LOOP " << getBasicBlockName(MBB) + << "(" << stringifyCSRegSet(loopSpills) << ")->" + << getBasicBlockName(EXB) << "\n"); + if (EXB->succ_size() > 1 || EXB->pred_size() > 1) + blks.push_back(EXB); + } } - CSRRestore[MBB].clear(); - } else if (MBB->pred_size() > 1) - SBLKS.push_back(MBB); + } + return addedUses; } -/// addSavesForRJoinBlocks - Add saves of CSRs restored in join point MBBs -/// to the ends of any pred blocks that flow into MBB from regions that -/// have no uses of MBB's CSRs. +/// calcSpillPlacements - determine which CSRs should be spilled +/// in MBB using AnticIn sets of MBB's predecessors, keeping track +/// of changes to spilled reg sets. Add MBB to the set of blocks +/// that need to be processed for propagating use info to cover +/// multi-entry/exit regions. /// -void PEI::addSavesForRJoinBlocks(MachineFunction& Fn, - std::vector& SBLKS) { +bool PEI::calcSpillPlacements(MachineBasicBlock* MBB, + SmallVector &blks, + CSRegBlockMap &prevSpills) { + bool placedSpills = false; + // Intersect (CSRegs - AnticIn[P]) for P in Predecessors(MBB) + CSRegSet anticInPreds; + SmallVector predecessors; + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), + PE = MBB->pred_end(); PI != PE; ++PI) { + MachineBasicBlock* PRED = *PI; + if (PRED != MBB) + predecessors.push_back(PRED); + } + unsigned i = 0, e = predecessors.size(); + if (i != e) { + MachineBasicBlock* PRED = predecessors[i]; + anticInPreds = UsedCSRegs - AnticIn[PRED]; + for (++i; i != e; ++i) { + PRED = predecessors[i]; + anticInPreds &= (UsedCSRegs - AnticIn[PRED]); + } + } else { + // Handle uses in entry blocks (which have no predecessors). + // This is necessary because the DFA formulation assumes the + // entry and (multiple) exit nodes cannot have CSR uses, which + // is not the case in the real world. + anticInPreds = UsedCSRegs; + } + // Compute spills required at MBB: + CSRSave[MBB] |= (AnticIn[MBB] - AvailIn[MBB]) & anticInPreds; - if (SBLKS.empty()) - return; + if (! CSRSave[MBB].empty()) { + if (MBB == EntryBlock) { + for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) + CSRRestore[ReturnBlocks[ri]] |= CSRSave[MBB]; + } else { + // Reset all regs spilled in MBB that are also spilled in EntryBlock. + if (CSRSave[EntryBlock].intersects(CSRSave[MBB])) { + CSRSave[MBB] = CSRSave[MBB] - CSRSave[EntryBlock]; + } + } + } + placedSpills = (CSRSave[MBB] != prevSpills[MBB]); + prevSpills[MBB] = CSRSave[MBB]; + // Remember this block for adding restores to successor + // blocks for multi-entry region. + if (placedSpills) + blks.push_back(MBB); + + DEBUG(if (! CSRSave[MBB].empty() && ShrinkWrapDebugging >= Iterations) + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRSave[MBB]) << "\n"); - for (unsigned i = 0, e = SBLKS.size(); i != e; ++i) { - MachineBasicBlock* MBB = SBLKS[i]; - if (MBB->pred_size() > 1) { - bool needsSave = false; - for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), - PE = MBB->pred_end(); PI != PE; ++PI) { - MachineBasicBlock* PRED = *PI; + return placedSpills; +} - // Walk back up in the CFG from the preds of MBB, look for - // a block that uses any CSR that is restored in MBB. - if (CSRUsed[PRED].intersects(CSRRestore[MBB])) - continue; - needsSave = true; - for (idf_iterator PPI = idf_begin(PRED), - PPE = idf_end(PRED); PPI != PPE; ++PPI) { - MachineBasicBlock* PBB = *PPI; - if (CSRUsed[PBB].intersects(CSRRestore[MBB])) { - needsSave = false; - break; - } - } - if (needsSave) { - // Add saves to PRED for all CSRs restored in MBB... -#ifndef NDEBUG - DOUT << "MBB " << getBasicBlockName(MBB) - << " needs a save on path from predecessor " - << getBasicBlockName(PRED) << "\n"; -#endif - CSRSave[PRED] = CSRRestore[MBB]; - } - } +/// calcRestorePlacements - determine which CSRs should be restored +/// in MBB using AvailOut sets of MBB's succcessors, keeping track +/// of changes to restored reg sets. Add MBB to the set of blocks +/// that need to be processed for propagating use info to cover +/// multi-entry/exit regions. +/// +bool PEI::calcRestorePlacements(MachineBasicBlock* MBB, + SmallVector &blks, + CSRegBlockMap &prevRestores) { + bool placedRestores = false; + // Intersect (CSRegs - AvailOut[S]) for S in Successors(MBB) + CSRegSet availOutSucc; + SmallVector successors; + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), + SE = MBB->succ_end(); SI != SE; ++SI) { + MachineBasicBlock* SUCC = *SI; + if (SUCC != MBB) + successors.push_back(SUCC); + } + unsigned i = 0, e = successors.size(); + if (i != e) { + MachineBasicBlock* SUCC = successors[i]; + availOutSucc = UsedCSRegs - AvailOut[SUCC]; + for (++i; i != e; ++i) { + SUCC = successors[i]; + availOutSucc &= (UsedCSRegs - AvailOut[SUCC]); + } + } else { + if (! CSRUsed[MBB].empty() || ! AvailOut[MBB].empty()) { + // Handle uses in return blocks (which have no successors). + // This is necessary because the DFA formulation assumes the + // entry and (multiple) exit nodes cannot have CSR uses, which + // is not the case in the real world. + availOutSucc = UsedCSRegs; } } + // Compute restores required at MBB: + CSRRestore[MBB] |= (AvailOut[MBB] - AnticOut[MBB]) & availOutSucc; + + // Postprocess restore placements at MBB. + // Remove the CSRs that are restored in the return blocks. + // Lest this be confusing, note that: + // CSRSave[EntryBlock] == CSRRestore[B] for all B in ReturnBlocks. + if (MBB->succ_size() && ! CSRRestore[MBB].empty()) { + if (! CSRSave[EntryBlock].empty()) + CSRRestore[MBB] = CSRRestore[MBB] - CSRSave[EntryBlock]; + } + placedRestores = (CSRRestore[MBB] != prevRestores[MBB]); + prevRestores[MBB] = CSRRestore[MBB]; + // Remember this block for adding saves to predecessor + // blocks for multi-entry region. + if (placedRestores) + blks.push_back(MBB); + + DEBUG(if (! CSRRestore[MBB].empty() && ShrinkWrapDebugging >= Iterations) + DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"); + + return placedRestores; } -/// placeSpillsAndRestores - decide which MBBs need spills, restores -/// of CSRs. +/// placeSpillsAndRestores - place spills and restores of CSRs +/// used in MBBs in minimal regions that contain the uses. /// void PEI::placeSpillsAndRestores(MachineFunction &Fn) { + CSRegBlockMap prevCSRSave; + CSRegBlockMap prevCSRRestore; + SmallVector cvBlocks, ncvBlocks; + bool changed = true; + unsigned iterations = 0; -#ifndef NDEBUG - DOUT << "-----------------------------------------------------------\n"; -#endif + // Iterate computation of spill and restore placements in the MCFG until: + // 1. CSR use info has been fully propagated around the MCFG, and + // 2. computation of CSRSave[], CSRRestore[] reach fixed points. + while (changed) { + changed = false; + ++iterations; - // Calculate CSR{Save,Restore} using Antic, Avail on the Machine-CFG. - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); - MBBI != MBBE; ++MBBI) { - MachineBasicBlock* MBB = MBBI; - // Entry block saves are recorded in UsedCSRegs pass above. - if (MBB != EntryBlock) { - // Intersect (CSRegs - AnticIn[P]) for all predecessors P of MBB - CSRegSet anticInPreds; - MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), - PE = MBB->pred_end(); - if (PI != PE) { - MachineBasicBlock* PRED = *PI; - anticInPreds = UsedCSRegs - AnticIn[PRED]; - for (++PI; PI != PE; ++PI) { - PRED = *PI; - // Handle self loop. - if (PRED != MBB) - anticInPreds &= (UsedCSRegs - AnticIn[PRED]); - } - } - // CSRSave[MBB] = (AnticIn[MBB] - AvailIn[MBB]) & anticInPreds - CSRSave[MBB] = (AnticIn[MBB] - AvailIn[MBB]) & anticInPreds; + DEBUG(if (ShrinkWrapDebugging >= Iterations) + DOUT << "iter " << iterations + << " --------------------------------------------------\n"); + + // Calculate CSR{Save,Restore} sets using Antic, Avail on the MCFG, + // which determines the placements of spills and restores. + // Keep track of changes to spills, restores in each iteration to + // minimize the total iterations. + bool SRChanged = false; + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; - // Remove the CSRs that are saved in the entry block - if (! CSRSave[MBB].empty() && ! CSRSave[EntryBlock].empty()) - CSRSave[MBB] = CSRSave[MBB] - CSRSave[EntryBlock]; + // Place spills for CSRs in MBB. + SRChanged |= calcSpillPlacements(MBB, cvBlocks, prevCSRSave); - // Move saves inside loops to the preheaders of the outermost - // containing loops, add restores to blocks reached by saves - // placed at branch points where necessary. - if (MachineBasicBlock* DESTBB = moveSpillsOutOfLoops(Fn, MBB)) { - // Add restores to blocks reached by saves placed at branch - // points where necessary. - addRestoresForSBranchBlock(Fn, DESTBB); - } + // Place restores for CSRs in MBB. + SRChanged |= calcRestorePlacements(MBB, cvBlocks, prevCSRRestore); } -#ifndef NDEBUG - if (! CSRSave[MBB].empty()) - DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(CSRSave[MBB], Fn) << "\n"; -#endif + // Add uses of CSRs used inside loops where needed. + changed |= addUsesForTopLevelLoops(cvBlocks); - // Compute CSRRestore, which may already be set for return blocks. - if (! CSRRestore[MBB].empty() || MBB->pred_size() == 0) - continue; - - // Intersect (CSRegs - AvailOut[S]) for all successors S of MBB - CSRegSet availOutSucc; - MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), - SE = MBB->succ_end(); - if (SI != SE) { - MachineBasicBlock* SUCC = *SI; - availOutSucc = UsedCSRegs - AvailOut[SUCC]; - for (++SI; SI != SE; ++SI) { - SUCC = *SI; - // Handle self loop. - if (SUCC != MBB) - availOutSucc &= (UsedCSRegs - AvailOut[SUCC]); + // Add uses for CSRs spilled or restored at branch, join points. + if (changed || SRChanged) { + while (! cvBlocks.empty()) { + MachineBasicBlock* MBB = cvBlocks.pop_back_val(); + changed |= addUsesForMEMERegion(MBB, ncvBlocks); + } + if (! ncvBlocks.empty()) { + cvBlocks = ncvBlocks; + ncvBlocks.clear(); } - } else if (! CSRUsed[MBB].empty()) { - // Take care of uses in return blocks (which have no successors). - availOutSucc = UsedCSRegs; } - // CSRRestore[MBB] = (AvailOut[MBB] - AnticOut[MBB]) & availOutSucc - CSRRestore[MBB] = (AvailOut[MBB] - AnticOut[MBB]) & availOutSucc; - - // Remove the CSRs that are restored in the return blocks. - // Lest this be confusing, note that: - // CSRSave[EntryBlock] == CSRRestore[B] for all B in ReturnBlocks. - if (! CSRRestore[MBB].empty() && ! CSRSave[EntryBlock].empty()) - CSRRestore[MBB] = CSRRestore[MBB] - CSRSave[EntryBlock]; - - // Move restores inside loops to the exits of the outermost (top level) - // containing loops. - std::vector saveBlocks; - moveRestoresOutOfLoops(Fn, MBB, saveBlocks); - - // Add saves of CSRs restored in join point MBBs to the ends - // of any pred blocks that flow into MBB from regions that - // have no uses of MBB's CSRs. - addSavesForRJoinBlocks(Fn, saveBlocks); -#ifndef NDEBUG - if (! CSRRestore[MBB].empty()) - DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(CSRRestore[MBB], Fn) << "\n"; -#endif - } - -#ifndef NDEBUG - DOUT << "-----------------------------------------------------------\n"; - DOUT << "Final SAVE, RESTORE:\n"; - DOUT << "-----------------------------------------------------------\n"; - for (MachineFunction::iterator MBB = Fn.begin(), E = Fn.end(); - MBB != E; ++MBB) { - if (! CSRSave[MBB].empty()) { - DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(CSRSave[MBB], Fn); - if (CSRRestore[MBB].empty()) - DOUT << "\n"; - } - if (! CSRRestore[MBB].empty()) { - if (! CSRSave[MBB].empty()) - DOUT << " "; - DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(CSRRestore[MBB], Fn) << "\n"; + if (changed) { + calculateAnticAvail(Fn); + CSRSave.clear(); + CSRRestore.clear(); } } -#endif + + // Check for effectiveness: + // SR0 = {r | r in CSRSave[EntryBlock], CSRRestore[RB], RB in ReturnBlocks} + // numSRReduced = |(UsedCSRegs - SR0)|, approx. SR0 by CSRSave[EntryBlock] + // Gives a measure of how many CSR spills have been moved from EntryBlock + // to minimal regions enclosing their uses. + CSRegSet notSpilledInEntryBlock = (UsedCSRegs - CSRSave[EntryBlock]); + unsigned numSRReducedThisFunc = notSpilledInEntryBlock.count(); + numSRReduced += numSRReducedThisFunc; + DEBUG(if (ShrinkWrapDebugging >= BasicInfo) { + DOUT << "-----------------------------------------------------------\n"; + DOUT << "total iterations = " << iterations << " ( " + << Fn.getFunction()->getName() + << " " << numSRReducedThisFunc + << " " << Fn.size() + << " )\n"; + DOUT << "-----------------------------------------------------------\n"; + dumpSRSets(); + DOUT << "-----------------------------------------------------------\n"; + if (numSRReducedThisFunc) + verifySpillRestorePlacement(); + }); } /// calculateCalleeSavedRegisters - Scan the function for modified callee saved @@ -982,90 +1187,29 @@ const TargetInstrInfo &TII = *Fn.getTarget().getInstrInfo(); MachineBasicBlock::iterator I; - std::vector blockCSI; - -#ifndef NDEBUG - DOUT << "Inserting spill/restore code for CSRs in function " - << Fn.getFunction()->getName() << "\n"; -#endif - - // Insert spills. - for (CSRegBlockMap::iterator - BI = CSRSave.begin(), BE = CSRSave.end(); BI != BE; ++BI) { - MachineBasicBlock* MBB = BI->first; - CSRegSet save = BI->second; - - if (save.empty()) - continue; - if (! ShrinkWrapThisFunction) { - // Spill using target interface. - I = MBB->begin(); - if (!TII.spillCalleeSavedRegisters(*MBB, I, CSI)) { - for (unsigned i = 0, e = CSI.size(); i != e; ++i) { - // Add the callee-saved register as live-in. It's killed at the spill. - MBB->addLiveIn(CSI[i].getReg()); - - // Insert the spill to the stack frame. - TII.storeRegToStackSlot(*MBB, I, CSI[i].getReg(), true, - CSI[i].getFrameIdx(), CSI[i].getRegClass()); - } - } - } else { -#ifndef NDEBUG - DOUT << "CSRSave[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(save, Fn) << "\n"; -#endif + DEBUG(if (ShrinkWrapThisFunction && ShrinkWrapDebugging >= Details) + DOUT << "Inserting CSR spills/restores in function " + << Fn.getFunction()->getName() << "\n"); - blockCSI.clear(); - for (CSRegSet::iterator RI = save.begin(), - RE = save.end(); RI != RE; ++RI) { - blockCSI.push_back(CSI[*RI]); - } - assert(blockCSI.size() > 0 && - "Could not collect callee saved register info"); - - // If MBB has no uses of CSRs being saved, this means saves - // must be inserted at the _end_. - if (! MBB->empty() && ! CSRUsed[MBB].intersects(save)) { - I = MBB->end(); - --I; - if (I->getDesc().isCall()) { - ++I; - } else { - MachineBasicBlock::iterator I2 = I; - while (I2 != MBB->begin() && (--I2)->getDesc().isTerminator()) - I = I2; - } - } else { - I = MBB->begin(); - } - - // When shrink wrapping, use stack slot stores/loads. - for (unsigned i = 0, e = blockCSI.size(); i != e; ++i) { + if (! ShrinkWrapThisFunction) { + // Spill using target interface. + I = EntryBlock->begin(); + if (!TII.spillCalleeSavedRegisters(*EntryBlock, I, CSI)) { + for (unsigned i = 0, e = CSI.size(); i != e; ++i) { // Add the callee-saved register as live-in. // It's killed at the spill. - MBB->addLiveIn(blockCSI[i].getReg()); + EntryBlock->addLiveIn(CSI[i].getReg()); // Insert the spill to the stack frame. - TII.storeRegToStackSlot(*MBB, I, blockCSI[i].getReg(), - true, - blockCSI[i].getFrameIdx(), - blockCSI[i].getRegClass()); + TII.storeRegToStackSlot(*EntryBlock, I, CSI[i].getReg(), true, + CSI[i].getFrameIdx(), CSI[i].getRegClass()); } } - } - // Use CSRRestore to add code to restore the callee-saved registers in - // each block. - for (CSRegBlockMap::iterator - BI = CSRRestore.begin(), BE = CSRRestore.end(); BI != BE; ++BI) { - MachineBasicBlock* MBB = BI->first; - CSRegSet restore = BI->second; - if (restore.empty()) - continue; - if (! ShrinkWrapThisFunction) { - // Restore using target interface. + // Restore using target interface. + for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) { + MachineBasicBlock* MBB = ReturnBlocks[ri]; I = MBB->end(); --I; // Skip over all terminator instructions, which are part of the return @@ -1098,79 +1242,117 @@ } } } - } else { -#ifndef NDEBUG - DOUT << "CSRRestore[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(restore, Fn) << "\n"; -#endif + } + return; + } - blockCSI.clear(); - for (CSRegSet::iterator RI = restore.begin(), - RE = restore.end(); RI != RE; ++RI) { - blockCSI.push_back(CSI[*RI]); - } - assert(blockCSI.size() > 0 && - "Could not find callee saved register info"); - - // If MBB uses no CSRs but has restores, this means - // it must have restores inserted at the _beginning_. - // N.B. -- not necessary if edge splitting done. - if (MBB->empty() || ! CSRUsed[MBB].intersects(restore)) { - I = MBB->begin(); - } else { - I = MBB->end(); - --I; + // Insert spills. + std::vector blockCSI; + for (CSRegBlockMap::iterator BI = CSRSave.begin(), + BE = CSRSave.end(); BI != BE; ++BI) { + MachineBasicBlock* MBB = BI->first; + CSRegSet save = BI->second; - // EXP iff spill/restore implemented with push/pop: - // append restore to block unless it ends in a - // barrier terminator instruction. - - // Skip over all terminator instructions, which are part of the - // return sequence. - if (I->getDesc().isCall()) { - ++I; - } else { - MachineBasicBlock::iterator I2 = I; - while (I2 != MBB->begin() && (--I2)->getDesc().isTerminator()) - I = I2; - } - } + if (save.empty()) + continue; - bool AtStart = I == MBB->begin(); - MachineBasicBlock::iterator BeforeI = I; - if (!AtStart) - --BeforeI; + DEBUG(if (ShrinkWrapDebugging >= Details) + DOUT << "Spilling " << stringifyCSRegSet(save) + << " in " << getBasicBlockName(MBB) << "\n"); -#ifndef NDEBUG - if (! MBB->empty() && ! CSRUsed[MBB].intersects(restore)) { - MachineInstr* MI = BeforeI; - DOUT << "adding restore after "; - DEBUG(MI->dump()); + blockCSI.clear(); + for (CSRegSet::iterator RI = save.begin(), + RE = save.end(); RI != RE; ++RI) { + blockCSI.push_back(CSI[*RI]); + } + assert(blockCSI.size() > 0 && + "Could not collect callee saved register info"); + + I = MBB->begin(); + + // When shrink wrapping, use stack slot stores/loads. + for (unsigned i = 0, e = blockCSI.size(); i != e; ++i) { + // Add the callee-saved register as live-in. + // It's killed at the spill. + MBB->addLiveIn(blockCSI[i].getReg()); + + // Insert the spill to the stack frame. + TII.storeRegToStackSlot(*MBB, I, blockCSI[i].getReg(), + true, + blockCSI[i].getFrameIdx(), + blockCSI[i].getRegClass()); + } + } + + DEBUG(if (ShrinkWrapDebugging >= Details) + DOUT << "------------------------------" + << "-----------------------------\n"); + + for (CSRegBlockMap::iterator BI = CSRRestore.begin(), + BE = CSRRestore.end(); BI != BE; ++BI) { + MachineBasicBlock* MBB = BI->first; + CSRegSet restore = BI->second; + + if (restore.empty()) + continue; + + DEBUG(if (ShrinkWrapDebugging >= Details) + DOUT << "Restoring " << stringifyCSRegSet(restore) + << " in " << getBasicBlockName(MBB) << "\n"); + + blockCSI.clear(); + for (CSRegSet::iterator RI = restore.begin(), + RE = restore.end(); RI != RE; ++RI) { + blockCSI.push_back(CSI[*RI]); + } + assert(blockCSI.size() > 0 && + "Could not find callee saved register info"); + + // If MBB is empty and needs restores, insert at the _beginning_. + if (MBB->empty()) { + I = MBB->begin(); + } else { + I = MBB->end(); + --I; + + // Skip over all terminator instructions, which are part of the + // return sequence. + if (! I->getDesc().isTerminator()) { + ++I; } else { - DOUT << "adding restore to beginning of " - << getBasicBlockName(MBB) << "\n"; + MachineBasicBlock::iterator I2 = I; + while (I2 != MBB->begin() && (--I2)->getDesc().isTerminator()) + I = I2; } -#endif + } - // Restore all registers immediately before the return and any - // terminators that preceed it. - for (unsigned i = 0, e = blockCSI.size(); i != e; ++i) { - TII.loadRegFromStackSlot(*MBB, I, blockCSI[i].getReg(), - blockCSI[i].getFrameIdx(), - blockCSI[i].getRegClass()); - assert(I != MBB->begin() && - "loadRegFromStackSlot didn't insert any code!"); - // Insert in reverse order. loadRegFromStackSlot can insert - // multiple instructions. - if (AtStart) - I = MBB->begin(); - else { - I = BeforeI; - ++I; - } + bool AtStart = I == MBB->begin(); + MachineBasicBlock::iterator BeforeI = I; + if (!AtStart) + --BeforeI; + + // Restore all registers immediately before the return and any + // terminators that preceed it. + for (unsigned i = 0, e = blockCSI.size(); i != e; ++i) { + TII.loadRegFromStackSlot(*MBB, I, blockCSI[i].getReg(), + blockCSI[i].getFrameIdx(), + blockCSI[i].getRegClass()); + assert(I != MBB->begin() && + "loadRegFromStackSlot didn't insert any code!"); + // Insert in reverse order. loadRegFromStackSlot can insert + // multiple instructions. + if (AtStart) + I = MBB->begin(); + else { + I = BeforeI; + ++I; } } } + + DEBUG(if (ShrinkWrapDebugging >= Details) + DOUT << "------------------------------" + << "-----------------------------\n"); } /// AdjustStackOffset - Helper function used to adjust the stack frame offset. @@ -1451,3 +1633,277 @@ assert(SPAdj == 0 && "Unbalanced call frame setup / destroy pairs?"); } } + +// Debugging methods for shrink wrapping. +#ifndef NDEBUG +/// findFastExitPath - debugging method used to detect functions +/// with at least one path from the entry block to a return block +/// directly or which has a very small number of edges. +/// +void PEI::findFastExitPath() { + if (! EntryBlock) + return; + // Fina a path from EntryBlock to any return block that does not branch: + // Entry + // | ... + // v | + // B1<-----+ + // | + // v + // Return + for (MachineBasicBlock::succ_iterator SI = EntryBlock->succ_begin(), + SE = EntryBlock->succ_end(); SI != SE; ++SI) { + MachineBasicBlock* SUCC = *SI; + + // Assume positive, disprove existence of fast path. + HasFastExitPath = true; + + // Check the immediate successors. + if (isReturnBlock(SUCC)) { + if (ShrinkWrapDebugging >= BasicInfo) + DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) + << "->" << getBasicBlockName(SUCC) << "\n"; + break; + } + // Traverse df from SUCC, look for a branch block. + std::string exitPath = getBasicBlockName(SUCC); + for (df_iterator BI = df_begin(SUCC), + BE = df_end(SUCC); BI != BE; ++BI) { + MachineBasicBlock* SBB = *BI; + // Reject paths with branch nodes. + if (SBB->succ_size() > 1) { + HasFastExitPath = false; + break; + } + exitPath += "->" + getBasicBlockName(SBB); + } + if (HasFastExitPath) { + if (ShrinkWrapDebugging >= BasicInfo) + DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) + << "->" << exitPath << "\n"; + break; + } + } +} + +/// verifySpillRestorePlacement - check the current spill/restore +/// sets for safety. Attempt to find spills without restores or +/// restores without spills. +/// Spills: walk df from each MBB in spill set ensuring that +/// all CSRs spilled at MMBB are restored on all paths +/// from MBB to all exit blocks. +/// Restores: walk idf from each MBB in restore set ensuring that +/// all CSRs restored at MBB are spilled on all paths +/// reaching MBB. +/// +void PEI::verifySpillRestorePlacement() { + unsigned numReturnBlocks = 0; + for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF->end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + if (isReturnBlock(MBB) || MBB->succ_size() == 0) + ++numReturnBlocks; + } + for (CSRegBlockMap::iterator BI = CSRSave.begin(), + BE = CSRSave.end(); BI != BE; ++BI) { + MachineBasicBlock* MBB = BI->first; + CSRegSet spilled = BI->second; + CSRegSet restored; + + if (spilled.empty()) + continue; + + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(spilled) + << " RESTORE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; + + if (CSRRestore[MBB].intersects(spilled)) { + restored |= (CSRRestore[MBB] & spilled); + } + + // Walk depth first from MBB to find restores of all CSRs spilled at MBB: + // we must find restores for all spills w/no intervening spills on all + // paths from MBB to all return blocks. + for (df_iterator BI = df_begin(MBB), + BE = df_end(MBB); BI != BE; ++BI) { + MachineBasicBlock* SBB = *BI; + if (SBB == MBB) + continue; + // Stop when we encounter spills of any CSRs spilled at MBB that + // have not yet been seen to be restored. + if (CSRSave[SBB].intersects(spilled) && + !restored.contains(CSRSave[SBB] & spilled)) + break; + // Collect the CSRs spilled at MBB that are restored + // at this DF successor of MBB. + if (CSRRestore[SBB].intersects(spilled)) + restored |= (CSRRestore[SBB] & spilled); + // If we are at a retun block, check that the restores + // we have seen so far exhaust the spills at MBB, then + // reset the restores. + if (isReturnBlock(SBB) || SBB->succ_size() == 0) { + if (restored != spilled) { + CSRegSet notRestored = (spilled - restored); + DOUT << MF->getFunction()->getName() << ": " + << stringifyCSRegSet(notRestored) + << " spilled at " << getBasicBlockName(MBB) + << " are never restored on path to return " + << getBasicBlockName(SBB) << "\n"; + } + restored.clear(); + } + } + } + + // Check restore placements. + for (CSRegBlockMap::iterator BI = CSRRestore.begin(), + BE = CSRRestore.end(); BI != BE; ++BI) { + MachineBasicBlock* MBB = BI->first; + CSRegSet restored = BI->second; + CSRegSet spilled; + + if (restored.empty()) + continue; + + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRSave[MBB]) + << " RESTORE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(restored) << "\n"; + + if (CSRSave[MBB].intersects(restored)) { + spilled |= (CSRSave[MBB] & restored); + } + // Walk inverse depth first from MBB to find spills of all + // CSRs restored at MBB: + for (idf_iterator BI = idf_begin(MBB), + BE = idf_end(MBB); BI != BE; ++BI) { + MachineBasicBlock* PBB = *BI; + if (PBB == MBB) + continue; + // Stop when we encounter restores of any CSRs restored at MBB that + // have not yet been seen to be spilled. + if (CSRRestore[PBB].intersects(restored) && + !spilled.contains(CSRRestore[PBB] & restored)) + break; + // Collect the CSRs restored at MBB that are spilled + // at this DF predecessor of MBB. + if (CSRSave[PBB].intersects(restored)) + spilled |= (CSRSave[PBB] & restored); + } + if (spilled != restored) { + CSRegSet notSpilled = (restored - spilled); + DOUT << MF->getFunction()->getName() << ": " + << stringifyCSRegSet(notSpilled) + << " restored at " << getBasicBlockName(MBB) + << " are never spilled\n"; + } + } +} + +// Debugging print methods. +std::string PEI::getBasicBlockName(const MachineBasicBlock* MBB) { + std::ostringstream name; + if (MBB) { + if (MBB->getBasicBlock()) + name << MBB->getBasicBlock()->getName(); + else + name << "_MBB_" << MBB->getNumber(); + } + return name.str(); +} + +std::string PEI::stringifyCSRegSet(const CSRegSet& s) { + const TargetRegisterInfo* TRI = MF->getTarget().getRegisterInfo(); + const std::vector CSI = + MF->getFrameInfo()->getCalleeSavedInfo(); + + std::ostringstream srep; + if (CSI.size() == 0) { + srep << "[]"; + return srep.str(); + } + srep << "["; + CSRegSet::iterator I = s.begin(), E = s.end(); + if (I != E) { + unsigned reg = CSI[*I].getReg(); + srep << TRI->getName(reg); + for (++I; I != E; ++I) { + reg = CSI[*I].getReg(); + srep << ","; + srep << TRI->getName(reg); + } + } + srep << "]"; + return srep.str(); +} + +void PEI::dumpSet(const CSRegSet& s) { + DOUT << stringifyCSRegSet(s) << "\n"; +} + +void PEI::dumpUsed(MachineBasicBlock* MBB) { + if (MBB) { + DOUT << "CSRUsed[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRUsed[MBB]) << "\n"; + } +} + +void PEI::dumpAllUsed() { + for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF->end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + dumpUsed(MBB); + } +} + +void PEI::dumpSets(MachineBasicBlock* MBB) { + if (MBB) { + DOUT << getBasicBlockName(MBB) << " | " + << stringifyCSRegSet(CSRUsed[MBB]) << " | " + << stringifyCSRegSet(AnticIn[MBB]) << " | " + << stringifyCSRegSet(AnticOut[MBB]) << " | " + << stringifyCSRegSet(AvailIn[MBB]) << " | " + << stringifyCSRegSet(AvailOut[MBB]) << "\n"; + } +} + +void PEI::dumpSets1(MachineBasicBlock* MBB) { + if (MBB) { + DOUT << getBasicBlockName(MBB) << " | " + << stringifyCSRegSet(CSRUsed[MBB]) << " | " + << stringifyCSRegSet(AnticIn[MBB]) << " | " + << stringifyCSRegSet(AnticOut[MBB]) << " | " + << stringifyCSRegSet(AvailIn[MBB]) << " | " + << stringifyCSRegSet(AvailOut[MBB]) << " | " + << stringifyCSRegSet(CSRSave[MBB]) << " | " + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; + } +} + +void PEI::dumpAllSets() { + for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF->end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + dumpSets1(MBB); + } +} + +void PEI::dumpSRSets() { + for (MachineFunction::iterator MBB = MF->begin(), E = MF->end(); + MBB != E; ++MBB) { + if (! CSRSave[MBB].empty()) { + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRSave[MBB]); + if (CSRRestore[MBB].empty()) + DOUT << "\n"; + } + if (! CSRRestore[MBB].empty()) { + if (! CSRSave[MBB].empty()) + DOUT << " "; + DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; + } + } +} +#endif From baldrick at free.fr Mon May 11 12:06:03 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 11 May 2009 19:06:03 +0200 Subject: [llvm-commits] [llvm-gcc-4.2] r71425 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h In-Reply-To: <16e5fdf90905110956m2f4ddb35x1de96fc5de763838@mail.gmail.com> References: <200905111100.n4BB0mhe010045@zion.cs.uiuc.edu> <16e5fdf90905110956m2f4ddb35x1de96fc5de763838@mail.gmail.com> Message-ID: <200905111906.04322.baldrick@free.fr> Hi Bill, > This is causing a bootstrap failure in release mode on Darwin. Please > investigate. I don't get this on x86 linux (32 and 64 bit) so it is hard to debug, since I don't have access to a darwin box. The patch turned on extra sanity checking, so it looks like something is insane in darwin :) Can you please fire up the debugger and dump the gcc tree using dump_tree. Thanks a lot, Duncan. > > /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc > -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ > -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.6.0/bin/ > -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.6.0/lib/ > -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.6.0/include > -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.6.0/sys-include > -mmacosx-version-min=10.4 -O2 -O2 -g -O2 -DIN_GCC -W -Wall > -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes > -Wold-style-definition -isystem ./include -fPIC -pipe -g > -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. > -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. > -I../../llvm-gcc.src/gcc/../include -I./../intl > -I../../llvm-gcc.src/gcc/../libcpp/include > -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber > -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include > -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include > -DL_fixunssfsi -DLIBGCC2_UNITS_PER_WORD=4 -c > ../../llvm-gcc.src/gcc/libgcc2.c -o libgcc/./_fixunssfsi.o > Assertion failed: ((LV.isBitfield() || > cast(LV.Ptr->getType())->getElementType() == > (VOID_TYPE_P(TREE_TYPE(exp)) ? Type::Int8Ty : > ConvertType(TREE_TYPE(exp)))) && "LValue of constant has wrong > type!"), function EmitLV, file > ../../llvm-gcc.src/gcc/llvm-convert.cpp, line 1029. > ../../llvm-gcc.src/gcc/config/darwin-crt3.c: In function 'atexit': > ../../llvm-gcc.src/gcc/config/darwin-crt3.c:530: internal compiler > error: Abort trap > Please submit a full bug report, > with preprocessed source if appropriate. > See for instructions. > make[5]: *** [crt3.o] Error 1 > make[4]: *** [extra] Error 2 > make[4]: *** Waiting for unfinished jobs.... > make[3]: *** [stmp-multilib] Error 2 > > -bw > _______________________________________________ > 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 May 11 12:08:57 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 11 May 2009 10:08:57 -0700 Subject: [llvm-commits] [llvm] r71349 - in /llvm/trunk: bindings/ocaml/target/ include/llvm-c/ include/llvm/Target/ lib/Analysis/ lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/CodeGen/SelectionDAG/ lib/ExecutionEngine/ lib/ExecutionEngine/Interpreter/ lib/ExecutionEngine/JIT/ lib/Target/ lib/Target/ARM/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPrinter/ lib/Target/CBackend/ lib/Target/CellSPU/AsmPrinter/ lib/Target/IA64/AsmPrinter/ lib/Target/MSIL/ lib/Target/Mips/ lib/Target/Mips/AsmPrinter/ lib/Target/PIC16/ lib/Target/PowerP... In-Reply-To: <200905101953.56237.baldrick@free.fr> References: <200905090706.n4976n4F018353@zion.cs.uiuc.edu> <88CB4A97-1D38-48EF-BE64-766B32075CFC@gmail.com> <4A06A4D1.70601@lip6.fr> <200905101953.56237.baldrick@free.fr> Message-ID: <27A15782-25A3-4BEA-BCEF-6FF4621F8DCC@apple.com> On May 10, 2009, at 10:53 AM, Duncan Sands wrote: > Hi, > >> Do we have a BreakageNotes somewhere for the next version of LLVM? >> It'd >> be nice to remember that getTypePaddedSize now is getTypeAllocSize, >> so >> that tools following LLVM releases won't have to figure that by >> themselves. > > this seems appropriate for the release notes. But I guess a > continuously > updated document (BreakageNotes) might be more useful. Shall I > start one? Why not just strip out all the LLVM 2.5 info from ToT release notes and mention this in the 2.6 source breakage section? -Chris From dalej at apple.com Mon May 11 12:15:44 2009 From: dalej at apple.com (Dale Johannesen) Date: Mon, 11 May 2009 17:15:44 -0000 Subject: [llvm-commits] [llvm] r71439 - in /llvm/trunk: lib/Transforms/Scalar/LoopStrengthReduce.cpp test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll test/CodeGen/X86/iv-users-in-other-loops.ll test/CodeGen/X86/masked-iv-safe.ll test/CodeGen/X86/pr3495.ll Message-ID: <200905111715.n4BHFioC026912@zion.cs.uiuc.edu> Author: johannes Date: Mon May 11 12:15:42 2009 New Revision: 71439 URL: http://llvm.org/viewvc/llvm-project?rev=71439&view=rev Log: Reverse a loop that is counting up to a maximum to count down to 0 instead, under very restricted circumstances. Adjust 4 testcases in which this optimization fires. Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp llvm/trunk/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll llvm/trunk/test/CodeGen/X86/iv-users-in-other-loops.ll llvm/trunk/test/CodeGen/X86/masked-iv-safe.ll llvm/trunk/test/CodeGen/X86/pr3495.ll Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=71439&r1=71438&r2=71439&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon May 11 12:15:42 2009 @@ -166,7 +166,7 @@ const SCEVHandle* &CondStride); void OptimizeIndvars(Loop *L); - + void OptimizeLoopCountIV(Loop *L); void OptimizeLoopTermCond(Loop *L); /// OptimizeShadowIV - If IV is used in a int-to-float cast @@ -1746,11 +1746,11 @@ CommonBaseV = PreheaderRewriter.expandCodeFor(CommonExprs, ReplacedTy, PreInsertPt); - // If all uses are addresses, check if it is possible to reuse an IV with a - // stride that is a factor of this stride. And that the multiple is a number - // that can be encoded in the scale field of the target addressing mode. And - // that we will have a valid instruction after this substition, including - // the immediate field, if any. + // If all uses are addresses, check if it is possible to reuse an IV. The + // new IV must have a stride that is a multiple of the old stride; the + // multiple must be a number that can be encoded in the scale field of the + // target addressing mode; and we must have a valid instruction after this + // substitution, including the immediate field, if any. RewriteFactor = CheckForIVReuse(HaveCommonExprs, AllUsesAreAddresses, AllUsesAreOutsideLoop, Stride, ReuseIV, ReplacedTy, @@ -2444,6 +2444,114 @@ Changed = true; } +// OptimizeLoopCountIV - If, after all sharing of IVs, the IV used for deciding +// when to exit the loop is used only for that purpose, try to rearrange things +// so it counts down to a test against zero. +void LoopStrengthReduce::OptimizeLoopCountIV(Loop *L) { + + // If the number of times the loop is executed isn't computable, give up. + SCEVHandle BackedgeTakenCount = SE->getBackedgeTakenCount(L); + if (isa(BackedgeTakenCount)) + return; + + // Get the terminating condition for the loop if possible (this isn't + // necessarily in the latch, or a block that's a predecessor of the header). + SmallVector ExitBlocks; + L->getExitBlocks(ExitBlocks); + if (ExitBlocks.size() != 1) return; + + // Okay, there is one exit block. Try to find the condition that causes the + // loop to be exited. + BasicBlock *ExitBlock = ExitBlocks[0]; + + BasicBlock *ExitingBlock = 0; + for (pred_iterator PI = pred_begin(ExitBlock), E = pred_end(ExitBlock); + PI != E; ++PI) + if (L->contains(*PI)) { + if (ExitingBlock == 0) + ExitingBlock = *PI; + else + return; // More than one block exiting! + } + assert(ExitingBlock && "No exits from loop, something is broken!"); + + // Okay, we've computed the exiting block. See what condition causes us to + // exit. + // + // FIXME: we should be able to handle switch instructions (with a single exit) + BranchInst *TermBr = dyn_cast(ExitingBlock->getTerminator()); + if (TermBr == 0) return; + assert(TermBr->isConditional() && "If unconditional, it can't be in loop!"); + if (!isa(TermBr->getCondition())) + return; + ICmpInst *Cond = cast(TermBr->getCondition()); + + // Handle only tests for equality for the moment, and only stride 1. + if (Cond->getPredicate() != CmpInst::ICMP_EQ) + return; + SCEVHandle IV = SE->getSCEV(Cond->getOperand(0)); + const SCEVAddRecExpr *AR = dyn_cast(IV); + SCEVHandle One = SE->getIntegerSCEV(1, BackedgeTakenCount->getType()); + if (!AR || !AR->isAffine() || AR->getStepRecurrence(*SE) != One) + return; + + // Make sure the IV is only used for counting. Value may be preinc or + // postinc; 2 uses in either case. + if (!Cond->getOperand(0)->hasNUses(2)) + return; + PHINode *phi = dyn_cast(Cond->getOperand(0)); + Instruction *incr; + if (phi && phi->getParent()==L->getHeader()) { + // value tested is preinc. Find the increment. + // A CmpInst is not a BinaryOperator; we depend on this. + Instruction::use_iterator UI = phi->use_begin(); + incr = dyn_cast(UI); + if (!incr) + incr = dyn_cast(++UI); + // 1 use for postinc value, the phi. Unnecessarily conservative? + if (!incr || !incr->hasOneUse() || incr->getOpcode()!=Instruction::Add) + return; + } else { + // Value tested is postinc. Find the phi node. + incr = dyn_cast(Cond->getOperand(0)); + if (!incr || incr->getOpcode()!=Instruction::Add) + return; + + Instruction::use_iterator UI = Cond->getOperand(0)->use_begin(); + phi = dyn_cast(UI); + if (!phi) + phi = dyn_cast(++UI); + // 1 use for preinc value, the increment. + if (!phi || phi->getParent()!=L->getHeader() || !phi->hasOneUse()) + return; + } + + // Replace the increment with a decrement. + BinaryOperator *decr = + BinaryOperator::Create(Instruction::Sub, incr->getOperand(0), + incr->getOperand(1), "tmp", incr); + incr->replaceAllUsesWith(decr); + incr->eraseFromParent(); + + // Substitute endval-startval for the original startval, and 0 for the + // original endval. Since we're only testing for equality this is OK even + // if the computation wraps around. + BasicBlock *Preheader = L->getLoopPreheader(); + Instruction *PreInsertPt = Preheader->getTerminator(); + int inBlock = L->contains(phi->getIncomingBlock(0)) ? 1 : 0; + Value *startVal = phi->getIncomingValue(inBlock); + Value *endVal = Cond->getOperand(1); + // FIXME check for case where both are constant + ConstantInt* Zero = ConstantInt::get(Cond->getOperand(1)->getType(), 0); + BinaryOperator *NewStartVal = + BinaryOperator::Create(Instruction::Sub, endVal, startVal, + "tmp", PreInsertPt); + phi->setIncomingValue(inBlock, NewStartVal); + Cond->setOperand(1, Zero); + + Changed = true; +} + bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) { LI = &getAnalysis(); @@ -2500,6 +2608,10 @@ } } + // After all sharing is done, see if we can adjust the loop to test against + // zero instead of counting up to a maximum. This is usually faster. + OptimizeLoopCountIV(L); + // We're done analyzing this loop; release all the state we built up for it. IVUsesByStride.clear(); IVsByStride.clear(); Modified: llvm/trunk/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll?rev=71439&r1=71438&r2=71439&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll Mon May 11 12:15:42 2009 @@ -1,5 +1,7 @@ ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -stats |& \ ; RUN: grep {1 .*folded into instructions} +; Increment in loop bb.128.i adjusted to 2, to prevent loop reversal from +; kicking in. declare fastcc void @rdft(i32, i32, double*, i32*, double*) @@ -41,7 +43,7 @@ %tmp1213.i23.i = sitofp i32 %x.0.i21.i to double ; [#uses=1] %tmp15.i24.i = sub double 0.000000e+00, %tmp1213.i23.i ; [#uses=1] %tmp16.i25.i = mul double 0.000000e+00, %tmp15.i24.i ; [#uses=1] - %indvar.next39.i = add i32 %j.0.reg2mem.0.i16.i, 1 ; [#uses=2] + %indvar.next39.i = add i32 %j.0.reg2mem.0.i16.i, 2 ; [#uses=2] %exitcond40.i = icmp eq i32 %indvar.next39.i, %tmp8.i14.i ; [#uses=1] br i1 %exitcond40.i, label %mp_unexp_d2mp.exit29.i, label %bb.i28.i 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=71439&r1=71438&r2=71439&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 May 11 12:15:42 2009 @@ -1,5 +1,6 @@ ; RUN: llvm-as < %s | llc -march=x86-64 -f -o %t -; RUN: grep inc %t | count 2 +; RUN: grep inc %t | count 1 +; RUN: grep dec %t | count 2 ; RUN: grep addq %t | count 13 ; RUN: grep leaq %t | count 8 ; RUN: grep leal %t | count 4 @@ -8,6 +9,7 @@ ; IV users in each of the loops from other loops shouldn't cause LSR ; to insert new induction variables. Previously it would create a ; flood of new induction variables. +; Also, the loop reversal should kick in once. target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" target triple = "x86_64-unknown-linux-gnu" Modified: llvm/trunk/test/CodeGen/X86/masked-iv-safe.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/masked-iv-safe.ll?rev=71439&r1=71438&r2=71439&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/masked-iv-safe.ll (original) +++ llvm/trunk/test/CodeGen/X86/masked-iv-safe.ll Mon May 11 12:15:42 2009 @@ -4,12 +4,13 @@ ; RUN: not grep sar %t ; RUN: not grep shl %t ; RUN: grep add %t | count 6 -; RUN: grep inc %t | count 4 -; RUN: grep dec %t | count 2 +; RUN: grep inc %t | count 2 +; RUN: grep dec %t | count 4 ; RUN: grep lea %t | count 2 ; Optimize away zext-inreg and sext-inreg on the loop induction ; variable using trip-count information. +; Also, the loop-reversal algorithm kicks in twice. define void @count_up(double* %d, i64 %n) nounwind { entry: Modified: llvm/trunk/test/CodeGen/X86/pr3495.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr3495.ll?rev=71439&r1=71438&r2=71439&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pr3495.ll (original) +++ llvm/trunk/test/CodeGen/X86/pr3495.ll Mon May 11 12:15:42 2009 @@ -1,7 +1,8 @@ ; RUN: llvm-as < %s | llc -march=x86 -stats |& grep {Number of reloads omited} | grep 2 ; RUN: llvm-as < %s | llc -march=x86 -stats |& not grep {Number of available reloads turned into copies} -; RUN: llvm-as < %s | llc -march=x86 -stats |& grep {Number of machine instrs printed} | grep 39 +; RUN: llvm-as < %s | llc -march=x86 -stats |& grep {Number of machine instrs printed} | grep 38 ; PR3495 +; The loop reversal kicks in once here, resulting in one fewer instruction. target triple = "i386-pc-linux-gnu" @x = external global [8 x i32], align 32 ; <[8 x i32]*> [#uses=1] From isanbard at gmail.com Mon May 11 12:18:49 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 11 May 2009 10:18:49 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r71425 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h In-Reply-To: <200905111906.04322.baldrick@free.fr> References: <200905111100.n4BB0mhe010045@zion.cs.uiuc.edu> <16e5fdf90905110956m2f4ddb35x1de96fc5de763838@mail.gmail.com> <200905111906.04322.baldrick@free.fr> Message-ID: <16e5fdf90905111018k48fabde5id9a98f0bef3597b7@mail.gmail.com> On Mon, May 11, 2009 at 10:06 AM, Duncan Sands wrote: > Hi Bill, > >> This is causing a bootstrap failure in release mode on Darwin. Please >> investigate. > > I don't get this on x86 linux (32 and 64 bit) so it is hard to debug, > since I don't have access to a darwin box. > > The patch turned on extra sanity checking, so it looks like something > is insane in darwin :) Blasphemy! :-) > ?Can you please fire up the debugger and dump > the gcc tree using dump_tree. > Sure: (gdb) p LV $2 = { Ptr = 0x41e25efc, Alignment = 1 '\001', BitStart = 255 '?', BitSize = 255 '?' } (gdb) p debug_tree(exp) > addressable used public external asm-frame-size 0 common VOID file ../../llvm-gcc.src/gcc/config/darwin-crt3.c line 526 align 8 LLVM: { }* @__dso_handle> (gdb) p LV.Ptr->dump() @__dso_handle = external global { } ; <{ }*> [#uses=0] Let me know if you need more. -bw From sabre at nondot.org Mon May 11 12:36:33 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 11 May 2009 17:36:33 -0000 Subject: [llvm-commits] [llvm] r71442 - /llvm/trunk/lib/Target/README.txt Message-ID: <200905111736.n4BHaXF0027879@zion.cs.uiuc.edu> Author: lattner Date: Mon May 11 12:36:33 2009 New Revision: 71442 URL: http://llvm.org/viewvc/llvm-project?rev=71442&view=rev Log: add a note 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=71442&r1=71441&r2=71442&view=diff ============================================================================== --- llvm/trunk/lib/Target/README.txt (original) +++ llvm/trunk/lib/Target/README.txt Mon May 11 12:36:33 2009 @@ -1717,3 +1717,38 @@ //===---------------------------------------------------------------------===// +InstCombine's "turn load from constant into constant" optimization should be +more aggressive in the presence of bitcasts. For example, because of unions, +this code: + +union vec2d { + double e[2]; + double v __attribute__((vector_size(16))); +}; +typedef union vec2d vec2d; + +static vec2d a={{1,2}}, b={{3,4}}; + +vec2d foo () { + return (vec2d){ .v = a.v + b.v * (vec2d){{5,5}}.v }; +} + +Compiles into: + + at a = internal constant %0 { [2 x double] + [double 1.000000e+00, double 2.000000e+00] }, align 16 + at b = internal constant %0 { [2 x double] + [double 3.000000e+00, double 4.000000e+00] }, align 16 +... +define void @foo(%struct.vec2d* noalias nocapture sret %agg.result) nounwind { +entry: + %0 = load <2 x double>* getelementptr (%struct.vec2d* + bitcast (%0* @a to %struct.vec2d*), i32 0, i32 0), align 16 + %1 = load <2 x double>* getelementptr (%struct.vec2d* + bitcast (%0* @b to %struct.vec2d*), i32 0, i32 0), align 16 + + +Instcombine should be able to optimize away the loads (and thus the globals). + + +//===---------------------------------------------------------------------===// From sabre at nondot.org Mon May 11 12:41:40 2009 From: sabre at nondot.org (Chris Lattner) Date: Mon, 11 May 2009 17:41:40 -0000 Subject: [llvm-commits] [llvm] r71443 - /llvm/trunk/lib/Target/README.txt Message-ID: <200905111741.n4BHfeBH028071@zion.cs.uiuc.edu> Author: lattner Date: Mon May 11 12:41:40 2009 New Revision: 71443 URL: http://llvm.org/viewvc/llvm-project?rev=71443&view=rev Log: remove some done things: we have nocapture and SROA is smarter. 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=71443&r1=71442&r2=71443&view=diff ============================================================================== --- llvm/trunk/lib/Target/README.txt (original) +++ llvm/trunk/lib/Target/README.txt Mon May 11 12:41:40 2009 @@ -167,44 +167,6 @@ //===---------------------------------------------------------------------===// -Scalar Repl cannot currently promote this testcase to 'ret long cst': - - %struct.X = type { i32, i32 } - %struct.Y = type { %struct.X } - -define i64 @bar() { - %retval = alloca %struct.Y, align 8 - %tmp12 = getelementptr %struct.Y* %retval, i32 0, i32 0, i32 0 - store i32 0, i32* %tmp12 - %tmp15 = getelementptr %struct.Y* %retval, i32 0, i32 0, i32 1 - store i32 1, i32* %tmp15 - %retval.upgrd.1 = bitcast %struct.Y* %retval to i64* - %retval.upgrd.2 = load i64* %retval.upgrd.1 - ret i64 %retval.upgrd.2 -} - -it should be extended to do so. - -//===---------------------------------------------------------------------===// - --scalarrepl should promote this to be a vector scalar. - - %struct..0anon = type { <4 x float> } - -define void @test1(<4 x float> %V, float* %P) { - %u = alloca %struct..0anon, align 16 - %tmp = getelementptr %struct..0anon* %u, i32 0, i32 0 - store <4 x float> %V, <4 x float>* %tmp - %tmp1 = bitcast %struct..0anon* %u to [4 x float]* - %tmp.upgrd.1 = getelementptr [4 x float]* %tmp1, i32 0, i32 1 - %tmp.upgrd.2 = load float* %tmp.upgrd.1 - %tmp3 = mul float %tmp.upgrd.2, 2.000000e+00 - store float %tmp3, float* %P - ret void -} - -//===---------------------------------------------------------------------===// - Turn this into a single byte store with no load (the other 3 bytes are unmodified): @@ -634,32 +596,6 @@ //===---------------------------------------------------------------------===// -We should extend parameter attributes to capture more information about -pointer parameters for alias analysis. Some ideas: - -1. Add a "nocapture" attribute, which indicates that the callee does not store - the address of the parameter into a global or any other memory location - visible to the callee. This can be used to make basicaa and other analyses - more powerful. It is true for things like memcpy, strcat, and many other - things, including structs passed by value, most C++ references, etc. -2. Generalize readonly to be set on parameters. This is important mod/ref - info for the function, which is important for basicaa and others. It can - also be used by the inliner to avoid inserting a memcpy for byval - arguments when the function is inlined. - -These functions can be inferred by various analysis passes such as the -globalsmodrefaa pass. Note that getting #2 right is actually really tricky. -Consider this code: - -struct S; S G; -void caller(S byvalarg) { G.field = 1; ... } -void callee() { caller(G); } - -The fact that the caller does not modify byval arg is not enough, we need -to know that it doesn't modify G either. This is very tricky. - -//===---------------------------------------------------------------------===// - We should add an FRINT node to the DAG to model targets that have legal implementations of ceil/floor/rint. @@ -1690,6 +1626,19 @@ //===---------------------------------------------------------------------===// +The arg promotion pass should make use of nocapture to make its alias analysis +stuff much more precise. + +//===---------------------------------------------------------------------===// + +The following functions should be optimized to use a select instead of a +branch (from gcc PR40072): + +char char_int(int m) {if(m>7) return 0; return m;} +int int_char(char m) {if(m>7) return 0; return m;} + +//===---------------------------------------------------------------------===// + Instcombine should replace the load with a constant in: static const char x[4] = {'a', 'b', 'c', 'd'}; @@ -1704,19 +1653,6 @@ //===---------------------------------------------------------------------===// -The arg promotion pass should make use of nocapture to make its alias analysis -stuff much more precise. - -//===---------------------------------------------------------------------===// - -The following functions should be optimized to use a select instead of a -branch (from gcc PR40072): - -char char_int(int m) {if(m>7) return 0; return m;} -int int_char(char m) {if(m>7) return 0; return m;} - -//===---------------------------------------------------------------------===// - InstCombine's "turn load from constant into constant" optimization should be more aggressive in the presence of bitcasts. For example, because of unions, this code: From gohman at apple.com Mon May 11 12:57:43 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 11 May 2009 17:57:43 -0000 Subject: [llvm-commits] [llvm] r71445 - /llvm/trunk/test/CodeGen/MSP430/ Message-ID: <200905111757.n4BHvhbI028748@zion.cs.uiuc.edu> Author: djg Date: Mon May 11 12:57:43 2009 New Revision: 71445 URL: http://llvm.org/viewvc/llvm-project?rev=71445&view=rev Log: Add an svn:ignore. Modified: llvm/trunk/test/CodeGen/MSP430/ (props changed) Propchange: llvm/trunk/test/CodeGen/MSP430/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Mon May 11 12:57:43 2009 @@ -0,0 +1,3 @@ +Output +*.log +*.sum From gohman at apple.com Mon May 11 13:02:54 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 11 May 2009 18:02:54 -0000 Subject: [llvm-commits] [llvm] r71446 - in /llvm/trunk: lib/Target/X86/X86ISelDAGToDAG.cpp lib/Target/X86/X86InstrInfo.td test/CodeGen/X86/lea-neg.ll Message-ID: <200905111802.n4BI2sB1028931@zion.cs.uiuc.edu> Author: djg Date: Mon May 11 13:02:53 2009 New Revision: 71446 URL: http://llvm.org/viewvc/llvm-project?rev=71446&view=rev Log: Convert a subtract into a negate and an add when it helps x86 address folding. Added: llvm/trunk/test/CodeGen/X86/lea-neg.ll Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=71446&r1=71445&r2=71446&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Mon May 11 13:02:53 2009 @@ -868,6 +868,76 @@ } break; + case ISD::SUB: { + // Given A-B, if A can be completely folded into the address and + // the index field with the index field unused, use -B as the index. + // This is a win if a has multiple parts that can be folded into + // the address. Also, this saves a mov if the base register has + // other uses, since it avoids a two-address sub instruction, however + // it costs an additional mov if the index register has other uses. + + // Test if the LHS of the sub can be folded. + X86ISelAddressMode Backup = AM; + if (MatchAddress(N.getNode()->getOperand(0), AM, Depth+1)) { + AM = Backup; + break; + } + // Test if the index field is free for use. + if (AM.IndexReg.getNode() || AM.isRIPRel) { + AM = Backup; + break; + } + int Cost = 0; + SDValue RHS = N.getNode()->getOperand(1); + // If the RHS involves a register with multiple uses, this + // transformation incurs an extra mov, due to the neg instruction + // clobbering its operand. + if (!RHS.getNode()->hasOneUse() || + RHS.getNode()->getOpcode() == ISD::CopyFromReg || + RHS.getNode()->getOpcode() == ISD::TRUNCATE || + RHS.getNode()->getOpcode() == ISD::ANY_EXTEND || + (RHS.getNode()->getOpcode() == ISD::ZERO_EXTEND && + RHS.getNode()->getOperand(0).getValueType() == MVT::i32)) + ++Cost; + // If the base is a register with multiple uses, this + // transformation may save a mov. + if ((AM.BaseType == X86ISelAddressMode::RegBase && + AM.Base.Reg.getNode() && + !AM.Base.Reg.getNode()->hasOneUse()) || + AM.BaseType == X86ISelAddressMode::FrameIndexBase) + --Cost; + // If the folded LHS was interesting, this transformation saves + // address arithmetic. + if ((AM.hasSymbolicDisplacement() && !Backup.hasSymbolicDisplacement()) + + ((AM.Disp != 0) && (Backup.Disp == 0)) + + (AM.Segment.getNode() && !Backup.Segment.getNode()) >= 2) + --Cost; + // If it doesn't look like it may be an overall win, don't do it. + if (Cost >= 0) { + AM = Backup; + break; + } + + // Ok, the transformation is legal and appears profitable. Go for it. + SDValue Zero = CurDAG->getConstant(0, N.getValueType()); + SDValue Neg = CurDAG->getNode(ISD::SUB, dl, N.getValueType(), Zero, RHS); + AM.IndexReg = Neg; + AM.Scale = 1; + + // Insert the new nodes into the topological ordering. + if (Zero.getNode()->getNodeId() == -1 || + Zero.getNode()->getNodeId() > N.getNode()->getNodeId()) { + CurDAG->RepositionNode(N.getNode(), Zero.getNode()); + Zero.getNode()->setNodeId(N.getNode()->getNodeId()); + } + if (Neg.getNode()->getNodeId() == -1 || + Neg.getNode()->getNodeId() > N.getNode()->getNodeId()) { + CurDAG->RepositionNode(N.getNode(), Neg.getNode()); + Neg.getNode()->setNodeId(N.getNode()->getNodeId()); + } + return false; + } + case ISD::ADD: { X86ISelAddressMode Backup = AM; if (!MatchAddress(N.getNode()->getOperand(0), AM, Depth+1) && Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=71446&r1=71445&r2=71446&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Mon May 11 13:02:53 2009 @@ -217,7 +217,7 @@ // Define X86 specific addressing mode. def addr : ComplexPattern; def lea32addr : ComplexPattern; + [add, sub, mul, shl, or, frameindex], []>; //===----------------------------------------------------------------------===// // X86 Instruction Predicate Definitions. Added: llvm/trunk/test/CodeGen/X86/lea-neg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lea-neg.ll?rev=71446&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/lea-neg.ll (added) +++ llvm/trunk/test/CodeGen/X86/lea-neg.ll Mon May 11 13:02:53 2009 @@ -0,0 +1,25 @@ +; RUN: llvm-as < %s | llc -march=x86-64 > %t +; RUN: grep negl %t | count 1 +; RUN: not grep sub %t +; RUN: grep mov %t | count 1 +; RUN: grep {leal -4(} %t | count 1 + +; ISel the add of -4 with a neg and use an lea for the rest of the +; arithemtic. + +define i32 @test(i32 %x_offs) nounwind readnone { +entry: + %t0 = icmp sgt i32 %x_offs, 4 ; [#uses=1] + br i1 %t0, label %bb.nph, label %bb2 + +bb.nph: ; preds = %entry + %tmp = add i32 %x_offs, -5 ; [#uses=1] + %tmp6 = lshr i32 %tmp, 2 ; [#uses=1] + %tmp7 = mul i32 %tmp6, -4 ; [#uses=1] + %tmp8 = add i32 %tmp7, %x_offs ; [#uses=1] + %tmp9 = add i32 %tmp8, -4 ; [#uses=1] + ret i32 %tmp9 + +bb2: ; preds = %entry + ret i32 %x_offs +} From fvbommel at wxs.nl Mon May 11 13:04:40 2009 From: fvbommel at wxs.nl (Frits van Bommel) Date: Mon, 11 May 2009 20:04:40 +0200 Subject: [llvm-commits] [llvm] r71443 - /llvm/trunk/lib/Target/README.txt In-Reply-To: <200905111741.n4BHfeBH028071@zion.cs.uiuc.edu> References: <200905111741.n4BHfeBH028071@zion.cs.uiuc.edu> Message-ID: <4A0868B8.1080108@wxs.nl> Chris Lattner wrote: > Log: > remove some done things: we have nocapture and SROA is smarter. > -2. Generalize readonly to be set on parameters. This is important mod/ref > - info for the function, which is important for basicaa and others. It can > - also be used by the inliner to avoid inserting a memcpy for byval > - arguments when the function is inlined. I wasn't aware this was implemented? It's not in LangRef.html... > -These functions can be inferred by various analysis passes such as the > -globalsmodrefaa pass. Note that getting #2 right is actually really tricky. > -Consider this code: > - > -struct S; S G; > -void caller(S byvalarg) { G.field = 1; ... } > -void callee() { caller(G); } > - > -The fact that the caller does not modify byval arg is not enough, we need > -to know that it doesn't modify G either. This is very tricky. Is this trickyness the reason it was given up on? Can't the attribute just mean it's not modified through the parameter, so that passes wanting to use this information would also need to prove the argument being passed in at the particular callsite is not modified through other means? That way e.g. non-escaped locals could still benefit from this (even if a global was passed in at some other callsite). From gohman at apple.com Mon May 11 13:04:52 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 11 May 2009 18:04:52 -0000 Subject: [llvm-commits] [llvm] r71447 - /llvm/trunk/lib/Target/README.txt Message-ID: <200905111804.n4BI4q65029012@zion.cs.uiuc.edu> Author: djg Date: Mon May 11 13:04:52 2009 New Revision: 71447 URL: http://llvm.org/viewvc/llvm-project?rev=71447&view=rev Log: Upgrade this example to new-style syntax. 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=71447&r1=71446&r2=71447&view=diff ============================================================================== --- llvm/trunk/lib/Target/README.txt (original) +++ llvm/trunk/lib/Target/README.txt Mon May 11 13:04:52 2009 @@ -170,11 +170,11 @@ Turn this into a single byte store with no load (the other 3 bytes are unmodified): -void %test(uint* %P) { - %tmp = load uint* %P - %tmp14 = or uint %tmp, 3305111552 - %tmp15 = and uint %tmp14, 3321888767 - store uint %tmp15, uint* %P +define void @test(i32* %P) { + %tmp = load i32* %P + %tmp14 = or i32 %tmp, 3305111552 + %tmp15 = and i32 %tmp14, 3321888767 + store i32 %tmp15, i32* %P ret void } From dgregor at apple.com Mon May 11 13:05:52 2009 From: dgregor at apple.com (Douglas Gregor) Date: Mon, 11 May 2009 18:05:52 -0000 Subject: [llvm-commits] [llvm] r71448 - in /llvm/trunk: autoconf/configure.ac cmake/config-ix.cmake configure include/llvm/ADT/FoldingSet.h include/llvm/Config/config.h.cmake include/llvm/Config/config.h.in include/llvm/System/Process.h lib/System/Unix/Process.inc lib/System/Win32/Process.inc Message-ID: <200905111805.n4BI5rdN029127@zion.cs.uiuc.edu> Author: dgregor Date: Mon May 11 13:05:52 2009 New Revision: 71448 URL: http://llvm.org/viewvc/llvm-project?rev=71448&view=rev Log: Add terminal width detection to llvm::sys::Process. This is needed to fix Clang PRs 4148 and 4183. Modified: llvm/trunk/autoconf/configure.ac llvm/trunk/cmake/config-ix.cmake llvm/trunk/configure llvm/trunk/include/llvm/ADT/FoldingSet.h llvm/trunk/include/llvm/Config/config.h.cmake llvm/trunk/include/llvm/Config/config.h.in llvm/trunk/include/llvm/System/Process.h llvm/trunk/lib/System/Unix/Process.inc llvm/trunk/lib/System/Win32/Process.inc Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=71448&r1=71447&r2=71448&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Mon May 11 13:05:52 2009 @@ -826,7 +826,7 @@ AC_CHECK_HEADERS([malloc.h setjmp.h signal.h stdint.h unistd.h utime.h]) AC_CHECK_HEADERS([windows.h]) AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/resource.h sys/time.h]) -AC_CHECK_HEADERS([sys/types.h malloc/malloc.h mach/mach.h]) +AC_CHECK_HEADERS([sys/types.h sys/ioctl.h malloc/malloc.h mach/mach.h]) if test "$ENABLE_THREADS" -eq 1 ; then AC_CHECK_HEADERS(pthread.h, AC_SUBST(HAVE_PTHREAD, 1), Modified: llvm/trunk/cmake/config-ix.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=71448&r1=71447&r2=71448&view=diff ============================================================================== --- llvm/trunk/cmake/config-ix.cmake (original) +++ llvm/trunk/cmake/config-ix.cmake Mon May 11 13:05:52 2009 @@ -26,6 +26,7 @@ check_include_file(string.h HAVE_STRING_H) check_include_file(sys/dir.h HAVE_SYS_DIR_H) check_include_file(sys/dl.h HAVE_SYS_DL_H) +check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H) check_include_file(sys/mman.h HAVE_SYS_MMAN_H) check_include_file(sys/ndir.h HAVE_SYS_NDIR_H) check_include_file(sys/param.h HAVE_SYS_PARAM_H) @@ -43,9 +44,11 @@ # function checks include(CheckSymbolExists) +include(CheckFunctionExists) check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE) check_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE) check_symbol_exists(setrlimit sys/resource.h HAVE_SETRLIMIT) +check_function_exists(isatty HAVE_ISATTY) check_symbol_exists(isinf cmath HAVE_ISINF_IN_CMATH) check_symbol_exists(isinf math.h HAVE_ISINF_IN_MATH_H) check_symbol_exists(isnan cmath HAVE_ISNAN_IN_CMATH) Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=71448&r1=71447&r2=71448&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Mon May 11 13:05:52 2009 @@ -897,10 +897,10 @@ FFLAGS ac_ct_F77 LIBTOOL -LLVMGCC -LLVMGXX LLVMGCCCOMMAND LLVMGXXCOMMAND +LLVMGCC +LLVMGXX USE_UDIS86 HAVE_PTHREAD HUGE_VAL_SANITY @@ -5010,6 +5010,7 @@ WITH_LLVMGCCDIR="" fi + if test -n "$LLVMGCC"; then LLVMGCCCOMMAND="$LLVMGCC" fi @@ -10574,7 +10575,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext + echo '#line 12722 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -14436,11 +14437,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14425: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14440: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14429: \$? = $ac_status" >&5 + echo "$as_me:14444: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14704,11 +14705,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14693: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14708: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14697: \$? = $ac_status" >&5 + echo "$as_me:14712: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14808,11 +14809,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14797: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14812: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14801: \$? = $ac_status" >&5 + echo "$as_me:14816: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17260,7 +17261,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:19732: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:19721: \$? = $ac_status" >&5 + echo "$as_me:19736: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -19832,11 +19833,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:19821: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19836: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:19825: \$? = $ac_status" >&5 + echo "$as_me:19840: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -21402,11 +21403,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21391: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21406: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21395: \$? = $ac_status" >&5 + echo "$as_me:21410: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -21506,11 +21507,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21495: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21510: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21499: \$? = $ac_status" >&5 + echo "$as_me:21514: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -23741,11 +23742,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:23730: $lt_compile\"" >&5) + (eval echo "\"\$as_me:23745: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:23734: \$? = $ac_status" >&5 + echo "$as_me:23749: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -24009,11 +24010,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:23998: $lt_compile\"" >&5) + (eval echo "\"\$as_me:24013: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:24002: \$? = $ac_status" >&5 + echo "$as_me:24017: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -24113,11 +24114,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:24102: $lt_compile\"" >&5) + (eval echo "\"\$as_me:24117: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:24106: \$? = $ac_status" >&5 + echo "$as_me:24121: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -26821,12 +26822,12 @@ fi + if test "$WITH_LLVMGCCDIR" = "default" ; then LLVMGCC="llvm-gcc${EXEEXT}" LLVMGXX="llvm-g++${EXEEXT}" LLVMGCCCOMMAND="$LLVMGCC" LLVMGXXCOMMAND="$LLVMGXX" - LLVMGCCCOMMAND=$LLVMGCCCOMMAND LLVMGXXCOMMAND=$LLVMGXXCOMMAND @@ -29474,7 +29475,8 @@ -for ac_header in sys/types.h malloc/malloc.h mach/mach.h + +for ac_header in sys/types.h sys/ioctl.h malloc/malloc.h mach/mach.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then @@ -34909,10 +34911,10 @@ FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim -LLVMGCC!$LLVMGCC$ac_delim -LLVMGXX!$LLVMGXX$ac_delim LLVMGCCCOMMAND!$LLVMGCCCOMMAND$ac_delim LLVMGXXCOMMAND!$LLVMGXXCOMMAND$ac_delim +LLVMGCC!$LLVMGCC$ac_delim +LLVMGXX!$LLVMGXX$ac_delim USE_UDIS86!$USE_UDIS86$ac_delim HAVE_PTHREAD!$HAVE_PTHREAD$ac_delim HUGE_VAL_SANITY!$HUGE_VAL_SANITY$ac_delim Modified: llvm/trunk/include/llvm/ADT/FoldingSet.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/FoldingSet.h?rev=71448&r1=71447&r2=71448&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/FoldingSet.h (original) +++ llvm/trunk/include/llvm/ADT/FoldingSet.h Mon May 11 13:05:52 2009 @@ -19,6 +19,7 @@ #include "llvm/Support/DataTypes.h" #include "llvm/ADT/SmallVector.h" #include +#include namespace llvm { class APFloat; Modified: llvm/trunk/include/llvm/Config/config.h.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=71448&r1=71447&r2=71448&view=diff ============================================================================== --- llvm/trunk/include/llvm/Config/config.h.cmake (original) +++ llvm/trunk/include/llvm/Config/config.h.cmake Mon May 11 13:05:52 2009 @@ -164,7 +164,7 @@ #cmakedefine HAVE_INTTYPES_H ${HAVE_INTTYPES_H} /* Define to 1 if you have the `isatty' function. */ -#undef HAVE_ISATTY +#cmakedefine HAVE_ISATTY 1 /* Set to 1 if the isinf function is found in */ #cmakedefine HAVE_ISINF_IN_CMATH ${HAVE_ISINF_IN_CMATH} @@ -388,6 +388,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_DL_H ${HAVE_SYS_DL_H} +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_IOCTL_H ${HAVE_SYS_IOCTL_H} + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_MMAN_H ${} Modified: llvm/trunk/include/llvm/Config/config.h.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.in?rev=71448&r1=71447&r2=71448&view=diff ============================================================================== --- llvm/trunk/include/llvm/Config/config.h.in (original) +++ llvm/trunk/include/llvm/Config/config.h.in Mon May 11 13:05:52 2009 @@ -391,6 +391,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_DL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H Modified: llvm/trunk/include/llvm/System/Process.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Process.h?rev=71448&r1=71447&r2=71448&view=diff ============================================================================== --- llvm/trunk/include/llvm/System/Process.h (original) +++ llvm/trunk/include/llvm/System/Process.h Mon May 11 13:05:52 2009 @@ -94,6 +94,19 @@ /// the user rather than being put on a pipe or stored in a file. static bool StandardErrIsDisplayed(); + /// This function determines the number of columns in the window + /// if standard output is connected to a "tty" or "console" + /// window. If standard output is not connected to a tty or + /// console, or if the number of columns cannot be determined, + /// this routine returns zero. + static unsigned StandardOutColumns(); + + /// This function determines the number of columns in the window + /// if standard error is connected to a "tty" or "console" + /// window. If standard error is not connected to a tty or + /// console, or if the number of columns cannot be determined, + /// this routine returns zero. + static unsigned StandardErrColumns(); /// @} }; } Modified: llvm/trunk/lib/System/Unix/Process.inc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Process.inc?rev=71448&r1=71447&r2=71448&view=diff ============================================================================== --- llvm/trunk/lib/System/Unix/Process.inc (original) +++ llvm/trunk/lib/System/Unix/Process.inc Mon May 11 13:05:52 2009 @@ -24,6 +24,9 @@ #ifdef HAVE_MALLOC_MALLOC_H #include #endif +#ifdef HAVE_SYS_IOCTL_H +# include +#endif //===----------------------------------------------------------------------===// //=== WARNING: Implementation here must contain only generic UNIX code that @@ -190,3 +193,37 @@ // If we don't have isatty, just return false. return false; } + +static unsigned getColumns(int FileID) { + // If COLUMNS is defined in the environment, wrap to that many columns. + if (const char *ColumnsStr = std::getenv("COLUMNS")) { + int Columns = std::atoi(ColumnsStr); + if (Columns > 0) + return Columns; + } + + unsigned Columns = 0; + +#ifdef HAVE_SYS_IOCTL_H + // Try to determine the width of the terminal. + struct winsize ws; + if (ioctl(FileID, TIOCGWINSZ, &ws) == 0) + Columns = ws.ws_col; +#endif + + return Columns; +} + +unsigned Process::StandardOutColumns() { + if (!StandardOutIsDisplayed()) + return 0; + + return getColumns(1); +} + +unsigned Process::StandardErrColumns() { + if (!StandardErrIsDisplayed()) + return 0; + + return getColumns(2); +} Modified: llvm/trunk/lib/System/Win32/Process.inc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Win32/Process.inc?rev=71448&r1=71447&r2=71448&view=diff ============================================================================== --- llvm/trunk/lib/System/Win32/Process.inc (original) +++ llvm/trunk/lib/System/Win32/Process.inc Mon May 11 13:05:52 2009 @@ -131,4 +131,20 @@ return GetFileType((HANDLE)_get_osfhandle(2)) == FILE_TYPE_CHAR; } +unsigned Process::StandardOutColumns() { + unsigned Columns = 0; + CONSOLE_SCREEN_BUFFER_INFO csbi; + if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi)) + Columns = csbi.dwSize.X; + return Columns; +} + +unsigned Process::StandardErrColumns() { + unsigned Columns = 0; + CONSOLE_SCREEN_BUFFER_INFO csbi; + if (GetConsoleScreenBufferInfo(GetStdHandle(STD_ERROR_HANDLE), &csbi)) + Columns = csbi.dwSize.X; + return Columns; +} + } From gohman at apple.com Mon May 11 13:06:06 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 11 May 2009 18:06:06 -0000 Subject: [llvm-commits] [llvm] r71449 - /llvm/trunk/lib/Target/README.txt Message-ID: <200905111806.n4BI668M029144@zion.cs.uiuc.edu> Author: djg Date: Mon May 11 13:06:05 2009 New Revision: 71449 URL: http://llvm.org/viewvc/llvm-project?rev=71449&view=rev Log: LLVM has unaligned loads and stores now. 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=71449&r1=71448&r2=71449&view=diff ============================================================================== --- llvm/trunk/lib/Target/README.txt (original) +++ llvm/trunk/lib/Target/README.txt Mon May 11 13:06:05 2009 @@ -125,8 +125,7 @@ //===---------------------------------------------------------------------===// -We should add 'unaligned load/store' nodes, and produce them from code like -this: +We should and produce and unaligned load from code like this: v4sf example(float *P) { return (v4sf){P[0], P[1], P[2], P[3] }; From clattner at apple.com Mon May 11 13:09:42 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 11 May 2009 11:09:42 -0700 Subject: [llvm-commits] [llvm] r71443 - /llvm/trunk/lib/Target/README.txt In-Reply-To: <4A0868B8.1080108@wxs.nl> References: <200905111741.n4BHfeBH028071@zion.cs.uiuc.edu> <4A0868B8.1080108@wxs.nl> Message-ID: On May 11, 2009, at 11:04 AM, Frits van Bommel wrote: > Chris Lattner wrote: >> Log: >> remove some done things: we have nocapture and SROA is smarter. > >> -2. Generalize readonly to be set on parameters. This is important >> mod/ref >> - info for the function, which is important for basicaa and >> others. It can >> - also be used by the inliner to avoid inserting a memcpy for byval >> - arguments when the function is inlined. > > I wasn't aware this was implemented? It's not in LangRef.html... No, but this is sufficiently dubious that it isn't worth being in readme.txt >> -These functions can be inferred by various analysis passes such as >> the >> -globalsmodrefaa pass. Note that getting #2 right is actually >> really tricky. >> -Consider this code: >> - >> -struct S; S G; >> -void caller(S byvalarg) { G.field = 1; ... } >> -void callee() { caller(G); } >> - >> -The fact that the caller does not modify byval arg is not enough, >> we need >> -to know that it doesn't modify G either. This is very tricky. > > Is this trickyness the reason it was given up on? Yes. > Can't the attribute just mean it's not modified through the > parameter, so that > passes wanting to use this information would also need to prove the > argument > being passed in at the particular callsite is not modified through > other means? > That way e.g. non-escaped locals could still benefit from this (even > if a global > was passed in at some other callsite). That isn't particularly useful information for the optimizers. When/ if we tackle something like this, this entry in the readme won't be helpful. -Chris From baldrick at free.fr Mon May 11 13:28:15 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 11 May 2009 20:28:15 +0200 Subject: [llvm-commits] [llvm-gcc-4.2] r71425 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h In-Reply-To: <16e5fdf90905111018k48fabde5id9a98f0bef3597b7@mail.gmail.com> References: <200905111100.n4BB0mhe010045@zion.cs.uiuc.edu> <200905111906.04322.baldrick@free.fr> <16e5fdf90905111018k48fabde5id9a98f0bef3597b7@mail.gmail.com> Message-ID: <200905112028.15593.baldrick@free.fr> Hi Bill, > Let me know if you need more. thanks for the info, it is enough. The reason is surely this: // If we have "extern void foo", make the global have type {} instead of // type void. if (Ty == Type::VoidTy) Ty = StructType::get(NULL, NULL); I need to think about this, and I don't have time now, so I'm going to revert the patch for the moment. Ciao, Duncan. From isanbard at gmail.com Mon May 11 13:30:04 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 11 May 2009 11:30:04 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r71425 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h In-Reply-To: <200905112028.15593.baldrick@free.fr> References: <200905111100.n4BB0mhe010045@zion.cs.uiuc.edu> <200905111906.04322.baldrick@free.fr> <16e5fdf90905111018k48fabde5id9a98f0bef3597b7@mail.gmail.com> <200905112028.15593.baldrick@free.fr> Message-ID: <16e5fdf90905111130m6f9a315eg2c7f9d203ffcf40e@mail.gmail.com> On Mon, May 11, 2009 at 11:28 AM, Duncan Sands wrote: > Hi Bill, > >> Let me know if you need more. > > thanks for the info, it is enough. ?The reason is surely this: > > ?// If we have "extern void foo", make the global have type {} instead of > ?// type void. > ?if (Ty == Type::VoidTy) Ty = StructType::get(NULL, NULL); > > I need to think about this, and I don't have time now, so I'm > going to revert the patch for the moment. > I already reverted it. :-) -bw From gohman at apple.com Mon May 11 13:30:43 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 11 May 2009 18:30:43 -0000 Subject: [llvm-commits] [llvm] r71453 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp test/CodeGen/X86/scalarize-bitcast.ll Message-ID: <200905111830.n4BIUhMf030336@zion.cs.uiuc.edu> Author: djg Date: Mon May 11 13:30:42 2009 New Revision: 71453 URL: http://llvm.org/viewvc/llvm-project?rev=71453&view=rev Log: When scalarizing a vector BITCAST, check whether the operand has vector type, rather than assume that it does. If the operand is not vector, it shouldn't be run through ScalarizeVectorOp. This fixes one of the testcases in PR3886. Added: llvm/trunk/test/CodeGen/X86/scalarize-bitcast.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=71453&r1=71452&r2=71453&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon May 11 13:30:42 2009 @@ -7961,7 +7961,8 @@ break; case ISD::BIT_CONVERT: { SDValue Op0 = Op.getOperand(0); - if (Op0.getValueType().getVectorNumElements() == 1) + if (Op0.getValueType().isVector() && + Op0.getValueType().getVectorNumElements() == 1) Op0 = ScalarizeVectorOp(Op0); Result = DAG.getNode(ISD::BIT_CONVERT, dl, NewVT, Op0); break; Added: llvm/trunk/test/CodeGen/X86/scalarize-bitcast.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/scalarize-bitcast.ll?rev=71453&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/scalarize-bitcast.ll (added) +++ llvm/trunk/test/CodeGen/X86/scalarize-bitcast.ll Mon May 11 13:30:42 2009 @@ -0,0 +1,29 @@ +; RUN: llvm-as < %s | llc -march=x86-64 +; PR3886 + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" +target triple = "x86_64-pc-linux-gnu" + +define void @mmxCombineMaskU(i32* nocapture %src, i32* nocapture %mask) nounwind { +entry: + %tmp1 = load i32* %src ; [#uses=1] + %0 = insertelement <2 x i32> undef, i32 %tmp1, i32 0 ; <<2 x i32>> [#uses=1] + %1 = insertelement <2 x i32> %0, i32 0, i32 1 ; <<2 x i32>> [#uses=1] + %conv.i.i = bitcast <2 x i32> %1 to <1 x i64> ; <<1 x i64>> [#uses=1] + %tmp2.i.i = extractelement <1 x i64> %conv.i.i, i32 0 ; [#uses=1] + %tmp22.i = bitcast i64 %tmp2.i.i to <1 x i64> ; <<1 x i64>> [#uses=1] + %tmp15.i = extractelement <1 x i64> %tmp22.i, i32 0 ; [#uses=1] + %conv.i26.i = bitcast i64 %tmp15.i to <8 x i8> ; <<8 x i8>> [#uses=1] + %shuffle.i.i = shufflevector <8 x i8> %conv.i26.i, <8 x i8> , <8 x i32> ; <<8 x i8>> [#uses=1] + %conv6.i.i = bitcast <8 x i8> %shuffle.i.i to <1 x i64> ; <<1 x i64>> [#uses=1] + %tmp12.i.i = extractelement <1 x i64> %conv6.i.i, i32 0 ; [#uses=1] + %tmp10.i = bitcast i64 %tmp12.i.i to <1 x i64> ; <<1 x i64>> [#uses=1] + %tmp24.i = extractelement <1 x i64> %tmp10.i, i32 0 ; [#uses=1] + %tmp10 = bitcast i64 %tmp24.i to <1 x i64> ; <<1 x i64>> [#uses=1] + %tmp7 = extractelement <1 x i64> %tmp10, i32 0 ; [#uses=1] + %call6 = tail call i32 (...)* @store8888(i64 %tmp7) ; [#uses=1] + store i32 %call6, i32* %src + ret void +} + +declare i32 @store8888(...) From isanbard at gmail.com Mon May 11 13:31:19 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 11 May 2009 11:31:19 -0700 Subject: [llvm-commits] [llvm] r71446 - in /llvm/trunk: lib/Target/X86/X86ISelDAGToDAG.cpp lib/Target/X86/X86InstrInfo.td test/CodeGen/X86/lea-neg.ll In-Reply-To: <200905111802.n4BI2sB1028931@zion.cs.uiuc.edu> References: <200905111802.n4BI2sB1028931@zion.cs.uiuc.edu> Message-ID: <16e5fdf90905111131j404a4c48wd8034578e7eb5f52@mail.gmail.com> Dan, This is failing at least in release mode: Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/lea-neg.ll Failed with exit(1) at line 3 while running: not /usr/bin/grep sub lea-neg.ll.tmp .subsections_via_symbols child process exited abnormally -bw On Mon, May 11, 2009 at 11:02 AM, Dan Gohman wrote: > Author: djg > Date: Mon May 11 13:02:53 2009 > New Revision: 71446 > > URL: http://llvm.org/viewvc/llvm-project?rev=71446&view=rev > Log: > Convert a subtract into a negate and an add when it helps x86 > address folding. > > Added: > ? ?llvm/trunk/test/CodeGen/X86/lea-neg.ll > Modified: > ? ?llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp > ? ?llvm/trunk/lib/Target/X86/X86InstrInfo.td > > Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=71446&r1=71445&r2=71446&view=diff > > ============================================================================== > --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) > +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Mon May 11 13:02:53 2009 > @@ -868,6 +868,76 @@ > ? ? } > ? ? break; > > + ?case ISD::SUB: { > + ? ?// Given A-B, if A can be completely folded into the address and > + ? ?// the index field with the index field unused, use -B as the index. > + ? ?// This is a win if a has multiple parts that can be folded into > + ? ?// the address. Also, this saves a mov if the base register has > + ? ?// other uses, since it avoids a two-address sub instruction, however > + ? ?// it costs an additional mov if the index register has other uses. > + > + ? ?// Test if the LHS of the sub can be folded. > + ? ?X86ISelAddressMode Backup = AM; > + ? ?if (MatchAddress(N.getNode()->getOperand(0), AM, Depth+1)) { > + ? ? ?AM = Backup; > + ? ? ?break; > + ? ?} > + ? ?// Test if the index field is free for use. > + ? ?if (AM.IndexReg.getNode() || AM.isRIPRel) { > + ? ? ?AM = Backup; > + ? ? ?break; > + ? ?} > + ? ?int Cost = 0; > + ? ?SDValue RHS = N.getNode()->getOperand(1); > + ? ?// If the RHS involves a register with multiple uses, this > + ? ?// transformation incurs an extra mov, due to the neg instruction > + ? ?// clobbering its operand. > + ? ?if (!RHS.getNode()->hasOneUse() || > + ? ? ? ?RHS.getNode()->getOpcode() == ISD::CopyFromReg || > + ? ? ? ?RHS.getNode()->getOpcode() == ISD::TRUNCATE || > + ? ? ? ?RHS.getNode()->getOpcode() == ISD::ANY_EXTEND || > + ? ? ? ?(RHS.getNode()->getOpcode() == ISD::ZERO_EXTEND && > + ? ? ? ? RHS.getNode()->getOperand(0).getValueType() == MVT::i32)) > + ? ? ?++Cost; > + ? ?// If the base is a register with multiple uses, this > + ? ?// transformation may save a mov. > + ? ?if ((AM.BaseType == X86ISelAddressMode::RegBase && > + ? ? ? ? AM.Base.Reg.getNode() && > + ? ? ? ? !AM.Base.Reg.getNode()->hasOneUse()) || > + ? ? ? ?AM.BaseType == X86ISelAddressMode::FrameIndexBase) > + ? ? ?--Cost; > + ? ?// If the folded LHS was interesting, this transformation saves > + ? ?// address arithmetic. > + ? ?if ((AM.hasSymbolicDisplacement() && !Backup.hasSymbolicDisplacement()) + > + ? ? ? ?((AM.Disp != 0) && (Backup.Disp == 0)) + > + ? ? ? ?(AM.Segment.getNode() && !Backup.Segment.getNode()) >= 2) > + ? ? ?--Cost; > + ? ?// If it doesn't look like it may be an overall win, don't do it. > + ? ?if (Cost >= 0) { > + ? ? ?AM = Backup; > + ? ? ?break; > + ? ?} > + > + ? ?// Ok, the transformation is legal and appears profitable. Go for it. > + ? ?SDValue Zero = CurDAG->getConstant(0, N.getValueType()); > + ? ?SDValue Neg = CurDAG->getNode(ISD::SUB, dl, N.getValueType(), Zero, RHS); > + ? ?AM.IndexReg = Neg; > + ? ?AM.Scale = 1; > + > + ? ?// Insert the new nodes into the topological ordering. > + ? ?if (Zero.getNode()->getNodeId() == -1 || > + ? ? ? ?Zero.getNode()->getNodeId() > N.getNode()->getNodeId()) { > + ? ? ?CurDAG->RepositionNode(N.getNode(), Zero.getNode()); > + ? ? ?Zero.getNode()->setNodeId(N.getNode()->getNodeId()); > + ? ?} > + ? ?if (Neg.getNode()->getNodeId() == -1 || > + ? ? ? ?Neg.getNode()->getNodeId() > N.getNode()->getNodeId()) { > + ? ? ?CurDAG->RepositionNode(N.getNode(), Neg.getNode()); > + ? ? ?Neg.getNode()->setNodeId(N.getNode()->getNodeId()); > + ? ?} > + ? ?return false; > + ?} > + > ? case ISD::ADD: { > ? ? X86ISelAddressMode Backup = AM; > ? ? if (!MatchAddress(N.getNode()->getOperand(0), AM, Depth+1) && > > Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=71446&r1=71445&r2=71446&view=diff > > ============================================================================== > --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) > +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Mon May 11 13:02:53 2009 > @@ -217,7 +217,7 @@ > ?// Define X86 specific addressing mode. > ?def addr ? ? ?: ComplexPattern; > ?def lea32addr : ComplexPattern - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [add, mul, shl, or, frameindex], []>; > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [add, sub, mul, shl, or, frameindex], []>; > > ?//===----------------------------------------------------------------------===// > ?// X86 Instruction Predicate Definitions. > > Added: llvm/trunk/test/CodeGen/X86/lea-neg.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lea-neg.ll?rev=71446&view=auto > > ============================================================================== > --- llvm/trunk/test/CodeGen/X86/lea-neg.ll (added) > +++ llvm/trunk/test/CodeGen/X86/lea-neg.ll Mon May 11 13:02:53 2009 > @@ -0,0 +1,25 @@ > +; RUN: llvm-as < %s | llc -march=x86-64 > %t > +; RUN: grep negl %t | count 1 > +; RUN: not grep sub %t > +; RUN: grep mov %t | count 1 > +; RUN: grep {leal ? ? ?-4(} %t | count 1 > + > +; ISel the add of -4 with a neg and use an lea for the rest of the > +; arithemtic. > + > +define i32 @test(i32 %x_offs) nounwind readnone { > +entry: > + ? ? ? %t0 = icmp sgt i32 %x_offs, 4 ? ? ? ? ? ; [#uses=1] > + ? ? ? br i1 %t0, label %bb.nph, label %bb2 > + > +bb.nph: ? ? ? ? ? ? ? ?; preds = %entry > + ? ? ? %tmp = add i32 %x_offs, -5 ? ? ? ? ? ? ?; [#uses=1] > + ? ? ? %tmp6 = lshr i32 %tmp, 2 ? ? ? ? ? ? ? ?; [#uses=1] > + ? ? ? %tmp7 = mul i32 %tmp6, -4 ? ? ? ? ? ? ? ; [#uses=1] > + ? ? ? %tmp8 = add i32 %tmp7, %x_offs ? ? ? ? ?; [#uses=1] > + ? ? ? %tmp9 = add i32 %tmp8, -4 ? ? ? ? ? ? ? ; [#uses=1] > + ? ? ? ret i32 %tmp9 > + > +bb2: ? ? ? ? ? ; preds = %entry > + ? ? ? ret i32 %x_offs > +} > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From baldrick at free.fr Mon May 11 13:31:41 2009 From: baldrick at free.fr (Duncan Sands) Date: Mon, 11 May 2009 20:31:41 +0200 Subject: [llvm-commits] [llvm] r71449 - /llvm/trunk/lib/Target/README.txt In-Reply-To: <200905111806.n4BI668M029144@zion.cs.uiuc.edu> References: <200905111806.n4BI668M029144@zion.cs.uiuc.edu> Message-ID: <200905112031.41591.baldrick@free.fr> > +We should and produce and unaligned load from code like this: and produce and? Ciao, Duncan. From kremenek at apple.com Mon May 11 13:33:16 2009 From: kremenek at apple.com (Ted Kremenek) Date: Mon, 11 May 2009 18:33:16 -0000 Subject: [llvm-commits] [llvm] r71454 - /llvm/tags/checker/checker-0.201/ Message-ID: <200905111833.n4BIXGJw030445@zion.cs.uiuc.edu> Author: kremenek Date: Mon May 11 13:33:15 2009 New Revision: 71454 URL: http://llvm.org/viewvc/llvm-project?rev=71454&view=rev Log: Tagging checker-0.201. Added: llvm/tags/checker/checker-0.201/ - copied from r71453, llvm/trunk/ From evan.cheng at apple.com Mon May 11 13:40:38 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 11 May 2009 18:40:38 -0000 Subject: [llvm-commits] [llvm] r71456 - /llvm/trunk/lib/CodeGen/StackSlotColoring.cpp Message-ID: <200905111840.n4BIecOj030750@zion.cs.uiuc.edu> Author: evancheng Date: Mon May 11 13:40:35 2009 New Revision: 71456 URL: http://llvm.org/viewvc/llvm-project?rev=71456&view=rev Log: Eliminate a compiler warning. Modified: llvm/trunk/lib/CodeGen/StackSlotColoring.cpp Modified: llvm/trunk/lib/CodeGen/StackSlotColoring.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackSlotColoring.cpp?rev=71456&r1=71455&r2=71456&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/StackSlotColoring.cpp (original) +++ llvm/trunk/lib/CodeGen/StackSlotColoring.cpp Mon May 11 13:40:35 2009 @@ -599,6 +599,7 @@ } else { SmallVector NewMIs; bool Success = TII->unfoldMemoryOperand(MF, MI, Reg, false, false, NewMIs); + Success = Success; // Silence compiler warning. assert(Success && "Failed to unfold!"); MBB->insert(MI, NewMIs[0]); ++NumRegRepl; From evan.cheng at apple.com Mon May 11 13:40:53 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 11 May 2009 18:40:53 -0000 Subject: [llvm-commits] [llvm] r71457 - /llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Message-ID: <200905111840.n4BIesUF030773@zion.cs.uiuc.edu> Author: evancheng Date: Mon May 11 13:40:52 2009 New Revision: 71457 URL: http://llvm.org/viewvc/llvm-project?rev=71457&view=rev Log: Unbreak non-debug build. Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=71457&r1=71456&r2=71457&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Mon May 11 13:40:52 2009 @@ -337,7 +337,9 @@ void PEI::initShrinkWrappingInfo() { clearAllSets(); EntryBlock = 0; +#ifndef NDEBUG HasFastExitPath = false; +#endif ShrinkWrapThisFunction = ShrinkWrapping; // DEBUG: enable or disable shrink wrapping for the current function // via --shrink-wrap-func=. @@ -1656,7 +1658,9 @@ MachineBasicBlock* SUCC = *SI; // Assume positive, disprove existence of fast path. +#ifndef NDEBUG HasFastExitPath = true; +#endif // Check the immediate successors. if (isReturnBlock(SUCC)) { @@ -1672,17 +1676,21 @@ MachineBasicBlock* SBB = *BI; // Reject paths with branch nodes. if (SBB->succ_size() > 1) { +#ifndef NDEBUG HasFastExitPath = false; +#endif break; } exitPath += "->" + getBasicBlockName(SBB); } +#ifndef NDEBUG if (HasFastExitPath) { if (ShrinkWrapDebugging >= BasicInfo) DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) << "->" << exitPath << "\n"; break; } +#endif } } From evan.cheng at apple.com Mon May 11 13:43:15 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 11 May 2009 11:43:15 -0700 Subject: [llvm-commits] [PATCH] Machine code verifier pass In-Reply-To: <04F74F5E-5BCA-4F65-8ED5-CAF353E31497@2pi.dk> References: <04F74F5E-5BCA-4F65-8ED5-CAF353E31497@2pi.dk> Message-ID: <2BC4EDFE-5114-4D65-9976-825231B06394@apple.com> Thanks Jakob! So comments below: + const MachineBasicBlock *MBB; + BBInfo *MBBInfo; + const MachineInstr *MI; + const MachineOperand *MO; I find it strange that these are class ivars. Can you change them to local variables and parameters? +void +MachineVerifier::calcMaxRegsPassed() +{ + // First push live-out regs to successors' vregsPassed. Remember the MBBs that + // have any vregsPassed. + DenseSet todo; + for (MachineFunction::const_iterator MFI = MF->begin(), MFE = MF- >end(); + MFI != MFE; ++MFI) { + const MachineBasicBlock &MBB(*MFI); + BBInfo &MInfo = MBBInfoMap[&MBB]; + for (MachineBasicBlock::const_succ_iterator SuI = MBB.succ_begin(), + SuE = MBB.succ_end(); SuI != SuE; ++SuI) { + BBInfo &SInfo = MBBInfoMap[*SuI]; + if (SInfo.addPassed(MInfo.regsLiveOut)) + todo.insert(*SuI); + } + } + + // Iteratively push vregsPassed to successors until convergence. + while (!todo.empty()) { I don't think the order of iteration of DenseSet is deterministic. + // If any regs removed, we need to recheck successors Missing a period at the end of the sentence. Have you had a chance running this through some code? Thanks, Evan On May 8, 2009, at 2:38 PM, Jakob Stoklund Olesen wrote: > Hi, > > The attached patch creates a machine code verifier pass, enabled > with -verify-machineinstrs. The verifier pass is run immediately > after -print-machineinstrs would run. It verifies the following: > > Operand counts: All explicit operands must be present. > > Register classes: All physical and virtual register operands must be > compatible with the register class required by the instruction > descriptor. > > Register live intervals: Registers must be defined only once, and > must be defined before use. > > The double-definition checking is disabled until LiveVariables has > run. > > If I have misunderstood something about valid machine code, please > let me know. > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From gohman at apple.com Mon May 11 13:49:56 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 11 May 2009 18:49:56 -0000 Subject: [llvm-commits] [llvm] r71458 - /llvm/trunk/test/CodeGen/X86/lea-neg.ll Message-ID: <200905111849.n4BInurV031208@zion.cs.uiuc.edu> Author: djg Date: Mon May 11 13:49:56 2009 New Revision: 71458 URL: http://llvm.org/viewvc/llvm-project?rev=71458&view=rev Log: Make this grep line a little more specific so that it doesn't accidentally match something unrelated. Modified: llvm/trunk/test/CodeGen/X86/lea-neg.ll Modified: llvm/trunk/test/CodeGen/X86/lea-neg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lea-neg.ll?rev=71458&r1=71457&r2=71458&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/lea-neg.ll (original) +++ llvm/trunk/test/CodeGen/X86/lea-neg.ll Mon May 11 13:49:56 2009 @@ -1,6 +1,6 @@ ; RUN: llvm-as < %s | llc -march=x86-64 > %t ; RUN: grep negl %t | count 1 -; RUN: not grep sub %t +; RUN: not grep {sub\[bwlq\]} %t ; RUN: grep mov %t | count 1 ; RUN: grep {leal -4(} %t | count 1 From gohman at apple.com Mon May 11 13:51:16 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 11 May 2009 18:51:16 -0000 Subject: [llvm-commits] [llvm] r71459 - /llvm/trunk/lib/Target/README.txt Message-ID: <200905111851.n4BIpGdu031267@zion.cs.uiuc.edu> Author: djg Date: Mon May 11 13:51:16 2009 New Revision: 71459 URL: http://llvm.org/viewvc/llvm-project?rev=71459&view=rev Log: Fix two wording errors that Duncan spotted. 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=71459&r1=71458&r2=71459&view=diff ============================================================================== --- llvm/trunk/lib/Target/README.txt (original) +++ llvm/trunk/lib/Target/README.txt Mon May 11 13:51:16 2009 @@ -125,7 +125,7 @@ //===---------------------------------------------------------------------===// -We should and produce and unaligned load from code like this: +We should produce an unaligned load from code like this: v4sf example(float *P) { return (v4sf){P[0], P[1], P[2], P[3] }; From jay.foad at gmail.com Mon May 11 13:59:20 2009 From: jay.foad at gmail.com (Jay Foad) Date: Mon, 11 May 2009 19:59:20 +0100 Subject: [llvm-commits] [llvm] r71426 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/Target/TargetData.cpp In-Reply-To: <3F31145D-931B-46A1-BEF6-5484690886F5@apple.com> References: <200905111114.n4BBEDAI010467@zion.cs.uiuc.edu> <3F31145D-931B-46A1-BEF6-5484690886F5@apple.com> Message-ID: >> +++ llvm/trunk/include/llvm/Target/TargetData.h Mon May 11 06:13:47 2009 >> @@ -23,13 +23,12 @@ >> #include "llvm/Pass.h" >> #include "llvm/Support/DataTypes.h" >> #include "llvm/ADT/SmallVector.h" >> +#include "llvm/DerivedTypes.h" > > Can you just use a forward declaration of IntegerType instead of a #include? Yes, but then whenever a .cpp file does "const Type *Ty = TD->getIntPtrType()", it needs to include DerivedTypes.h instead. (In practice this only affects one .cpp file.) Nick Lewycky asked the same question, so I posted patches to do it both ways (subject was "TargetData::getIntPtrType() to return IntegerType"), and I thought you had explicitly OKed this version. Thanks, Jay. From clattner at apple.com Mon May 11 14:02:15 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 11 May 2009 12:02:15 -0700 Subject: [llvm-commits] [llvm] r71457 - /llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp In-Reply-To: <200905111840.n4BIesUF030773@zion.cs.uiuc.edu> References: <200905111840.n4BIesUF030773@zion.cs.uiuc.edu> Message-ID: <38497E1C-17D3-417F-B92C-EF15A0FE2980@apple.com> On May 11, 2009, at 11:40 AM, Evan Cheng wrote: > Author: evancheng > Date: Mon May 11 13:40:52 2009 > New Revision: 71457 > > URL: http://llvm.org/viewvc/llvm-project?rev=71457&view=rev > Log: > Unbreak non-debug build. Is the 'break' supposed to be in the ifdef? Why not only wrap the "HasFastExitPath = true;" in an #ifdef and the the optimizer strip out the dead check below? -chris > > > Modified: > llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp > > Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=71457&r1=71456&r2=71457&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) > +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Mon May 11 > 13:40:52 2009 > @@ -337,7 +337,9 @@ > void PEI::initShrinkWrappingInfo() { > clearAllSets(); > EntryBlock = 0; > +#ifndef NDEBUG > HasFastExitPath = false; > +#endif > ShrinkWrapThisFunction = ShrinkWrapping; > // DEBUG: enable or disable shrink wrapping for the current function > // via --shrink-wrap-func=. > @@ -1656,7 +1658,9 @@ > MachineBasicBlock* SUCC = *SI; > > // Assume positive, disprove existence of fast path. > +#ifndef NDEBUG > HasFastExitPath = true; > +#endif > > // Check the immediate successors. > if (isReturnBlock(SUCC)) { > @@ -1672,17 +1676,21 @@ > MachineBasicBlock* SBB = *BI; > // Reject paths with branch nodes. > if (SBB->succ_size() > 1) { > +#ifndef NDEBUG > HasFastExitPath = false; > +#endif > break; > } > exitPath += "->" + getBasicBlockName(SBB); > } > +#ifndef NDEBUG > if (HasFastExitPath) { > if (ShrinkWrapDebugging >= BasicInfo) > DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) > << "->" << exitPath << "\n"; > break; > } > +#endif > } > } > > > > _______________________________________________ > 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 May 11 14:03:05 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 11 May 2009 12:03:05 -0700 Subject: [llvm-commits] [llvm] r71426 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/Target/TargetData.cpp In-Reply-To: References: <200905111114.n4BBEDAI010467@zion.cs.uiuc.edu> <3F31145D-931B-46A1-BEF6-5484690886F5@apple.com> Message-ID: <7F08755A-CDB7-40E7-8D9B-DDDD5046B76E@apple.com> On May 11, 2009, at 11:59 AM, Jay Foad wrote: >>> +++ llvm/trunk/include/llvm/Target/TargetData.h Mon May 11 >>> 06:13:47 2009 >>> @@ -23,13 +23,12 @@ >>> #include "llvm/Pass.h" >>> #include "llvm/Support/DataTypes.h" >>> #include "llvm/ADT/SmallVector.h" >>> +#include "llvm/DerivedTypes.h" >> >> Can you just use a forward declaration of IntegerType instead of a >> #include? > > Yes, but then whenever a .cpp file does "const Type *Ty = > TD->getIntPtrType()", it needs to include DerivedTypes.h instead. (In > practice this only affects one .cpp file.) > > Nick Lewycky asked the same question, so I posted patches to do it > both ways (subject was "TargetData::getIntPtrType() to return > IntegerType"), and I thought you had explicitly OKed this version. Ok, sorry, I missed the distinction. I prefer to force .cpp files to #include the headers they use. -Chris From gohman at apple.com Mon May 11 14:11:54 2009 From: gohman at apple.com (Dan Gohman) Date: Mon, 11 May 2009 19:11:54 -0000 Subject: [llvm-commits] [llvm] r71466 - /llvm/trunk/include/llvm/Target/TargetLowering.h Message-ID: <200905111911.n4BJBseo032206@zion.cs.uiuc.edu> Author: djg Date: Mon May 11 14:11:53 2009 New Revision: 71466 URL: http://llvm.org/viewvc/llvm-project?rev=71466&view=rev Log: Add a comment about the special meaning of VoidTy in this context. 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=71466&r1=71465&r2=71466&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Mon May 11 14:11:53 2009 @@ -1381,6 +1381,8 @@ /// isLegalAddressingMode - Return true if the addressing mode represented by /// AM is legal for this target, for a load/store of the specified type. + /// The type may be VoidTy, in which case only return true if the addressing + /// mode is legal for a load/store of any legal type. /// TODO: Handle pre/postinc as well. virtual bool isLegalAddressingMode(const AddrMode &AM, const Type *Ty) const; From jay.foad at gmail.com Mon May 11 14:38:10 2009 From: jay.foad at gmail.com (Jay Foad) Date: Mon, 11 May 2009 19:38:10 -0000 Subject: [llvm-commits] [llvm] r71468 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/Target/PowerPC/PPCISelLowering.cpp Message-ID: <200905111938.n4BJcAQ3000650@zion.cs.uiuc.edu> Author: foad Date: Mon May 11 14:38:09 2009 New Revision: 71468 URL: http://llvm.org/viewvc/llvm-project?rev=71468&view=rev Log: Don't #include DerivedTypes.h from TargetData.h. Modified: llvm/trunk/include/llvm/Target/TargetData.h llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Modified: llvm/trunk/include/llvm/Target/TargetData.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetData.h?rev=71468&r1=71467&r2=71468&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetData.h (original) +++ llvm/trunk/include/llvm/Target/TargetData.h Mon May 11 14:38:09 2009 @@ -23,12 +23,14 @@ #include "llvm/Pass.h" #include "llvm/Support/DataTypes.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/DerivedTypes.h" #include namespace llvm { class Value; +class Type; +class IntegerType; +class StructType; class StructLayout; class GlobalVariable; Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=71468&r1=71467&r2=71468&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Mon May 11 14:38:09 2009 @@ -32,6 +32,7 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Target/TargetOptions.h" #include "llvm/Support/CommandLine.h" +#include "llvm/DerivedTypes.h" using namespace llvm; static cl::opt EnablePPCPreinc("enable-ppc-preinc", From jay.foad at gmail.com Mon May 11 14:41:13 2009 From: jay.foad at gmail.com (Jay Foad) Date: Mon, 11 May 2009 20:41:13 +0100 Subject: [llvm-commits] [llvm] r71426 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/Target/TargetData.cpp In-Reply-To: <7F08755A-CDB7-40E7-8D9B-DDDD5046B76E@apple.com> References: <200905111114.n4BBEDAI010467@zion.cs.uiuc.edu> <3F31145D-931B-46A1-BEF6-5484690886F5@apple.com> <7F08755A-CDB7-40E7-8D9B-DDDD5046B76E@apple.com> Message-ID: >>>> +++ llvm/trunk/include/llvm/Target/TargetData.h Mon May 11 06:13:47 2009 >>>> @@ -23,13 +23,12 @@ >>>> #include "llvm/Pass.h" >>>> #include "llvm/Support/DataTypes.h" >>>> #include "llvm/ADT/SmallVector.h" >>>> +#include "llvm/DerivedTypes.h" >>> >>> Can you just use a forward declaration of IntegerType instead of a >>> #include? >> >> Yes, but then whenever a .cpp file does "const Type *Ty = >> TD->getIntPtrType()", it needs to include DerivedTypes.h instead. (In >> practice this only affects one .cpp file.) >> >> Nick Lewycky asked the same question, so I posted patches to do it >> both ways (subject was "TargetData::getIntPtrType() to return >> IntegerType"), and I thought you had explicitly OKed this version. > > Ok, sorry, I missed the distinction. ?I prefer to force .cpp files to > #include the headers they use. OK, I've committed the other version: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090511/077398.html Thanks, Jay. From clattner at apple.com Mon May 11 14:41:32 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 11 May 2009 12:41:32 -0700 Subject: [llvm-commits] [llvm] r71426 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/Target/TargetData.cpp In-Reply-To: References: <200905111114.n4BBEDAI010467@zion.cs.uiuc.edu> <3F31145D-931B-46A1-BEF6-5484690886F5@apple.com> <7F08755A-CDB7-40E7-8D9B-DDDD5046B76E@apple.com> Message-ID: Thanks Jay! On May 11, 2009, at 12:41 PM, Jay Foad wrote: >>>>> +++ llvm/trunk/include/llvm/Target/TargetData.h Mon May 11 >>>>> 06:13:47 2009 >>>>> @@ -23,13 +23,12 @@ >>>>> #include "llvm/Pass.h" >>>>> #include "llvm/Support/DataTypes.h" >>>>> #include "llvm/ADT/SmallVector.h" >>>>> +#include "llvm/DerivedTypes.h" >>>> >>>> Can you just use a forward declaration of IntegerType instead of a >>>> #include? >>> >>> Yes, but then whenever a .cpp file does "const Type *Ty = >>> TD->getIntPtrType()", it needs to include DerivedTypes.h instead. >>> (In >>> practice this only affects one .cpp file.) >>> >>> Nick Lewycky asked the same question, so I posted patches to do it >>> both ways (subject was "TargetData::getIntPtrType() to return >>> IntegerType"), and I thought you had explicitly OKed this version. >> >> Ok, sorry, I missed the distinction. I prefer to force .cpp files to >> #include the headers they use. > > OK, I've committed the other version: > > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090511/077398.html > > Thanks, > Jay. From clattner at apple.com Mon May 11 14:45:25 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 11 May 2009 12:45:25 -0700 Subject: [llvm-commits] [llvm] r71438 - in /llvm/trunk: include/llvm/ADT/SparseBitVector.h lib/CodeGen/PrologEpilogInserter.cpp In-Reply-To: <200905111704.n4BH4Kr9026553@zion.cs.uiuc.edu> References: <200905111704.n4BH4Kr9026553@zion.cs.uiuc.edu> Message-ID: <24E91346-2B71-44E8-8984-4ACD9B6DAFE5@apple.com> On May 11, 2009, at 10:04 AM, John Mosby wrote: > Author: jdm > Date: Mon May 11 12:04:19 2009 > New Revision: 71438 > > URL: http://llvm.org/viewvc/llvm-project?rev=71438&view=rev > Log: > > Shrink wrapping in PEI: > - reduces _static_ callee saved register spills > and restores similar to Chow's original algorithm. > - iterative implementation with simple heuristic > limits to mitigate compile time impact. > - handles placing spills/restores for multi-entry, > multi-exit regions in the Machine CFG without > splitting edges. > - passes test-suite in LLCBETA mode. How John, I haven't looked in detail at this code, but would it be possible to split the shrink wrapping pieces of PEI out into a new ShrinkWrapping.cpp file? It doesn't need to be a separate pass, but it would just make it logically easier to understand. -Chris From stoklund at 2pi.dk Mon May 11 15:45:25 2009 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 11 May 2009 22:45:25 +0200 Subject: [llvm-commits] [PATCH] Machine code verifier pass In-Reply-To: <2BC4EDFE-5114-4D65-9976-825231B06394@apple.com> References: <04F74F5E-5BCA-4F65-8ED5-CAF353E31497@2pi.dk> <2BC4EDFE-5114-4D65-9976-825231B06394@apple.com> Message-ID: <8B5BCC45-2E12-4BC7-A0AF-3C6B9EA5CCBE@2pi.dk> On 11/05/2009, at 20.43, Evan Cheng wrote: > + const MachineBasicBlock *MBB; > + BBInfo *MBBInfo; > + const MachineInstr *MI; > + const MachineOperand *MO; > > I find it strange that these are class ivars. Can you change them to > local variables and parameters? They provide context information to the report() messages, but you are right, it is a bit weird. Functions declaring local variables of the same name doesn't help either. I'll change it. > +void > +MachineVerifier::calcMaxRegsPassed() > +{ > + // First push live-out regs to successors' vregsPassed. Remember > the MBBs that > + // have any vregsPassed. > + DenseSet todo; > + for (MachineFunction::const_iterator MFI = MF->begin(), MFE = MF- >> end(); > + MFI != MFE; ++MFI) { > + const MachineBasicBlock &MBB(*MFI); > + BBInfo &MInfo = MBBInfoMap[&MBB]; > + for (MachineBasicBlock::const_succ_iterator SuI = > MBB.succ_begin(), > + SuE = MBB.succ_end(); SuI != SuE; ++SuI) { > + BBInfo &SInfo = MBBInfoMap[*SuI]; > + if (SInfo.addPassed(MInfo.regsLiveOut)) > + todo.insert(*SuI); > + } > + } > + > + // Iteratively push vregsPassed to successors until convergence. > + while (!todo.empty()) { > > I don't think the order of iteration of DenseSet is deterministic. That is true, but it shouldn't matter. The algorithm will converge to the same final state regardless of the iteration order. > + // If any regs removed, we need to recheck successors > > Missing a period at the end of the sentence. Fixed. > Have you had a chance running this through some code? Yes, I am using it with all my Blackfin test cases. I have also tried enabling it permanently when running the CodeGen test suite. CodeGen/ARM reveals that the verifier does not handle PHI instructions properly. I will have to rework this! I also get lots of these errors: *** Bad machine code: Illegal physical register for instruction *** - function: f1 - basic block: ID#0 - instruction: %SP = tADDspi %SP, 1 - operand 0: %SP SP is not a tGPR register. This is not a real error - the thumb back-end rewrites these instructions at a later stage, I think. CodeGen/Alpha gets complaints about %R27 being undefined: *** Bad machine code: Using an undefined physical register *** - function: l12_l94_bc_divide_endif_2E_3_2E_ce - basic block: ID#0 - instruction: %R29 = LDAHg , %R27, 1, %R28 - operand 2: %R27 CodeGen/CellSPU has trouble with live intervals: %R3 = LRr32 %R127 LQDr128 %R127, 32, %R1 *** Bad machine code: Using an undefined physical register *** - function: main - basic block: ID#0 - instruction: LQDr128 %R127, 32, %R1 - operand 0: %R127 CodeGen/IA64: # Machine code for _ZSt11lower_boundIPKmmET_S2_S2_RKT0_(): Live Ins: r32 Live Outs: r8 entry: 0x182d6b8, LLVM BB @0x1001f90, ID#0: ALLOC %r3, 0, 0, 0, 0 %r3 = PSEUDO_ALLOC %r8 = ADDL_GA %r1, %r8 = LD8 %r8 %AR_PFS = MOV %r3 RET %r8 # End machine code for _ZSt11lower_boundIPKmmET_S2_S2_RKT0_(). *** Bad machine code: Using an undefined physical register *** - function: _ZSt11lower_boundIPKmmET_S2_S2_RKT0_ - basic block: ID#0 - instruction: ALLOC %r3, 0, 0, 0, 0 - operand 0: %r3 CodeGen/Mips: Live Ins: %GP NOREORDER CPLOAD %T9 *** Bad machine code: Using an undefined physical register *** - function: bar - basic block: ID#0 - instruction: CPLOAD %T9 - operand 0: %T9 I think %T9 should be reserved in PIC mode. Evan, thanks for reviewing. I will implement your suggestions, and I will also need do deal with PHI nodes and EH landing pads properly. Then I'll submit a new patch. /jakob From clattner at apple.com Mon May 11 15:53:17 2009 From: clattner at apple.com (Chris Lattner) Date: Mon, 11 May 2009 13:53:17 -0700 Subject: [llvm-commits] [llvm] r71410 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp In-Reply-To: <200905102314.n4ANEdP9010260@zion.cs.uiuc.edu> References: <200905102314.n4ANEdP9010260@zion.cs.uiuc.edu> Message-ID: <99CEAE6F-A380-404D-9081-1BA1D8CB74F3@apple.com> On May 10, 2009, at 4:14 PM, Bill Wendling wrote: > This doesn't take care of all of the problems with debug info for > inlined > functions, but it's a step in the right direction. For one thing, > llvm-gcc > generates wrong IR (it's missing some llvm.dbg intrinsics at the > point where the > function's inlined) for this example: > > #include > static __inline__ __attribute__((always_inline)) int bar(int x) > { return 4; } > void foo() { > long long b = 1; > int Y = bar(4); > printf("%d\n", Y); > } The body for "bar" is gone by the time llvm_asm_file_end is called: I think the tree inliner is still being used??? -Chris From evan.cheng at apple.com Mon May 11 15:53:53 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 11 May 2009 20:53:53 -0000 Subject: [llvm-commits] [llvm] r71472 - /llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Message-ID: <200905112053.n4BKrrJm003679@zion.cs.uiuc.edu> Author: evancheng Date: Mon May 11 15:53:52 2009 New Revision: 71472 URL: http://llvm.org/viewvc/llvm-project?rev=71472&view=rev Log: Apply patch review feedback. Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=71472&r1=71471&r2=71472&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Mon May 11 15:53:52 2009 @@ -1685,10 +1685,12 @@ } #ifndef NDEBUG if (HasFastExitPath) { +#endif if (ShrinkWrapDebugging >= BasicInfo) DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) << "->" << exitPath << "\n"; break; +#ifndef NDEBUG } #endif } From isanbard at gmail.com Mon May 11 15:54:37 2009 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 11 May 2009 13:54:37 -0700 Subject: [llvm-commits] [llvm] r71410 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp In-Reply-To: <99CEAE6F-A380-404D-9081-1BA1D8CB74F3@apple.com> References: <200905102314.n4ANEdP9010260@zion.cs.uiuc.edu> <99CEAE6F-A380-404D-9081-1BA1D8CB74F3@apple.com> Message-ID: <16e5fdf90905111354w7943aa5fp44d8539b9d91d8d@mail.gmail.com> On Mon, May 11, 2009 at 1:53 PM, Chris Lattner wrote: > > On May 10, 2009, at 4:14 PM, Bill Wendling wrote: > >> This doesn't take care of all of the problems with debug info for >> inlined >> functions, but it's a step in the right direction. For one thing, >> llvm-gcc >> generates wrong IR (it's missing some llvm.dbg intrinsics at the >> point where the >> function's inlined) for this example: >> >> #include >> static __inline__ __attribute__((always_inline)) ?int bar(int x) >> { return 4; } >> void foo() { >> ?long long b = 1; >> ?int Y = bar(4); >> ?printf("%d\n", Y); >> } > > The body for "bar" is gone by the time llvm_asm_file_end is called: I > think the tree inliner is still being used??? > Pain! >.< Duncan, I think you're the expert in this area. Do you have an idea about this? :-) -bw From kremenek at apple.com Mon May 11 16:08:59 2009 From: kremenek at apple.com (Ted Kremenek) Date: Mon, 11 May 2009 21:08:59 -0000 Subject: [llvm-commits] [llvm] r71475 - /llvm/tags/checker/checker-0.202/ Message-ID: <200905112108.n4BL8xbm004353@zion.cs.uiuc.edu> Author: kremenek Date: Mon May 11 16:08:59 2009 New Revision: 71475 URL: http://llvm.org/viewvc/llvm-project?rev=71475&view=rev Log: Tagging checker-0.202. Added: llvm/tags/checker/checker-0.202/ - copied from r71474, llvm/trunk/ From dalej at apple.com Mon May 11 16:54:13 2009 From: dalej at apple.com (Dale Johannesen) Date: Mon, 11 May 2009 21:54:13 -0000 Subject: [llvm-commits] [llvm] r71478 - in /llvm/trunk: lib/CodeGen/BranchFolding.cpp test/CodeGen/X86/2009-05-11-tailmerge-crash.ll Message-ID: <200905112154.n4BLsDvD005974@zion.cs.uiuc.edu> Author: johannes Date: Mon May 11 16:54:13 2009 New Revision: 71478 URL: http://llvm.org/viewvc/llvm-project?rev=71478&view=rev Log: Fix PR4188. TailMerging can't tolerate inexact sucessor info. Added: llvm/trunk/test/CodeGen/X86/2009-05-11-tailmerge-crash.ll Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchFolding.cpp?rev=71478&r1=71477&r2=71478&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/BranchFolding.cpp (original) +++ llvm/trunk/lib/CodeGen/BranchFolding.cpp Mon May 11 16:54:13 2009 @@ -1092,6 +1092,21 @@ } else { DidChange = true; PMBB->ReplaceUsesOfBlockWith(MBB, CurTBB); + // If this change resulted in PMBB ending in a conditional + // branch where both conditions go to the same destination, + // change this to an unconditional branch (and fix the CFG). + MachineBasicBlock *NewCurTBB = 0, *NewCurFBB = 0; + SmallVector NewCurCond; + bool NewCurUnAnalyzable = TII->AnalyzeBranch(*PMBB, NewCurTBB, + NewCurFBB, NewCurCond, true); + if (!NewCurUnAnalyzable && NewCurTBB && NewCurTBB == NewCurFBB) { + TII->RemoveBranch(*PMBB); + NewCurCond.clear(); + TII->InsertBranch(*PMBB, NewCurTBB, 0, NewCurCond); + MadeChange = true; + ++NumBranchOpts; + PMBB->CorrectExtraCFGEdges(NewCurTBB, NewCurFBB, false); + } } } Added: llvm/trunk/test/CodeGen/X86/2009-05-11-tailmerge-crash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-05-11-tailmerge-crash.ll?rev=71478&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-05-11-tailmerge-crash.ll (added) +++ llvm/trunk/test/CodeGen/X86/2009-05-11-tailmerge-crash.ll Mon May 11 16:54:13 2009 @@ -0,0 +1,23 @@ +; RUN: llvm-as < %s | llc -march=x86 +; PR4188 +; ModuleID = '' +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" +target triple = "i386-apple-darwin9.6" + at g_9 = external global i32 ; [#uses=1] + +define i32 @int86(i32 %p_87) nounwind { +entry: + %0 = trunc i32 %p_87 to i8 ; [#uses=1] + %1 = icmp ne i8 %0, 0 ; [#uses=1] + br label %bb + +bb: ; preds = %bb.i, %bb, %entry + %2 = volatile load i32* @g_9, align 4 ; [#uses=2] + %3 = icmp sgt i32 %2, 1 ; [#uses=1] + %4 = and i1 %3, %1 ; [#uses=1] + br i1 %4, label %bb.i, label %bb + +bb.i: ; preds = %bb + %5 = icmp sgt i32 0, %2 ; [#uses=0] + br label %bb +} From mrs at apple.com Mon May 11 16:58:02 2009 From: mrs at apple.com (Mike Stump) Date: Mon, 11 May 2009 21:58:02 -0000 Subject: [llvm-commits] [llvm] r71479 - /llvm/trunk/include/llvm/Support/Dwarf.h Message-ID: <200905112158.n4BLw21K006134@zion.cs.uiuc.edu> Author: mrs Date: Mon May 11 16:58:01 2009 New Revision: 71479 URL: http://llvm.org/viewvc/llvm-project?rev=71479&view=rev Log: Add DW_AT_APPLE_isa and DW_AT_APPLE_block. Radar 6867696 Modified: llvm/trunk/include/llvm/Support/Dwarf.h Modified: llvm/trunk/include/llvm/Support/Dwarf.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Dwarf.h?rev=71479&r1=71478&r2=71479&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/Dwarf.h (original) +++ llvm/trunk/include/llvm/Support/Dwarf.h Mon May 11 16:58:01 2009 @@ -225,6 +225,8 @@ // Apple extensions. DW_AT_APPLE_optimized = 0x3fe1, DW_AT_APPLE_flags = 0x3fe2, + DW_AT_APPLE_isa = 0x3fe3, + DW_AT_APPLE_block = 0x3fe4, DW_AT_APPLE_major_runtime_vers = 0x3fe5, DW_AT_APPLE_runtime_class = 0x3fe6, From evan at fallingsnow.net Mon May 11 17:06:42 2009 From: evan at fallingsnow.net (Evan Phoenix) Date: Mon, 11 May 2009 15:06:42 -0700 Subject: [llvm-commits] [PATCH] Generate info about the JIT process Message-ID: This patch, worked on with nlewycky and jyasskin, allows the JIT ExecutionEngine to report details about the generate machine code. By introducing a new class that the JIT can fill in details about, it's easy to add future details without having to change the API again. Right now, just the address and the size of the machine code are reported. This has proved very useful for me, as I'm able to now feed these details to udis86 when I want to see the generated machine code. Thanks for the consideration. The patch is also available at: http://github.com/evanphx/llvm-patches/blob/master/jit-info.diff -------------- next part -------------- A non-text attachment was scrubbed... Name: jit-info.diff Type: application/octet-stream Size: 6500 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090511/841fe01b/attachment.obj -------------- next part -------------- From evan.cheng at apple.com Mon May 11 17:33:02 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 11 May 2009 22:33:02 -0000 Subject: [llvm-commits] [llvm] r71485 - in /llvm/trunk: lib/Transforms/Scalar/LoopStrengthReduce.cpp test/CodeGen/X86/lsr-loop-exit-cond.ll test/CodeGen/X86/lsr-negative-stride.ll test/CodeGen/X86/remat-mov-1.ll test/CodeGen/X86/remat-mov0.ll Message-ID: <200905112233.n4BMX2Vk007333@zion.cs.uiuc.edu> Author: evancheng Date: Mon May 11 17:33:01 2009 New Revision: 71485 URL: http://llvm.org/viewvc/llvm-project?rev=71485&view=rev Log: Teach LSR to optimize more loop exit compares, i.e. change them to use postinc iv value. Previously LSR would only optimize those which are in the loop latch block. However, if LSR can prove it is safe (and profitable), it's now possible to change those not in the latch blocks to use postinc values. Also, if the compare is the only use, LSR would place the iv increment instruction before the compare instead in the latch. Added: llvm/trunk/test/CodeGen/X86/lsr-loop-exit-cond.ll llvm/trunk/test/CodeGen/X86/remat-mov-1.ll - copied, changed from r71444, llvm/trunk/test/CodeGen/X86/remat-mov0.ll Removed: llvm/trunk/test/CodeGen/X86/remat-mov0.ll Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp llvm/trunk/test/CodeGen/X86/lsr-negative-stride.ll Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=71485&r1=71484&r2=71485&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon May 11 17:33:01 2009 @@ -43,6 +43,7 @@ STATISTIC(NumEliminated, "Number of strides eliminated"); STATISTIC(NumShadow, "Number of Shadow IVs optimized"); STATISTIC(NumImmSunk, "Number of common expr immediates sunk into uses"); +STATISTIC(NumLoopCond, "Number of loop terminating conds optimized"); static cl::opt EnableFullLSRMode("enable-full-lsr", cl::init(false), @@ -122,6 +123,10 @@ /// particular stride. std::map IVsByStride; + /// StrideNoReuse - Keep track of all the strides whose ivs cannot be + /// reused (nor should they be rewritten to reuse other strides). + SmallSet StrideNoReuse; + /// StrideOrder - An ordering of the keys in IVUsesByStride that is stable: /// We use this to iterate over the IVUsesByStride collection without being /// dependent on random ordering of pointers in the process. @@ -184,8 +189,8 @@ SCEVHandle CheckForIVReuse(bool, bool, bool, const SCEVHandle&, IVExpr&, const Type*, const std::vector& UsersToProcess); - bool ValidStride(bool, int64_t, - const std::vector& UsersToProcess); + bool ValidScale(bool, int64_t, + const std::vector& UsersToProcess); SCEVHandle CollectIVUsers(const SCEVHandle &Stride, IVUsersOfOneStride &Uses, Loop *L, @@ -213,6 +218,7 @@ SCEVHandle Stride, SCEVHandle CommonExprs, Value *CommonBaseV, + Instruction *IVIncInsertPt, const Loop *L, SCEVExpander &PreheaderRewriter); void StrengthReduceStridedIVUsers(const SCEVHandle &Stride, @@ -799,7 +805,7 @@ /// MoveLoopVariantsToImmediateField - Move any subexpressions from Val that are /// loop varying to the Imm operand. static void MoveLoopVariantsToImmediateField(SCEVHandle &Val, SCEVHandle &Imm, - Loop *L, ScalarEvolution *SE) { + Loop *L, ScalarEvolution *SE) { if (Val->isLoopInvariant(L)) return; // Nothing to do. if (const SCEVAddExpr *SAE = dyn_cast(Val)) { @@ -1122,16 +1128,15 @@ return Result; } -/// ValidStride - Check whether the given Scale is valid for all loads and +/// ValidScale - Check whether the given Scale is valid for all loads and /// stores in UsersToProcess. /// -bool LoopStrengthReduce::ValidStride(bool HasBaseReg, - int64_t Scale, +bool LoopStrengthReduce::ValidScale(bool HasBaseReg, int64_t Scale, const std::vector& UsersToProcess) { if (!TLI) return true; - for (unsigned i=0, e = UsersToProcess.size(); i!=e; ++i) { + for (unsigned i = 0, e = UsersToProcess.size(); i!=e; ++i) { // If this is a load or other access, pass the type of the access in. const Type *AccessTy = Type::VoidTy; if (isAddressUse(UsersToProcess[i].Inst, @@ -1186,13 +1191,17 @@ const SCEVHandle &Stride, IVExpr &IV, const Type *Ty, const std::vector& UsersToProcess) { + if (StrideNoReuse.count(Stride)) + return SE->getIntegerSCEV(0, Stride->getType()); + if (const SCEVConstant *SC = dyn_cast(Stride)) { int64_t SInt = SC->getValue()->getSExtValue(); for (unsigned NewStride = 0, e = StrideOrder.size(); NewStride != e; ++NewStride) { std::map::iterator SI = IVsByStride.find(StrideOrder[NewStride]); - if (SI == IVsByStride.end() || !isa(SI->first)) + if (SI == IVsByStride.end() || !isa(SI->first) || + StrideNoReuse.count(SI->first)) continue; int64_t SSInt = cast(SI->first)->getValue()->getSExtValue(); if (SI->first != Stride && @@ -1206,7 +1215,7 @@ // multiplications. if (Scale == 1 || (AllUsesAreAddresses && - ValidStride(HasBaseReg, Scale, UsersToProcess))) + ValidScale(HasBaseReg, Scale, UsersToProcess))) for (std::vector::iterator II = SI->second.IVs.begin(), IE = SI->second.IVs.end(); II != IE; ++II) // FIXME: Only handle base == 0 for now. @@ -1302,7 +1311,7 @@ // field of the use, so that we don't try to use something before it is // computed. MoveLoopVariantsToImmediateField(UsersToProcess.back().Base, - UsersToProcess.back().Imm, L, SE); + UsersToProcess.back().Imm, L, SE); assert(UsersToProcess.back().Base->isLoopInvariant(L) && "Base value is not loop invariant!"); } @@ -1452,6 +1461,7 @@ /// Return the created phi node. /// static PHINode *InsertAffinePhi(SCEVHandle Start, SCEVHandle Step, + Instruction *IVIncInsertPt, const Loop *L, SCEVExpander &Rewriter) { assert(Start->isLoopInvariant(L) && "New PHI start is not loop invariant!"); @@ -1475,16 +1485,17 @@ IncAmount = Rewriter.SE.getNegativeSCEV(Step); // Insert an add instruction right before the terminator corresponding - // to the back-edge. + // to the back-edge or just before the only use. The location is determined + // by the caller and passed in as IVIncInsertPt. Value *StepV = Rewriter.expandCodeFor(IncAmount, Ty, Preheader->getTerminator()); Instruction *IncV; if (isNegative) { IncV = BinaryOperator::CreateSub(PN, StepV, "lsr.iv.next", - LatchBlock->getTerminator()); + IVIncInsertPt); } else { IncV = BinaryOperator::CreateAdd(PN, StepV, "lsr.iv.next", - LatchBlock->getTerminator()); + IVIncInsertPt); } if (!isa(StepV)) ++NumVariable; @@ -1541,6 +1552,7 @@ // Rewrite the UsersToProcess records, creating a separate PHI for each // unique Base value. + Instruction *IVIncInsertPt = L->getLoopLatch()->getTerminator(); for (unsigned i = 0, e = UsersToProcess.size(); i != e; ) { // TODO: The uses are grouped by base, but not sorted. We arbitrarily // pick the first Imm value here to start with, and adjust it for the @@ -1548,7 +1560,7 @@ SCEVHandle Imm = UsersToProcess[i].Imm; SCEVHandle Base = UsersToProcess[i].Base; SCEVHandle Start = SE->getAddExpr(CommonExprs, Base, Imm); - PHINode *Phi = InsertAffinePhi(Start, Stride, L, + PHINode *Phi = InsertAffinePhi(Start, Stride, IVIncInsertPt, L, PreheaderRewriter); // Loop over all the users with the same base. do { @@ -1561,6 +1573,18 @@ } } +/// FindIVIncInsertPt - Return the location to insert the increment instruction. +/// If the only use if a use of postinc value, (must be the loop termination +/// condition), then insert it just before the use. +static Instruction *FindIVIncInsertPt(std::vector &UsersToProcess, + const Loop *L) { + if (UsersToProcess.size() == 1 && + UsersToProcess[0].isUseOfPostIncrementedValue && + L->contains(UsersToProcess[0].Inst->getParent())) + return UsersToProcess[0].Inst; + return L->getLoopLatch()->getTerminator(); +} + /// PrepareToStrengthReduceWithNewPhi - Insert a new induction variable for the /// given users to share. /// @@ -1570,12 +1594,13 @@ SCEVHandle Stride, SCEVHandle CommonExprs, Value *CommonBaseV, + Instruction *IVIncInsertPt, const Loop *L, SCEVExpander &PreheaderRewriter) { DOUT << " Inserting new PHI:\n"; PHINode *Phi = InsertAffinePhi(SE->getUnknown(CommonBaseV), - Stride, L, + Stride, IVIncInsertPt, L, PreheaderRewriter); // Remember this in case a later stride is multiple of this. @@ -1590,8 +1615,8 @@ DOUT << "\n"; } -/// PrepareToStrengthReduceWithNewPhi - Prepare for the given users to reuse -/// an induction variable with a stride that is a factor of the current +/// PrepareToStrengthReduceFromSmallerStride - Prepare for the given users to +/// reuse an induction variable with a stride that is a factor of the current /// induction variable. /// void @@ -1727,6 +1752,7 @@ BasicBlock *Preheader = L->getLoopPreheader(); Instruction *PreInsertPt = Preheader->getTerminator(); BasicBlock *LatchBlock = L->getLoopLatch(); + Instruction *IVIncInsertPt = LatchBlock->getTerminator(); Value *CommonBaseV = Constant::getNullValue(ReplacedTy); @@ -1755,13 +1781,15 @@ AllUsesAreOutsideLoop, Stride, ReuseIV, ReplacedTy, UsersToProcess); - if (isa(RewriteFactor) && - cast(RewriteFactor)->isZero()) - PrepareToStrengthReduceWithNewPhi(UsersToProcess, Stride, CommonExprs, - CommonBaseV, L, PreheaderRewriter); - else + if (!RewriteFactor->isZero()) PrepareToStrengthReduceFromSmallerStride(UsersToProcess, CommonBaseV, ReuseIV, PreInsertPt); + else { + IVIncInsertPt = FindIVIncInsertPt(UsersToProcess, L); + PrepareToStrengthReduceWithNewPhi(UsersToProcess, Stride, CommonExprs, + CommonBaseV, IVIncInsertPt, + L, PreheaderRewriter); + } } // Process all the users now, replacing their strided uses with @@ -1800,7 +1828,12 @@ // FIXME: Use emitted users to emit other users. BasedUser &User = UsersToProcess.back(); - DOUT << " Examining use "; + DOUT << " Examining "; + if (User.isUseOfPostIncrementedValue) + DOUT << "postinc"; + else + DOUT << "preinc"; + DOUT << " use "; DEBUG(WriteAsOperand(*DOUT, UsersToProcess.back().OperandValToReplace, /*PrintType=*/false)); DOUT << " in Inst: " << *(User.Inst); @@ -1810,11 +1843,12 @@ Value *RewriteOp = User.Phi; if (User.isUseOfPostIncrementedValue) { RewriteOp = User.Phi->getIncomingValueForBlock(LatchBlock); - // If this user is in the loop, make sure it is the last thing in the - // loop to ensure it is dominated by the increment. - if (L->contains(User.Inst->getParent())) - User.Inst->moveBefore(LatchBlock->getTerminator()); + // loop to ensure it is dominated by the increment. In case it's the + // only use of the iv, the increment instruction is already before the + // use. + if (L->contains(User.Inst->getParent()) && User.Inst != IVIncInsertPt) + User.Inst->moveBefore(IVIncInsertPt); } SCEVHandle RewriteExpr = SE->getUnknown(RewriteOp); @@ -2085,7 +2119,7 @@ // if it's likely the new stride uses will be rewritten using the // stride of the compare instruction. if (AllUsesAreAddresses && - ValidStride(!CommonExprs->isZero(), Scale, UsersToProcess)) + ValidScale(!CommonExprs->isZero(), Scale, UsersToProcess)) continue; // If scale is negative, use swapped predicate unless it's testing @@ -2304,8 +2338,8 @@ if (!DestTy) continue; if (TLI) { - /* If target does not support DestTy natively then do not apply - this transformation. */ + // If target does not support DestTy natively then do not apply + // this transformation. MVT DVT = TLI->getValueType(DestTy); if (!TLI->isTypeLegal(DVT)) continue; } @@ -2380,8 +2414,6 @@ // TODO: implement optzns here. OptimizeShadowIV(L); - - OptimizeLoopTermCond(L); } /// OptimizeLoopTermCond - Change loop terminating condition to use the @@ -2391,23 +2423,78 @@ // can, we want to change it to use a post-incremented version of its // induction variable, to allow coalescing the live ranges for the IV into // one register value. - PHINode *SomePHI = cast(L->getHeader()->begin()); - BasicBlock *Preheader = L->getLoopPreheader(); - BasicBlock *LatchBlock = - SomePHI->getIncomingBlock(SomePHI->getIncomingBlock(0) == Preheader); - BranchInst *TermBr = dyn_cast(LatchBlock->getTerminator()); - if (!TermBr || TermBr->isUnconditional() || - !isa(TermBr->getCondition())) + BasicBlock *LatchBlock = L->getLoopLatch(); + BasicBlock *ExitBlock = L->getExitingBlock(); + if (!ExitBlock) + // Multiple exits, just look at the exit in the latch block if there is one. + ExitBlock = LatchBlock; + BranchInst *TermBr = dyn_cast(ExitBlock->getTerminator()); + if (!TermBr) + return; + if (TermBr->isUnconditional() || !isa(TermBr->getCondition())) return; - ICmpInst *Cond = cast(TermBr->getCondition()); // Search IVUsesByStride to find Cond's IVUse if there is one. IVStrideUse *CondUse = 0; const SCEVHandle *CondStride = 0; - + ICmpInst *Cond = cast(TermBr->getCondition()); if (!FindIVUserForCond(Cond, CondUse, CondStride)) return; // setcc doesn't use the IV. + if (ExitBlock != LatchBlock) { + if (!Cond->hasOneUse()) + // See below, we don't want the condition to be cloned. + return; + + // If exiting block is the latch block, we know it's safe and profitable to + // transform the icmp to use post-inc iv. Otherwise do so only if it would + // not reuse another iv and its iv would be reused by other uses. We are + // optimizing for the case where the icmp is the only use of the iv. + IVUsersOfOneStride &StrideUses = IVUsesByStride[*CondStride]; + for (unsigned i = 0, e = StrideUses.Users.size(); i != e; ++i) { + if (StrideUses.Users[i].User == Cond) + continue; + if (!StrideUses.Users[i].isUseOfPostIncrementedValue) + return; + } + + // FIXME: This is expensive, and worse still ChangeCompareStride does a + // similar check. Can we perform all the icmp related transformations after + // StrengthReduceStridedIVUsers? + if (const SCEVConstant *SC = dyn_cast(*CondStride)) { + int64_t SInt = SC->getValue()->getSExtValue(); + for (unsigned NewStride = 0, ee = StrideOrder.size(); NewStride != ee; + ++NewStride) { + std::map::iterator SI = + IVUsesByStride.find(StrideOrder[NewStride]); + if (!isa(SI->first) || SI->first == *CondStride) + continue; + int64_t SSInt = + cast(SI->first)->getValue()->getSExtValue(); + if (SSInt == SInt) + return; // This can definitely be reused. + if (unsigned(abs(SSInt)) < SInt || (SSInt % SInt) != 0) + continue; + int64_t Scale = SSInt / SInt; + bool AllUsesAreAddresses = true; + bool AllUsesAreOutsideLoop = true; + std::vector UsersToProcess; + SCEVHandle CommonExprs = CollectIVUsers(SI->first, SI->second, L, + AllUsesAreAddresses, + AllUsesAreOutsideLoop, + UsersToProcess); + // Avoid rewriting the compare instruction with an iv of new stride + // if it's likely the new stride uses will be rewritten using the + // stride of the compare instruction. + if (AllUsesAreAddresses && + ValidScale(!CommonExprs->isZero(), Scale, UsersToProcess)) + return; + } + } + + StrideNoReuse.insert(*CondStride); + } + // If the trip count is computed in terms of an smax (due to ScalarEvolution // being unable to find a sufficient guard, for example), change the loop // comparison to use SLT instead of NE. @@ -2415,7 +2502,8 @@ // If possible, change stride and operands of the compare instruction to // eliminate one stride. - Cond = ChangeCompareStride(L, Cond, CondUse, CondStride); + if (ExitBlock == LatchBlock) + Cond = ChangeCompareStride(L, Cond, CondUse, CondStride); // It's possible for the setcc instruction to be anywhere in the loop, and // possible for it to have multiple users. If it is not immediately before @@ -2431,7 +2519,7 @@ // Clone the IVUse, as the old use still exists! IVUsesByStride[*CondStride].addUser(CondUse->Offset, Cond, - CondUse->OperandValToReplace); + CondUse->OperandValToReplace); CondUse = &IVUsesByStride[*CondStride].Users.back(); } } @@ -2442,6 +2530,8 @@ CondUse->Offset = SE->getMinusSCEV(CondUse->Offset, *CondStride); CondUse->isUseOfPostIncrementedValue = true; Changed = true; + + ++NumLoopCond; } // OptimizeLoopCountIV - If, after all sharing of IVs, the IV used for deciding @@ -2582,6 +2672,11 @@ // computation of some other indvar to decide when to terminate the loop. OptimizeIndvars(L); + // Change loop terminating condition to use the postinc iv when possible + // and optimize loop terminating compare. FIXME: Move this after + // StrengthReduceStridedIVUsers? + OptimizeLoopTermCond(L); + // FIXME: We can shrink overlarge IV's here. e.g. if the code has // computation in i64 values and the target doesn't support i64, demote // the computation to 32-bit if safe. @@ -2616,6 +2711,7 @@ IVUsesByStride.clear(); IVsByStride.clear(); StrideOrder.clear(); + StrideNoReuse.clear(); // Clean up after ourselves if (!DeadInsts.empty()) Added: llvm/trunk/test/CodeGen/X86/lsr-loop-exit-cond.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lsr-loop-exit-cond.ll?rev=71485&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/lsr-loop-exit-cond.ll (added) +++ llvm/trunk/test/CodeGen/X86/lsr-loop-exit-cond.ll Mon May 11 17:33:01 2009 @@ -0,0 +1,134 @@ +; RUN: llvm-as < %s | llc -march=x86-64 | %prcontext decq 1 | grep jne + + at Te0 = external global [256 x i32] ; <[256 x i32]*> [#uses=5] + at Te1 = external global [256 x i32] ; <[256 x i32]*> [#uses=4] + at Te3 = external global [256 x i32] ; <[256 x i32]*> [#uses=2] + +define void @t(i8* nocapture %in, i8* nocapture %out, i32* nocapture %rk, i32 %r) nounwind ssp { +entry: + %0 = load i32* %rk, align 4 ; [#uses=1] + %1 = getelementptr i32* %rk, i64 1 ; [#uses=1] + %2 = load i32* %1, align 4 ; [#uses=1] + %tmp15 = add i32 %r, -1 ; [#uses=1] + %tmp.16 = zext i32 %tmp15 to i64 ; [#uses=2] + br label %bb + +bb: ; preds = %bb1, %entry + %indvar = phi i64 [ 0, %entry ], [ %indvar.next, %bb1 ] ; [#uses=3] + %s1.0 = phi i32 [ %2, %entry ], [ %56, %bb1 ] ; [#uses=2] + %s0.0 = phi i32 [ %0, %entry ], [ %43, %bb1 ] ; [#uses=2] + %tmp18 = shl i64 %indvar, 4 ; [#uses=4] + %rk26 = bitcast i32* %rk to i8* ; [#uses=6] + %3 = lshr i32 %s0.0, 24 ; [#uses=1] + %4 = zext i32 %3 to i64 ; [#uses=1] + %5 = getelementptr [256 x i32]* @Te0, i64 0, i64 %4 ; [#uses=1] + %6 = load i32* %5, align 4 ; [#uses=1] + %7 = lshr i32 %s1.0, 16 ; [#uses=1] + %8 = and i32 %7, 255 ; [#uses=1] + %9 = zext i32 %8 to i64 ; [#uses=1] + %10 = getelementptr [256 x i32]* @Te1, i64 0, i64 %9 ; [#uses=1] + %11 = load i32* %10, align 4 ; [#uses=1] + %ctg2.sum2728 = or i64 %tmp18, 8 ; [#uses=1] + %12 = getelementptr i8* %rk26, i64 %ctg2.sum2728 ; [#uses=1] + %13 = bitcast i8* %12 to i32* ; [#uses=1] + %14 = load i32* %13, align 4 ; [#uses=1] + %15 = xor i32 %11, %6 ; [#uses=1] + %16 = xor i32 %15, %14 ; [#uses=3] + %17 = lshr i32 %s1.0, 24 ; [#uses=1] + %18 = zext i32 %17 to i64 ; [#uses=1] + %19 = getelementptr [256 x i32]* @Te0, i64 0, i64 %18 ; [#uses=1] + %20 = load i32* %19, align 4 ; [#uses=1] + %21 = and i32 %s0.0, 255 ; [#uses=1] + %22 = zext i32 %21 to i64 ; [#uses=1] + %23 = getelementptr [256 x i32]* @Te3, i64 0, i64 %22 ; [#uses=1] + %24 = load i32* %23, align 4 ; [#uses=1] + %ctg2.sum2930 = or i64 %tmp18, 12 ; [#uses=1] + %25 = getelementptr i8* %rk26, i64 %ctg2.sum2930 ; [#uses=1] + %26 = bitcast i8* %25 to i32* ; [#uses=1] + %27 = load i32* %26, align 4 ; [#uses=1] + %28 = xor i32 %24, %20 ; [#uses=1] + %29 = xor i32 %28, %27 ; [#uses=4] + %30 = lshr i32 %16, 24 ; [#uses=1] + %31 = zext i32 %30 to i64 ; [#uses=1] + %32 = getelementptr [256 x i32]* @Te0, i64 0, i64 %31 ; [#uses=1] + %33 = load i32* %32, align 4 ; [#uses=2] + %exitcond = icmp eq i64 %indvar, %tmp.16 ; [#uses=1] + br i1 %exitcond, label %bb2, label %bb1 + +bb1: ; preds = %bb + %ctg2.sum31 = add i64 %tmp18, 16 ; [#uses=1] + %34 = getelementptr i8* %rk26, i64 %ctg2.sum31 ; [#uses=1] + %35 = bitcast i8* %34 to i32* ; [#uses=1] + %36 = lshr i32 %29, 16 ; [#uses=1] + %37 = and i32 %36, 255 ; [#uses=1] + %38 = zext i32 %37 to i64 ; [#uses=1] + %39 = getelementptr [256 x i32]* @Te1, i64 0, i64 %38 ; [#uses=1] + %40 = load i32* %39, align 4 ; [#uses=1] + %41 = load i32* %35, align 4 ; [#uses=1] + %42 = xor i32 %40, %33 ; [#uses=1] + %43 = xor i32 %42, %41 ; [#uses=1] + %44 = lshr i32 %29, 24 ; [#uses=1] + %45 = zext i32 %44 to i64 ; [#uses=1] + %46 = getelementptr [256 x i32]* @Te0, i64 0, i64 %45 ; [#uses=1] + %47 = load i32* %46, align 4 ; [#uses=1] + %48 = and i32 %16, 255 ; [#uses=1] + %49 = zext i32 %48 to i64 ; [#uses=1] + %50 = getelementptr [256 x i32]* @Te3, i64 0, i64 %49 ; [#uses=1] + %51 = load i32* %50, align 4 ; [#uses=1] + %ctg2.sum32 = add i64 %tmp18, 20 ; [#uses=1] + %52 = getelementptr i8* %rk26, i64 %ctg2.sum32 ; [#uses=1] + %53 = bitcast i8* %52 to i32* ; [#uses=1] + %54 = load i32* %53, align 4 ; [#uses=1] + %55 = xor i32 %51, %47 ; [#uses=1] + %56 = xor i32 %55, %54 ; [#uses=1] + %indvar.next = add i64 %indvar, 1 ; [#uses=1] + br label %bb + +bb2: ; preds = %bb + %tmp10 = shl i64 %tmp.16, 4 ; [#uses=2] + %ctg2.sum = add i64 %tmp10, 16 ; [#uses=1] + %tmp1213 = getelementptr i8* %rk26, i64 %ctg2.sum ; [#uses=1] + %57 = bitcast i8* %tmp1213 to i32* ; [#uses=1] + %58 = and i32 %33, -16777216 ; [#uses=1] + %59 = lshr i32 %29, 16 ; [#uses=1] + %60 = and i32 %59, 255 ; [#uses=1] + %61 = zext i32 %60 to i64 ; [#uses=1] + %62 = getelementptr [256 x i32]* @Te1, i64 0, i64 %61 ; [#uses=1] + %63 = load i32* %62, align 4 ; [#uses=1] + %64 = and i32 %63, 16711680 ; [#uses=1] + %65 = or i32 %64, %58 ; [#uses=1] + %66 = load i32* %57, align 4 ; [#uses=1] + %67 = xor i32 %65, %66 ; [#uses=2] + %68 = lshr i32 %29, 8 ; [#uses=1] + %69 = zext i32 %68 to i64 ; [#uses=1] + %70 = getelementptr [256 x i32]* @Te0, i64 0, i64 %69 ; [#uses=1] + %71 = load i32* %70, align 4 ; [#uses=1] + %72 = and i32 %71, -16777216 ; [#uses=1] + %73 = and i32 %16, 255 ; [#uses=1] + %74 = zext i32 %73 to i64 ; [#uses=1] + %75 = getelementptr [256 x i32]* @Te1, i64 0, i64 %74 ; [#uses=1] + %76 = load i32* %75, align 4 ; [#uses=1] + %77 = and i32 %76, 16711680 ; [#uses=1] + %78 = or i32 %77, %72 ; [#uses=1] + %ctg2.sum25 = add i64 %tmp10, 20 ; [#uses=1] + %79 = getelementptr i8* %rk26, i64 %ctg2.sum25 ; [#uses=1] + %80 = bitcast i8* %79 to i32* ; [#uses=1] + %81 = load i32* %80, align 4 ; [#uses=1] + %82 = xor i32 %78, %81 ; [#uses=2] + %83 = lshr i32 %67, 24 ; [#uses=1] + %84 = trunc i32 %83 to i8 ; [#uses=1] + store i8 %84, i8* %out, align 1 + %85 = lshr i32 %67, 16 ; [#uses=1] + %86 = trunc i32 %85 to i8 ; [#uses=1] + %87 = getelementptr i8* %out, i64 1 ; [#uses=1] + store i8 %86, i8* %87, align 1 + %88 = getelementptr i8* %out, i64 4 ; [#uses=1] + %89 = lshr i32 %82, 24 ; [#uses=1] + %90 = trunc i32 %89 to i8 ; [#uses=1] + store i8 %90, i8* %88, align 1 + %91 = lshr i32 %82, 16 ; [#uses=1] + %92 = trunc i32 %91 to i8 ; [#uses=1] + %93 = getelementptr i8* %out, i64 5 ; [#uses=1] + store i8 %92, i8* %93, align 1 + ret void +} Modified: llvm/trunk/test/CodeGen/X86/lsr-negative-stride.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lsr-negative-stride.ll?rev=71485&r1=71484&r2=71485&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/lsr-negative-stride.ll (original) +++ llvm/trunk/test/CodeGen/X86/lsr-negative-stride.ll Mon May 11 17:33:01 2009 @@ -16,7 +16,7 @@ ;} -define i32 @t(i32 %a, i32 %b) { +define i32 @t(i32 %a, i32 %b) nounwind { entry: %tmp1434 = icmp eq i32 %a, %b ; [#uses=1] br i1 %tmp1434, label %bb17, label %bb.outer Copied: llvm/trunk/test/CodeGen/X86/remat-mov-1.ll (from r71444, llvm/trunk/test/CodeGen/X86/remat-mov0.ll) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/remat-mov-1.ll?p2=llvm/trunk/test/CodeGen/X86/remat-mov-1.ll&p1=llvm/trunk/test/CodeGen/X86/remat-mov0.ll&r1=71444&r2=71485&rev=71485&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/remat-mov0.ll (original) +++ llvm/trunk/test/CodeGen/X86/remat-mov-1.ll Mon May 11 17:33:01 2009 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=x86 | grep xor | count 2 +; RUN: llvm-as < %s | llc -march=x86 | grep 4294967295 | grep mov | count 2 %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.ImgT = type { i8, i8*, i8*, %struct.FILE*, i32, i32, i32, i32, i8*, double*, float*, float*, float*, i32*, double, double, i32*, double*, i32*, i32* } Removed: llvm/trunk/test/CodeGen/X86/remat-mov0.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/remat-mov0.ll?rev=71484&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/remat-mov0.ll (original) +++ llvm/trunk/test/CodeGen/X86/remat-mov0.ll (removed) @@ -1,40 +0,0 @@ -; RUN: llvm-as < %s | llc -march=x86 | grep xor | count 2 - - %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.ImgT = type { i8, i8*, i8*, %struct.FILE*, i32, i32, i32, i32, i8*, double*, float*, float*, float*, i32*, double, double, i32*, double*, i32*, i32* } - %struct._CompT = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, i8, %struct._PixT*, %struct._CompT*, i8, %struct._CompT* } - %struct._PixT = type { i32, i32, %struct._PixT* } - %struct.__sFILEX = type opaque - %struct.__sbuf = type { i8*, i32 } - -declare fastcc void @MergeComponents(%struct._CompT*, %struct._CompT*, %struct._CompT*, %struct._CompT**, %struct.ImgT*) nounwind - -define fastcc void @MergeToLeft(%struct._CompT* %comp, %struct._CompT** %head, %struct.ImgT* %img) nounwind { -entry: - br label %bb208 - -bb105: ; preds = %bb200 - br i1 false, label %bb197, label %bb149 - -bb149: ; preds = %bb105 - %tmp151 = getelementptr %struct._CompT* %comp, i32 0, i32 0 ; [#uses=1] - br label %bb193 - -bb193: ; preds = %bb184, %bb149 - %tmp196 = load i32* %tmp151, align 4 ; [#uses=1] - br label %bb197 - -bb197: ; preds = %bb193, %bb105 - %last_comp.0 = phi i32 [ %tmp196, %bb193 ], [ 0, %bb105 ] ; [#uses=0] - %indvar.next = add i32 %indvar, 1 ; [#uses=1] - br label %bb200 - -bb200: ; preds = %bb208, %bb197 - %indvar = phi i32 [ 0, %bb208 ], [ %indvar.next, %bb197 ] ; [#uses=2] - %xm.0 = sub i32 %indvar, 0 ; [#uses=1] - %tmp202 = icmp slt i32 %xm.0, 1 ; [#uses=1] - br i1 %tmp202, label %bb105, label %bb208 - -bb208: ; preds = %bb200, %entry - br label %bb200 -} From lhames at gmail.com Mon May 11 18:14:13 2009 From: lhames at gmail.com (Lang Hames) Date: Mon, 11 May 2009 23:14:13 -0000 Subject: [llvm-commits] [llvm] r71495 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Message-ID: <200905112314.n4BNED58008799@zion.cs.uiuc.edu> Author: lhames Date: Mon May 11 18:14:13 2009 New Revision: 71495 URL: http://llvm.org/viewvc/llvm-project?rev=71495&view=rev Log: Fixed PR4090. Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=71495&r1=71494&r2=71495&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original) +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Mon May 11 18:14:13 2009 @@ -608,14 +608,29 @@ // If copy kills the source register, find the last use and propagate // kill. + bool checkForDeadDef = false; MachineBasicBlock *MBB = CopyMI->getParent(); if (CopyMI->killsRegister(SrcInt.reg)) - TrimLiveIntervalToLastUse(CopyIdx, MBB, SrcInt, SrcLR); + if (!TrimLiveIntervalToLastUse(CopyIdx, MBB, SrcInt, SrcLR)) { + checkForDeadDef = true; + } MachineBasicBlock::iterator MII = next(MachineBasicBlock::iterator(CopyMI)); CopyMI->removeFromParent(); tii_->reMaterialize(*MBB, MII, DstReg, DefMI); MachineInstr *NewMI = prior(MII); + + if (checkForDeadDef) { + // PR4090 fix: Trim interval failed because there was no use of the + // source interval in this MBB. If the def is in this MBB too then we + // should mark it dead: + if (DefMI->getParent() == MBB) { + DefMI->addRegisterDead(SrcInt.reg, tri_); + SrcLR->end = SrcLR->start + 1; + } + + } + // CopyMI may have implicit operands, transfer them over to the newly // rematerialized instruction. And update implicit def interval valnos. for (unsigned i = CopyMI->getDesc().getNumOperands(), From kremenek at apple.com Mon May 11 18:29:58 2009 From: kremenek at apple.com (Ted Kremenek) Date: Mon, 11 May 2009 23:29:58 -0000 Subject: [llvm-commits] [llvm] r71505 - /llvm/tags/checker/checker-0.202/ Message-ID: <200905112329.n4BNTwm8009494@zion.cs.uiuc.edu> Author: kremenek Date: Mon May 11 18:29:57 2009 New Revision: 71505 URL: http://llvm.org/viewvc/llvm-project?rev=71505&view=rev Log: Removing checker-0.202. Removed: llvm/tags/checker/checker-0.202/ From kremenek at apple.com Mon May 11 18:30:18 2009 From: kremenek at apple.com (Ted Kremenek) Date: Mon, 11 May 2009 23:30:18 -0000 Subject: [llvm-commits] [llvm] r71507 - /llvm/tags/checker/checker-0.202/ Message-ID: <200905112330.n4BNUIao009532@zion.cs.uiuc.edu> Author: kremenek Date: Mon May 11 18:30:18 2009 New Revision: 71507 URL: http://llvm.org/viewvc/llvm-project?rev=71507&view=rev Log: Tagging checker-0.202. Added: llvm/tags/checker/checker-0.202/ - copied from r71506, llvm/trunk/ From isanbard at gmail.com Mon May 11 19:07:00 2009 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 12 May 2009 00:07:00 -0000 Subject: [llvm-commits] [llvm] r71519 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Message-ID: <200905120007.n4C0708I010848@zion.cs.uiuc.edu> Author: void Date: Mon May 11 19:06:59 2009 New Revision: 71519 URL: http://llvm.org/viewvc/llvm-project?rev=71519&view=rev Log: - Record that the debug info is actually used so that the label folder doesn't blast it away. - Move InlineInfo bookkeeping to bookkeep the correct debug info object. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=71519&r1=71518&r2=71519&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Mon May 11 19:06:59 2009 @@ -3619,15 +3619,6 @@ // could be more elegant. AddUInt(SPDie, DW_AT_inline, 0, DW_INL_declared_not_inlined); - // Track the start label for this inlined function. - DenseMap >::iterator - I = InlineInfo.find(GV); - - if (I == InlineInfo.end()) - InlineInfo[GV].push_back(LabelID); - else - I->second.push_back(LabelID); - AbstractInstanceRootMap[GV] = Scope; AbstractInstanceRootList.push_back(Scope); } @@ -3646,6 +3637,7 @@ ConcreteScope->setDie(ScopeDie); ConcreteScope->setStartLabelID(LabelID); + MMI->RecordUsedDbgLabel(LabelID); LexicalScopeStack.back()->AddConcreteInst(ConcreteScope); @@ -3658,6 +3650,15 @@ else SI->second.push_back(ConcreteScope); + // Track the start label for this inlined function. + DenseMap >::iterator + I = InlineInfo.find(GV); + + if (I == InlineInfo.end()) + InlineInfo[GV].push_back(LabelID); + else + I->second.push_back(LabelID); + if (TimePassesIsEnabled) DebugTimer->stopTimer(); @@ -3687,7 +3688,6 @@ assert(!Scopes.empty() && "We should have at least one debug scope!"); DbgConcreteScope *Scope = Scopes.back(); Scopes.pop_back(); unsigned ID = MMI->NextLabelID(); - MMI->RecordUsedDbgLabel(ID); Scope->setEndLabelID(ID); From evan.cheng at apple.com Mon May 11 19:07:35 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 12 May 2009 00:07:35 -0000 Subject: [llvm-commits] [llvm] r71520 - in /llvm/trunk/lib/Target/X86: X86CodeEmitter.cpp X86InstrInfo.cpp Message-ID: <200905120007.n4C07ZOF010874@zion.cs.uiuc.edu> Author: evancheng Date: Mon May 11 19:07:35 2009 New Revision: 71520 URL: http://llvm.org/viewvc/llvm-project?rev=71520&view=rev Log: Avoid unneeded SIB byte encoding. Patch by Zoltan Varga. Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=71520&r1=71519&r2=71520&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Mon May 11 19:07:35 2009 @@ -338,7 +338,8 @@ unsigned BaseReg = Base.getReg(); // Is a SIB byte needed? - if ((!Is64BitMode || DispForReloc) && IndexReg.getReg() == 0 && + if ((!Is64BitMode || DispForReloc || BaseReg != 0) && + IndexReg.getReg() == 0 && (BaseReg == 0 || getX86RegNum(BaseReg) != N86::ESP)) { if (BaseReg == 0) { // Just a displacement? // Emit special case [disp32] encoding Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=71520&r1=71519&r2=71520&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Mon May 11 19:07:35 2009 @@ -2811,7 +2811,8 @@ unsigned BaseReg = Base.getReg(); // Is a SIB byte needed? - if ((!Is64BitMode || DispForReloc) && IndexReg.getReg() == 0 && + if ((!Is64BitMode || DispForReloc || BaseReg != 0) && + IndexReg.getReg() == 0 && (BaseReg == 0 || X86RegisterInfo::getX86RegNum(BaseReg) != N86::ESP)) { if (BaseReg == 0) { // Just a displacement? // Emit special case [disp32] encoding From dalej at apple.com Mon May 11 19:18:58 2009 From: dalej at apple.com (Dale Johannesen) Date: Mon, 11 May 2009 17:18:58 -0700 Subject: [llvm-commits] [llvm] r71410 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp In-Reply-To: <99CEAE6F-A380-404D-9081-1BA1D8CB74F3@apple.com> References: <200905102314.n4ANEdP9010260@zion.cs.uiuc.edu> <99CEAE6F-A380-404D-9081-1BA1D8CB74F3@apple.com> Message-ID: <48386810-85B9-46D5-8CE6-13FC50D21FFE@apple.com> On May 11, 2009, at 1:53 PMPDT, Chris Lattner wrote: > > On May 10, 2009, at 4:14 PM, Bill Wendling wrote: > >> This doesn't take care of all of the problems with debug info for >> inlined >> functions, but it's a step in the right direction. For one thing, >> llvm-gcc >> generates wrong IR (it's missing some llvm.dbg intrinsics at the >> point where the >> function's inlined) for this example: >> >> #include >> static __inline__ __attribute__((always_inline)) int bar(int x) >> { return 4; } >> void foo() { >> long long b = 1; >> int Y = bar(4); >> printf("%d\n", Y); >> } > > The body for "bar" is gone by the time llvm_asm_file_end is called: I > think the tree inliner is still being used??? Yeah, looks like it's not disabled fully at -O0 (no-unit-at-a-time seems to be the relevant setting). A significantly different high- level code path, implemented by having if(flag_unit_at_a_time) all over the place in common code.... From evan.cheng at apple.com Mon May 11 20:07:28 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 11 May 2009 18:07:28 -0700 Subject: [llvm-commits] [PATCH] Machine code verifier pass In-Reply-To: <8B5BCC45-2E12-4BC7-A0AF-3C6B9EA5CCBE@2pi.dk> References: <04F74F5E-5BCA-4F65-8ED5-CAF353E31497@2pi.dk> <2BC4EDFE-5114-4D65-9976-825231B06394@apple.com> <8B5BCC45-2E12-4BC7-A0AF-3C6B9EA5CCBE@2pi.dk> Message-ID: <6AEB9D2A-D643-4AE4-9740-F51B5519099F@apple.com> On May 11, 2009, at 1:45 PM, Jakob Stoklund Olesen wrote: > > On 11/05/2009, at 20.43, Evan Cheng wrote: >> + const MachineBasicBlock *MBB; >> + BBInfo *MBBInfo; >> + const MachineInstr *MI; >> + const MachineOperand *MO; >> >> I find it strange that these are class ivars. Can you change them to >> local variables and parameters? > > They provide context information to the report() messages, but you are > right, it is a bit weird. Functions declaring local variables of the > same name doesn't help either. I'll change it. Thanks. > >> +void >> +MachineVerifier::calcMaxRegsPassed() >> +{ >> + // First push live-out regs to successors' vregsPassed. Remember >> the MBBs that >> + // have any vregsPassed. >> + DenseSet todo; >> + for (MachineFunction::const_iterator MFI = MF->begin(), MFE = MF- >>> end(); >> + MFI != MFE; ++MFI) { >> + const MachineBasicBlock &MBB(*MFI); >> + BBInfo &MInfo = MBBInfoMap[&MBB]; >> + for (MachineBasicBlock::const_succ_iterator SuI = >> MBB.succ_begin(), >> + SuE = MBB.succ_end(); SuI != SuE; ++SuI) { >> + BBInfo &SInfo = MBBInfoMap[*SuI]; >> + if (SInfo.addPassed(MInfo.regsLiveOut)) >> + todo.insert(*SuI); >> + } >> + } >> + >> + // Iteratively push vregsPassed to successors until convergence. >> + while (!todo.empty()) { >> >> I don't think the order of iteration of DenseSet is deterministic. > > That is true, but it shouldn't matter. The algorithm will converge to > the same final state regardless of the iteration order. Ok. > >> + // If any regs removed, we need to recheck successors >> >> Missing a period at the end of the sentence. > > Fixed. > >> Have you had a chance running this through some code? > > Yes, I am using it with all my Blackfin test cases. I have also tried > enabling it permanently when running the CodeGen test suite. > > CodeGen/ARM reveals that the verifier does not handle PHI instructions > properly. I will have to rework this! I also get lots of these errors: > > *** Bad machine code: Illegal physical register for instruction *** > - function: f1 > - basic block: ID#0 > - instruction: %SP = tADDspi %SP, 1 > - operand 0: %SP > SP is not a tGPR register. > > This is not a real error - the thumb back-end rewrites these > instructions at a later stage, I think. Hrm. I would think tADDspi should be changed to target GPR instead of tGPR since it's supposed to update SP. Jim, is there a reason why that's not the case? How about x86? :-) > > > > > Evan, thanks for reviewing. I will implement your suggestions, and I > will also need do deal with PHI nodes and EH landing pads properly. > Then I'll submit a new patch. Great. Thanks. Evan > > /jakob > > _______________________________________________ > 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 May 11 20:12:35 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 11 May 2009 18:12:35 -0700 Subject: [llvm-commits] [PATCH] Generate info about the JIT process In-Reply-To: References: Message-ID: <523A2DEE-03D2-4E41-BA52-EE709978DAE8@apple.com> Wow another Evan. :-) This looks fine but is it necessary? Can we just use MachineCodeEmitter to report these? Should it be under ExecutionEngine or CodeGen? Are you expecting to extend it to track more information? Evan On May 11, 2009, at 3:06 PM, Evan Phoenix wrote: > This patch, worked on with nlewycky and jyasskin, allows the JIT > ExecutionEngine to report details about the generate machine code. > > By introducing a new class that the JIT can fill in details about, > it's easy to add future details without having to change the API > again. > > Right now, just the address and the size of the machine code are > reported. This has proved very useful for me, as I'm able to now > feed these details to udis86 when I want to see the generated > machine code. > > Thanks for the consideration. > > The patch is also available at: http://github.com/evanphx/llvm-patches/blob/master/jit-info.diff > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From gohman at apple.com Mon May 11 20:23:18 2009 From: gohman at apple.com (Dan Gohman) Date: Tue, 12 May 2009 01:23:18 -0000 Subject: [llvm-commits] [llvm] r71532 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <200905120123.n4C1NI9j013278@zion.cs.uiuc.edu> Author: djg Date: Mon May 11 20:23:18 2009 New Revision: 71532 URL: http://llvm.org/viewvc/llvm-project?rev=71532&view=rev Log: Fix GetMinTrailingZeros for SCEVSignExtend and SCEVZeroExtendExpr to return the correct value when the cast operand is all zeros. This ought to be pretty rare, because it would mean that the regular SCEV folding routines missed a case, though there are cases they might legitimately miss. Also, it's unlikely anything currently using GetMinTrailingZeros cares about this case. 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=71532&r1=71531&r2=71532&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon May 11 20:23:18 2009 @@ -1984,13 +1984,13 @@ if (const SCEVZeroExtendExpr *E = dyn_cast(S)) { uint32_t OpRes = GetMinTrailingZeros(E->getOperand(), SE); return OpRes == SE.getTypeSizeInBits(E->getOperand()->getType()) ? - SE.getTypeSizeInBits(E->getOperand()->getType()) : OpRes; + SE.getTypeSizeInBits(E->getType()) : OpRes; } if (const SCEVSignExtendExpr *E = dyn_cast(S)) { uint32_t OpRes = GetMinTrailingZeros(E->getOperand(), SE); return OpRes == SE.getTypeSizeInBits(E->getOperand()->getType()) ? - SE.getTypeSizeInBits(E->getOperand()->getType()) : OpRes; + SE.getTypeSizeInBits(E->getType()) : OpRes; } if (const SCEVAddExpr *A = dyn_cast(S)) { From gohman at apple.com Mon May 11 20:27:58 2009 From: gohman at apple.com (Dan Gohman) Date: Tue, 12 May 2009 01:27:58 -0000 Subject: [llvm-commits] [llvm] r71533 - in /llvm/trunk: lib/Analysis/ScalarEvolution.cpp test/Transforms/IndVarSimplify/loop_evaluate_5.ll Message-ID: <200905120127.n4C1RwwY013405@zion.cs.uiuc.edu> Author: djg Date: Mon May 11 20:27:58 2009 New Revision: 71533 URL: http://llvm.org/viewvc/llvm-project?rev=71533&view=rev Log: When forgetting SCEVs for loop PHIs, don't forget SCEVUnknown values. These values aren't analyzable, so they don't care if more information about the loop trip count can be had. Also, SCEVUnknown is used for a PHI while the PHI itself is being analyzed, so it needs to be left in the Scalars map. This fixes a variety of subtle issues. Added: llvm/trunk/test/Transforms/IndVarSimplify/loop_evaluate_5.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=71533&r1=71532&r2=71533&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon May 11 20:27:58 2009 @@ -2309,10 +2309,20 @@ void ScalarEvolution::forgetLoopPHIs(const Loop *L) { BasicBlock *Header = L->getHeader(); + // Push all Loop-header PHIs onto the Worklist stack, except those + // that are presently represented via a SCEVUnknown. SCEVUnknown for + // a PHI either means that it has an unrecognized structure, or it's + // a PHI that's in the progress of being computed by createNodeForPHI. + // In the former case, additional loop trip count information isn't + // going to change anything. In the later case, createNodeForPHI will + // perform the necessary updates on its own when it gets to that point. SmallVector Worklist; for (BasicBlock::iterator I = Header->begin(); - PHINode *PN = dyn_cast(I); ++I) - Worklist.push_back(PN); + PHINode *PN = dyn_cast(I); ++I) { + std::map::iterator It = Scalars.find((Value*)I); + if (It != Scalars.end() && !isa(It->second)) + Worklist.push_back(PN); + } while (!Worklist.empty()) { Instruction *I = Worklist.pop_back_val(); Added: llvm/trunk/test/Transforms/IndVarSimplify/loop_evaluate_5.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/loop_evaluate_5.ll?rev=71533&view=auto ============================================================================== --- llvm/trunk/test/Transforms/IndVarSimplify/loop_evaluate_5.ll (added) +++ llvm/trunk/test/Transforms/IndVarSimplify/loop_evaluate_5.ll Mon May 11 20:27:58 2009 @@ -0,0 +1,32 @@ +; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep {120, %bb2.bb3_crit_edge} +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" +target triple = "i686-pc-linux-gnu" + +; Indvars should be able to compute an exit value for %tmp1. + +define i32 @testcase(i5 zeroext %k) nounwind readnone { +entry: + br i1 false, label %bb3, label %bb.nph + +bb.nph: ; preds = %entry + br label %bb + +bb: ; preds = %bb2, %bb.nph + %result2 = phi i32 [ %tmp1, %bb2 ], [ 0, %bb.nph ] ; [#uses=1] + %k_01 = phi i5 [ %indvar_next1, %bb2 ], [ 0, %bb.nph ] ; [#uses=2] + %tmp2 = zext i5 %k_01 to i32 ; [#uses=1] + %tmp1 = add i32 %tmp2, %result2 ; [#uses=2] + %indvar_next1 = add i5 %k_01, 1 ; [#uses=2] + br label %bb2 + +bb2: ; preds = %bb + %phitmp = icmp eq i5 %indvar_next1, -16 ; [#uses=1] + br i1 %phitmp, label %bb2.bb3_crit_edge, label %bb + +bb2.bb3_crit_edge: ; preds = %bb2 + br label %bb3 + +bb3: ; preds = %bb2.bb3_crit_edge, %entry + %result.lcssa = phi i32 [ %tmp1, %bb2.bb3_crit_edge ], [ 0, %entry ] ; [#uses=1] + ret i32 %result.lcssa +} From evan at fallingsnow.net Mon May 11 21:03:46 2009 From: evan at fallingsnow.net (Evan Phoenix) Date: Mon, 11 May 2009 19:03:46 -0700 Subject: [llvm-commits] [PATCH] Generate info about the JIT process Message-ID: <978B1AEF-4B6B-4BA1-A73F-6FEF5C95A12D@fallingsnow.net> > Wow another Evan. :-) Doin' my part to raise the quota! > This looks fine but is it necessary? Can we just use > MachineCodeEmitter to report these? Should it be under > ExecutionEngine or CodeGen? Are you expecting to extend it to track > more information? After talking with a number of people in #llvm, this was the solution we came up with. We couldn't come up with a solution for reporting the info from MachineCodeEmitter that didn't require restructuring things a lot, so this was the idea we came up with. One upside is that because it's isolated, we have the ability to easily extend it to track more information. One thing I eventually want to report is the Relocation information, so that the machine code can be manipulated outside of LLVMs control. I consider it to be a phase 1 of http://wiki.llvm.org/Provide_more_control_over_and_access_to_JIT%27s_output , which Jeffrey Yasskin and I have been discussing. So I guess my point is that I'm open to reporting this data a different way, but we haven't yet seen one that is as simple. :) Additionally, I'm happy to craft this patch externally, but I think it would make everyones life easier to get it into the repo, so that others can work on adding things to the API. > Evan Also Evan > From gohman at apple.com Mon May 11 21:17:15 2009 From: gohman at apple.com (Dan Gohman) Date: Tue, 12 May 2009 02:17:15 -0000 Subject: [llvm-commits] [llvm] r71535 - in /llvm/trunk: include/llvm/Analysis/ lib/Analysis/ lib/Target/ lib/Transforms/Scalar/ test/CodeGen/X86/ test/Transforms/IndVarSimplify/ test/Transforms/LoopStrengthReduce/ Message-ID: <200905120217.n4C2HFP0014960@zion.cs.uiuc.edu> Author: djg Date: Mon May 11 21:17:14 2009 New Revision: 71535 URL: http://llvm.org/viewvc/llvm-project?rev=71535&view=rev Log: Factor the code for collecting IV users out of LSR into an IVUsers class, and generalize it so that it can be used by IndVarSimplify. Implement the base IndVarSimplify transformation code using IVUsers. This removes TestOrigIVForWrap and associated code, as ScalarEvolution now has enough builtin overflow detection and folding logic to handle all the same cases, and more. Run "opt -iv-users -analyze -disable-output" on your favorite loop for an example of what IVUsers does. This lets IndVarSimplify eliminate IV casts and compute trip counts in more cases. Also, this happens to finally fix the remaining testcases in PR1301. Now that IndVarSimplify is being more aggressive, it occasionally runs into the problem where ScalarEvolutionExpander's code for avoiding duplicate expansions makes it difficult to ensure that all expanded instructions dominate all the instructions that will use them. As a temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function to fix up instructions inserted by SCEVExpander. Fortunately, this code is contained, and can be easily removed once a more comprehensive solution is available. Added: llvm/trunk/include/llvm/Analysis/IVUsers.h llvm/trunk/lib/Analysis/IVUsers.cpp llvm/trunk/test/Transforms/IndVarSimplify/ada-loops.ll llvm/trunk/test/Transforms/IndVarSimplify/iv-zext.ll llvm/trunk/test/Transforms/IndVarSimplify/loop_evaluate_6.ll Modified: llvm/trunk/lib/Target/README.txt llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp llvm/trunk/test/CodeGen/X86/iv-users-in-other-loops.ll llvm/trunk/test/CodeGen/X86/masked-iv-safe.ll llvm/trunk/test/CodeGen/X86/subreg-to-reg-5.ll llvm/trunk/test/Transforms/IndVarSimplify/2009-04-15-shorten-iv-vars-2.ll llvm/trunk/test/Transforms/LoopStrengthReduce/2009-04-28-no-reduce-mul.ll Added: llvm/trunk/include/llvm/Analysis/IVUsers.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/IVUsers.h?rev=71535&view=auto ============================================================================== --- llvm/trunk/include/llvm/Analysis/IVUsers.h (added) +++ llvm/trunk/include/llvm/Analysis/IVUsers.h Mon May 11 21:17:14 2009 @@ -0,0 +1,235 @@ +//===- llvm/Analysis/IVUsers.h - Induction Variable Users -------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements bookkeeping for "interesting" users of expressions +// computed from induction variables. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_ANALYSIS_IVUSERS_H +#define LLVM_ANALYSIS_IVUSERS_H + +#include "llvm/Analysis/LoopPass.h" +#include "llvm/Analysis/ScalarEvolution.h" +#include +#include + +namespace llvm { + +class DominatorTree; +class Instruction; +class Value; +class IVUsersOfOneStride; + +/// IVStrideUse - Keep track of one use of a strided induction variable, where +/// the stride is stored externally. The Offset member keeps track of the +/// offset from the IV, User is the actual user of the operand, and +/// 'OperandValToReplace' is the operand of the User that is the use. +class IVStrideUse : public CallbackVH, public ilist_node { +public: + IVStrideUse(IVUsersOfOneStride *parent, + const SCEVHandle &offset, + Instruction* U, Value *O, bool issigned) + : CallbackVH(U), Parent(parent), Offset(offset), + OperandValToReplace(O), IsSigned(issigned), + IsUseOfPostIncrementedValue(false) { + } + + /// getUser - Return the user instruction for this use. + Instruction *getUser() const { + return cast(getValPtr()); + } + + /// setUser - Assign a new user instruction for this use. + void setUser(Instruction *NewUser) { + setValPtr(NewUser); + } + + /// getParent - Return a pointer to the IVUsersOfOneStride that owns + /// this IVStrideUse. + IVUsersOfOneStride *getParent() const { return Parent; } + + /// getOffset - Return the offset to add to a theoeretical induction + /// variable that starts at zero and counts up by the stride to compute + /// the value for the use. This always has the same type as the stride, + /// which may need to be casted to match the type of the use. + SCEVHandle getOffset() const { return Offset; } + + /// setOffset - Assign a new offset to this use. + void setOffset(SCEVHandle Val) { + Offset = Val; + } + + /// getOperandValToReplace - Return the Value of the operand in the user + /// instruction that this IVStrideUse is representing. + Value *getOperandValToReplace() const { + return OperandValToReplace; + } + + /// setOperandValToReplace - Assign a new Value as the operand value + /// to replace. + void setOperandValToReplace(Value *Op) { + OperandValToReplace = Op; + } + + /// isSigned - The stride (and thus also the Offset) of this use may be in + /// a narrower type than the use itself (OperandValToReplace->getType()). + /// When this is the case, isSigned() indicates whether the IV expression + /// should be signed-extended instead of zero-extended to fit the type of + /// the use. + bool isSigned() const { return IsSigned; } + + /// isUseOfPostIncrementedValue - True if this should use the + /// post-incremented version of this IV, not the preincremented version. + /// This can only be set in special cases, such as the terminating setcc + /// instruction for a loop or uses dominated by the loop. + bool isUseOfPostIncrementedValue() const { + return IsUseOfPostIncrementedValue; + } + + /// setIsUseOfPostIncrmentedValue - set the flag that indicates whether + /// this is a post-increment use. + void setIsUseOfPostIncrementedValue(bool Val) { + IsUseOfPostIncrementedValue = Val; + } + +private: + /// Parent - a pointer to the IVUsersOfOneStride that owns this IVStrideUse. + IVUsersOfOneStride *Parent; + + /// Offset - The offset to add to the base induction expression. + SCEVHandle Offset; + + /// OperandValToReplace - The Value of the operand in the user instruction + /// that this IVStrideUse is representing. + WeakVH OperandValToReplace; + + /// IsSigned - Determines whether the replacement value is sign or + /// zero extended to the type of the use. + bool IsSigned; + + /// IsUseOfPostIncrementedValue - True if this should use the + /// post-incremented version of this IV, not the preincremented version. + bool IsUseOfPostIncrementedValue; + + /// Deleted - Implementation of CallbackVH virtual function to + /// recieve notification when the User is deleted. + virtual void deleted(); +}; + +template<> struct ilist_traits + : public ilist_default_traits { + // createSentinel is used to get hold of a node that marks the end of + // the list... + // The sentinel is relative to this instance, so we use a non-static + // method. + IVStrideUse *createSentinel() const { + // since i(p)lists always publicly derive from the corresponding + // traits, placing a data member in this class will augment i(p)list. + // But since the NodeTy is expected to publicly derive from + // ilist_node, there is a legal viable downcast from it + // to NodeTy. We use this trick to superpose i(p)list with a "ghostly" + // NodeTy, which becomes the sentinel. Dereferencing the sentinel is + // forbidden (save the ilist_node) so no one will ever notice + // the superposition. + return static_cast(&Sentinel); + } + static void destroySentinel(IVStrideUse*) {} + + IVStrideUse *provideInitialHead() const { return createSentinel(); } + IVStrideUse *ensureHead(IVStrideUse*) const { return createSentinel(); } + static void noteHead(IVStrideUse*, IVStrideUse*) {} + +private: + mutable ilist_node Sentinel; +}; + +/// IVUsersOfOneStride - This structure keeps track of all instructions that +/// have an operand that is based on the trip count multiplied by some stride. +struct IVUsersOfOneStride : public ilist_node { +private: + IVUsersOfOneStride(const IVUsersOfOneStride &I); // do not implement + void operator=(const IVUsersOfOneStride &I); // do not implement + +public: + IVUsersOfOneStride() : Stride(0) {} + + explicit IVUsersOfOneStride(const SCEV *stride) : Stride(stride) {} + + /// Stride - The stride for all the contained IVStrideUses. This is + /// a constant for affine strides. + const SCEV *Stride; + + /// Users - Keep track of all of the users of this stride as well as the + /// initial value and the operand that uses the IV. + ilist Users; + + void addUser(const SCEVHandle &Offset,Instruction *User, Value *Operand, + bool isSigned) { + Users.push_back(new IVStrideUse(this, Offset, User, Operand, isSigned)); + } +}; + +class IVUsers : public LoopPass { + friend class IVStrideUserVH; + Loop *L; + LoopInfo *LI; + DominatorTree *DT; + ScalarEvolution *SE; + SmallPtrSet Processed; + +public: + /// IVUses - A list of all tracked IV uses of induction variable expressions + /// we are interested in. + ilist IVUses; + + /// IVUsesByStride - A mapping from the strides in StrideOrder to the + /// uses in IVUses. + std::map IVUsesByStride; + + /// StrideOrder - An ordering of the keys in IVUsesByStride that is stable: + /// We use this to iterate over the IVUsesByStride collection without being + /// dependent on random ordering of pointers in the process. + SmallVector StrideOrder; + +private: + virtual void getAnalysisUsage(AnalysisUsage &AU) const; + + virtual bool runOnLoop(Loop *L, LPPassManager &LPM); + + virtual void releaseMemory(); + +public: + static char ID; // Pass ID, replacement for typeid + IVUsers(); + + /// AddUsersIfInteresting - Inspect the specified Instruction. If it is a + /// reducible SCEV, recursively add its users to the IVUsesByStride set and + /// return true. Otherwise, return false. + bool AddUsersIfInteresting(Instruction *I); + + /// getReplacementExpr - Return a SCEV expression which computes the + /// value of the OperandValToReplace of the given IVStrideUse. + SCEVHandle getReplacementExpr(const IVStrideUse &U) const; + + void print(raw_ostream &OS, const Module* = 0) const; + virtual void print(std::ostream &OS, const Module* = 0) const; + void print(std::ostream *OS, const Module* M = 0) const { + if (OS) print(*OS, M); + } + + /// dump - This method is used for debugging. + void dump() const; +}; + +Pass *createIVUsersPass(); + +} + +#endif Added: llvm/trunk/lib/Analysis/IVUsers.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IVUsers.cpp?rev=71535&view=auto ============================================================================== --- llvm/trunk/lib/Analysis/IVUsers.cpp (added) +++ llvm/trunk/lib/Analysis/IVUsers.cpp Mon May 11 21:17:14 2009 @@ -0,0 +1,391 @@ +//===- IVUsers.cpp - Induction Variable Users -------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements bookkeeping for "interesting" users of expressions +// computed from induction variables. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "iv-users" +#include "llvm/Analysis/IVUsers.h" +#include "llvm/Constants.h" +#include "llvm/Instructions.h" +#include "llvm/Type.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Analysis/Dominators.h" +#include "llvm/Analysis/LoopInfo.h" +#include "llvm/Analysis/LoopPass.h" +#include "llvm/Analysis/ScalarEvolutionExpressions.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" +#include +using namespace llvm; + +char IVUsers::ID = 0; +static RegisterPass +X("iv-users", "Induction Variable Users", false, true); + +Pass *llvm::createIVUsersPass() { + return new IVUsers(); +} + +/// containsAddRecFromDifferentLoop - Determine whether expression S involves a +/// subexpression that is an AddRec from a loop other than L. An outer loop +/// of L is OK, but not an inner loop nor a disjoint loop. +static bool containsAddRecFromDifferentLoop(SCEVHandle S, Loop *L) { + // This is very common, put it first. + if (isa(S)) + return false; + if (const SCEVCommutativeExpr *AE = dyn_cast(S)) { + for (unsigned int i=0; i< AE->getNumOperands(); i++) + if (containsAddRecFromDifferentLoop(AE->getOperand(i), L)) + return true; + return false; + } + if (const SCEVAddRecExpr *AE = dyn_cast(S)) { + if (const Loop *newLoop = AE->getLoop()) { + if (newLoop == L) + return false; + // if newLoop is an outer loop of L, this is OK. + if (!LoopInfoBase::isNotAlreadyContainedIn(L, newLoop)) + return false; + } + return true; + } + if (const SCEVUDivExpr *DE = dyn_cast(S)) + return containsAddRecFromDifferentLoop(DE->getLHS(), L) || + containsAddRecFromDifferentLoop(DE->getRHS(), L); +#if 0 + // SCEVSDivExpr has been backed out temporarily, but will be back; we'll + // need this when it is. + if (const SCEVSDivExpr *DE = dyn_cast(S)) + return containsAddRecFromDifferentLoop(DE->getLHS(), L) || + containsAddRecFromDifferentLoop(DE->getRHS(), L); +#endif + if (const SCEVCastExpr *CE = dyn_cast(S)) + return containsAddRecFromDifferentLoop(CE->getOperand(), L); + return false; +} + +/// getSCEVStartAndStride - Compute the start and stride of this expression, +/// returning false if the expression is not a start/stride pair, or true if it +/// is. The stride must be a loop invariant expression, but the start may be +/// a mix of loop invariant and loop variant expressions. The start cannot, +/// however, contain an AddRec from a different loop, unless that loop is an +/// outer loop of the current loop. +static bool getSCEVStartAndStride(const SCEVHandle &SH, Loop *L, Loop *UseLoop, + SCEVHandle &Start, SCEVHandle &Stride, + bool &isSigned, + ScalarEvolution *SE, DominatorTree *DT) { + SCEVHandle TheAddRec = Start; // Initialize to zero. + bool isSExt = false; + bool isZExt = false; + + // If the outer level is an AddExpr, the operands are all start values except + // for a nested AddRecExpr. + if (const SCEVAddExpr *AE = dyn_cast(SH)) { + for (unsigned i = 0, e = AE->getNumOperands(); i != e; ++i) + if (const SCEVAddRecExpr *AddRec = + dyn_cast(AE->getOperand(i))) { + if (AddRec->getLoop() == L) + TheAddRec = SE->getAddExpr(AddRec, TheAddRec); + else + return false; // Nested IV of some sort? + } else { + Start = SE->getAddExpr(Start, AE->getOperand(i)); + } + + } else if (const SCEVZeroExtendExpr *Z = dyn_cast(SH)) { + TheAddRec = Z->getOperand(); + isZExt = true; + } else if (const SCEVSignExtendExpr *S = dyn_cast(SH)) { + TheAddRec = S->getOperand(); + isSExt = true; + } else if (isa(SH)) { + TheAddRec = SH; + } else { + return false; // not analyzable. + } + + const SCEVAddRecExpr *AddRec = dyn_cast(TheAddRec); + if (!AddRec || AddRec->getLoop() != L) return false; + + // Use getSCEVAtScope to attempt to simplify other loops out of + // the picture. + SCEVHandle AddRecStart = AddRec->getStart(); + SCEVHandle BetterAddRecStart = SE->getSCEVAtScope(AddRecStart, UseLoop); + if (!isa(BetterAddRecStart)) + AddRecStart = BetterAddRecStart; + + // FIXME: If Start contains an SCEVAddRecExpr from a different loop, other + // than an outer loop of the current loop, reject it. LSR has no concept of + // operating on more than one loop at a time so don't confuse it with such + // expressions. + if (containsAddRecFromDifferentLoop(AddRecStart, L)) + return false; + + if (isSExt || isZExt) + Start = SE->getTruncateExpr(Start, AddRec->getType()); + + Start = SE->getAddExpr(Start, AddRecStart); + + if (!isa(AddRec->getStepRecurrence(*SE))) { + // If stride is an instruction, make sure it dominates the loop preheader. + // Otherwise we could end up with a use before def situation. + BasicBlock *Preheader = L->getLoopPreheader(); + if (!AddRec->getStepRecurrence(*SE)->dominates(Preheader, DT)) + return false; + + DOUT << "[" << L->getHeader()->getName() + << "] Variable stride: " << *AddRec << "\n"; + } + + Stride = AddRec->getStepRecurrence(*SE); + isSigned = isSExt; + return true; +} + +/// IVUseShouldUsePostIncValue - We have discovered a "User" of an IV expression +/// and now we need to decide whether the user should use the preinc or post-inc +/// value. If this user should use the post-inc version of the IV, return true. +/// +/// Choosing wrong here can break dominance properties (if we choose to use the +/// post-inc value when we cannot) or it can end up adding extra live-ranges to +/// the loop, resulting in reg-reg copies (if we use the pre-inc value when we +/// should use the post-inc value). +static bool IVUseShouldUsePostIncValue(Instruction *User, Instruction *IV, + Loop *L, LoopInfo *LI, DominatorTree *DT, + Pass *P) { + // If the user is in the loop, use the preinc value. + if (L->contains(User->getParent())) return false; + + BasicBlock *LatchBlock = L->getLoopLatch(); + + // Ok, the user is outside of the loop. If it is dominated by the latch + // block, use the post-inc value. + if (DT->dominates(LatchBlock, User->getParent())) + return true; + + // There is one case we have to be careful of: PHI nodes. These little guys + // can live in blocks that are not dominated by the latch block, but (since + // their uses occur in the predecessor block, not the block the PHI lives in) + // should still use the post-inc value. Check for this case now. + PHINode *PN = dyn_cast(User); + if (!PN) return false; // not a phi, not dominated by latch block. + + // Look at all of the uses of IV by the PHI node. If any use corresponds to + // a block that is not dominated by the latch block, give up and use the + // preincremented value. + unsigned NumUses = 0; + for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) + if (PN->getIncomingValue(i) == IV) { + ++NumUses; + if (!DT->dominates(LatchBlock, PN->getIncomingBlock(i))) + return false; + } + + // Okay, all uses of IV by PN are in predecessor blocks that really are + // dominated by the latch block. Use the post-incremented value. + return true; +} + +/// AddUsersIfInteresting - Inspect the specified instruction. If it is a +/// reducible SCEV, recursively add its users to the IVUsesByStride set and +/// return true. Otherwise, return false. +bool IVUsers::AddUsersIfInteresting(Instruction *I) { + if (!SE->isSCEVable(I->getType())) + return false; // Void and FP expressions cannot be reduced. + + // LSR is not APInt clean, do not touch integers bigger than 64-bits. + if (SE->getTypeSizeInBits(I->getType()) > 64) + return false; + + if (!Processed.insert(I)) + return true; // Instruction already handled. + + // Get the symbolic expression for this instruction. + SCEVHandle ISE = SE->getSCEV(I); + if (isa(ISE)) return false; + + // Get the start and stride for this expression. + Loop *UseLoop = LI->getLoopFor(I->getParent()); + SCEVHandle Start = SE->getIntegerSCEV(0, ISE->getType()); + SCEVHandle Stride = Start; + bool isSigned; + + if (!getSCEVStartAndStride(ISE, L, UseLoop, Start, Stride, isSigned, SE, DT)) + return false; // Non-reducible symbolic expression, bail out. + + SmallPtrSet UniqueUsers; + for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); + UI != E; ++UI) { + Instruction *User = cast(*UI); + if (!UniqueUsers.insert(User)) + continue; + + // Do not infinitely recurse on PHI nodes. + if (isa(User) && Processed.count(User)) + continue; + + // Descend recursively, but not into PHI nodes outside the current loop. + // It's important to see the entire expression outside the loop to get + // choices that depend on addressing mode use right, although we won't + // consider references ouside the loop in all cases. + // If User is already in Processed, we don't want to recurse into it again, + // but do want to record a second reference in the same instruction. + bool AddUserToIVUsers = false; + if (LI->getLoopFor(User->getParent()) != L) { + if (isa(User) || Processed.count(User) || + !AddUsersIfInteresting(User)) { + DOUT << "FOUND USER in other loop: " << *User + << " OF SCEV: " << *ISE << "\n"; + AddUserToIVUsers = true; + } + } else if (Processed.count(User) || + !AddUsersIfInteresting(User)) { + DOUT << "FOUND USER: " << *User + << " OF SCEV: " << *ISE << "\n"; + AddUserToIVUsers = true; + } + + if (AddUserToIVUsers) { + IVUsersOfOneStride *StrideUses = IVUsesByStride[Stride]; + if (!StrideUses) { // First occurrence of this stride? + StrideOrder.push_back(Stride); + StrideUses = new IVUsersOfOneStride(Stride); + IVUses.push_back(StrideUses); + IVUsesByStride[Stride] = StrideUses; + } + + // Okay, we found a user that we cannot reduce. Analyze the instruction + // and decide what to do with it. If we are a use inside of the loop, use + // the value before incrementation, otherwise use it after incrementation. + if (IVUseShouldUsePostIncValue(User, I, L, LI, DT, this)) { + // The value used will be incremented by the stride more than we are + // expecting, so subtract this off. + SCEVHandle NewStart = SE->getMinusSCEV(Start, Stride); + StrideUses->addUser(NewStart, User, I, isSigned); + StrideUses->Users.back().setIsUseOfPostIncrementedValue(true); + DOUT << " USING POSTINC SCEV, START=" << *NewStart<< "\n"; + } else { + StrideUses->addUser(Start, User, I, isSigned); + } + } + } + return true; +} + +IVUsers::IVUsers() + : LoopPass(&ID) { +} + +void IVUsers::getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired(); + AU.addRequired(); + AU.addRequired(); + AU.setPreservesAll(); +} + +bool IVUsers::runOnLoop(Loop *l, LPPassManager &LPM) { + + L = l; + LI = &getAnalysis(); + DT = &getAnalysis(); + SE = &getAnalysis(); + + // Find all uses of induction variables in this loop, and categorize + // them by stride. Start by finding all of the PHI nodes in the header for + // this loop. If they are induction variables, inspect their uses. + for (BasicBlock::iterator I = L->getHeader()->begin(); isa(I); ++I) + AddUsersIfInteresting(I); + + return false; +} + +/// getReplacementExpr - Return a SCEV expression which computes the +/// value of the OperandValToReplace of the given IVStrideUse. +SCEVHandle IVUsers::getReplacementExpr(const IVStrideUse &U) const { + const Type *UseTy = U.getOperandValToReplace()->getType(); + // Start with zero. + SCEVHandle RetVal = SE->getIntegerSCEV(0, U.getParent()->Stride->getType()); + // Create the basic add recurrence. + RetVal = SE->getAddRecExpr(RetVal, U.getParent()->Stride, L); + // Add the offset in a separate step, because it may be loop-variant. + RetVal = SE->getAddExpr(RetVal, U.getOffset()); + // For uses of post-incremented values, add an extra stride to compute + // the actual replacement value. + if (U.isUseOfPostIncrementedValue()) + RetVal = SE->getAddExpr(RetVal, U.getParent()->Stride); + // Evaluate the expression out of the loop, if possible. + if (!L->contains(U.getUser()->getParent())) { + SCEVHandle ExitVal = SE->getSCEVAtScope(RetVal, L->getParentLoop()); + if (!isa(ExitVal) && ExitVal->isLoopInvariant(L)) + RetVal = ExitVal; + } + // Promote the result to the type of the use. + if (SE->getTypeSizeInBits(RetVal->getType()) != + SE->getTypeSizeInBits(UseTy)) { + if (U.isSigned()) + RetVal = SE->getSignExtendExpr(RetVal, UseTy); + else + RetVal = SE->getZeroExtendExpr(RetVal, UseTy); + } + return RetVal; +} + +void IVUsers::print(raw_ostream &OS, const Module *M) const { + OS << "IV Users for loop "; + WriteAsOperand(OS, L->getHeader(), false); + if (SE->hasLoopInvariantBackedgeTakenCount(L)) { + OS << " with backedge-taken count " + << *SE->getBackedgeTakenCount(L); + } + OS << ":\n"; + + for (unsigned Stride = 0, e = StrideOrder.size(); Stride != e; ++Stride) { + std::map::const_iterator SI = + IVUsesByStride.find(StrideOrder[Stride]); + assert(SI != IVUsesByStride.end() && "Stride doesn't exist!"); + OS << " Stride " << *SI->first->getType() << " " << *SI->first << ":\n"; + + for (ilist::const_iterator UI = SI->second->Users.begin(), + E = SI->second->Users.end(); UI != E; ++UI) { + OS << " "; + WriteAsOperand(OS, UI->getOperandValToReplace(), false); + OS << " = "; + OS << *getReplacementExpr(*UI); + if (UI->isUseOfPostIncrementedValue()) + OS << " (post-inc)"; + OS << " in "; + UI->getUser()->print(OS); + } + } +} + +void IVUsers::print(std::ostream &o, const Module *M) const { + raw_os_ostream OS(o); + print(OS, M); +} + +void IVUsers::dump() const { + print(errs()); +} + +void IVUsers::releaseMemory() { + IVUsesByStride.clear(); + StrideOrder.clear(); + Processed.clear(); +} + +void IVStrideUse::deleted() { + // Remove this user from the list. + Parent->Users.erase(this); + // this now dangles! +} Modified: llvm/trunk/lib/Target/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=71535&r1=71534&r2=71535&view=diff ============================================================================== --- llvm/trunk/lib/Target/README.txt (original) +++ llvm/trunk/lib/Target/README.txt Mon May 11 21:17:14 2009 @@ -749,16 +749,6 @@ //===---------------------------------------------------------------------===// -We should be able to evaluate this loop: - -int test(int x_offs) { - while (x_offs > 4) - x_offs -= 4; - return x_offs; -} - -//===---------------------------------------------------------------------===// - Reassociate should turn things like: int factorial(int X) { Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=71535&r1=71534&r2=71535&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Mon May 11 21:17:14 2009 @@ -43,6 +43,8 @@ #include "llvm/Constants.h" #include "llvm/Instructions.h" #include "llvm/Type.h" +#include "llvm/Analysis/Dominators.h" +#include "llvm/Analysis/IVUsers.h" #include "llvm/Analysis/ScalarEvolutionExpander.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/LoopPass.h" @@ -51,11 +53,12 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Transforms/Utils/Local.h" +#include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Support/CommandLine.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/SetVector.h" -#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" using namespace llvm; STATISTIC(NumRemoved , "Number of aux indvars removed"); @@ -65,6 +68,7 @@ namespace { class VISIBILITY_HIDDEN IndVarSimplify : public LoopPass { + IVUsers *IU; LoopInfo *LI; ScalarEvolution *SE; bool Changed; @@ -76,12 +80,15 @@ virtual bool runOnLoop(Loop *L, LPPassManager &LPM); virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired(); AU.addRequired(); AU.addRequiredID(LCSSAID); AU.addRequiredID(LoopSimplifyID); AU.addRequired(); + AU.addRequired(); AU.addPreserved(); AU.addPreservedID(LoopSimplifyID); + AU.addPreserved(); AU.addPreservedID(LCSSAID); AU.setPreservesCFG(); } @@ -90,17 +97,21 @@ void RewriteNonIntegerIVs(Loop *L); - void LinearFunctionTestReplace(Loop *L, SCEVHandle BackedgeTakenCount, + ICmpInst *LinearFunctionTestReplace(Loop *L, SCEVHandle BackedgeTakenCount, Value *IndVar, BasicBlock *ExitingBlock, BranchInst *BI, SCEVExpander &Rewriter); void RewriteLoopExitValues(Loop *L, const SCEV *BackedgeTakenCount); - void DeleteTriviallyDeadInstructions(SmallPtrSet &Insts); + void RewriteIVExpressions(Loop *L, const Type *LargestType, + SCEVExpander &Rewriter); - void HandleFloatingPointIV(Loop *L, PHINode *PH, - SmallPtrSet &DeadInsts); + void SinkUnusedInvariants(Loop *L, SCEVExpander &Rewriter); + + void FixUsesBeforeDefs(Loop *L, SCEVExpander &Rewriter); + + void HandleFloatingPointIV(Loop *L, PHINode *PH); }; } @@ -112,31 +123,12 @@ return new IndVarSimplify(); } -/// DeleteTriviallyDeadInstructions - If any of the instructions is the -/// specified set are trivially dead, delete them and see if this makes any of -/// their operands subsequently dead. -void IndVarSimplify:: -DeleteTriviallyDeadInstructions(SmallPtrSet &Insts) { - while (!Insts.empty()) { - Instruction *I = *Insts.begin(); - Insts.erase(I); - if (isInstructionTriviallyDead(I)) { - for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) - if (Instruction *U = dyn_cast(I->getOperand(i))) - Insts.insert(U); - DOUT << "INDVARS: Deleting: " << *I; - I->eraseFromParent(); - Changed = true; - } - } -} - /// LinearFunctionTestReplace - This method rewrites the exit condition of the /// loop to be a canonical != comparison against the incremented loop induction /// variable. This pass is able to rewrite the exit tests of any loop where the /// SCEV analysis can determine a loop-invariant trip count of the loop, which /// is actually a much broader range than just linear tests. -void IndVarSimplify::LinearFunctionTestReplace(Loop *L, +ICmpInst *IndVarSimplify::LinearFunctionTestReplace(Loop *L, SCEVHandle BackedgeTakenCount, Value *IndVar, BasicBlock *ExitingBlock, @@ -196,10 +188,15 @@ << (Opcode == ICmpInst::ICMP_NE ? "!=" : "==") << "\n" << " RHS:\t" << *RHS << "\n"; - Value *Cond = new ICmpInst(Opcode, CmpIndVar, ExitCnt, "exitcond", BI); - BI->setCondition(Cond); + ICmpInst *Cond = new ICmpInst(Opcode, CmpIndVar, ExitCnt, "exitcond", BI); + + Instruction *OrigCond = cast(BI->getCondition()); + OrigCond->replaceAllUsesWith(Cond); + RecursivelyDeleteTriviallyDeadInstructions(OrigCond); + ++NumLFTR; Changed = true; + return Cond; } /// RewriteLoopExitValues - Check to see if this loop has a computable @@ -207,8 +204,16 @@ /// final value of any expressions that are recurrent in the loop, and /// substitute the exit values from the loop into any instructions outside of /// the loop that use the final values of the current expressions. +/// +/// This is mostly redundant with the regular IndVarSimplify activities that +/// happen later, except that it's more powerful in some cases, because it's +/// able to brute-force evaluate arbitrary instructions as long as they have +/// constant operands at the beginning of the loop. void IndVarSimplify::RewriteLoopExitValues(Loop *L, const SCEV *BackedgeTakenCount) { + // Verify the input to the pass in already in LCSSA form. + assert(L->isLCSSAForm()); + BasicBlock *Preheader = L->getLoopPreheader(); // Scan all of the instructions in the loop, looking at those that have @@ -226,9 +231,6 @@ BlockToInsertInto = Preheader; BasicBlock::iterator InsertPt = BlockToInsertInto->getFirstNonPHI(); - bool HasConstantItCount = isa(BackedgeTakenCount); - - SmallPtrSet InstructionsToDelete; std::map ExitValues; // Find all values that are computed inside the loop, but used outside of it. @@ -268,18 +270,11 @@ if (!L->contains(Inst->getParent())) continue; - // We require that this value either have a computable evolution or that - // the loop have a constant iteration count. In the case where the loop - // has a constant iteration count, we can sometimes force evaluation of - // the exit value through brute force. - SCEVHandle SH = SE->getSCEV(Inst); - if (!SH->hasComputableLoopEvolution(L) && !HasConstantItCount) - continue; // Cannot get exit evolution for the loop value. - // Okay, this instruction has a user outside of the current loop // and varies predictably *inside* the loop. Evaluate the value it // contains when the loop exits, if possible. - SCEVHandle ExitValue = SE->getSCEVAtScope(Inst, L->getParentLoop()); + SCEVHandle SH = SE->getSCEV(Inst); + SCEVHandle ExitValue = SE->getSCEVAtScope(SH, L->getParentLoop()); if (isa(ExitValue) || !ExitValue->isLoopInvariant(L)) continue; @@ -298,9 +293,8 @@ PN->setIncomingValue(i, ExitVal); - // If this instruction is dead now, schedule it to be removed. - if (Inst->use_empty()) - InstructionsToDelete.insert(Inst); + // If this instruction is dead now, delete it. + RecursivelyDeleteTriviallyDeadInstructions(Inst); // See if this is a single-entry LCSSA PHI node. If so, we can (and // have to) remove @@ -308,14 +302,12 @@ // in the loop, so we don't need an LCSSA phi node anymore. if (NumPreds == 1) { PN->replaceAllUsesWith(ExitVal); - PN->eraseFromParent(); + RecursivelyDeleteTriviallyDeadInstructions(PN); break; } } } } - - DeleteTriviallyDeadInstructions(InstructionsToDelete); } void IndVarSimplify::RewriteNonIntegerIVs(Loop *L) { @@ -325,266 +317,24 @@ // BasicBlock *Header = L->getHeader(); - SmallPtrSet DeadInsts; - for (BasicBlock::iterator I = Header->begin(); isa(I); ++I) { - PHINode *PN = cast(I); - HandleFloatingPointIV(L, PN, DeadInsts); - } + SmallVector PHIs; + for (BasicBlock::iterator I = Header->begin(); + PHINode *PN = dyn_cast(I); ++I) + PHIs.push_back(PN); + + for (unsigned i = 0, e = PHIs.size(); i != e; ++i) + if (PHINode *PN = dyn_cast_or_null(PHIs[i])) + HandleFloatingPointIV(L, PN); // If the loop previously had floating-point IV, ScalarEvolution // may not have been able to compute a trip count. Now that we've done some // re-writing, the trip count may be computable. if (Changed) SE->forgetLoopBackedgeTakenCount(L); - - if (!DeadInsts.empty()) - DeleteTriviallyDeadInstructions(DeadInsts); -} - -/// getEffectiveIndvarType - Determine the widest type that the -/// induction-variable PHINode Phi is cast to. -/// -static const Type *getEffectiveIndvarType(const PHINode *Phi, - const ScalarEvolution *SE) { - const Type *Ty = Phi->getType(); - - for (Value::use_const_iterator UI = Phi->use_begin(), UE = Phi->use_end(); - UI != UE; ++UI) { - const Type *CandidateType = NULL; - if (const ZExtInst *ZI = dyn_cast(UI)) - CandidateType = ZI->getDestTy(); - else if (const SExtInst *SI = dyn_cast(UI)) - CandidateType = SI->getDestTy(); - else if (const IntToPtrInst *IP = dyn_cast(UI)) - CandidateType = IP->getDestTy(); - else if (const PtrToIntInst *PI = dyn_cast(UI)) - CandidateType = PI->getDestTy(); - if (CandidateType && - SE->isSCEVable(CandidateType) && - SE->getTypeSizeInBits(CandidateType) > SE->getTypeSizeInBits(Ty)) - Ty = CandidateType; - } - - return Ty; -} - -/// TestOrigIVForWrap - Analyze the original induction variable that -/// controls the loop's iteration to determine whether it would ever -/// undergo signed or unsigned overflow. -/// -/// In addition to setting the NoSignedWrap and NoUnsignedWrap -/// variables to true when appropriate (they are not set to false here), -/// return the PHI for this induction variable. Also record the initial -/// and final values and the increment; these are not meaningful unless -/// either NoSignedWrap or NoUnsignedWrap is true, and are always meaningful -/// in that case, although the final value may be 0 indicating a nonconstant. -/// -/// TODO: This duplicates a fair amount of ScalarEvolution logic. -/// Perhaps this can be merged with -/// ScalarEvolution::getBackedgeTakenCount -/// and/or ScalarEvolution::get{Sign,Zero}ExtendExpr. -/// -static const PHINode *TestOrigIVForWrap(const Loop *L, - const BranchInst *BI, - const Instruction *OrigCond, - const ScalarEvolution &SE, - bool &NoSignedWrap, - bool &NoUnsignedWrap, - const ConstantInt* &InitialVal, - const ConstantInt* &IncrVal, - const ConstantInt* &LimitVal) { - // Verify that the loop is sane and find the exit condition. - const ICmpInst *Cmp = dyn_cast(OrigCond); - if (!Cmp) return 0; - - const Value *CmpLHS = Cmp->getOperand(0); - const Value *CmpRHS = Cmp->getOperand(1); - const BasicBlock *TrueBB = BI->getSuccessor(0); - const BasicBlock *FalseBB = BI->getSuccessor(1); - ICmpInst::Predicate Pred = Cmp->getPredicate(); - - // Canonicalize a constant to the RHS. - if (isa(CmpLHS)) { - Pred = ICmpInst::getSwappedPredicate(Pred); - std::swap(CmpLHS, CmpRHS); - } - // Canonicalize SLE to SLT. - if (Pred == ICmpInst::ICMP_SLE) - if (const ConstantInt *CI = dyn_cast(CmpRHS)) - if (!CI->getValue().isMaxSignedValue()) { - CmpRHS = ConstantInt::get(CI->getValue() + 1); - Pred = ICmpInst::ICMP_SLT; - } - // Canonicalize SGT to SGE. - if (Pred == ICmpInst::ICMP_SGT) - if (const ConstantInt *CI = dyn_cast(CmpRHS)) - if (!CI->getValue().isMaxSignedValue()) { - CmpRHS = ConstantInt::get(CI->getValue() + 1); - Pred = ICmpInst::ICMP_SGE; - } - // Canonicalize SGE to SLT. - if (Pred == ICmpInst::ICMP_SGE) { - std::swap(TrueBB, FalseBB); - Pred = ICmpInst::ICMP_SLT; - } - // Canonicalize ULE to ULT. - if (Pred == ICmpInst::ICMP_ULE) - if (const ConstantInt *CI = dyn_cast(CmpRHS)) - if (!CI->getValue().isMaxValue()) { - CmpRHS = ConstantInt::get(CI->getValue() + 1); - Pred = ICmpInst::ICMP_ULT; - } - // Canonicalize UGT to UGE. - if (Pred == ICmpInst::ICMP_UGT) - if (const ConstantInt *CI = dyn_cast(CmpRHS)) - if (!CI->getValue().isMaxValue()) { - CmpRHS = ConstantInt::get(CI->getValue() + 1); - Pred = ICmpInst::ICMP_UGE; - } - // Canonicalize UGE to ULT. - if (Pred == ICmpInst::ICMP_UGE) { - std::swap(TrueBB, FalseBB); - Pred = ICmpInst::ICMP_ULT; - } - // For now, analyze only LT loops for signed overflow. - if (Pred != ICmpInst::ICMP_SLT && Pred != ICmpInst::ICMP_ULT) - return 0; - - bool isSigned = Pred == ICmpInst::ICMP_SLT; - - // Get the increment instruction. Look past casts if we will - // be able to prove that the original induction variable doesn't - // undergo signed or unsigned overflow, respectively. - const Value *IncrInst = CmpLHS; - if (isSigned) { - if (const SExtInst *SI = dyn_cast(CmpLHS)) { - if (!isa(CmpRHS) || - !cast(CmpRHS)->getValue() - .isSignedIntN(SE.getTypeSizeInBits(IncrInst->getType()))) - return 0; - IncrInst = SI->getOperand(0); - } - } else { - if (const ZExtInst *ZI = dyn_cast(CmpLHS)) { - if (!isa(CmpRHS) || - !cast(CmpRHS)->getValue() - .isIntN(SE.getTypeSizeInBits(IncrInst->getType()))) - return 0; - IncrInst = ZI->getOperand(0); - } - } - - // For now, only analyze induction variables that have simple increments. - const BinaryOperator *IncrOp = dyn_cast(IncrInst); - if (!IncrOp || IncrOp->getOpcode() != Instruction::Add) - return 0; - IncrVal = dyn_cast(IncrOp->getOperand(1)); - if (!IncrVal) - return 0; - - // Make sure the PHI looks like a normal IV. - const PHINode *PN = dyn_cast(IncrOp->getOperand(0)); - if (!PN || PN->getNumIncomingValues() != 2) - return 0; - unsigned IncomingEdge = L->contains(PN->getIncomingBlock(0)); - unsigned BackEdge = !IncomingEdge; - if (!L->contains(PN->getIncomingBlock(BackEdge)) || - PN->getIncomingValue(BackEdge) != IncrOp) - return 0; - if (!L->contains(TrueBB)) - return 0; - - // For now, only analyze loops with a constant start value, so that - // we can easily determine if the start value is not a maximum value - // which would wrap on the first iteration. - InitialVal = dyn_cast(PN->getIncomingValue(IncomingEdge)); - if (!InitialVal) - return 0; - - // The upper limit need not be a constant; we'll check later. - LimitVal = dyn_cast(CmpRHS); - - // We detect the impossibility of wrapping in two cases, both of - // which require starting with a non-max value: - // - The IV counts up by one, and the loop iterates only while it remains - // less than a limiting value (any) in the same type. - // - The IV counts up by a positive increment other than 1, and the - // constant limiting value + the increment is less than the max value - // (computed as max-increment to avoid overflow) - if (isSigned && !InitialVal->getValue().isMaxSignedValue()) { - if (IncrVal->equalsInt(1)) - NoSignedWrap = true; // LimitVal need not be constant - else if (LimitVal) { - uint64_t numBits = LimitVal->getValue().getBitWidth(); - if (IncrVal->getValue().sgt(APInt::getNullValue(numBits)) && - (APInt::getSignedMaxValue(numBits) - IncrVal->getValue()) - .sgt(LimitVal->getValue())) - NoSignedWrap = true; - } - } else if (!isSigned && !InitialVal->getValue().isMaxValue()) { - if (IncrVal->equalsInt(1)) - NoUnsignedWrap = true; // LimitVal need not be constant - else if (LimitVal) { - uint64_t numBits = LimitVal->getValue().getBitWidth(); - if (IncrVal->getValue().ugt(APInt::getNullValue(numBits)) && - (APInt::getMaxValue(numBits) - IncrVal->getValue()) - .ugt(LimitVal->getValue())) - NoUnsignedWrap = true; - } - } - return PN; -} - -static Value *getSignExtendedTruncVar(const SCEVAddRecExpr *AR, - ScalarEvolution *SE, - const Type *LargestType, Loop *L, - const Type *myType, - SCEVExpander &Rewriter) { - SCEVHandle ExtendedStart = - SE->getSignExtendExpr(AR->getStart(), LargestType); - SCEVHandle ExtendedStep = - SE->getSignExtendExpr(AR->getStepRecurrence(*SE), LargestType); - SCEVHandle ExtendedAddRec = - SE->getAddRecExpr(ExtendedStart, ExtendedStep, L); - if (LargestType != myType) - ExtendedAddRec = SE->getTruncateExpr(ExtendedAddRec, myType); - return Rewriter.expandCodeFor(ExtendedAddRec, myType); -} - -static Value *getZeroExtendedTruncVar(const SCEVAddRecExpr *AR, - ScalarEvolution *SE, - const Type *LargestType, Loop *L, - const Type *myType, - SCEVExpander &Rewriter) { - SCEVHandle ExtendedStart = - SE->getZeroExtendExpr(AR->getStart(), LargestType); - SCEVHandle ExtendedStep = - SE->getZeroExtendExpr(AR->getStepRecurrence(*SE), LargestType); - SCEVHandle ExtendedAddRec = - SE->getAddRecExpr(ExtendedStart, ExtendedStep, L); - if (LargestType != myType) - ExtendedAddRec = SE->getTruncateExpr(ExtendedAddRec, myType); - return Rewriter.expandCodeFor(ExtendedAddRec, myType); -} - -/// allUsesAreSameTyped - See whether all Uses of I are instructions -/// with the same Opcode and the same type. -static bool allUsesAreSameTyped(unsigned int Opcode, Instruction *I) { - const Type* firstType = NULL; - for (Value::use_iterator UI = I->use_begin(), UE = I->use_end(); - UI != UE; ++UI) { - Instruction *II = dyn_cast(*UI); - if (!II || II->getOpcode() != Opcode) - return false; - if (!firstType) - firstType = II->getType(); - else if (firstType != II->getType()) - return false; - } - return true; } bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { + IU = &getAnalysis(); LI = &getAnalysis(); SE = &getAnalysis(); Changed = false; @@ -594,11 +344,8 @@ RewriteNonIntegerIVs(L); BasicBlock *Header = L->getHeader(); - BasicBlock *ExitingBlock = L->getExitingBlock(); - SmallPtrSet DeadInsts; - - // Verify the input to the pass in already in LCSSA form. - assert(L->isLCSSAForm()); + BasicBlock *ExitingBlock = L->getExitingBlock(); // may be null + SCEVHandle BackedgeTakenCount = SE->getBackedgeTakenCount(L); // Check to see if this loop has a computable loop-invariant execution count. // If so, this means that we can compute the final value of any expressions @@ -606,59 +353,45 @@ // loop into any instructions outside of the loop that use the final values of // the current expressions. // - SCEVHandle BackedgeTakenCount = SE->getBackedgeTakenCount(L); if (!isa(BackedgeTakenCount)) RewriteLoopExitValues(L, BackedgeTakenCount); - // Next, analyze all of the induction variables in the loop, canonicalizing - // auxillary induction variables. - std::vector > IndVars; - - for (BasicBlock::iterator I = Header->begin(); isa(I); ++I) { - PHINode *PN = cast(I); - if (SE->isSCEVable(PN->getType())) { - SCEVHandle SCEV = SE->getSCEV(PN); - // FIXME: It is an extremely bad idea to indvar substitute anything more - // complex than affine induction variables. Doing so will put expensive - // polynomial evaluations inside of the loop, and the str reduction pass - // currently can only reduce affine polynomials. For now just disable - // indvar subst on anything more complex than an affine addrec. - if (const SCEVAddRecExpr *AR = dyn_cast(SCEV)) - if (AR->getLoop() == L && AR->isAffine()) - IndVars.push_back(std::make_pair(PN, SCEV)); - } - } - - // Compute the type of the largest recurrence expression, and collect - // the set of the types of the other recurrence expressions. + // Compute the type of the largest recurrence expression, and decide whether + // a canonical induction variable should be inserted. const Type *LargestType = 0; - SmallSetVector SizesToInsert; + bool NeedCannIV = false; if (!isa(BackedgeTakenCount)) { LargestType = BackedgeTakenCount->getType(); LargestType = SE->getEffectiveSCEVType(LargestType); - SizesToInsert.insert(LargestType); - } - for (unsigned i = 0, e = IndVars.size(); i != e; ++i) { - const PHINode *PN = IndVars[i].first; - const Type *PNTy = PN->getType(); - PNTy = SE->getEffectiveSCEVType(PNTy); - SizesToInsert.insert(PNTy); - const Type *EffTy = getEffectiveIndvarType(PN, SE); - EffTy = SE->getEffectiveSCEVType(EffTy); - SizesToInsert.insert(EffTy); + // If we have a known trip count and a single exit block, we'll be + // rewriting the loop exit test condition below, which requires a + // canonical induction variable. + if (ExitingBlock) + NeedCannIV = true; + } + for (unsigned i = 0, e = IU->StrideOrder.size(); i != e; ++i) { + SCEVHandle Stride = IU->StrideOrder[i]; + const Type *Ty = SE->getEffectiveSCEVType(Stride->getType()); if (!LargestType || - SE->getTypeSizeInBits(EffTy) > + SE->getTypeSizeInBits(Ty) > SE->getTypeSizeInBits(LargestType)) - LargestType = EffTy; + LargestType = Ty; + + std::map::iterator SI = + IU->IVUsesByStride.find(IU->StrideOrder[i]); + assert(SI != IU->IVUsesByStride.end() && "Stride doesn't exist!"); + + if (!SI->second->Users.empty()) + NeedCannIV = true; } // Create a rewriter object which we'll use to transform the code with. SCEVExpander Rewriter(*SE, *LI); - // Now that we know the largest of of the induction variables in this loop, - // insert a canonical induction variable of the largest size. + // Now that we know the largest of of the induction variable expressions + // in this loop, insert a canonical induction variable of the largest size. Value *IndVar = 0; - if (!SizesToInsert.empty()) { + if (NeedCannIV) { IndVar = Rewriter.getOrInsertCanonicalInductionVariable(L,LargestType); ++NumInserted; Changed = true; @@ -667,229 +400,291 @@ // If we have a trip count expression, rewrite the loop's exit condition // using it. We can currently only handle loops with a single exit. - bool NoSignedWrap = false; - bool NoUnsignedWrap = false; - const ConstantInt* InitialVal, * IncrVal, * LimitVal; - const PHINode *OrigControllingPHI = 0; - if (!isa(BackedgeTakenCount) && ExitingBlock) + ICmpInst *NewICmp = 0; + if (!isa(BackedgeTakenCount) && ExitingBlock) { + assert(NeedCannIV && + "LinearFunctionTestReplace requires a canonical induction variable"); // Can't rewrite non-branch yet. - if (BranchInst *BI = dyn_cast(ExitingBlock->getTerminator())) { - if (Instruction *OrigCond = dyn_cast(BI->getCondition())) { - // Determine if the OrigIV will ever undergo overflow. - OrigControllingPHI = - TestOrigIVForWrap(L, BI, OrigCond, *SE, - NoSignedWrap, NoUnsignedWrap, - InitialVal, IncrVal, LimitVal); + if (BranchInst *BI = dyn_cast(ExitingBlock->getTerminator())) + NewICmp = LinearFunctionTestReplace(L, BackedgeTakenCount, IndVar, + ExitingBlock, BI, Rewriter); + } - // We'll be replacing the original condition, so it'll be dead. - DeadInsts.insert(OrigCond); - } + Rewriter.setInsertionPoint(Header->getFirstNonPHI()); - LinearFunctionTestReplace(L, BackedgeTakenCount, IndVar, - ExitingBlock, BI, Rewriter); - } + // Rewrite IV-derived expressions. + RewriteIVExpressions(L, LargestType, Rewriter); - // Now that we have a canonical induction variable, we can rewrite any - // recurrences in terms of the induction variable. Start with the auxillary - // induction variables, and recursively rewrite any of their uses. - BasicBlock::iterator InsertPt = Header->getFirstNonPHI(); - Rewriter.setInsertionPoint(InsertPt); - - // If there were induction variables of other sizes, cast the primary - // induction variable to the right size for them, avoiding the need for the - // code evaluation methods to insert induction variables of different sizes. - for (unsigned i = 0, e = SizesToInsert.size(); i != e; ++i) { - const Type *Ty = SizesToInsert[i]; - if (Ty != LargestType) { - Instruction *New = new TruncInst(IndVar, Ty, "indvar", InsertPt); - Rewriter.addInsertedValue(New, SE->getSCEV(New)); - DOUT << "INDVARS: Made trunc IV for type " << *Ty << ": " - << *New << "\n"; - } - } + // Loop-invariant instructions in the preheader that aren't used in the + // loop may be sunk below the loop to reduce register pressure. + SinkUnusedInvariants(L, Rewriter); - // Rewrite all induction variables in terms of the canonical induction - // variable. - while (!IndVars.empty()) { - PHINode *PN = IndVars.back().first; - const SCEVAddRecExpr *AR = cast(IndVars.back().second); - Value *NewVal = Rewriter.expandCodeFor(AR, PN->getType()); - DOUT << "INDVARS: Rewrote IV '" << *AR << "' " << *PN - << " into = " << *NewVal << "\n"; - NewVal->takeName(PN); - - /// If the new canonical induction variable is wider than the original, - /// and the original has uses that are casts to wider types, see if the - /// truncate and extend can be omitted. - if (PN == OrigControllingPHI && PN->getType() != LargestType) - for (Value::use_iterator UI = PN->use_begin(), UE = PN->use_end(); - UI != UE; ++UI) { - Instruction *UInst = dyn_cast(*UI); - if (UInst && isa(UInst) && NoSignedWrap) { - Value *TruncIndVar = getSignExtendedTruncVar(AR, SE, LargestType, L, - UInst->getType(), Rewriter); - UInst->replaceAllUsesWith(TruncIndVar); - DeadInsts.insert(UInst); - } - // See if we can figure out sext(i+constant) doesn't wrap, so we can - // use a larger add. This is common in subscripting. - if (UInst && UInst->getOpcode()==Instruction::Add && - !UInst->use_empty() && - allUsesAreSameTyped(Instruction::SExt, UInst) && - isa(UInst->getOperand(1)) && - NoSignedWrap && LimitVal) { - uint64_t oldBitSize = LimitVal->getValue().getBitWidth(); - uint64_t newBitSize = LargestType->getPrimitiveSizeInBits(); - ConstantInt* AddRHS = dyn_cast(UInst->getOperand(1)); - if (((APInt::getSignedMaxValue(oldBitSize) - IncrVal->getValue()) - - AddRHS->getValue()).sgt(LimitVal->getValue())) { - // We've determined this is (i+constant) and it won't overflow. - if (isa(UInst->use_begin())) { - SExtInst* oldSext = dyn_cast(UInst->use_begin()); - uint64_t truncSize = oldSext->getType()->getPrimitiveSizeInBits(); - Value *TruncIndVar = getSignExtendedTruncVar(AR, SE, LargestType, - L, oldSext->getType(), Rewriter); - APInt APnewAddRHS = APInt(AddRHS->getValue()).sext(newBitSize); - if (newBitSize > truncSize) - APnewAddRHS = APnewAddRHS.trunc(truncSize); - ConstantInt* newAddRHS =ConstantInt::get(APnewAddRHS); - Value *NewAdd = - BinaryOperator::CreateAdd(TruncIndVar, newAddRHS, - UInst->getName()+".nosex", UInst); - for (Value::use_iterator UI2 = UInst->use_begin(), - UE2 = UInst->use_end(); UI2 != UE2; ++UI2) { - Instruction *II = dyn_cast(UI2); - II->replaceAllUsesWith(NewAdd); - DeadInsts.insert(II); - } - DeadInsts.insert(UInst); - } - } - } - // Try for sext(i | constant). This is safe as long as the - // high bit of the constant is not set. - if (UInst && UInst->getOpcode()==Instruction::Or && - !UInst->use_empty() && - allUsesAreSameTyped(Instruction::SExt, UInst) && NoSignedWrap && - isa(UInst->getOperand(1))) { - ConstantInt* RHS = dyn_cast(UInst->getOperand(1)); - if (!RHS->getValue().isNegative()) { - uint64_t newBitSize = LargestType->getPrimitiveSizeInBits(); - SExtInst* oldSext = dyn_cast(UInst->use_begin()); - uint64_t truncSize = oldSext->getType()->getPrimitiveSizeInBits(); - Value *TruncIndVar = getSignExtendedTruncVar(AR, SE, LargestType, - L, oldSext->getType(), Rewriter); - APInt APnewOrRHS = APInt(RHS->getValue()).sext(newBitSize); - if (newBitSize > truncSize) - APnewOrRHS = APnewOrRHS.trunc(truncSize); - ConstantInt* newOrRHS =ConstantInt::get(APnewOrRHS); - Value *NewOr = - BinaryOperator::CreateOr(TruncIndVar, newOrRHS, - UInst->getName()+".nosex", UInst); - for (Value::use_iterator UI2 = UInst->use_begin(), - UE2 = UInst->use_end(); UI2 != UE2; ++UI2) { - Instruction *II = dyn_cast(UI2); - II->replaceAllUsesWith(NewOr); - DeadInsts.insert(II); - } - DeadInsts.insert(UInst); - } - } - // A zext of a signed variable known not to overflow is still safe. - if (UInst && isa(UInst) && (NoUnsignedWrap || NoSignedWrap)) { - Value *TruncIndVar = getZeroExtendedTruncVar(AR, SE, LargestType, L, - UInst->getType(), Rewriter); - UInst->replaceAllUsesWith(TruncIndVar); - DeadInsts.insert(UInst); - } - // If we have zext(i&constant), it's always safe to use the larger - // variable. This is not common but is a bottleneck in Openssl. - // (RHS doesn't have to be constant. There should be a better approach - // than bottom-up pattern matching for this...) - if (UInst && UInst->getOpcode()==Instruction::And && - !UInst->use_empty() && - allUsesAreSameTyped(Instruction::ZExt, UInst) && - isa(UInst->getOperand(1))) { - uint64_t newBitSize = LargestType->getPrimitiveSizeInBits(); - ConstantInt* AndRHS = dyn_cast(UInst->getOperand(1)); - ZExtInst* oldZext = dyn_cast(UInst->use_begin()); - uint64_t truncSize = oldZext->getType()->getPrimitiveSizeInBits(); - Value *TruncIndVar = getSignExtendedTruncVar(AR, SE, LargestType, - L, oldZext->getType(), Rewriter); - APInt APnewAndRHS = APInt(AndRHS->getValue()).zext(newBitSize); - if (newBitSize > truncSize) - APnewAndRHS = APnewAndRHS.trunc(truncSize); - ConstantInt* newAndRHS = ConstantInt::get(APnewAndRHS); - Value *NewAnd = - BinaryOperator::CreateAnd(TruncIndVar, newAndRHS, - UInst->getName()+".nozex", UInst); - for (Value::use_iterator UI2 = UInst->use_begin(), - UE2 = UInst->use_end(); UI2 != UE2; ++UI2) { - Instruction *II = dyn_cast(UI2); - II->replaceAllUsesWith(NewAnd); - DeadInsts.insert(II); + // Reorder instructions to avoid use-before-def conditions. + FixUsesBeforeDefs(L, Rewriter); + + // For completeness, inform IVUsers of the IV use in the newly-created + // loop exit test instruction. + if (NewICmp) + IU->AddUsersIfInteresting(cast(NewICmp->getOperand(0))); + + // Clean up dead instructions. + DeleteDeadPHIs(L->getHeader()); + // Check a post-condition. + assert(L->isLCSSAForm() && "Indvars did not leave the loop in lcssa form!"); + return Changed; +} + +void IndVarSimplify::RewriteIVExpressions(Loop *L, const Type *LargestType, + SCEVExpander &Rewriter) { + SmallVector DeadInsts; + + // Rewrite all induction variable expressions in terms of the canonical + // induction variable. + // + // If there were induction variables of other sizes or offsets, manually + // add the offsets to the primary induction variable and cast, avoiding + // the need for the code evaluation methods to insert induction variables + // of different sizes. + for (unsigned i = 0, e = IU->StrideOrder.size(); i != e; ++i) { + SCEVHandle Stride = IU->StrideOrder[i]; + + std::map::iterator SI = + IU->IVUsesByStride.find(IU->StrideOrder[i]); + assert(SI != IU->IVUsesByStride.end() && "Stride doesn't exist!"); + ilist &List = SI->second->Users; + for (ilist::iterator UI = List.begin(), + E = List.end(); UI != E; ++UI) { + SCEVHandle Offset = UI->getOffset(); + Value *Op = UI->getOperandValToReplace(); + Instruction *User = UI->getUser(); + bool isSigned = UI->isSigned(); + + // Compute the final addrec to expand into code. + SCEVHandle AR = IU->getReplacementExpr(*UI); + + // FIXME: It is an extremely bad idea to indvar substitute anything more + // complex than affine induction variables. Doing so will put expensive + // polynomial evaluations inside of the loop, and the str reduction pass + // currently can only reduce affine polynomials. For now just disable + // indvar subst on anything more complex than an affine addrec, unless + // it can be expanded to a trivial value. + if (!Stride->isLoopInvariant(L) && + !isa(AR) && + L->contains(User->getParent())) + continue; + + Value *NewVal = 0; + if (AR->isLoopInvariant(L)) { + BasicBlock::iterator I = Rewriter.getInsertionPoint(); + // Expand loop-invariant values in the loop preheader. They will + // be sunk to the exit block later, if possible. + NewVal = + Rewriter.expandCodeFor(AR, LargestType, + L->getLoopPreheader()->getTerminator()); + Rewriter.setInsertionPoint(I); + ++NumReplaced; + } else { + const Type *IVTy = Offset->getType(); + const Type *UseTy = Op->getType(); + + // Promote the Offset and Stride up to the canonical induction + // variable's bit width. + SCEVHandle PromotedOffset = Offset; + SCEVHandle PromotedStride = Stride; + if (SE->getTypeSizeInBits(IVTy) != SE->getTypeSizeInBits(LargestType)) { + // It doesn't matter for correctness whether zero or sign extension + // is used here, since the value is truncated away below, but if the + // value is signed, sign extension is more likely to be folded. + if (isSigned) { + PromotedOffset = SE->getSignExtendExpr(PromotedOffset, LargestType); + PromotedStride = SE->getSignExtendExpr(PromotedStride, LargestType); + } else { + PromotedOffset = SE->getZeroExtendExpr(PromotedOffset, LargestType); + // If the stride is obviously negative, use sign extension to + // produce things like x-1 instead of x+255. + if (isa(PromotedStride) && + cast(PromotedStride) + ->getValue()->getValue().isNegative()) + PromotedStride = SE->getSignExtendExpr(PromotedStride, + LargestType); + else + PromotedStride = SE->getZeroExtendExpr(PromotedStride, + LargestType); } - DeadInsts.insert(UInst); } - // If we have zext((i+constant)&constant), we can use the larger - // variable even if the add does overflow. This works whenever the - // constant being ANDed is the same size as i, which it presumably is. - // We don't need to restrict the expression being and'ed to i+const, - // but we have to promote everything in it, so it's convenient. - // zext((i | constant)&constant) is also valid and accepted here. - if (UInst && (UInst->getOpcode()==Instruction::Add || - UInst->getOpcode()==Instruction::Or) && - UInst->hasOneUse() && - isa(UInst->getOperand(1))) { - uint64_t newBitSize = LargestType->getPrimitiveSizeInBits(); - ConstantInt* AddRHS = dyn_cast(UInst->getOperand(1)); - Instruction *UInst2 = dyn_cast(UInst->use_begin()); - if (UInst2 && UInst2->getOpcode() == Instruction::And && - !UInst2->use_empty() && - allUsesAreSameTyped(Instruction::ZExt, UInst2) && - isa(UInst2->getOperand(1))) { - ZExtInst* oldZext = dyn_cast(UInst2->use_begin()); - uint64_t truncSize = oldZext->getType()->getPrimitiveSizeInBits(); - Value *TruncIndVar = getSignExtendedTruncVar(AR, SE, LargestType, - L, oldZext->getType(), Rewriter); - ConstantInt* AndRHS = dyn_cast(UInst2->getOperand(1)); - APInt APnewAddRHS = APInt(AddRHS->getValue()).zext(newBitSize); - if (newBitSize > truncSize) - APnewAddRHS = APnewAddRHS.trunc(truncSize); - ConstantInt* newAddRHS = ConstantInt::get(APnewAddRHS); - Value *NewAdd = ((UInst->getOpcode()==Instruction::Add) ? - BinaryOperator::CreateAdd(TruncIndVar, newAddRHS, - UInst->getName()+".nozex", UInst2) : - BinaryOperator::CreateOr(TruncIndVar, newAddRHS, - UInst->getName()+".nozex", UInst2)); - APInt APcopy2 = APInt(AndRHS->getValue()); - ConstantInt* newAndRHS = ConstantInt::get(APcopy2.zext(newBitSize)); - Value *NewAnd = - BinaryOperator::CreateAnd(NewAdd, newAndRHS, - UInst->getName()+".nozex", UInst2); - for (Value::use_iterator UI2 = UInst2->use_begin(), - UE2 = UInst2->use_end(); UI2 != UE2; ++UI2) { - Instruction *II = dyn_cast(UI2); - II->replaceAllUsesWith(NewAnd); - DeadInsts.insert(II); - } - DeadInsts.insert(UInst); - DeadInsts.insert(UInst2); + + // Create the SCEV representing the offset from the canonical + // induction variable, still in the canonical induction variable's + // type, so that all expanded arithmetic is done in the same type. + SCEVHandle NewAR = SE->getAddRecExpr(SE->getIntegerSCEV(0, LargestType), + PromotedStride, L); + // Add the PromotedOffset as a separate step, because it may not be + // loop-invariant. + NewAR = SE->getAddExpr(NewAR, PromotedOffset); + + // Expand the addrec into instructions. + Value *V = Rewriter.expandCodeFor(NewAR, LargestType); + + // Insert an explicit cast if necessary to truncate the value + // down to the original stride type. This is done outside of + // SCEVExpander because in SCEV expressions, a truncate of an + // addrec is always folded. + if (LargestType != IVTy) { + if (SE->getTypeSizeInBits(IVTy) != SE->getTypeSizeInBits(LargestType)) + NewAR = SE->getTruncateExpr(NewAR, IVTy); + if (Rewriter.isInsertedExpression(NewAR)) + V = Rewriter.expandCodeFor(NewAR, IVTy); + else { + V = Rewriter.InsertCastOfTo(CastInst::getCastOpcode(V, false, + IVTy, false), + V, IVTy); + assert(!isa(V) && !isa(V) && + "LargestType wasn't actually the largest type!"); + // Force the rewriter to use this trunc whenever this addrec + // appears so that it doesn't insert new phi nodes or + // arithmetic in a different type. + Rewriter.addInsertedValue(V, NewAR); } } + + DOUT << "INDVARS: Made offset-and-trunc IV for offset " + << *IVTy << " " << *Offset << ": "; + DEBUG(WriteAsOperand(*DOUT, V, false)); + DOUT << "\n"; + + // Now expand it into actual Instructions and patch it into place. + NewVal = Rewriter.expandCodeFor(AR, UseTy); } - // Replace the old PHI Node with the inserted computation. - PN->replaceAllUsesWith(NewVal); - DeadInsts.insert(PN); - IndVars.pop_back(); - ++NumRemoved; - Changed = true; + // Patch the new value into place. + if (Op->hasName()) + NewVal->takeName(Op); + User->replaceUsesOfWith(Op, NewVal); + UI->setOperandValToReplace(NewVal); + DOUT << "INDVARS: Rewrote IV '" << *AR << "' " << *Op + << " into = " << *NewVal << "\n"; + ++NumRemoved; + Changed = true; + + // The old value may be dead now. + DeadInsts.push_back(Op); + } } - DeleteTriviallyDeadInstructions(DeadInsts); - assert(L->isLCSSAForm()); - return Changed; + // Now that we're done iterating through lists, clean up any instructions + // which are now dead. + while (!DeadInsts.empty()) { + Instruction *Inst = dyn_cast_or_null(DeadInsts.pop_back_val()); + if (Inst) + RecursivelyDeleteTriviallyDeadInstructions(Inst); + } +} + +/// If there's a single exit block, sink any loop-invariant values that +/// were defined in the preheader but not used inside the loop into the +/// exit block to reduce register pressure in the loop. +void IndVarSimplify::SinkUnusedInvariants(Loop *L, SCEVExpander &Rewriter) { + BasicBlock *ExitBlock = L->getExitBlock(); + if (!ExitBlock) return; + + Instruction *NonPHI = ExitBlock->getFirstNonPHI(); + BasicBlock *Preheader = L->getLoopPreheader(); + BasicBlock::iterator I = Preheader->getTerminator(); + while (I != Preheader->begin()) { + --I; + // New instructions were inserted at the end of the preheader. Only + // consider those new instructions. + if (!Rewriter.isInsertedInstruction(I)) + break; + // Determine if there is a use in or before the loop (direct or + // otherwise). + bool UsedInLoop = false; + for (Value::use_iterator UI = I->use_begin(), UE = I->use_end(); + UI != UE; ++UI) { + BasicBlock *UseBB = cast(UI)->getParent(); + if (PHINode *P = dyn_cast(UI)) { + unsigned i = + PHINode::getIncomingValueNumForOperand(UI.getOperandNo()); + UseBB = P->getIncomingBlock(i); + } + if (UseBB == Preheader || L->contains(UseBB)) { + UsedInLoop = true; + break; + } + } + // If there is, the def must remain in the preheader. + if (UsedInLoop) + continue; + // Otherwise, sink it to the exit block. + Instruction *ToMove = I; + bool Done = false; + if (I != Preheader->begin()) + --I; + else + Done = true; + ToMove->moveBefore(NonPHI); + if (Done) + break; + } +} + +/// Re-schedule the inserted instructions to put defs before uses. This +/// fixes problems that arrise when SCEV expressions contain loop-variant +/// values unrelated to the induction variable which are defined inside the +/// loop. FIXME: It would be better to insert instructions in the right +/// place so that this step isn't needed. +void IndVarSimplify::FixUsesBeforeDefs(Loop *L, SCEVExpander &Rewriter) { + // Visit all the blocks in the loop in pre-order dom-tree dfs order. + DominatorTree *DT = &getAnalysis(); + std::map NumPredsLeft; + SmallVector Worklist; + Worklist.push_back(DT->getNode(L->getHeader())); + do { + DomTreeNode *Node = Worklist.pop_back_val(); + for (DomTreeNode::iterator I = Node->begin(), E = Node->end(); I != E; ++I) + if (L->contains((*I)->getBlock())) + Worklist.push_back(*I); + BasicBlock *BB = Node->getBlock(); + // Visit all the instructions in the block top down. + for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) { + // Count the number of operands that aren't properly dominating. + unsigned NumPreds = 0; + if (Rewriter.isInsertedInstruction(I) && !isa(I)) + for (User::op_iterator OI = I->op_begin(), OE = I->op_end(); + OI != OE; ++OI) + if (Instruction *Inst = dyn_cast(OI)) + if (L->contains(Inst->getParent()) && !NumPredsLeft.count(Inst)) + ++NumPreds; + NumPredsLeft[I] = NumPreds; + // Notify uses of the position of this instruction, and move the + // users (and their dependents, recursively) into place after this + // instruction if it is their last outstanding operand. + for (Value::use_iterator UI = I->use_begin(), UE = I->use_end(); + UI != UE; ++UI) { + Instruction *Inst = cast(UI); + std::map::iterator Z = NumPredsLeft.find(Inst); + if (Z != NumPredsLeft.end() && Z->second != 0 && --Z->second == 0) { + SmallVector UseWorkList; + UseWorkList.push_back(Inst); + BasicBlock::iterator InsertPt = next(I); + while (isa(InsertPt)) ++InsertPt; + do { + Instruction *Use = UseWorkList.pop_back_val(); + Use->moveBefore(InsertPt); + NumPredsLeft.erase(Use); + for (Value::use_iterator IUI = Use->use_begin(), + IUE = Use->use_end(); IUI != IUE; ++IUI) { + Instruction *IUIInst = cast(IUI); + if (L->contains(IUIInst->getParent()) && + Rewriter.isInsertedInstruction(IUIInst) && + !isa(IUIInst)) + UseWorkList.push_back(IUIInst); + } + } while (!UseWorkList.empty()); + } + } + } + } while (!Worklist.empty()); } /// Return true if it is OK to use SIToFPInst for an inducation variable @@ -933,8 +728,7 @@ /// for(int i = 0; i < 10000; ++i) /// bar((double)i); /// -void IndVarSimplify::HandleFloatingPointIV(Loop *L, PHINode *PH, - SmallPtrSet &DeadInsts) { +void IndVarSimplify::HandleFloatingPointIV(Loop *L, PHINode *PH) { unsigned IncomingEdge = L->contains(PH->getIncomingBlock(0)); unsigned BackEdge = IncomingEdge^1; @@ -1041,25 +835,34 @@ ICmpInst *NewEC = new ICmpInst(NewPred, LHS, RHS, EC->getNameStart(), EC->getParent()->getTerminator()); + // In the following deltions, PH may become dead and may be deleted. + // Use a WeakVH to observe whether this happens. + WeakVH WeakPH = PH; + // Delete old, floating point, exit comparision instruction. EC->replaceAllUsesWith(NewEC); - DeadInsts.insert(EC); + RecursivelyDeleteTriviallyDeadInstructions(EC); // Delete old, floating point, increment instruction. Incr->replaceAllUsesWith(UndefValue::get(Incr->getType())); - DeadInsts.insert(Incr); + RecursivelyDeleteTriviallyDeadInstructions(Incr); - // Replace floating induction variable. Give SIToFPInst preference over - // UIToFPInst because it is faster on platforms that are widely used. - if (useSIToFPInst(*InitValue, *EV, newInitValue, intEV)) { - SIToFPInst *Conv = new SIToFPInst(NewPHI, PH->getType(), "indvar.conv", - PH->getParent()->getFirstNonPHI()); - PH->replaceAllUsesWith(Conv); - } else { - UIToFPInst *Conv = new UIToFPInst(NewPHI, PH->getType(), "indvar.conv", - PH->getParent()->getFirstNonPHI()); - PH->replaceAllUsesWith(Conv); + // Replace floating induction variable, if it isn't already deleted. + // Give SIToFPInst preference over UIToFPInst because it is faster on + // platforms that are widely used. + if (WeakPH && !PH->use_empty()) { + if (useSIToFPInst(*InitValue, *EV, newInitValue, intEV)) { + SIToFPInst *Conv = new SIToFPInst(NewPHI, PH->getType(), "indvar.conv", + PH->getParent()->getFirstNonPHI()); + PH->replaceAllUsesWith(Conv); + } else { + UIToFPInst *Conv = new UIToFPInst(NewPHI, PH->getType(), "indvar.conv", + PH->getParent()->getFirstNonPHI()); + PH->replaceAllUsesWith(Conv); + } + RecursivelyDeleteTriviallyDeadInstructions(PH); } - DeadInsts.insert(PH); -} + // Add a new IVUsers entry for the newly-created integer PHI. + IU->AddUsersIfInteresting(NewPHI); +} Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=71535&r1=71534&r2=71535&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon May 11 21:17:14 2009 @@ -20,6 +20,7 @@ #include "llvm/Type.h" #include "llvm/DerivedTypes.h" #include "llvm/Analysis/Dominators.h" +#include "llvm/Analysis/IVUsers.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/ScalarEvolutionExpander.h" @@ -53,40 +54,6 @@ struct BasedUser; - /// IVStrideUse - Keep track of one use of a strided induction variable, where - /// the stride is stored externally. The Offset member keeps track of the - /// offset from the IV, User is the actual user of the operand, and - /// 'OperandValToReplace' is the operand of the User that is the use. - struct VISIBILITY_HIDDEN IVStrideUse { - SCEVHandle Offset; - Instruction *User; - Value *OperandValToReplace; - - // isUseOfPostIncrementedValue - True if this should use the - // post-incremented version of this IV, not the preincremented version. - // This can only be set in special cases, such as the terminating setcc - // instruction for a loop or uses dominated by the loop. - bool isUseOfPostIncrementedValue; - - IVStrideUse(const SCEVHandle &Offs, Instruction *U, Value *O) - : Offset(Offs), User(U), OperandValToReplace(O), - isUseOfPostIncrementedValue(false) {} - }; - - /// IVUsersOfOneStride - This structure keeps track of all instructions that - /// have an operand that is based on the trip count multiplied by some stride. - /// The stride for all of these users is common and kept external to this - /// structure. - struct VISIBILITY_HIDDEN IVUsersOfOneStride { - /// Users - Keep track of all of the users of this stride as well as the - /// initial value and the operand that uses the IV. - std::vector Users; - - void addUser(const SCEVHandle &Offset,Instruction *User, Value *Operand) { - Users.push_back(IVStrideUse(Offset, User, Operand)); - } - }; - /// IVInfo - This structure keeps track of one IV expression inserted during /// StrengthReduceStridedIVUsers. It contains the stride, the common base, as /// well as the PHI node and increment value created for rewrite. @@ -110,15 +77,12 @@ }; class VISIBILITY_HIDDEN LoopStrengthReduce : public LoopPass { + IVUsers *IU; LoopInfo *LI; DominatorTree *DT; ScalarEvolution *SE; bool Changed; - /// IVUsesByStride - Keep track of all uses of induction variables that we - /// are interested in. The key of the map is the stride of the access. - std::map IVUsesByStride; - /// IVsByStride - Keep track of all IVs that have been inserted for a /// particular stride. std::map IVsByStride; @@ -127,14 +91,9 @@ /// reused (nor should they be rewritten to reuse other strides). SmallSet StrideNoReuse; - /// StrideOrder - An ordering of the keys in IVUsesByStride that is stable: - /// We use this to iterate over the IVUsesByStride collection without being - /// dependent on random ordering of pointers in the process. - SmallVector StrideOrder; - /// DeadInsts - Keep track of instructions we may have made dead, so that /// we can remove them after we are done working. - SmallVector DeadInsts; + SmallVector DeadInsts; /// TLI - Keep a pointer of a TargetLowering to consult for determining /// transformation profitability. @@ -161,11 +120,11 @@ AU.addRequired(); AU.addRequired(); AU.addPreserved(); + AU.addRequired(); + AU.addPreserved(); } private: - bool AddUsersIfInteresting(Instruction *I, Loop *L, - SmallPtrSet &Processed); ICmpInst *ChangeCompareStride(Loop *L, ICmpInst *Cond, IVStrideUse* &CondUse, const SCEVHandle* &CondStride); @@ -191,6 +150,8 @@ const std::vector& UsersToProcess); bool ValidScale(bool, int64_t, const std::vector& UsersToProcess); + bool ValidOffset(bool, int64_t, int64_t, + const std::vector& UsersToProcess); SCEVHandle CollectIVUsers(const SCEVHandle &Stride, IVUsersOfOneStride &Uses, Loop *L, @@ -242,21 +203,8 @@ void LoopStrengthReduce::DeleteTriviallyDeadInstructions() { if (DeadInsts.empty()) return; - // Sort the deadinsts list so that we can trivially eliminate duplicates as we - // go. The code below never adds a non-dead instruction to the worklist, but - // callers may not be so careful. - array_pod_sort(DeadInsts.begin(), DeadInsts.end()); - - // Drop duplicate instructions and those with uses. - for (unsigned i = 0, e = DeadInsts.size()-1; i < e; ++i) { - Instruction *I = DeadInsts[i]; - if (!I->use_empty()) DeadInsts[i] = 0; - while (i != e && DeadInsts[i+1] == I) - DeadInsts[++i] = 0; - } - while (!DeadInsts.empty()) { - Instruction *I = DeadInsts.back(); + Instruction *I = dyn_cast_or_null(DeadInsts.back()); DeadInsts.pop_back(); if (I == 0 || !isInstructionTriviallyDead(I)) @@ -313,111 +261,6 @@ return false; } -/// getSCEVStartAndStride - Compute the start and stride of this expression, -/// returning false if the expression is not a start/stride pair, or true if it -/// is. The stride must be a loop invariant expression, but the start may be -/// a mix of loop invariant and loop variant expressions. The start cannot, -/// however, contain an AddRec from a different loop, unless that loop is an -/// outer loop of the current loop. -static bool getSCEVStartAndStride(const SCEVHandle &SH, Loop *L, - SCEVHandle &Start, SCEVHandle &Stride, - ScalarEvolution *SE, DominatorTree *DT) { - SCEVHandle TheAddRec = Start; // Initialize to zero. - - // If the outer level is an AddExpr, the operands are all start values except - // for a nested AddRecExpr. - if (const SCEVAddExpr *AE = dyn_cast(SH)) { - for (unsigned i = 0, e = AE->getNumOperands(); i != e; ++i) - if (const SCEVAddRecExpr *AddRec = - dyn_cast(AE->getOperand(i))) { - if (AddRec->getLoop() == L) - TheAddRec = SE->getAddExpr(AddRec, TheAddRec); - else - return false; // Nested IV of some sort? - } else { - Start = SE->getAddExpr(Start, AE->getOperand(i)); - } - - } else if (isa(SH)) { - TheAddRec = SH; - } else { - return false; // not analyzable. - } - - const SCEVAddRecExpr *AddRec = dyn_cast(TheAddRec); - if (!AddRec || AddRec->getLoop() != L) return false; - - // FIXME: Generalize to non-affine IV's. - if (!AddRec->isAffine()) return false; - - // If Start contains an SCEVAddRecExpr from a different loop, other than an - // outer loop of the current loop, reject it. SCEV has no concept of - // operating on more than one loop at a time so don't confuse it with such - // expressions. - if (containsAddRecFromDifferentLoop(AddRec->getOperand(0), L)) - return false; - - Start = SE->getAddExpr(Start, AddRec->getOperand(0)); - - if (!isa(AddRec->getOperand(1))) { - // If stride is an instruction, make sure it dominates the loop preheader. - // Otherwise we could end up with a use before def situation. - BasicBlock *Preheader = L->getLoopPreheader(); - if (!AddRec->getOperand(1)->dominates(Preheader, DT)) - return false; - - DOUT << "[" << L->getHeader()->getName() - << "] Variable stride: " << *AddRec << "\n"; - } - - Stride = AddRec->getOperand(1); - return true; -} - -/// IVUseShouldUsePostIncValue - We have discovered a "User" of an IV expression -/// and now we need to decide whether the user should use the preinc or post-inc -/// value. If this user should use the post-inc version of the IV, return true. -/// -/// Choosing wrong here can break dominance properties (if we choose to use the -/// post-inc value when we cannot) or it can end up adding extra live-ranges to -/// the loop, resulting in reg-reg copies (if we use the pre-inc value when we -/// should use the post-inc value). -static bool IVUseShouldUsePostIncValue(Instruction *User, Instruction *IV, - Loop *L, DominatorTree *DT, Pass *P, - SmallVectorImpl &DeadInsts){ - // If the user is in the loop, use the preinc value. - if (L->contains(User->getParent())) return false; - - BasicBlock *LatchBlock = L->getLoopLatch(); - - // Ok, the user is outside of the loop. If it is dominated by the latch - // block, use the post-inc value. - if (DT->dominates(LatchBlock, User->getParent())) - return true; - - // There is one case we have to be careful of: PHI nodes. These little guys - // can live in blocks that do not dominate the latch block, but (since their - // uses occur in the predecessor block, not the block the PHI lives in) should - // still use the post-inc value. Check for this case now. - PHINode *PN = dyn_cast(User); - if (!PN) return false; // not a phi, not dominated by latch block. - - // Look at all of the uses of IV by the PHI node. If any use corresponds to - // a block that is not dominated by the latch block, give up and use the - // preincremented value. - unsigned NumUses = 0; - for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) - if (PN->getIncomingValue(i) == IV) { - ++NumUses; - if (!DT->dominates(LatchBlock, PN->getIncomingBlock(i))) - return false; - } - - // Okay, all uses of IV by PN are in predecessor blocks that really are - // dominated by the latch block. Use the post-incremented value. - return true; -} - /// isAddressUse - Returns true if the specified instruction is using the /// specified value as an address. static bool isAddressUse(Instruction *Inst, Value *OperandVal) { @@ -467,90 +310,6 @@ return UseTy; } -/// AddUsersIfInteresting - Inspect the specified instruction. If it is a -/// reducible SCEV, recursively add its users to the IVUsesByStride set and -/// return true. Otherwise, return false. -bool LoopStrengthReduce::AddUsersIfInteresting(Instruction *I, Loop *L, - SmallPtrSet &Processed) { - if (!SE->isSCEVable(I->getType())) - return false; // Void and FP expressions cannot be reduced. - - // LSR is not APInt clean, do not touch integers bigger than 64-bits. - if (SE->getTypeSizeInBits(I->getType()) > 64) - return false; - - if (!Processed.insert(I)) - return true; // Instruction already handled. - - // Get the symbolic expression for this instruction. - SCEVHandle ISE = SE->getSCEV(I); - if (isa(ISE)) return false; - - // Get the start and stride for this expression. - SCEVHandle Start = SE->getIntegerSCEV(0, ISE->getType()); - SCEVHandle Stride = Start; - if (!getSCEVStartAndStride(ISE, L, Start, Stride, SE, DT)) - return false; // Non-reducible symbolic expression, bail out. - - std::vector IUsers; - // Collect all I uses now because IVUseShouldUsePostIncValue may - // invalidate use_iterator. - for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E; ++UI) - IUsers.push_back(cast(*UI)); - - for (unsigned iused_index = 0, iused_size = IUsers.size(); - iused_index != iused_size; ++iused_index) { - - Instruction *User = IUsers[iused_index]; - - // Do not infinitely recurse on PHI nodes. - if (isa(User) && Processed.count(User)) - continue; - - // Descend recursively, but not into PHI nodes outside the current loop. - // It's important to see the entire expression outside the loop to get - // choices that depend on addressing mode use right, although we won't - // consider references ouside the loop in all cases. - // If User is already in Processed, we don't want to recurse into it again, - // but do want to record a second reference in the same instruction. - bool AddUserToIVUsers = false; - if (LI->getLoopFor(User->getParent()) != L) { - if (isa(User) || Processed.count(User) || - !AddUsersIfInteresting(User, L, Processed)) { - DOUT << "FOUND USER in other loop: " << *User - << " OF SCEV: " << *ISE << "\n"; - AddUserToIVUsers = true; - } - } else if (Processed.count(User) || - !AddUsersIfInteresting(User, L, Processed)) { - DOUT << "FOUND USER: " << *User - << " OF SCEV: " << *ISE << "\n"; - AddUserToIVUsers = true; - } - - if (AddUserToIVUsers) { - IVUsersOfOneStride &StrideUses = IVUsesByStride[Stride]; - if (StrideUses.Users.empty()) // First occurrence of this stride? - StrideOrder.push_back(Stride); - - // Okay, we found a user that we cannot reduce. Analyze the instruction - // and decide what to do with it. If we are a use inside of the loop, use - // the value before incrementation, otherwise use it after incrementation. - if (IVUseShouldUsePostIncValue(User, I, L, DT, this, DeadInsts)) { - // The value used will be incremented by the stride more than we are - // expecting, so subtract this off. - SCEVHandle NewStart = SE->getMinusSCEV(Start, Stride); - StrideUses.addUser(NewStart, User, I); - StrideUses.Users.back().isUseOfPostIncrementedValue = true; - DOUT << " USING POSTINC SCEV, START=" << *NewStart<< "\n"; - } else { - StrideUses.addUser(Start, User, I); - } - } - } - return true; -} - namespace { /// BasedUser - For a particular base value, keep information about how we've /// partitioned the expression so far. @@ -571,6 +330,13 @@ /// EmittedBase. Value *OperandValToReplace; + /// isSigned - The stride (and thus also the Base) of this use may be in + /// a narrower type than the use itself (OperandValToReplace->getType()). + /// When this is the case, the isSigned field indicates whether the + /// IV expression should be signed-extended instead of zero-extended to + /// fit the type of the use. + bool isSigned; + /// Imm - The immediate value that should be added to the base immediately /// before Inst, because it will be folded into the imm field of the /// instruction. This is also sometimes used for loop-variant values that @@ -589,10 +355,11 @@ bool isUseOfPostIncrementedValue; BasedUser(IVStrideUse &IVSU, ScalarEvolution *se) - : SE(se), Base(IVSU.Offset), Inst(IVSU.User), - OperandValToReplace(IVSU.OperandValToReplace), + : SE(se), Base(IVSU.getOffset()), Inst(IVSU.getUser()), + OperandValToReplace(IVSU.getOperandValToReplace()), + isSigned(IVSU.isSigned()), Imm(SE->getIntegerSCEV(0, Base->getType())), - isUseOfPostIncrementedValue(IVSU.isUseOfPostIncrementedValue) {} + isUseOfPostIncrementedValue(IVSU.isUseOfPostIncrementedValue()) {} // Once we rewrite the code to insert the new IVs we want, update the // operands of Inst to use the new expression 'NewBase', with 'Imm' added @@ -600,7 +367,7 @@ void RewriteInstructionToUseNewBase(const SCEVHandle &NewBase, Instruction *InsertPt, SCEVExpander &Rewriter, Loop *L, Pass *P, - SmallVectorImpl &DeadInsts); + SmallVectorImpl &DeadInsts); Value *InsertCodeForBaseAtPosition(const SCEVHandle &NewBase, const Type *Ty, @@ -638,19 +405,27 @@ InsertLoop = InsertLoop->getParentLoop(); } - Value *Base = Rewriter.expandCodeFor(NewBase, Ty, BaseInsertPt); + Value *Base = Rewriter.expandCodeFor(NewBase, NewBase->getType(), + BaseInsertPt); + + SCEVHandle NewValSCEV = SE->getUnknown(Base); // If there is no immediate value, skip the next part. - if (Imm->isZero()) - return Base; + if (!Imm->isZero()) { + // If we are inserting the base and imm values in the same block, make sure + // to adjust the IP position if insertion reused a result. + if (IP == BaseInsertPt) + IP = Rewriter.getInsertionPoint(); + + // Always emit the immediate (if non-zero) into the same block as the user. + NewValSCEV = SE->getAddExpr(NewValSCEV, Imm); + } + + if (isSigned) + NewValSCEV = SE->getTruncateOrSignExtend(NewValSCEV, Ty); + else + NewValSCEV = SE->getTruncateOrZeroExtend(NewValSCEV, Ty); - // If we are inserting the base and imm values in the same block, make sure to - // adjust the IP position if insertion reused a result. - if (IP == BaseInsertPt) - IP = Rewriter.getInsertionPoint(); - - // Always emit the immediate (if non-zero) into the same block as the user. - SCEVHandle NewValSCEV = SE->getAddExpr(SE->getUnknown(Base), Imm); return Rewriter.expandCodeFor(NewValSCEV, Ty, IP); } @@ -664,7 +439,7 @@ void BasedUser::RewriteInstructionToUseNewBase(const SCEVHandle &NewBase, Instruction *NewBasePt, SCEVExpander &Rewriter, Loop *L, Pass *P, - SmallVectorImpl &DeadInsts){ + SmallVectorImpl &DeadInsts) { if (!isa(Inst)) { // By default, insert code at the user instruction. BasicBlock::iterator InsertPt = Inst; @@ -1158,6 +933,39 @@ return true; } +/// ValidOffset - Check whether the given Offset is valid for all loads and +/// stores in UsersToProcess. +/// +bool LoopStrengthReduce::ValidOffset(bool HasBaseReg, + int64_t Offset, + int64_t Scale, + const std::vector& UsersToProcess) { + if (!TLI) + return true; + + for (unsigned i=0, e = UsersToProcess.size(); i!=e; ++i) { + // If this is a load or other access, pass the type of the access in. + const Type *AccessTy = Type::VoidTy; + if (isAddressUse(UsersToProcess[i].Inst, + UsersToProcess[i].OperandValToReplace)) + AccessTy = getAccessType(UsersToProcess[i].Inst); + else if (isa(UsersToProcess[i].Inst)) + continue; + + TargetLowering::AddrMode AM; + if (const SCEVConstant *SC = dyn_cast(UsersToProcess[i].Imm)) + AM.BaseOffs = SC->getValue()->getSExtValue(); + AM.BaseOffs = (uint64_t)AM.BaseOffs + (uint64_t)Offset; + AM.HasBaseReg = HasBaseReg || !UsersToProcess[i].Base->isZero(); + AM.Scale = Scale; + + // If load[imm+r*scale] is illegal, bail out. + if (!TLI->isLegalAddressingMode(AM, AccessTy)) + return false; + } + return true; +} + /// RequiresTypeConversion - Returns true if converting Ty1 to Ty2 is not /// a nop. bool LoopStrengthReduce::RequiresTypeConversion(const Type *Ty1, @@ -1196,10 +1004,10 @@ if (const SCEVConstant *SC = dyn_cast(Stride)) { int64_t SInt = SC->getValue()->getSExtValue(); - for (unsigned NewStride = 0, e = StrideOrder.size(); NewStride != e; - ++NewStride) { + for (unsigned NewStride = 0, e = IU->StrideOrder.size(); + NewStride != e; ++NewStride) { std::map::iterator SI = - IVsByStride.find(StrideOrder[NewStride]); + IVsByStride.find(IU->StrideOrder[NewStride]); if (SI == IVsByStride.end() || !isa(SI->first) || StrideNoReuse.count(SI->first)) continue; @@ -1215,24 +1023,44 @@ // multiplications. if (Scale == 1 || (AllUsesAreAddresses && - ValidScale(HasBaseReg, Scale, UsersToProcess))) + ValidScale(HasBaseReg, Scale, UsersToProcess))) { + // Prefer to reuse an IV with a base of zero. for (std::vector::iterator II = SI->second.IVs.begin(), IE = SI->second.IVs.end(); II != IE; ++II) - // FIXME: Only handle base == 0 for now. - // Only reuse previous IV if it would not require a type conversion. + // Only reuse previous IV if it would not require a type conversion + // and if the base difference can be folded. if (II->Base->isZero() && !RequiresTypeConversion(II->Base->getType(), Ty)) { IV = *II; return SE->getIntegerSCEV(Scale, Stride->getType()); } + // Otherwise, settle for an IV with a foldable base. + if (AllUsesAreAddresses) + for (std::vector::iterator II = SI->second.IVs.begin(), + IE = SI->second.IVs.end(); II != IE; ++II) + // Only reuse previous IV if it would not require a type conversion + // and if the base difference can be folded. + if (SE->getEffectiveSCEVType(II->Base->getType()) == + SE->getEffectiveSCEVType(Ty) && + isa(II->Base)) { + int64_t Base = + cast(II->Base)->getValue()->getSExtValue(); + if (Base > INT32_MIN && Base <= INT32_MAX && + ValidOffset(HasBaseReg, -Base * Scale, + Scale, UsersToProcess)) { + IV = *II; + return SE->getIntegerSCEV(Scale, Stride->getType()); + } + } + } } } else if (AllUsesAreOutsideLoop) { // Accept nonconstant strides here; it is really really right to substitute // an existing IV if we can. - for (unsigned NewStride = 0, e = StrideOrder.size(); NewStride != e; - ++NewStride) { + for (unsigned NewStride = 0, e = IU->StrideOrder.size(); + NewStride != e; ++NewStride) { std::map::iterator SI = - IVsByStride.find(StrideOrder[NewStride]); + IVsByStride.find(IU->StrideOrder[NewStride]); if (SI == IVsByStride.end() || !isa(SI->first)) continue; int64_t SSInt = cast(SI->first)->getValue()->getSExtValue(); @@ -1249,10 +1077,10 @@ } // Special case, old IV is -1*x and this one is x. Can treat this one as // -1*old. - for (unsigned NewStride = 0, e = StrideOrder.size(); NewStride != e; - ++NewStride) { + for (unsigned NewStride = 0, e = IU->StrideOrder.size(); + NewStride != e; ++NewStride) { std::map::iterator SI = - IVsByStride.find(StrideOrder[NewStride]); + IVsByStride.find(IU->StrideOrder[NewStride]); if (SI == IVsByStride.end()) continue; if (const SCEVMulExpr *ME = dyn_cast(SI->first)) @@ -1303,10 +1131,15 @@ bool &AllUsesAreAddresses, bool &AllUsesAreOutsideLoop, std::vector &UsersToProcess) { + // FIXME: Generalize to non-affine IV's. + if (!Stride->isLoopInvariant(L)) + return SE->getIntegerSCEV(0, Stride->getType()); + UsersToProcess.reserve(Uses.Users.size()); - for (unsigned i = 0, e = Uses.Users.size(); i != e; ++i) { - UsersToProcess.push_back(BasedUser(Uses.Users[i], SE)); - + for (ilist::iterator I = Uses.Users.begin(), + E = Uses.Users.end(); I != E; ++I) { + UsersToProcess.push_back(BasedUser(*I, SE)); + // Move any loop variant operands from the offset field to the immediate // field of the use, so that we don't try to use something before it is // computed. @@ -1404,7 +1237,7 @@ // TODO: For now, don't do full strength reduction if there could // potentially be greater-stride multiples of the current stride // which could reuse the current stride IV. - if (StrideOrder.back() != Stride) + if (IU->StrideOrder.back() != Stride) return false; // Iterate through the uses to find conditions that automatically rule out @@ -1853,8 +1686,8 @@ SCEVHandle RewriteExpr = SE->getUnknown(RewriteOp); - if (SE->getTypeSizeInBits(RewriteOp->getType()) != - SE->getTypeSizeInBits(ReplacedTy)) { + if (SE->getEffectiveSCEVType(RewriteOp->getType()) != + SE->getEffectiveSCEVType(ReplacedTy)) { assert(SE->getTypeSizeInBits(RewriteOp->getType()) > SE->getTypeSizeInBits(ReplacedTy) && "Unexpected widening cast!"); @@ -1884,8 +1717,8 @@ // it here. if (!ReuseIV.Base->isZero()) { SCEVHandle typedBase = ReuseIV.Base; - if (SE->getTypeSizeInBits(RewriteExpr->getType()) != - SE->getTypeSizeInBits(ReuseIV.Base->getType())) { + if (SE->getEffectiveSCEVType(RewriteExpr->getType()) != + SE->getEffectiveSCEVType(ReuseIV.Base->getType())) { // It's possible the original IV is a larger type than the new IV, // in which case we have to truncate the Base. We checked in // RequiresTypeConversion that this is valid. @@ -1929,7 +1762,7 @@ // Mark old value we replaced as possibly dead, so that it is eliminated // if we just replaced the last use of that value. - DeadInsts.push_back(cast(User.OperandValToReplace)); + DeadInsts.push_back(User.OperandValToReplace); UsersToProcess.pop_back(); ++NumReduced; @@ -1949,19 +1782,19 @@ /// false. bool LoopStrengthReduce::FindIVUserForCond(ICmpInst *Cond, IVStrideUse *&CondUse, const SCEVHandle *&CondStride) { - for (unsigned Stride = 0, e = StrideOrder.size(); Stride != e && !CondUse; - ++Stride) { - std::map::iterator SI = - IVUsesByStride.find(StrideOrder[Stride]); - assert(SI != IVUsesByStride.end() && "Stride doesn't exist!"); - - for (std::vector::iterator UI = SI->second.Users.begin(), - E = SI->second.Users.end(); UI != E; ++UI) - if (UI->User == Cond) { + for (unsigned Stride = 0, e = IU->StrideOrder.size(); + Stride != e && !CondUse; ++Stride) { + std::map::iterator SI = + IU->IVUsesByStride.find(IU->StrideOrder[Stride]); + assert(SI != IU->IVUsesByStride.end() && "Stride doesn't exist!"); + + for (ilist::iterator UI = SI->second->Users.begin(), + E = SI->second->Users.end(); UI != E; ++UI) + if (UI->getUser() == Cond) { // NOTE: we could handle setcc instructions with multiple uses here, but // InstCombine does it as well for simple uses, it's not clear that it // occurs enough in real life to handle. - CondUse = &*UI; + CondUse = UI; CondStride = &SI->first; return true; } @@ -2022,9 +1855,18 @@ ICmpInst *LoopStrengthReduce::ChangeCompareStride(Loop *L, ICmpInst *Cond, IVStrideUse* &CondUse, const SCEVHandle* &CondStride) { - if (StrideOrder.size() < 2 || - IVUsesByStride[*CondStride].Users.size() != 1) + // If there's only one stride in the loop, there's nothing to do here. + if (IU->StrideOrder.size() < 2) + return Cond; + // If there are other users of the condition's stride, don't bother + // trying to change the condition because the stride will still + // remain. + std::map::iterator I = + IU->IVUsesByStride.find(*CondStride); + if (I == IU->IVUsesByStride.end() || + I->second->Users.size() != 1) return Cond; + // Only handle constant strides for now. const SCEVConstant *SC = dyn_cast(*CondStride); if (!SC) return Cond; @@ -2051,9 +1893,9 @@ return Cond; // Look for a suitable stride / iv as replacement. - for (unsigned i = 0, e = StrideOrder.size(); i != e; ++i) { - std::map::iterator SI = - IVUsesByStride.find(StrideOrder[i]); + for (unsigned i = 0, e = IU->StrideOrder.size(); i != e; ++i) { + std::map::iterator SI = + IU->IVUsesByStride.find(IU->StrideOrder[i]); if (!isa(SI->first)) continue; int64_t SSInt = cast(SI->first)->getValue()->getSExtValue(); @@ -2069,6 +1911,9 @@ // Check for overflow. if (!Mul.isSignedIntN(BitWidth)) continue; + // Check for overflow in the stride's type too. + if (!Mul.isSignedIntN(SE->getTypeSizeInBits(SI->first->getType()))) + continue; // Watch out for overflow. if (ICmpInst::isSignedPredicate(Predicate) && @@ -2079,9 +1924,27 @@ continue; // Pick the best iv to use trying to avoid a cast. NewCmpLHS = NULL; - for (std::vector::iterator UI = SI->second.Users.begin(), - E = SI->second.Users.end(); UI != E; ++UI) { - NewCmpLHS = UI->OperandValToReplace; + for (ilist::iterator UI = SI->second->Users.begin(), + E = SI->second->Users.end(); UI != E; ++UI) { + Value *Op = UI->getOperandValToReplace(); + + // If the IVStrideUse implies a cast, check for an actual cast which + // can be used to find the original IV expression. + if (SE->getEffectiveSCEVType(Op->getType()) != + SE->getEffectiveSCEVType(SI->first->getType())) { + CastInst *CI = dyn_cast(Op); + // If it's not a simple cast, it's complicated. + if (!CI) + continue; + // If it's a cast from a type other than the stride type, + // it's complicated. + if (CI->getOperand(0)->getType() != SI->first->getType()) + continue; + // Ok, we found the IV expression in the stride's type. + Op = CI->getOperand(0); + } + + NewCmpLHS = Op; if (NewCmpLHS->getType() == CmpTy) break; } @@ -2105,13 +1968,13 @@ // Don't rewrite if use offset is non-constant and the new type is // of a different type. // FIXME: too conservative? - if (NewTyBits != TyBits && !isa(CondUse->Offset)) + if (NewTyBits != TyBits && !isa(CondUse->getOffset())) continue; bool AllUsesAreAddresses = true; bool AllUsesAreOutsideLoop = true; std::vector UsersToProcess; - SCEVHandle CommonExprs = CollectIVUsers(SI->first, SI->second, L, + SCEVHandle CommonExprs = CollectIVUsers(SI->first, *SI->second, L, AllUsesAreAddresses, AllUsesAreOutsideLoop, UsersToProcess); @@ -2127,7 +1990,7 @@ if (Scale < 0 && !Cond->isEquality()) Predicate = ICmpInst::getSwappedPredicate(Predicate); - NewStride = &StrideOrder[i]; + NewStride = &IU->StrideOrder[i]; if (!isa(NewCmpTy)) NewCmpRHS = ConstantInt::get(NewCmpTy, NewCmpVal); else { @@ -2135,10 +1998,11 @@ NewCmpRHS = ConstantExpr::getIntToPtr(CI, NewCmpTy); } NewOffset = TyBits == NewTyBits - ? SE->getMulExpr(CondUse->Offset, + ? SE->getMulExpr(CondUse->getOffset(), SE->getConstant(ConstantInt::get(CmpTy, Scale))) : SE->getConstant(ConstantInt::get(NewCmpIntTy, - cast(CondUse->Offset)->getValue()->getSExtValue()*Scale)); + cast(CondUse->getOffset())->getValue() + ->getSExtValue()*Scale)); break; } } @@ -2165,13 +2029,12 @@ OldCond); // Remove the old compare instruction. The old indvar is probably dead too. - DeadInsts.push_back(cast(CondUse->OperandValToReplace)); + DeadInsts.push_back(CondUse->getOperandValToReplace()); OldCond->replaceAllUsesWith(Cond); OldCond->eraseFromParent(); - IVUsesByStride[*CondStride].Users.pop_back(); - IVUsesByStride[*NewStride].addUser(NewOffset, Cond, NewCmpLHS); - CondUse = &IVUsesByStride[*NewStride].Users.back(); + IU->IVUsesByStride[*NewStride]->addUser(NewOffset, Cond, NewCmpLHS, false); + CondUse = &IU->IVUsesByStride[*NewStride]->Users.back(); CondStride = NewStride; ++NumEliminated; Changed = true; @@ -2287,12 +2150,12 @@ // Delete the max calculation instructions. Cond->replaceAllUsesWith(NewCond); - Cond->eraseFromParent(); + CondUse->setUser(NewCond); Instruction *Cmp = cast(Sel->getOperand(0)); + Cond->eraseFromParent(); Sel->eraseFromParent(); if (Cmp->use_empty()) Cmp->eraseFromParent(); - CondUse->User = NewCond; return NewCond; } @@ -2304,19 +2167,19 @@ if (isa(BackedgeTakenCount)) return; - for (unsigned Stride = 0, e = StrideOrder.size(); Stride != e; + for (unsigned Stride = 0, e = IU->StrideOrder.size(); Stride != e; ++Stride) { - std::map::iterator SI = - IVUsesByStride.find(StrideOrder[Stride]); - assert(SI != IVUsesByStride.end() && "Stride doesn't exist!"); + std::map::iterator SI = + IU->IVUsesByStride.find(IU->StrideOrder[Stride]); + assert(SI != IU->IVUsesByStride.end() && "Stride doesn't exist!"); if (!isa(SI->first)) continue; - for (std::vector::iterator UI = SI->second.Users.begin(), - E = SI->second.Users.end(); UI != E; /* empty */) { - std::vector::iterator CandidateUI = UI; + for (ilist::iterator UI = SI->second->Users.begin(), + E = SI->second->Users.end(); UI != E; /* empty */) { + ilist::iterator CandidateUI = UI; ++UI; - Instruction *ShadowUse = CandidateUI->User; + Instruction *ShadowUse = CandidateUI->getUser(); const Type *DestTy = NULL; /* If shadow use is a int->float cast then insert a second IV @@ -2331,9 +2194,9 @@ for (unsigned i = 0; i < n; ++i, ++d) foo(d); */ - if (UIToFPInst *UCast = dyn_cast(CandidateUI->User)) + if (UIToFPInst *UCast = dyn_cast(CandidateUI->getUser())) DestTy = UCast->getDestTy(); - else if (SIToFPInst *SCast = dyn_cast(CandidateUI->User)) + else if (SIToFPInst *SCast = dyn_cast(CandidateUI->getUser())) DestTy = SCast->getDestTy(); if (!DestTy) continue; @@ -2400,7 +2263,6 @@ /* Remove cast operation */ ShadowUse->replaceAllUsesWith(NewPH); ShadowUse->eraseFromParent(); - SI->second.Users.erase(CandidateUI); NumShadow++; break; } @@ -2450,11 +2312,12 @@ // transform the icmp to use post-inc iv. Otherwise do so only if it would // not reuse another iv and its iv would be reused by other uses. We are // optimizing for the case where the icmp is the only use of the iv. - IVUsersOfOneStride &StrideUses = IVUsesByStride[*CondStride]; - for (unsigned i = 0, e = StrideUses.Users.size(); i != e; ++i) { - if (StrideUses.Users[i].User == Cond) + IVUsersOfOneStride &StrideUses = *IU->IVUsesByStride[*CondStride]; + for (ilist::iterator I = StrideUses.Users.begin(), + E = StrideUses.Users.end(); I != E; ++I) { + if (I->getUser() == Cond) continue; - if (!StrideUses.Users[i].isUseOfPostIncrementedValue) + if (!I->isUseOfPostIncrementedValue()) return; } @@ -2463,10 +2326,10 @@ // StrengthReduceStridedIVUsers? if (const SCEVConstant *SC = dyn_cast(*CondStride)) { int64_t SInt = SC->getValue()->getSExtValue(); - for (unsigned NewStride = 0, ee = StrideOrder.size(); NewStride != ee; + for (unsigned NewStride = 0, ee = IU->StrideOrder.size(); NewStride != ee; ++NewStride) { - std::map::iterator SI = - IVUsesByStride.find(StrideOrder[NewStride]); + std::map::iterator SI = + IU->IVUsesByStride.find(IU->StrideOrder[NewStride]); if (!isa(SI->first) || SI->first == *CondStride) continue; int64_t SSInt = @@ -2479,7 +2342,7 @@ bool AllUsesAreAddresses = true; bool AllUsesAreOutsideLoop = true; std::vector UsersToProcess; - SCEVHandle CommonExprs = CollectIVUsers(SI->first, SI->second, L, + SCEVHandle CommonExprs = CollectIVUsers(SI->first, *SI->second, L, AllUsesAreAddresses, AllUsesAreOutsideLoop, UsersToProcess); @@ -2518,17 +2381,18 @@ LatchBlock->getInstList().insert(TermBr, Cond); // Clone the IVUse, as the old use still exists! - IVUsesByStride[*CondStride].addUser(CondUse->Offset, Cond, - CondUse->OperandValToReplace); - CondUse = &IVUsesByStride[*CondStride].Users.back(); + IU->IVUsesByStride[*CondStride]->addUser(CondUse->getOffset(), Cond, + CondUse->getOperandValToReplace(), + false); + CondUse = &IU->IVUsesByStride[*CondStride]->Users.back(); } } // If we get to here, we know that we can transform the setcc instruction to // use the post-incremented version of the IV, allowing us to coalesce the // live ranges for the IV correctly. - CondUse->Offset = SE->getMinusSCEV(CondUse->Offset, *CondStride); - CondUse->isUseOfPostIncrementedValue = true; + CondUse->setOffset(SE->getMinusSCEV(CondUse->getOffset(), *CondStride)); + CondUse->setIsUseOfPostIncrementedValue(true); Changed = true; ++NumLoopCond; @@ -2644,19 +2508,13 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) { + IU = &getAnalysis(); LI = &getAnalysis(); DT = &getAnalysis(); SE = &getAnalysis(); Changed = false; - // Find all uses of induction variables in this loop, and categorize - // them by stride. Start by finding all of the PHI nodes in the header for - // this loop. If they are induction variables, inspect their uses. - SmallPtrSet Processed; // Don't reprocess instructions. - for (BasicBlock::iterator I = L->getHeader()->begin(); isa(I); ++I) - AddUsersIfInteresting(I, L, Processed); - - if (!IVUsesByStride.empty()) { + if (!IU->IVUsesByStride.empty()) { #ifndef NDEBUG DOUT << "\nLSR on \"" << L->getHeader()->getParent()->getNameStart() << "\" "; @@ -2664,7 +2522,8 @@ #endif // Sort the StrideOrder so we process larger strides first. - std::stable_sort(StrideOrder.begin(), StrideOrder.end(), StrideCompare(SE)); + std::stable_sort(IU->StrideOrder.begin(), IU->StrideOrder.end(), + StrideCompare(SE)); // Optimize induction variables. Some indvar uses can be transformed to use // strides that will be needed for other purposes. A common example of this @@ -2695,11 +2554,15 @@ // Also, note that we iterate over IVUsesByStride indirectly by using // StrideOrder. This extra layer of indirection makes the ordering of // strides deterministic - not dependent on map order. - for (unsigned Stride = 0, e = StrideOrder.size(); Stride != e; ++Stride) { - std::map::iterator SI = - IVUsesByStride.find(StrideOrder[Stride]); - assert(SI != IVUsesByStride.end() && "Stride doesn't exist!"); - StrengthReduceStridedIVUsers(SI->first, SI->second, L); + for (unsigned Stride = 0, e = IU->StrideOrder.size(); + Stride != e; ++Stride) { + std::map::iterator SI = + IU->IVUsesByStride.find(IU->StrideOrder[Stride]); + assert(SI != IU->IVUsesByStride.end() && "Stride doesn't exist!"); + // FIXME: Generalize to non-affine IV's. + if (!SI->first->isLoopInvariant(L)) + continue; + StrengthReduceStridedIVUsers(SI->first, *SI->second, L); } } @@ -2708,9 +2571,7 @@ OptimizeLoopCountIV(L); // We're done analyzing this loop; release all the state we built up for it. - IVUsesByStride.clear(); IVsByStride.clear(); - StrideOrder.clear(); StrideNoReuse.clear(); // Clean up after ourselves 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=71535&r1=71534&r2=71535&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 May 11 21:17:14 2009 @@ -1,10 +1,11 @@ ; RUN: llvm-as < %s | llc -march=x86-64 -f -o %t ; RUN: grep inc %t | count 1 ; RUN: grep dec %t | count 2 -; RUN: grep addq %t | count 13 -; RUN: grep leaq %t | count 8 -; RUN: grep leal %t | count 4 -; RUN: grep movq %t | count 5 +; RUN: grep addq %t | count 8 +; RUN: grep addb %t | count 2 +; RUN: grep leaq %t | count 12 +; RUN: grep leal %t | count 2 +; RUN: grep movq %t | count 4 ; IV users in each of the loops from other loops shouldn't cause LSR ; to insert new induction variables. Previously it would create a Modified: llvm/trunk/test/CodeGen/X86/masked-iv-safe.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/masked-iv-safe.ll?rev=71535&r1=71534&r2=71535&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/masked-iv-safe.ll (original) +++ llvm/trunk/test/CodeGen/X86/masked-iv-safe.ll Mon May 11 21:17:14 2009 @@ -3,14 +3,13 @@ ; RUN: not grep movz %t ; RUN: not grep sar %t ; RUN: not grep shl %t -; RUN: grep add %t | count 6 -; RUN: grep inc %t | count 2 -; RUN: grep dec %t | count 4 +; RUN: grep add %t | count 2 +; RUN: grep inc %t | count 4 +; RUN: grep dec %t | count 2 ; RUN: grep lea %t | count 2 ; Optimize away zext-inreg and sext-inreg on the loop induction ; variable using trip-count information. -; Also, the loop-reversal algorithm kicks in twice. define void @count_up(double* %d, i64 %n) nounwind { entry: Modified: llvm/trunk/test/CodeGen/X86/subreg-to-reg-5.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/subreg-to-reg-5.ll?rev=71535&r1=71534&r2=71535&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/subreg-to-reg-5.ll (original) +++ llvm/trunk/test/CodeGen/X86/subreg-to-reg-5.ll Mon May 11 21:17:14 2009 @@ -8,7 +8,8 @@ bb2: ; preds = %bb3, %entry %B_addr.0.rec = phi i64 [ %indvar.next154, %bb3 ], [ 0, %entry ] ; [#uses=2] - br i1 false, label %bb3, label %bb4 + %z = icmp slt i64 %B_addr.0.rec, 20000 + br i1 %z, label %bb3, label %bb4 bb3: ; preds = %bb2 %indvar.next154 = add i64 %B_addr.0.rec, 1 ; [#uses=1] @@ -17,7 +18,7 @@ bb4: ; preds = %bb2 %B_addr.0 = getelementptr float* %B, i64 %B_addr.0.rec ; [#uses=1] %t1 = ptrtoint float* %B_addr.0 to i64 ; [#uses=1] - %t2 = and i64 %t1, 15 ; [#uses=1] + %t2 = and i64 %t1, 4294967295 ; [#uses=1] %t3 = icmp eq i64 %t2, 0 ; [#uses=1] br i1 %t3, label %bb5, label %bb10.preheader @@ -25,7 +26,7 @@ br label %bb9 bb5: ; preds = %bb4 - unreachable + ret float 7.0 bb9: ; preds = %bb10.preheader %t5 = getelementptr float* %B, i64 0 ; [#uses=1] Modified: llvm/trunk/test/Transforms/IndVarSimplify/2009-04-15-shorten-iv-vars-2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/2009-04-15-shorten-iv-vars-2.ll?rev=71535&r1=71534&r2=71535&view=diff ============================================================================== --- llvm/trunk/test/Transforms/IndVarSimplify/2009-04-15-shorten-iv-vars-2.ll (original) +++ llvm/trunk/test/Transforms/IndVarSimplify/2009-04-15-shorten-iv-vars-2.ll Mon May 11 21:17:14 2009 @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | opt -indvars | llvm-dis | not grep {sext} -; RUN: llvm-as < %s | opt -indvars | llvm-dis | not grep {zext} +; RUN: llvm-as < %s | opt -indvars -instcombine | llvm-dis | not grep {\[sz\]ext} ; ModuleID = '' ;extern int *a, *b, *c, *d, *e, *f; /* 64 bit */ ;extern int K[256]; Added: llvm/trunk/test/Transforms/IndVarSimplify/ada-loops.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/ada-loops.ll?rev=71535&view=auto ============================================================================== --- llvm/trunk/test/Transforms/IndVarSimplify/ada-loops.ll (added) +++ llvm/trunk/test/Transforms/IndVarSimplify/ada-loops.ll Mon May 11 21:17:14 2009 @@ -0,0 +1,90 @@ +; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t +; RUN: grep phi %t | count 4 +; RUN: grep {= phi i32} %t | count 4 +; RUN: not grep {sext i} %t +; RUN: not grep {zext i} %t +; RUN: not grep {trunc i} %t +; RUN: not grep {add i8} %t +; PR1301 + +; Do a bunch of analysis and prove that the loops can use an i32 trip +; count without casting. + +; ModuleID = 'ada.bc' +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" +target triple = "i686-pc-linux-gnu" + +define void @kinds__sbytezero([256 x i32]* nocapture %a) nounwind { +bb.thread: + %tmp46 = getelementptr [256 x i32]* %a, i32 0, i32 0 ; [#uses=1] + store i32 0, i32* %tmp46 + br label %bb + +bb: ; preds = %bb, %bb.thread + %i.0.reg2mem.0 = phi i8 [ -128, %bb.thread ], [ %tmp8, %bb ] ; [#uses=1] + %tmp8 = add i8 %i.0.reg2mem.0, 1 ; [#uses=3] + %tmp1 = sext i8 %tmp8 to i32 ; [#uses=1] + %tmp3 = add i32 %tmp1, 128 ; [#uses=1] + %tmp4 = getelementptr [256 x i32]* %a, i32 0, i32 %tmp3 ; [#uses=1] + store i32 0, i32* %tmp4 + %0 = icmp eq i8 %tmp8, 127 ; [#uses=1] + br i1 %0, label %return, label %bb + +return: ; preds = %bb + ret void +} + +define void @kinds__ubytezero([256 x i32]* nocapture %a) nounwind { +bb.thread: + %tmp35 = getelementptr [256 x i32]* %a, i32 0, i32 0 ; [#uses=1] + store i32 0, i32* %tmp35 + br label %bb + +bb: ; preds = %bb, %bb.thread + %i.0.reg2mem.0 = phi i8 [ 0, %bb.thread ], [ %tmp7, %bb ] ; [#uses=1] + %tmp7 = add i8 %i.0.reg2mem.0, 1 ; [#uses=3] + %tmp1 = zext i8 %tmp7 to i32 ; [#uses=1] + %tmp3 = getelementptr [256 x i32]* %a, i32 0, i32 %tmp1 ; [#uses=1] + store i32 0, i32* %tmp3 + %0 = icmp eq i8 %tmp7, -1 ; [#uses=1] + br i1 %0, label %return, label %bb + +return: ; preds = %bb + ret void +} + +define void @kinds__srangezero([21 x i32]* nocapture %a) nounwind { +bb.thread: + br label %bb + +bb: ; preds = %bb, %bb.thread + %i.0.reg2mem.0 = phi i8 [ -10, %bb.thread ], [ %tmp7, %bb ] ; [#uses=2] + %tmp12 = sext i8 %i.0.reg2mem.0 to i32 ; [#uses=1] + %tmp4 = add i32 %tmp12, 10 ; [#uses=1] + %tmp5 = getelementptr [21 x i32]* %a, i32 0, i32 %tmp4 ; [#uses=1] + store i32 0, i32* %tmp5 + %tmp7 = add i8 %i.0.reg2mem.0, 1 ; [#uses=2] + %0 = icmp sgt i8 %tmp7, 10 ; [#uses=1] + br i1 %0, label %return, label %bb + +return: ; preds = %bb + ret void +} + +define void @kinds__urangezero([21 x i32]* nocapture %a) nounwind { +bb.thread: + br label %bb + +bb: ; preds = %bb, %bb.thread + %i.0.reg2mem.0 = phi i8 [ 10, %bb.thread ], [ %tmp7, %bb ] ; [#uses=2] + %tmp12 = sext i8 %i.0.reg2mem.0 to i32 ; [#uses=1] + %tmp4 = add i32 %tmp12, -10 ; [#uses=1] + %tmp5 = getelementptr [21 x i32]* %a, i32 0, i32 %tmp4 ; [#uses=1] + store i32 0, i32* %tmp5 + %tmp7 = add i8 %i.0.reg2mem.0, 1 ; [#uses=2] + %0 = icmp sgt i8 %tmp7, 30 ; [#uses=1] + br i1 %0, label %return, label %bb + +return: ; preds = %bb + ret void +} Added: llvm/trunk/test/Transforms/IndVarSimplify/iv-zext.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/iv-zext.ll?rev=71535&view=auto ============================================================================== --- llvm/trunk/test/Transforms/IndVarSimplify/iv-zext.ll (added) +++ llvm/trunk/test/Transforms/IndVarSimplify/iv-zext.ll Mon May 11 21:17:14 2009 @@ -0,0 +1,33 @@ +; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t +; RUN: not grep and %t +; RUN: not grep zext %t + +target datalayout = "-p:64:64:64" + +define void @foo(double* %d, i64 %n) nounwind { +entry: + br label %loop + +loop: + %indvar = phi i64 [ 0, %entry ], [ %indvar.next, %loop ] + %indvar.i8 = and i64 %indvar, 255 + %t0 = getelementptr double* %d, i64 %indvar.i8 + %t1 = load double* %t0 + %t2 = mul double %t1, 0.1 + store double %t2, double* %t0 + %indvar.i24 = and i64 %indvar, 16777215 + %t3 = getelementptr double* %d, i64 %indvar.i24 + %t4 = load double* %t3 + %t5 = mul double %t4, 2.3 + store double %t5, double* %t3 + %t6 = getelementptr double* %d, i64 %indvar + %t7 = load double* %t6 + %t8 = mul double %t7, 4.5 + store double %t8, double* %t6 + %indvar.next = add i64 %indvar, 1 + %exitcond = icmp eq i64 %indvar.next, 10 + br i1 %exitcond, label %return, label %loop + +return: + ret void +} Added: llvm/trunk/test/Transforms/IndVarSimplify/loop_evaluate_6.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/loop_evaluate_6.ll?rev=71535&view=auto ============================================================================== --- llvm/trunk/test/Transforms/IndVarSimplify/loop_evaluate_6.ll (added) +++ llvm/trunk/test/Transforms/IndVarSimplify/loop_evaluate_6.ll Mon May 11 21:17:14 2009 @@ -0,0 +1,29 @@ +; RUN: llvm-as < %s | opt -indvars -loop-deletion | llvm-dis | grep phi | count 1 + +; Indvars should be able to evaluate this loop, allowing loop deletion +; to delete it. + +define i32 @test(i32 %x_offs) nounwind readnone { +entry: + %0 = icmp sgt i32 %x_offs, 4 ; [#uses=1] + br i1 %0, label %bb.nph, label %bb2 + +bb.nph: ; preds = %entry + br label %bb + +bb: ; preds = %bb1, %bb.nph + %x_offs_addr.01 = phi i32 [ %1, %bb1 ], [ %x_offs, %bb.nph ] ; [#uses=1] + %1 = add i32 %x_offs_addr.01, -4 ; [#uses=3] + br label %bb1 + +bb1: ; preds = %bb + %2 = icmp sgt i32 %1, 4 ; [#uses=1] + br i1 %2, label %bb, label %bb1.bb2_crit_edge + +bb1.bb2_crit_edge: ; preds = %bb1 + br label %bb2 + +bb2: ; preds = %bb1.bb2_crit_edge, %entry + %x_offs_addr.0.lcssa = phi i32 [ %1, %bb1.bb2_crit_edge ], [ %x_offs, %entry ] ; [#uses=1] + ret i32 %x_offs_addr.0.lcssa +} Modified: llvm/trunk/test/Transforms/LoopStrengthReduce/2009-04-28-no-reduce-mul.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopStrengthReduce/2009-04-28-no-reduce-mul.ll?rev=71535&r1=71534&r2=71535&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopStrengthReduce/2009-04-28-no-reduce-mul.ll (original) +++ llvm/trunk/test/Transforms/LoopStrengthReduce/2009-04-28-no-reduce-mul.ll Mon May 11 21:17:14 2009 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep mul | count 3 +; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep {mul.*%lsr.iv} | count 2 ; The multiply in bb2 must not be reduced to an add, as the sext causes the ; %1 argument to become negative after a while. ; ModuleID = '' From bob.wilson at apple.com Mon May 11 22:48:11 2009 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 12 May 2009 03:48:11 -0000 Subject: [llvm-commits] [llvm] r71536 - in /llvm/trunk: lib/CodeGen/CodePlacementOpt.cpp test/CodeGen/ARM/2009-05-11-CodePlacementCrash.ll Message-ID: <200905120348.n4C3mBVZ017818@zion.cs.uiuc.edu> Author: bwilson Date: Mon May 11 22:48:10 2009 New Revision: 71536 URL: http://llvm.org/viewvc/llvm-project?rev=71536&view=rev Log: Fix pr4195: When iterating through predecessor blocks, break out of the loop after finding the (unique) layout predecessor. Sometimes a block may be listed more than once, and processing it more than once in this loop can lead to inconsistent values for FtTBB/FtFBB, since the AnalyzeBranch method does not clear these values. There's no point in continuing the loop regardless. The testcase for this is reduced from the 2003-05-02-DependentPHI SingleSource test. Added: llvm/trunk/test/CodeGen/ARM/2009-05-11-CodePlacementCrash.ll Modified: llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp Modified: llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp?rev=71536&r1=71535&r2=71536&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp (original) +++ llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp Mon May 11 22:48:10 2009 @@ -155,10 +155,10 @@ // A fallthrough. FtMBB = PredMBB; MachineLoop *PL = MLI->getLoopFor(PredMBB); - if (PL && (PL == L || PL->getLoopDepth() >= L->getLoopDepth())) { + if (PL && (PL == L || PL->getLoopDepth() >= L->getLoopDepth())) OkToMove = false; - break; - } + + break; } } Added: llvm/trunk/test/CodeGen/ARM/2009-05-11-CodePlacementCrash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2009-05-11-CodePlacementCrash.ll?rev=71536&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/ARM/2009-05-11-CodePlacementCrash.ll (added) +++ llvm/trunk/test/CodeGen/ARM/2009-05-11-CodePlacementCrash.ll Mon May 11 22:48:10 2009 @@ -0,0 +1,30 @@ +; RUN: llvm-as < %s | llc -march=arm + %struct.List = type { %struct.List*, i32 } + at Node5 = external constant %struct.List ; <%struct.List*> [#uses=1] +@"\01LC" = external constant [7 x i8] ; <[7 x i8]*> [#uses=1] + +define i32 @main() nounwind { +entry: + br label %bb + +bb: ; preds = %bb3, %entry + %CurL.02 = phi %struct.List* [ @Node5, %entry ], [ %2, %bb3 ] ; <%struct.List*> [#uses=1] + %PrevL.01 = phi %struct.List* [ null, %entry ], [ %CurL.02, %bb3 ] ; <%struct.List*> [#uses=1] + %0 = icmp eq %struct.List* %PrevL.01, null ; [#uses=1] + br i1 %0, label %bb3, label %bb1 + +bb1: ; preds = %bb + br label %bb3 + +bb3: ; preds = %bb1, %bb + %iftmp.0.0 = phi i32 [ 0, %bb1 ], [ -1, %bb ] ; [#uses=1] + %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([7 x i8]* @"\01LC", i32 0, i32 0), i32 0, i32 %iftmp.0.0) nounwind ; [#uses=0] + %2 = load %struct.List** null, align 4 ; <%struct.List*> [#uses=2] + %phitmp = icmp eq %struct.List* %2, null ; [#uses=1] + br i1 %phitmp, label %bb5, label %bb + +bb5: ; preds = %bb3 + ret i32 0 +} + +declare i32 @printf(i8* nocapture, ...) nounwind From sanjiv.gupta at microchip.com Mon May 11 23:30:38 2009 From: sanjiv.gupta at microchip.com (Sanjiv Gupta) Date: Tue, 12 May 2009 04:30:38 -0000 Subject: [llvm-commits] [llvm] r71537 - in /llvm/trunk/lib/Target/PIC16: PIC16InstrInfo.h PIC16InstrInfo.td PIC16MemSelOpt.cpp Message-ID: <200905120430.n4C4Ud5m019133@zion.cs.uiuc.edu> Author: sgupta Date: Mon May 11 23:30:38 2009 New Revision: 71537 URL: http://llvm.org/viewvc/llvm-project?rev=71537&view=rev Log: Mark mayLoad, mayStore for insns correctly and use them to check if an insn is accessing memory during mem sel optimization. Modified: llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.h llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.td llvm/trunk/lib/Target/PIC16/PIC16MemSelOpt.cpp Modified: llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.h?rev=71537&r1=71536&r2=71537&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.h Mon May 11 23:30:38 2009 @@ -64,25 +64,7 @@ unsigned &SrcReg, unsigned &DstReg, unsigned &SrcSubIdx, unsigned &DstSubIdx) const; - static inline bool hasNoMemOperand (const MachineInstr &MI) { - - if (MI.getNumOperands() == 0) return true; - - switch (MI.getOpcode()) { - default: return false; // Beware - case PIC16::movlw_lo_1: - case PIC16::movlw_hi_1: - case PIC16::movlw_lo_2: - case PIC16::movlw_hi_2: - return true; - } - } - - - - -}; - + }; } // namespace llvm #endif Modified: llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.td?rev=71537&r1=71536&r2=71537&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.td (original) +++ llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.td Mon May 11 23:30:38 2009 @@ -132,7 +132,7 @@ //===----------------------------------------------------------------------===// // W = W Op F : Load the value from F and do Op to W. -let isTwoAddress = 1 in +let isTwoAddress = 1, mayLoad = 1 in class BinOpFW OpCode, string OpcStr, SDNode OpNode>: ByteFormat OpCode, string OpcStr, SDNode OpNode>: ByteFormat OpCode, SDNode OpNodeDest, SDNode Op>: ByteFormat<0, (outs), (ins GPR:$val, i8imm:$offset, i8mem:$ptrlo, i8imm:$ptrhi), @@ -297,6 +299,7 @@ // Direct load. // Input Operands are: ptrlo = GA, offset = offset, ptrhi = banksel. // Output: dst = W +let mayLoad = 1 in class MOVF_INSN OpCode, SDNode OpNodeSrc, SDNode Op>: ByteFormat<0, (outs GPR:$dst), (ins i8imm:$offset, i8mem:$ptrlo, i8imm:$ptrhi), @@ -357,7 +360,7 @@ } // W -= [F] ; load from F and sub the value from W. -let isTwoAddress = 1 in +let isTwoAddress = 1, mayLoad = 1 in class SUBFW OpCode, string OpcStr, SDNode OpNode>: ByteFormat OpCode, string OpcStr, SDNode OpNode>: ByteFormatgetNumOperands(); - // If this insn has only one operand, probably it is not going to - // access any data memory. - if (PIC16InstrInfo::hasNoMemOperand(*MI)) return Changed; + if (NumOperands == 0) return false; + + + // If this insn is not going to access any memory, return. + const TargetInstrDesc &TID = TII->get(MI->getOpcode()); + if (! (TID.isCall() || TID.mayLoad() || TID.mayStore())) + return false; // Scan for the memory address operand. // FIXME: Should we use standard interfaces like memoperands_iterator, From daniel at zuster.org Tue May 12 00:35:42 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 12 May 2009 05:35:42 -0000 Subject: [llvm-commits] [llvm] r71539 - /llvm/trunk/Makefile.rules Message-ID: <200905120535.n4C5ZgQi021199@zion.cs.uiuc.edu> Author: ddunbar Date: Tue May 12 00:35:40 2009 New Revision: 71539 URL: http://llvm.org/viewvc/llvm-project?rev=71539&view=rev Log: Install bytecode libraries with a .bca suffix, otherwise it isn't possible to build both a .a and a .bca. - My understanding is no one else is using this stuff, please let me know if I am wrong. Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=71539&r1=71538&r2=71539&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue May 12 00:35:40 2009 @@ -1019,7 +1019,7 @@ BytecodeDestDir := $(PROJ_libdir) endif -DestBytecodeLib = $(BytecodeDestDir)/lib$(LIBRARYNAME).a +DestBytecodeLib = $(BytecodeDestDir)/lib$(LIBRARYNAME).bca install-bytecode-local:: $(DestBytecodeLib) From stoklund at 2pi.dk Tue May 12 00:37:36 2009 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 12 May 2009 07:37:36 +0200 Subject: [llvm-commits] [PATCH] Machine code verifier pass In-Reply-To: <6AEB9D2A-D643-4AE4-9740-F51B5519099F@apple.com> References: <04F74F5E-5BCA-4F65-8ED5-CAF353E31497@2pi.dk> <2BC4EDFE-5114-4D65-9976-825231B06394@apple.com> <8B5BCC45-2E12-4BC7-A0AF-3C6B9EA5CCBE@2pi.dk> <6AEB9D2A-D643-4AE4-9740-F51B5519099F@apple.com> Message-ID: On 12/05/2009, at 03.07, Evan Cheng wrote: > How about x86? :-) Here is one from CodeGen/X86/2007-03-01-SpillerCrash.ll: 0x1839d5c, LLVM BB @0x1001e00, ID#3: Live Ins: %XMM1 %XMM2 Predecessors according to CFG: 0x1839b88 (#2) %XMM3 = FsFLD0SS UCOMISSrr %XMM1, %XMM3, %EFLAGS JBE mbb<,0x1839dfc>, %EFLAGS Successors according to CFG: 0x1839dac (#4) 0x1839dfc (#5) : 0x1839dac, LLVM BB @0x1001e30, ID#4: Live Ins: %XMM1 %XMM2 Predecessors according to CFG: 0x1839d5c (#3) %XMM2 = MOVHLPSrr %XMM2, %XMM2 %XMM2 = PSHUFDri %XMM1, 1 %XMM1 = MOVHLPSrr %XMM1, %XMM1 %XMM2 = FsXORPSrm %XMM2, %reg0, 1, %reg0, , %reg0, Mem:LD(4,16) [ConstantPool + 0] JMP mbb Successors according to CFG: 0x1839e4c (#6) *** Bad machine code: Live-in register not live-out from predecessor *** - function: test - basic block: ID#4 Register XMM1 is not live-out from MBB ID#3. There are also physreg double defs in ID#4, but that check is disabled for now. From CodeGen/X86/2007-08-09-IllegalX86-64Asm.ll: bb4: 0xf73718, LLVM BB @0x1006e50, ID#11: Predecessors according to CFG: 0x183a7a8 (#10) 0x183a848 (#13) %RAX = MOV64rm %RAX, 1, %reg0, 96, %reg0, Mem:LD(8,8) [tmp9 + 0] %RDI = MOV64rr %R14 %RSI = MOV64rr %RBX ** Bad machine code: Using an undefined physical register *** - function: ubyte_divmod - basic block: ID#11 - instruction: %RAX = MOV64rm %RAX, 1, %reg0, 96, %reg0, Mem:LD(8,8) [tmp9 + 0] - operand 1: %RAX *** Bad machine code: Using an undefined physical register *** - function: ubyte_divmod - basic block: ID#11 - instruction: %RDI = MOV64rr %R14 - operand 1: %R14 *** Bad machine code: Using an undefined physical register *** - function: ubyte_divmod - basic block: ID#11 - instruction: %RSI = MOV64rr %RBX - operand 1: %RBX From daniel at zuster.org Tue May 12 00:49:22 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 12 May 2009 05:49:22 -0000 Subject: [llvm-commits] [llvm] r71540 - /llvm/trunk/Makefile.rules Message-ID: <200905120549.n4C5nM3x021702@zion.cs.uiuc.edu> Author: ddunbar Date: Tue May 12 00:49:22 2009 New Revision: 71540 URL: http://llvm.org/viewvc/llvm-project?rev=71540&view=rev Log: Remove obsolete Makefile magic for calling llvm-upgrade Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=71540&r1=71539&r2=71540&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue May 12 00:49:22 2009 @@ -431,13 +431,9 @@ LUPGRADE := $(LLVMToolDir)/llvm-upgrade$(EXEEXT) endif ifeq ($(LLVMGCC_MAJVERS),3) -UPGRADE_MSG = $(Echo) "Upgrading $(1) assembly to latest." -UPGRADE_LL = $(Verb)$(LUPGRADE) $(1) -o $(1).up.tmp -f ; $(MV) $(1).up.tmp $(1) LLVMGCCWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGCC) LLVMGXXWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGXX) else -UPGRADE_MSG = -UPGRADE_LL = LLVMGCCWITHPATH := $(LLVMGCC) LLVMGXXWITHPATH := $(LLVMGXX) endif @@ -1261,8 +1257,6 @@ $< -o $@ -S -emit-llvm ; \ then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \ else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi - $(call UPGRADE_MSG,$@) - $(call UPGRADE_LL,$@) $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" @@ -1270,8 +1264,6 @@ $< -o $@ -S -emit-llvm ; \ then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \ else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi - $(call UPGRADE_MSG,$@) - $(call UPGRADE_LL,$@) $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGCC) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" @@ -1279,8 +1271,6 @@ $< -o $@ -S -emit-llvm ; \ then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \ else $(RM) -f "$(ObjDir)/$*.BCCd"; exit 1; fi - $(call UPGRADE_MSG,$@) - $(call UPGRADE_LL,$@) # Provide alternate rule sets if dependencies are disabled else @@ -1300,20 +1290,14 @@ $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" $(BCCompile.CXX) $< -o $@ -S -emit-llvm - $(call UPGRADE_MSG,$@) - $(call UPGRADE_LL,$@) $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" $(BCCompile.CXX) $< -o $@ -S -emit-llvm - $(call UPGRADE_MSG,$@) - $(call UPGRADE_LL,$@) $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGCC) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" $(BCCompile.C) $< -o $@ -S -emit-llvm - $(call UPGRADE_MSG,@) - $(call UPGRADE_LL,@) endif From daniel at zuster.org Tue May 12 01:35:50 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 12 May 2009 06:35:50 -0000 Subject: [llvm-commits] [llvm] r71542 - /llvm/trunk/Makefile.rules Message-ID: <200905120635.n4C6ZoQd023502@zion.cs.uiuc.edu> Author: ddunbar Date: Tue May 12 01:35:50 2009 New Revision: 71542 URL: http://llvm.org/viewvc/llvm-project?rev=71542&view=rev Log: Refactor dependency generation for .ll files. - This matches the normal dependency generation code. - This also fixes the problem that when building a normal and bitcode archive from the same source, the dependency files would overwrite one another. Which was bad. Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=71542&r1=71541&r2=71542&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue May 12 01:35:50 2009 @@ -1227,8 +1227,8 @@ DEPEND_OPTIONS = -MMD -MP -MF "$(ObjDir)/$*.d.tmp" \ -MT "$(ObjDir)/$*.o" -MT "$(ObjDir)/$*.d" -# If the build succeeded, move the dependency file over. If it failed, put an -# empty file there. +# If the build succeeded, move the dependency file over, otherwise +# remove it. DEPEND_MOVEFILE = then $(MV) -f "$(ObjDir)/$*.d.tmp" "$(ObjDir)/$*.d"; \ else $(RM) "$(ObjDir)/$*.d.tmp"; exit 1; fi @@ -1251,26 +1251,31 @@ # Create .bc files in the ObjDir directory from .cpp .cc and .c files... #--------------------------------------------------------- +BC_DEPEND_OPTIONS = -MMD -MP -MF "$(ObjDir)/$*.bc.d.tmp" \ + -MT "$(ObjDir)/$*.ll" -MT "$(ObjDir)/$*.bc.d" + +# If the build succeeded, move the dependency file over, otherwise +# remove it. +BC_DEPEND_MOVEFILE = then $(MV) -f "$(ObjDir)/$*.bc.d.tmp" "$(ObjDir)/$*.bc.d"; \ + else $(RM) "$(ObjDir)/$*.bc.d.tmp"; exit 1; fi + $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" - $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \ - $< -o $@ -S -emit-llvm ; \ - then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \ - else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi + $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ + $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ + $(BC_DEPEND_MOVEFILE) $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" - $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \ - $< -o $@ -S -emit-llvm ; \ - then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \ - else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi + $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ + $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ + $(BC_DEPEND_MOVEFILE) $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGCC) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" - $(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" \ - $< -o $@ -S -emit-llvm ; \ - then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \ - else $(RM) -f "$(ObjDir)/$*.BCCd"; exit 1; fi + $(Verb) if $(BCCompile.C) $(BC_DEPEND_OPTIONS) \ + $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ + $(BC_DEPEND_MOVEFILE) # Provide alternate rule sets if dependencies are disabled else @@ -1521,8 +1526,13 @@ ifndef IS_CLEANING_TARGET # Get the list of dependency files -DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources))) -DependFiles := $(DependFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d) +DependSourceFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources))) +DependFiles := $(DependSourceFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d) + +# Include bitcode dependency files if using bitcode libraries +ifdef BYTECODE_LIBRARY +DependFiles += $(DependSourceFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.bc.d) +endif -include $(DependFiles) "" From daniel at zuster.org Tue May 12 01:47:13 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 12 May 2009 06:47:13 -0000 Subject: [llvm-commits] [llvm] r71543 - in /llvm/trunk: ./ bindings/ocaml/analysis/ bindings/ocaml/bitreader/ bindings/ocaml/bitwriter/ bindings/ocaml/executionengine/ bindings/ocaml/llvm/ bindings/ocaml/target/ bindings/ocaml/transforms/scalar/ examples/BrainF/ examples/Fibonacci/ examples/HowToUseJIT/ examples/ModuleMaker/ examples/ParallelJIT/ lib/Analysis/ lib/Analysis/IPA/ lib/Archive/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/CodeGen/SelectionDAG/ lib/CompilerDriver/ l... Message-ID: <200905120647.n4C6lFN3023909@zion.cs.uiuc.edu> Author: ddunbar Date: Tue May 12 01:47:12 2009 New Revision: 71543 URL: http://llvm.org/viewvc/llvm-project?rev=71543&view=rev Log: Set svn:ignore on a slew of +Coverage directories Modified: llvm/trunk/ (props changed) llvm/trunk/bindings/ocaml/analysis/ (props changed) llvm/trunk/bindings/ocaml/bitreader/ (props changed) llvm/trunk/bindings/ocaml/bitwriter/ (props changed) llvm/trunk/bindings/ocaml/executionengine/ (props changed) llvm/trunk/bindings/ocaml/llvm/ (props changed) llvm/trunk/bindings/ocaml/target/ (props changed) llvm/trunk/bindings/ocaml/transforms/scalar/ (props changed) llvm/trunk/examples/BrainF/ (props changed) llvm/trunk/examples/Fibonacci/ (props changed) llvm/trunk/examples/HowToUseJIT/ (props changed) llvm/trunk/examples/ModuleMaker/ (props changed) llvm/trunk/examples/ParallelJIT/ (props changed) llvm/trunk/lib/Analysis/ (props changed) llvm/trunk/lib/Analysis/IPA/ (props changed) llvm/trunk/lib/Archive/ (props changed) llvm/trunk/lib/AsmParser/ (props changed) llvm/trunk/lib/Bitcode/Reader/ (props changed) llvm/trunk/lib/Bitcode/Writer/ (props changed) llvm/trunk/lib/CodeGen/ (props changed) llvm/trunk/lib/CodeGen/AsmPrinter/ (props changed) llvm/trunk/lib/CodeGen/SelectionDAG/ (props changed) llvm/trunk/lib/CompilerDriver/ (props changed) llvm/trunk/lib/Debugger/ (props changed) llvm/trunk/lib/ExecutionEngine/ (props changed) llvm/trunk/lib/ExecutionEngine/Interpreter/ (props changed) llvm/trunk/lib/ExecutionEngine/JIT/ (props changed) llvm/trunk/lib/Linker/ (props changed) llvm/trunk/lib/Support/ (props changed) llvm/trunk/lib/System/ (props changed) llvm/trunk/lib/Target/ (props changed) llvm/trunk/lib/Target/CBackend/ (props changed) llvm/trunk/lib/Target/X86/ (props changed) llvm/trunk/lib/Target/X86/AsmPrinter/ (props changed) llvm/trunk/lib/Transforms/Hello/ (props changed) llvm/trunk/lib/Transforms/IPO/ (props changed) llvm/trunk/lib/Transforms/Instrumentation/ (props changed) llvm/trunk/lib/Transforms/Scalar/ (props changed) llvm/trunk/lib/Transforms/Utils/ (props changed) llvm/trunk/lib/VMCore/ (props changed) llvm/trunk/projects/sample/ (props changed) llvm/trunk/projects/sample/lib/sample/ (props changed) llvm/trunk/projects/sample/tools/sample/ (props changed) llvm/trunk/tools/bugpoint/ (props changed) llvm/trunk/tools/llc/ (props changed) llvm/trunk/tools/lli/ (props changed) llvm/trunk/tools/llvm-ar/ (props changed) llvm/trunk/tools/llvm-as/ (props changed) llvm/trunk/tools/llvm-bcanalyzer/ (props changed) llvm/trunk/tools/llvm-db/ (props changed) llvm/trunk/tools/llvm-dis/ (props changed) llvm/trunk/tools/llvm-extract/ (props changed) llvm/trunk/tools/llvm-ld/ (props changed) llvm/trunk/tools/llvm-link/ (props changed) llvm/trunk/tools/llvm-nm/ (props changed) llvm/trunk/tools/llvm-prof/ (props changed) llvm/trunk/tools/llvm-ranlib/ (props changed) llvm/trunk/tools/llvm-stub/ (props changed) llvm/trunk/tools/llvmc/driver/ (props changed) llvm/trunk/tools/llvmc/plugins/Base/ (props changed) llvm/trunk/tools/llvmc/plugins/Clang/ (props changed) llvm/trunk/tools/lto/ (props changed) llvm/trunk/tools/opt/ (props changed) llvm/trunk/utils/PerfectShuffle/ (props changed) llvm/trunk/utils/TableGen/ (props changed) llvm/trunk/utils/fpcmp/ (props changed) llvm/trunk/utils/unittest/googletest/ (props changed) Propchange: llvm/trunk/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -16,3 +16,5 @@ *.patch.raw cscope.files cscope.out +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/bindings/ocaml/analysis/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,2 +1,3 @@ Debug Release +Release-Asserts Propchange: llvm/trunk/bindings/ocaml/bitreader/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,2 +1,3 @@ Debug Release +Release-Asserts Propchange: llvm/trunk/bindings/ocaml/bitwriter/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,2 +1,3 @@ Debug Release +Release-Asserts Propchange: llvm/trunk/bindings/ocaml/executionengine/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,2 +1,3 @@ Debug Release +Release-Asserts Propchange: llvm/trunk/bindings/ocaml/llvm/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,2 +1,3 @@ Debug Release +Release-Asserts Propchange: llvm/trunk/bindings/ocaml/target/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,2 +1,3 @@ Release Debug +Release-Asserts Propchange: llvm/trunk/bindings/ocaml/transforms/scalar/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,2 +1,3 @@ Debug Release +Release-Asserts Propchange: llvm/trunk/examples/BrainF/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Release Debug Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/examples/Fibonacci/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/examples/HowToUseJIT/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/examples/ModuleMaker/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/examples/ParallelJIT/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/Analysis/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/lib/Analysis/IPA/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/lib/Archive/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/lib/AsmParser/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/lib/Bitcode/Reader/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/lib/Bitcode/Writer/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/lib/CodeGen/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/CodeGen/AsmPrinter/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/CodeGen/SelectionDAG/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/CompilerDriver/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -2,3 +2,4 @@ Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/Debugger/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/ExecutionEngine/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/ExecutionEngine/Interpreter/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/ExecutionEngine/JIT/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/Linker/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/Support/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/lib/System/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/lib/Target/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/Target/CBackend/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -2,3 +2,4 @@ Release Release-Asserts *.inc +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/Target/X86/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -2,3 +2,4 @@ Release Release-Asserts *.inc +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/Target/X86/AsmPrinter/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/Transforms/Hello/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/Transforms/IPO/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/Transforms/Instrumentation/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/Transforms/Scalar/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/lib/Transforms/Utils/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/lib/VMCore/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/projects/sample/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -5,3 +5,4 @@ config.log config.status mklib +Debug+Coverage-Asserts Propchange: llvm/trunk/projects/sample/lib/sample/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/projects/sample/tools/sample/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/bugpoint/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llc/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/lli/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvm-ar/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvm-as/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvm-bcanalyzer/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvm-db/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvm-dis/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvm-extract/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvm-ld/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvm-link/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvm-nm/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvm-prof/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvm-ranlib/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvm-stub/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvmc/driver/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvmc/plugins/Base/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -3,3 +3,4 @@ Release Release-Asserts Base.td +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/llvmc/plugins/Clang/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -2,3 +2,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/lto/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Release Debug Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/tools/opt/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,4 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts Propchange: llvm/trunk/utils/PerfectShuffle/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/utils/TableGen/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/utils/fpcmp/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts Propchange: llvm/trunk/utils/unittest/googletest/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue May 12 01:47:12 2009 @@ -1,3 +1,5 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Release+Coverage-Asserts From sanjiv.gupta at microchip.com Tue May 12 01:52:41 2009 From: sanjiv.gupta at microchip.com (Sanjiv Gupta) Date: Tue, 12 May 2009 06:52:41 -0000 Subject: [llvm-commits] [llvm] r71544 - in /llvm/trunk/lib/Target/PIC16: PIC16.h PIC16AsmPrinter.cpp Message-ID: <200905120652.n4C6qfhN024069@zion.cs.uiuc.edu> Author: sgupta Date: Tue May 12 01:52:41 2009 New Revision: 71544 URL: http://llvm.org/viewvc/llvm-project?rev=71544&view=rev Log: We do not need to create a label for external defs and decls, just emit a comment for readability. Modified: llvm/trunk/lib/Target/PIC16/PIC16.h llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp Modified: llvm/trunk/lib/Target/PIC16/PIC16.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16.h?rev=71544&r1=71543&r2=71544&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16.h Tue May 12 01:52:41 2009 @@ -234,20 +234,6 @@ return o.str(); } - static std::string getDeclSectionName(void) { - std::string dsname = "section.0"; - dsname = addPrefix(dsname); - return dsname; - } - - // FIXME: currently decls for libcalls are into a separate section. - // merge the rest of decls to one. - static std::string getLibDeclSectionName(void) { - std::string dsname = "lib_decls.0"; - dsname = addPrefix(dsname); - return dsname; - } - inline static bool isLocalName (const std::string &Name) { if (getSymbolTag(Name) == AUTOS_LABEL) return true; Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp?rev=71544&r1=71543&r2=71544&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp Tue May 12 01:52:41 2009 @@ -157,8 +157,7 @@ // If no libcalls used, return. if (Decls.empty()) return; - const Section *S = TAI->getNamedSection(PAN::getLibDeclSectionName().c_str()); - SwitchToSection(S); + O << TAI->getCommentString() << "External decls for libcalls - BEGIN." <<"\n"; // Remove duplicate entries. Decls.sort(); Decls.unique(); @@ -169,6 +168,7 @@ O << TAI->getExternDirective() << PAN::getArgsLabel(*I) << "\n"; O << TAI->getExternDirective() << PAN::getRetvalLabel(*I) << "\n"; } + O << TAI->getCommentString() << "External decls for libcalls - END." <<"\n"; } bool PIC16AsmPrinter::doInitialization (Module &M) { @@ -191,7 +191,7 @@ void PIC16AsmPrinter::EmitExternsAndGlobals (Module &M) { // Emit declarations for external functions. - O << PAN::getDeclSectionName() <<"\n"; + O << TAI->getCommentString() << "External defs and decls - BEGIN." <<"\n"; for (Module::iterator I = M.begin(), E = M.end(); I != E; I++) { std::string Name = Mang->getValueName(I); if (Name.compare("@abort") == 0) @@ -233,6 +233,7 @@ TAI->getGlobalDirective(); O << directive << Name << "\n"; } + O << TAI->getCommentString() << "External defs and decls - END." <<"\n"; } void PIC16AsmPrinter::EmitRomData (Module &M) From daniel at zuster.org Tue May 12 02:26:49 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 12 May 2009 07:26:49 -0000 Subject: [llvm-commits] [llvm] r71545 - /llvm/trunk/Makefile.rules Message-ID: <200905120726.n4C7Qn8E025282@zion.cs.uiuc.edu> Author: ddunbar Date: Tue May 12 02:26:49 2009 New Revision: 71545 URL: http://llvm.org/viewvc/llvm-project?rev=71545&view=rev Log: Allow client Makefiles control over whether they want -pedantic by defining NO_PEDANTIC. - Pedantic C89 is a painful language... Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=71545&r1=71544&r2=71545&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue May 12 02:26:49 2009 @@ -515,7 +515,10 @@ # Options To Invoke Tools #---------------------------------------------------------- -CompileCommonOpts += -pedantic -Wall -W -Wwrite-strings -Wno-long-long \ +ifndef NO_PEDANTIC +CompileCommonOpts += -pedantic +endif +CompileCommonOpts += -Wall -W -Wwrite-strings -Wno-long-long \ -Wunused -Wno-unused-parameter $(EXTRA_OPTIONS) ifeq ($(OS),HP-UX) From daniel at zuster.org Tue May 12 02:48:10 2009 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 12 May 2009 07:48:10 -0000 Subject: [llvm-commits] [klee] r71546 - /klee/trunk/www/menu.html.incl Message-ID: <200905120748.n4C7mA4M000470@zion.cs.uiuc.edu> Author: ddunbar Date: Tue May 12 02:48:09 2009 New Revision: 71546 URL: http://llvm.org/viewvc/llvm-project?rev=71546&view=rev Log: Add a few useful links Modified: klee/trunk/www/menu.html.incl Modified: klee/trunk/www/menu.html.incl URL: http://llvm.org/viewvc/llvm-project/klee/trunk/www/menu.html.incl?rev=71546&r1=71545&r2=71546&view=diff ============================================================================== --- klee/trunk/www/menu.html.incl (original) +++ klee/trunk/www/menu.html.incl Tue May 12 02:48:09 2009 @@ -7,4 +7,11 @@ About + + From baldrick at free.fr Tue May 12 03:11:10 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 12 May 2009 10:11:10 +0200 Subject: [llvm-commits] [llvm] r71410 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp In-Reply-To: <16e5fdf90905111354w7943aa5fp44d8539b9d91d8d@mail.gmail.com> References: <200905102314.n4ANEdP9010260@zion.cs.uiuc.edu> <99CEAE6F-A380-404D-9081-1BA1D8CB74F3@apple.com> <16e5fdf90905111354w7943aa5fp44d8539b9d91d8d@mail.gmail.com> Message-ID: <200905121011.11102.baldrick@free.fr> > > The body for "bar" is gone by the time llvm_asm_file_end is called: I > > think the tree inliner is still being used??? > > > Pain! >.< > > Duncan, I think you're the expert in this area. Ha! The tree inliner is way too complicated for any mere mortal to understand :) > Do you have an idea about this? :-) I may take a look tomorrow. Ciao, Duncan. From baldrick at free.fr Tue May 12 04:05:54 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 12 May 2009 11:05:54 +0200 Subject: [llvm-commits] [llvm] r71535 - in /llvm/trunk: include/llvm/Analysis/ lib/Analysis/ lib/Target/ lib/Transforms/Scalar/ test/CodeGen/X86/ test/Transforms/IndVarSimplify/ test/Transforms/LoopStrengthReduce/ In-Reply-To: <200905120217.n4C2HFP0014960@zion.cs.uiuc.edu> References: <200905120217.n4C2HFP0014960@zion.cs.uiuc.edu> Message-ID: <200905121105.54778.baldrick@free.fr> Hi Dan, thank you for doing this! > Now that IndVarSimplify is being more aggressive, it occasionally runs > into the problem where ScalarEvolutionExpander's code for avoiding > duplicate expansions makes it difficult to ensure that all expanded > instructions dominate all the instructions that will use them. As a > temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function > to fix up instructions inserted by SCEVExpander. Fortunately, this code > is contained, and can be easily removed once a more comprehensive > solution is available. Unfortunately this causes several Ada testsuite failures. I've attached a reduced testcase (all the failures seem be to for the same reason). $ opt -indvars c35503g.bc -disable-output opt: llvm/include/llvm/ADT/ilist.h:197: typename bidirectional_iterator::reference llvm::ilist_iterator::operator*() const [with NodeTy = llvm::Instruction]: Assertion `Traits::getNext(NodePtr) != 0 && "Dereferencing end()!"' failed. 0 opt 0x08448bc8 Stack dump: 0. Running pass 'Function Pass Manager' on module 'c35503g.bc'. 1. Running pass 'Loop Pass Manager' on function '@_ada_c35503g' 2. Running pass 'Canonicalize Induction Variables' on basic block '%bb123' -------------- next part -------------- ; ModuleID = 'c35503g.bc' 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" target triple = "i386-pc-linux-gnu" %struct.string___XUB = type { i32, i32 } %struct.string___XUP = type { [0 x i8]*, %struct.string___XUB* } @.str7 = external constant [24 x i8] ; <[24 x i8]*> [#uses=1] @C.17.316 = external constant %struct.string___XUB ; <%struct.string___XUB*> [#uses=1] define void @_ada_c35503g() { entry: br label %bb bb: ; preds = %bb, %entry br i1 false, label %bb65.loopexit, label %bb bb65.loopexit: ; preds = %bb br label %bb123 bb123: ; preds = %bb178, %bb65.loopexit %i.0 = phi i32 [ %3, %bb178 ], [ 0, %bb65.loopexit ] ; [#uses=3] %0 = invoke i32 @report__ident_int(i32 1) to label %invcont127 unwind label %lpad266 ; [#uses=1] invcont127: ; preds = %bb123 %1 = sub i32 %i.0, %0 ; [#uses=1] %2 = icmp eq i32 0, %1 ; [#uses=1] br i1 %2, label %bb178, label %bb128 bb128: ; preds = %invcont127 invoke void @system__img_int__image_integer(%struct.string___XUP* noalias sret null, i32 %i.0) to label %invcont129 unwind label %lpad266 invcont129: ; preds = %bb128 invoke void @system__string_ops__str_concat(%struct.string___XUP* noalias sret null, [0 x i8]* bitcast ([24 x i8]* @.str7 to [0 x i8]*), %struct.string___XUB* @C.17.316, [0 x i8]* null, %struct.string___XUB* null) to label %invcont138 unwind label %lpad266 invcont138: ; preds = %invcont129 unreachable bb178: ; preds = %invcont127 %3 = add i32 %i.0, 1 ; [#uses=1] br label %bb123 lpad266: ; preds = %invcont129, %bb128, %bb123 unreachable } declare void @system__img_int__image_integer(%struct.string___XUP* noalias sret, i32) declare void @system__string_ops__str_concat(%struct.string___XUP* noalias sret, [0 x i8]*, %struct.string___XUB*, [0 x i8]*, %struct.string___XUB*) declare i32 @report__ident_int(i32) From jay.foad at gmail.com Tue May 12 06:57:31 2009 From: jay.foad at gmail.com (Jay Foad) Date: Tue, 12 May 2009 12:57:31 +0100 Subject: [llvm-commits] [llvm] r71427 - /llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp In-Reply-To: <200905111650.07465.baldrick@free.fr> References: <200905111132.n4BBWxYr011297@zion.cs.uiuc.edu> <200905111650.07465.baldrick@free.fr> Message-ID: >> +// Return the integer value Val zero-extended or truncated (if necessary) to >> +// type ITy. Any new instructions are inserted at InsertBefore. > > this sounds like a generally useful thing, so shouldn't be here. > Doesn't the IRBuilder stuff already do this? ?If so, why not just > use a builder here? You're right; IRBuilder::CreateIntCast() already does everything that my helper function does. How about this patch, which converts the whole of IntrinsicLowering.cpp to use IRBuilder? It passes "make check". Incidentally, is there any reason why all the IRBuilder::CreateXXX functions take "const char *Name" instead of "const std::string &Name" (like the underlying XXXInst::Create() functions)? It's a bit of a pain, because it means I can't write: New = Builder.CreateXXX(..., Old->getName()); Thanks, Jay. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.licbuilder Type: application/octet-stream Size: 31751 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090512/40264361/attachment.obj From baldrick at free.fr Tue May 12 09:54:10 2009 From: baldrick at free.fr (Duncan Sands) Date: Tue, 12 May 2009 14:54:10 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r71555 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h Message-ID: <200905121454.n4CEsB3r023778@zion.cs.uiuc.edu> Author: baldrick Date: Tue May 12 09:54:03 2009 New Revision: 71555 URL: http://llvm.org/viewvc/llvm-project?rev=71555&view=rev Log: Reapply r71425, tweaked to be more laid back about how void* is converted to an LLVM type. Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp llvm-gcc-4.2/trunk/gcc/llvm-internal.h 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=71555&r1=71554&r2=71555&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue May 12 09:54:03 2009 @@ -930,6 +930,12 @@ assert(((DestLoc && Result == 0) || DestLoc == 0) && "Expected a scalar or aggregate but got the wrong thing!"); + // Check that the type of the result matches that of the tree node. If the + // result is not used then GCC sometimes sets the tree type to VOID_TYPE, so + // don't take VOID_TYPE too seriously here. + assert((Result == 0 || VOID_TYPE_P(TREE_TYPE(exp)) || + Result->getType() == ConvertType(TREE_TYPE(exp))) && + "Value has wrong type!"); return Result; } @@ -937,6 +943,8 @@ /// the address of the result. LValue TreeToLLVM::EmitLV(tree exp) { // Needs to be in sync with EmitVIEW_CONVERT_EXPR. + LValue LV(0, 0); + switch (TREE_CODE(exp)) { default: std::cerr << "Unhandled lvalue expression!\n"; @@ -947,44 +955,79 @@ case VAR_DECL: case FUNCTION_DECL: case CONST_DECL: - case RESULT_DECL: return EmitLV_DECL(exp); + case RESULT_DECL: + LV = EmitLV_DECL(exp); + break; case ARRAY_RANGE_REF: - case ARRAY_REF: return EmitLV_ARRAY_REF(exp); - case COMPONENT_REF: return EmitLV_COMPONENT_REF(exp); - case BIT_FIELD_REF: return EmitLV_BIT_FIELD_REF(exp); - case REALPART_EXPR: return EmitLV_XXXXPART_EXPR(exp, 0); - case IMAGPART_EXPR: return EmitLV_XXXXPART_EXPR(exp, 1); + case ARRAY_REF: + LV = EmitLV_ARRAY_REF(exp); + break; + case COMPONENT_REF: + LV = EmitLV_COMPONENT_REF(exp); + break; + case BIT_FIELD_REF: + LV = EmitLV_BIT_FIELD_REF(exp); + break; + case REALPART_EXPR: + LV = EmitLV_XXXXPART_EXPR(exp, 0); + break; + case IMAGPART_EXPR: + LV = EmitLV_XXXXPART_EXPR(exp, 1); + break; // Constants. case LABEL_DECL: { Value *Ptr = TreeConstantToLLVM::EmitLV_LABEL_DECL(exp); - return LValue(Ptr, DECL_ALIGN(exp) / 8); + LV = LValue(Ptr, DECL_ALIGN(exp) / 8); + break; } case COMPLEX_CST: { Value *Ptr = TreeConstantToLLVM::EmitLV_COMPLEX_CST(exp); - return LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); + LV = LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); + break; } case STRING_CST: { Value *Ptr = TreeConstantToLLVM::EmitLV_STRING_CST(exp); - return LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); + LV = LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); + break; } // Type Conversion. - case VIEW_CONVERT_EXPR: return EmitLV_VIEW_CONVERT_EXPR(exp); + case VIEW_CONVERT_EXPR: + LV = EmitLV_VIEW_CONVERT_EXPR(exp); + break; // Exception Handling. - case EXC_PTR_EXPR: return EmitLV_EXC_PTR_EXPR(exp); - case FILTER_EXPR: return EmitLV_FILTER_EXPR(exp); + case EXC_PTR_EXPR: + LV = EmitLV_EXC_PTR_EXPR(exp); + break; + case FILTER_EXPR: + LV = EmitLV_FILTER_EXPR(exp); + break; // Trivial Cases. case WITH_SIZE_EXPR: // The address is the address of the operand. - return EmitLV(TREE_OPERAND(exp, 0)); + LV = EmitLV(TREE_OPERAND(exp, 0)); + break; case INDIRECT_REF: // The lvalue is just the address. - return LValue(Emit(TREE_OPERAND(exp, 0), 0), - expr_align(exp) / 8); + LV = LValue(Emit(TREE_OPERAND(exp, 0), 0), expr_align(exp) / 8); + // Correct for implicit type conversion: INDIRECT_REF can be applied to a + // void*, resulting in a non-void type. + LV.Ptr = BitCastToType(LV.Ptr, ConvertType(TREE_TYPE(exp))->getPointerTo()); + break; } + + // Check that the type of the lvalue is indeed that of a pointer to the tree + // node. This may not hold for bitfields because the type of a bitfield need + // not match the type of the value being loaded out of it. Since LLVM has no + // void* type, don't insist that void* be converted to a specific LLVM type. + assert((LV.isBitfield() || VOID_TYPE_P(TREE_TYPE(exp)) || + LV.Ptr->getType() == ConvertType(TREE_TYPE(exp))->getPointerTo()) && + "LValue has wrong type!"); + + return LV; } //===----------------------------------------------------------------------===// @@ -1297,8 +1340,8 @@ Emit(TYPE_SIZE_UNIT(type), 0), DestLoc.Alignment); } -void TreeToLLVM::EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, - unsigned Align) { +Value *TreeToLLVM::EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, + unsigned Align) { const Type *SBP = PointerType::getUnqual(Type::Int8Ty); const Type *IntPtr = TD.getIntPtrType(); Value *Ops[4] = { @@ -1310,10 +1353,11 @@ Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memcpy, &IntPtr, 1), Ops, Ops+4); + return Ops[0]; } -void TreeToLLVM::EmitMemMove(Value *DestPtr, Value *SrcPtr, Value *Size, - unsigned Align) { +Value *TreeToLLVM::EmitMemMove(Value *DestPtr, Value *SrcPtr, Value *Size, + unsigned Align) { const Type *SBP = PointerType::getUnqual(Type::Int8Ty); const Type *IntPtr = TD.getIntPtrType(); Value *Ops[4] = { @@ -1325,10 +1369,11 @@ Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memmove, &IntPtr, 1), Ops, Ops+4); + return Ops[0]; } -void TreeToLLVM::EmitMemSet(Value *DestPtr, Value *SrcVal, Value *Size, - unsigned Align) { +Value *TreeToLLVM::EmitMemSet(Value *DestPtr, Value *SrcVal, Value *Size, + unsigned Align) { const Type *SBP = PointerType::getUnqual(Type::Int8Ty); const Type *IntPtr = TD.getIntPtrType(); Value *Ops[4] = { @@ -1340,6 +1385,7 @@ Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memset, &IntPtr, 1), Ops, Ops+4); + return Ops[0]; } @@ -3125,22 +3171,18 @@ Value *TreeToLLVM::EmitBIT_NOT_EXPR(tree exp) { Value *Op = Emit(TREE_OPERAND(exp, 0), 0); - if (isa(Op->getType())) { + const Type *Ty = Op->getType(); + if (isa(Ty)) { assert (TREE_CODE(TREE_TYPE(exp)) == INTEGER_TYPE && "Expected integer type here"); - Op = CastToType(Instruction::PtrToInt, Op, TREE_TYPE(exp)); - } - - const Type *Ty = Op->getType(); - if (Ty->isFloatingPoint() || - (isa(Ty) && - cast(Ty)->getElementType()->isFloatingPoint())) { - Ty = getSuitableBitCastIntType(Ty); - if (!Ty) - abort(); - Op = BitCastToType(Op, Ty); + Ty = ConvertType(TREE_TYPE(exp)); + Op = CastToType(Instruction::PtrToInt, Op, Ty); + } else if (Ty->isFloatingPoint() || + (isa(Ty) && + cast(Ty)->getElementType()->isFloatingPoint())) { + Op = BitCastToType(Op, getSuitableBitCastIntType(Ty)); } - return Builder.CreateNot(Op, (Op->getName()+"not").c_str()); + return BitCastToType(Builder.CreateNot(Op, (Op->getName()+"not").c_str()),Ty); } Value *TreeToLLVM::EmitTRUTH_NOT_EXPR(tree exp) { @@ -3237,13 +3279,11 @@ (isa(Ty) && cast(Ty)->getElementType()->isFloatingPoint()))) { Ty = getSuitableBitCastIntType(Ty); - if (!Ty) - abort(); LHS = BitCastToType(LHS, Ty); RHS = BitCastToType(RHS, Ty); } - Value * V = Builder.CreateBinOp((Instruction::BinaryOps)Opc, LHS, RHS); + Value *V = Builder.CreateBinOp((Instruction::BinaryOps)Opc, LHS, RHS); if (ResTy != Ty) V = BitCastToType(V, ResTy); return V; @@ -4375,7 +4415,8 @@ Ty, 2), C, C + 3); if (isBool) - Result = Builder.CreateICmpEQ(Result, C[1]); + Result = CastToUIntType(Builder.CreateICmpEQ(Result, C[1]), + ConvertType(boolean_type_node)); else Result = Builder.CreateIntToPtr(Result, ResultTy); return Result; @@ -4633,6 +4674,7 @@ Value *Amt = Emit(TREE_VALUE(TREE_OPERAND(exp, 1)), 0); EmitBuiltinUnaryOp(Amt, Result, Intrinsic::cttz); Result = Builder.CreateAdd(Result, ConstantInt::get(Result->getType(), 1)); + Result = CastToUIntType(Result, ConvertType(TREE_TYPE(exp))); Value *Cond = Builder.CreateICmpEQ(Amt, Constant::getNullValue(Amt->getType())); Result = Builder.CreateSelect(Cond, @@ -5063,7 +5105,7 @@ } bool TreeToLLVM::EmitBuiltinUnaryOp(Value *InVal, Value *&Result, - Intrinsic::ID Id) { + Intrinsic::ID Id) { // The intrinsic might be overloaded in which case the argument is of // varying type. Make sure that we specify the actual type for "iAny" // by passing it as the 3rd and 4th parameters. This isn't needed for @@ -5191,11 +5233,9 @@ return false; } - if (isMemMove) - EmitMemMove(DstV, SrcV, Len, std::min(SrcAlign, DstAlign)); - else + Result = isMemMove ? + EmitMemMove(DstV, SrcV, Len, std::min(SrcAlign, DstAlign)) : EmitMemCpy(DstV, SrcV, Len, std::min(SrcAlign, DstAlign)); - Result = DstV; return true; } @@ -5223,8 +5263,7 @@ if (!OptimizeIntoPlainBuiltIn(exp, Len, Size)) return false; } - EmitMemSet(DstV, Val, Len, DstAlign); - Result = DstV; + Result = EmitMemSet(DstV, Val, Len, DstAlign); return true; } @@ -6240,7 +6279,7 @@ const Type *EltTy = ConvertType(TREE_TYPE(exp)); FieldPtr = BitCastToType(FieldPtr, PointerType::getUnqual(EltTy)); } - + assert(BitStart == 0 && "It's a bitfield reference or we didn't get to the field!"); return LValue(FieldPtr, LVAlign); @@ -7228,6 +7267,8 @@ //===----------------------------------------------------------------------===// Constant *TreeConstantToLLVM::EmitLV(tree exp) { + Constant *LV; + switch (TREE_CODE(exp)) { default: debug_tree(exp); @@ -7235,16 +7276,29 @@ abort(); case FUNCTION_DECL: case CONST_DECL: - case VAR_DECL: return EmitLV_Decl(exp); - case LABEL_DECL: return EmitLV_LABEL_DECL(exp); - case COMPLEX_CST: return EmitLV_COMPLEX_CST(exp); - case STRING_CST: return EmitLV_STRING_CST(exp); - case COMPONENT_REF: return EmitLV_COMPONENT_REF(exp); + case VAR_DECL: + LV = EmitLV_Decl(exp); + break; + case LABEL_DECL: + LV = EmitLV_LABEL_DECL(exp); + break; + case COMPLEX_CST: + LV = EmitLV_COMPLEX_CST(exp); + break; + case STRING_CST: + LV = EmitLV_STRING_CST(exp); + break; + case COMPONENT_REF: + LV = EmitLV_COMPONENT_REF(exp); + break; case ARRAY_RANGE_REF: - case ARRAY_REF: return EmitLV_ARRAY_REF(exp); + case ARRAY_REF: + LV = EmitLV_ARRAY_REF(exp); + break; case INDIRECT_REF: // The lvalue is just the address. - return Convert(TREE_OPERAND(exp, 0)); + LV = Convert(TREE_OPERAND(exp, 0)); + break; case COMPOUND_LITERAL_EXPR: // FIXME: not gimple - defined by C front-end /* This used to read return EmitLV(COMPOUND_LITERAL_EXPR_DECL(exp)); @@ -7252,8 +7306,18 @@ with casts or the like. The following is equivalent with no checking (since we know TREE_CODE(exp) is COMPOUND_LITERAL_EXPR the checking doesn't accomplish anything anyway). */ - return EmitLV(DECL_EXPR_DECL (TREE_OPERAND (exp, 0))); + LV = EmitLV(DECL_EXPR_DECL (TREE_OPERAND (exp, 0))); + break; } + + // Check that the type of the lvalue is indeed that of a pointer to the tree + // node. Since LLVM has no void* type, don't insist that void* be converted + // to a specific LLVM type. + assert((VOID_TYPE_P(TREE_TYPE(exp)) || + LV->getType() == ConvertType(TREE_TYPE(exp))->getPointerTo()) && + "LValue of constant has wrong type!"); + + return LV; } Constant *TreeConstantToLLVM::EmitLV_Decl(tree exp) { @@ -7283,8 +7347,13 @@ if (tree ID = DECL_ASSEMBLER_NAME(exp)) mark_referenced(ID); } - - return Val; + + // The type of the global value output for exp need not match that of exp. + // For example if the global's initializer has a different type to the global + // itself (allowed in GCC but not in LLVM) then the global is changed to have + // the type of the initializer. Correct for this now. + return TheFolder->CreateBitCast(Val, + ConvertType(TREE_TYPE(exp))->getPointerTo()); } /// EmitLV_LABEL_DECL - Someone took the address of a label. @@ -7385,18 +7454,6 @@ if (!integer_zerop(LowerBound)) Index = fold(build2(MINUS_EXPR, IndexType, Index, LowerBound)); ArrayAddr = EmitLV(Array); - - // The GCC array expression value may not compile to an LLVM array type if - // (for example) the array value is an array of unions. In this case, the - // array literal will turn into an LLVM constant struct, which has struct - // type. Do a cast to the correct type just to be certain everything is - // kosher. - const PointerType *ResPTy = cast(ArrayAddr->getType()); - if (!isa(ResPTy->getElementType())) { - const Type *RealArrayTy = ConvertType(ArrayType); - ResPTy = PointerType::getUnqual(RealArrayTy); - ArrayAddr = TheFolder->CreateBitCast(ArrayAddr, ResPTy); - } } else { ArrayAddr = Convert(Array); } Modified: llvm-gcc-4.2/trunk/gcc/llvm-internal.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-internal.h?rev=71555&r1=71554&r2=71555&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-internal.h (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-internal.h Tue May 12 09:54:03 2009 @@ -430,10 +430,11 @@ void EmitAggregateZero(MemRef DestLoc, tree_node *GCCType); /// EmitMemCpy/EmitMemMove/EmitMemSet - Emit an llvm.memcpy/llvm.memmove or - /// llvm.memset call with the specified operands. - void EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align); - void EmitMemMove(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align); - void EmitMemSet(Value *DestPtr, Value *SrcVal, Value *Size, unsigned Align); + /// llvm.memset call with the specified operands. Returns DestPtr bitcast + /// to i8*. + Value *EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align); + Value *EmitMemMove(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align); + Value *EmitMemSet(Value *DestPtr, Value *SrcVal, Value *Size, unsigned Align); /// EmitLandingPads - Emit EH landing pads. void EmitLandingPads(); From grosbach at apple.com Tue May 12 10:00:35 2009 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 12 May 2009 08:00:35 -0700 Subject: [llvm-commits] [PATCH] Machine code verifier pass In-Reply-To: <6AEB9D2A-D643-4AE4-9740-F51B5519099F@apple.com> References: <04F74F5E-5BCA-4F65-8ED5-CAF353E31497@2pi.dk> <2BC4EDFE-5114-4D65-9976-825231B06394@apple.com> <8B5BCC45-2E12-4BC7-A0AF-3C6B9EA5CCBE@2pi.dk> <6AEB9D2A-D643-4AE4-9740-F51B5519099F@apple.com> Message-ID: <681700F5-892D-499D-B8A0-C13135201729@apple.com> On May 11, 2009, at 6:07 PM, Evan Cheng wrote: > > On May 11, 2009, at 1:45 PM, Jakob Stoklund Olesen wrote: > >> >> On 11/05/2009, at 20.43, Evan Cheng wrote: >>> + const MachineBasicBlock *MBB; >>> + BBInfo *MBBInfo; >>> + const MachineInstr *MI; >>> + const MachineOperand *MO; >>> >>> I find it strange that these are class ivars. Can you change them to >>> local variables and parameters? >> >> They provide context information to the report() messages, but you >> are >> right, it is a bit weird. Functions declaring local variables of the >> same name doesn't help either. I'll change it. > > Thanks. > >> >>> +void >>> +MachineVerifier::calcMaxRegsPassed() >>> +{ >>> + // First push live-out regs to successors' vregsPassed. Remember >>> the MBBs that >>> + // have any vregsPassed. >>> + DenseSet todo; >>> + for (MachineFunction::const_iterator MFI = MF->begin(), MFE = MF- >>>> end(); >>> + MFI != MFE; ++MFI) { >>> + const MachineBasicBlock &MBB(*MFI); >>> + BBInfo &MInfo = MBBInfoMap[&MBB]; >>> + for (MachineBasicBlock::const_succ_iterator SuI = >>> MBB.succ_begin(), >>> + SuE = MBB.succ_end(); SuI != SuE; ++SuI) { >>> + BBInfo &SInfo = MBBInfoMap[*SuI]; >>> + if (SInfo.addPassed(MInfo.regsLiveOut)) >>> + todo.insert(*SuI); >>> + } >>> + } >>> + >>> + // Iteratively push vregsPassed to successors until convergence. >>> + while (!todo.empty()) { >>> >>> I don't think the order of iteration of DenseSet is deterministic. >> >> That is true, but it shouldn't matter. The algorithm will converge to >> the same final state regardless of the iteration order. > > Ok. > >> >>> + // If any regs removed, we need to recheck successors >>> >>> Missing a period at the end of the sentence. >> >> Fixed. >> >>> Have you had a chance running this through some code? >> >> Yes, I am using it with all my Blackfin test cases. I have also tried >> enabling it permanently when running the CodeGen test suite. >> >> CodeGen/ARM reveals that the verifier does not handle PHI >> instructions >> properly. I will have to rework this! I also get lots of these >> errors: >> >> *** Bad machine code: Illegal physical register for instruction *** >> - function: f1 >> - basic block: ID#0 >> - instruction: %SP = tADDspi %SP, 1 >> - operand 0: %SP >> SP is not a tGPR register. >> >> This is not a real error - the thumb back-end rewrites these >> instructions at a later stage, I think. > > Hrm. I would think tADDspi should be changed to target GPR instead > of tGPR since it's supposed to update SP. Jim, is there a reason why > that's not the case? Looks like GPR is correct to me. There's no special reason to use tGPR there. > > > How about x86? :-) >> >> >> >> >> Evan, thanks for reviewing. I will implement your suggestions, and I >> will also need do deal with PHI nodes and EH landing pads properly. >> Then I'll submit a new patch. > > Great. Thanks. > > Evan > >> >> /jakob >> >> _______________________________________________ >> 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 May 12 11:52:30 2009 From: clattner at apple.com (Chris Lattner) Date: Tue, 12 May 2009 09:52:30 -0700 Subject: [llvm-commits] [llvm] r71427 - /llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp In-Reply-To: References: <200905111132.n4BBWxYr011297@zion.cs.uiuc.edu> <200905111650.07465.baldrick@free.fr> Message-ID: <812979AC-5D3D-4DC7-8945-7FA6A425DF01@apple.com> On May 12, 2009, at 4:57 AM, Jay Foad wrote: >>> +// Return the integer value Val zero-extended or truncated (if >>> necessary) to >>> +// type ITy. Any new instructions are inserted at InsertBefore. >> >> this sounds like a generally useful thing, so shouldn't be here. > >> Doesn't the IRBuilder stuff already do this? If so, why not just >> use a builder here? > > You're right; IRBuilder::CreateIntCast() already does everything that > my helper function does. How about this patch, which converts the > whole of IntrinsicLowering.cpp to use IRBuilder? It passes "make > check". Patch looks great! Please apply. > Incidentally, is there any reason why all the IRBuilder::CreateXXX > functions take "const char *Name" instead of "const std::string &Name" > (like the underlying XXXInst::Create() functions)? It's a bit of a > pain, because it means I can't write: > > New = Builder.CreateXXX(..., Old->getName()); The reason is that most clients of IRBuilder pass in literal strings like "tmp". If IRBuilder took an std::string&, this would require a temporary std::string to be allocated which would copy the literal into a temporary on the heap. Passing down const char* allows us to avoid the extra copy. The whole naming situation in the low level IR methods is something of a mess, it's somewhere on my todo list to clean it up. -Chris From sanjiv.gupta at microchip.com Tue May 12 12:07:37 2009 From: sanjiv.gupta at microchip.com (Sanjiv Gupta) Date: Tue, 12 May 2009 17:07:37 -0000 Subject: [llvm-commits] [llvm] r71560 - in /llvm/trunk/lib/Target/PIC16: PIC16AsmPrinter.cpp PIC16AsmPrinter.h PIC16TargetAsmInfo.cpp PIC16TargetAsmInfo.h Message-ID: <200905121707.n4CH7ekn029446@zion.cs.uiuc.edu> Author: sgupta Date: Tue May 12 12:07:27 2009 New Revision: 71560 URL: http://llvm.org/viewvc/llvm-project?rev=71560&view=rev Log: Iterate over globals once and sectionize them into appropriate sections. Later in asmprinter, go over thsese sections and print them. Do not print empty sections. Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h 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=71560&r1=71559&r2=71560&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp Tue May 12 12:07:27 2009 @@ -164,7 +164,6 @@ for (std::list::const_iterator I = Decls.begin(); I != Decls.end(); I++) { O << TAI->getExternDirective() << *I << "\n"; - // FIXME: Use PAN::getXXXLabel() funtions hrer. O << TAI->getExternDirective() << PAN::getArgsLabel(*I) << "\n"; O << TAI->getExternDirective() << PAN::getRetvalLabel(*I) << "\n"; } @@ -183,8 +182,16 @@ assert(DW && "Dwarf Writer is not available"); DW->BeginModule(&M, MMI, O, this, TAI); + // Set the section names for all globals. + for (Module::global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ++I) { + I->setSection(TAI->SectionForGlobal(I)->getName()); + } + EmitExternsAndGlobals (M); - EmitGlobalData(M); + EmitIData(M); + EmitUData(M); + EmitAutos(M); EmitRomData(M); return Result; } @@ -238,31 +245,19 @@ void PIC16AsmPrinter::EmitRomData (Module &M) { - SwitchToSection(TAI->getReadOnlySection()); - for (Module::global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) { - if (!I->hasInitializer()) // External global require no code. - continue; + const PIC16TargetAsmInfo *PTAI = static_cast(TAI); - Constant *C = I->getInitializer(); - const PointerType *PtrTy = I->getType(); - int AddrSpace = PtrTy->getAddressSpace(); - if ((!C->isNullValue()) && (AddrSpace == PIC16ISD::ROM_SPACE)) { - - if (EmitSpecialLLVMGlobal(I)) - continue; - - // Any variables reaching here with "." in its name is a local scope - // variable and should not be printed in global data section. - std::string name = Mang->getValueName(I); - if (PAN::isLocalName(name)) - continue; + std::vector Items = PTAI->ROSection->Items; + if (! Items.size()) return; - I->setSection(TAI->getReadOnlySection()->getName()); - O << name; - EmitGlobalConstant(C, AddrSpace); - O << "\n"; - } + // Print ROData ection. + O << "\n"; + SwitchToSection(PTAI->ROSection->S_); + for (unsigned j = 0; j < Items.size(); j++) { + O << Mang->getValueName(Items[j]); + Constant *C = Items[j]->getInitializer(); + int AddrSpace = Items[j]->getType()->getAddressSpace(); + EmitGlobalConstant(C, AddrSpace); } } @@ -276,9 +271,7 @@ void PIC16AsmPrinter::emitFunctionData(MachineFunction &MF) { const Function *F = MF.getFunction(); std::string FuncName = Mang->getValueName(F); - Module *M = const_cast(F->getParent()); const TargetData *TD = TM.getTargetData(); - unsigned FrameSize = 0; // Emit the data section name. O << "\n"; const char *SectionName = PAN::getFrameSectionName(CurrentFnName).c_str(); @@ -318,57 +311,15 @@ int TempSize = PTLI->GetTmpSize(); if (TempSize > 0 ) O << PAN::getTempdataLabel(CurrentFnName) << " RES " << TempSize <<"\n"; - - // Emit the section name for local variables. - O << "\n"; - const char* SecNameLocals = PAN::getAutosSectionName(CurrentFnName).c_str() ; - - const Section *fADataSection = TAI->getNamedSection(SecNameLocals, - SectionFlags::Writeable); - SwitchToSection(fADataSection); - - // Emit the function variables. - - // In PIC16 all the function arguments and local variables are global. - // Therefore to get the variable belonging to this function entire - // global list will be traversed and variables belonging to this function - // will be emitted in the current data section. - for (Module::global_iterator I = M->global_begin(), E = M->global_end(); - I != E; ++I) { - std::string VarName = Mang->getValueName(I); - - // The variables of a function are of form FuncName.* . If this variable - // does not belong to this function then continue. - // Static local varilabes of a function does not have .auto. in their - // name. They are not printed as part of function data but module - // level global data. - if (! PAN::isLocalToFunc(FuncName, VarName)) - continue; - - I->setSection(TAI->SectionForGlobal(I)->getName()); - Constant *C = I->getInitializer(); - const Type *Ty = C->getType(); - unsigned Size = TD->getTypeAllocSize(Ty); - FrameSize += Size; - // Emit memory reserve directive. - O << VarName << " RES " << Size << "\n"; - } } -void PIC16AsmPrinter::EmitGlobalData (Module &M) -{ - // Set the section names for all globals. - for (Module::global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) { - I->setSection(TAI->SectionForGlobal(I)->getName()); - } - +void PIC16AsmPrinter::EmitIData (Module &M) { const PIC16TargetAsmInfo *PTAI = static_cast(TAI); - const TargetData *TD = TM.getTargetData(); - // Now print all IDATA sections. + // Print all IDATA sections. std::vector IDATASections = PTAI->IDATASections; for (unsigned i = 0; i < IDATASections.size(); i++) { + O << "\n"; SwitchToSection(IDATASections[i]->S_); std::vector Items = IDATASections[i]->Items; for (unsigned j = 0; j < Items.size(); j++) { @@ -379,10 +330,16 @@ EmitGlobalConstant(C, AddrSpace); } } +} + +void PIC16AsmPrinter::EmitUData (Module &M) { + const PIC16TargetAsmInfo *PTAI = static_cast(TAI); + const TargetData *TD = TM.getTargetData(); - // Now print all BSS sections. + // Print all BSS sections. std::vector BSSSections = PTAI->BSSSections; for (unsigned i = 0; i < BSSSections.size(); i++) { + O << "\n"; SwitchToSection(BSSSections[i]->S_); std::vector Items = BSSSections[i]->Items; for (unsigned j = 0; j < Items.size(); j++) { @@ -397,3 +354,26 @@ } } +void PIC16AsmPrinter::EmitAutos (Module &M) +{ + // Section names for all globals are already set. + + const PIC16TargetAsmInfo *PTAI = static_cast(TAI); + const TargetData *TD = TM.getTargetData(); + + // Now print all Autos sections. + std::vector AutosSections = PTAI->AutosSections; + for (unsigned i = 0; i < AutosSections.size(); i++) { + O << "\n"; + SwitchToSection(AutosSections[i]->S_); + std::vector Items = AutosSections[i]->Items; + for (unsigned j = 0; j < Items.size(); j++) { + std::string VarName = Mang->getValueName(Items[j]); + Constant *C = Items[j]->getInitializer(); + const Type *Ty = C->getType(); + unsigned Size = TD->getTypeAllocSize(Ty); + // Emit memory reserve directive. + O << VarName << " RES " << Size << "\n"; + } + } +} Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h?rev=71560&r1=71559&r2=71560&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h Tue May 12 12:07:27 2009 @@ -43,7 +43,9 @@ bool printInstruction(const MachineInstr *MI); // definition autogenerated. bool printMachineInstruction(const MachineInstr *MI); void EmitExternsAndGlobals (Module &M); - void EmitGlobalData (Module &M); + void EmitIData (Module &M); + void EmitUData (Module &M); + void EmitAutos (Module &M); void EmitRomData (Module &M); void emitFunctionData(MachineFunction &MF); void printDecls(void); Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp?rev=71560&r1=71559&r2=71560&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp Tue May 12 12:07:27 2009 @@ -44,6 +44,7 @@ // Need because otherwise a .text symbol is emitted by DwarfWriter // in BeginModule, and gpasm cribbs for that .text symbol. TextSection = getUnnamedSection("", SectionFlags::Code); + ROSection = new PIC16Section(getReadOnlySection()); } const char *PIC16TargetAsmInfo::getRomDirective(unsigned size) const @@ -154,6 +155,40 @@ return FoundIDATA->S_; } +// Get the section for an automatic variable of a function. +// For PIC16 they are globals only with mangled names. +const Section * +PIC16TargetAsmInfo::getSectionForAuto(const GlobalVariable *GV) const { + + const std::string name = PAN::getSectionNameForSym(GV->getName()); + + // Go through all Auto Sections and assign this variable + // to the appropriate section. + PIC16Section *FoundAutoSec = NULL; + for (unsigned i = 0; i < AutosSections.size(); i++) { + 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()); + + FoundAutoSec = new PIC16Section(NewSection); + + // Add this newly created autos section to the list of AutosSections. + AutosSections.push_back(FoundAutoSec); + } + + // Insert the auto into this section. + FoundAutoSec->Items.push_back(GV); + + return FoundAutoSec->S_; +} + + // Override default implementation to put the true globals into // multiple data sections if required. const Section* @@ -168,8 +203,7 @@ // name for it and return. const std::string name = GV->getName(); if (PAN::isLocalName(name)) { - const std::string Sec_Name = PAN::getSectionNameForSym(name); - return getNamedSection(Sec_Name.c_str()); + return getSectionForAuto(GV); } // See if this is an uninitialized global. @@ -177,11 +211,16 @@ if (C->isNullValue()) return getBSSSectionForGlobal(GV); - // This is initialized data. We only deal with initialized data in RAM. + // If this is initialized data in RAM. Put it in the correct IDATA section. if (GV->getType()->getAddressSpace() == PIC16ISD::RAM_SPACE) return getIDATASectionForGlobal(GV); - + // This is initialized data in rom, put it in the readonly section. + if (GV->getType()->getAddressSpace() == PIC16ISD::ROM_SPACE) { + ROSection->Items.push_back(GV); + return ROSection->S_; + } + // Else let the default implementation take care of it. return TargetAsmInfo::SelectSectionForGlobal(GV); } @@ -195,4 +234,10 @@ for (unsigned i = 0; i < IDATASections.size(); i++) { delete IDATASections[i]; } + + for (unsigned i = 0; i < AutosSections.size(); i++) { + delete AutosSections[i]; + } + + delete ROSection; } Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h?rev=71560&r1=71559&r2=71560&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h Tue May 12 12:07:27 2009 @@ -43,6 +43,8 @@ PIC16TargetAsmInfo(const PIC16TargetMachine &TM); mutable std::vector BSSSections; mutable std::vector IDATASections; + mutable std::vector AutosSections; + mutable PIC16Section *ROSection; virtual ~PIC16TargetAsmInfo(); private: @@ -53,6 +55,7 @@ virtual const char *getASDirective(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; virtual const Section *SelectSectionForGlobal(const GlobalValue *GV) const; public: void SetSectionForGVs(Module &M); @@ -62,6 +65,9 @@ std::vector getIDATASections() const { return IDATASections; } + std::vector getAutosSections() const { + return AutosSections; + } }; } // namespace llvm From gohman at apple.com Tue May 12 12:08:34 2009 From: gohman at apple.com (Dan Gohman) Date: Tue, 12 May 2009 17:08:34 -0000 Subject: [llvm-commits] [llvm] r71561 - /llvm/trunk/include/llvm/Target/TargetData.h Message-ID: <200905121708.n4CH8YQf029502@zion.cs.uiuc.edu> Author: djg Date: Tue May 12 12:08:34 2009 New Revision: 71561 URL: http://llvm.org/viewvc/llvm-project?rev=71561&view=rev Log: Clarify a comment. Modified: llvm/trunk/include/llvm/Target/TargetData.h Modified: llvm/trunk/include/llvm/Target/TargetData.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetData.h?rev=71561&r1=71560&r2=71561&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetData.h (original) +++ llvm/trunk/include/llvm/Target/TargetData.h Tue May 12 12:08:34 2009 @@ -293,7 +293,7 @@ return StructAlignment; } - /// getElementContainingOffset - Given a valid offset into the structure, + /// getElementContainingOffset - Given a valid byte offset into the structure, /// return the structure index that contains it. /// unsigned getElementContainingOffset(uint64_t Offset) const; From bob.wilson at apple.com Tue May 12 12:09:31 2009 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 12 May 2009 17:09:31 -0000 Subject: [llvm-commits] [llvm] r71562 - /llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp Message-ID: <200905121709.n4CH9VRK029541@zion.cs.uiuc.edu> Author: bwilson Date: Tue May 12 12:09:30 2009 New Revision: 71562 URL: http://llvm.org/viewvc/llvm-project?rev=71562&view=rev Log: Fix 80-col violations and remove trailing whitespace. No functional changes. Modified: llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp Modified: llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp?rev=71562&r1=71561&r2=71562&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp Tue May 12 12:09:30 2009 @@ -52,7 +52,7 @@ /// counted as part of the following block (i.e., the offset and size for /// a padded block will both be ==2 mod 4). std::vector BBSizes; - + /// BBOffsets - the offset of each MBB in bytes, starting from 0. /// The two-byte pads required for Thumb alignment are counted as part of /// the following block. @@ -73,11 +73,11 @@ CPUser(MachineInstr *mi, MachineInstr *cpemi, unsigned maxdisp) : MI(mi), CPEMI(cpemi), MaxDisp(maxdisp) {} }; - + /// CPUsers - Keep track of all of the machine instructions that use various /// constant pools and their max displacement. std::vector CPUsers; - + /// CPEntry - One per constant pool entry, keeping the machine instruction /// pointer, the constpool index, and the number of CPUser's which /// reference this entry. @@ -95,7 +95,7 @@ /// Original elements are cloned as we go along; the clones are /// put in the vector of the original element, but have distinct CPIs. std::vector > CPEntries; - + /// ImmBranch - One per immediate branch, keeping the machine instruction /// pointer, conditional or unconditional, the max displacement, /// and (if isCond is true) the corresponding unconditional branch @@ -133,7 +133,7 @@ virtual const char *getPassName() const { return "ARM constant island placement and branch shortening pass"; } - + private: void DoInitialPlacement(MachineFunction &Fn, std::vector &CPEMIs); @@ -145,16 +145,16 @@ void AdjustBBOffsetsAfter(MachineBasicBlock *BB, int delta); bool DecrementOldEntry(unsigned CPI, MachineInstr* CPEMI); int LookForExistingCPEntry(CPUser& U, unsigned UserOffset); - bool LookForWater(CPUser&U, unsigned UserOffset, + bool LookForWater(CPUser&U, unsigned UserOffset, MachineBasicBlock** NewMBB); - MachineBasicBlock* AcceptWater(MachineBasicBlock *WaterBB, + MachineBasicBlock* AcceptWater(MachineBasicBlock *WaterBB, std::vector::iterator IP); void CreateNewWater(unsigned CPUserIndex, unsigned UserOffset, MachineBasicBlock** NewMBB); bool HandleConstantPoolUser(MachineFunction &Fn, unsigned CPUserIndex); void RemoveDeadCPEMI(MachineInstr *CPEMI); bool RemoveUnusedCPEntries(); - bool CPEIsInRange(MachineInstr *MI, unsigned UserOffset, + bool CPEIsInRange(MachineInstr *MI, unsigned UserOffset, MachineInstr *CPEMI, unsigned Disp, bool DoDump); bool WaterIsInRange(unsigned UserOffset, MachineBasicBlock *Water, @@ -196,7 +196,7 @@ /// print block size and offset information - debugging void ARMConstantIslands::dumpBBs() { for (unsigned J = 0, E = BBOffsets.size(); J !=E; ++J) { - DOUT << "block " << J << " offset " << BBOffsets[J] << + DOUT << "block " << J << " offset " << BBOffsets[J] << " size " << BBSizes[J] << "\n"; } } @@ -209,7 +209,7 @@ bool ARMConstantIslands::runOnMachineFunction(MachineFunction &Fn) { MachineConstantPool &MCP = *Fn.getConstantPool(); - + TII = Fn.getTarget().getInstrInfo(); AFI = Fn.getInfo(); isThumb = AFI->isThumbFunction(); @@ -220,8 +220,9 @@ // the numbers agree with the position of the block in the function. Fn.RenumberBlocks(); - /// Thumb functions containing constant pools get 2-byte alignment. This is so - /// we can keep exact track of where the alignment padding goes. Set default. + /// Thumb functions containing constant pools get 2-byte alignment. + /// This is so we can keep exact track of where the alignment padding goes. + /// Set default. AFI->setAlign(isThumb ? 1U : 2U); // Perform the initial placement of the constant pool entries. To start with, @@ -232,16 +233,16 @@ if (isThumb) AFI->setAlign(2U); } - + /// The next UID to take is the first unused one. AFI->initConstPoolEntryUId(CPEMIs.size()); - + // Do the initial scan of the function, building up information about the // sizes of each block, the location of all the water, and finding all of the // constant pool users. InitialFunctionScan(Fn, CPEMIs); CPEMIs.clear(); - + /// Remove dead constant pool entries. RemoveUnusedCPEntries(); @@ -283,16 +284,16 @@ /// DoInitialPlacement - Perform the initial placement of the constant pool /// entries. To start with, we put them all at the end of the function. void ARMConstantIslands::DoInitialPlacement(MachineFunction &Fn, - std::vector &CPEMIs){ + std::vector &CPEMIs) { // Create the basic block to hold the CPE's. MachineBasicBlock *BB = Fn.CreateMachineBasicBlock(); Fn.push_back(BB); - + // Add all of the constants from the constant pool to the end block, use an // identity mapping of CPI's to CPE's. const std::vector &CPs = Fn.getConstantPool()->getConstants(); - + const TargetData &TD = *Fn.getTarget().getTargetData(); for (unsigned i = 0, e = CPs.size(); i != e; ++i) { unsigned Size = TD.getTypeAllocSize(CPs[i].getType()); @@ -321,13 +322,13 @@ MachineFunction::iterator MBBI = MBB; if (next(MBBI) == MBB->getParent()->end()) // Can't fall off end of function. return false; - + MachineBasicBlock *NextBB = next(MBBI); for (MachineBasicBlock::succ_iterator I = MBB->succ_begin(), E = MBB->succ_end(); I != E; ++I) if (*I == NextBB) return true; - + return false; } @@ -355,12 +356,12 @@ for (MachineFunction::iterator MBBI = Fn.begin(), E = Fn.end(); MBBI != E; ++MBBI) { MachineBasicBlock &MBB = *MBBI; - + // If this block doesn't fall through into the next MBB, then this is // 'water' that a constant pool island could be placed. if (!BBHasFallthrough(&MBB)) WaterList.push_back(&MBB); - + unsigned MBBSize = 0; for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); I != E; ++I) { @@ -416,13 +417,13 @@ if (I->getOperand(op).isCPI()) { // We found one. The addressing mode tells us the max displacement // from the PC that this instruction permits. - + // Basic size info comes from the TSFlags field. unsigned Bits = 0; unsigned Scale = 1; unsigned TSFlags = I->getDesc().TSFlags; switch (TSFlags & ARMII::AddrModeMask) { - default: + default: // Constant pool entries can reach anything. if (I->getOpcode() == ARM::CONSTPOOL_ENTRY) continue; @@ -466,14 +467,14 @@ // Remember that this is a user of a CP entry. unsigned CPI = I->getOperand(op).getIndex(); MachineInstr *CPEMI = CPEMIs[CPI]; - unsigned MaxOffs = ((1 << Bits)-1) * Scale; + unsigned MaxOffs = ((1 << Bits)-1) * Scale; CPUsers.push_back(CPUser(I, CPEMI, MaxOffs)); // Increment corresponding CPEntry reference count. CPEntry *CPE = findConstPoolEntry(CPI, CPEMI); assert(CPE && "Cannot find a corresponding CPEntry!"); CPE->RefCount++; - + // Instructions can only use one CP entry, don't bother scanning the // rest of the operands. break; @@ -499,7 +500,7 @@ /// around inside the function. unsigned ARMConstantIslands::GetOffsetOf(MachineInstr *MI) const { MachineBasicBlock *MBB = MI->getParent(); - + // The offset is composed of two things: the sum of the sizes of all MBB's // before this instruction's block, and the offset from the start of the block // it is in. @@ -507,8 +508,8 @@ // If we're looking for a CONSTPOOL_ENTRY in Thumb, see if this block has // alignment padding, and compensate if so. - if (isThumb && - MI->getOpcode() == ARM::CONSTPOOL_ENTRY && + if (isThumb && + MI->getOpcode() == ARM::CONSTPOOL_ENTRY && Offset%4 != 0) Offset += 2; @@ -533,15 +534,15 @@ void ARMConstantIslands::UpdateForInsertedWaterBlock(MachineBasicBlock *NewBB) { // Renumber the MBB's to keep them consequtive. NewBB->getParent()->RenumberBlocks(NewBB); - + // Insert a size into BBSizes to align it properly with the (newly // renumbered) block numbers. BBSizes.insert(BBSizes.begin()+NewBB->getNumber(), 0); // Likewise for BBOffsets. BBOffsets.insert(BBOffsets.begin()+NewBB->getNumber(), 0); - - // Next, update WaterList. Specifically, we need to add NewMBB as having + + // Next, update WaterList. Specifically, we need to add NewMBB as having // available water after it. std::vector::iterator IP = std::lower_bound(WaterList.begin(), WaterList.end(), NewBB, @@ -558,13 +559,14 @@ MachineFunction &MF = *OrigBB->getParent(); // Create a new MBB for the code after the OrigBB. - MachineBasicBlock *NewBB = MF.CreateMachineBasicBlock(OrigBB->getBasicBlock()); + MachineBasicBlock *NewBB = + MF.CreateMachineBasicBlock(OrigBB->getBasicBlock()); MachineFunction::iterator MBBI = OrigBB; ++MBBI; MF.insert(MBBI, NewBB); - + // Splice the instructions starting with MI over to NewBB. NewBB->splice(NewBB->end(), OrigBB, MI, OrigBB->end()); - + // Add an unconditional branch from OrigBB to NewBB. // Note the new unconditional branch is not being recorded. // There doesn't seem to be meaningful DebugInfo available; this doesn't @@ -572,35 +574,35 @@ BuildMI(OrigBB, DebugLoc::getUnknownLoc(), TII->get(isThumb ? ARM::tB : ARM::B)).addMBB(NewBB); NumSplit++; - + // Update the CFG. All succs of OrigBB are now succs of NewBB. while (!OrigBB->succ_empty()) { MachineBasicBlock *Succ = *OrigBB->succ_begin(); OrigBB->removeSuccessor(Succ); NewBB->addSuccessor(Succ); - + // This pass should be run after register allocation, so there should be no // PHI nodes to update. assert((Succ->empty() || Succ->begin()->getOpcode() != TargetInstrInfo::PHI) && "PHI nodes should be eliminated by now!"); } - + // OrigBB branches to NewBB. OrigBB->addSuccessor(NewBB); - + // Update internal data structures to account for the newly inserted MBB. // This is almost the same as UpdateForInsertedWaterBlock, except that // the Water goes after OrigBB, not NewBB. MF.RenumberBlocks(NewBB); - + // Insert a size into BBSizes to align it properly with the (newly // renumbered) block numbers. BBSizes.insert(BBSizes.begin()+NewBB->getNumber(), 0); - + // Likewise for BBOffsets. BBOffsets.insert(BBOffsets.begin()+NewBB->getNumber(), 0); - // Next, update WaterList. Specifically, we need to add OrigMBB as having + // Next, update WaterList. Specifically, we need to add OrigMBB as having // available water after it (but not if it's already there, which happens // when splitting before a conditional branch that is followed by an // unconditional branch - in that case we want to insert NewBB). @@ -619,12 +621,12 @@ for (MachineBasicBlock::iterator I = NewBB->begin(), E = NewBB->end(); I != E; ++I) NewBBSize += TII->GetInstSizeInBytes(I); - + unsigned OrigBBI = OrigBB->getNumber(); unsigned NewBBI = NewBB->getNumber(); // Set the size of NewBB in BBSizes. BBSizes[NewBBI] = NewBBSize; - + // We removed instructions from UserMBB, subtract that off from its size. // Add 2 or 4 to the block to count the unconditional branch we added to it. unsigned delta = isThumb ? 2 : 4; @@ -640,12 +642,12 @@ } /// OffsetIsInRange - Checks whether UserOffset (the location of a constant pool -/// reference) is within MaxDisp of TrialOffset (a proposed location of a +/// reference) is within MaxDisp of TrialOffset (a proposed location of a /// constant pool entry). -bool ARMConstantIslands::OffsetIsInRange(unsigned UserOffset, +bool ARMConstantIslands::OffsetIsInRange(unsigned UserOffset, unsigned TrialOffset, unsigned MaxDisp, bool NegativeOK) { - // On Thumb offsets==2 mod 4 are rounded down by the hardware for - // purposes of the displacement computation; compensate for that here. + // On Thumb offsets==2 mod 4 are rounded down by the hardware for + // purposes of the displacement computation; compensate for that here. // Effectively, the valid range of displacements is 2 bytes smaller for such // references. if (isThumb && UserOffset%4 !=0) @@ -673,7 +675,7 @@ { unsigned MaxDisp = U.MaxDisp; MachineFunction::iterator I = next(MachineFunction::iterator(Water)); - unsigned CPEOffset = BBOffsets[Water->getNumber()] + + unsigned CPEOffset = BBOffsets[Water->getNumber()] + BBSizes[Water->getNumber()]; // If the CPE is to be inserted before the instruction, that will raise @@ -720,7 +722,7 @@ } #endif // NDEBUG -void ARMConstantIslands::AdjustBBOffsetsAfter(MachineBasicBlock *BB, +void ARMConstantIslands::AdjustBBOffsetsAfter(MachineBasicBlock *BB, int delta) { MachineFunction::iterator MBBI = BB; MBBI = next(MBBI); for(unsigned i=BB->getNumber()+1; igetParent()->getNumBlockIDs(); i++) { @@ -771,7 +773,7 @@ /// DecrementOldEntry - find the constant pool entry with index CPI /// and instruction CPEMI, and decrement its refcount. If the refcount -/// becomes 0 remove the entry and instruction. Returns true if we removed +/// becomes 0 remove the entry and instruction. Returns true if we removed /// the entry, false if we didn't. bool ARMConstantIslands::DecrementOldEntry(unsigned CPI, MachineInstr *CPEMI) { @@ -842,7 +844,7 @@ /// AcceptWater - Small amount of common code factored out of the following. -MachineBasicBlock* ARMConstantIslands::AcceptWater(MachineBasicBlock *WaterBB, +MachineBasicBlock* ARMConstantIslands::AcceptWater(MachineBasicBlock *WaterBB, std::vector::iterator IP) { DOUT << "found water in range\n"; // Remove the original WaterList entry; we want subsequent @@ -872,7 +874,7 @@ MachineBasicBlock* WaterBB = *IP; if (WaterIsInRange(UserOffset, WaterBB, U)) { if (isThumb && - (BBOffsets[WaterBB->getNumber()] + + (BBOffsets[WaterBB->getNumber()] + BBSizes[WaterBB->getNumber()])%4 != 0) { // This is valid Water, but would introduce padding. Remember // it in case we don't find any Water that doesn't do this. @@ -896,7 +898,7 @@ return false; } -/// CreateNewWater - No existing WaterList entry will work for +/// CreateNewWater - No existing WaterList entry will work for /// CPUsers[CPUserIndex], so create a place to put the CPE. The end of the /// block is used if in range, and the conditional branch munged so control /// flow is correct. Otherwise the block is split to create a hole with an @@ -904,13 +906,13 @@ /// block following which the new island can be inserted (the WaterList /// is not adjusted). -void ARMConstantIslands::CreateNewWater(unsigned CPUserIndex, +void ARMConstantIslands::CreateNewWater(unsigned CPUserIndex, unsigned UserOffset, MachineBasicBlock** NewMBB) { CPUser &U = CPUsers[CPUserIndex]; MachineInstr *UserMI = U.MI; MachineInstr *CPEMI = U.CPEMI; MachineBasicBlock *UserMBB = UserMI->getParent(); - unsigned OffsetOfNextBlock = BBOffsets[UserMBB->getNumber()] + + unsigned OffsetOfNextBlock = BBOffsets[UserMBB->getNumber()] + BBSizes[UserMBB->getNumber()]; assert(OffsetOfNextBlock== BBOffsets[UserMBB->getNumber()+1]); @@ -919,7 +921,7 @@ // for the unconditional branch we will be adding: 4 bytes on ARM, // 2 on Thumb. Possible Thumb alignment padding is allowed for // inside OffsetIsInRange. - // If the block ends in an unconditional branch already, it is water, + // If the block ends in an unconditional branch already, it is water, // and is known to be out of range, so we'll always be adding a branch.) if (&UserMBB->back() == UserMI || OffsetIsInRange(UserOffset, OffsetOfNextBlock + (isThumb ? 2: 4), @@ -937,7 +939,7 @@ BuildMI(UserMBB, DebugLoc::getUnknownLoc(), TII->get(UncondBr)).addMBB(*NewMBB); unsigned MaxDisp = getUnconditionalBrDisp(UncondBr); - ImmBranches.push_back(ImmBranch(&UserMBB->back(), + ImmBranches.push_back(ImmBranch(&UserMBB->back(), MaxDisp, false, UncondBr)); int delta = isThumb ? 2 : 4; BBSizes[UserMBB->getNumber()] += delta; @@ -965,7 +967,7 @@ // in the water list. Back past any possible branches (allow for a // conditional and a maximally long unconditional). if (BaseInsertOffset >= BBOffsets[UserMBB->getNumber()+1]) - BaseInsertOffset = BBOffsets[UserMBB->getNumber()+1] - + BaseInsertOffset = BBOffsets[UserMBB->getNumber()+1] - (isThumb ? 6 : 8); unsigned EndInsertOffset = BaseInsertOffset + CPEMI->getOperand(2).getImm(); @@ -977,7 +979,7 @@ Offset += TII->GetInstSizeInBytes(MI), MI = next(MI)) { if (CPUIndex < CPUsers.size() && CPUsers[CPUIndex].MI == MI) { - if (!OffsetIsInRange(Offset, EndInsertOffset, + if (!OffsetIsInRange(Offset, EndInsertOffset, CPUsers[CPUIndex].MaxDisp, !isThumb)) { BaseInsertOffset -= (isThumb ? 2 : 4); EndInsertOffset -= (isThumb ? 2 : 4); @@ -997,8 +999,8 @@ /// is out-of-range. If so, pick it up the constant pool value and move it some /// place in-range. Return true if we changed any addresses (thus must run /// another pass of branch lengthening), false otherwise. -bool ARMConstantIslands::HandleConstantPoolUser(MachineFunction &Fn, - unsigned CPUserIndex){ +bool ARMConstantIslands::HandleConstantPoolUser(MachineFunction &Fn, + unsigned CPUserIndex) { CPUser &U = CPUsers[CPUserIndex]; MachineInstr *UserMI = U.MI; MachineInstr *CPEMI = U.CPEMI; @@ -1013,7 +1015,7 @@ // second instruction. if (UserMI->getOpcode() == ARM::tLEApcrel) UserOffset += 2; - + // See if the current entry is within range, or there is a clone of it // in range. int result = LookForExistingCPEntry(U, UserOffset); @@ -1054,21 +1056,21 @@ BBOffsets[NewIsland->getNumber()] = BBOffsets[NewMBB->getNumber()]; // Compensate for .align 2 in thumb mode. - if (isThumb && BBOffsets[NewIsland->getNumber()]%4 != 0) + if (isThumb && BBOffsets[NewIsland->getNumber()]%4 != 0) Size += 2; // Increase the size of the island block to account for the new entry. BBSizes[NewIsland->getNumber()] += Size; AdjustBBOffsetsAfter(NewIsland, Size); - + // Finally, change the CPI in the instruction operand to be ID. for (unsigned i = 0, e = UserMI->getNumOperands(); i != e; ++i) if (UserMI->getOperand(i).isCPI()) { UserMI->getOperand(i).setIndex(ID); break; } - + DOUT << " Moved CPE to #" << ID << " CPI=" << CPI << "\t" << *UserMI; - + return true; } @@ -1111,7 +1113,7 @@ MadeChange = true; } } - } + } return MadeChange; } @@ -1238,7 +1240,7 @@ // BBOffsets[SplitBB] is wrong temporarily, fixed below } MachineBasicBlock *NextBB = next(MachineFunction::iterator(MBB)); - + DOUT << " Insert B to BB#" << DestBB->getNumber() << " also invert condition and change dest. to BB#" << NextBB->getNumber() << "\n"; From bob.wilson at apple.com Tue May 12 12:35:30 2009 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 12 May 2009 17:35:30 -0000 Subject: [llvm-commits] [llvm] r71563 - /llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp Message-ID: <200905121735.n4CHZUTs030719@zion.cs.uiuc.edu> Author: bwilson Date: Tue May 12 12:35:29 2009 New Revision: 71563 URL: http://llvm.org/viewvc/llvm-project?rev=71563&view=rev Log: Fix up a few minor typos in comments. Modified: llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp Modified: llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp?rev=71563&r1=71562&r2=71563&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp Tue May 12 12:35:29 2009 @@ -996,7 +996,7 @@ } /// HandleConstantPoolUser - Analyze the specified user, checking to see if it -/// is out-of-range. If so, pick it up the constant pool value and move it some +/// is out-of-range. If so, pick up the constant pool value and move it some /// place in-range. Return true if we changed any addresses (thus must run /// another pass of branch lengthening), false otherwise. bool ARMConstantIslands::HandleConstantPoolUser(MachineFunction &Fn, @@ -1008,7 +1008,7 @@ unsigned Size = CPEMI->getOperand(2).getImm(); MachineBasicBlock *NewMBB; // Compute this only once, it's expensive. The 4 or 8 is the value the - // hardware keeps in the PC (2 insns ahead of the reference). + // hardware keeps in the PC (2 insns ahead of the reference). unsigned UserOffset = GetOffsetOf(UserMI) + (isThumb ? 4 : 8); // Special case: tLEApcrel are two instructions MI's. The actual user is the @@ -1024,7 +1024,7 @@ // No existing clone of this CPE is within range. // We will be generating a new clone. Get a UID for it. - unsigned ID = AFI->createConstPoolEntryUId(); + unsigned ID = AFI->createConstPoolEntryUId(); // Look for water where we can place this CPE. We look for the farthest one // away that will work. Forward references only for now (although later @@ -1160,7 +1160,7 @@ /// FixUpUnconditionalBr - Fix up an unconditional branch whose destination is /// too far away to fit in its displacement field. If the LR register has been /// spilled in the epilogue, then we can use BL to implement a far jump. -/// Otherwise, add an intermediate branch instruction to to a branch. +/// Otherwise, add an intermediate branch instruction to a branch. bool ARMConstantIslands::FixUpUnconditionalBr(MachineFunction &Fn, ImmBranch &Br) { MachineInstr *MI = Br.MI; @@ -1188,7 +1188,7 @@ MachineInstr *MI = Br.MI; MachineBasicBlock *DestBB = MI->getOperand(0).getMBB(); - // Add a unconditional branch to the destination and invert the branch + // Add an unconditional branch to the destination and invert the branch // condition to jump over it: // blt L1 // => @@ -1210,7 +1210,7 @@ if (BMI != MI) { if (next(MachineBasicBlock::iterator(MI)) == prior(MBB->end()) && BMI->getOpcode() == Br.UncondBr) { - // Last MI in the BB is a unconditional branch. Can we simply invert the + // Last MI in the BB is an unconditional branch. Can we simply invert the // condition and swap destinations: // beq L1 // b L2 @@ -1230,7 +1230,7 @@ if (NeedSplit) { SplitBlockBeforeInstr(MI); - // No need for the branch to the next block. We're adding a unconditional + // No need for the branch to the next block. We're adding an unconditional // branch to the destination. int delta = TII->GetInstSizeInBytes(&MBB->back()); BBSizes[MBB->getNumber()] -= delta; From andrewl at lenharth.org Tue May 12 13:01:14 2009 From: andrewl at lenharth.org (Andrew Lenharth) Date: Tue, 12 May 2009 13:01:14 -0500 Subject: [llvm-commits] RFC: initial union syntax support Message-ID: <85dfcd7f0905121101y62ac0c4esd27a518adbabd3b9@mail.gmail.com> Below is initial syntax for union types. This is just syntax, I haven't done an audit to find places that assume struct fields don't overlap, nor updated the offset calculation code. A separate derived class from CompositeType or StructType would also be reasonable if people have objections to overloading StructType. This patch is enough to do things like: ; ModuleID = '' type union { i32, i8 } ; type %0 %struct.anon = type union { i8, i32, i32, i32 } @foos = external global %struct.anon ; <%struct.anon*> [#uses=3] @bara = external global [2 x %0] ; <[2 x %0]*> [#uses=2] define i32 @main() { %tmp = load i32* getelementptr (%struct.anon* @foos, i32 0, i32 1) ; [#uses=1] %tmp3 = load i32* getelementptr (%struct.anon* @foos, i32 0, i32 2) ; [#uses=1] %tmp6 = load i32* getelementptr (%struct.anon* @foos, i32 0, i32 3) ; [#uses=1] %tmp4 = add i32 %tmp3, %tmp ; [#uses=1] %tmp7 = add i32 %tmp4, %tmp6 ; [#uses=1] ret i32 %tmp7 } define i32 @bar() { entry: %tmp = load i32* getelementptr ([2 x %0]* @bara, i32 0, i32 0, i32 0) ; [#uses=1] %tmp4 = load i32* getelementptr ([2 x %0]* @bara, i32 0, i32 1, i32 0) ; [#uses=1] %tmp5 = add i32 %tmp4, %tmp ; [#uses=1] ret i32 %tmp5 } Index: include/llvm/DerivedTypes.h =================================================================== --- include/llvm/DerivedTypes.h (revision 71552) +++ include/llvm/DerivedTypes.h (working copy) @@ -218,13 +218,17 @@ friend class TypeMap; StructType(const StructType &); // Do not implement const StructType &operator=(const StructType &); // Do not implement - StructType(const std::vector &Types, bool isPacked); + StructType(const std::vector &Types, + bool isPacked, bool isUnion); + enum {structPlain = 0, + structPacked = 1, + structUnion = 2}; public: /// StructType::get - This static method is the primary way to create a /// StructType. /// static StructType *get(const std::vector &Params, - bool isPacked=false); + bool isPacked=false, bool isUnion=false); /// StructType::get - This static method is a convenience method for /// creating structure types by specifying the elements as arguments. @@ -262,7 +266,9 @@ return T->getTypeID() == StructTyID; } - bool isPacked() const { return (0 != getSubclassData()) ? true : false; } + bool isPacked() const { return structPacked == getSubclassData(); } + bool isUnion() const { return structUnion == getSubclassData(); } + }; Index: include/llvm/Bitcode/LLVMBitCodes.h =================================================================== --- include/llvm/Bitcode/LLVMBitCodes.h (revision 71552) +++ include/llvm/Bitcode/LLVMBitCodes.h (working copy) @@ -90,7 +90,11 @@ // binary compatibility. TYPE_CODE_X86_FP80 = 13, // X86 LONG DOUBLE TYPE_CODE_FP128 = 14, // LONG DOUBLE (112 bit mantissa) - TYPE_CODE_PPC_FP128= 15 // PPC LONG DOUBLE (2 doubles) + TYPE_CODE_PPC_FP128= 15, // PPC LONG DOUBLE (2 doubles) + + //Merge UNIOIN with STRUCT in LLVM 3.0 + TYPE_CODE_UNION = 16 // UNIOIN: [eltty x N] + // Any other type code is assumed to be an unknown type. }; Index: docs/LangRef.html =================================================================== --- docs/LangRef.html (revision 71552) +++ docs/LangRef.html (working copy) @@ -1579,8 +1579,31 @@ - + +
+
Overview:
+

The union structure type is used to represent a collection of data members +overlapping in memory. All fields start at an offset of zero. The elements of +a union structure may be any type that has a size. The size of a union is the +size of the largest element. The alignment is the alignment of the most restricted +element.

+

Structures are accessed using 'load +and 'store' by getting a pointer to a +field with the 'getelementptr' +instruction.

+
Syntax:
+
  < union { <type list> } > 
+
Examples:
+ + + + + +
< union { i32, i32*, i64 } >A union of three values
+
+
Overview:
Index: lib/VMCore/AsmWriter.cpp =================================================================== --- lib/VMCore/AsmWriter.cpp (revision 71552) +++ lib/VMCore/AsmWriter.cpp (working copy) @@ -225,6 +225,8 @@ const StructType *STy = cast(Ty); if (STy->isPacked()) OS << '<'; + if (STy->isUnion()) + OS << "union "; OS << "{ "; for (StructType::element_iterator I = STy->element_begin(), E = STy->element_end(); I != E; ++I) { Index: lib/VMCore/Type.cpp =================================================================== --- lib/VMCore/Type.cpp (revision 71552) +++ lib/VMCore/Type.cpp (working copy) @@ -338,11 +338,13 @@ setAbstract(isAbstract); } -StructType::StructType(const std::vector &Types, bool isPacked) +StructType::StructType(const std::vector &Types, bool isPacked, + bool isUnion) : CompositeType(StructTyID) { ContainedTys = reinterpret_cast(this + 1); NumContainedTys = Types.size(); - setSubclassData(isPacked); + assert(!(isPacked && isUnion) && "Packed union not supported"); + setSubclassData(isPacked + (int)isUnion * 2); bool isAbstract = false; for (unsigned i = 0; i < Types.size(); ++i) { assert(Types[i] != Type::VoidTy && "Void type for structure field!!"); @@ -1107,9 +1109,11 @@ class StructValType { std::vector ElTypes; bool packed; + bool _union; public: - StructValType(const std::vector &args, bool isPacked) - : ElTypes(args), packed(isPacked) {} + StructValType(const std::vector &args, + bool isPacked, bool isUnion) + : ElTypes(args), packed(isPacked), _union(isUnion) {} static StructValType get(const StructType *ST) { std::vector ElTypes; @@ -1117,7 +1121,7 @@ for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) ElTypes.push_back(ST->getElementType(i)); - return StructValType(ElTypes, ST->isPacked()); + return StructValType(ElTypes, ST->isPacked(), ST->isUnion()); } static unsigned hashTypeStructure(const StructType *ST) { @@ -1127,7 +1131,9 @@ inline bool operator<(const StructValType &STV) const { if (ElTypes < STV.ElTypes) return true; else if (ElTypes > STV.ElTypes) return false; - else return (int)packed < (int)STV.packed; + else + return (int)packed + 2 * (int)_union + < (int)STV.packed + 2 * (int)STV._union; } }; } @@ -1135,15 +1141,15 @@ static ManagedStatic > StructTypes; StructType *StructType::get(const std::vector &ETypes, - bool isPacked) { - StructValType STV(ETypes, isPacked); + bool isPacked, bool isUnion) { + StructValType STV(ETypes, isPacked, isUnion); StructType *ST = StructTypes->get(STV); if (ST) return ST; // Value not found. Derive a new type! ST = (StructType*) operator new(sizeof(StructType) + sizeof(PATypeHandle) * ETypes.size()); - new (ST) StructType(ETypes, isPacked); + new (ST) StructType(ETypes, isPacked, isUnion); StructTypes->add(STV, ST); #ifdef DEBUG_MERGE_TYPES Index: lib/AsmParser/LLParser.cpp =================================================================== --- lib/AsmParser/LLParser.cpp (revision 71552) +++ lib/AsmParser/LLParser.cpp (working copy) @@ -964,9 +964,15 @@ Result = OpaqueType::get(); Lex.Lex(); break; + case lltok::kw_union: + // TypeRec ::= 'union' ... + Lex.Lex(); //eat the kw_union + if (ParseStructType(Result, false, true)) + return true; + break; case lltok::lbrace: // TypeRec ::= '{' ... '}' - if (ParseStructType(Result, false)) + if (ParseStructType(Result, false, false)) return true; break; case lltok::lsquare: @@ -979,7 +985,7 @@ // TypeRec ::= '<' ... '>' Lex.Lex(); if (Lex.getKind() == lltok::lbrace) { - if (ParseStructType(Result, true) || + if (ParseStructType(Result, true, false) || ParseToken(lltok::greater, "expected '>' at end of packed struct")) return true; } else if (ParseArrayVectorType(Result, true)) @@ -1222,18 +1228,22 @@ return false; } -/// ParseStructType: Handles packed and unpacked types. parsed elsewhere. +/// ParseStructType: Handles packed and unpacked types. and union +/// parsed elsewhere. /// TypeRec /// ::= '{' '}' /// ::= '{' TypeRec (',' TypeRec)* '}' /// ::= '<' '{' '}' '>' /// ::= '<' '{' TypeRec (',' TypeRec)* '}' '>' -bool LLParser::ParseStructType(PATypeHolder &Result, bool Packed) { +/// ::= 'union' '{' '}' +/// ::= 'union' '{' TypeRec (',' TypeRec)* '}' + +bool LLParser::ParseStructType(PATypeHolder &Result, bool Packed, bool Union) { assert(Lex.getKind() == lltok::lbrace); Lex.Lex(); // Consume the '{' if (EatIfPresent(lltok::rbrace)) { - Result = StructType::get(std::vector(), Packed); + Result = StructType::get(std::vector(), Packed, Union); return false; } @@ -1261,7 +1271,7 @@ std::vector ParamsListTy; for (unsigned i = 0, e = ParamsList.size(); i != e; ++i) ParamsListTy.push_back(ParamsList[i].get()); - Result = HandleUpRefs(StructType::get(ParamsListTy, Packed)); + Result = HandleUpRefs(StructType::get(ParamsListTy, Packed, Union)); return false; } Index: lib/AsmParser/LLLexer.cpp =================================================================== --- lib/AsmParser/LLLexer.cpp (revision 71552) +++ lib/AsmParser/LLLexer.cpp (working copy) @@ -550,6 +550,7 @@ KEYWORD(type); KEYWORD(opaque); + KEYWORD(union); KEYWORD(eq); KEYWORD(ne); KEYWORD(slt); KEYWORD(sgt); KEYWORD(sle); KEYWORD(sge); KEYWORD(ult); KEYWORD(ugt); KEYWORD(ule); KEYWORD(uge); Index: lib/AsmParser/LLParser.h =================================================================== --- lib/AsmParser/LLParser.h (revision 71552) +++ lib/AsmParser/LLParser.h (working copy) @@ -147,7 +147,7 @@ return ParseType(Result, AllowVoid); } bool ParseTypeRec(PATypeHolder &H); - bool ParseStructType(PATypeHolder &H, bool Packed); + bool ParseStructType(PATypeHolder &H, bool Packed, bool Union); bool ParseArrayVectorType(PATypeHolder &H, bool isVector); bool ParseFunctionType(PATypeHolder &Result); PATypeHolder HandleUpRefs(const Type *Ty); Index: lib/AsmParser/LLToken.h =================================================================== --- lib/AsmParser/LLToken.h (revision 71552) +++ lib/AsmParser/LLToken.h (working copy) @@ -83,6 +83,7 @@ kw_type, kw_opaque, + kw_union, kw_eq, kw_ne, kw_slt, kw_sgt, kw_sle, kw_sge, kw_ult, kw_ugt, kw_ule, kw_uge, kw_oeq, kw_one, kw_olt, kw_ogt, kw_ole, kw_oge, kw_ord, kw_uno, Index: lib/Bitcode/Reader/BitcodeReader.cpp =================================================================== --- lib/Bitcode/Reader/BitcodeReader.cpp (revision 71552) +++ lib/Bitcode/Reader/BitcodeReader.cpp (working copy) @@ -536,6 +536,13 @@ ResultTy = StructType::get(EltTys, Record[0]); break; } + case bitc::TYPE_CODE_UNION: { // UNION: [eltty x N] + std::vector EltTys; + for (unsigned i = 0, e = Record.size(); i != e; ++i) + EltTys.push_back(getTypeByID(Record[i], true)); + ResultTy = StructType::get(EltTys, false, true); + break; + } case bitc::TYPE_CODE_ARRAY: // ARRAY: [numelts, eltty] if (Record.size() < 2) return Error("Invalid ARRAY type record"); Index: lib/Bitcode/Writer/BitcodeWriter.cpp =================================================================== --- lib/Bitcode/Writer/BitcodeWriter.cpp (revision 71552) +++ lib/Bitcode/Writer/BitcodeWriter.cpp (working copy) @@ -176,6 +176,14 @@ Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, Log2_32_Ceil(VE.getTypes().size()+1))); unsigned StructAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_UNION. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_UNION)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(VE.getTypes().size()+1))); + unsigned UnionAbbrev = Stream.EmitAbbrev(Abbv); // Abbrev for TYPE_CODE_ARRAY. Abbv = new BitCodeAbbrev(); @@ -235,14 +243,25 @@ } case Type::StructTyID: { const StructType *ST = cast(T); - // STRUCT: [ispacked, eltty x N] - Code = bitc::TYPE_CODE_STRUCT; - TypeVals.push_back(ST->isPacked()); - // Output all of the element types. - for (StructType::element_iterator I = ST->element_begin(), - E = ST->element_end(); I != E; ++I) - TypeVals.push_back(VE.getTypeID(*I)); - AbbrevToUse = StructAbbrev; + if (!ST->isUnion()) { + // STRUCT: [ispacked, eltty x N] + Code = bitc::TYPE_CODE_STRUCT; + TypeVals.push_back(ST->isPacked()); + // Output all of the element types. + for (StructType::element_iterator I = ST->element_begin(), + E = ST->element_end(); I != E; ++I) + TypeVals.push_back(VE.getTypeID(*I)); + AbbrevToUse = StructAbbrev; + } else { + //Unify with STRUCT in LLVM 3.0 + // UNION: [eltty x N] + Code = bitc::TYPE_CODE_UNION; + // Output all of the element types. + for (StructType::element_iterator I = ST->element_begin(), + E = ST->element_end(); I != E; ++I) + TypeVals.push_back(VE.getTypeID(*I)); + AbbrevToUse = UnionAbbrev; + } break; } case Type::ArrayTyID: { From isanbard at gmail.com Tue May 12 13:29:42 2009 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 12 May 2009 18:29:42 -0000 Subject: [llvm-commits] [llvm] r71573 - in /llvm/trunk/docs/tutorial: JITTutorial1.html JITTutorial2.html Message-ID: <200905121829.n4CIThYM000699@zion.cs.uiuc.edu> Author: void Date: Tue May 12 13:29:42 2009 New Revision: 71573 URL: http://llvm.org/viewvc/llvm-project?rev=71573&view=rev Log: Use llvm::raw_stream instead of llvm::Streams. Modified: llvm/trunk/docs/tutorial/JITTutorial1.html llvm/trunk/docs/tutorial/JITTutorial2.html Modified: llvm/trunk/docs/tutorial/JITTutorial1.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/JITTutorial1.html?rev=71573&r1=71572&r2=71573&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/JITTutorial1.html (original) +++ llvm/trunk/docs/tutorial/JITTutorial1.html Tue May 12 13:29:42 2009 @@ -61,6 +61,7 @@ #include "llvm/Analysis/Verifier.h" #include "llvm/Assembly/PrintModulePass.h" #include "llvm/Support/IRBuilder.h" +#include "llvm/Support/raw_ostream.h"
@@ -78,7 +79,7 @@ verifyModule(*Mod, PrintMessageAction); PassManager PM; - PM.add(createPrintModulePass(&llvm::cout)); + PM.add(createPrintModulePass(&outs())); PM.run(*Mod); delete Mod; Modified: llvm/trunk/docs/tutorial/JITTutorial2.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/JITTutorial2.html?rev=71573&r1=71572&r2=71573&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/JITTutorial2.html (original) +++ llvm/trunk/docs/tutorial/JITTutorial2.html Tue May 12 13:29:42 2009 @@ -57,6 +57,7 @@ #include "llvm/Analysis/Verifier.h" #include "llvm/Assembly/PrintModulePass.h" #include "llvm/Support/IRBuilder.h" +#include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -68,7 +69,7 @@ verifyModule(*Mod, PrintMessageAction); PassManager PM; - PM.add(createPrintModulePass(&llvm::cout)); + PM.add(createPrintModulePass(&outs())); PM.run(*Mod); delete Mod; From evan.cheng at apple.com Tue May 12 13:31:57 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 12 May 2009 18:31:57 -0000 Subject: [llvm-commits] [llvm] r71574 - in /llvm/trunk: lib/CodeGen/LLVMTargetMachine.cpp lib/CodeGen/StackSlotColoring.cpp test/CodeGen/X86/stack-color-with-reg-2.ll test/CodeGen/X86/stack-color-with-reg.ll Message-ID: <200905121831.n4CIVvqW000781@zion.cs.uiuc.edu> Author: evancheng Date: Tue May 12 13:31:57 2009 New Revision: 71574 URL: http://llvm.org/viewvc/llvm-project?rev=71574&view=rev Log: Fixed a stack slot coloring with reg bug: do not update implicit use / def when doing forward / backward propagation. Added: llvm/trunk/test/CodeGen/X86/stack-color-with-reg-2.ll Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp llvm/trunk/lib/CodeGen/StackSlotColoring.cpp llvm/trunk/test/CodeGen/X86/stack-color-with-reg.ll Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=71574&r1=71573&r2=71574&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue May 12 13:31:57 2009 @@ -193,8 +193,7 @@ // Perform stack slot coloring. if (OptLevel != CodeGenOpt::None) - PM.add(createStackSlotColoringPass(false)); - /*OptLevel >= CodeGenOpt::Aggressive*/ + PM.add(createStackSlotColoringPass(OptLevel >= CodeGenOpt::Aggressive)); if (PrintMachineCode) // Print the register-allocated code PM.add(createMachineFunctionPrinterPass(cerr)); Modified: llvm/trunk/lib/CodeGen/StackSlotColoring.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackSlotColoring.cpp?rev=71574&r1=71573&r2=71574&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/StackSlotColoring.cpp (original) +++ llvm/trunk/lib/CodeGen/StackSlotColoring.cpp Tue May 12 13:31:57 2009 @@ -26,6 +26,7 @@ #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/BitVector.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include @@ -129,6 +130,7 @@ unsigned OldReg, unsigned NewReg); void UnfoldAndRewriteInstruction(MachineInstr *MI, int OldFI, unsigned Reg, const TargetRegisterClass *RC, + SmallSet &Defs, MachineFunction &MF); bool AllMemRefsCanBeUnfolded(int SS); bool RemoveDeadStores(MachineBasicBlock* MBB); @@ -391,20 +393,23 @@ return false; // Rewrite all MO_FrameIndex operands. + SmallVector, 4> NewDefs(MF.getNumBlockIDs()); for (unsigned SS = 0, SE = SSRefs.size(); SS != SE; ++SS) { bool isReg = SlotIsReg[SS]; int NewFI = SlotMapping[SS]; if (NewFI == -1 || (NewFI == (int)SS && !isReg)) continue; + const TargetRegisterClass *RC = LS->getIntervalRegClass(SS); SmallVector &RefMIs = SSRefs[SS]; for (unsigned i = 0, e = RefMIs.size(); i != e; ++i) if (!isReg) RewriteInstruction(RefMIs[i], SS, NewFI, MF); else { // Rewrite to use a register instead. - const TargetRegisterClass *RC = LS->getIntervalRegClass(SS); - UnfoldAndRewriteInstruction(RefMIs[i], SS, NewFI, RC, MF); + unsigned MBBId = RefMIs[i]->getParent()->getNumber(); + SmallSet &Defs = NewDefs[MBBId]; + UnfoldAndRewriteInstruction(RefMIs[i], SS, NewFI, RC, Defs, MF); } } @@ -481,11 +486,12 @@ if (MII == MBB->begin()) return false; + SmallVector Uses; SmallVector Refs; while (--MII != MBB->begin()) { bool FoundDef = false; // Not counting 2address def. - bool FoundUse = false; - bool FoundKill = false; + + Uses.clear(); const TargetInstrDesc &TID = MII->getDesc(); for (unsigned i = 0, e = MII->getNumOperands(); i != e; ++i) { MachineOperand &MO = MII->getOperand(i); @@ -495,15 +501,14 @@ if (Reg == 0) continue; if (Reg == OldReg) { + if (MO.isImplicit()) + return false; const TargetRegisterClass *RC = getInstrOperandRegClass(TRI, TID, i); if (RC && !RC->contains(NewReg)) return false; if (MO.isUse()) { - FoundUse = true; - if (MO.isKill()) - FoundKill = true; - Refs.push_back(&MO); + Uses.push_back(&MO); } else { Refs.push_back(&MO); if (!MII->isRegTiedToUseOperand(i)) @@ -516,11 +521,17 @@ return false; } } + if (FoundDef) { + // Found non-two-address def. Stop here. for (unsigned i = 0, e = Refs.size(); i != e; ++i) Refs[i]->setReg(NewReg); return true; } + + // Two-address uses must be updated as well. + for (unsigned i = 0, e = Uses.size(); i != e; ++i) + Refs.push_back(Uses[i]); } return false; } @@ -547,7 +558,7 @@ if (Reg == 0) continue; if (Reg == OldReg) { - if (MO.isDef()) + if (MO.isDef() || MO.isImplicit()) return false; const TargetRegisterClass *RC = getInstrOperandRegClass(TRI, TID, i); @@ -573,10 +584,12 @@ /// UnfoldAndRewriteInstruction - Rewrite specified instruction by unfolding /// folded memory references and replacing those references with register /// references instead. -void StackSlotColoring::UnfoldAndRewriteInstruction(MachineInstr *MI, int OldFI, - unsigned Reg, - const TargetRegisterClass *RC, - MachineFunction &MF) { +void +StackSlotColoring::UnfoldAndRewriteInstruction(MachineInstr *MI, int OldFI, + unsigned Reg, + const TargetRegisterClass *RC, + SmallSet &Defs, + MachineFunction &MF) { MachineBasicBlock *MBB = MI->getParent(); if (unsigned DstReg = TII->isLoadFromStackSlot(MI, OldFI)) { if (PropagateForward(MI, MBB, DstReg, Reg)) { @@ -587,6 +600,13 @@ TII->copyRegToReg(*MBB, MI, DstReg, Reg, RC, RC); ++NumRegRepl; } + + if (!Defs.count(Reg)) { + // If this is the first use of Reg in this MBB and it wasn't previously + // defined in MBB, add it to livein. + MBB->addLiveIn(Reg); + Defs.insert(Reg); + } } else if (unsigned SrcReg = TII->isStoreToStackSlot(MI, OldFI)) { if (MI->killsRegister(SrcReg) && PropagateBackward(MI, MBB, SrcReg, Reg)) { DOUT << "Eliminated store: "; @@ -596,13 +616,25 @@ TII->copyRegToReg(*MBB, MI, Reg, SrcReg, RC, RC); ++NumRegRepl; } + + // Remember reg has been defined in MBB. + Defs.insert(Reg); } else { SmallVector NewMIs; bool Success = TII->unfoldMemoryOperand(MF, MI, Reg, false, false, NewMIs); Success = Success; // Silence compiler warning. assert(Success && "Failed to unfold!"); - MBB->insert(MI, NewMIs[0]); + MachineInstr *NewMI = NewMIs[0]; + MBB->insert(MI, NewMI); ++NumRegRepl; + + if (NewMI->readsRegister(Reg)) { + if (!Defs.count(Reg)) + // If this is the first use of Reg in this MBB and it wasn't previously + // defined in MBB, add it to livein. + MBB->addLiveIn(Reg); + Defs.insert(Reg); + } } MBB->erase(MI); } Added: llvm/trunk/test/CodeGen/X86/stack-color-with-reg-2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/stack-color-with-reg-2.ll?rev=71574&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/stack-color-with-reg-2.ll (added) +++ llvm/trunk/test/CodeGen/X86/stack-color-with-reg-2.ll Tue May 12 13:31:57 2009 @@ -0,0 +1,230 @@ +; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin10 -relocation-model=pic -disable-fp-elim -color-ss-with-regs | grep {movl\[\[:space:\]\]%eax, %ebx} + + %"struct..0$_67" = type { i32, %"struct.llvm::MachineOperand"**, %"struct.llvm::MachineOperand"* } + %"struct..1$_69" = type { i32 } + %"struct.llvm::AbstractTypeUser" = type { i32 (...)** } + %"struct.llvm::AliasAnalysis" = type opaque + %"struct.llvm::AnalysisResolver" = type { %"struct.std::vector,std::allocator > >", %"struct.llvm::PMDataManager"* } + %"struct.llvm::Annotable" = type { %"struct.llvm::Annotation"* } + %"struct.llvm::Annotation" = type { i32 (...)**, %"struct..1$_69", %"struct.llvm::Annotation"* } + %"struct.llvm::Argument" = type { %"struct.llvm::Value", %"struct.llvm::ilist_node", %"struct.llvm::Function"* } + %"struct.llvm::AttrListPtr" = type { %"struct.llvm::AttributeListImpl"* } + %"struct.llvm::AttributeListImpl" = type opaque + %"struct.llvm::BasicBlock" = type { %"struct.llvm::Value", %"struct.llvm::ilist_node", %"struct.llvm::iplist >", %"struct.llvm::Function"* } + %"struct.llvm::BitVector" = type { i32*, i32, i32 } + %"struct.llvm::BumpPtrAllocator" = type { i8* } + %"struct.llvm::CalleeSavedInfo" = type { i32, %"struct.llvm::TargetRegisterClass"*, i32 } + %"struct.llvm::Constant" = type { %"struct.llvm::User" } + %"struct.llvm::DebugLocTracker" = type { %"struct.std::vector >", %"struct.llvm::DenseMap,llvm::DenseMapInfo >" } + %"struct.llvm::DebugLocTuple" = type { %"struct.llvm::GlobalVariable"*, i32, i32 } + %"struct.llvm::DenseMap,llvm::DenseMapInfo >" = type { i32, %"struct.std::pair"*, i32, i32 } + %"struct.llvm::DenseMap,llvm::DenseMapInfo >" = type { i32, %"struct.std::pair"*, i32, i32 } + %"struct.llvm::DenseMap,llvm::DenseMapInfo >" = type { i32, %"struct.std::pair"*, i32, i32 } + %"struct.llvm::DenseMap,llvm::DenseMapInfo >" = type { i32, %"struct.std::pair"*, i32, i32 } + %"struct.llvm::DenseSet >" = type { %"struct.llvm::DenseMap,llvm::DenseMapInfo >" } + %"struct.llvm::Function" = type { %"struct.llvm::GlobalValue", %"struct.llvm::Annotable", %"struct.llvm::ilist_node", %"struct.llvm::iplist >", %"struct.llvm::iplist >", %"struct.llvm::ValueSymbolTable"*, %"struct.llvm::AttrListPtr" } + %"struct.llvm::FunctionPass" = type { %"struct.llvm::Pass" } + %"struct.llvm::GlobalValue" = type { %"struct.llvm::Constant", %"struct.llvm::Module"*, i32, %"struct.std::string" } + %"struct.llvm::GlobalVariable" = type opaque + %"struct.llvm::Instruction" = type { %"struct.llvm::User", %"struct.llvm::ilist_node", %"struct.llvm::BasicBlock"* } + %"struct.llvm::LiveInterval" = type <{ i32, float, i16, [6 x i8], %"struct.llvm::SmallVector", %"struct.llvm::SmallVector" }> + %"struct.llvm::LiveIntervals" = type { %"struct.llvm::MachineFunctionPass", %"struct.llvm::MachineFunction"*, %"struct.llvm::MachineRegisterInfo"*, %"struct.llvm::TargetMachine"*, %"struct.llvm::TargetRegisterInfo"*, %"struct.llvm::TargetInstrInfo"*, %"struct.llvm::AliasAnalysis"*, %"struct.llvm::LiveVariables"*, %"struct.llvm::BumpPtrAllocator", %"struct.std::vector,std::allocator > >", %"struct.std::vector,std::allocator > >", i64, %"struct.llvm::DenseMap,llvm::DenseMapInfo >", %"struct.std::vector >", %"struct.llvm::DenseMap,llvm::DenseMapInfo >", %"struct.llvm::BitVector! ", %"struct.std::vector >" } + %"struct.llvm::LiveVariables" = type opaque + %"struct.llvm::MVT" = type { %"struct..1$_69" } + %"struct.llvm::MachineBasicBlock" = type { %"struct.llvm::ilist_node", %"struct.llvm::ilist", %"struct.llvm::BasicBlock"*, i32, %"struct.llvm::MachineFunction"*, %"struct.std::vector >", %"struct.std::vector >", %"struct.std::vector >", i32, i8 } + %"struct.llvm::MachineConstantPool" = type opaque + %"struct.llvm::MachineFrameInfo" = type { %"struct.std::vector >", i32, i8, i8, i64, i32, i32, i8, i32, i32, %"struct.std::vector >", %"struct.llvm::MachineModuleInfo"*, %"struct.llvm::TargetFrameInfo"* } + %"struct.llvm::MachineFrameInfo::StackObject" = type { i64, i32, i8, i64 } + %"struct.llvm::MachineFunction" = type { %"struct.llvm::Annotation", %"struct.llvm::Function"*, %"struct.llvm::TargetMachine"*, %"struct.llvm::MachineRegisterInfo"*, %"struct.llvm::AbstractTypeUser"*, %"struct.llvm::MachineFrameInfo"*, %"struct.llvm::MachineConstantPool"*, %"struct.llvm::MachineJumpTableInfo"*, %"struct.std::vector >", %"struct.llvm::BumpPtrAllocator", %"struct.llvm::Recycler", %"struct.llvm::Recycler", %"struct.llvm::ilist", %"struct..1$_69", %"struct.llvm::DebugLocTracker" } + %"struct.llvm::MachineFunctionPass" = type { %"struct.llvm::FunctionPass" } + %"struct.llvm::MachineInstr" = type { %"struct.llvm::ilist_node", %"struct.llvm::TargetInstrDesc"*, i16, %"struct.std::vector >", %"struct.std::list >", %"struct.llvm::MachineBasicBlock"*, %"struct..1$_69" } + %"struct.llvm::MachineJumpTableInfo" = type opaque + %"struct.llvm::MachineModuleInfo" = type opaque + %"struct.llvm::MachineOperand" = type { i8, i8, i8, %"struct.llvm::MachineInstr"*, %"struct.llvm::MachineOperand::$_66" } + %"struct.llvm::MachineOperand::$_66" = type { %"struct..0$_67" } + %"struct.llvm::MachineRegisterInfo" = type { %"struct.std::vector,std::allocator > >", %"struct.std::vector >,std::allocator > > >", %"struct.llvm::MachineOperand"**, %"struct.llvm::BitVector", %"struct.std::vector,std::allocator > >", %"struct.std::vector >" } + %"struct.llvm::Module" = type opaque + %"struct.llvm::PATypeHandle" = type { %"struct.llvm::Type"*, %"struct.llvm::AbstractTypeUser"* } + %"struct.llvm::PATypeHolder" = type { %"struct.llvm::Type"* } + %"struct.llvm::PMDataManager" = type opaque + %"struct.llvm::Pass" = type { i32 (...)**, %"struct.llvm::AnalysisResolver"*, i32 } + %"struct.llvm::PassInfo" = type { i8*, i8*, i32, i8, i8, i8, %"struct.std::vector >", %"struct.llvm::Pass"* ()* } + %"struct.llvm::Recycler" = type { %"struct.llvm::iplist >" } + %"struct.llvm::RecyclerStruct" = type { %"struct.llvm::RecyclerStruct"*, %"struct.llvm::RecyclerStruct"* } + %"struct.llvm::SmallVector" = type <{ [17 x i8], [47 x i8] }> + %"struct.llvm::SmallVector" = type <{ [17 x i8], [15 x i8] }> + %"struct.llvm::TargetAsmInfo" = type opaque + %"struct.llvm::TargetFrameInfo" = type opaque + %"struct.llvm::TargetInstrDesc" = type { i16, i16, i16, i16, i8*, i32, i32, i32*, i32*, %"struct.llvm::TargetRegisterClass"**, %"struct.llvm::TargetOperandInfo"* } + %"struct.llvm::TargetInstrInfo" = type { i32 (...)**, %"struct.llvm::TargetInstrDesc"*, i32 } + %"struct.llvm::TargetMachine" = type { i32 (...)**, %"struct.llvm::TargetAsmInfo"* } + %"struct.llvm::TargetOperandInfo" = type { i16, i16, i32 } + %"struct.llvm::TargetRegisterClass" = type { i32 (...)**, i32, i8*, %"struct.llvm::MVT"*, %"struct.llvm::TargetRegisterClass"**, %"struct.llvm::TargetRegisterClass"**, %"struct.llvm::TargetRegisterClass"**, %"struct.llvm::TargetRegisterClass"**, i32, i32, i32, i32*, i32*, %"struct.llvm::DenseSet >" } + %"struct.llvm::TargetRegisterDesc" = type { i8*, i8*, i32*, i32*, i32* } + %"struct.llvm::TargetRegisterInfo" = type { i32 (...)**, i32*, i32, i32*, i32, i32*, i32, %"struct.llvm::TargetRegisterDesc"*, i32, %"struct.llvm::TargetRegisterClass"**, %"struct.llvm::TargetRegisterClass"**, i32, i32 } + %"struct.llvm::Type" = type { %"struct.llvm::AbstractTypeUser", i8, [3 x i8], i32, %"struct.llvm::Type"*, %"struct.std::vector >", i32, %"struct.llvm::PATypeHandle"* } + %"struct.llvm::Use" = type { %"struct.llvm::Value"*, %"struct.llvm::Use"*, %"struct..1$_69" } + %"struct.llvm::User" = type { %"struct.llvm::Value", %"struct.llvm::Use"*, i32 } + %"struct.llvm::Value" = type { i32 (...)**, i8, i8, i16, %"struct.llvm::PATypeHolder", %"struct.llvm::Use"*, %"struct.llvm::ValueName"* } + %"struct.llvm::ValueName" = type opaque + %"struct.llvm::ValueSymbolTable" = type opaque + %"struct.llvm::ilist" = type { %"struct.llvm::iplist >" } + %"struct.llvm::ilist" = type { %"struct.llvm::iplist >" } + %"struct.llvm::ilist_node" = type { %"struct.llvm::Argument"*, %"struct.llvm::Argument"* } + %"struct.llvm::ilist_node" = type { %"struct.llvm::BasicBlock"*, %"struct.llvm::BasicBlock"* } + %"struct.llvm::ilist_node" = type { %"struct.llvm::Function"*, %"struct.llvm::Function"* } + %"struct.llvm::ilist_node" = type { %"struct.llvm::Instruction"*, %"struct.llvm::Instruction"* } + %"struct.llvm::ilist_node" = type { %"struct.llvm::MachineBasicBlock"*, %"struct.llvm::MachineBasicBlock"* } + %"struct.llvm::ilist_node" = type { %"struct.llvm::MachineInstr"*, %"struct.llvm::MachineInstr"* } + %"struct.llvm::ilist_traits" = type { %"struct.llvm::ilist_node" } + %"struct.llvm::ilist_traits" = type { %"struct.llvm::ilist_node" } + %"struct.llvm::ilist_traits" = type { %"struct.llvm::ilist_node" } + %"struct.llvm::ilist_traits" = type { %"struct.llvm::ilist_node" } + %"struct.llvm::ilist_traits" = type { %"struct.llvm::ilist_node", %"struct.llvm::MachineBasicBlock"* } + %"struct.llvm::ilist_traits" = type { %"struct.llvm::RecyclerStruct" } + %"struct.llvm::iplist >" = type { %"struct.llvm::ilist_traits", %"struct.llvm::Argument"* } + %"struct.llvm::iplist >" = type { %"struct.llvm::ilist_traits", %"struct.llvm::BasicBlock"* } + %"struct.llvm::iplist >" = type { %"struct.llvm::ilist_traits", %"struct.llvm::Instruction"* } + %"struct.llvm::iplist >" = type { %"struct.llvm::ilist_traits", %"struct.llvm::MachineBasicBlock"* } + %"struct.llvm::iplist >" = type { %"struct.llvm::ilist_traits", %"struct.llvm::MachineInstr"* } + %"struct.llvm::iplist >" = type { %"struct.llvm::ilist_traits", %"struct.llvm::RecyclerStruct"* } + %"struct.std::IdxMBBPair" = type { i32, %"struct.llvm::MachineBasicBlock"* } + %"struct.std::_List_base >" = type { %"struct.llvm::ilist_traits" } + %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } + %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::PassInfo"**, %"struct.llvm::PassInfo"**, %"struct.llvm::PassInfo"** } + %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } + %"struct.std::_Vector_base >::_Vector_impl" = type { i32*, i32*, i32* } + %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } + %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::AbstractTypeUser"**, %"struct.llvm::AbstractTypeUser"**, %"struct.llvm::AbstractTypeUser"** } + %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } + %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::CalleeSavedInfo"*, %"struct.llvm::CalleeSavedInfo"*, %"struct.llvm::CalleeSavedInfo"* } + %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } + %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::DebugLocTuple"*, %"struct.llvm::DebugLocTuple"*, %"struct.llvm::DebugLocTuple"* } + %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } + %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::MachineBasicBlock"**, %"struct.llvm::MachineBasicBlock"**, %"struct.llvm::MachineBasicBlock"** } + %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } + %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::MachineFrameInfo::StackObject"*, %"struct.llvm::MachineFrameInfo::StackObject"*, %"struct.llvm::MachineFrameInfo::StackObject"* } + %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } + %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::MachineInstr"**, %"struct.llvm::MachineInstr"**, %"struct.llvm::MachineInstr"** } + %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } + %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::MachineOperand"*, %"struct.llvm::MachineOperand"*, %"struct.llvm::MachineOperand"* } + %"struct.std::_Vector_base,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" } + %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" = type { %"struct.std::pair"*, %"struct.std::pair"*, %"struct.std::pair"* } + %"struct.std::_Vector_base,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" } + %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" = type { %"struct.std::pair"*, %"struct.std::pair"*, %"struct.std::pair"* } + %"struct.std::_Vector_base,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" } + %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" = type { %"struct.std::IdxMBBPair"*, %"struct.std::IdxMBBPair"*, %"struct.std::IdxMBBPair"* } + %"struct.std::_Vector_base,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" } + %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" = type { %"struct.std::pair"*, %"struct.std::pair"*, %"struct.std::pair"* } + %"struct.std::_Vector_base >,std::allocator > > >" = type { %"struct.std::_Vector_base >,std::allocator > > >::_Vector_impl" } + %"struct.std::_Vector_base >,std::allocator > > >::_Vector_impl" = type { %"struct.std::vector >"*, %"struct.std::vector >"*, %"struct.std::vector >"* } + %"struct.std::list >" = type { %"struct.std::_List_base >" } + %"struct.std::pair" = type { %"struct.llvm::PassInfo"*, %"struct.llvm::Pass"* } + %"struct.std::pair" = type { %"struct.llvm::TargetRegisterClass"*, %"struct.llvm::MachineOperand"* } + %"struct.std::pair" = type { %"struct.llvm::DebugLocTuple", i32 } + %"struct.std::pair" = type { %"struct.llvm::MachineInstr"*, i32 } + %"struct.std::pair" = type { i32, i8 } + %"struct.std::pair" = type { i32, i32 } + %"struct.std::pair" = type { i32, %"struct.llvm::LiveInterval"* } + %"struct.std::string" = type { %"struct.llvm::BumpPtrAllocator" } + %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } + %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } + %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } + %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } + %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } + %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } + %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } + %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } + %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } + %"struct.std::vector,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >" } + %"struct.std::vector,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >" } + %"struct.std::vector,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >" } + %"struct.std::vector,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >" } + %"struct.std::vector >,std::allocator > > >" = type { %"struct.std::_Vector_base >,std::allocator > > >" } + at _ZZNK4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE15LookupBucketForERKS2_RPSt4pairIS2_jEE8__func__ = external constant [16 x i8] ; <[16 x i8]*> [#uses=1] +@"\01LC6" = external constant [56 x i8] ; <[56 x i8]*> [#uses=1] +@"\01LC7" = external constant [134 x i8] ; <[134 x i8]*> [#uses=1] +@"\01LC8" = external constant [72 x i8] ; <[72 x i8]*> [#uses=1] + at _ZZN4llvm13LiveIntervals24InsertMachineInstrInMapsEPNS_12MachineInstrEjE8__func__ = external constant [25 x i8] ; <[25 x i8]*> [#uses=1] +@"\01LC51" = external constant [42 x i8] ; <[42 x i8]*> [#uses=1] + +define void @_ZN4llvm13LiveIntervals24InsertMachineInstrInMapsEPNS_12MachineInstrEj(%"struct.llvm::LiveIntervals"* nocapture %this, %"struct.llvm::MachineInstr"* %MI, i32 %Index) nounwind ssp { +entry: + %0 = call i64 @_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE4findERKS2_(%"struct.llvm::DenseMap,llvm::DenseMapInfo >"* null, %"struct.llvm::MachineInstr"** null) nounwind ssp ; [#uses=1] + %1 = trunc i64 %0 to i32 ; [#uses=1] + %tmp11 = inttoptr i32 %1 to %"struct.std::pair"* ; <%"struct.std::pair"*> [#uses=1] + %2 = load %"struct.std::pair"** null, align 4 ; <%"struct.std::pair"*> [#uses=3] + %3 = getelementptr %"struct.llvm::LiveIntervals"* %this, i32 0, i32 12, i32 0 ; [#uses=1] + %4 = load i32* %3, align 4 ; [#uses=2] + %5 = getelementptr %"struct.std::pair"* %2, i32 %4 ; <%"struct.std::pair"*> [#uses=1] + br label %bb1.i.i.i + +bb.i.i.i: ; preds = %bb2.i.i.i + %indvar.next = add i32 %indvar, 1 ; [#uses=1] + br label %bb1.i.i.i + +bb1.i.i.i: ; preds = %bb.i.i.i, %entry + %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb.i.i.i ] ; [#uses=2] + %tmp32 = shl i32 %indvar, 3 ; [#uses=1] + %ctg2.sum = add i32 0, %tmp32 ; [#uses=1] + %ctg237 = getelementptr i8* null, i32 %ctg2.sum ; [#uses=1] + %.0.0.i = bitcast i8* %ctg237 to %"struct.std::pair"* ; <%"struct.std::pair"*> [#uses=2] + %6 = icmp eq %"struct.std::pair"* %.0.0.i, %5 ; [#uses=1] + br i1 %6, label %_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE3endEv.exit, label %bb2.i.i.i + +bb2.i.i.i: ; preds = %bb1.i.i.i + %7 = load %"struct.llvm::MachineInstr"** null, align 4 ; <%"struct.llvm::MachineInstr"*> [#uses=1] + %8 = icmp eq %"struct.llvm::MachineInstr"* %7, inttoptr (i32 -8 to %"struct.llvm::MachineInstr"*) ; [#uses=1] + %or.cond.i.i.i21 = or i1 false, %8 ; [#uses=1] + br i1 %or.cond.i.i.i21, label %bb.i.i.i, label %_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE3endEv.exit + +_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE3endEv.exit: ; preds = %bb2.i.i.i, %bb1.i.i.i + %9 = icmp eq %"struct.std::pair"* %tmp11, %.0.0.i ; [#uses=1] + br i1 %9, label %bb7, label %bb6 + +bb6: ; preds = %_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE3endEv.exit + call void @__assert_rtn(i8* getelementptr ([25 x i8]* @_ZZN4llvm13LiveIntervals24InsertMachineInstrInMapsEPNS_12MachineInstrEjE8__func__, i32 0, i32 0), i8* getelementptr ([72 x i8]* @"\01LC8", i32 0, i32 0), i32 251, i8* getelementptr ([42 x i8]* @"\01LC51", i32 0, i32 0)) noreturn nounwind + unreachable + +bb7: ; preds = %_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE3endEv.exit + %10 = load %"struct.llvm::MachineInstr"** null, align 4 ; <%"struct.llvm::MachineInstr"*> [#uses=2] + %11 = icmp eq %"struct.llvm::MachineInstr"* %10, inttoptr (i32 -8 to %"struct.llvm::MachineInstr"*) ; [#uses=1] + %or.cond40.i.i.i = or i1 false, %11 ; [#uses=1] + br i1 %or.cond40.i.i.i, label %bb5.i.i.i, label %bb6.preheader.i.i.i + +bb6.preheader.i.i.i: ; preds = %bb7 + %12 = add i32 %4, -1 ; [#uses=1] + br label %bb6.i.i.i + +bb5.i.i.i: ; preds = %bb7 + call void @__assert_rtn(i8* getelementptr ([16 x i8]* @_ZZNK4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE15LookupBucketForERKS2_RPSt4pairIS2_jEE8__func__, i32 0, i32 0), i8* getelementptr ([56 x i8]* @"\01LC6", i32 0, i32 0), i32 390, i8* getelementptr ([134 x i8]* @"\01LC7", i32 0, i32 0)) noreturn nounwind + unreachable + +bb6.i.i.i: ; preds = %bb17.i.i.i, %bb6.preheader.i.i.i + %FoundTombstone.1.i.i.i = phi %"struct.std::pair"* [ %FoundTombstone.0.i.i.i, %bb17.i.i.i ], [ null, %bb6.preheader.i.i.i ] ; <%"struct.std::pair"*> [#uses=2] + %ProbeAmt.0.i.i.i = phi i32 [ 0, %bb17.i.i.i ], [ 1, %bb6.preheader.i.i.i ] ; [#uses=1] + %BucketNo.0.i.i.i = phi i32 [ %20, %bb17.i.i.i ], [ 0, %bb6.preheader.i.i.i ] ; [#uses=2] + %13 = and i32 %BucketNo.0.i.i.i, %12 ; [#uses=2] + %14 = getelementptr %"struct.std::pair"* %2, i32 %13 ; <%"struct.std::pair"*> [#uses=2] + %15 = getelementptr %"struct.std::pair"* %2, i32 %13, i32 0 ; <%"struct.llvm::MachineInstr"**> [#uses=1] + %16 = load %"struct.llvm::MachineInstr"** %15, align 4 ; <%"struct.llvm::MachineInstr"*> [#uses=2] + %17 = icmp eq %"struct.llvm::MachineInstr"* %16, %10 ; [#uses=1] + br i1 %17, label %_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEEixERKS2_.exit, label %bb17.i.i.i + +bb17.i.i.i: ; preds = %bb6.i.i.i + %18 = icmp eq %"struct.llvm::MachineInstr"* %16, inttoptr (i32 -8 to %"struct.llvm::MachineInstr"*) ; [#uses=1] + %19 = icmp eq %"struct.std::pair"* %FoundTombstone.1.i.i.i, null ; [#uses=1] + %or.cond.i.i.i = and i1 %18, %19 ; [#uses=1] + %FoundTombstone.0.i.i.i = select i1 %or.cond.i.i.i, %"struct.std::pair"* %14, %"struct.std::pair"* %FoundTombstone.1.i.i.i ; <%"struct.std::pair"*> [#uses=1] + %20 = add i32 %BucketNo.0.i.i.i, %ProbeAmt.0.i.i.i ; [#uses=1] + br label %bb6.i.i.i + +_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEEixERKS2_.exit: ; preds = %bb6.i.i.i + %21 = getelementptr %"struct.std::pair"* %14, i32 0, i32 1 ; [#uses=1] + store i32 %Index, i32* %21, align 4 + ret void +} + +declare void @__assert_rtn(i8*, i8*, i32, i8*) noreturn + +declare i64 @_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE4findERKS2_(%"struct.llvm::DenseMap,llvm::DenseMapInfo >"* nocapture, %"struct.llvm::MachineInstr"** nocapture) nounwind ssp Modified: llvm/trunk/test/CodeGen/X86/stack-color-with-reg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/stack-color-with-reg.ll?rev=71574&r1=71573&r2=71574&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/stack-color-with-reg.ll (original) +++ llvm/trunk/test/CodeGen/X86/stack-color-with-reg.ll Tue May 12 13:31:57 2009 @@ -1,7 +1,6 @@ -; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin10 -relocation-model=pic -disable-fp-elim -O3 -stats -info-output-file - > %t +; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin10 -relocation-model=pic -disable-fp-elim -color-ss-with-regs -stats -info-output-file - > %t ; RUN: grep stackcoloring %t | grep "loads eliminated" ; RUN: grep stackcoloring %t | grep "stores eliminated" -; XFAIL: * type { [62 x %struct.Bitvec*] } ; type %0 type { i8* } ; type %1 From evan.cheng at apple.com Tue May 12 13:35:43 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 12 May 2009 18:35:43 -0000 Subject: [llvm-commits] [llvm] r71575 - /llvm/trunk/test/CodeGen/X86/2007-03-01-SpillerCrash.ll Message-ID: <200905121835.n4CIZhqG000926@zion.cs.uiuc.edu> Author: evancheng Date: Tue May 12 13:35:43 2009 New Revision: 71575 URL: http://llvm.org/viewvc/llvm-project?rev=71575&view=rev Log: Add nounwind. Modified: llvm/trunk/test/CodeGen/X86/2007-03-01-SpillerCrash.ll Modified: llvm/trunk/test/CodeGen/X86/2007-03-01-SpillerCrash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-03-01-SpillerCrash.ll?rev=71575&r1=71574&r2=71575&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2007-03-01-SpillerCrash.ll (original) +++ llvm/trunk/test/CodeGen/X86/2007-03-01-SpillerCrash.ll Tue May 12 13:35:43 2009 @@ -1,6 +1,6 @@ ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin8 -mattr=+sse2 -define void @test() { +define void @test() nounwind { test.exit: mul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:0 [#uses=4] load <4 x float>* null ; <<4 x float>>:1 [#uses=1] From evan.cheng at apple.com Tue May 12 14:32:47 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 12 May 2009 12:32:47 -0700 Subject: [llvm-commits] [PATCH] Machine code verifier pass In-Reply-To: References: <04F74F5E-5BCA-4F65-8ED5-CAF353E31497@2pi.dk> <2BC4EDFE-5114-4D65-9976-825231B06394@apple.com> <8B5BCC45-2E12-4BC7-A0AF-3C6B9EA5CCBE@2pi.dk> <6AEB9D2A-D643-4AE4-9740-F51B5519099F@apple.com> Message-ID: <0CE82DAC-D67A-425D-8F60-41B4EABF49BA@apple.com> On May 11, 2009, at 10:37 PM, Jakob Stoklund Olesen wrote: > > On 12/05/2009, at 03.07, Evan Cheng wrote: > >> How about x86? :-) > > Here is one from CodeGen/X86/2007-03-01-SpillerCrash.ll: > > 0x1839d5c, LLVM BB @0x1001e00, ID#3: > Live Ins: %XMM1 %XMM2 > Predecessors according to CFG: 0x1839b88 (#2) > %XMM3 = FsFLD0SS > UCOMISSrr %XMM1, %XMM3, %EFLAGS > JBE mbb<,0x1839dfc>, %EFLAGS > Successors according to CFG: 0x1839dac (#4) 0x1839dfc (#5) > > : 0x1839dac, LLVM BB @0x1001e30, ID#4: > Live Ins: %XMM1 %XMM2 > Predecessors according to CFG: 0x1839d5c (#3) > %XMM2 = MOVHLPSrr %XMM2, %XMM2 > %XMM2 = PSHUFDri %XMM1, 1 > %XMM1 = MOVHLPSrr %XMM1, %XMM1 > %XMM2 = FsXORPSrm %XMM2, %reg0, 1, %reg0, , %reg0, > Mem:LD(4,16) [ConstantPool + 0] > JMP mbb > Successors according to CFG: 0x1839e4c (#6) > > *** Bad machine code: Live-in register not live-out from predecessor > *** > - function: test > - basic block: ID#4 > Register XMM1 is not live-out from MBB ID#3. Very nice. UCOMISSrr should not kill XMM1. This is a real bug, the register allocator should have removed the kill when it coalesced away a copy. I've fixed it. The double def is also a bug. : 0x202ddac, LLVM BB @0x1b01ee0, ID#4: Live Ins: %XMM2 %XMM1 Predecessors according to CFG: 0x202dd5c (#3) %reg1025 = MOVHLPSrr %reg1025, %reg1025 %reg1043 = MOVPS2SSrr %reg1025 When VirtRegRewriter removed the copy MOVPS2SSrr, it should have removed MOVHLPSrr as well since there are no other uses of reg1025. It is not a critical bug, but we should fix this as well. Thanks, Evan > > There are also physreg double defs in ID#4, but that check is disabled > for now. > > > From CodeGen/X86/2007-08-09-IllegalX86-64Asm.ll: > > bb4: 0xf73718, LLVM BB @0x1006e50, ID#11: > Predecessors according to CFG: 0x183a7a8 (#10) 0x183a848 (#13) > %RAX = MOV64rm %RAX, 1, %reg0, 96, %reg0, Mem:LD(8,8) > [tmp9 + 0] > %RDI = MOV64rr %R14 > %RSI = MOV64rr %RBX > > ** Bad machine code: Using an undefined physical register *** > - function: ubyte_divmod > - basic block: ID#11 > - instruction: %RAX = MOV64rm %RAX, 1, %reg0, 96, %reg0, > Mem:LD(8,8) [tmp9 + 0] > - operand 1: %RAX > > *** Bad machine code: Using an undefined physical register *** > - function: ubyte_divmod > - basic block: ID#11 > - instruction: %RDI = MOV64rr %R14 > - operand 1: %R14 > > *** Bad machine code: Using an undefined physical register *** > - function: ubyte_divmod > - basic block: ID#11 > - instruction: %RSI = MOV64rr %RBX > - operand 1: %RBX > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From kremenek at apple.com Tue May 12 15:08:07 2009 From: kremenek at apple.com (Ted Kremenek) Date: Tue, 12 May 2009 20:08:07 -0000 Subject: [llvm-commits] [llvm] r71580 - /llvm/tags/checker/checker-0.203/ Message-ID: <200905122008.n4CK87fj004725@zion.cs.uiuc.edu> Author: kremenek Date: Tue May 12 15:08:05 2009 New Revision: 71580 URL: http://llvm.org/viewvc/llvm-project?rev=71580&view=rev Log: Tagging checker-0.203. Added: llvm/tags/checker/checker-0.203/ - copied from r71579, llvm/trunk/ From evan.cheng at apple.com Tue May 12 15:17:56 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 12 May 2009 20:17:56 -0000 Subject: [llvm-commits] [llvm] r71582 - /llvm/trunk/lib/Target/X86/X86InstrSSE.td Message-ID: <200905122017.n4CKHvWL005081@zion.cs.uiuc.edu> Author: evancheng Date: Tue May 12 15:17:52 2009 New Revision: 71582 URL: http://llvm.org/viewvc/llvm-project?rev=71582&view=rev Log: 80 col violations. Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=71582&r1=71581&r2=71582&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue May 12 15:17:52 2009 @@ -736,12 +736,14 @@ let Constraints = "$src1 = $dst" in { let AddedComplexity = 20 in { -def MOVLHPSrr : PSI<0x16, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src1, VR128:$src2), +def MOVLHPSrr : PSI<0x16, MRMSrcReg, (outs VR128:$dst), + (ins VR128:$src1, VR128:$src2), "movlhps\t{$src2, $dst|$dst, $src2}", [(set VR128:$dst, (v4f32 (movhp VR128:$src1, VR128:$src2)))]>; -def MOVHLPSrr : PSI<0x12, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src1, VR128:$src2), +def MOVHLPSrr : PSI<0x12, MRMSrcReg, (outs VR128:$dst), + (ins VR128:$src1, VR128:$src2), "movhlps\t{$src2, $dst|$dst, $src2}", [(set VR128:$dst, (v4f32 (movhlps VR128:$src1, VR128:$src2)))]>; From jay.foad at gmail.com Tue May 12 15:27:45 2009 From: jay.foad at gmail.com (Jay Foad) Date: Tue, 12 May 2009 20:27:45 -0000 Subject: [llvm-commits] [llvm] r71587 - /llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp Message-ID: <200905122027.n4CKRjju005605@zion.cs.uiuc.edu> Author: foad Date: Tue May 12 15:27:44 2009 New Revision: 71587 URL: http://llvm.org/viewvc/llvm-project?rev=71587&view=rev Log: Switch to using IRBuilder throughout. Modified: llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp Modified: llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp?rev=71587&r1=71586&r2=71587&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp Tue May 12 15:27:44 2009 @@ -14,35 +14,13 @@ #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Module.h" -#include "llvm/Instructions.h" #include "llvm/Type.h" #include "llvm/CodeGen/IntrinsicLowering.h" -#include "llvm/Support/Streams.h" +#include "llvm/Support/IRBuilder.h" #include "llvm/Target/TargetData.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/STLExtras.h" using namespace llvm; -// Return the integer value Val zero-extended or truncated (if necessary) to -// type ITy. Any new instructions are inserted at InsertBefore. -template -static Value *getZExtOrTrunc(Value *Val, const IntegerType *ITy, - InsertType InsertPoint) { - const IntegerType *ValTy = cast(Val->getType()); - if (ValTy == ITy) - return Val; - Constant *CVal = dyn_cast(Val); - if (ValTy->getBitWidth() < ITy->getBitWidth()) { - if (CVal) - return ConstantExpr::getZExt(CVal, ITy); - return new ZExtInst(Val, ITy, "", InsertPoint); - } else { - if (CVal) - return ConstantExpr::getTrunc(CVal, ITy); - return new TruncInst(Val, ITy, "", InsertPoint); - } -} - template static void EnsureFunctionExists(Module &M, const char *Name, ArgIt ArgBegin, ArgIt ArgEnd, @@ -96,9 +74,10 @@ FunctionType::get(RetTy, ParamTys, false)); } + IRBuilder<> Builder(CI->getParent(), CI); SmallVector Args(ArgBegin, ArgEnd); - CallInst *NewCI = CallInst::Create(FCache, Args.begin(), Args.end(), - CI->getName(), CI); + CallInst *NewCI = Builder.CreateCall(FCache, Args.begin(), Args.end()); + NewCI->setName(CI->getName()); if (!CI->use_empty()) CI->replaceAllUsesWith(NewCI); return NewCI; @@ -176,79 +155,80 @@ unsigned BitSize = V->getType()->getPrimitiveSizeInBits(); + IRBuilder<> Builder(IP->getParent(), IP); + switch(BitSize) { default: assert(0 && "Unhandled type size of value to byteswap!"); case 16: { - Value *Tmp1 = BinaryOperator::CreateShl(V, - ConstantInt::get(V->getType(),8),"bswap.2",IP); - Value *Tmp2 = BinaryOperator::CreateLShr(V, - ConstantInt::get(V->getType(),8),"bswap.1",IP); - V = BinaryOperator::CreateOr(Tmp1, Tmp2, "bswap.i16", IP); + Value *Tmp1 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 8), + "bswap.2"); + Value *Tmp2 = Builder.CreateLShr(V, ConstantInt::get(V->getType(), 8), + "bswap.1"); + V = Builder.CreateOr(Tmp1, Tmp2, "bswap.i16"); break; } case 32: { - Value *Tmp4 = BinaryOperator::CreateShl(V, - ConstantInt::get(V->getType(),24),"bswap.4", IP); - Value *Tmp3 = BinaryOperator::CreateShl(V, - ConstantInt::get(V->getType(),8),"bswap.3",IP); - Value *Tmp2 = BinaryOperator::CreateLShr(V, - ConstantInt::get(V->getType(),8),"bswap.2",IP); - Value *Tmp1 = BinaryOperator::CreateLShr(V, - ConstantInt::get(V->getType(),24),"bswap.1", IP); - Tmp3 = BinaryOperator::CreateAnd(Tmp3, - ConstantInt::get(Type::Int32Ty, 0xFF0000), - "bswap.and3", IP); - Tmp2 = BinaryOperator::CreateAnd(Tmp2, - ConstantInt::get(Type::Int32Ty, 0xFF00), - "bswap.and2", IP); - Tmp4 = BinaryOperator::CreateOr(Tmp4, Tmp3, "bswap.or1", IP); - Tmp2 = BinaryOperator::CreateOr(Tmp2, Tmp1, "bswap.or2", IP); - V = BinaryOperator::CreateOr(Tmp4, Tmp2, "bswap.i32", IP); + Value *Tmp4 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 24), + "bswap.4"); + Value *Tmp3 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 8), + "bswap.3"); + Value *Tmp2 = Builder.CreateLShr(V, ConstantInt::get(V->getType(), 8), + "bswap.2"); + Value *Tmp1 = Builder.CreateLShr(V, ConstantInt::get(V->getType(), 24), + "bswap.1"); + Tmp3 = Builder.CreateAnd(Tmp3, ConstantInt::get(Type::Int32Ty, 0xFF0000), + "bswap.and3"); + Tmp2 = Builder.CreateAnd(Tmp2, ConstantInt::get(Type::Int32Ty, 0xFF00), + "bswap.and2"); + Tmp4 = Builder.CreateOr(Tmp4, Tmp3, "bswap.or1"); + Tmp2 = Builder.CreateOr(Tmp2, Tmp1, "bswap.or2"); + V = Builder.CreateOr(Tmp4, Tmp2, "bswap.i32"); break; } case 64: { - Value *Tmp8 = BinaryOperator::CreateShl(V, - ConstantInt::get(V->getType(),56),"bswap.8", IP); - Value *Tmp7 = BinaryOperator::CreateShl(V, - ConstantInt::get(V->getType(),40),"bswap.7", IP); - Value *Tmp6 = BinaryOperator::CreateShl(V, - ConstantInt::get(V->getType(),24),"bswap.6", IP); - Value *Tmp5 = BinaryOperator::CreateShl(V, - ConstantInt::get(V->getType(),8),"bswap.5", IP); - Value* Tmp4 = BinaryOperator::CreateLShr(V, - ConstantInt::get(V->getType(),8),"bswap.4", IP); - Value* Tmp3 = BinaryOperator::CreateLShr(V, - ConstantInt::get(V->getType(),24),"bswap.3", IP); - Value* Tmp2 = BinaryOperator::CreateLShr(V, - ConstantInt::get(V->getType(),40),"bswap.2", IP); - Value* Tmp1 = BinaryOperator::CreateLShr(V, - ConstantInt::get(V->getType(),56),"bswap.1", IP); - Tmp7 = BinaryOperator::CreateAnd(Tmp7, - ConstantInt::get(Type::Int64Ty, - 0xFF000000000000ULL), - "bswap.and7", IP); - Tmp6 = BinaryOperator::CreateAnd(Tmp6, - ConstantInt::get(Type::Int64Ty, 0xFF0000000000ULL), - "bswap.and6", IP); - Tmp5 = BinaryOperator::CreateAnd(Tmp5, + Value *Tmp8 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 56), + "bswap.8"); + Value *Tmp7 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 40), + "bswap.7"); + Value *Tmp6 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 24), + "bswap.6"); + Value *Tmp5 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 8), + "bswap.5"); + Value* Tmp4 = Builder.CreateLShr(V, ConstantInt::get(V->getType(), 8), + "bswap.4"); + Value* Tmp3 = Builder.CreateLShr(V, ConstantInt::get(V->getType(), 24), + "bswap.3"); + Value* Tmp2 = Builder.CreateLShr(V, ConstantInt::get(V->getType(), 40), + "bswap.2"); + Value* Tmp1 = Builder.CreateLShr(V, ConstantInt::get(V->getType(), 56), + "bswap.1"); + Tmp7 = Builder.CreateAnd(Tmp7, + ConstantInt::get(Type::Int64Ty, + 0xFF000000000000ULL), + "bswap.and7"); + Tmp6 = Builder.CreateAnd(Tmp6, + ConstantInt::get(Type::Int64Ty, + 0xFF0000000000ULL), + "bswap.and6"); + Tmp5 = Builder.CreateAnd(Tmp5, ConstantInt::get(Type::Int64Ty, 0xFF00000000ULL), - "bswap.and5", IP); - Tmp4 = BinaryOperator::CreateAnd(Tmp4, + "bswap.and5"); + Tmp4 = Builder.CreateAnd(Tmp4, ConstantInt::get(Type::Int64Ty, 0xFF000000ULL), - "bswap.and4", IP); - Tmp3 = BinaryOperator::CreateAnd(Tmp3, + "bswap.and4"); + Tmp3 = Builder.CreateAnd(Tmp3, ConstantInt::get(Type::Int64Ty, 0xFF0000ULL), - "bswap.and3", IP); - Tmp2 = BinaryOperator::CreateAnd(Tmp2, + "bswap.and3"); + Tmp2 = Builder.CreateAnd(Tmp2, ConstantInt::get(Type::Int64Ty, 0xFF00ULL), - "bswap.and2", IP); - Tmp8 = BinaryOperator::CreateOr(Tmp8, Tmp7, "bswap.or1", IP); - Tmp6 = BinaryOperator::CreateOr(Tmp6, Tmp5, "bswap.or2", IP); - Tmp4 = BinaryOperator::CreateOr(Tmp4, Tmp3, "bswap.or3", IP); - Tmp2 = BinaryOperator::CreateOr(Tmp2, Tmp1, "bswap.or4", IP); - Tmp8 = BinaryOperator::CreateOr(Tmp8, Tmp6, "bswap.or5", IP); - Tmp4 = BinaryOperator::CreateOr(Tmp4, Tmp2, "bswap.or6", IP); - V = BinaryOperator::CreateOr(Tmp8, Tmp4, "bswap.i64", IP); + "bswap.and2"); + Tmp8 = Builder.CreateOr(Tmp8, Tmp7, "bswap.or1"); + Tmp6 = Builder.CreateOr(Tmp6, Tmp5, "bswap.or2"); + Tmp4 = Builder.CreateOr(Tmp4, Tmp3, "bswap.or3"); + Tmp2 = Builder.CreateOr(Tmp2, Tmp1, "bswap.or4"); + Tmp8 = Builder.CreateOr(Tmp8, Tmp6, "bswap.or5"); + Tmp4 = Builder.CreateOr(Tmp4, Tmp2, "bswap.or6"); + V = Builder.CreateOr(Tmp8, Tmp4, "bswap.i64"); break; } } @@ -266,6 +246,8 @@ 0x0000FFFF0000FFFFULL, 0x00000000FFFFFFFFULL }; + IRBuilder<> Builder(IP->getParent(), IP); + unsigned BitSize = V->getType()->getPrimitiveSizeInBits(); unsigned WordSize = (BitSize + 63) / 64; Value *Count = ConstantInt::get(V->getType(), 0); @@ -275,17 +257,17 @@ for (unsigned i = 1, ct = 0; i < (BitSize>64 ? 64 : BitSize); i <<= 1, ++ct) { Value *MaskCst = ConstantInt::get(V->getType(), MaskValues[ct]); - Value *LHS = BinaryOperator::CreateAnd( - PartValue, MaskCst, "cppop.and1", IP); - Value *VShift = BinaryOperator::CreateLShr(PartValue, - ConstantInt::get(V->getType(), i), "ctpop.sh", IP); - Value *RHS = BinaryOperator::CreateAnd(VShift, MaskCst, "cppop.and2", IP); - PartValue = BinaryOperator::CreateAdd(LHS, RHS, "ctpop.step", IP); + Value *LHS = Builder.CreateAnd(PartValue, MaskCst, "cppop.and1"); + Value *VShift = Builder.CreateLShr(PartValue, + ConstantInt::get(V->getType(), i), + "ctpop.sh"); + Value *RHS = Builder.CreateAnd(VShift, MaskCst, "cppop.and2"); + PartValue = Builder.CreateAdd(LHS, RHS, "ctpop.step"); } - Count = BinaryOperator::CreateAdd(PartValue, Count, "ctpop.part", IP); + Count = Builder.CreateAdd(PartValue, Count, "ctpop.part"); if (BitSize > 64) { - V = BinaryOperator::CreateLShr(V, ConstantInt::get(V->getType(), 64), - "ctpop.part.sh", IP); + V = Builder.CreateLShr(V, ConstantInt::get(V->getType(), 64), + "ctpop.part.sh"); BitSize -= 64; } } @@ -297,14 +279,16 @@ /// instruction IP. static Value *LowerCTLZ(Value *V, Instruction *IP) { + IRBuilder<> Builder(IP->getParent(), IP); + unsigned BitSize = V->getType()->getPrimitiveSizeInBits(); for (unsigned i = 1; i < BitSize; i <<= 1) { Value *ShVal = ConstantInt::get(V->getType(), i); - ShVal = BinaryOperator::CreateLShr(V, ShVal, "ctlz.sh", IP); - V = BinaryOperator::CreateOr(V, ShVal, "ctlz.step", IP); + ShVal = Builder.CreateLShr(V, ShVal, "ctlz.sh"); + V = Builder.CreateOr(V, ShVal, "ctlz.step"); } - V = BinaryOperator::CreateNot(V, "", IP); + V = Builder.CreateNot(V); return LowerCTPOP(V, IP); } @@ -319,6 +303,8 @@ /// the bits are returned in inverse order. /// @brief Lowering of llvm.part.select intrinsic. static Instruction *LowerPartSelect(CallInst *CI) { + IRBuilder<> Builder; + // Make sure we're dealing with a part select intrinsic here Function *F = CI->getCalledFunction(); const FunctionType *FT = F->getFunctionType(); @@ -359,13 +345,15 @@ BasicBlock *Reverse = BasicBlock::Create("reverse", CurBB->getParent()); BasicBlock *RsltBlk = BasicBlock::Create("result", CurBB->getParent()); + Builder.SetInsertPoint(CurBB); + // Cast Hi and Lo to the size of Val so the widths are all the same if (Hi->getType() != Val->getType()) - Hi = CastInst::CreateIntegerCast(Hi, Val->getType(), false, - "tmp", CurBB); + Hi = Builder.CreateIntCast(Hi, Val->getType(), /* isSigned */ false, + "tmp"); if (Lo->getType() != Val->getType()) - Lo = CastInst::CreateIntegerCast(Lo, Val->getType(), false, - "tmp", CurBB); + Lo = Builder.CreateIntCast(Lo, Val->getType(), /* isSigned */ false, + "tmp"); // Compute a few things that both cases will need, up front. Constant* Zero = ConstantInt::get(Val->getType(), 0); @@ -374,18 +362,18 @@ // Compare the Hi and Lo bit positions. This is used to determine // which case we have (forward or reverse) - ICmpInst *Cmp = new ICmpInst(ICmpInst::ICMP_ULT, Hi, Lo, "less",CurBB); - BranchInst::Create(RevSize, FwdSize, Cmp, CurBB); + Value *Cmp = Builder.CreateICmpULT(Hi, Lo, "less"); + Builder.CreateCondBr(Cmp, RevSize, FwdSize); - // First, copmute the number of bits in the forward case. - Instruction* FBitSize = - BinaryOperator::CreateSub(Hi, Lo,"fbits", FwdSize); - BranchInst::Create(Compute, FwdSize); + // First, compute the number of bits in the forward case. + Builder.SetInsertPoint(FwdSize); + Value* FBitSize = Builder.CreateSub(Hi, Lo, "fbits"); + Builder.CreateBr(Compute); // Second, compute the number of bits in the reverse case. - Instruction* RBitSize = - BinaryOperator::CreateSub(Lo, Hi, "rbits", RevSize); - BranchInst::Create(Compute, RevSize); + Builder.SetInsertPoint(RevSize); + Value* RBitSize = Builder.CreateSub(Lo, Hi, "rbits"); + Builder.CreateBr(Compute); // Now, compute the bit range. Start by getting the bitsize and the shift // amount (either Hi or Lo) from PHI nodes. Then we compute a mask for @@ -393,94 +381,88 @@ // least significant bits, apply the mask to zero out unwanted high bits, // and we have computed the "forward" result. It may still need to be // reversed. + Builder.SetInsertPoint(Compute); // Get the BitSize from one of the two subtractions - PHINode *BitSize = PHINode::Create(Val->getType(), "bits", Compute); + PHINode *BitSize = Builder.CreatePHI(Val->getType(), "bits"); BitSize->reserveOperandSpace(2); BitSize->addIncoming(FBitSize, FwdSize); BitSize->addIncoming(RBitSize, RevSize); // Get the ShiftAmount as the smaller of Hi/Lo - PHINode *ShiftAmt = PHINode::Create(Val->getType(), "shiftamt", Compute); + PHINode *ShiftAmt = Builder.CreatePHI(Val->getType(), "shiftamt"); ShiftAmt->reserveOperandSpace(2); ShiftAmt->addIncoming(Lo, FwdSize); ShiftAmt->addIncoming(Hi, RevSize); // Increment the bit size - Instruction *BitSizePlusOne = - BinaryOperator::CreateAdd(BitSize, One, "bits", Compute); + Value *BitSizePlusOne = Builder.CreateAdd(BitSize, One, "bits"); // Create a Mask to zero out the high order bits. - Instruction* Mask = - BinaryOperator::CreateShl(AllOnes, BitSizePlusOne, "mask", Compute); - Mask = BinaryOperator::CreateNot(Mask, "mask", Compute); + Value* Mask = Builder.CreateShl(AllOnes, BitSizePlusOne, "mask"); + Mask = Builder.CreateNot(Mask, "mask"); // Shift the bits down and apply the mask - Instruction* FRes = - BinaryOperator::CreateLShr(Val, ShiftAmt, "fres", Compute); - FRes = BinaryOperator::CreateAnd(FRes, Mask, "fres", Compute); - BranchInst::Create(Reverse, RsltBlk, Cmp, Compute); + Value* FRes = Builder.CreateLShr(Val, ShiftAmt, "fres"); + FRes = Builder.CreateAnd(FRes, Mask, "fres"); + Builder.CreateCondBr(Cmp, Reverse, RsltBlk); // In the Reverse block we have the mask already in FRes but we must reverse // it by shifting FRes bits right and putting them in RRes by shifting them // in from left. + Builder.SetInsertPoint(Reverse); // First set up our loop counters - PHINode *Count = PHINode::Create(Val->getType(), "count", Reverse); + PHINode *Count = Builder.CreatePHI(Val->getType(), "count"); Count->reserveOperandSpace(2); Count->addIncoming(BitSizePlusOne, Compute); // Next, get the value that we are shifting. - PHINode *BitsToShift = PHINode::Create(Val->getType(), "val", Reverse); + PHINode *BitsToShift = Builder.CreatePHI(Val->getType(), "val"); BitsToShift->reserveOperandSpace(2); BitsToShift->addIncoming(FRes, Compute); // Finally, get the result of the last computation - PHINode *RRes = PHINode::Create(Val->getType(), "rres", Reverse); + PHINode *RRes = Builder.CreatePHI(Val->getType(), "rres"); RRes->reserveOperandSpace(2); RRes->addIncoming(Zero, Compute); // Decrement the counter - Instruction *Decr = BinaryOperator::CreateSub(Count, One, "decr", Reverse); + Value *Decr = Builder.CreateSub(Count, One, "decr"); Count->addIncoming(Decr, Reverse); // Compute the Bit that we want to move - Instruction *Bit = - BinaryOperator::CreateAnd(BitsToShift, One, "bit", Reverse); + Value *Bit = Builder.CreateAnd(BitsToShift, One, "bit"); // Compute the new value for next iteration. - Instruction *NewVal = - BinaryOperator::CreateLShr(BitsToShift, One, "rshift", Reverse); + Value *NewVal = Builder.CreateLShr(BitsToShift, One, "rshift"); BitsToShift->addIncoming(NewVal, Reverse); // Shift the bit into the low bits of the result. - Instruction *NewRes = - BinaryOperator::CreateShl(RRes, One, "lshift", Reverse); - NewRes = BinaryOperator::CreateOr(NewRes, Bit, "addbit", Reverse); + Value *NewRes = Builder.CreateShl(RRes, One, "lshift"); + NewRes = Builder.CreateOr(NewRes, Bit, "addbit"); RRes->addIncoming(NewRes, Reverse); // Terminate loop if we've moved all the bits. - ICmpInst *Cond = - new ICmpInst(ICmpInst::ICMP_EQ, Decr, Zero, "cond", Reverse); - BranchInst::Create(RsltBlk, Reverse, Cond, Reverse); + Value *Cond = Builder.CreateICmpEQ(Decr, Zero, "cond"); + Builder.CreateCondBr(Cond, RsltBlk, Reverse); // Finally, in the result block, select one of the two results with a PHI // node and return the result; - CurBB = RsltBlk; - PHINode *BitSelect = PHINode::Create(Val->getType(), "part_select", CurBB); + Builder.SetInsertPoint(RsltBlk); + PHINode *BitSelect = Builder.CreatePHI(Val->getType(), "part_select"); BitSelect->reserveOperandSpace(2); BitSelect->addIncoming(FRes, Compute); BitSelect->addIncoming(NewRes, Reverse); - ReturnInst::Create(BitSelect, CurBB); + Builder.CreateRet(BitSelect); } // Return a call to the implementation function - Value *Args[] = { - CI->getOperand(1), - CI->getOperand(2), - CI->getOperand(3) - }; - return CallInst::Create(F, Args, array_endof(Args), CI->getName(), CI); + Builder.SetInsertPoint(CI->getParent(), CI); + CallInst *NewCI = Builder.CreateCall3(F, CI->getOperand(1), + CI->getOperand(2), CI->getOperand(3)); + NewCI->setName(CI->getName()); + return NewCI; } /// Convert the llvm.part.set.iX.iY.iZ intrinsic. This intrinsic takes @@ -492,6 +474,8 @@ /// greater than %High then the inverse set of bits are replaced. /// @brief Lowering of llvm.bit.part.set intrinsic. static Instruction *LowerPartSet(CallInst *CI) { + IRBuilder<> Builder; + // Make sure we're dealing with a part select intrinsic here Function *F = CI->getCalledFunction(); const FunctionType *FT = F->getFunctionType(); @@ -543,101 +527,101 @@ BasicBlock* result = BasicBlock::Create("result", F, 0); // BASIC BLOCK: entry + Builder.SetInsertPoint(entry); // First, get the number of bits that we're placing as an i32 - ICmpInst* is_forward = - new ICmpInst(ICmpInst::ICMP_ULT, Lo, Hi, "", entry); - SelectInst* Hi_pn = SelectInst::Create(is_forward, Hi, Lo, "", entry); - SelectInst* Lo_pn = SelectInst::Create(is_forward, Lo, Hi, "", entry); - BinaryOperator* NumBits = BinaryOperator::CreateSub(Hi_pn, Lo_pn, "",entry); - NumBits = BinaryOperator::CreateAdd(NumBits, One, "", entry); + Value* is_forward = Builder.CreateICmpULT(Lo, Hi); + Value* Hi_pn = Builder.CreateSelect(is_forward, Hi, Lo); + Value* Lo_pn = Builder.CreateSelect(is_forward, Lo, Hi); + Value* NumBits = Builder.CreateSub(Hi_pn, Lo_pn); + NumBits = Builder.CreateAdd(NumBits, One); // Now, convert Lo and Hi to ValTy bit width - Lo = getZExtOrTrunc(Lo_pn, ValTy, entry); + Lo = Builder.CreateIntCast(Lo_pn, ValTy, /* isSigned */ false); // Determine if the replacement bits are larger than the number of bits we // are replacing and deal with it. - ICmpInst* is_large = - new ICmpInst(ICmpInst::ICMP_ULT, NumBits, RepBitWidth, "", entry); - BranchInst::Create(large, small, is_large, entry); + Value* is_large = Builder.CreateICmpULT(NumBits, RepBitWidth); + Builder.CreateCondBr(is_large, large, small); // BASIC BLOCK: large - Instruction* MaskBits = - BinaryOperator::CreateSub(RepBitWidth, NumBits, "", large); - MaskBits = CastInst::CreateIntegerCast(MaskBits, RepMask->getType(), - false, "", large); - BinaryOperator* Mask1 = - BinaryOperator::CreateLShr(RepMask, MaskBits, "", large); - BinaryOperator* Rep2 = BinaryOperator::CreateAnd(Mask1, Rep, "", large); - BranchInst::Create(small, large); + Builder.SetInsertPoint(large); + Value* MaskBits = Builder.CreateSub(RepBitWidth, NumBits); + MaskBits = Builder.CreateIntCast(MaskBits, RepMask->getType(), + /* isSigned */ false); + Value* Mask1 = Builder.CreateLShr(RepMask, MaskBits); + Value* Rep2 = Builder.CreateAnd(Mask1, Rep); + Builder.CreateBr(small); // BASIC BLOCK: small - PHINode* Rep3 = PHINode::Create(RepTy, "", small); + Builder.SetInsertPoint(small); + PHINode* Rep3 = Builder.CreatePHI(RepTy); Rep3->reserveOperandSpace(2); Rep3->addIncoming(Rep2, large); Rep3->addIncoming(Rep, entry); - Value* Rep4 = getZExtOrTrunc(Rep3, ValTy, small); - BranchInst::Create(result, reverse, is_forward, small); + Value* Rep4 = Builder.CreateIntCast(Rep3, ValTy, /* isSigned */ false); + Builder.CreateCondBr(is_forward, result, reverse); // BASIC BLOCK: reverse (reverses the bits of the replacement) + Builder.SetInsertPoint(reverse); // Set up our loop counter as a PHI so we can decrement on each iteration. // We will loop for the number of bits in the replacement value. - PHINode *Count = PHINode::Create(Type::Int32Ty, "count", reverse); + PHINode *Count = Builder.CreatePHI(Type::Int32Ty, "count"); Count->reserveOperandSpace(2); Count->addIncoming(NumBits, small); // Get the value that we are shifting bits out of as a PHI because // we'll change this with each iteration. - PHINode *BitsToShift = PHINode::Create(Val->getType(), "val", reverse); + PHINode *BitsToShift = Builder.CreatePHI(Val->getType(), "val"); BitsToShift->reserveOperandSpace(2); BitsToShift->addIncoming(Rep4, small); // Get the result of the last computation or zero on first iteration - PHINode *RRes = PHINode::Create(Val->getType(), "rres", reverse); + PHINode *RRes = Builder.CreatePHI(Val->getType(), "rres"); RRes->reserveOperandSpace(2); RRes->addIncoming(ValZero, small); // Decrement the loop counter by one - Instruction *Decr = BinaryOperator::CreateSub(Count, One, "", reverse); + Value *Decr = Builder.CreateSub(Count, One); Count->addIncoming(Decr, reverse); // Get the bit that we want to move into the result - Value *Bit = BinaryOperator::CreateAnd(BitsToShift, ValOne, "", reverse); + Value *Bit = Builder.CreateAnd(BitsToShift, ValOne); // Compute the new value of the bits to shift for the next iteration. - Value *NewVal = BinaryOperator::CreateLShr(BitsToShift, ValOne,"", reverse); + Value *NewVal = Builder.CreateLShr(BitsToShift, ValOne); BitsToShift->addIncoming(NewVal, reverse); // Shift the bit we extracted into the low bit of the result. - Instruction *NewRes = BinaryOperator::CreateShl(RRes, ValOne, "", reverse); - NewRes = BinaryOperator::CreateOr(NewRes, Bit, "", reverse); + Value *NewRes = Builder.CreateShl(RRes, ValOne); + NewRes = Builder.CreateOr(NewRes, Bit); RRes->addIncoming(NewRes, reverse); // Terminate loop if we've moved all the bits. - ICmpInst *Cond = new ICmpInst(ICmpInst::ICMP_EQ, Decr, Zero, "", reverse); - BranchInst::Create(result, reverse, Cond, reverse); + Value *Cond = Builder.CreateICmpEQ(Decr, Zero); + Builder.CreateCondBr(Cond, result, reverse); // BASIC BLOCK: result - PHINode *Rplcmnt = PHINode::Create(Val->getType(), "", result); + Builder.SetInsertPoint(result); + PHINode *Rplcmnt = Builder.CreatePHI(Val->getType()); Rplcmnt->reserveOperandSpace(2); Rplcmnt->addIncoming(NewRes, reverse); Rplcmnt->addIncoming(Rep4, small); - Value* t0 = CastInst::CreateIntegerCast(NumBits,ValTy,false,"",result); - Value* t1 = BinaryOperator::CreateShl(ValMask, Lo, "", result); - Value* t2 = BinaryOperator::CreateNot(t1, "", result); - Value* t3 = BinaryOperator::CreateShl(t1, t0, "", result); - Value* t4 = BinaryOperator::CreateOr(t2, t3, "", result); - Value* t5 = BinaryOperator::CreateAnd(t4, Val, "", result); - Value* t6 = BinaryOperator::CreateShl(Rplcmnt, Lo, "", result); - Value* Rslt = BinaryOperator::CreateOr(t5, t6, "part_set", result); - ReturnInst::Create(Rslt, result); + Value* t0 = Builder.CreateIntCast(NumBits, ValTy, /* isSigned */ false); + Value* t1 = Builder.CreateShl(ValMask, Lo); + Value* t2 = Builder.CreateNot(t1); + Value* t3 = Builder.CreateShl(t1, t0); + Value* t4 = Builder.CreateOr(t2, t3); + Value* t5 = Builder.CreateAnd(t4, Val); + Value* t6 = Builder.CreateShl(Rplcmnt, Lo); + Value* Rslt = Builder.CreateOr(t5, t6, "part_set"); + Builder.CreateRet(Rslt); } // Return a call to the implementation function - Value *Args[] = { - CI->getOperand(1), - CI->getOperand(2), - CI->getOperand(3), - CI->getOperand(4) - }; - return CallInst::Create(F, Args, array_endof(Args), CI->getName(), CI); + Builder.SetInsertPoint(CI->getParent(), CI); + CallInst *NewCI = Builder.CreateCall4(F, CI->getOperand(1), + CI->getOperand(2), CI->getOperand(3), + CI->getOperand(4)); + NewCI->setName(CI->getName()); + return NewCI; } static void ReplaceFPIntrinsicWithCall(CallInst *CI, Constant *FCache, @@ -647,23 +631,25 @@ switch (CI->getOperand(1)->getType()->getTypeID()) { default: assert(0 && "Invalid type in intrinsic"); abort(); case Type::FloatTyID: - ReplaceCallWith(Fname, CI, CI->op_begin()+1, CI->op_end(), + ReplaceCallWith(Fname, CI, CI->op_begin() + 1, CI->op_end(), Type::FloatTy, FCache); break; case Type::DoubleTyID: - ReplaceCallWith(Dname, CI, CI->op_begin()+1, CI->op_end(), + ReplaceCallWith(Dname, CI, CI->op_begin() + 1, CI->op_end(), Type::DoubleTy, DCache); break; case Type::X86_FP80TyID: case Type::FP128TyID: case Type::PPC_FP128TyID: - ReplaceCallWith(LDname, CI, CI->op_begin()+1, CI->op_end(), + ReplaceCallWith(LDname, CI, CI->op_begin() + 1, CI->op_end(), CI->getOperand(1)->getType(), LDCache); break; } } void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) { + IRBuilder<> Builder(CI->getParent(), CI); + Function *Callee = CI->getCalledFunction(); assert(Callee && "Cannot lower an indirect call!"); @@ -683,7 +669,7 @@ // convert the call to an explicit setjmp or longjmp call. case Intrinsic::setjmp: { static Constant *SetjmpFCache = 0; - Value *V = ReplaceCallWith("setjmp", CI, CI->op_begin()+1, CI->op_end(), + Value *V = ReplaceCallWith("setjmp", CI, CI->op_begin() + 1, CI->op_end(), Type::Int32Ty, SetjmpFCache); if (CI->getType() != Type::VoidTy) CI->replaceAllUsesWith(V); @@ -696,7 +682,7 @@ case Intrinsic::longjmp: { static Constant *LongjmpFCache = 0; - ReplaceCallWith("longjmp", CI, CI->op_begin()+1, CI->op_end(), + ReplaceCallWith("longjmp", CI, CI->op_begin() + 1, CI->op_end(), Type::VoidTy, LongjmpFCache); break; } @@ -723,10 +709,11 @@ case Intrinsic::cttz: { // cttz(x) -> ctpop(~X & (X-1)) Value *Src = CI->getOperand(1); - Value *NotSrc = BinaryOperator::CreateNot(Src, Src->getName()+".not", CI); + Value *NotSrc = Builder.CreateNot(Src); + NotSrc->setName(Src->getName() + ".not"); Value *SrcM1 = ConstantInt::get(Src->getType(), 1); - SrcM1 = BinaryOperator::CreateSub(Src, SrcM1, "", CI); - Src = LowerCTPOP(BinaryOperator::CreateAnd(NotSrc, SrcM1, "", CI), CI); + SrcM1 = Builder.CreateSub(Src, SrcM1); + Src = LowerCTPOP(Builder.CreateAnd(NotSrc, SrcM1), CI); CI->replaceAllUsesWith(Src); break; } @@ -798,7 +785,8 @@ case Intrinsic::memcpy: { static Constant *MemcpyFCache = 0; const IntegerType *IntPtr = TD.getIntPtrType(); - Value *Size = getZExtOrTrunc(CI->getOperand(3), IntPtr, CI); + Value *Size = Builder.CreateIntCast(CI->getOperand(3), IntPtr, + /* isSigned */ false); Value *Ops[3]; Ops[0] = CI->getOperand(1); Ops[1] = CI->getOperand(2); @@ -810,7 +798,8 @@ case Intrinsic::memmove: { static Constant *MemmoveFCache = 0; const IntegerType *IntPtr = TD.getIntPtrType(); - Value *Size = getZExtOrTrunc(CI->getOperand(3), IntPtr, CI); + Value *Size = Builder.CreateIntCast(CI->getOperand(3), IntPtr, + /* isSigned */ false); Value *Ops[3]; Ops[0] = CI->getOperand(1); Ops[1] = CI->getOperand(2); @@ -822,11 +811,13 @@ case Intrinsic::memset: { static Constant *MemsetFCache = 0; const IntegerType *IntPtr = TD.getIntPtrType(); - Value *Size = getZExtOrTrunc(CI->getOperand(3), IntPtr, CI); + Value *Size = Builder.CreateIntCast(CI->getOperand(3), IntPtr, + /* isSigned */ false); Value *Ops[3]; Ops[0] = CI->getOperand(1); // Extend the amount to i32. - Ops[1] = getZExtOrTrunc(CI->getOperand(2), Type::Int32Ty, CI); + Ops[1] = Builder.CreateIntCast(CI->getOperand(2), Type::Int32Ty, + /* isSigned */ false); Ops[2] = Size; ReplaceCallWith("memset", CI, Ops, Ops+3, CI->getOperand(1)->getType(), MemsetFCache); From isanbard at gmail.com Tue May 12 15:28:57 2009 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 12 May 2009 13:28:57 -0700 Subject: [llvm-commits] Add scope info in DebugLoc In-Reply-To: <4A037F8D.90001@gmail.com> References: <4A037F8D.90001@gmail.com> Message-ID: <16e5fdf90905121328r50ee3767n290bc2ff7000c6a6@mail.gmail.com> On Thu, May 7, 2009 at 5:40 PM, Argiris Kirtzidis wrote: > The attached patch introduces 'DebugScope' which gets embedded in DebugLoc. > This allows scope info to be readily available (along with line info) for > each machine instruction, and will pull the DwarfWriter out of the > instruction selectors. > > Please review and let me know what you think! > Apologies for this being late. My review is inlined: Index: include/llvm/CodeGen/DebugLoc.h =================================================================== --- include/llvm/CodeGen/DebugLoc.h (revision 71198) +++ include/llvm/CodeGen/DebugLoc.h (working copy) @@ -21,17 +21,50 @@ namespace llvm { class GlobalVariable; - /// DebugLocTuple - Debug location tuple of filename id, line and column. + /// DebugScope - Debug scope id. Please flesh out this comment. Add more about what a debug scope is and how it will be used. + class DebugScope { + unsigned Idx; + + public: + DebugScope() : Idx(~0U) {} // Defaults to null. Well...it's not really Null. :-) Maybe it would be better to name it "invalid" (with appropriate changes to the other methods' names)? + /// DebugScopeInfo - Contains info about the scope global variable and the + /// parent debug scope. Could you explain why this is different from DebugScope. + /// DebugLocTuple - Debug location tuple of compile unit, scope, + /// line and column. The term "compile unit" is overloaded. There's the idea of a CU in the debug info, then the actual CompileUnit class, then a DICompileUnit class. Could you name it something else? Just for my sanity? :-) That is, unless CompileUnit is really absolutely correct here... Index: include/llvm/CodeGen/FastISel.h =================================================================== --- include/llvm/CodeGen/FastISel.h (revision 71198) +++ include/llvm/CodeGen/FastISel.h (working copy) @@ -57,6 +57,7 @@ MachineFrameInfo &MFI; MachineConstantPool &MCP; DebugLoc DL; + DebugScope DbgScope; const TargetMachine &TM; const TargetData &TD; const TargetInstrInfo &TII; @@ -86,6 +87,12 @@ /// getCurDebugLoc() - Return current debug location information. DebugLoc getCurDebugLoc() const { return DL; } + void setCurDebugScope(DebugScope ds) { DbgScope = ds; } + DebugScope getCurDebugScope() const { return DbgScope; } + + void EnterDebugScope(GlobalVariable *ScopeGV, MachineFunction &MF); + void ExitDebugScope(GlobalVariable *ScopeGV, MachineFunction &MF); FastISel has MF available as an ivar. Do you need to pass this in as a parameter? Also, please comment these methods. /// SelectInstruction - Do "fast" instruction selection for the given /// LLVM IR instruction, and append generated machine instructions to /// the current block. Return true if selection was successful. Index: lib/CodeGen/MachineFunction.cpp =================================================================== --- lib/CodeGen/MachineFunction.cpp (revision 71198) +++ lib/CodeGen/MachineFunction.cpp (working copy) @@ -420,6 +421,19 @@ return DebugLocInfo.DebugLocations[Idx]; } +DebugScope MachineFunction::CreateDebugScope(GlobalVariable *ScopeGV, + DebugScope Parent) { + DbgScopeInfos.push_back(DebugScopeInfo(ScopeGV, Parent)); + return DebugScope::get(DbgScopeInfos.size() - 1); Should you verify that DbgScopeInfos.size() > 0 here? Actually, why subtract one here at all? In the assert, you can verify that Idx <= DbgScopeInfos.size(). Index: lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp =================================================================== --- lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (revision 71198) +++ lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (working copy) @@ -312,6 +312,9 @@ !StaticAllocaMap.count(cast(I))) InitializeRegForValue(I); + // FIXME: Proper debug scope. + DebugScope DbgScope; What's stopping you from using a proper debug scope here? @@ -3817,6 +3821,25 @@ setValue(&I, result); } +void SelectionDAGLowering::EnterDebugScope(GlobalVariable *ScopeGV, + MachineFunction &MF) { + assert(ScopeGV && "GlobalVariable for scope is null!"); + setCurDebugScope(MF.CreateDebugScope(ScopeGV, getCurDebugScope())); +} + +void SelectionDAGLowering::ExitDebugScope(GlobalVariable *ScopeGV, + MachineFunction &MF) { + assert(ScopeGV && "GlobalVariable for scope is null!"); + assert(!getCurDebugScope().isNull() && "Mismatched region.end ?"); + // We may have skipped a region.end because it was in an unreachable block. + // Go up the scope chain until we reach the scope that ScopeGV points to. + DebugScopeInfo DSI; + do { + DSI = MF.getDebugScopeInfo(getCurDebugScope()); + setCurDebugScope(DSI.Parent); + } while (!DSI.Parent.isNull() && DSI.GV != ScopeGV); +} Because these methods are used in both SelectionDAGBuild.cpp and FastISel.cpp, is there a way to factor them out into another module? Maybe a CodeGen/DebugLoc.cpp module? Thanks, Argiris! -bw From stoklund at 2pi.dk Tue May 12 15:32:34 2009 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 12 May 2009 22:32:34 +0200 Subject: [llvm-commits] [PATCH] Machine code verifier pass In-Reply-To: <0CE82DAC-D67A-425D-8F60-41B4EABF49BA@apple.com> References: <04F74F5E-5BCA-4F65-8ED5-CAF353E31497@2pi.dk> <2BC4EDFE-5114-4D65-9976-825231B06394@apple.com> <8B5BCC45-2E12-4BC7-A0AF-3C6B9EA5CCBE@2pi.dk> <6AEB9D2A-D643-4AE4-9740-F51B5519099F@apple.com> <0CE82DAC-D67A-425D-8F60-41B4EABF49BA@apple.com> Message-ID: On 12/05/2009, at 21.32, Evan Cheng wrote: > The double def is also a bug. There are lots of physical register double defs when using sub- registers, I think they are introduced by the coalescer, but I am not sure. I have disabled the phys-double-def check for now. Attached is take two of the machine code verifier pass. These are the changes: - Change transient class ivars to method arguments as requested. This is much better. - Calculate MBB reachability and exclude unreachable MBBs from some checks. There are sometimes dead MBBs with bad live register information. - Don't verify physical live-in lists for EH landing pads. Unwind creates live registers from thin air. - Don't require PHI operands to be live-in from all predecessors. (Duh) - Add dedicated check for PHI operands. Check needed predecessor live- outs individually, and require a PHI operand pair for each predecessor. There are many PHI instructions referring to MBBs that are not predecessors. That looks suspicious, but I am allowing it. - Check for the environment variable LLVM_VERIFY_MACHINEINSTRS. When it is defined, enable the verifier globally, append output to a file instead of cerr, and don't abort on errors. This means you can say: $ LLVM_VERIFY_MACHINEINSTRS=verify.out make check $ find . -name verify.out -not -empty | xargs fgrep -c '*** Bad machine code' ./test/CodeGen/Alpha/Output/verify.out:285 ./test/CodeGen/ARM/Output/verify.out:1289 ./test/CodeGen/CellSPU/Output/verify.out:560 ./test/CodeGen/Generic/Output/verify.out:46 ./test/CodeGen/IA64/Output/verify.out:26 ./test/CodeGen/Mips/Output/verify.out:6 ./test/CodeGen/PowerPC/Output/verify.out:10403 ./test/CodeGen/X86/Output/verify.out:2047 I am using MachineInstr::isRegTiedToDefOperand(), and that is causing asserts on some PowerPC tests because InlineAsm::isUseOperandTiedToDef() is returning an invalid operand number. tied-badval.patch is a workaround. It is not a fix. -------------- next part -------------- A non-text attachment was scrubbed... Name: machine-verifier.patch Type: application/octet-stream Size: 27713 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090512/7ebba2f8/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: tied-badval.patch Type: application/octet-stream Size: 811 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090512/7ebba2f8/attachment-0001.obj From ojomojo at gmail.com Tue May 12 15:33:29 2009 From: ojomojo at gmail.com (John Mosby) Date: Tue, 12 May 2009 20:33:29 -0000 Subject: [llvm-commits] [llvm] r71588 - in /llvm/trunk/lib/CodeGen: PEI.h PrologEpilogInserter.cpp ShrinkWrapping.cpp Message-ID: <200905122033.n4CKXUYg005872@zion.cs.uiuc.edu> Author: jdm Date: Tue May 12 15:33:29 2009 New Revision: 71588 URL: http://llvm.org/viewvc/llvm-project?rev=71588&view=rev Log: Restructure PEI code: - moved shrink wrapping code from PrologEpilogInserter.cpp to new file ShrinkWrapping.cpp. - moved PEI pass definition into new shared header PEI.h. Added: llvm/trunk/lib/CodeGen/PEI.h llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Added: llvm/trunk/lib/CodeGen/PEI.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PEI.h?rev=71588&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/PEI.h (added) +++ llvm/trunk/lib/CodeGen/PEI.h Tue May 12 15:33:29 2009 @@ -0,0 +1,167 @@ +//===-- PrologEpilogInserter.h - Prolog/Epilog code insertion -*- C++ -* --===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This pass is responsible for finalizing the functions frame layout, saving +// callee saved registers, and for emitting prolog & epilog code for the +// function. +// +// This pass must be run after register allocation. After this pass is +// executed, it is illegal to construct MO_FrameIndex operands. +// +// This pass also implements a shrink wrapping variant of prolog/epilog +// insertion. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CODEGEN_PEI_H +#define LLVM_CODEGEN_PEI_H + +#include "llvm/CodeGen/Passes.h" +#include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineLoopInfo.h" +#include "llvm/ADT/SparseBitVector.h" +#include "llvm/ADT/DenseMap.h" + +namespace llvm { + class RegScavenger; + class MachineBasicBlock; + + class PEI : public MachineFunctionPass { + public: + static char ID; + PEI() : MachineFunctionPass(&ID) {} + + const char *getPassName() const { + return "Prolog/Epilog Insertion & Frame Finalization"; + } + + virtual void getAnalysisUsage(AnalysisUsage &AU) const; + + /// runOnMachineFunction - Insert prolog/epilog code and replace abstract + /// frame indexes with appropriate references. + /// + bool runOnMachineFunction(MachineFunction &Fn); + + private: + RegScavenger *RS; + + // MinCSFrameIndex, MaxCSFrameIndex - Keeps the range of callee saved + // stack frame indexes. + unsigned MinCSFrameIndex, MaxCSFrameIndex; + + // Analysis info for spill/restore placement. + // "CSR": "callee saved register". + + // CSRegSet contains indices into the Callee Saved Register Info + // vector built by calculateCalleeSavedRegisters() and accessed + // via MF.getFrameInfo()->getCalleeSavedInfo(). + typedef SparseBitVector<> CSRegSet; + + // CSRegBlockMap maps MachineBasicBlocks to sets of callee + // saved register indices. + typedef DenseMap CSRegBlockMap; + + // Set and maps for computing CSR spill/restore placement: + // used in function (UsedCSRegs) + // used in a basic block (CSRUsed) + // anticipatable in a basic block (Antic{In,Out}) + // available in a basic block (Avail{In,Out}) + // to be spilled at the entry to a basic block (CSRSave) + // to be restored at the end of a basic block (CSRRestore) + CSRegSet UsedCSRegs; + CSRegBlockMap CSRUsed; + CSRegBlockMap AnticIn, AnticOut; + CSRegBlockMap AvailIn, AvailOut; + CSRegBlockMap CSRSave; + CSRegBlockMap CSRRestore; + + // Entry and return blocks of the current function. + MachineBasicBlock* EntryBlock; + SmallVector ReturnBlocks; + + // Map of MBBs to top level MachineLoops. + DenseMap TLLoops; + + // Flag to control shrink wrapping per-function: + // may choose to skip shrink wrapping for certain + // functions. + bool ShrinkWrapThisFunction; + +#ifndef NDEBUG + // Machine function handle. + MachineFunction* MF; + + // Flag indicating that the current function + // has at least one "short" path in the machine + // CFG from the entry block to an exit block. + bool HasFastExitPath; +#endif + + bool calculateSets(MachineFunction &Fn); + bool calcAnticInOut(MachineBasicBlock* MBB); + bool calcAvailInOut(MachineBasicBlock* MBB); + void calculateAnticAvail(MachineFunction &Fn); + bool addUsesForMEMERegion(MachineBasicBlock* MBB, + SmallVector& blks); + bool addUsesForTopLevelLoops(SmallVector& blks); + bool calcSpillPlacements(MachineBasicBlock* MBB, + SmallVector &blks, + CSRegBlockMap &prevSpills); + bool calcRestorePlacements(MachineBasicBlock* MBB, + SmallVector &blks, + CSRegBlockMap &prevRestores); + void placeSpillsAndRestores(MachineFunction &Fn); + void placeCSRSpillsAndRestores(MachineFunction &Fn); + void calculateCalleeSavedRegisters(MachineFunction &Fn); + void insertCSRSpillsAndRestores(MachineFunction &Fn); + void calculateFrameObjectOffsets(MachineFunction &Fn); + void replaceFrameIndices(MachineFunction &Fn); + void insertPrologEpilogCode(MachineFunction &Fn); + + // Initialize DFA sets, called before iterations. + void clearAnticAvailSets(); + // Clear all sets constructed by shrink wrapping. + void clearAllSets(); + + // Initialize all shrink wrapping data. + void initShrinkWrappingInfo(); + + // Convienences for dealing with machine loops. + MachineBasicBlock* getTopLevelLoopPreheader(MachineLoop* LP); + MachineLoop* getTopLevelLoopParent(MachineLoop *LP); + + // Propgate CSRs used in MBB to all MBBs of loop LP. + void propagateUsesAroundLoop(MachineBasicBlock* MBB, MachineLoop* LP); + + // Convenience for recognizing return blocks. + bool isReturnBlock(MachineBasicBlock* MBB); + +#ifndef NDEBUG + // Debugging methods. + + // Mark this function as having fast exit paths. + void findFastExitPath(); + + // Verify placement of spills/restores. + void verifySpillRestorePlacement(); + + std::string getBasicBlockName(const MachineBasicBlock* MBB); + std::string stringifyCSRegSet(const CSRegSet& s); + void dumpSet(const CSRegSet& s); + void dumpUsed(MachineBasicBlock* MBB); + void dumpAllUsed(); + void dumpSets(MachineBasicBlock* MBB); + void dumpSets1(MachineBasicBlock* MBB); + void dumpAllSets(); + void dumpSRSets(); +#endif + + }; +} // End llvm namespace +#endif Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=71588&r1=71587&r2=71588&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue May 12 15:33:29 2009 @@ -14,35 +14,14 @@ // This pass must be run after register allocation. After this pass is // executed, it is illegal to construct MO_FrameIndex operands. // -// This pass implements a shrink wrapping variant of prolog/epilog insertion: -// - Places callee saved register (CSR) spills and restores in the CFG to -// tightly surround uses so that execution paths that do not use CSRs do not -// pay the spill/restore penalty. -// -// - Avoiding placment of spills/restores in loops: if a CSR is used inside a -// loop(nest), the spills are placed in the loop preheader, and restores are -// placed in the loop exit nodes (the successors of the loop _exiting_ nodes). -// -// - Covering paths without CSR uses: e.g. if a restore is placed in a join -// block, a matching spill is added to the end of all immediate predecessor -// blocks that are not reached by a spill. Similarly for saves placed in -// branch blocks. -// -// Shrink wrapping uses an analysis similar to the one in GVNPRE to determine -// which basic blocks require callee-saved register save/restore code. -// -// This pass uses MachineDominators and MachineLoopInfo. Loop information -// is used to prevent shrink wrapping of callee-saved register save/restore -// code into loops. +// This pass provides an optional shrink wrapping variant of prolog/epilog +// insertion, enabled via --shrink-wrap. See ShrinkWrapping.cpp. // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "shrink-wrap" - -#include "llvm/CodeGen/Passes.h" +#include "PEI.h" #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineLoopInfo.h" -#include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineModuleInfo.h" @@ -52,1009 +31,91 @@ #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Target/TargetInstrInfo.h" -#include "llvm/ADT/SparseBitVector.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/PostOrderIterator.h" -#include "llvm/ADT/Statistic.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" -#include "llvm/Support/Debug.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/Statistic.h" #include -#include using namespace llvm; -STATISTIC(numSRReduced, "Number of CSR spills+restores reduced."); - -// Shrink Wrapping: -static cl::opt -ShrinkWrapping("shrink-wrap", - cl::desc("Shrink wrap callee-saved register spills/restores")); - -// Shrink wrap only the specified function, a debugging aid. -static cl::opt -ShrinkWrapFunc("shrink-wrap-func", cl::Hidden, - cl::desc("Shrink wrap the specified function"), - cl::value_desc("funcname"), - cl::init("")); - -// Debugging level for shrink wrapping. -enum ShrinkWrapDebugLevel { - None, BasicInfo, Iterations, Details -}; - -static cl::opt -ShrinkWrapDebugging("shrink-wrap-dbg", cl::Hidden, - cl::desc("Print shrink wrapping debugging information"), - cl::values( - clEnumVal(None , "disable debug output"), - clEnumVal(BasicInfo , "print basic DF sets"), - clEnumVal(Iterations, "print SR sets for each iteration"), - clEnumVal(Details , "print all DF sets"), - clEnumValEnd)); - - -namespace { - struct VISIBILITY_HIDDEN PEI : public MachineFunctionPass { - static char ID; - PEI() : MachineFunctionPass(&ID) {} - - const char *getPassName() const { - return "Prolog/Epilog Insertion & Frame Finalization"; - } - - virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesCFG(); - if (ShrinkWrapping || ShrinkWrapFunc != "") { - AU.addRequired(); - AU.addRequired(); - } - AU.addPreserved(); - AU.addPreserved(); - MachineFunctionPass::getAnalysisUsage(AU); - } - - /// runOnMachineFunction - Insert prolog/epilog code and replace abstract - /// frame indexes with appropriate references. - /// - bool runOnMachineFunction(MachineFunction &Fn) { - const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo(); - RS = TRI->requiresRegisterScavenging(Fn) ? new RegScavenger() : NULL; - - DEBUG(MF = &Fn); - - // Get MachineModuleInfo so that we can track the construction of the - // frame. - if (MachineModuleInfo *MMI = getAnalysisIfAvailable()) - Fn.getFrameInfo()->setMachineModuleInfo(MMI); - - // Allow the target machine to make some adjustments to the function - // e.g. UsedPhysRegs before calculateCalleeSavedRegisters. - TRI->processFunctionBeforeCalleeSavedScan(Fn, RS); - - // Scan the function for modified callee saved registers and insert spill - // code for any callee saved registers that are modified. Also calculate - // the MaxCallFrameSize and HasCalls variables for the function's frame - // information and eliminates call frame pseudo instructions. - calculateCalleeSavedRegisters(Fn); - - // Determine placement of CSR spill/restore code: - // - with shrink wrapping, place spills and restores to tightly - // enclose regions in the Machine CFG of the function where - // they are used. Without shrink wrapping - // - default (no shrink wrapping), place all spills in the - // entry block, all restores in return blocks. - placeCSRSpillsAndRestores(Fn); - - // Add the code to save and restore the callee saved registers - insertCSRSpillsAndRestores(Fn); - - // Allow the target machine to make final modifications to the function - // before the frame layout is finalized. - TRI->processFunctionBeforeFrameFinalized(Fn); - - // Calculate actual frame offsets for all abstract stack objects... - calculateFrameObjectOffsets(Fn); - - // Add prolog and epilog code to the function. This function is required - // to align the stack frame as necessary for any stack variables or - // called functions. Because of this, calculateCalleeSavedRegisters - // must be called before this function in order to set the HasCalls - // and MaxCallFrameSize variables. - insertPrologEpilogCode(Fn); - - // Replace all MO_FrameIndex operands with physical register references - // and actual offsets. - // - replaceFrameIndices(Fn); - - delete RS; - clearAllSets(); - return true; - } - - private: - RegScavenger *RS; - - // MinCSFrameIndex, MaxCSFrameIndex - Keeps the range of callee saved - // stack frame indexes. - unsigned MinCSFrameIndex, MaxCSFrameIndex; - - // Analysis info for spill/restore placement. - // "CSR": "callee saved register". - - // CSRegSet contains indices into the Callee Saved Register Info - // vector built by calculateCalleeSavedRegisters() and accessed - // via MF.getFrameInfo()->getCalleeSavedInfo(). - typedef SparseBitVector<> CSRegSet; - - // CSRegBlockMap maps MachineBasicBlocks to sets of callee - // saved register indices. - typedef DenseMap CSRegBlockMap; - - // Set and maps for computing CSR spill/restore placement: - // used in function (UsedCSRegs) - // used in a basic block (CSRUsed) - // anticipatable in a basic block (Antic{In,Out}) - // available in a basic block (Avail{In,Out}) - // to be spilled at the entry to a basic block (CSRSave) - // to be restored at the end of a basic block (CSRRestore) - CSRegSet UsedCSRegs; - CSRegBlockMap CSRUsed; - CSRegBlockMap AnticIn, AnticOut; - CSRegBlockMap AvailIn, AvailOut; - CSRegBlockMap CSRSave; - CSRegBlockMap CSRRestore; - - // Entry and return blocks of the current function. - MachineBasicBlock* EntryBlock; - SmallVector ReturnBlocks; - - // Map of MBBs to top level MachineLoops. - DenseMap TLLoops; - - // Flag to control shrink wrapping per-function: - // may choose to skip shrink wrapping for certain - // functions. - bool ShrinkWrapThisFunction; - -#ifndef NDEBUG - // Machine function handle. - MachineFunction* MF; - - // Flag indicating that the current function - // has at least one "short" path in the machine - // CFG from the entry block to an exit block. - bool HasFastExitPath; -#endif - - bool calculateSets(MachineFunction &Fn); - bool calcAnticInOut(MachineBasicBlock* MBB); - bool calcAvailInOut(MachineBasicBlock* MBB); - void calculateAnticAvail(MachineFunction &Fn); - bool addUsesForMEMERegion(MachineBasicBlock* MBB, - SmallVector& blks); - bool addUsesForTopLevelLoops(SmallVector& blks); - bool calcSpillPlacements(MachineBasicBlock* MBB, - SmallVector &blks, - CSRegBlockMap &prevSpills); - bool calcRestorePlacements(MachineBasicBlock* MBB, - SmallVector &blks, - CSRegBlockMap &prevRestores); - void placeSpillsAndRestores(MachineFunction &Fn); - void placeCSRSpillsAndRestores(MachineFunction &Fn); - void calculateCalleeSavedRegisters(MachineFunction &Fn); - void insertCSRSpillsAndRestores(MachineFunction &Fn); - void calculateFrameObjectOffsets(MachineFunction &Fn); - void replaceFrameIndices(MachineFunction &Fn); - void insertPrologEpilogCode(MachineFunction &Fn); - - // Initialize DFA sets, called before iterations. - void clearAnticAvailSets(); - // Clear all sets constructed by shrink wrapping. - void clearAllSets(); - - // Initialize all shrink wrapping data. - void initShrinkWrappingInfo(); - - // Convienences for dealing with machine loops. - MachineBasicBlock* getTopLevelLoopPreheader(MachineLoop* LP) { - assert(LP && "Machine loop is NULL."); - MachineBasicBlock* PHDR = LP->getLoopPreheader(); - MachineLoop* PLP = LP->getParentLoop(); - while (PLP) { - PHDR = PLP->getLoopPreheader(); - PLP = PLP->getParentLoop(); - } - return PHDR; - } - - MachineLoop* getTopLevelLoopParent(MachineLoop *LP) { - if (LP == 0) - return 0; - MachineLoop* PLP = LP->getParentLoop(); - while (PLP) { - LP = PLP; - PLP = PLP->getParentLoop(); - } - return LP; - } - - // Propgate CSRs used in MBB to all MBBs of loop LP. - void propagateUsesAroundLoop(MachineBasicBlock* MBB, MachineLoop* LP); - - // Convenience for recognizing return blocks. - bool isReturnBlock(MachineBasicBlock* MBB) { - return (MBB && !MBB->empty() && MBB->back().getDesc().isReturn()); - } - -#ifndef NDEBUG - // Debugging methods. - - // Mark this function as having fast exit paths. - void findFastExitPath(); - - // Verify placement of spills/restores. - void verifySpillRestorePlacement(); - - std::string getBasicBlockName(const MachineBasicBlock* MBB); - std::string stringifyCSRegSet(const CSRegSet& s); - void dumpSet(const CSRegSet& s); - void dumpUsed(MachineBasicBlock* MBB); - void dumpAllUsed(); - void dumpSets(MachineBasicBlock* MBB); - void dumpSets1(MachineBasicBlock* MBB); - void dumpAllSets(); - void dumpSRSets(); -#endif - - }; - char PEI::ID = 0; -} - -// Initialize shrink wrapping DFA sets, called before iterations. -void PEI::clearAnticAvailSets() { - AnticIn.clear(); - AnticOut.clear(); - AvailIn.clear(); - AvailOut.clear(); -} - -// Clear all sets constructed by shrink wrapping. -void PEI::clearAllSets() { - ReturnBlocks.clear(); - clearAnticAvailSets(); - UsedCSRegs.clear(); - CSRUsed.clear(); - TLLoops.clear(); - CSRSave.clear(); - CSRRestore.clear(); -} - -// Initialize all shrink wrapping data. -void PEI::initShrinkWrappingInfo() { - clearAllSets(); - EntryBlock = 0; -#ifndef NDEBUG - HasFastExitPath = false; -#endif - ShrinkWrapThisFunction = ShrinkWrapping; - // DEBUG: enable or disable shrink wrapping for the current function - // via --shrink-wrap-func=. -#ifndef NDEBUG - if (ShrinkWrapFunc != "") { - std::string MFName = MF->getFunction()->getName(); - ShrinkWrapThisFunction = (MFName == ShrinkWrapFunc); - } -#endif -} +char PEI::ID = 0; +static RegisterPass +X("prologepilog", "Prologue/Epilogue Insertion"); /// createPrologEpilogCodeInserter - This function returns a pass that inserts /// prolog and epilog code, and eliminates abstract frame references. /// FunctionPass *llvm::createPrologEpilogCodeInserter() { return new PEI(); } -/// placeCSRSpillsAndRestores - determine which MBBs of the function -/// need save, restore code for callee-saved registers by doing a DF analysis -/// similar to the one used in code motion (GVNPRE). This produces maps of MBBs -/// to sets of registers (CSRs) for saves and restores. MachineLoopInfo -/// is used to ensure that CSR save/restore code is not placed inside loops. -/// This function computes the maps of MBBs -> CSRs to spill and restore -/// in CSRSave, CSRRestore. -/// -/// If shrink wrapping is not being performed, place all spills in -/// the entry block, all restores in return blocks. In this case, -/// CSRSave has a single mapping, CSRRestore has mappings for each -/// return block. -/// -void PEI::placeCSRSpillsAndRestores(MachineFunction &Fn) { - - initShrinkWrappingInfo(); - - DEBUG(if (ShrinkWrapThisFunction) { - DOUT << "Place CSR spills/restores for " - << MF->getFunction()->getName() << "\n"; - }); - - if (calculateSets(Fn)) - placeSpillsAndRestores(Fn); -} - -/// calcAnticInOut - calculate the anticipated in/out reg sets -/// for the given MBB by looking forward in the MCFG at MBB's -/// successors. -/// -bool PEI::calcAnticInOut(MachineBasicBlock* MBB) { - bool changed = false; - - // AnticOut[MBB] = INTERSECT(AnticIn[S] for S in SUCCESSORS(MBB)) - SmallVector successors; - for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), - SE = MBB->succ_end(); SI != SE; ++SI) { - MachineBasicBlock* SUCC = *SI; - if (SUCC != MBB) - successors.push_back(SUCC); - } - - unsigned i = 0, e = successors.size(); - if (i != e) { - CSRegSet prevAnticOut = AnticOut[MBB]; - MachineBasicBlock* SUCC = successors[i]; - - AnticOut[MBB] = AnticIn[SUCC]; - for (++i; i != e; ++i) { - SUCC = successors[i]; - AnticOut[MBB] &= AnticIn[SUCC]; - } - if (prevAnticOut != AnticOut[MBB]) - changed = true; - } - - // AnticIn[MBB] = UNION(CSRUsed[MBB], AnticOut[MBB]); - CSRegSet prevAnticIn = AnticIn[MBB]; - AnticIn[MBB] = CSRUsed[MBB] | AnticOut[MBB]; - if (prevAnticIn |= AnticIn[MBB]) - changed = true; - return changed; -} - -/// calcAvailInOut - calculate the available in/out reg sets -/// for the given MBB by looking backward in the MCFG at MBB's -/// predecessors. -/// -bool PEI::calcAvailInOut(MachineBasicBlock* MBB) { - bool changed = false; - - // AvailIn[MBB] = INTERSECT(AvailOut[P] for P in PREDECESSORS(MBB)) - SmallVector predecessors; - for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), - PE = MBB->pred_end(); PI != PE; ++PI) { - MachineBasicBlock* PRED = *PI; - if (PRED != MBB) - predecessors.push_back(PRED); - } - - unsigned i = 0, e = predecessors.size(); - if (i != e) { - CSRegSet prevAvailIn = AvailIn[MBB]; - MachineBasicBlock* PRED = predecessors[i]; - - AvailIn[MBB] = AvailOut[PRED]; - for (++i; i != e; ++i) { - PRED = predecessors[i]; - AvailIn[MBB] &= AvailOut[PRED]; - } - if (prevAvailIn != AvailIn[MBB]) - changed = true; - } - - // AvailOut[MBB] = UNION(CSRUsed[MBB], AvailIn[MBB]); - CSRegSet prevAvailOut = AvailOut[MBB]; - AvailOut[MBB] = CSRUsed[MBB] | AvailIn[MBB]; - if (prevAvailOut |= AvailOut[MBB]) - changed = true; - return changed; -} - -/// calculateAnticAvail - build the sets anticipated and available -/// registers in the MCFG of the current function iteratively, -/// doing a combined forward and backward analysis. +/// runOnMachineFunction - Insert prolog/epilog code and replace abstract +/// frame indexes with appropriate references. /// -void PEI::calculateAnticAvail(MachineFunction &Fn) { - // Initialize data flow sets. - clearAnticAvailSets(); - - // Calulate Antic{In,Out} and Avail{In,Out} iteratively on the MCFG. - bool changed = true; - unsigned iterations = 0; - while (changed) { - changed = false; - ++iterations; - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); - MBBI != MBBE; ++MBBI) { - MachineBasicBlock* MBB = MBBI; - - // Calculate anticipated in, out regs at MBB from - // anticipated at successors of MBB. - changed |= calcAnticInOut(MBB); - - // Calculate available in, out regs at MBB from - // available at predecessors of MBB. - changed |= calcAvailInOut(MBB); - } - } - - DEBUG(if (ShrinkWrapDebugging >= Details) { - DOUT << "-----------------------------------------------------------\n"; - DOUT << " Antic/Avail Sets:\n"; - DOUT << "-----------------------------------------------------------\n"; - DOUT << "iterations = " << iterations << "\n"; - DOUT << "-----------------------------------------------------------\n"; - DOUT << "MBB | USED | ANTIC_IN | ANTIC_OUT | AVAIL_IN | AVAIL_OUT\n"; - DOUT << "-----------------------------------------------------------\n"; - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); - MBBI != MBBE; ++MBBI) { - MachineBasicBlock* MBB = MBBI; - dumpSets(MBB); - } - DOUT << "-----------------------------------------------------------\n"; - }); -} - -/// propagateUsesAroundLoop - copy used register info from MBB to all blocks -/// of the loop given by LP and its parent loops. This prevents spills/restores -/// from being placed in the bodies of loops. -/// -void PEI::propagateUsesAroundLoop(MachineBasicBlock* MBB, MachineLoop* LP) { - if (! MBB || !LP) - return; - - std::vector loopBlocks = LP->getBlocks(); - for (unsigned i = 0, e = loopBlocks.size(); i != e; ++i) { - MachineBasicBlock* LBB = loopBlocks[i]; - if (LBB == MBB) - continue; - if (CSRUsed[LBB].contains(CSRUsed[MBB])) - continue; - CSRUsed[LBB] |= CSRUsed[MBB]; - } -} - -/// calculateSets - collect the CSRs used in this function, compute -/// the DF sets that describe the initial minimal regions in the -/// Machine CFG around which CSR spills and restores must be placed. -/// -/// Additionally, this function decides if shrink wrapping should -/// be disabled for the current function, checking the following: -/// 1. the current function has more than 500 MBBs: heuristic limit -/// on function size to reduce compile time impact of the current -/// iterative algorithm. -/// 2. all CSRs are used in the entry block. -/// 3. all CSRs are used in all immediate successors of the entry block. -/// 4. all CSRs are used in a subset of blocks, each of which dominates -/// all return blocks. These blocks, taken as a subgraph of the MCFG, -/// are equivalent to the entry block since all execution paths pass -/// through them. -/// -bool PEI::calculateSets(MachineFunction &Fn) { - // Sets used to compute spill, restore placement sets. - const std::vector CSI = - Fn.getFrameInfo()->getCalleeSavedInfo(); - - // If no CSRs used, we are done. - if (CSI.empty()) { - DEBUG(if (ShrinkWrapThisFunction) - DOUT << "DISABLED: " << Fn.getFunction()->getName() - << ": uses no callee-saved registers\n"); - return false; - } - - // Save refs to entry and return blocks. - EntryBlock = Fn.begin(); - for (MachineFunction::iterator MBB = Fn.begin(), E = Fn.end(); - MBB != E; ++MBB) - if (isReturnBlock(MBB)) - ReturnBlocks.push_back(MBB); - - // Determine if this function has fast exit paths. - DEBUG(if (ShrinkWrapThisFunction) - findFastExitPath()); - - // Limit shrink wrapping via the current iterative bit vector - // implementation to functions with <= 500 MBBs. - if (Fn.size() > 500) { - DEBUG(if (ShrinkWrapThisFunction) - DOUT << "DISABLED: " << Fn.getFunction()->getName() - << ": too large (" << Fn.size() << " MBBs)\n"); - ShrinkWrapThisFunction = false; - } - - // Return now if not shrink wrapping. - if (! ShrinkWrapThisFunction) - return false; - - // Collect set of used CSRs. - for (unsigned inx = 0, e = CSI.size(); inx != e; ++inx) { - UsedCSRegs.set(inx); - } - - // Walk instructions in all MBBs, create CSRUsed[] sets, choose - // whether or not to shrink wrap this function. - MachineLoopInfo &LI = getAnalysis(); - MachineDominatorTree &DT = getAnalysis(); +bool PEI::runOnMachineFunction(MachineFunction &Fn) { const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo(); + RS = TRI->requiresRegisterScavenging(Fn) ? new RegScavenger() : NULL; - bool allCSRUsesInEntryBlock = true; - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); - MBBI != MBBE; ++MBBI) { - MachineBasicBlock* MBB = MBBI; - for (MachineBasicBlock::iterator I = MBB->begin(); I != MBB->end(); ++I) { - for (unsigned inx = 0, e = CSI.size(); inx != e; ++inx) { - unsigned Reg = CSI[inx].getReg(); - // If instruction I reads or modifies Reg, add it to UsedCSRegs, - // CSRUsed map for the current block. - for (unsigned opInx = 0, opEnd = I->getNumOperands(); - opInx != opEnd; ++opInx) { - const MachineOperand &MO = I->getOperand(opInx); - if (! (MO.isReg() && (MO.isUse() || MO.isDef()))) - continue; - unsigned MOReg = MO.getReg(); - if (!MOReg) - continue; - if (MOReg == Reg || - (TargetRegisterInfo::isPhysicalRegister(MOReg) && - TargetRegisterInfo::isPhysicalRegister(Reg) && - TRI->isSubRegister(Reg, MOReg))) { - // CSR Reg is defined/used in block MBB. - CSRUsed[MBB].set(inx); - // Check for uses in EntryBlock. - if (MBB != EntryBlock) - allCSRUsesInEntryBlock = false; - } - } - } - } - - if (CSRUsed[MBB].empty()) - continue; - - // Propagate CSRUsed[MBB] in loops - if (MachineLoop* LP = LI.getLoopFor(MBB)) { - // Add top level loop to work list. - MachineBasicBlock* HDR = getTopLevelLoopPreheader(LP); - MachineLoop* PLP = getTopLevelLoopParent(LP); - - if (! HDR) { - HDR = PLP->getHeader(); - assert(HDR->pred_size() > 0 && "Loop header has no predecessors?"); - MachineBasicBlock::pred_iterator PI = HDR->pred_begin(); - HDR = *PI; - } - TLLoops[HDR] = PLP; - - // Push uses from inside loop to its parent loops, - // or to all other MBBs in its loop. - if (LP->getLoopDepth() > 1) { - for (MachineLoop* PLP = LP->getParentLoop(); PLP; - PLP = PLP->getParentLoop()) { - propagateUsesAroundLoop(MBB, PLP); - } - } else { - propagateUsesAroundLoop(MBB, LP); - } - } - } - - if (allCSRUsesInEntryBlock) { - DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() - << ": all CSRs used in EntryBlock\n"); - ShrinkWrapThisFunction = false; - } else { - bool allCSRsUsedInEntryFanout = true; - for (MachineBasicBlock::succ_iterator SI = EntryBlock->succ_begin(), - SE = EntryBlock->succ_end(); SI != SE; ++SI) { - MachineBasicBlock* SUCC = *SI; - if (CSRUsed[SUCC] != UsedCSRegs) - allCSRsUsedInEntryFanout = false; - } - if (allCSRsUsedInEntryFanout) { - DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() - << ": all CSRs used in imm successors of EntryBlock\n"); - ShrinkWrapThisFunction = false; - } - } - - if (ShrinkWrapThisFunction) { - // Check if MBB uses CSRs and dominates all exit nodes. - // Such nodes are equiv. to the entry node w.r.t. - // CSR uses: every path through the function must - // pass through this node. If each CSR is used at least - // once by these nodes, shrink wrapping is disabled. - CSRegSet CSRUsedInChokePoints; - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); - MBBI != MBBE; ++MBBI) { - MachineBasicBlock* MBB = MBBI; - if (MBB == EntryBlock || CSRUsed[MBB].empty() || MBB->succ_size() < 1) - continue; - bool dominatesExitNodes = true; - for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) - if (! DT.dominates(MBB, ReturnBlocks[ri])) { - dominatesExitNodes = false; - break; - } - if (dominatesExitNodes) { - CSRUsedInChokePoints |= CSRUsed[MBB]; - if (CSRUsedInChokePoints == UsedCSRegs) { - DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() - << ": all CSRs used in choke point(s) at " - << getBasicBlockName(MBB) << "\n"); - ShrinkWrapThisFunction = false; - break; - } - } - } - } + // Get MachineModuleInfo so that we can track the construction of the + // frame. + if (MachineModuleInfo *MMI = getAnalysisIfAvailable()) + Fn.getFrameInfo()->setMachineModuleInfo(MMI); + + // Allow the target machine to make some adjustments to the function + // e.g. UsedPhysRegs before calculateCalleeSavedRegisters. + TRI->processFunctionBeforeCalleeSavedScan(Fn, RS); + + // Scan the function for modified callee saved registers and insert spill + // code for any callee saved registers that are modified. Also calculate + // the MaxCallFrameSize and HasCalls variables for the function's frame + // information and eliminates call frame pseudo instructions. + calculateCalleeSavedRegisters(Fn); + + // Determine placement of CSR spill/restore code: + // - with shrink wrapping, place spills and restores to tightly + // enclose regions in the Machine CFG of the function where + // they are used. Without shrink wrapping + // - default (no shrink wrapping), place all spills in the + // entry block, all restores in return blocks. + placeCSRSpillsAndRestores(Fn); + + // Add the code to save and restore the callee saved registers + insertCSRSpillsAndRestores(Fn); + + // Allow the target machine to make final modifications to the function + // before the frame layout is finalized. + TRI->processFunctionBeforeFrameFinalized(Fn); + + // Calculate actual frame offsets for all abstract stack objects... + calculateFrameObjectOffsets(Fn); + + // Add prolog and epilog code to the function. This function is required + // to align the stack frame as necessary for any stack variables or + // called functions. Because of this, calculateCalleeSavedRegisters + // must be called before this function in order to set the HasCalls + // and MaxCallFrameSize variables. + insertPrologEpilogCode(Fn); - // Return now if we have decided not to apply shrink wrapping - // to the current function. - if (! ShrinkWrapThisFunction) - return false; - - DEBUG({ - DOUT << "ENABLED: " << Fn.getFunction()->getName(); - if (HasFastExitPath) - DOUT << " (fast exit path)"; - DOUT << "\n"; - if (ShrinkWrapDebugging >= BasicInfo) { - DOUT << "------------------------------" - << "-----------------------------\n"; - DOUT << "UsedCSRegs = " << stringifyCSRegSet(UsedCSRegs) << "\n"; - if (ShrinkWrapDebugging >= Details) { - DOUT << "------------------------------" - << "-----------------------------\n"; - dumpAllUsed(); - } - } - }); - - // Build initial DF sets to determine minimal regions in the - // Machine CFG around which CSRs must be spilled and restored. - calculateAnticAvail(Fn); + // Replace all MO_FrameIndex operands with physical register references + // and actual offsets. + // + replaceFrameIndices(Fn); + delete RS; + clearAllSets(); return true; } -/// addUsesForMEMERegion - add uses of CSRs spilled or restored in -/// multi-entry, multi-exit (MEME) regions so spill and restore -/// placement will not break code that enters or leaves a -/// shrink-wrapped region by inducing spills with no matching -/// restores or restores with no matching spills. A MEME region -/// is a subgraph of the MCFG with multiple entry edges, multiple -/// exit edges, or both. This code propagates use information -/// through the MCFG until all paths requiring spills and restores -/// _outside_ the computed minimal placement regions have been covered. -/// -bool PEI::addUsesForMEMERegion(MachineBasicBlock* MBB, - SmallVector& blks) { - if (MBB->succ_size() < 2 && MBB->pred_size() < 2) { - bool processThisBlock = false; - for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), - SE = MBB->succ_end(); SI != SE; ++SI) { - MachineBasicBlock* SUCC = *SI; - if (SUCC->pred_size() > 1) { - processThisBlock = true; - break; - } - } - if (!CSRRestore[MBB].empty() && MBB->succ_size() > 0) { - for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), - PE = MBB->pred_end(); PI != PE; ++PI) { - MachineBasicBlock* PRED = *PI; - if (PRED->succ_size() > 1) { - processThisBlock = true; - break; - } - } - } - if (! processThisBlock) - return false; - } - - CSRegSet prop; - if (!CSRSave[MBB].empty()) - prop = CSRSave[MBB]; - else if (!CSRRestore[MBB].empty()) - prop = CSRRestore[MBB]; - else - prop = CSRUsed[MBB]; - if (prop.empty()) - return false; - - // Propagate selected bits to successors, predecessors of MBB. - bool addedUses = false; - for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), - SE = MBB->succ_end(); SI != SE; ++SI) { - MachineBasicBlock* SUCC = *SI; - // Self-loop - if (SUCC == MBB) - continue; - if (! CSRUsed[SUCC].contains(prop)) { - CSRUsed[SUCC] |= prop; - addedUses = true; - blks.push_back(SUCC); - DEBUG(if (ShrinkWrapDebugging >= Iterations) - DOUT << getBasicBlockName(MBB) - << "(" << stringifyCSRegSet(prop) << ")->" - << "successor " << getBasicBlockName(SUCC) << "\n"); - } - } - for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), - PE = MBB->pred_end(); PI != PE; ++PI) { - MachineBasicBlock* PRED = *PI; - // Self-loop - if (PRED == MBB) - continue; - if (! CSRUsed[PRED].contains(prop)) { - CSRUsed[PRED] |= prop; - addedUses = true; - blks.push_back(PRED); - DEBUG(if (ShrinkWrapDebugging >= Iterations) - DOUT << getBasicBlockName(MBB) - << "(" << stringifyCSRegSet(prop) << ")->" - << "predecessor " << getBasicBlockName(PRED) << "\n"); - } - } - return addedUses; -} - -/// addUsesForTopLevelLoops - add uses for CSRs used inside top -/// level loops to the exit blocks of those loops. -/// -bool PEI::addUsesForTopLevelLoops(SmallVector& blks) { - bool addedUses = false; - - // Place restores for top level loops where needed. - for (DenseMap::iterator - I = TLLoops.begin(), E = TLLoops.end(); I != E; ++I) { - MachineBasicBlock* MBB = I->first; - MachineLoop* LP = I->second; - MachineBasicBlock* HDR = LP->getHeader(); - SmallVector exitBlocks; - CSRegSet loopSpills; - - loopSpills = CSRSave[MBB]; - if (CSRSave[MBB].empty()) { - loopSpills = CSRUsed[HDR]; - assert(!loopSpills.empty() && "No CSRs used in loop?"); - } else if (CSRRestore[MBB].contains(CSRSave[MBB])) - continue; - - LP->getExitBlocks(exitBlocks); - assert(exitBlocks.size() > 0 && "Loop has no top level exit blocks?"); - for (unsigned i = 0, e = exitBlocks.size(); i != e; ++i) { - MachineBasicBlock* EXB = exitBlocks[i]; - if (! CSRUsed[EXB].contains(loopSpills)) { - CSRUsed[EXB] |= loopSpills; - addedUses = true; - DEBUG(if (ShrinkWrapDebugging >= Iterations) - DOUT << "LOOP " << getBasicBlockName(MBB) - << "(" << stringifyCSRegSet(loopSpills) << ")->" - << getBasicBlockName(EXB) << "\n"); - if (EXB->succ_size() > 1 || EXB->pred_size() > 1) - blks.push_back(EXB); - } - } - } - return addedUses; -} - -/// calcSpillPlacements - determine which CSRs should be spilled -/// in MBB using AnticIn sets of MBB's predecessors, keeping track -/// of changes to spilled reg sets. Add MBB to the set of blocks -/// that need to be processed for propagating use info to cover -/// multi-entry/exit regions. -/// -bool PEI::calcSpillPlacements(MachineBasicBlock* MBB, - SmallVector &blks, - CSRegBlockMap &prevSpills) { - bool placedSpills = false; - // Intersect (CSRegs - AnticIn[P]) for P in Predecessors(MBB) - CSRegSet anticInPreds; - SmallVector predecessors; - for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), - PE = MBB->pred_end(); PI != PE; ++PI) { - MachineBasicBlock* PRED = *PI; - if (PRED != MBB) - predecessors.push_back(PRED); - } - unsigned i = 0, e = predecessors.size(); - if (i != e) { - MachineBasicBlock* PRED = predecessors[i]; - anticInPreds = UsedCSRegs - AnticIn[PRED]; - for (++i; i != e; ++i) { - PRED = predecessors[i]; - anticInPreds &= (UsedCSRegs - AnticIn[PRED]); - } - } else { - // Handle uses in entry blocks (which have no predecessors). - // This is necessary because the DFA formulation assumes the - // entry and (multiple) exit nodes cannot have CSR uses, which - // is not the case in the real world. - anticInPreds = UsedCSRegs; - } - // Compute spills required at MBB: - CSRSave[MBB] |= (AnticIn[MBB] - AvailIn[MBB]) & anticInPreds; - - if (! CSRSave[MBB].empty()) { - if (MBB == EntryBlock) { - for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) - CSRRestore[ReturnBlocks[ri]] |= CSRSave[MBB]; - } else { - // Reset all regs spilled in MBB that are also spilled in EntryBlock. - if (CSRSave[EntryBlock].intersects(CSRSave[MBB])) { - CSRSave[MBB] = CSRSave[MBB] - CSRSave[EntryBlock]; - } - } - } - placedSpills = (CSRSave[MBB] != prevSpills[MBB]); - prevSpills[MBB] = CSRSave[MBB]; - // Remember this block for adding restores to successor - // blocks for multi-entry region. - if (placedSpills) - blks.push_back(MBB); - - DEBUG(if (! CSRSave[MBB].empty() && ShrinkWrapDebugging >= Iterations) - DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(CSRSave[MBB]) << "\n"); - - return placedSpills; -} - -/// calcRestorePlacements - determine which CSRs should be restored -/// in MBB using AvailOut sets of MBB's succcessors, keeping track -/// of changes to restored reg sets. Add MBB to the set of blocks -/// that need to be processed for propagating use info to cover -/// multi-entry/exit regions. -/// -bool PEI::calcRestorePlacements(MachineBasicBlock* MBB, - SmallVector &blks, - CSRegBlockMap &prevRestores) { - bool placedRestores = false; - // Intersect (CSRegs - AvailOut[S]) for S in Successors(MBB) - CSRegSet availOutSucc; - SmallVector successors; - for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), - SE = MBB->succ_end(); SI != SE; ++SI) { - MachineBasicBlock* SUCC = *SI; - if (SUCC != MBB) - successors.push_back(SUCC); - } - unsigned i = 0, e = successors.size(); - if (i != e) { - MachineBasicBlock* SUCC = successors[i]; - availOutSucc = UsedCSRegs - AvailOut[SUCC]; - for (++i; i != e; ++i) { - SUCC = successors[i]; - availOutSucc &= (UsedCSRegs - AvailOut[SUCC]); - } - } else { - if (! CSRUsed[MBB].empty() || ! AvailOut[MBB].empty()) { - // Handle uses in return blocks (which have no successors). - // This is necessary because the DFA formulation assumes the - // entry and (multiple) exit nodes cannot have CSR uses, which - // is not the case in the real world. - availOutSucc = UsedCSRegs; - } - } - // Compute restores required at MBB: - CSRRestore[MBB] |= (AvailOut[MBB] - AnticOut[MBB]) & availOutSucc; - - // Postprocess restore placements at MBB. - // Remove the CSRs that are restored in the return blocks. - // Lest this be confusing, note that: - // CSRSave[EntryBlock] == CSRRestore[B] for all B in ReturnBlocks. - if (MBB->succ_size() && ! CSRRestore[MBB].empty()) { - if (! CSRSave[EntryBlock].empty()) - CSRRestore[MBB] = CSRRestore[MBB] - CSRSave[EntryBlock]; - } - placedRestores = (CSRRestore[MBB] != prevRestores[MBB]); - prevRestores[MBB] = CSRRestore[MBB]; - // Remember this block for adding saves to predecessor - // blocks for multi-entry region. - if (placedRestores) - blks.push_back(MBB); - - DEBUG(if (! CSRRestore[MBB].empty() && ShrinkWrapDebugging >= Iterations) - DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(CSRRestore[MBB]) << "\n"); - - return placedRestores; -} - -/// placeSpillsAndRestores - place spills and restores of CSRs -/// used in MBBs in minimal regions that contain the uses. -/// -void PEI::placeSpillsAndRestores(MachineFunction &Fn) { - CSRegBlockMap prevCSRSave; - CSRegBlockMap prevCSRRestore; - SmallVector cvBlocks, ncvBlocks; - bool changed = true; - unsigned iterations = 0; - - // Iterate computation of spill and restore placements in the MCFG until: - // 1. CSR use info has been fully propagated around the MCFG, and - // 2. computation of CSRSave[], CSRRestore[] reach fixed points. - while (changed) { - changed = false; - ++iterations; - - DEBUG(if (ShrinkWrapDebugging >= Iterations) - DOUT << "iter " << iterations - << " --------------------------------------------------\n"); - - // Calculate CSR{Save,Restore} sets using Antic, Avail on the MCFG, - // which determines the placements of spills and restores. - // Keep track of changes to spills, restores in each iteration to - // minimize the total iterations. - bool SRChanged = false; - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); - MBBI != MBBE; ++MBBI) { - MachineBasicBlock* MBB = MBBI; - - // Place spills for CSRs in MBB. - SRChanged |= calcSpillPlacements(MBB, cvBlocks, prevCSRSave); - - // Place restores for CSRs in MBB. - SRChanged |= calcRestorePlacements(MBB, cvBlocks, prevCSRRestore); - } - - // Add uses of CSRs used inside loops where needed. - changed |= addUsesForTopLevelLoops(cvBlocks); - - // Add uses for CSRs spilled or restored at branch, join points. - if (changed || SRChanged) { - while (! cvBlocks.empty()) { - MachineBasicBlock* MBB = cvBlocks.pop_back_val(); - changed |= addUsesForMEMERegion(MBB, ncvBlocks); - } - if (! ncvBlocks.empty()) { - cvBlocks = ncvBlocks; - ncvBlocks.clear(); - } - } - - if (changed) { - calculateAnticAvail(Fn); - CSRSave.clear(); - CSRRestore.clear(); - } - } - - // Check for effectiveness: - // SR0 = {r | r in CSRSave[EntryBlock], CSRRestore[RB], RB in ReturnBlocks} - // numSRReduced = |(UsedCSRegs - SR0)|, approx. SR0 by CSRSave[EntryBlock] - // Gives a measure of how many CSR spills have been moved from EntryBlock - // to minimal regions enclosing their uses. - CSRegSet notSpilledInEntryBlock = (UsedCSRegs - CSRSave[EntryBlock]); - unsigned numSRReducedThisFunc = notSpilledInEntryBlock.count(); - numSRReduced += numSRReducedThisFunc; - DEBUG(if (ShrinkWrapDebugging >= BasicInfo) { - DOUT << "-----------------------------------------------------------\n"; - DOUT << "total iterations = " << iterations << " ( " - << Fn.getFunction()->getName() - << " " << numSRReducedThisFunc - << " " << Fn.size() - << " )\n"; - DOUT << "-----------------------------------------------------------\n"; - dumpSRSets(); - DOUT << "-----------------------------------------------------------\n"; - if (numSRReducedThisFunc) - verifySpillRestorePlacement(); - }); +#if 0 +void PEI::getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesCFG(); + if (ShrinkWrapping || ShrinkWrapFunc != "") { + AU.addRequired(); + AU.addRequired(); + } + AU.addPreserved(); + AU.addPreserved(); + MachineFunctionPass::getAnalysisUsage(AU); } +#endif /// calculateCalleeSavedRegisters - Scan the function for modified callee saved /// registers. Also calculate the MaxCallFrameSize and HasCalls variables for @@ -1190,10 +251,6 @@ const TargetInstrInfo &TII = *Fn.getTarget().getInstrInfo(); MachineBasicBlock::iterator I; - DEBUG(if (ShrinkWrapThisFunction && ShrinkWrapDebugging >= Details) - DOUT << "Inserting CSR spills/restores in function " - << Fn.getFunction()->getName() << "\n"); - if (! ShrinkWrapThisFunction) { // Spill using target interface. I = EntryBlock->begin(); @@ -1258,10 +315,6 @@ if (save.empty()) continue; - DEBUG(if (ShrinkWrapDebugging >= Details) - DOUT << "Spilling " << stringifyCSRegSet(save) - << " in " << getBasicBlockName(MBB) << "\n"); - blockCSI.clear(); for (CSRegSet::iterator RI = save.begin(), RE = save.end(); RI != RE; ++RI) { @@ -1286,10 +339,6 @@ } } - DEBUG(if (ShrinkWrapDebugging >= Details) - DOUT << "------------------------------" - << "-----------------------------\n"); - for (CSRegBlockMap::iterator BI = CSRRestore.begin(), BE = CSRRestore.end(); BI != BE; ++BI) { MachineBasicBlock* MBB = BI->first; @@ -1298,10 +347,6 @@ if (restore.empty()) continue; - DEBUG(if (ShrinkWrapDebugging >= Details) - DOUT << "Restoring " << stringifyCSRegSet(restore) - << " in " << getBasicBlockName(MBB) << "\n"); - blockCSI.clear(); for (CSRegSet::iterator RI = restore.begin(), RE = restore.end(); RI != RE; ++RI) { @@ -1351,10 +396,6 @@ } } } - - DEBUG(if (ShrinkWrapDebugging >= Details) - DOUT << "------------------------------" - << "-----------------------------\n"); } /// AdjustStackOffset - Helper function used to adjust the stack frame offset. @@ -1636,284 +677,3 @@ } } -// Debugging methods for shrink wrapping. -#ifndef NDEBUG -/// findFastExitPath - debugging method used to detect functions -/// with at least one path from the entry block to a return block -/// directly or which has a very small number of edges. -/// -void PEI::findFastExitPath() { - if (! EntryBlock) - return; - // Fina a path from EntryBlock to any return block that does not branch: - // Entry - // | ... - // v | - // B1<-----+ - // | - // v - // Return - for (MachineBasicBlock::succ_iterator SI = EntryBlock->succ_begin(), - SE = EntryBlock->succ_end(); SI != SE; ++SI) { - MachineBasicBlock* SUCC = *SI; - - // Assume positive, disprove existence of fast path. -#ifndef NDEBUG - HasFastExitPath = true; -#endif - - // Check the immediate successors. - if (isReturnBlock(SUCC)) { - if (ShrinkWrapDebugging >= BasicInfo) - DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) - << "->" << getBasicBlockName(SUCC) << "\n"; - break; - } - // Traverse df from SUCC, look for a branch block. - std::string exitPath = getBasicBlockName(SUCC); - for (df_iterator BI = df_begin(SUCC), - BE = df_end(SUCC); BI != BE; ++BI) { - MachineBasicBlock* SBB = *BI; - // Reject paths with branch nodes. - if (SBB->succ_size() > 1) { -#ifndef NDEBUG - HasFastExitPath = false; -#endif - break; - } - exitPath += "->" + getBasicBlockName(SBB); - } -#ifndef NDEBUG - if (HasFastExitPath) { -#endif - if (ShrinkWrapDebugging >= BasicInfo) - DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) - << "->" << exitPath << "\n"; - break; -#ifndef NDEBUG - } -#endif - } -} - -/// verifySpillRestorePlacement - check the current spill/restore -/// sets for safety. Attempt to find spills without restores or -/// restores without spills. -/// Spills: walk df from each MBB in spill set ensuring that -/// all CSRs spilled at MMBB are restored on all paths -/// from MBB to all exit blocks. -/// Restores: walk idf from each MBB in restore set ensuring that -/// all CSRs restored at MBB are spilled on all paths -/// reaching MBB. -/// -void PEI::verifySpillRestorePlacement() { - unsigned numReturnBlocks = 0; - for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF->end(); - MBBI != MBBE; ++MBBI) { - MachineBasicBlock* MBB = MBBI; - if (isReturnBlock(MBB) || MBB->succ_size() == 0) - ++numReturnBlocks; - } - for (CSRegBlockMap::iterator BI = CSRSave.begin(), - BE = CSRSave.end(); BI != BE; ++BI) { - MachineBasicBlock* MBB = BI->first; - CSRegSet spilled = BI->second; - CSRegSet restored; - - if (spilled.empty()) - continue; - - DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(spilled) - << " RESTORE[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; - - if (CSRRestore[MBB].intersects(spilled)) { - restored |= (CSRRestore[MBB] & spilled); - } - - // Walk depth first from MBB to find restores of all CSRs spilled at MBB: - // we must find restores for all spills w/no intervening spills on all - // paths from MBB to all return blocks. - for (df_iterator BI = df_begin(MBB), - BE = df_end(MBB); BI != BE; ++BI) { - MachineBasicBlock* SBB = *BI; - if (SBB == MBB) - continue; - // Stop when we encounter spills of any CSRs spilled at MBB that - // have not yet been seen to be restored. - if (CSRSave[SBB].intersects(spilled) && - !restored.contains(CSRSave[SBB] & spilled)) - break; - // Collect the CSRs spilled at MBB that are restored - // at this DF successor of MBB. - if (CSRRestore[SBB].intersects(spilled)) - restored |= (CSRRestore[SBB] & spilled); - // If we are at a retun block, check that the restores - // we have seen so far exhaust the spills at MBB, then - // reset the restores. - if (isReturnBlock(SBB) || SBB->succ_size() == 0) { - if (restored != spilled) { - CSRegSet notRestored = (spilled - restored); - DOUT << MF->getFunction()->getName() << ": " - << stringifyCSRegSet(notRestored) - << " spilled at " << getBasicBlockName(MBB) - << " are never restored on path to return " - << getBasicBlockName(SBB) << "\n"; - } - restored.clear(); - } - } - } - - // Check restore placements. - for (CSRegBlockMap::iterator BI = CSRRestore.begin(), - BE = CSRRestore.end(); BI != BE; ++BI) { - MachineBasicBlock* MBB = BI->first; - CSRegSet restored = BI->second; - CSRegSet spilled; - - if (restored.empty()) - continue; - - DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(CSRSave[MBB]) - << " RESTORE[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(restored) << "\n"; - - if (CSRSave[MBB].intersects(restored)) { - spilled |= (CSRSave[MBB] & restored); - } - // Walk inverse depth first from MBB to find spills of all - // CSRs restored at MBB: - for (idf_iterator BI = idf_begin(MBB), - BE = idf_end(MBB); BI != BE; ++BI) { - MachineBasicBlock* PBB = *BI; - if (PBB == MBB) - continue; - // Stop when we encounter restores of any CSRs restored at MBB that - // have not yet been seen to be spilled. - if (CSRRestore[PBB].intersects(restored) && - !spilled.contains(CSRRestore[PBB] & restored)) - break; - // Collect the CSRs restored at MBB that are spilled - // at this DF predecessor of MBB. - if (CSRSave[PBB].intersects(restored)) - spilled |= (CSRSave[PBB] & restored); - } - if (spilled != restored) { - CSRegSet notSpilled = (restored - spilled); - DOUT << MF->getFunction()->getName() << ": " - << stringifyCSRegSet(notSpilled) - << " restored at " << getBasicBlockName(MBB) - << " are never spilled\n"; - } - } -} - -// Debugging print methods. -std::string PEI::getBasicBlockName(const MachineBasicBlock* MBB) { - std::ostringstream name; - if (MBB) { - if (MBB->getBasicBlock()) - name << MBB->getBasicBlock()->getName(); - else - name << "_MBB_" << MBB->getNumber(); - } - return name.str(); -} - -std::string PEI::stringifyCSRegSet(const CSRegSet& s) { - const TargetRegisterInfo* TRI = MF->getTarget().getRegisterInfo(); - const std::vector CSI = - MF->getFrameInfo()->getCalleeSavedInfo(); - - std::ostringstream srep; - if (CSI.size() == 0) { - srep << "[]"; - return srep.str(); - } - srep << "["; - CSRegSet::iterator I = s.begin(), E = s.end(); - if (I != E) { - unsigned reg = CSI[*I].getReg(); - srep << TRI->getName(reg); - for (++I; I != E; ++I) { - reg = CSI[*I].getReg(); - srep << ","; - srep << TRI->getName(reg); - } - } - srep << "]"; - return srep.str(); -} - -void PEI::dumpSet(const CSRegSet& s) { - DOUT << stringifyCSRegSet(s) << "\n"; -} - -void PEI::dumpUsed(MachineBasicBlock* MBB) { - if (MBB) { - DOUT << "CSRUsed[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(CSRUsed[MBB]) << "\n"; - } -} - -void PEI::dumpAllUsed() { - for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF->end(); - MBBI != MBBE; ++MBBI) { - MachineBasicBlock* MBB = MBBI; - dumpUsed(MBB); - } -} - -void PEI::dumpSets(MachineBasicBlock* MBB) { - if (MBB) { - DOUT << getBasicBlockName(MBB) << " | " - << stringifyCSRegSet(CSRUsed[MBB]) << " | " - << stringifyCSRegSet(AnticIn[MBB]) << " | " - << stringifyCSRegSet(AnticOut[MBB]) << " | " - << stringifyCSRegSet(AvailIn[MBB]) << " | " - << stringifyCSRegSet(AvailOut[MBB]) << "\n"; - } -} - -void PEI::dumpSets1(MachineBasicBlock* MBB) { - if (MBB) { - DOUT << getBasicBlockName(MBB) << " | " - << stringifyCSRegSet(CSRUsed[MBB]) << " | " - << stringifyCSRegSet(AnticIn[MBB]) << " | " - << stringifyCSRegSet(AnticOut[MBB]) << " | " - << stringifyCSRegSet(AvailIn[MBB]) << " | " - << stringifyCSRegSet(AvailOut[MBB]) << " | " - << stringifyCSRegSet(CSRSave[MBB]) << " | " - << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; - } -} - -void PEI::dumpAllSets() { - for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF->end(); - MBBI != MBBE; ++MBBI) { - MachineBasicBlock* MBB = MBBI; - dumpSets1(MBB); - } -} - -void PEI::dumpSRSets() { - for (MachineFunction::iterator MBB = MF->begin(), E = MF->end(); - MBB != E; ++MBB) { - if (! CSRSave[MBB].empty()) { - DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(CSRSave[MBB]); - if (CSRRestore[MBB].empty()) - DOUT << "\n"; - } - if (! CSRRestore[MBB].empty()) { - if (! CSRSave[MBB].empty()) - DOUT << " "; - DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " - << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; - } - } -} -#endif Added: llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp?rev=71588&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp (added) +++ llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp Tue May 12 15:33:29 2009 @@ -0,0 +1,1141 @@ +//===-- ShrinkWrapping.cpp - Reduce spills/restores of callee-saved regs --===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements a shrink wrapping variant of prolog/epilog insertion: +// - Spills and restores of callee-saved registers (CSRs) are placed in the +// machine CFG to tightly surround their uses so that execution paths that +// do not use CSRs do not pay the spill/restore penalty. +// +// - Avoiding placment of spills/restores in loops: if a CSR is used inside a +// loop the spills are placed in the loop preheader, and restores are +// placed in the loop exit nodes (the successors of loop _exiting_ nodes). +// +// - Covering paths without CSR uses: +// If a region in a CFG uses CSRs and has multiple entry and/or exit points, +// the use info for the CSRs inside the region is propagated outward in the +// CFG to ensure validity of the spill/restore placements. This decreases +// the effectiveness of shrink wrapping but does not require edge splitting +// in the machine CFG. +// +// This shrink wrapping implementation uses an iterative analysis to determine +// which basic blocks require spills and restores for CSRs. +// +// This pass uses MachineDominators and MachineLoopInfo. Loop information +// is used to prevent placement of callee-saved register spills/restores +// in the bodies of loops. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "shrink-wrap" + +#include "PEI.h" +#include "llvm/CodeGen/MachineDominators.h" +#include "llvm/CodeGen/MachineLoopInfo.h" +#include "llvm/CodeGen/MachineInstr.h" +#include "llvm/CodeGen/MachineFrameInfo.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetRegisterInfo.h" +#include "llvm/ADT/SparseBitVector.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/PostOrderIterator.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Compiler.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/Statistic.h" +#include + +using namespace llvm; + +STATISTIC(numSRReduced, "Number of CSR spills+restores reduced."); + +// Shrink Wrapping: +static cl::opt +ShrinkWrapping("shrink-wrap", + cl::desc("Shrink wrap callee-saved register spills/restores")); + +// Shrink wrap only the specified function, a debugging aid. +static cl::opt +ShrinkWrapFunc("shrink-wrap-func", cl::Hidden, + cl::desc("Shrink wrap the specified function"), + cl::value_desc("funcname"), + cl::init("")); + +// Debugging level for shrink wrapping. +enum ShrinkWrapDebugLevel { + None, BasicInfo, Iterations, Details +}; + +static cl::opt +ShrinkWrapDebugging("shrink-wrap-dbg", cl::Hidden, + cl::desc("Print shrink wrapping debugging information"), + cl::values( + clEnumVal(None , "disable debug output"), + clEnumVal(BasicInfo , "print basic DF sets"), + clEnumVal(Iterations, "print SR sets for each iteration"), + clEnumVal(Details , "print all DF sets"), + clEnumValEnd)); + + +void PEI::getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesCFG(); + if (ShrinkWrapping || ShrinkWrapFunc != "") { + AU.addRequired(); + AU.addRequired(); + } + AU.addPreserved(); + AU.addPreserved(); + MachineFunctionPass::getAnalysisUsage(AU); +} + +//===----------------------------------------------------------------------===// +// ShrinkWrapping implementation +//===----------------------------------------------------------------------===// + +// Convienences for dealing with machine loops. +MachineBasicBlock* PEI::getTopLevelLoopPreheader(MachineLoop* LP) { + assert(LP && "Machine loop is NULL."); + MachineBasicBlock* PHDR = LP->getLoopPreheader(); + MachineLoop* PLP = LP->getParentLoop(); + while (PLP) { + PHDR = PLP->getLoopPreheader(); + PLP = PLP->getParentLoop(); + } + return PHDR; +} + +MachineLoop* PEI::getTopLevelLoopParent(MachineLoop *LP) { + if (LP == 0) + return 0; + MachineLoop* PLP = LP->getParentLoop(); + while (PLP) { + LP = PLP; + PLP = PLP->getParentLoop(); + } + return LP; +} + +bool PEI::isReturnBlock(MachineBasicBlock* MBB) { + return (MBB && !MBB->empty() && MBB->back().getDesc().isReturn()); +} + +// Initialize shrink wrapping DFA sets, called before iterations. +void PEI::clearAnticAvailSets() { + AnticIn.clear(); + AnticOut.clear(); + AvailIn.clear(); + AvailOut.clear(); +} + +// Clear all sets constructed by shrink wrapping. +void PEI::clearAllSets() { + ReturnBlocks.clear(); + clearAnticAvailSets(); + UsedCSRegs.clear(); + CSRUsed.clear(); + TLLoops.clear(); + CSRSave.clear(); + CSRRestore.clear(); +} + +// Initialize all shrink wrapping data. +void PEI::initShrinkWrappingInfo() { + clearAllSets(); + EntryBlock = 0; +#ifndef NDEBUG + HasFastExitPath = false; +#endif + ShrinkWrapThisFunction = ShrinkWrapping; + // DEBUG: enable or disable shrink wrapping for the current function + // via --shrink-wrap-func=. +#ifndef NDEBUG + if (ShrinkWrapFunc != "") { + std::string MFName = MF->getFunction()->getName(); + ShrinkWrapThisFunction = (MFName == ShrinkWrapFunc); + } +#endif +} + + +/// placeCSRSpillsAndRestores - determine which MBBs of the function +/// need save, restore code for callee-saved registers by doing a DF analysis +/// similar to the one used in code motion (GVNPRE). This produces maps of MBBs +/// to sets of registers (CSRs) for saves and restores. MachineLoopInfo +/// is used to ensure that CSR save/restore code is not placed inside loops. +/// This function computes the maps of MBBs -> CSRs to spill and restore +/// in CSRSave, CSRRestore. +/// +/// If shrink wrapping is not being performed, place all spills in +/// the entry block, all restores in return blocks. In this case, +/// CSRSave has a single mapping, CSRRestore has mappings for each +/// return block. +/// +void PEI::placeCSRSpillsAndRestores(MachineFunction &Fn) { + + DEBUG(MF = &Fn); + + initShrinkWrappingInfo(); + + DEBUG(if (ShrinkWrapThisFunction) { + DOUT << "Place CSR spills/restores for " + << MF->getFunction()->getName() << "\n"; + }); + + if (calculateSets(Fn)) + placeSpillsAndRestores(Fn); +} + +/// calcAnticInOut - calculate the anticipated in/out reg sets +/// for the given MBB by looking forward in the MCFG at MBB's +/// successors. +/// +bool PEI::calcAnticInOut(MachineBasicBlock* MBB) { + bool changed = false; + + // AnticOut[MBB] = INTERSECT(AnticIn[S] for S in SUCCESSORS(MBB)) + SmallVector successors; + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), + SE = MBB->succ_end(); SI != SE; ++SI) { + MachineBasicBlock* SUCC = *SI; + if (SUCC != MBB) + successors.push_back(SUCC); + } + + unsigned i = 0, e = successors.size(); + if (i != e) { + CSRegSet prevAnticOut = AnticOut[MBB]; + MachineBasicBlock* SUCC = successors[i]; + + AnticOut[MBB] = AnticIn[SUCC]; + for (++i; i != e; ++i) { + SUCC = successors[i]; + AnticOut[MBB] &= AnticIn[SUCC]; + } + if (prevAnticOut != AnticOut[MBB]) + changed = true; + } + + // AnticIn[MBB] = UNION(CSRUsed[MBB], AnticOut[MBB]); + CSRegSet prevAnticIn = AnticIn[MBB]; + AnticIn[MBB] = CSRUsed[MBB] | AnticOut[MBB]; + if (prevAnticIn |= AnticIn[MBB]) + changed = true; + return changed; +} + +/// calcAvailInOut - calculate the available in/out reg sets +/// for the given MBB by looking backward in the MCFG at MBB's +/// predecessors. +/// +bool PEI::calcAvailInOut(MachineBasicBlock* MBB) { + bool changed = false; + + // AvailIn[MBB] = INTERSECT(AvailOut[P] for P in PREDECESSORS(MBB)) + SmallVector predecessors; + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), + PE = MBB->pred_end(); PI != PE; ++PI) { + MachineBasicBlock* PRED = *PI; + if (PRED != MBB) + predecessors.push_back(PRED); + } + + unsigned i = 0, e = predecessors.size(); + if (i != e) { + CSRegSet prevAvailIn = AvailIn[MBB]; + MachineBasicBlock* PRED = predecessors[i]; + + AvailIn[MBB] = AvailOut[PRED]; + for (++i; i != e; ++i) { + PRED = predecessors[i]; + AvailIn[MBB] &= AvailOut[PRED]; + } + if (prevAvailIn != AvailIn[MBB]) + changed = true; + } + + // AvailOut[MBB] = UNION(CSRUsed[MBB], AvailIn[MBB]); + CSRegSet prevAvailOut = AvailOut[MBB]; + AvailOut[MBB] = CSRUsed[MBB] | AvailIn[MBB]; + if (prevAvailOut |= AvailOut[MBB]) + changed = true; + return changed; +} + +/// calculateAnticAvail - build the sets anticipated and available +/// registers in the MCFG of the current function iteratively, +/// doing a combined forward and backward analysis. +/// +void PEI::calculateAnticAvail(MachineFunction &Fn) { + // Initialize data flow sets. + clearAnticAvailSets(); + + // Calulate Antic{In,Out} and Avail{In,Out} iteratively on the MCFG. + bool changed = true; + unsigned iterations = 0; + while (changed) { + changed = false; + ++iterations; + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + + // Calculate anticipated in, out regs at MBB from + // anticipated at successors of MBB. + changed |= calcAnticInOut(MBB); + + // Calculate available in, out regs at MBB from + // available at predecessors of MBB. + changed |= calcAvailInOut(MBB); + } + } + + DEBUG(if (ShrinkWrapDebugging >= Details) { + DOUT << "-----------------------------------------------------------\n"; + DOUT << " Antic/Avail Sets:\n"; + DOUT << "-----------------------------------------------------------\n"; + DOUT << "iterations = " << iterations << "\n"; + DOUT << "-----------------------------------------------------------\n"; + DOUT << "MBB | USED | ANTIC_IN | ANTIC_OUT | AVAIL_IN | AVAIL_OUT\n"; + DOUT << "-----------------------------------------------------------\n"; + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + dumpSets(MBB); + } + DOUT << "-----------------------------------------------------------\n"; + }); +} + +/// propagateUsesAroundLoop - copy used register info from MBB to all blocks +/// of the loop given by LP and its parent loops. This prevents spills/restores +/// from being placed in the bodies of loops. +/// +void PEI::propagateUsesAroundLoop(MachineBasicBlock* MBB, MachineLoop* LP) { + if (! MBB || !LP) + return; + + std::vector loopBlocks = LP->getBlocks(); + for (unsigned i = 0, e = loopBlocks.size(); i != e; ++i) { + MachineBasicBlock* LBB = loopBlocks[i]; + if (LBB == MBB) + continue; + if (CSRUsed[LBB].contains(CSRUsed[MBB])) + continue; + CSRUsed[LBB] |= CSRUsed[MBB]; + } +} + +/// calculateSets - collect the CSRs used in this function, compute +/// the DF sets that describe the initial minimal regions in the +/// Machine CFG around which CSR spills and restores must be placed. +/// +/// Additionally, this function decides if shrink wrapping should +/// be disabled for the current function, checking the following: +/// 1. the current function has more than 500 MBBs: heuristic limit +/// on function size to reduce compile time impact of the current +/// iterative algorithm. +/// 2. all CSRs are used in the entry block. +/// 3. all CSRs are used in all immediate successors of the entry block. +/// 4. all CSRs are used in a subset of blocks, each of which dominates +/// all return blocks. These blocks, taken as a subgraph of the MCFG, +/// are equivalent to the entry block since all execution paths pass +/// through them. +/// +bool PEI::calculateSets(MachineFunction &Fn) { + // Sets used to compute spill, restore placement sets. + const std::vector CSI = + Fn.getFrameInfo()->getCalleeSavedInfo(); + + // If no CSRs used, we are done. + if (CSI.empty()) { + DEBUG(if (ShrinkWrapThisFunction) + DOUT << "DISABLED: " << Fn.getFunction()->getName() + << ": uses no callee-saved registers\n"); + return false; + } + + // Save refs to entry and return blocks. + EntryBlock = Fn.begin(); + for (MachineFunction::iterator MBB = Fn.begin(), E = Fn.end(); + MBB != E; ++MBB) + if (isReturnBlock(MBB)) + ReturnBlocks.push_back(MBB); + + // Determine if this function has fast exit paths. + DEBUG(if (ShrinkWrapThisFunction) + findFastExitPath()); + + // Limit shrink wrapping via the current iterative bit vector + // implementation to functions with <= 500 MBBs. + if (Fn.size() > 500) { + DEBUG(if (ShrinkWrapThisFunction) + DOUT << "DISABLED: " << Fn.getFunction()->getName() + << ": too large (" << Fn.size() << " MBBs)\n"); + ShrinkWrapThisFunction = false; + } + + // Return now if not shrink wrapping. + if (! ShrinkWrapThisFunction) + return false; + + // Collect set of used CSRs. + for (unsigned inx = 0, e = CSI.size(); inx != e; ++inx) { + UsedCSRegs.set(inx); + } + + // Walk instructions in all MBBs, create CSRUsed[] sets, choose + // whether or not to shrink wrap this function. + MachineLoopInfo &LI = getAnalysis(); + MachineDominatorTree &DT = getAnalysis(); + const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo(); + + bool allCSRUsesInEntryBlock = true; + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + for (MachineBasicBlock::iterator I = MBB->begin(); I != MBB->end(); ++I) { + for (unsigned inx = 0, e = CSI.size(); inx != e; ++inx) { + unsigned Reg = CSI[inx].getReg(); + // If instruction I reads or modifies Reg, add it to UsedCSRegs, + // CSRUsed map for the current block. + for (unsigned opInx = 0, opEnd = I->getNumOperands(); + opInx != opEnd; ++opInx) { + const MachineOperand &MO = I->getOperand(opInx); + if (! (MO.isReg() && (MO.isUse() || MO.isDef()))) + continue; + unsigned MOReg = MO.getReg(); + if (!MOReg) + continue; + if (MOReg == Reg || + (TargetRegisterInfo::isPhysicalRegister(MOReg) && + TargetRegisterInfo::isPhysicalRegister(Reg) && + TRI->isSubRegister(Reg, MOReg))) { + // CSR Reg is defined/used in block MBB. + CSRUsed[MBB].set(inx); + // Check for uses in EntryBlock. + if (MBB != EntryBlock) + allCSRUsesInEntryBlock = false; + } + } + } + } + + if (CSRUsed[MBB].empty()) + continue; + + // Propagate CSRUsed[MBB] in loops + if (MachineLoop* LP = LI.getLoopFor(MBB)) { + // Add top level loop to work list. + MachineBasicBlock* HDR = getTopLevelLoopPreheader(LP); + MachineLoop* PLP = getTopLevelLoopParent(LP); + + if (! HDR) { + HDR = PLP->getHeader(); + assert(HDR->pred_size() > 0 && "Loop header has no predecessors?"); + MachineBasicBlock::pred_iterator PI = HDR->pred_begin(); + HDR = *PI; + } + TLLoops[HDR] = PLP; + + // Push uses from inside loop to its parent loops, + // or to all other MBBs in its loop. + if (LP->getLoopDepth() > 1) { + for (MachineLoop* PLP = LP->getParentLoop(); PLP; + PLP = PLP->getParentLoop()) { + propagateUsesAroundLoop(MBB, PLP); + } + } else { + propagateUsesAroundLoop(MBB, LP); + } + } + } + + if (allCSRUsesInEntryBlock) { + DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() + << ": all CSRs used in EntryBlock\n"); + ShrinkWrapThisFunction = false; + } else { + bool allCSRsUsedInEntryFanout = true; + for (MachineBasicBlock::succ_iterator SI = EntryBlock->succ_begin(), + SE = EntryBlock->succ_end(); SI != SE; ++SI) { + MachineBasicBlock* SUCC = *SI; + if (CSRUsed[SUCC] != UsedCSRegs) + allCSRsUsedInEntryFanout = false; + } + if (allCSRsUsedInEntryFanout) { + DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() + << ": all CSRs used in imm successors of EntryBlock\n"); + ShrinkWrapThisFunction = false; + } + } + + if (ShrinkWrapThisFunction) { + // Check if MBB uses CSRs and dominates all exit nodes. + // Such nodes are equiv. to the entry node w.r.t. + // CSR uses: every path through the function must + // pass through this node. If each CSR is used at least + // once by these nodes, shrink wrapping is disabled. + CSRegSet CSRUsedInChokePoints; + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + if (MBB == EntryBlock || CSRUsed[MBB].empty() || MBB->succ_size() < 1) + continue; + bool dominatesExitNodes = true; + for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) + if (! DT.dominates(MBB, ReturnBlocks[ri])) { + dominatesExitNodes = false; + break; + } + if (dominatesExitNodes) { + CSRUsedInChokePoints |= CSRUsed[MBB]; + if (CSRUsedInChokePoints == UsedCSRegs) { + DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() + << ": all CSRs used in choke point(s) at " + << getBasicBlockName(MBB) << "\n"); + ShrinkWrapThisFunction = false; + break; + } + } + } + } + + // Return now if we have decided not to apply shrink wrapping + // to the current function. + if (! ShrinkWrapThisFunction) + return false; + + DEBUG({ + DOUT << "ENABLED: " << Fn.getFunction()->getName(); + if (HasFastExitPath) + DOUT << " (fast exit path)"; + DOUT << "\n"; + if (ShrinkWrapDebugging >= BasicInfo) { + DOUT << "------------------------------" + << "-----------------------------\n"; + DOUT << "UsedCSRegs = " << stringifyCSRegSet(UsedCSRegs) << "\n"; + if (ShrinkWrapDebugging >= Details) { + DOUT << "------------------------------" + << "-----------------------------\n"; + dumpAllUsed(); + } + } + }); + + // Build initial DF sets to determine minimal regions in the + // Machine CFG around which CSRs must be spilled and restored. + calculateAnticAvail(Fn); + + return true; +} + +/// addUsesForMEMERegion - add uses of CSRs spilled or restored in +/// multi-entry, multi-exit (MEME) regions so spill and restore +/// placement will not break code that enters or leaves a +/// shrink-wrapped region by inducing spills with no matching +/// restores or restores with no matching spills. A MEME region +/// is a subgraph of the MCFG with multiple entry edges, multiple +/// exit edges, or both. This code propagates use information +/// through the MCFG until all paths requiring spills and restores +/// _outside_ the computed minimal placement regions have been covered. +/// +bool PEI::addUsesForMEMERegion(MachineBasicBlock* MBB, + SmallVector& blks) { + if (MBB->succ_size() < 2 && MBB->pred_size() < 2) { + bool processThisBlock = false; + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), + SE = MBB->succ_end(); SI != SE; ++SI) { + MachineBasicBlock* SUCC = *SI; + if (SUCC->pred_size() > 1) { + processThisBlock = true; + break; + } + } + if (!CSRRestore[MBB].empty() && MBB->succ_size() > 0) { + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), + PE = MBB->pred_end(); PI != PE; ++PI) { + MachineBasicBlock* PRED = *PI; + if (PRED->succ_size() > 1) { + processThisBlock = true; + break; + } + } + } + if (! processThisBlock) + return false; + } + + CSRegSet prop; + if (!CSRSave[MBB].empty()) + prop = CSRSave[MBB]; + else if (!CSRRestore[MBB].empty()) + prop = CSRRestore[MBB]; + else + prop = CSRUsed[MBB]; + if (prop.empty()) + return false; + + // Propagate selected bits to successors, predecessors of MBB. + bool addedUses = false; + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), + SE = MBB->succ_end(); SI != SE; ++SI) { + MachineBasicBlock* SUCC = *SI; + // Self-loop + if (SUCC == MBB) + continue; + if (! CSRUsed[SUCC].contains(prop)) { + CSRUsed[SUCC] |= prop; + addedUses = true; + blks.push_back(SUCC); + DEBUG(if (ShrinkWrapDebugging >= Iterations) + DOUT << getBasicBlockName(MBB) + << "(" << stringifyCSRegSet(prop) << ")->" + << "successor " << getBasicBlockName(SUCC) << "\n"); + } + } + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), + PE = MBB->pred_end(); PI != PE; ++PI) { + MachineBasicBlock* PRED = *PI; + // Self-loop + if (PRED == MBB) + continue; + if (! CSRUsed[PRED].contains(prop)) { + CSRUsed[PRED] |= prop; + addedUses = true; + blks.push_back(PRED); + DEBUG(if (ShrinkWrapDebugging >= Iterations) + DOUT << getBasicBlockName(MBB) + << "(" << stringifyCSRegSet(prop) << ")->" + << "predecessor " << getBasicBlockName(PRED) << "\n"); + } + } + return addedUses; +} + +/// addUsesForTopLevelLoops - add uses for CSRs used inside top +/// level loops to the exit blocks of those loops. +/// +bool PEI::addUsesForTopLevelLoops(SmallVector& blks) { + bool addedUses = false; + + // Place restores for top level loops where needed. + for (DenseMap::iterator + I = TLLoops.begin(), E = TLLoops.end(); I != E; ++I) { + MachineBasicBlock* MBB = I->first; + MachineLoop* LP = I->second; + MachineBasicBlock* HDR = LP->getHeader(); + SmallVector exitBlocks; + CSRegSet loopSpills; + + loopSpills = CSRSave[MBB]; + if (CSRSave[MBB].empty()) { + loopSpills = CSRUsed[HDR]; + assert(!loopSpills.empty() && "No CSRs used in loop?"); + } else if (CSRRestore[MBB].contains(CSRSave[MBB])) + continue; + + LP->getExitBlocks(exitBlocks); + assert(exitBlocks.size() > 0 && "Loop has no top level exit blocks?"); + for (unsigned i = 0, e = exitBlocks.size(); i != e; ++i) { + MachineBasicBlock* EXB = exitBlocks[i]; + if (! CSRUsed[EXB].contains(loopSpills)) { + CSRUsed[EXB] |= loopSpills; + addedUses = true; + DEBUG(if (ShrinkWrapDebugging >= Iterations) + DOUT << "LOOP " << getBasicBlockName(MBB) + << "(" << stringifyCSRegSet(loopSpills) << ")->" + << getBasicBlockName(EXB) << "\n"); + if (EXB->succ_size() > 1 || EXB->pred_size() > 1) + blks.push_back(EXB); + } + } + } + return addedUses; +} + +/// calcSpillPlacements - determine which CSRs should be spilled +/// in MBB using AnticIn sets of MBB's predecessors, keeping track +/// of changes to spilled reg sets. Add MBB to the set of blocks +/// that need to be processed for propagating use info to cover +/// multi-entry/exit regions. +/// +bool PEI::calcSpillPlacements(MachineBasicBlock* MBB, + SmallVector &blks, + CSRegBlockMap &prevSpills) { + bool placedSpills = false; + // Intersect (CSRegs - AnticIn[P]) for P in Predecessors(MBB) + CSRegSet anticInPreds; + SmallVector predecessors; + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), + PE = MBB->pred_end(); PI != PE; ++PI) { + MachineBasicBlock* PRED = *PI; + if (PRED != MBB) + predecessors.push_back(PRED); + } + unsigned i = 0, e = predecessors.size(); + if (i != e) { + MachineBasicBlock* PRED = predecessors[i]; + anticInPreds = UsedCSRegs - AnticIn[PRED]; + for (++i; i != e; ++i) { + PRED = predecessors[i]; + anticInPreds &= (UsedCSRegs - AnticIn[PRED]); + } + } else { + // Handle uses in entry blocks (which have no predecessors). + // This is necessary because the DFA formulation assumes the + // entry and (multiple) exit nodes cannot have CSR uses, which + // is not the case in the real world. + anticInPreds = UsedCSRegs; + } + // Compute spills required at MBB: + CSRSave[MBB] |= (AnticIn[MBB] - AvailIn[MBB]) & anticInPreds; + + if (! CSRSave[MBB].empty()) { + if (MBB == EntryBlock) { + for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) + CSRRestore[ReturnBlocks[ri]] |= CSRSave[MBB]; + } else { + // Reset all regs spilled in MBB that are also spilled in EntryBlock. + if (CSRSave[EntryBlock].intersects(CSRSave[MBB])) { + CSRSave[MBB] = CSRSave[MBB] - CSRSave[EntryBlock]; + } + } + } + placedSpills = (CSRSave[MBB] != prevSpills[MBB]); + prevSpills[MBB] = CSRSave[MBB]; + // Remember this block for adding restores to successor + // blocks for multi-entry region. + if (placedSpills) + blks.push_back(MBB); + + DEBUG(if (! CSRSave[MBB].empty() && ShrinkWrapDebugging >= Iterations) + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRSave[MBB]) << "\n"); + + return placedSpills; +} + +/// calcRestorePlacements - determine which CSRs should be restored +/// in MBB using AvailOut sets of MBB's succcessors, keeping track +/// of changes to restored reg sets. Add MBB to the set of blocks +/// that need to be processed for propagating use info to cover +/// multi-entry/exit regions. +/// +bool PEI::calcRestorePlacements(MachineBasicBlock* MBB, + SmallVector &blks, + CSRegBlockMap &prevRestores) { + bool placedRestores = false; + // Intersect (CSRegs - AvailOut[S]) for S in Successors(MBB) + CSRegSet availOutSucc; + SmallVector successors; + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), + SE = MBB->succ_end(); SI != SE; ++SI) { + MachineBasicBlock* SUCC = *SI; + if (SUCC != MBB) + successors.push_back(SUCC); + } + unsigned i = 0, e = successors.size(); + if (i != e) { + MachineBasicBlock* SUCC = successors[i]; + availOutSucc = UsedCSRegs - AvailOut[SUCC]; + for (++i; i != e; ++i) { + SUCC = successors[i]; + availOutSucc &= (UsedCSRegs - AvailOut[SUCC]); + } + } else { + if (! CSRUsed[MBB].empty() || ! AvailOut[MBB].empty()) { + // Handle uses in return blocks (which have no successors). + // This is necessary because the DFA formulation assumes the + // entry and (multiple) exit nodes cannot have CSR uses, which + // is not the case in the real world. + availOutSucc = UsedCSRegs; + } + } + // Compute restores required at MBB: + CSRRestore[MBB] |= (AvailOut[MBB] - AnticOut[MBB]) & availOutSucc; + + // Postprocess restore placements at MBB. + // Remove the CSRs that are restored in the return blocks. + // Lest this be confusing, note that: + // CSRSave[EntryBlock] == CSRRestore[B] for all B in ReturnBlocks. + if (MBB->succ_size() && ! CSRRestore[MBB].empty()) { + if (! CSRSave[EntryBlock].empty()) + CSRRestore[MBB] = CSRRestore[MBB] - CSRSave[EntryBlock]; + } + placedRestores = (CSRRestore[MBB] != prevRestores[MBB]); + prevRestores[MBB] = CSRRestore[MBB]; + // Remember this block for adding saves to predecessor + // blocks for multi-entry region. + if (placedRestores) + blks.push_back(MBB); + + DEBUG(if (! CSRRestore[MBB].empty() && ShrinkWrapDebugging >= Iterations) + DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"); + + return placedRestores; +} + +/// placeSpillsAndRestores - place spills and restores of CSRs +/// used in MBBs in minimal regions that contain the uses. +/// +void PEI::placeSpillsAndRestores(MachineFunction &Fn) { + CSRegBlockMap prevCSRSave; + CSRegBlockMap prevCSRRestore; + SmallVector cvBlocks, ncvBlocks; + bool changed = true; + unsigned iterations = 0; + + // Iterate computation of spill and restore placements in the MCFG until: + // 1. CSR use info has been fully propagated around the MCFG, and + // 2. computation of CSRSave[], CSRRestore[] reach fixed points. + while (changed) { + changed = false; + ++iterations; + + DEBUG(if (ShrinkWrapDebugging >= Iterations) + DOUT << "iter " << iterations + << " --------------------------------------------------\n"); + + // Calculate CSR{Save,Restore} sets using Antic, Avail on the MCFG, + // which determines the placements of spills and restores. + // Keep track of changes to spills, restores in each iteration to + // minimize the total iterations. + bool SRChanged = false; + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + + // Place spills for CSRs in MBB. + SRChanged |= calcSpillPlacements(MBB, cvBlocks, prevCSRSave); + + // Place restores for CSRs in MBB. + SRChanged |= calcRestorePlacements(MBB, cvBlocks, prevCSRRestore); + } + + // Add uses of CSRs used inside loops where needed. + changed |= addUsesForTopLevelLoops(cvBlocks); + + // Add uses for CSRs spilled or restored at branch, join points. + if (changed || SRChanged) { + while (! cvBlocks.empty()) { + MachineBasicBlock* MBB = cvBlocks.pop_back_val(); + changed |= addUsesForMEMERegion(MBB, ncvBlocks); + } + if (! ncvBlocks.empty()) { + cvBlocks = ncvBlocks; + ncvBlocks.clear(); + } + } + + if (changed) { + calculateAnticAvail(Fn); + CSRSave.clear(); + CSRRestore.clear(); + } + } + + // Check for effectiveness: + // SR0 = {r | r in CSRSave[EntryBlock], CSRRestore[RB], RB in ReturnBlocks} + // numSRReduced = |(UsedCSRegs - SR0)|, approx. SR0 by CSRSave[EntryBlock] + // Gives a measure of how many CSR spills have been moved from EntryBlock + // to minimal regions enclosing their uses. + CSRegSet notSpilledInEntryBlock = (UsedCSRegs - CSRSave[EntryBlock]); + unsigned numSRReducedThisFunc = notSpilledInEntryBlock.count(); + numSRReduced += numSRReducedThisFunc; + DEBUG(if (ShrinkWrapDebugging >= BasicInfo) { + DOUT << "-----------------------------------------------------------\n"; + DOUT << "total iterations = " << iterations << " ( " + << Fn.getFunction()->getName() + << " " << numSRReducedThisFunc + << " " << Fn.size() + << " )\n"; + DOUT << "-----------------------------------------------------------\n"; + dumpSRSets(); + DOUT << "-----------------------------------------------------------\n"; + if (numSRReducedThisFunc) + verifySpillRestorePlacement(); + }); +} + +// Debugging methods. +#ifndef NDEBUG +/// findFastExitPath - debugging method used to detect functions +/// with at least one path from the entry block to a return block +/// directly or which has a very small number of edges. +/// +void PEI::findFastExitPath() { + if (! EntryBlock) + return; + // Fina a path from EntryBlock to any return block that does not branch: + // Entry + // | ... + // v | + // B1<-----+ + // | + // v + // Return + for (MachineBasicBlock::succ_iterator SI = EntryBlock->succ_begin(), + SE = EntryBlock->succ_end(); SI != SE; ++SI) { + MachineBasicBlock* SUCC = *SI; + + // Assume positive, disprove existence of fast path. + HasFastExitPath = true; + + // Check the immediate successors. + if (isReturnBlock(SUCC)) { + if (ShrinkWrapDebugging >= BasicInfo) + DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) + << "->" << getBasicBlockName(SUCC) << "\n"; + break; + } + // Traverse df from SUCC, look for a branch block. + std::string exitPath = getBasicBlockName(SUCC); + for (df_iterator BI = df_begin(SUCC), + BE = df_end(SUCC); BI != BE; ++BI) { + MachineBasicBlock* SBB = *BI; + // Reject paths with branch nodes. + if (SBB->succ_size() > 1) { + HasFastExitPath = false; + break; + } + exitPath += "->" + getBasicBlockName(SBB); + } + if (HasFastExitPath) { + if (ShrinkWrapDebugging >= BasicInfo) + DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) + << "->" << exitPath << "\n"; + break; + } + } +} + +/// verifySpillRestorePlacement - check the current spill/restore +/// sets for safety. Attempt to find spills without restores or +/// restores without spills. +/// Spills: walk df from each MBB in spill set ensuring that +/// all CSRs spilled at MMBB are restored on all paths +/// from MBB to all exit blocks. +/// Restores: walk idf from each MBB in restore set ensuring that +/// all CSRs restored at MBB are spilled on all paths +/// reaching MBB. +/// +void PEI::verifySpillRestorePlacement() { + unsigned numReturnBlocks = 0; + for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF->end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + if (isReturnBlock(MBB) || MBB->succ_size() == 0) + ++numReturnBlocks; + } + for (CSRegBlockMap::iterator BI = CSRSave.begin(), + BE = CSRSave.end(); BI != BE; ++BI) { + MachineBasicBlock* MBB = BI->first; + CSRegSet spilled = BI->second; + CSRegSet restored; + + if (spilled.empty()) + continue; + + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(spilled) + << " RESTORE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; + + if (CSRRestore[MBB].intersects(spilled)) { + restored |= (CSRRestore[MBB] & spilled); + } + + // Walk depth first from MBB to find restores of all CSRs spilled at MBB: + // we must find restores for all spills w/no intervening spills on all + // paths from MBB to all return blocks. + for (df_iterator BI = df_begin(MBB), + BE = df_end(MBB); BI != BE; ++BI) { + MachineBasicBlock* SBB = *BI; + if (SBB == MBB) + continue; + // Stop when we encounter spills of any CSRs spilled at MBB that + // have not yet been seen to be restored. + if (CSRSave[SBB].intersects(spilled) && + !restored.contains(CSRSave[SBB] & spilled)) + break; + // Collect the CSRs spilled at MBB that are restored + // at this DF successor of MBB. + if (CSRRestore[SBB].intersects(spilled)) + restored |= (CSRRestore[SBB] & spilled); + // If we are at a retun block, check that the restores + // we have seen so far exhaust the spills at MBB, then + // reset the restores. + if (isReturnBlock(SBB) || SBB->succ_size() == 0) { + if (restored != spilled) { + CSRegSet notRestored = (spilled - restored); + DOUT << MF->getFunction()->getName() << ": " + << stringifyCSRegSet(notRestored) + << " spilled at " << getBasicBlockName(MBB) + << " are never restored on path to return " + << getBasicBlockName(SBB) << "\n"; + } + restored.clear(); + } + } + } + + // Check restore placements. + for (CSRegBlockMap::iterator BI = CSRRestore.begin(), + BE = CSRRestore.end(); BI != BE; ++BI) { + MachineBasicBlock* MBB = BI->first; + CSRegSet restored = BI->second; + CSRegSet spilled; + + if (restored.empty()) + continue; + + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRSave[MBB]) + << " RESTORE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(restored) << "\n"; + + if (CSRSave[MBB].intersects(restored)) { + spilled |= (CSRSave[MBB] & restored); + } + // Walk inverse depth first from MBB to find spills of all + // CSRs restored at MBB: + for (idf_iterator BI = idf_begin(MBB), + BE = idf_end(MBB); BI != BE; ++BI) { + MachineBasicBlock* PBB = *BI; + if (PBB == MBB) + continue; + // Stop when we encounter restores of any CSRs restored at MBB that + // have not yet been seen to be spilled. + if (CSRRestore[PBB].intersects(restored) && + !spilled.contains(CSRRestore[PBB] & restored)) + break; + // Collect the CSRs restored at MBB that are spilled + // at this DF predecessor of MBB. + if (CSRSave[PBB].intersects(restored)) + spilled |= (CSRSave[PBB] & restored); + } + if (spilled != restored) { + CSRegSet notSpilled = (restored - spilled); + DOUT << MF->getFunction()->getName() << ": " + << stringifyCSRegSet(notSpilled) + << " restored at " << getBasicBlockName(MBB) + << " are never spilled\n"; + } + } +} + +// Debugging print methods. +std::string PEI::getBasicBlockName(const MachineBasicBlock* MBB) { + std::ostringstream name; + if (MBB) { + if (MBB->getBasicBlock()) + name << MBB->getBasicBlock()->getName(); + else + name << "_MBB_" << MBB->getNumber(); + } + return name.str(); +} + +std::string PEI::stringifyCSRegSet(const CSRegSet& s) { + const TargetRegisterInfo* TRI = MF->getTarget().getRegisterInfo(); + const std::vector CSI = + MF->getFrameInfo()->getCalleeSavedInfo(); + + std::ostringstream srep; + if (CSI.size() == 0) { + srep << "[]"; + return srep.str(); + } + srep << "["; + CSRegSet::iterator I = s.begin(), E = s.end(); + if (I != E) { + unsigned reg = CSI[*I].getReg(); + srep << TRI->getName(reg); + for (++I; I != E; ++I) { + reg = CSI[*I].getReg(); + srep << ","; + srep << TRI->getName(reg); + } + } + srep << "]"; + return srep.str(); +} + +void PEI::dumpSet(const CSRegSet& s) { + DOUT << stringifyCSRegSet(s) << "\n"; +} + +void PEI::dumpUsed(MachineBasicBlock* MBB) { + if (MBB) { + DOUT << "CSRUsed[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRUsed[MBB]) << "\n"; + } +} + +void PEI::dumpAllUsed() { + for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF->end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + dumpUsed(MBB); + } +} + +void PEI::dumpSets(MachineBasicBlock* MBB) { + if (MBB) { + DOUT << getBasicBlockName(MBB) << " | " + << stringifyCSRegSet(CSRUsed[MBB]) << " | " + << stringifyCSRegSet(AnticIn[MBB]) << " | " + << stringifyCSRegSet(AnticOut[MBB]) << " | " + << stringifyCSRegSet(AvailIn[MBB]) << " | " + << stringifyCSRegSet(AvailOut[MBB]) << "\n"; + } +} + +void PEI::dumpSets1(MachineBasicBlock* MBB) { + if (MBB) { + DOUT << getBasicBlockName(MBB) << " | " + << stringifyCSRegSet(CSRUsed[MBB]) << " | " + << stringifyCSRegSet(AnticIn[MBB]) << " | " + << stringifyCSRegSet(AnticOut[MBB]) << " | " + << stringifyCSRegSet(AvailIn[MBB]) << " | " + << stringifyCSRegSet(AvailOut[MBB]) << " | " + << stringifyCSRegSet(CSRSave[MBB]) << " | " + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; + } +} + +void PEI::dumpAllSets() { + for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF->end(); + MBBI != MBBE; ++MBBI) { + MachineBasicBlock* MBB = MBBI; + dumpSets1(MBB); + } +} + +void PEI::dumpSRSets() { + for (MachineFunction::iterator MBB = MF->begin(), E = MF->end(); + MBB != E; ++MBB) { + if (! CSRSave[MBB].empty()) { + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRSave[MBB]); + if (CSRRestore[MBB].empty()) + DOUT << "\n"; + } + if (! CSRRestore[MBB].empty()) { + if (! CSRSave[MBB].empty()) + DOUT << " "; + DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; + } + } +} +#endif From overminddl1 at gmail.com Tue May 12 16:14:06 2009 From: overminddl1 at gmail.com (OvermindDL1) Date: Tue, 12 May 2009 15:14:06 -0600 Subject: [llvm-commits] MSVC cstdint Message-ID: <3f49a9f40905121414t6bf22586mca3dc0e0b92de303@mail.gmail.com> In the llvm file include/llvm/Support/DataTypes.h (.in/.cmake), for MSVCit defines some macros that are defined in the cstdint.hpp file in boost (and boost does it better, detailed below): The basic error is: R:\SDKs\boost\built_head\include\boost-1_38\boost/cstdint.hpp(347) : warning C4005: 'INT8_C' : macro redefinition R:\SDKs\llvm\trunk_VC8_building\include\llvm/Support/DataTypes.h(116) : see previous definition of 'INT8_C' R:\SDKs\boost\built_head\include\boost-1_38\boost/cstdint.hpp(348) : warning C4005: 'INT16_C' : macro redefinition R:\SDKs\llvm\trunk_VC8_building\include\llvm/Support/DataTypes.h(118) : see previous definition of 'INT16_C' R:\SDKs\boost\built_head\include\boost-1_38\boost/cstdint.hpp(349) : warning C4005: 'INT32_C' : macro redefinition R:\SDKs\llvm\trunk_VC8_building\include\llvm/Support/DataTypes.h(120) : see previous definition of 'INT32_C' R:\SDKs\boost\built_head\include\boost-1_38\boost/cstdint.hpp(350) : warning C4005: 'INT64_C' : macro redefinition R:\SDKs\llvm\trunk_VC8_building\include\llvm/Support/DataTypes.h(122) : see previous definition of 'INT64_C' R:\SDKs\boost\built_head\include\boost-1_38\boost/cstdint.hpp(355) : warning C4005: 'UINT8_C' : macro redefinition R:\SDKs\llvm\trunk_VC8_building\include\llvm/Support/DataTypes.h(117) : see previous definition of 'UINT8_C' R:\SDKs\boost\built_head\include\boost-1_38\boost/cstdint.hpp(357) : warning C4005: 'UINT16_C' : macro redefinition R:\SDKs\llvm\trunk_VC8_building\include\llvm/Support/DataTypes.h(119) : see previous definition of 'UINT16_C' R:\SDKs\boost\built_head\include\boost-1_38\boost/cstdint.hpp(358) : warning C4005: 'UINT32_C' : macro redefinition R:\SDKs\llvm\trunk_VC8_building\include\llvm/Support/DataTypes.h(121) : see previous definition of 'UINT32_C' R:\SDKs\boost\built_head\include\boost-1_38\boost/cstdint.hpp(359) : warning C4005: 'UINT64_C' : macro redefinition R:\SDKs\llvm\trunk_VC8_building\include\llvm/Support/DataTypes.h(123) : see previous definition of 'UINT64_C' LLVMs definitions look like this: #define INT8_C(C) C #define UINT8_C(C) C #define INT16_C(C) C #define UINT16_C(C) C #define INT32_C(C) C #define UINT32_C(C) C ## U #define INT64_C(C) ((int64_t) C ## LL) #define UINT64_C(C) ((uint64_t) C ## ULL) Boosts look like this: # define INT8_C(value) value##i8 # define INT16_C(value) value##i16 # define INT32_C(value) value##i32 # define INT64_C(value) value##i64 # define UINT8_C(value) value##ui8 # define UINT16_C(value) value##ui16 # define UINT32_C(value) value##ui32 # define UINT64_C(value) value##ui64 # define INTMAX_C(value) value##i64 # define UINTMAX_C(value) value##ui64 Which is more correct due to MSVC suffix (boost also defines appropriate ones for appropriate compilers). My main thing is the warnings, which were not there earlier, although I have had boost for far longer. looking in the log it appears this was broke on revision 58048, where before it only defined UINT64_C, but it had a guard around it, the exact lines where: #if !defined(INT64_C) # define INT64_C(val) val##LL #endif Since these are rather well used defines, would it be possible to use the MSVC specific suffixes since these are in the MSVC specific section, as well as putting include guards around each of them? See the attached patch that does both. -------------- next part -------------- A non-text attachment was scrubbed... Name: stdint_fix.patch Type: application/octet-stream Size: 2424 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090512/03232d5b/attachment.obj From isanbard at gmail.com Tue May 12 16:19:11 2009 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 12 May 2009 21:19:11 -0000 Subject: [llvm-commits] [llvm] r71592 - /llvm/tags/Apple/llvmCore-2109.1/ Message-ID: <200905122119.n4CLJBFT007889@zion.cs.uiuc.edu> Author: void Date: Tue May 12 16:19:11 2009 New Revision: 71592 URL: http://llvm.org/viewvc/llvm-project?rev=71592&view=rev Log: Creating llvmCore-2109.1 branch Added: llvm/tags/Apple/llvmCore-2109.1/ - copied from r71591, llvm/branches/Apple/Dib/ From isanbard at gmail.com Tue May 12 16:19:20 2009 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 12 May 2009 21:19:20 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r71593 - /llvm-gcc-4.2/tags/Apple/llvmgcc42-2109.1/ Message-ID: <200905122119.n4CLJKuI007908@zion.cs.uiuc.edu> Author: void Date: Tue May 12 16:19:19 2009 New Revision: 71593 URL: http://llvm.org/viewvc/llvm-project?rev=71593&view=rev Log: Creating llvmgcc42-2109.1 branch Added: llvm-gcc-4.2/tags/Apple/llvmgcc42-2109.1/ - copied from r71592, llvm-gcc-4.2/branches/Apple/Dib/ From evan.cheng at apple.com Tue May 12 16:32:27 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 12 May 2009 14:32:27 -0700 Subject: [llvm-commits] [llvm] r71588 - in /llvm/trunk/lib/CodeGen: PEI.h PrologEpilogInserter.cpp ShrinkWrapping.cpp In-Reply-To: <200905122033.n4CKXUYg005872@zion.cs.uiuc.edu> References: <200905122033.n4CKXUYg005872@zion.cs.uiuc.edu> Message-ID: Thanks John. But the refactoring seems a bit strange to me. First of all, the convention is for the .h name to match the .cpp one. So perhaps PEI.h should be PrologueEpilogueInserter.h? As for the shrink wrapper, it doesn't have to be a separate pass, but can it be a separate class? Are there too much sharing of information between the two that the data passing overhead would be too high? Evan On May 12, 2009, at 1:33 PM, John Mosby wrote: > Author: jdm > Date: Tue May 12 15:33:29 2009 > New Revision: 71588 > > URL: http://llvm.org/viewvc/llvm-project?rev=71588&view=rev > Log: > > Restructure PEI code: > > - moved shrink wrapping code from PrologEpilogInserter.cpp to > new file ShrinkWrapping.cpp. > > - moved PEI pass definition into new shared header PEI.h. > > > Added: > llvm/trunk/lib/CodeGen/PEI.h > llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp > Modified: > llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp > > Added: llvm/trunk/lib/CodeGen/PEI.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PEI.h?rev=71588&view=auto > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/PEI.h (added) > +++ llvm/trunk/lib/CodeGen/PEI.h Tue May 12 15:33:29 2009 > @@ -0,0 +1,167 @@ > +//===-- PrologEpilogInserter.h - Prolog/Epilog code insertion -*- C+ > + -* --===// > +// > +// The LLVM Compiler Infrastructure > +// > +// This file is distributed under the University of Illinois Open > Source > +// License. See LICENSE.TXT for details. > +// > +// > = > = > = > ----------------------------------------------------------------------= > ==// > +// > +// This pass is responsible for finalizing the functions frame > layout, saving > +// callee saved registers, and for emitting prolog & epilog code > for the > +// function. > +// > +// This pass must be run after register allocation. After this > pass is > +// executed, it is illegal to construct MO_FrameIndex operands. > +// > +// This pass also implements a shrink wrapping variant of prolog/ > epilog > +// insertion. > +// > +// > = > = > = > ----------------------------------------------------------------------= > ==// > + > +#ifndef LLVM_CODEGEN_PEI_H > +#define LLVM_CODEGEN_PEI_H > + > +#include "llvm/CodeGen/Passes.h" > +#include "llvm/CodeGen/MachineFunctionPass.h" > +#include "llvm/CodeGen/MachineLoopInfo.h" > +#include "llvm/ADT/SparseBitVector.h" > +#include "llvm/ADT/DenseMap.h" > + > +namespace llvm { > + class RegScavenger; > + class MachineBasicBlock; > + > + class PEI : public MachineFunctionPass { > + public: > + static char ID; > + PEI() : MachineFunctionPass(&ID) {} > + > + const char *getPassName() const { > + return "Prolog/Epilog Insertion & Frame Finalization"; > + } > + > + virtual void getAnalysisUsage(AnalysisUsage &AU) const; > + > + /// runOnMachineFunction - Insert prolog/epilog code and > replace abstract > + /// frame indexes with appropriate references. > + /// > + bool runOnMachineFunction(MachineFunction &Fn); > + > + private: > + RegScavenger *RS; > + > + // MinCSFrameIndex, MaxCSFrameIndex - Keeps the range of callee > saved > + // stack frame indexes. > + unsigned MinCSFrameIndex, MaxCSFrameIndex; > + > + // Analysis info for spill/restore placement. > + // "CSR": "callee saved register". > + > + // CSRegSet contains indices into the Callee Saved Register Info > + // vector built by calculateCalleeSavedRegisters() and accessed > + // via MF.getFrameInfo()->getCalleeSavedInfo(). > + typedef SparseBitVector<> CSRegSet; > + > + // CSRegBlockMap maps MachineBasicBlocks to sets of callee > + // saved register indices. > + typedef DenseMap CSRegBlockMap; > + > + // Set and maps for computing CSR spill/restore placement: > + // used in function (UsedCSRegs) > + // used in a basic block (CSRUsed) > + // anticipatable in a basic block (Antic{In,Out}) > + // available in a basic block (Avail{In,Out}) > + // to be spilled at the entry to a basic block (CSRSave) > + // to be restored at the end of a basic block (CSRRestore) > + CSRegSet UsedCSRegs; > + CSRegBlockMap CSRUsed; > + CSRegBlockMap AnticIn, AnticOut; > + CSRegBlockMap AvailIn, AvailOut; > + CSRegBlockMap CSRSave; > + CSRegBlockMap CSRRestore; > + > + // Entry and return blocks of the current function. > + MachineBasicBlock* EntryBlock; > + SmallVector ReturnBlocks; > + > + // Map of MBBs to top level MachineLoops. > + DenseMap TLLoops; > + > + // Flag to control shrink wrapping per-function: > + // may choose to skip shrink wrapping for certain > + // functions. > + bool ShrinkWrapThisFunction; > + > +#ifndef NDEBUG > + // Machine function handle. > + MachineFunction* MF; > + > + // Flag indicating that the current function > + // has at least one "short" path in the machine > + // CFG from the entry block to an exit block. > + bool HasFastExitPath; > +#endif > + > + bool calculateSets(MachineFunction &Fn); > + bool calcAnticInOut(MachineBasicBlock* MBB); > + bool calcAvailInOut(MachineBasicBlock* MBB); > + void calculateAnticAvail(MachineFunction &Fn); > + bool addUsesForMEMERegion(MachineBasicBlock* MBB, > + SmallVector& > blks); > + bool addUsesForTopLevelLoops(SmallVector 4>& blks); > + bool calcSpillPlacements(MachineBasicBlock* MBB, > + SmallVector > &blks, > + CSRegBlockMap &prevSpills); > + bool calcRestorePlacements(MachineBasicBlock* MBB, > + SmallVector > &blks, > + CSRegBlockMap &prevRestores); > + void placeSpillsAndRestores(MachineFunction &Fn); > + void placeCSRSpillsAndRestores(MachineFunction &Fn); > + void calculateCalleeSavedRegisters(MachineFunction &Fn); > + void insertCSRSpillsAndRestores(MachineFunction &Fn); > + void calculateFrameObjectOffsets(MachineFunction &Fn); > + void replaceFrameIndices(MachineFunction &Fn); > + void insertPrologEpilogCode(MachineFunction &Fn); > + > + // Initialize DFA sets, called before iterations. > + void clearAnticAvailSets(); > + // Clear all sets constructed by shrink wrapping. > + void clearAllSets(); > + > + // Initialize all shrink wrapping data. > + void initShrinkWrappingInfo(); > + > + // Convienences for dealing with machine loops. > + MachineBasicBlock* getTopLevelLoopPreheader(MachineLoop* LP); > + MachineLoop* getTopLevelLoopParent(MachineLoop *LP); > + > + // Propgate CSRs used in MBB to all MBBs of loop LP. > + void propagateUsesAroundLoop(MachineBasicBlock* MBB, > MachineLoop* LP); > + > + // Convenience for recognizing return blocks. > + bool isReturnBlock(MachineBasicBlock* MBB); > + > +#ifndef NDEBUG > + // Debugging methods. > + > + // Mark this function as having fast exit paths. > + void findFastExitPath(); > + > + // Verify placement of spills/restores. > + void verifySpillRestorePlacement(); > + > + std::string getBasicBlockName(const MachineBasicBlock* MBB); > + std::string stringifyCSRegSet(const CSRegSet& s); > + void dumpSet(const CSRegSet& s); > + void dumpUsed(MachineBasicBlock* MBB); > + void dumpAllUsed(); > + void dumpSets(MachineBasicBlock* MBB); > + void dumpSets1(MachineBasicBlock* MBB); > + void dumpAllSets(); > + void dumpSRSets(); > +#endif > + > + }; > +} // End llvm namespace > +#endif > > Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=71588&r1=71587&r2=71588&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) > +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue May 12 > 15:33:29 2009 > @@ -14,35 +14,14 @@ > // This pass must be run after register allocation. After this pass > is > // executed, it is illegal to construct MO_FrameIndex operands. > // > -// This pass implements a shrink wrapping variant of prolog/epilog > insertion: > -// - Places callee saved register (CSR) spills and restores in the > CFG to > -// tightly surround uses so that execution paths that do not use > CSRs do not > -// pay the spill/restore penalty. > -// > -// - Avoiding placment of spills/restores in loops: if a CSR is > used inside a > -// loop(nest), the spills are placed in the loop preheader, and > restores are > -// placed in the loop exit nodes (the successors of the loop > _exiting_ nodes). > -// > -// - Covering paths without CSR uses: e.g. if a restore is placed > in a join > -// block, a matching spill is added to the end of all immediate > predecessor > -// blocks that are not reached by a spill. Similarly for saves > placed in > -// branch blocks. > -// > -// Shrink wrapping uses an analysis similar to the one in GVNPRE to > determine > -// which basic blocks require callee-saved register save/restore > code. > -// > -// This pass uses MachineDominators and MachineLoopInfo. Loop > information > -// is used to prevent shrink wrapping of callee-saved register save/ > restore > -// code into loops. > +// This pass provides an optional shrink wrapping variant of prolog/ > epilog > +// insertion, enabled via --shrink-wrap. See ShrinkWrapping.cpp. > // > // > = > = > = > ----------------------------------------------------------------------= > ==// > > -#define DEBUG_TYPE "shrink-wrap" > - > -#include "llvm/CodeGen/Passes.h" > +#include "PEI.h" > #include "llvm/CodeGen/MachineDominators.h" > #include "llvm/CodeGen/MachineLoopInfo.h" > -#include "llvm/CodeGen/MachineFunctionPass.h" > #include "llvm/CodeGen/MachineInstr.h" > #include "llvm/CodeGen/MachineFrameInfo.h" > #include "llvm/CodeGen/MachineModuleInfo.h" > @@ -52,1009 +31,91 @@ > #include "llvm/Target/TargetRegisterInfo.h" > #include "llvm/Target/TargetFrameInfo.h" > #include "llvm/Target/TargetInstrInfo.h" > -#include "llvm/ADT/SparseBitVector.h" > -#include "llvm/ADT/DenseMap.h" > -#include "llvm/ADT/PostOrderIterator.h" > -#include "llvm/ADT/Statistic.h" > -#include "llvm/Support/CommandLine.h" > #include "llvm/Support/Compiler.h" > -#include "llvm/Support/Debug.h" > #include "llvm/ADT/STLExtras.h" > -#include "llvm/ADT/Statistic.h" > #include > -#include > > using namespace llvm; > > -STATISTIC(numSRReduced, "Number of CSR spills+restores reduced."); > - > -// Shrink Wrapping: > -static cl::opt > -ShrinkWrapping("shrink-wrap", > - cl::desc("Shrink wrap callee-saved register spills/ > restores")); > - > -// Shrink wrap only the specified function, a debugging aid. > -static cl::opt > -ShrinkWrapFunc("shrink-wrap-func", cl::Hidden, > - cl::desc("Shrink wrap the specified function"), > - cl::value_desc("funcname"), > - cl::init("")); > - > -// Debugging level for shrink wrapping. > -enum ShrinkWrapDebugLevel { > - None, BasicInfo, Iterations, Details > -}; > - > -static cl::opt > -ShrinkWrapDebugging("shrink-wrap-dbg", cl::Hidden, > - cl::desc("Print shrink wrapping debugging information"), > - cl::values( > - clEnumVal(None , "disable debug output"), > - clEnumVal(BasicInfo , "print basic DF sets"), > - clEnumVal(Iterations, "print SR sets for each iteration"), > - clEnumVal(Details , "print all DF sets"), > - clEnumValEnd)); > - > - > -namespace { > - struct VISIBILITY_HIDDEN PEI : public MachineFunctionPass { > - static char ID; > - PEI() : MachineFunctionPass(&ID) {} > - > - const char *getPassName() const { > - return "Prolog/Epilog Insertion & Frame Finalization"; > - } > - > - virtual void getAnalysisUsage(AnalysisUsage &AU) const { > - AU.setPreservesCFG(); > - if (ShrinkWrapping || ShrinkWrapFunc != "") { > - AU.addRequired(); > - AU.addRequired(); > - } > - AU.addPreserved(); > - AU.addPreserved(); > - MachineFunctionPass::getAnalysisUsage(AU); > - } > - > - /// runOnMachineFunction - Insert prolog/epilog code and > replace abstract > - /// frame indexes with appropriate references. > - /// > - bool runOnMachineFunction(MachineFunction &Fn) { > - const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo > (); > - RS = TRI->requiresRegisterScavenging(Fn) ? new RegScavenger > () : NULL; > - > - DEBUG(MF = &Fn); > - > - // Get MachineModuleInfo so that we can track the > construction of the > - // frame. > - if (MachineModuleInfo *MMI = > getAnalysisIfAvailable()) > - Fn.getFrameInfo()->setMachineModuleInfo(MMI); > - > - // Allow the target machine to make some adjustments to the > function > - // e.g. UsedPhysRegs before calculateCalleeSavedRegisters. > - TRI->processFunctionBeforeCalleeSavedScan(Fn, RS); > - > - // Scan the function for modified callee saved registers and > insert spill > - // code for any callee saved registers that are modified. > Also calculate > - // the MaxCallFrameSize and HasCalls variables for the > function's frame > - // information and eliminates call frame pseudo instructions. > - calculateCalleeSavedRegisters(Fn); > - > - // Determine placement of CSR spill/restore code: > - // - with shrink wrapping, place spills and restores to > tightly > - // enclose regions in the Machine CFG of the function where > - // they are used. Without shrink wrapping > - // - default (no shrink wrapping), place all spills in the > - // entry block, all restores in return blocks. > - placeCSRSpillsAndRestores(Fn); > - > - // Add the code to save and restore the callee saved registers > - insertCSRSpillsAndRestores(Fn); > - > - // Allow the target machine to make final modifications to > the function > - // before the frame layout is finalized. > - TRI->processFunctionBeforeFrameFinalized(Fn); > - > - // Calculate actual frame offsets for all abstract stack > objects... > - calculateFrameObjectOffsets(Fn); > - > - // Add prolog and epilog code to the function. This function > is required > - // to align the stack frame as necessary for any stack > variables or > - // called functions. Because of this, > calculateCalleeSavedRegisters > - // must be called before this function in order to set the > HasCalls > - // and MaxCallFrameSize variables. > - insertPrologEpilogCode(Fn); > - > - // Replace all MO_FrameIndex operands with physical register > references > - // and actual offsets. > - // > - replaceFrameIndices(Fn); > - > - delete RS; > - clearAllSets(); > - return true; > - } > - > - private: > - RegScavenger *RS; > - > - // MinCSFrameIndex, MaxCSFrameIndex - Keeps the range of callee > saved > - // stack frame indexes. > - unsigned MinCSFrameIndex, MaxCSFrameIndex; > - > - // Analysis info for spill/restore placement. > - // "CSR": "callee saved register". > - > - // CSRegSet contains indices into the Callee Saved Register Info > - // vector built by calculateCalleeSavedRegisters() and accessed > - // via MF.getFrameInfo()->getCalleeSavedInfo(). > - typedef SparseBitVector<> CSRegSet; > - > - // CSRegBlockMap maps MachineBasicBlocks to sets of callee > - // saved register indices. > - typedef DenseMap CSRegBlockMap; > - > - // Set and maps for computing CSR spill/restore placement: > - // used in function (UsedCSRegs) > - // used in a basic block (CSRUsed) > - // anticipatable in a basic block (Antic{In,Out}) > - // available in a basic block (Avail{In,Out}) > - // to be spilled at the entry to a basic block (CSRSave) > - // to be restored at the end of a basic block (CSRRestore) > - CSRegSet UsedCSRegs; > - CSRegBlockMap CSRUsed; > - CSRegBlockMap AnticIn, AnticOut; > - CSRegBlockMap AvailIn, AvailOut; > - CSRegBlockMap CSRSave; > - CSRegBlockMap CSRRestore; > - > - // Entry and return blocks of the current function. > - MachineBasicBlock* EntryBlock; > - SmallVector ReturnBlocks; > - > - // Map of MBBs to top level MachineLoops. > - DenseMap TLLoops; > - > - // Flag to control shrink wrapping per-function: > - // may choose to skip shrink wrapping for certain > - // functions. > - bool ShrinkWrapThisFunction; > - > -#ifndef NDEBUG > - // Machine function handle. > - MachineFunction* MF; > - > - // Flag indicating that the current function > - // has at least one "short" path in the machine > - // CFG from the entry block to an exit block. > - bool HasFastExitPath; > -#endif > - > - bool calculateSets(MachineFunction &Fn); > - bool calcAnticInOut(MachineBasicBlock* MBB); > - bool calcAvailInOut(MachineBasicBlock* MBB); > - void calculateAnticAvail(MachineFunction &Fn); > - bool addUsesForMEMERegion(MachineBasicBlock* MBB, > - SmallVector& > blks); > - bool addUsesForTopLevelLoops(SmallVector 4>& blks); > - bool calcSpillPlacements(MachineBasicBlock* MBB, > - SmallVector > &blks, > - CSRegBlockMap &prevSpills); > - bool calcRestorePlacements(MachineBasicBlock* MBB, > - SmallVector > &blks, > - CSRegBlockMap &prevRestores); > - void placeSpillsAndRestores(MachineFunction &Fn); > - void placeCSRSpillsAndRestores(MachineFunction &Fn); > - void calculateCalleeSavedRegisters(MachineFunction &Fn); > - void insertCSRSpillsAndRestores(MachineFunction &Fn); > - void calculateFrameObjectOffsets(MachineFunction &Fn); > - void replaceFrameIndices(MachineFunction &Fn); > - void insertPrologEpilogCode(MachineFunction &Fn); > - > - // Initialize DFA sets, called before iterations. > - void clearAnticAvailSets(); > - // Clear all sets constructed by shrink wrapping. > - void clearAllSets(); > - > - // Initialize all shrink wrapping data. > - void initShrinkWrappingInfo(); > - > - // Convienences for dealing with machine loops. > - MachineBasicBlock* getTopLevelLoopPreheader(MachineLoop* LP) { > - assert(LP && "Machine loop is NULL."); > - MachineBasicBlock* PHDR = LP->getLoopPreheader(); > - MachineLoop* PLP = LP->getParentLoop(); > - while (PLP) { > - PHDR = PLP->getLoopPreheader(); > - PLP = PLP->getParentLoop(); > - } > - return PHDR; > - } > - > - MachineLoop* getTopLevelLoopParent(MachineLoop *LP) { > - if (LP == 0) > - return 0; > - MachineLoop* PLP = LP->getParentLoop(); > - while (PLP) { > - LP = PLP; > - PLP = PLP->getParentLoop(); > - } > - return LP; > - } > - > - // Propgate CSRs used in MBB to all MBBs of loop LP. > - void propagateUsesAroundLoop(MachineBasicBlock* MBB, > MachineLoop* LP); > - > - // Convenience for recognizing return blocks. > - bool isReturnBlock(MachineBasicBlock* MBB) { > - return (MBB && !MBB->empty() && MBB->back().getDesc().isReturn > ()); > - } > - > -#ifndef NDEBUG > - // Debugging methods. > - > - // Mark this function as having fast exit paths. > - void findFastExitPath(); > - > - // Verify placement of spills/restores. > - void verifySpillRestorePlacement(); > - > - std::string getBasicBlockName(const MachineBasicBlock* MBB); > - std::string stringifyCSRegSet(const CSRegSet& s); > - void dumpSet(const CSRegSet& s); > - void dumpUsed(MachineBasicBlock* MBB); > - void dumpAllUsed(); > - void dumpSets(MachineBasicBlock* MBB); > - void dumpSets1(MachineBasicBlock* MBB); > - void dumpAllSets(); > - void dumpSRSets(); > -#endif > - > - }; > - char PEI::ID = 0; > -} > - > -// Initialize shrink wrapping DFA sets, called before iterations. > -void PEI::clearAnticAvailSets() { > - AnticIn.clear(); > - AnticOut.clear(); > - AvailIn.clear(); > - AvailOut.clear(); > -} > - > -// Clear all sets constructed by shrink wrapping. > -void PEI::clearAllSets() { > - ReturnBlocks.clear(); > - clearAnticAvailSets(); > - UsedCSRegs.clear(); > - CSRUsed.clear(); > - TLLoops.clear(); > - CSRSave.clear(); > - CSRRestore.clear(); > -} > - > -// Initialize all shrink wrapping data. > -void PEI::initShrinkWrappingInfo() { > - clearAllSets(); > - EntryBlock = 0; > -#ifndef NDEBUG > - HasFastExitPath = false; > -#endif > - ShrinkWrapThisFunction = ShrinkWrapping; > - // DEBUG: enable or disable shrink wrapping for the current > function > - // via --shrink-wrap-func=. > -#ifndef NDEBUG > - if (ShrinkWrapFunc != "") { > - std::string MFName = MF->getFunction()->getName(); > - ShrinkWrapThisFunction = (MFName == ShrinkWrapFunc); > - } > -#endif > -} > +char PEI::ID = 0; > > +static RegisterPass > +X("prologepilog", "Prologue/Epilogue Insertion"); > > /// createPrologEpilogCodeInserter - This function returns a pass > that inserts > /// prolog and epilog code, and eliminates abstract frame references. > /// > FunctionPass *llvm::createPrologEpilogCodeInserter() { return new PEI > (); } > > -/// placeCSRSpillsAndRestores - determine which MBBs of the function > -/// need save, restore code for callee-saved registers by doing a > DF analysis > -/// similar to the one used in code motion (GVNPRE). This produces > maps of MBBs > -/// to sets of registers (CSRs) for saves and restores. > MachineLoopInfo > -/// is used to ensure that CSR save/restore code is not placed > inside loops. > -/// This function computes the maps of MBBs -> CSRs to spill and > restore > -/// in CSRSave, CSRRestore. > -/// > -/// If shrink wrapping is not being performed, place all spills in > -/// the entry block, all restores in return blocks. In this case, > -/// CSRSave has a single mapping, CSRRestore has mappings for each > -/// return block. > -/// > -void PEI::placeCSRSpillsAndRestores(MachineFunction &Fn) { > - > - initShrinkWrappingInfo(); > - > - DEBUG(if (ShrinkWrapThisFunction) { > - DOUT << "Place CSR spills/restores for " > - << MF->getFunction()->getName() << "\n"; > - }); > - > - if (calculateSets(Fn)) > - placeSpillsAndRestores(Fn); > -} > - > -/// calcAnticInOut - calculate the anticipated in/out reg sets > -/// for the given MBB by looking forward in the MCFG at MBB's > -/// successors. > -/// > -bool PEI::calcAnticInOut(MachineBasicBlock* MBB) { > - bool changed = false; > - > - // AnticOut[MBB] = INTERSECT(AnticIn[S] for S in SUCCESSORS(MBB)) > - SmallVector successors; > - for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > - SE = MBB->succ_end(); SI != SE; ++SI) { > - MachineBasicBlock* SUCC = *SI; > - if (SUCC != MBB) > - successors.push_back(SUCC); > - } > - > - unsigned i = 0, e = successors.size(); > - if (i != e) { > - CSRegSet prevAnticOut = AnticOut[MBB]; > - MachineBasicBlock* SUCC = successors[i]; > - > - AnticOut[MBB] = AnticIn[SUCC]; > - for (++i; i != e; ++i) { > - SUCC = successors[i]; > - AnticOut[MBB] &= AnticIn[SUCC]; > - } > - if (prevAnticOut != AnticOut[MBB]) > - changed = true; > - } > - > - // AnticIn[MBB] = UNION(CSRUsed[MBB], AnticOut[MBB]); > - CSRegSet prevAnticIn = AnticIn[MBB]; > - AnticIn[MBB] = CSRUsed[MBB] | AnticOut[MBB]; > - if (prevAnticIn |= AnticIn[MBB]) > - changed = true; > - return changed; > -} > - > -/// calcAvailInOut - calculate the available in/out reg sets > -/// for the given MBB by looking backward in the MCFG at MBB's > -/// predecessors. > -/// > -bool PEI::calcAvailInOut(MachineBasicBlock* MBB) { > - bool changed = false; > - > - // AvailIn[MBB] = INTERSECT(AvailOut[P] for P in PREDECESSORS(MBB)) > - SmallVector predecessors; > - for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > - PE = MBB->pred_end(); PI != PE; ++PI) { > - MachineBasicBlock* PRED = *PI; > - if (PRED != MBB) > - predecessors.push_back(PRED); > - } > - > - unsigned i = 0, e = predecessors.size(); > - if (i != e) { > - CSRegSet prevAvailIn = AvailIn[MBB]; > - MachineBasicBlock* PRED = predecessors[i]; > - > - AvailIn[MBB] = AvailOut[PRED]; > - for (++i; i != e; ++i) { > - PRED = predecessors[i]; > - AvailIn[MBB] &= AvailOut[PRED]; > - } > - if (prevAvailIn != AvailIn[MBB]) > - changed = true; > - } > - > - // AvailOut[MBB] = UNION(CSRUsed[MBB], AvailIn[MBB]); > - CSRegSet prevAvailOut = AvailOut[MBB]; > - AvailOut[MBB] = CSRUsed[MBB] | AvailIn[MBB]; > - if (prevAvailOut |= AvailOut[MBB]) > - changed = true; > - return changed; > -} > - > -/// calculateAnticAvail - build the sets anticipated and available > -/// registers in the MCFG of the current function iteratively, > -/// doing a combined forward and backward analysis. > +/// runOnMachineFunction - Insert prolog/epilog code and replace > abstract > +/// frame indexes with appropriate references. > /// > -void PEI::calculateAnticAvail(MachineFunction &Fn) { > - // Initialize data flow sets. > - clearAnticAvailSets(); > - > - // Calulate Antic{In,Out} and Avail{In,Out} iteratively on the > MCFG. > - bool changed = true; > - unsigned iterations = 0; > - while (changed) { > - changed = false; > - ++iterations; > - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end > (); > - MBBI != MBBE; ++MBBI) { > - MachineBasicBlock* MBB = MBBI; > - > - // Calculate anticipated in, out regs at MBB from > - // anticipated at successors of MBB. > - changed |= calcAnticInOut(MBB); > - > - // Calculate available in, out regs at MBB from > - // available at predecessors of MBB. > - changed |= calcAvailInOut(MBB); > - } > - } > - > - DEBUG(if (ShrinkWrapDebugging >= Details) { > - DOUT << > "-----------------------------------------------------------\n"; > - DOUT << " Antic/Avail Sets:\n"; > - DOUT << > "-----------------------------------------------------------\n"; > - DOUT << "iterations = " << iterations << "\n"; > - DOUT << > "-----------------------------------------------------------\n"; > - DOUT << "MBB | USED | ANTIC_IN | ANTIC_OUT | AVAIL_IN | > AVAIL_OUT\n"; > - DOUT << > "-----------------------------------------------------------\n"; > - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = > Fn.end(); > - MBBI != MBBE; ++MBBI) { > - MachineBasicBlock* MBB = MBBI; > - dumpSets(MBB); > - } > - DOUT << > "-----------------------------------------------------------\n"; > - }); > -} > - > -/// propagateUsesAroundLoop - copy used register info from MBB to > all blocks > -/// of the loop given by LP and its parent loops. This prevents > spills/restores > -/// from being placed in the bodies of loops. > -/// > -void PEI::propagateUsesAroundLoop(MachineBasicBlock* MBB, > MachineLoop* LP) { > - if (! MBB || !LP) > - return; > - > - std::vector loopBlocks = LP->getBlocks(); > - for (unsigned i = 0, e = loopBlocks.size(); i != e; ++i) { > - MachineBasicBlock* LBB = loopBlocks[i]; > - if (LBB == MBB) > - continue; > - if (CSRUsed[LBB].contains(CSRUsed[MBB])) > - continue; > - CSRUsed[LBB] |= CSRUsed[MBB]; > - } > -} > - > -/// calculateSets - collect the CSRs used in this function, compute > -/// the DF sets that describe the initial minimal regions in the > -/// Machine CFG around which CSR spills and restores must be placed. > -/// > -/// Additionally, this function decides if shrink wrapping should > -/// be disabled for the current function, checking the following: > -/// 1. the current function has more than 500 MBBs: heuristic limit > -/// on function size to reduce compile time impact of the current > -/// iterative algorithm. > -/// 2. all CSRs are used in the entry block. > -/// 3. all CSRs are used in all immediate successors of the entry > block. > -/// 4. all CSRs are used in a subset of blocks, each of which > dominates > -/// all return blocks. These blocks, taken as a subgraph of the > MCFG, > -/// are equivalent to the entry block since all execution paths > pass > -/// through them. > -/// > -bool PEI::calculateSets(MachineFunction &Fn) { > - // Sets used to compute spill, restore placement sets. > - const std::vector CSI = > - Fn.getFrameInfo()->getCalleeSavedInfo(); > - > - // If no CSRs used, we are done. > - if (CSI.empty()) { > - DEBUG(if (ShrinkWrapThisFunction) > - DOUT << "DISABLED: " << Fn.getFunction()->getName() > - << ": uses no callee-saved registers\n"); > - return false; > - } > - > - // Save refs to entry and return blocks. > - EntryBlock = Fn.begin(); > - for (MachineFunction::iterator MBB = Fn.begin(), E = Fn.end(); > - MBB != E; ++MBB) > - if (isReturnBlock(MBB)) > - ReturnBlocks.push_back(MBB); > - > - // Determine if this function has fast exit paths. > - DEBUG(if (ShrinkWrapThisFunction) > - findFastExitPath()); > - > - // Limit shrink wrapping via the current iterative bit vector > - // implementation to functions with <= 500 MBBs. > - if (Fn.size() > 500) { > - DEBUG(if (ShrinkWrapThisFunction) > - DOUT << "DISABLED: " << Fn.getFunction()->getName() > - << ": too large (" << Fn.size() << " MBBs)\n"); > - ShrinkWrapThisFunction = false; > - } > - > - // Return now if not shrink wrapping. > - if (! ShrinkWrapThisFunction) > - return false; > - > - // Collect set of used CSRs. > - for (unsigned inx = 0, e = CSI.size(); inx != e; ++inx) { > - UsedCSRegs.set(inx); > - } > - > - // Walk instructions in all MBBs, create CSRUsed[] sets, choose > - // whether or not to shrink wrap this function. > - MachineLoopInfo &LI = getAnalysis(); > - MachineDominatorTree &DT = getAnalysis(); > +bool PEI::runOnMachineFunction(MachineFunction &Fn) { > const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo(); > + RS = TRI->requiresRegisterScavenging(Fn) ? new RegScavenger() : > NULL; > > - bool allCSRUsesInEntryBlock = true; > - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); > - MBBI != MBBE; ++MBBI) { > - MachineBasicBlock* MBB = MBBI; > - for (MachineBasicBlock::iterator I = MBB->begin(); I != MBB->end > (); ++I) { > - for (unsigned inx = 0, e = CSI.size(); inx != e; ++inx) { > - unsigned Reg = CSI[inx].getReg(); > - // If instruction I reads or modifies Reg, add it to > UsedCSRegs, > - // CSRUsed map for the current block. > - for (unsigned opInx = 0, opEnd = I->getNumOperands(); > - opInx != opEnd; ++opInx) { > - const MachineOperand &MO = I->getOperand(opInx); > - if (! (MO.isReg() && (MO.isUse() || MO.isDef()))) > - continue; > - unsigned MOReg = MO.getReg(); > - if (!MOReg) > - continue; > - if (MOReg == Reg || > - (TargetRegisterInfo::isPhysicalRegister(MOReg) && > - TargetRegisterInfo::isPhysicalRegister(Reg) && > - TRI->isSubRegister(Reg, MOReg))) { > - // CSR Reg is defined/used in block MBB. > - CSRUsed[MBB].set(inx); > - // Check for uses in EntryBlock. > - if (MBB != EntryBlock) > - allCSRUsesInEntryBlock = false; > - } > - } > - } > - } > - > - if (CSRUsed[MBB].empty()) > - continue; > - > - // Propagate CSRUsed[MBB] in loops > - if (MachineLoop* LP = LI.getLoopFor(MBB)) { > - // Add top level loop to work list. > - MachineBasicBlock* HDR = getTopLevelLoopPreheader(LP); > - MachineLoop* PLP = getTopLevelLoopParent(LP); > - > - if (! HDR) { > - HDR = PLP->getHeader(); > - assert(HDR->pred_size() > 0 && "Loop header has no > predecessors?"); > - MachineBasicBlock::pred_iterator PI = HDR->pred_begin(); > - HDR = *PI; > - } > - TLLoops[HDR] = PLP; > - > - // Push uses from inside loop to its parent loops, > - // or to all other MBBs in its loop. > - if (LP->getLoopDepth() > 1) { > - for (MachineLoop* PLP = LP->getParentLoop(); PLP; > - PLP = PLP->getParentLoop()) { > - propagateUsesAroundLoop(MBB, PLP); > - } > - } else { > - propagateUsesAroundLoop(MBB, LP); > - } > - } > - } > - > - if (allCSRUsesInEntryBlock) { > - DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() > - << ": all CSRs used in EntryBlock\n"); > - ShrinkWrapThisFunction = false; > - } else { > - bool allCSRsUsedInEntryFanout = true; > - for (MachineBasicBlock::succ_iterator SI = EntryBlock- > >succ_begin(), > - SE = EntryBlock->succ_end(); SI != SE; ++SI) { > - MachineBasicBlock* SUCC = *SI; > - if (CSRUsed[SUCC] != UsedCSRegs) > - allCSRsUsedInEntryFanout = false; > - } > - if (allCSRsUsedInEntryFanout) { > - DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() > - << ": all CSRs used in imm successors of EntryBlock\n"); > - ShrinkWrapThisFunction = false; > - } > - } > - > - if (ShrinkWrapThisFunction) { > - // Check if MBB uses CSRs and dominates all exit nodes. > - // Such nodes are equiv. to the entry node w.r.t. > - // CSR uses: every path through the function must > - // pass through this node. If each CSR is used at least > - // once by these nodes, shrink wrapping is disabled. > - CSRegSet CSRUsedInChokePoints; > - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end > (); > - MBBI != MBBE; ++MBBI) { > - MachineBasicBlock* MBB = MBBI; > - if (MBB == EntryBlock || CSRUsed[MBB].empty() || MBB- > >succ_size() < 1) > - continue; > - bool dominatesExitNodes = true; > - for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) > - if (! DT.dominates(MBB, ReturnBlocks[ri])) { > - dominatesExitNodes = false; > - break; > - } > - if (dominatesExitNodes) { > - CSRUsedInChokePoints |= CSRUsed[MBB]; > - if (CSRUsedInChokePoints == UsedCSRegs) { > - DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() > - << ": all CSRs used in choke point(s) at " > - << getBasicBlockName(MBB) << "\n"); > - ShrinkWrapThisFunction = false; > - break; > - } > - } > - } > - } > + // Get MachineModuleInfo so that we can track the construction of > the > + // frame. > + if (MachineModuleInfo *MMI = > getAnalysisIfAvailable()) > + Fn.getFrameInfo()->setMachineModuleInfo(MMI); > + > + // Allow the target machine to make some adjustments to the > function > + // e.g. UsedPhysRegs before calculateCalleeSavedRegisters. > + TRI->processFunctionBeforeCalleeSavedScan(Fn, RS); > + > + // Scan the function for modified callee saved registers and > insert spill > + // code for any callee saved registers that are modified. Also > calculate > + // the MaxCallFrameSize and HasCalls variables for the function's > frame > + // information and eliminates call frame pseudo instructions. > + calculateCalleeSavedRegisters(Fn); > + > + // Determine placement of CSR spill/restore code: > + // - with shrink wrapping, place spills and restores to tightly > + // enclose regions in the Machine CFG of the function where > + // they are used. Without shrink wrapping > + // - default (no shrink wrapping), place all spills in the > + // entry block, all restores in return blocks. > + placeCSRSpillsAndRestores(Fn); > + > + // Add the code to save and restore the callee saved registers > + insertCSRSpillsAndRestores(Fn); > + > + // Allow the target machine to make final modifications to the > function > + // before the frame layout is finalized. > + TRI->processFunctionBeforeFrameFinalized(Fn); > + > + // Calculate actual frame offsets for all abstract stack objects... > + calculateFrameObjectOffsets(Fn); > + > + // Add prolog and epilog code to the function. This function is > required > + // to align the stack frame as necessary for any stack variables or > + // called functions. Because of this, > calculateCalleeSavedRegisters > + // must be called before this function in order to set the HasCalls > + // and MaxCallFrameSize variables. > + insertPrologEpilogCode(Fn); > > - // Return now if we have decided not to apply shrink wrapping > - // to the current function. > - if (! ShrinkWrapThisFunction) > - return false; > - > - DEBUG({ > - DOUT << "ENABLED: " << Fn.getFunction()->getName(); > - if (HasFastExitPath) > - DOUT << " (fast exit path)"; > - DOUT << "\n"; > - if (ShrinkWrapDebugging >= BasicInfo) { > - DOUT << "------------------------------" > - << "-----------------------------\n"; > - DOUT << "UsedCSRegs = " << stringifyCSRegSet(UsedCSRegs) << > "\n"; > - if (ShrinkWrapDebugging >= Details) { > - DOUT << "------------------------------" > - << "-----------------------------\n"; > - dumpAllUsed(); > - } > - } > - }); > - > - // Build initial DF sets to determine minimal regions in the > - // Machine CFG around which CSRs must be spilled and restored. > - calculateAnticAvail(Fn); > + // Replace all MO_FrameIndex operands with physical register > references > + // and actual offsets. > + // > + replaceFrameIndices(Fn); > > + delete RS; > + clearAllSets(); > return true; > } > > -/// addUsesForMEMERegion - add uses of CSRs spilled or restored in > -/// multi-entry, multi-exit (MEME) regions so spill and restore > -/// placement will not break code that enters or leaves a > -/// shrink-wrapped region by inducing spills with no matching > -/// restores or restores with no matching spills. A MEME region > -/// is a subgraph of the MCFG with multiple entry edges, multiple > -/// exit edges, or both. This code propagates use information > -/// through the MCFG until all paths requiring spills and restores > -/// _outside_ the computed minimal placement regions have been > covered. > -/// > -bool PEI::addUsesForMEMERegion(MachineBasicBlock* MBB, > - SmallVector& > blks) { > - if (MBB->succ_size() < 2 && MBB->pred_size() < 2) { > - bool processThisBlock = false; > - for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > - SE = MBB->succ_end(); SI != SE; ++SI) { > - MachineBasicBlock* SUCC = *SI; > - if (SUCC->pred_size() > 1) { > - processThisBlock = true; > - break; > - } > - } > - if (!CSRRestore[MBB].empty() && MBB->succ_size() > 0) { > - for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > - PE = MBB->pred_end(); PI != PE; ++PI) { > - MachineBasicBlock* PRED = *PI; > - if (PRED->succ_size() > 1) { > - processThisBlock = true; > - break; > - } > - } > - } > - if (! processThisBlock) > - return false; > - } > - > - CSRegSet prop; > - if (!CSRSave[MBB].empty()) > - prop = CSRSave[MBB]; > - else if (!CSRRestore[MBB].empty()) > - prop = CSRRestore[MBB]; > - else > - prop = CSRUsed[MBB]; > - if (prop.empty()) > - return false; > - > - // Propagate selected bits to successors, predecessors of MBB. > - bool addedUses = false; > - for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > - SE = MBB->succ_end(); SI != SE; ++SI) { > - MachineBasicBlock* SUCC = *SI; > - // Self-loop > - if (SUCC == MBB) > - continue; > - if (! CSRUsed[SUCC].contains(prop)) { > - CSRUsed[SUCC] |= prop; > - addedUses = true; > - blks.push_back(SUCC); > - DEBUG(if (ShrinkWrapDebugging >= Iterations) > - DOUT << getBasicBlockName(MBB) > - << "(" << stringifyCSRegSet(prop) << ")->" > - << "successor " << getBasicBlockName(SUCC) << > "\n"); > - } > - } > - for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > - PE = MBB->pred_end(); PI != PE; ++PI) { > - MachineBasicBlock* PRED = *PI; > - // Self-loop > - if (PRED == MBB) > - continue; > - if (! CSRUsed[PRED].contains(prop)) { > - CSRUsed[PRED] |= prop; > - addedUses = true; > - blks.push_back(PRED); > - DEBUG(if (ShrinkWrapDebugging >= Iterations) > - DOUT << getBasicBlockName(MBB) > - << "(" << stringifyCSRegSet(prop) << ")->" > - << "predecessor " << getBasicBlockName(PRED) << > "\n"); > - } > - } > - return addedUses; > -} > - > -/// addUsesForTopLevelLoops - add uses for CSRs used inside top > -/// level loops to the exit blocks of those loops. > -/// > -bool PEI::addUsesForTopLevelLoops(SmallVector 4>& blks) { > - bool addedUses = false; > - > - // Place restores for top level loops where needed. > - for (DenseMap::iterator > - I = TLLoops.begin(), E = TLLoops.end(); I != E; ++I) { > - MachineBasicBlock* MBB = I->first; > - MachineLoop* LP = I->second; > - MachineBasicBlock* HDR = LP->getHeader(); > - SmallVector exitBlocks; > - CSRegSet loopSpills; > - > - loopSpills = CSRSave[MBB]; > - if (CSRSave[MBB].empty()) { > - loopSpills = CSRUsed[HDR]; > - assert(!loopSpills.empty() && "No CSRs used in loop?"); > - } else if (CSRRestore[MBB].contains(CSRSave[MBB])) > - continue; > - > - LP->getExitBlocks(exitBlocks); > - assert(exitBlocks.size() > 0 && "Loop has no top level exit > blocks?"); > - for (unsigned i = 0, e = exitBlocks.size(); i != e; ++i) { > - MachineBasicBlock* EXB = exitBlocks[i]; > - if (! CSRUsed[EXB].contains(loopSpills)) { > - CSRUsed[EXB] |= loopSpills; > - addedUses = true; > - DEBUG(if (ShrinkWrapDebugging >= Iterations) > - DOUT << "LOOP " << getBasicBlockName(MBB) > - << "(" << stringifyCSRegSet(loopSpills) << ")->" > - << getBasicBlockName(EXB) << "\n"); > - if (EXB->succ_size() > 1 || EXB->pred_size() > 1) > - blks.push_back(EXB); > - } > - } > - } > - return addedUses; > -} > - > -/// calcSpillPlacements - determine which CSRs should be spilled > -/// in MBB using AnticIn sets of MBB's predecessors, keeping track > -/// of changes to spilled reg sets. Add MBB to the set of blocks > -/// that need to be processed for propagating use info to cover > -/// multi-entry/exit regions. > -/// > -bool PEI::calcSpillPlacements(MachineBasicBlock* MBB, > - SmallVector > &blks, > - CSRegBlockMap &prevSpills) { > - bool placedSpills = false; > - // Intersect (CSRegs - AnticIn[P]) for P in Predecessors(MBB) > - CSRegSet anticInPreds; > - SmallVector predecessors; > - for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > - PE = MBB->pred_end(); PI != PE; ++PI) { > - MachineBasicBlock* PRED = *PI; > - if (PRED != MBB) > - predecessors.push_back(PRED); > - } > - unsigned i = 0, e = predecessors.size(); > - if (i != e) { > - MachineBasicBlock* PRED = predecessors[i]; > - anticInPreds = UsedCSRegs - AnticIn[PRED]; > - for (++i; i != e; ++i) { > - PRED = predecessors[i]; > - anticInPreds &= (UsedCSRegs - AnticIn[PRED]); > - } > - } else { > - // Handle uses in entry blocks (which have no predecessors). > - // This is necessary because the DFA formulation assumes the > - // entry and (multiple) exit nodes cannot have CSR uses, which > - // is not the case in the real world. > - anticInPreds = UsedCSRegs; > - } > - // Compute spills required at MBB: > - CSRSave[MBB] |= (AnticIn[MBB] - AvailIn[MBB]) & anticInPreds; > - > - if (! CSRSave[MBB].empty()) { > - if (MBB == EntryBlock) { > - for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) > - CSRRestore[ReturnBlocks[ri]] |= CSRSave[MBB]; > - } else { > - // Reset all regs spilled in MBB that are also spilled in > EntryBlock. > - if (CSRSave[EntryBlock].intersects(CSRSave[MBB])) { > - CSRSave[MBB] = CSRSave[MBB] - CSRSave[EntryBlock]; > - } > - } > - } > - placedSpills = (CSRSave[MBB] != prevSpills[MBB]); > - prevSpills[MBB] = CSRSave[MBB]; > - // Remember this block for adding restores to successor > - // blocks for multi-entry region. > - if (placedSpills) > - blks.push_back(MBB); > - > - DEBUG(if (! CSRSave[MBB].empty() && ShrinkWrapDebugging >= > Iterations) > - DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(CSRSave[MBB]) << "\n"); > - > - return placedSpills; > -} > - > -/// calcRestorePlacements - determine which CSRs should be restored > -/// in MBB using AvailOut sets of MBB's succcessors, keeping track > -/// of changes to restored reg sets. Add MBB to the set of blocks > -/// that need to be processed for propagating use info to cover > -/// multi-entry/exit regions. > -/// > -bool PEI::calcRestorePlacements(MachineBasicBlock* MBB, > - SmallVector > &blks, > - CSRegBlockMap &prevRestores) { > - bool placedRestores = false; > - // Intersect (CSRegs - AvailOut[S]) for S in Successors(MBB) > - CSRegSet availOutSucc; > - SmallVector successors; > - for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > - SE = MBB->succ_end(); SI != SE; ++SI) { > - MachineBasicBlock* SUCC = *SI; > - if (SUCC != MBB) > - successors.push_back(SUCC); > - } > - unsigned i = 0, e = successors.size(); > - if (i != e) { > - MachineBasicBlock* SUCC = successors[i]; > - availOutSucc = UsedCSRegs - AvailOut[SUCC]; > - for (++i; i != e; ++i) { > - SUCC = successors[i]; > - availOutSucc &= (UsedCSRegs - AvailOut[SUCC]); > - } > - } else { > - if (! CSRUsed[MBB].empty() || ! AvailOut[MBB].empty()) { > - // Handle uses in return blocks (which have no successors). > - // This is necessary because the DFA formulation assumes the > - // entry and (multiple) exit nodes cannot have CSR uses, which > - // is not the case in the real world. > - availOutSucc = UsedCSRegs; > - } > - } > - // Compute restores required at MBB: > - CSRRestore[MBB] |= (AvailOut[MBB] - AnticOut[MBB]) & availOutSucc; > - > - // Postprocess restore placements at MBB. > - // Remove the CSRs that are restored in the return blocks. > - // Lest this be confusing, note that: > - // CSRSave[EntryBlock] == CSRRestore[B] for all B in ReturnBlocks. > - if (MBB->succ_size() && ! CSRRestore[MBB].empty()) { > - if (! CSRSave[EntryBlock].empty()) > - CSRRestore[MBB] = CSRRestore[MBB] - CSRSave[EntryBlock]; > - } > - placedRestores = (CSRRestore[MBB] != prevRestores[MBB]); > - prevRestores[MBB] = CSRRestore[MBB]; > - // Remember this block for adding saves to predecessor > - // blocks for multi-entry region. > - if (placedRestores) > - blks.push_back(MBB); > - > - DEBUG(if (! CSRRestore[MBB].empty() && ShrinkWrapDebugging >= > Iterations) > - DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(CSRRestore[MBB]) << "\n"); > - > - return placedRestores; > -} > - > -/// placeSpillsAndRestores - place spills and restores of CSRs > -/// used in MBBs in minimal regions that contain the uses. > -/// > -void PEI::placeSpillsAndRestores(MachineFunction &Fn) { > - CSRegBlockMap prevCSRSave; > - CSRegBlockMap prevCSRRestore; > - SmallVector cvBlocks, ncvBlocks; > - bool changed = true; > - unsigned iterations = 0; > - > - // Iterate computation of spill and restore placements in the > MCFG until: > - // 1. CSR use info has been fully propagated around the MCFG, and > - // 2. computation of CSRSave[], CSRRestore[] reach fixed points. > - while (changed) { > - changed = false; > - ++iterations; > - > - DEBUG(if (ShrinkWrapDebugging >= Iterations) > - DOUT << "iter " << iterations > - << " > --------------------------------------------------\n"); > - > - // Calculate CSR{Save,Restore} sets using Antic, Avail on the > MCFG, > - // which determines the placements of spills and restores. > - // Keep track of changes to spills, restores in each iteration to > - // minimize the total iterations. > - bool SRChanged = false; > - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end > (); > - MBBI != MBBE; ++MBBI) { > - MachineBasicBlock* MBB = MBBI; > - > - // Place spills for CSRs in MBB. > - SRChanged |= calcSpillPlacements(MBB, cvBlocks, prevCSRSave); > - > - // Place restores for CSRs in MBB. > - SRChanged |= calcRestorePlacements(MBB, cvBlocks, > prevCSRRestore); > - } > - > - // Add uses of CSRs used inside loops where needed. > - changed |= addUsesForTopLevelLoops(cvBlocks); > - > - // Add uses for CSRs spilled or restored at branch, join points. > - if (changed || SRChanged) { > - while (! cvBlocks.empty()) { > - MachineBasicBlock* MBB = cvBlocks.pop_back_val(); > - changed |= addUsesForMEMERegion(MBB, ncvBlocks); > - } > - if (! ncvBlocks.empty()) { > - cvBlocks = ncvBlocks; > - ncvBlocks.clear(); > - } > - } > - > - if (changed) { > - calculateAnticAvail(Fn); > - CSRSave.clear(); > - CSRRestore.clear(); > - } > - } > - > - // Check for effectiveness: > - // SR0 = {r | r in CSRSave[EntryBlock], CSRRestore[RB], RB in > ReturnBlocks} > - // numSRReduced = |(UsedCSRegs - SR0)|, approx. SR0 by CSRSave > [EntryBlock] > - // Gives a measure of how many CSR spills have been moved from > EntryBlock > - // to minimal regions enclosing their uses. > - CSRegSet notSpilledInEntryBlock = (UsedCSRegs - CSRSave > [EntryBlock]); > - unsigned numSRReducedThisFunc = notSpilledInEntryBlock.count(); > - numSRReduced += numSRReducedThisFunc; > - DEBUG(if (ShrinkWrapDebugging >= BasicInfo) { > - DOUT << > "-----------------------------------------------------------\n"; > - DOUT << "total iterations = " << iterations << " ( " > - << Fn.getFunction()->getName() > - << " " << numSRReducedThisFunc > - << " " << Fn.size() > - << " )\n"; > - DOUT << > "-----------------------------------------------------------\n"; > - dumpSRSets(); > - DOUT << > "-----------------------------------------------------------\n"; > - if (numSRReducedThisFunc) > - verifySpillRestorePlacement(); > - }); > +#if 0 > +void PEI::getAnalysisUsage(AnalysisUsage &AU) const { > + AU.setPreservesCFG(); > + if (ShrinkWrapping || ShrinkWrapFunc != "") { > + AU.addRequired(); > + AU.addRequired(); > + } > + AU.addPreserved(); > + AU.addPreserved(); > + MachineFunctionPass::getAnalysisUsage(AU); > } > +#endif > > /// calculateCalleeSavedRegisters - Scan the function for modified > callee saved > /// registers. Also calculate the MaxCallFrameSize and HasCalls > variables for > @@ -1190,10 +251,6 @@ > const TargetInstrInfo &TII = *Fn.getTarget().getInstrInfo(); > MachineBasicBlock::iterator I; > > - DEBUG(if (ShrinkWrapThisFunction && ShrinkWrapDebugging >= Details) > - DOUT << "Inserting CSR spills/restores in function " > - << Fn.getFunction()->getName() << "\n"); > - > if (! ShrinkWrapThisFunction) { > // Spill using target interface. > I = EntryBlock->begin(); > @@ -1258,10 +315,6 @@ > if (save.empty()) > continue; > > - DEBUG(if (ShrinkWrapDebugging >= Details) > - DOUT << "Spilling " << stringifyCSRegSet(save) > - << " in " << getBasicBlockName(MBB) << "\n"); > - > blockCSI.clear(); > for (CSRegSet::iterator RI = save.begin(), > RE = save.end(); RI != RE; ++RI) { > @@ -1286,10 +339,6 @@ > } > } > > - DEBUG(if (ShrinkWrapDebugging >= Details) > - DOUT << "------------------------------" > - << "-----------------------------\n"); > - > for (CSRegBlockMap::iterator BI = CSRRestore.begin(), > BE = CSRRestore.end(); BI != BE; ++BI) { > MachineBasicBlock* MBB = BI->first; > @@ -1298,10 +347,6 @@ > if (restore.empty()) > continue; > > - DEBUG(if (ShrinkWrapDebugging >= Details) > - DOUT << "Restoring " << stringifyCSRegSet(restore) > - << " in " << getBasicBlockName(MBB) << "\n"); > - > blockCSI.clear(); > for (CSRegSet::iterator RI = restore.begin(), > RE = restore.end(); RI != RE; ++RI) { > @@ -1351,10 +396,6 @@ > } > } > } > - > - DEBUG(if (ShrinkWrapDebugging >= Details) > - DOUT << "------------------------------" > - << "-----------------------------\n"); > } > > /// AdjustStackOffset - Helper function used to adjust the stack > frame offset. > @@ -1636,284 +677,3 @@ > } > } > > -// Debugging methods for shrink wrapping. > -#ifndef NDEBUG > -/// findFastExitPath - debugging method used to detect functions > -/// with at least one path from the entry block to a return block > -/// directly or which has a very small number of edges. > -/// > -void PEI::findFastExitPath() { > - if (! EntryBlock) > - return; > - // Fina a path from EntryBlock to any return block that does not > branch: > - // Entry > - // | ... > - // v | > - // B1<-----+ > - // | > - // v > - // Return > - for (MachineBasicBlock::succ_iterator SI = EntryBlock->succ_begin > (), > - SE = EntryBlock->succ_end(); SI != SE; ++SI) { > - MachineBasicBlock* SUCC = *SI; > - > - // Assume positive, disprove existence of fast path. > -#ifndef NDEBUG > - HasFastExitPath = true; > -#endif > - > - // Check the immediate successors. > - if (isReturnBlock(SUCC)) { > - if (ShrinkWrapDebugging >= BasicInfo) > - DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) > - << "->" << getBasicBlockName(SUCC) << "\n"; > - break; > - } > - // Traverse df from SUCC, look for a branch block. > - std::string exitPath = getBasicBlockName(SUCC); > - for (df_iterator BI = df_begin(SUCC), > - BE = df_end(SUCC); BI != BE; ++BI) { > - MachineBasicBlock* SBB = *BI; > - // Reject paths with branch nodes. > - if (SBB->succ_size() > 1) { > -#ifndef NDEBUG > - HasFastExitPath = false; > -#endif > - break; > - } > - exitPath += "->" + getBasicBlockName(SBB); > - } > -#ifndef NDEBUG > - if (HasFastExitPath) { > -#endif > - if (ShrinkWrapDebugging >= BasicInfo) > - DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) > - << "->" << exitPath << "\n"; > - break; > -#ifndef NDEBUG > - } > -#endif > - } > -} > - > -/// verifySpillRestorePlacement - check the current spill/restore > -/// sets for safety. Attempt to find spills without restores or > -/// restores without spills. > -/// Spills: walk df from each MBB in spill set ensuring that > -/// all CSRs spilled at MMBB are restored on all paths > -/// from MBB to all exit blocks. > -/// Restores: walk idf from each MBB in restore set ensuring that > -/// all CSRs restored at MBB are spilled on all paths > -/// reaching MBB. > -/// > -void PEI::verifySpillRestorePlacement() { > - unsigned numReturnBlocks = 0; > - for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF->end > (); > - MBBI != MBBE; ++MBBI) { > - MachineBasicBlock* MBB = MBBI; > - if (isReturnBlock(MBB) || MBB->succ_size() == 0) > - ++numReturnBlocks; > - } > - for (CSRegBlockMap::iterator BI = CSRSave.begin(), > - BE = CSRSave.end(); BI != BE; ++BI) { > - MachineBasicBlock* MBB = BI->first; > - CSRegSet spilled = BI->second; > - CSRegSet restored; > - > - if (spilled.empty()) > - continue; > - > - DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(spilled) > - << " RESTORE[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; > - > - if (CSRRestore[MBB].intersects(spilled)) { > - restored |= (CSRRestore[MBB] & spilled); > - } > - > - // Walk depth first from MBB to find restores of all CSRs > spilled at MBB: > - // we must find restores for all spills w/no intervening spills > on all > - // paths from MBB to all return blocks. > - for (df_iterator BI = df_begin(MBB), > - BE = df_end(MBB); BI != BE; ++BI) { > - MachineBasicBlock* SBB = *BI; > - if (SBB == MBB) > - continue; > - // Stop when we encounter spills of any CSRs spilled at MBB > that > - // have not yet been seen to be restored. > - if (CSRSave[SBB].intersects(spilled) && > - !restored.contains(CSRSave[SBB] & spilled)) > - break; > - // Collect the CSRs spilled at MBB that are restored > - // at this DF successor of MBB. > - if (CSRRestore[SBB].intersects(spilled)) > - restored |= (CSRRestore[SBB] & spilled); > - // If we are at a retun block, check that the restores > - // we have seen so far exhaust the spills at MBB, then > - // reset the restores. > - if (isReturnBlock(SBB) || SBB->succ_size() == 0) { > - if (restored != spilled) { > - CSRegSet notRestored = (spilled - restored); > - DOUT << MF->getFunction()->getName() << ": " > - << stringifyCSRegSet(notRestored) > - << " spilled at " << getBasicBlockName(MBB) > - << " are never restored on path to return " > - << getBasicBlockName(SBB) << "\n"; > - } > - restored.clear(); > - } > - } > - } > - > - // Check restore placements. > - for (CSRegBlockMap::iterator BI = CSRRestore.begin(), > - BE = CSRRestore.end(); BI != BE; ++BI) { > - MachineBasicBlock* MBB = BI->first; > - CSRegSet restored = BI->second; > - CSRegSet spilled; > - > - if (restored.empty()) > - continue; > - > - DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(CSRSave[MBB]) > - << " RESTORE[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(restored) << "\n"; > - > - if (CSRSave[MBB].intersects(restored)) { > - spilled |= (CSRSave[MBB] & restored); > - } > - // Walk inverse depth first from MBB to find spills of all > - // CSRs restored at MBB: > - for (idf_iterator BI = idf_begin(MBB), > - BE = idf_end(MBB); BI != BE; ++BI) { > - MachineBasicBlock* PBB = *BI; > - if (PBB == MBB) > - continue; > - // Stop when we encounter restores of any CSRs restored at > MBB that > - // have not yet been seen to be spilled. > - if (CSRRestore[PBB].intersects(restored) && > - !spilled.contains(CSRRestore[PBB] & restored)) > - break; > - // Collect the CSRs restored at MBB that are spilled > - // at this DF predecessor of MBB. > - if (CSRSave[PBB].intersects(restored)) > - spilled |= (CSRSave[PBB] & restored); > - } > - if (spilled != restored) { > - CSRegSet notSpilled = (restored - spilled); > - DOUT << MF->getFunction()->getName() << ": " > - << stringifyCSRegSet(notSpilled) > - << " restored at " << getBasicBlockName(MBB) > - << " are never spilled\n"; > - } > - } > -} > - > -// Debugging print methods. > -std::string PEI::getBasicBlockName(const MachineBasicBlock* MBB) { > - std::ostringstream name; > - if (MBB) { > - if (MBB->getBasicBlock()) > - name << MBB->getBasicBlock()->getName(); > - else > - name << "_MBB_" << MBB->getNumber(); > - } > - return name.str(); > -} > - > -std::string PEI::stringifyCSRegSet(const CSRegSet& s) { > - const TargetRegisterInfo* TRI = MF->getTarget().getRegisterInfo(); > - const std::vector CSI = > - MF->getFrameInfo()->getCalleeSavedInfo(); > - > - std::ostringstream srep; > - if (CSI.size() == 0) { > - srep << "[]"; > - return srep.str(); > - } > - srep << "["; > - CSRegSet::iterator I = s.begin(), E = s.end(); > - if (I != E) { > - unsigned reg = CSI[*I].getReg(); > - srep << TRI->getName(reg); > - for (++I; I != E; ++I) { > - reg = CSI[*I].getReg(); > - srep << ","; > - srep << TRI->getName(reg); > - } > - } > - srep << "]"; > - return srep.str(); > -} > - > -void PEI::dumpSet(const CSRegSet& s) { > - DOUT << stringifyCSRegSet(s) << "\n"; > -} > - > -void PEI::dumpUsed(MachineBasicBlock* MBB) { > - if (MBB) { > - DOUT << "CSRUsed[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(CSRUsed[MBB]) << "\n"; > - } > -} > - > -void PEI::dumpAllUsed() { > - for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF- > >end(); > - MBBI != MBBE; ++MBBI) { > - MachineBasicBlock* MBB = MBBI; > - dumpUsed(MBB); > - } > -} > - > -void PEI::dumpSets(MachineBasicBlock* MBB) { > - if (MBB) { > - DOUT << getBasicBlockName(MBB) << " | " > - << stringifyCSRegSet(CSRUsed[MBB]) << " | " > - << stringifyCSRegSet(AnticIn[MBB]) << " | " > - << stringifyCSRegSet(AnticOut[MBB]) << " | " > - << stringifyCSRegSet(AvailIn[MBB]) << " | " > - << stringifyCSRegSet(AvailOut[MBB]) << "\n"; > - } > -} > - > -void PEI::dumpSets1(MachineBasicBlock* MBB) { > - if (MBB) { > - DOUT << getBasicBlockName(MBB) << " | " > - << stringifyCSRegSet(CSRUsed[MBB]) << " | " > - << stringifyCSRegSet(AnticIn[MBB]) << " | " > - << stringifyCSRegSet(AnticOut[MBB]) << " | " > - << stringifyCSRegSet(AvailIn[MBB]) << " | " > - << stringifyCSRegSet(AvailOut[MBB]) << " | " > - << stringifyCSRegSet(CSRSave[MBB]) << " | " > - << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; > - } > -} > - > -void PEI::dumpAllSets() { > - for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF- > >end(); > - MBBI != MBBE; ++MBBI) { > - MachineBasicBlock* MBB = MBBI; > - dumpSets1(MBB); > - } > -} > - > -void PEI::dumpSRSets() { > - for (MachineFunction::iterator MBB = MF->begin(), E = MF->end(); > - MBB != E; ++MBB) { > - if (! CSRSave[MBB].empty()) { > - DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(CSRSave[MBB]); > - if (CSRRestore[MBB].empty()) > - DOUT << "\n"; > - } > - if (! CSRRestore[MBB].empty()) { > - if (! CSRSave[MBB].empty()) > - DOUT << " "; > - DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; > - } > - } > -} > -#endif > > Added: llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp?rev=71588&view=auto > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp (added) > +++ llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp Tue May 12 15:33:29 2009 > @@ -0,0 +1,1141 @@ > +//===-- ShrinkWrapping.cpp - Reduce spills/restores of callee-saved > regs --===// > +// > +// The LLVM Compiler Infrastructure > +// > +// This file is distributed under the University of Illinois Open > Source > +// License. See LICENSE.TXT for details. > +// > +// > = > = > = > ----------------------------------------------------------------------= > ==// > +// > +// This file implements a shrink wrapping variant of prolog/epilog > insertion: > +// - Spills and restores of callee-saved registers (CSRs) are > placed in the > +// machine CFG to tightly surround their uses so that execution > paths that > +// do not use CSRs do not pay the spill/restore penalty. > +// > +// - Avoiding placment of spills/restores in loops: if a CSR is > used inside a > +// loop the spills are placed in the loop preheader, and restores > are > +// placed in the loop exit nodes (the successors of loop > _exiting_ nodes). > +// > +// - Covering paths without CSR uses: > +// If a region in a CFG uses CSRs and has multiple entry and/or > exit points, > +// the use info for the CSRs inside the region is propagated > outward in the > +// CFG to ensure validity of the spill/restore placements. This > decreases > +// the effectiveness of shrink wrapping but does not require edge > splitting > +// in the machine CFG. > +// > +// This shrink wrapping implementation uses an iterative analysis > to determine > +// which basic blocks require spills and restores for CSRs. > +// > +// This pass uses MachineDominators and MachineLoopInfo. Loop > information > +// is used to prevent placement of callee-saved register spills/ > restores > +// in the bodies of loops. > +// > +// > = > = > = > ----------------------------------------------------------------------= > ==// > + > +#define DEBUG_TYPE "shrink-wrap" > + > +#include "PEI.h" > +#include "llvm/CodeGen/MachineDominators.h" > +#include "llvm/CodeGen/MachineLoopInfo.h" > +#include "llvm/CodeGen/MachineInstr.h" > +#include "llvm/CodeGen/MachineFrameInfo.h" > +#include "llvm/CodeGen/MachineRegisterInfo.h" > +#include "llvm/Target/TargetMachine.h" > +#include "llvm/Target/TargetRegisterInfo.h" > +#include "llvm/ADT/SparseBitVector.h" > +#include "llvm/ADT/DenseMap.h" > +#include "llvm/ADT/PostOrderIterator.h" > +#include "llvm/ADT/Statistic.h" > +#include "llvm/Support/CommandLine.h" > +#include "llvm/Support/Compiler.h" > +#include "llvm/Support/Debug.h" > +#include "llvm/ADT/STLExtras.h" > +#include "llvm/ADT/Statistic.h" > +#include > + > +using namespace llvm; > + > +STATISTIC(numSRReduced, "Number of CSR spills+restores reduced."); > + > +// Shrink Wrapping: > +static cl::opt > +ShrinkWrapping("shrink-wrap", > + cl::desc("Shrink wrap callee-saved register spills/ > restores")); > + > +// Shrink wrap only the specified function, a debugging aid. > +static cl::opt > +ShrinkWrapFunc("shrink-wrap-func", cl::Hidden, > + cl::desc("Shrink wrap the specified function"), > + cl::value_desc("funcname"), > + cl::init("")); > + > +// Debugging level for shrink wrapping. > +enum ShrinkWrapDebugLevel { > + None, BasicInfo, Iterations, Details > +}; > + > +static cl::opt > +ShrinkWrapDebugging("shrink-wrap-dbg", cl::Hidden, > + cl::desc("Print shrink wrapping debugging information"), > + cl::values( > + clEnumVal(None , "disable debug output"), > + clEnumVal(BasicInfo , "print basic DF sets"), > + clEnumVal(Iterations, "print SR sets for each iteration"), > + clEnumVal(Details , "print all DF sets"), > + clEnumValEnd)); > + > + > +void PEI::getAnalysisUsage(AnalysisUsage &AU) const { > + AU.setPreservesCFG(); > + if (ShrinkWrapping || ShrinkWrapFunc != "") { > + AU.addRequired(); > + AU.addRequired(); > + } > + AU.addPreserved(); > + AU.addPreserved(); > + MachineFunctionPass::getAnalysisUsage(AU); > +} > + > +// > = > = > = > ----------------------------------------------------------------------= > ==// > +// ShrinkWrapping implementation > +// > = > = > = > ----------------------------------------------------------------------= > ==// > + > +// Convienences for dealing with machine loops. > +MachineBasicBlock* PEI::getTopLevelLoopPreheader(MachineLoop* LP) { > + assert(LP && "Machine loop is NULL."); > + MachineBasicBlock* PHDR = LP->getLoopPreheader(); > + MachineLoop* PLP = LP->getParentLoop(); > + while (PLP) { > + PHDR = PLP->getLoopPreheader(); > + PLP = PLP->getParentLoop(); > + } > + return PHDR; > +} > + > +MachineLoop* PEI::getTopLevelLoopParent(MachineLoop *LP) { > + if (LP == 0) > + return 0; > + MachineLoop* PLP = LP->getParentLoop(); > + while (PLP) { > + LP = PLP; > + PLP = PLP->getParentLoop(); > + } > + return LP; > +} > + > +bool PEI::isReturnBlock(MachineBasicBlock* MBB) { > + return (MBB && !MBB->empty() && MBB->back().getDesc().isReturn()); > +} > + > +// Initialize shrink wrapping DFA sets, called before iterations. > +void PEI::clearAnticAvailSets() { > + AnticIn.clear(); > + AnticOut.clear(); > + AvailIn.clear(); > + AvailOut.clear(); > +} > + > +// Clear all sets constructed by shrink wrapping. > +void PEI::clearAllSets() { > + ReturnBlocks.clear(); > + clearAnticAvailSets(); > + UsedCSRegs.clear(); > + CSRUsed.clear(); > + TLLoops.clear(); > + CSRSave.clear(); > + CSRRestore.clear(); > +} > + > +// Initialize all shrink wrapping data. > +void PEI::initShrinkWrappingInfo() { > + clearAllSets(); > + EntryBlock = 0; > +#ifndef NDEBUG > + HasFastExitPath = false; > +#endif > + ShrinkWrapThisFunction = ShrinkWrapping; > + // DEBUG: enable or disable shrink wrapping for the current > function > + // via --shrink-wrap-func=. > +#ifndef NDEBUG > + if (ShrinkWrapFunc != "") { > + std::string MFName = MF->getFunction()->getName(); > + ShrinkWrapThisFunction = (MFName == ShrinkWrapFunc); > + } > +#endif > +} > + > + > +/// placeCSRSpillsAndRestores - determine which MBBs of the function > +/// need save, restore code for callee-saved registers by doing a > DF analysis > +/// similar to the one used in code motion (GVNPRE). This produces > maps of MBBs > +/// to sets of registers (CSRs) for saves and restores. > MachineLoopInfo > +/// is used to ensure that CSR save/restore code is not placed > inside loops. > +/// This function computes the maps of MBBs -> CSRs to spill and > restore > +/// in CSRSave, CSRRestore. > +/// > +/// If shrink wrapping is not being performed, place all spills in > +/// the entry block, all restores in return blocks. In this case, > +/// CSRSave has a single mapping, CSRRestore has mappings for each > +/// return block. > +/// > +void PEI::placeCSRSpillsAndRestores(MachineFunction &Fn) { > + > + DEBUG(MF = &Fn); > + > + initShrinkWrappingInfo(); > + > + DEBUG(if (ShrinkWrapThisFunction) { > + DOUT << "Place CSR spills/restores for " > + << MF->getFunction()->getName() << "\n"; > + }); > + > + if (calculateSets(Fn)) > + placeSpillsAndRestores(Fn); > +} > + > +/// calcAnticInOut - calculate the anticipated in/out reg sets > +/// for the given MBB by looking forward in the MCFG at MBB's > +/// successors. > +/// > +bool PEI::calcAnticInOut(MachineBasicBlock* MBB) { > + bool changed = false; > + > + // AnticOut[MBB] = INTERSECT(AnticIn[S] for S in SUCCESSORS(MBB)) > + SmallVector successors; > + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > + SE = MBB->succ_end(); SI != SE; ++SI) { > + MachineBasicBlock* SUCC = *SI; > + if (SUCC != MBB) > + successors.push_back(SUCC); > + } > + > + unsigned i = 0, e = successors.size(); > + if (i != e) { > + CSRegSet prevAnticOut = AnticOut[MBB]; > + MachineBasicBlock* SUCC = successors[i]; > + > + AnticOut[MBB] = AnticIn[SUCC]; > + for (++i; i != e; ++i) { > + SUCC = successors[i]; > + AnticOut[MBB] &= AnticIn[SUCC]; > + } > + if (prevAnticOut != AnticOut[MBB]) > + changed = true; > + } > + > + // AnticIn[MBB] = UNION(CSRUsed[MBB], AnticOut[MBB]); > + CSRegSet prevAnticIn = AnticIn[MBB]; > + AnticIn[MBB] = CSRUsed[MBB] | AnticOut[MBB]; > + if (prevAnticIn |= AnticIn[MBB]) > + changed = true; > + return changed; > +} > + > +/// calcAvailInOut - calculate the available in/out reg sets > +/// for the given MBB by looking backward in the MCFG at MBB's > +/// predecessors. > +/// > +bool PEI::calcAvailInOut(MachineBasicBlock* MBB) { > + bool changed = false; > + > + // AvailIn[MBB] = INTERSECT(AvailOut[P] for P in PREDECESSORS(MBB)) > + SmallVector predecessors; > + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > + PE = MBB->pred_end(); PI != PE; ++PI) { > + MachineBasicBlock* PRED = *PI; > + if (PRED != MBB) > + predecessors.push_back(PRED); > + } > + > + unsigned i = 0, e = predecessors.size(); > + if (i != e) { > + CSRegSet prevAvailIn = AvailIn[MBB]; > + MachineBasicBlock* PRED = predecessors[i]; > + > + AvailIn[MBB] = AvailOut[PRED]; > + for (++i; i != e; ++i) { > + PRED = predecessors[i]; > + AvailIn[MBB] &= AvailOut[PRED]; > + } > + if (prevAvailIn != AvailIn[MBB]) > + changed = true; > + } > + > + // AvailOut[MBB] = UNION(CSRUsed[MBB], AvailIn[MBB]); > + CSRegSet prevAvailOut = AvailOut[MBB]; > + AvailOut[MBB] = CSRUsed[MBB] | AvailIn[MBB]; > + if (prevAvailOut |= AvailOut[MBB]) > + changed = true; > + return changed; > +} > + > +/// calculateAnticAvail - build the sets anticipated and available > +/// registers in the MCFG of the current function iteratively, > +/// doing a combined forward and backward analysis. > +/// > +void PEI::calculateAnticAvail(MachineFunction &Fn) { > + // Initialize data flow sets. > + clearAnticAvailSets(); > + > + // Calulate Antic{In,Out} and Avail{In,Out} iteratively on the > MCFG. > + bool changed = true; > + unsigned iterations = 0; > + while (changed) { > + changed = false; > + ++iterations; > + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end > (); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + > + // Calculate anticipated in, out regs at MBB from > + // anticipated at successors of MBB. > + changed |= calcAnticInOut(MBB); > + > + // Calculate available in, out regs at MBB from > + // available at predecessors of MBB. > + changed |= calcAvailInOut(MBB); > + } > + } > + > + DEBUG(if (ShrinkWrapDebugging >= Details) { > + DOUT << > "-----------------------------------------------------------\n"; > + DOUT << " Antic/Avail Sets:\n"; > + DOUT << > "-----------------------------------------------------------\n"; > + DOUT << "iterations = " << iterations << "\n"; > + DOUT << > "-----------------------------------------------------------\n"; > + DOUT << "MBB | USED | ANTIC_IN | ANTIC_OUT | AVAIL_IN | > AVAIL_OUT\n"; > + DOUT << > "-----------------------------------------------------------\n"; > + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = > Fn.end(); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + dumpSets(MBB); > + } > + DOUT << > "-----------------------------------------------------------\n"; > + }); > +} > + > +/// propagateUsesAroundLoop - copy used register info from MBB to > all blocks > +/// of the loop given by LP and its parent loops. This prevents > spills/restores > +/// from being placed in the bodies of loops. > +/// > +void PEI::propagateUsesAroundLoop(MachineBasicBlock* MBB, > MachineLoop* LP) { > + if (! MBB || !LP) > + return; > + > + std::vector loopBlocks = LP->getBlocks(); > + for (unsigned i = 0, e = loopBlocks.size(); i != e; ++i) { > + MachineBasicBlock* LBB = loopBlocks[i]; > + if (LBB == MBB) > + continue; > + if (CSRUsed[LBB].contains(CSRUsed[MBB])) > + continue; > + CSRUsed[LBB] |= CSRUsed[MBB]; > + } > +} > + > +/// calculateSets - collect the CSRs used in this function, compute > +/// the DF sets that describe the initial minimal regions in the > +/// Machine CFG around which CSR spills and restores must be placed. > +/// > +/// Additionally, this function decides if shrink wrapping should > +/// be disabled for the current function, checking the following: > +/// 1. the current function has more than 500 MBBs: heuristic limit > +/// on function size to reduce compile time impact of the current > +/// iterative algorithm. > +/// 2. all CSRs are used in the entry block. > +/// 3. all CSRs are used in all immediate successors of the entry > block. > +/// 4. all CSRs are used in a subset of blocks, each of which > dominates > +/// all return blocks. These blocks, taken as a subgraph of the > MCFG, > +/// are equivalent to the entry block since all execution paths > pass > +/// through them. > +/// > +bool PEI::calculateSets(MachineFunction &Fn) { > + // Sets used to compute spill, restore placement sets. > + const std::vector CSI = > + Fn.getFrameInfo()->getCalleeSavedInfo(); > + > + // If no CSRs used, we are done. > + if (CSI.empty()) { > + DEBUG(if (ShrinkWrapThisFunction) > + DOUT << "DISABLED: " << Fn.getFunction()->getName() > + << ": uses no callee-saved registers\n"); > + return false; > + } > + > + // Save refs to entry and return blocks. > + EntryBlock = Fn.begin(); > + for (MachineFunction::iterator MBB = Fn.begin(), E = Fn.end(); > + MBB != E; ++MBB) > + if (isReturnBlock(MBB)) > + ReturnBlocks.push_back(MBB); > + > + // Determine if this function has fast exit paths. > + DEBUG(if (ShrinkWrapThisFunction) > + findFastExitPath()); > + > + // Limit shrink wrapping via the current iterative bit vector > + // implementation to functions with <= 500 MBBs. > + if (Fn.size() > 500) { > + DEBUG(if (ShrinkWrapThisFunction) > + DOUT << "DISABLED: " << Fn.getFunction()->getName() > + << ": too large (" << Fn.size() << " MBBs)\n"); > + ShrinkWrapThisFunction = false; > + } > + > + // Return now if not shrink wrapping. > + if (! ShrinkWrapThisFunction) > + return false; > + > + // Collect set of used CSRs. > + for (unsigned inx = 0, e = CSI.size(); inx != e; ++inx) { > + UsedCSRegs.set(inx); > + } > + > + // Walk instructions in all MBBs, create CSRUsed[] sets, choose > + // whether or not to shrink wrap this function. > + MachineLoopInfo &LI = getAnalysis(); > + MachineDominatorTree &DT = getAnalysis(); > + const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo(); > + > + bool allCSRUsesInEntryBlock = true; > + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + for (MachineBasicBlock::iterator I = MBB->begin(); I != MBB->end > (); ++I) { > + for (unsigned inx = 0, e = CSI.size(); inx != e; ++inx) { > + unsigned Reg = CSI[inx].getReg(); > + // If instruction I reads or modifies Reg, add it to > UsedCSRegs, > + // CSRUsed map for the current block. > + for (unsigned opInx = 0, opEnd = I->getNumOperands(); > + opInx != opEnd; ++opInx) { > + const MachineOperand &MO = I->getOperand(opInx); > + if (! (MO.isReg() && (MO.isUse() || MO.isDef()))) > + continue; > + unsigned MOReg = MO.getReg(); > + if (!MOReg) > + continue; > + if (MOReg == Reg || > + (TargetRegisterInfo::isPhysicalRegister(MOReg) && > + TargetRegisterInfo::isPhysicalRegister(Reg) && > + TRI->isSubRegister(Reg, MOReg))) { > + // CSR Reg is defined/used in block MBB. > + CSRUsed[MBB].set(inx); > + // Check for uses in EntryBlock. > + if (MBB != EntryBlock) > + allCSRUsesInEntryBlock = false; > + } > + } > + } > + } > + > + if (CSRUsed[MBB].empty()) > + continue; > + > + // Propagate CSRUsed[MBB] in loops > + if (MachineLoop* LP = LI.getLoopFor(MBB)) { > + // Add top level loop to work list. > + MachineBasicBlock* HDR = getTopLevelLoopPreheader(LP); > + MachineLoop* PLP = getTopLevelLoopParent(LP); > + > + if (! HDR) { > + HDR = PLP->getHeader(); > + assert(HDR->pred_size() > 0 && "Loop header has no > predecessors?"); > + MachineBasicBlock::pred_iterator PI = HDR->pred_begin(); > + HDR = *PI; > + } > + TLLoops[HDR] = PLP; > + > + // Push uses from inside loop to its parent loops, > + // or to all other MBBs in its loop. > + if (LP->getLoopDepth() > 1) { > + for (MachineLoop* PLP = LP->getParentLoop(); PLP; > + PLP = PLP->getParentLoop()) { > + propagateUsesAroundLoop(MBB, PLP); > + } > + } else { > + propagateUsesAroundLoop(MBB, LP); > + } > + } > + } > + > + if (allCSRUsesInEntryBlock) { > + DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() > + << ": all CSRs used in EntryBlock\n"); > + ShrinkWrapThisFunction = false; > + } else { > + bool allCSRsUsedInEntryFanout = true; > + for (MachineBasicBlock::succ_iterator SI = EntryBlock- > >succ_begin(), > + SE = EntryBlock->succ_end(); SI != SE; ++SI) { > + MachineBasicBlock* SUCC = *SI; > + if (CSRUsed[SUCC] != UsedCSRegs) > + allCSRsUsedInEntryFanout = false; > + } > + if (allCSRsUsedInEntryFanout) { > + DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() > + << ": all CSRs used in imm successors of EntryBlock\n"); > + ShrinkWrapThisFunction = false; > + } > + } > + > + if (ShrinkWrapThisFunction) { > + // Check if MBB uses CSRs and dominates all exit nodes. > + // Such nodes are equiv. to the entry node w.r.t. > + // CSR uses: every path through the function must > + // pass through this node. If each CSR is used at least > + // once by these nodes, shrink wrapping is disabled. > + CSRegSet CSRUsedInChokePoints; > + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end > (); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + if (MBB == EntryBlock || CSRUsed[MBB].empty() || MBB- > >succ_size() < 1) > + continue; > + bool dominatesExitNodes = true; > + for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) > + if (! DT.dominates(MBB, ReturnBlocks[ri])) { > + dominatesExitNodes = false; > + break; > + } > + if (dominatesExitNodes) { > + CSRUsedInChokePoints |= CSRUsed[MBB]; > + if (CSRUsedInChokePoints == UsedCSRegs) { > + DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() > + << ": all CSRs used in choke point(s) at " > + << getBasicBlockName(MBB) << "\n"); > + ShrinkWrapThisFunction = false; > + break; > + } > + } > + } > + } > + > + // Return now if we have decided not to apply shrink wrapping > + // to the current function. > + if (! ShrinkWrapThisFunction) > + return false; > + > + DEBUG({ > + DOUT << "ENABLED: " << Fn.getFunction()->getName(); > + if (HasFastExitPath) > + DOUT << " (fast exit path)"; > + DOUT << "\n"; > + if (ShrinkWrapDebugging >= BasicInfo) { > + DOUT << "------------------------------" > + << "-----------------------------\n"; > + DOUT << "UsedCSRegs = " << stringifyCSRegSet(UsedCSRegs) << > "\n"; > + if (ShrinkWrapDebugging >= Details) { > + DOUT << "------------------------------" > + << "-----------------------------\n"; > + dumpAllUsed(); > + } > + } > + }); > + > + // Build initial DF sets to determine minimal regions in the > + // Machine CFG around which CSRs must be spilled and restored. > + calculateAnticAvail(Fn); > + > + return true; > +} > + > +/// addUsesForMEMERegion - add uses of CSRs spilled or restored in > +/// multi-entry, multi-exit (MEME) regions so spill and restore > +/// placement will not break code that enters or leaves a > +/// shrink-wrapped region by inducing spills with no matching > +/// restores or restores with no matching spills. A MEME region > +/// is a subgraph of the MCFG with multiple entry edges, multiple > +/// exit edges, or both. This code propagates use information > +/// through the MCFG until all paths requiring spills and restores > +/// _outside_ the computed minimal placement regions have been > covered. > +/// > +bool PEI::addUsesForMEMERegion(MachineBasicBlock* MBB, > + SmallVector& > blks) { > + if (MBB->succ_size() < 2 && MBB->pred_size() < 2) { > + bool processThisBlock = false; > + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > + SE = MBB->succ_end(); SI != SE; ++SI) { > + MachineBasicBlock* SUCC = *SI; > + if (SUCC->pred_size() > 1) { > + processThisBlock = true; > + break; > + } > + } > + if (!CSRRestore[MBB].empty() && MBB->succ_size() > 0) { > + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > + PE = MBB->pred_end(); PI != PE; ++PI) { > + MachineBasicBlock* PRED = *PI; > + if (PRED->succ_size() > 1) { > + processThisBlock = true; > + break; > + } > + } > + } > + if (! processThisBlock) > + return false; > + } > + > + CSRegSet prop; > + if (!CSRSave[MBB].empty()) > + prop = CSRSave[MBB]; > + else if (!CSRRestore[MBB].empty()) > + prop = CSRRestore[MBB]; > + else > + prop = CSRUsed[MBB]; > + if (prop.empty()) > + return false; > + > + // Propagate selected bits to successors, predecessors of MBB. > + bool addedUses = false; > + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > + SE = MBB->succ_end(); SI != SE; ++SI) { > + MachineBasicBlock* SUCC = *SI; > + // Self-loop > + if (SUCC == MBB) > + continue; > + if (! CSRUsed[SUCC].contains(prop)) { > + CSRUsed[SUCC] |= prop; > + addedUses = true; > + blks.push_back(SUCC); > + DEBUG(if (ShrinkWrapDebugging >= Iterations) > + DOUT << getBasicBlockName(MBB) > + << "(" << stringifyCSRegSet(prop) << ")->" > + << "successor " << getBasicBlockName(SUCC) << > "\n"); > + } > + } > + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > + PE = MBB->pred_end(); PI != PE; ++PI) { > + MachineBasicBlock* PRED = *PI; > + // Self-loop > + if (PRED == MBB) > + continue; > + if (! CSRUsed[PRED].contains(prop)) { > + CSRUsed[PRED] |= prop; > + addedUses = true; > + blks.push_back(PRED); > + DEBUG(if (ShrinkWrapDebugging >= Iterations) > + DOUT << getBasicBlockName(MBB) > + << "(" << stringifyCSRegSet(prop) << ")->" > + << "predecessor " << getBasicBlockName(PRED) << > "\n"); > + } > + } > + return addedUses; > +} > + > +/// addUsesForTopLevelLoops - add uses for CSRs used inside top > +/// level loops to the exit blocks of those loops. > +/// > +bool PEI::addUsesForTopLevelLoops(SmallVector 4>& blks) { > + bool addedUses = false; > + > + // Place restores for top level loops where needed. > + for (DenseMap::iterator > + I = TLLoops.begin(), E = TLLoops.end(); I != E; ++I) { > + MachineBasicBlock* MBB = I->first; > + MachineLoop* LP = I->second; > + MachineBasicBlock* HDR = LP->getHeader(); > + SmallVector exitBlocks; > + CSRegSet loopSpills; > + > + loopSpills = CSRSave[MBB]; > + if (CSRSave[MBB].empty()) { > + loopSpills = CSRUsed[HDR]; > + assert(!loopSpills.empty() && "No CSRs used in loop?"); > + } else if (CSRRestore[MBB].contains(CSRSave[MBB])) > + continue; > + > + LP->getExitBlocks(exitBlocks); > + assert(exitBlocks.size() > 0 && "Loop has no top level exit > blocks?"); > + for (unsigned i = 0, e = exitBlocks.size(); i != e; ++i) { > + MachineBasicBlock* EXB = exitBlocks[i]; > + if (! CSRUsed[EXB].contains(loopSpills)) { > + CSRUsed[EXB] |= loopSpills; > + addedUses = true; > + DEBUG(if (ShrinkWrapDebugging >= Iterations) > + DOUT << "LOOP " << getBasicBlockName(MBB) > + << "(" << stringifyCSRegSet(loopSpills) << ")->" > + << getBasicBlockName(EXB) << "\n"); > + if (EXB->succ_size() > 1 || EXB->pred_size() > 1) > + blks.push_back(EXB); > + } > + } > + } > + return addedUses; > +} > + > +/// calcSpillPlacements - determine which CSRs should be spilled > +/// in MBB using AnticIn sets of MBB's predecessors, keeping track > +/// of changes to spilled reg sets. Add MBB to the set of blocks > +/// that need to be processed for propagating use info to cover > +/// multi-entry/exit regions. > +/// > +bool PEI::calcSpillPlacements(MachineBasicBlock* MBB, > + SmallVector > &blks, > + CSRegBlockMap &prevSpills) { > + bool placedSpills = false; > + // Intersect (CSRegs - AnticIn[P]) for P in Predecessors(MBB) > + CSRegSet anticInPreds; > + SmallVector predecessors; > + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > + PE = MBB->pred_end(); PI != PE; ++PI) { > + MachineBasicBlock* PRED = *PI; > + if (PRED != MBB) > + predecessors.push_back(PRED); > + } > + unsigned i = 0, e = predecessors.size(); > + if (i != e) { > + MachineBasicBlock* PRED = predecessors[i]; > + anticInPreds = UsedCSRegs - AnticIn[PRED]; > + for (++i; i != e; ++i) { > + PRED = predecessors[i]; > + anticInPreds &= (UsedCSRegs - AnticIn[PRED]); > + } > + } else { > + // Handle uses in entry blocks (which have no predecessors). > + // This is necessary because the DFA formulation assumes the > + // entry and (multiple) exit nodes cannot have CSR uses, which > + // is not the case in the real world. > + anticInPreds = UsedCSRegs; > + } > + // Compute spills required at MBB: > + CSRSave[MBB] |= (AnticIn[MBB] - AvailIn[MBB]) & anticInPreds; > + > + if (! CSRSave[MBB].empty()) { > + if (MBB == EntryBlock) { > + for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) > + CSRRestore[ReturnBlocks[ri]] |= CSRSave[MBB]; > + } else { > + // Reset all regs spilled in MBB that are also spilled in > EntryBlock. > + if (CSRSave[EntryBlock].intersects(CSRSave[MBB])) { > + CSRSave[MBB] = CSRSave[MBB] - CSRSave[EntryBlock]; > + } > + } > + } > + placedSpills = (CSRSave[MBB] != prevSpills[MBB]); > + prevSpills[MBB] = CSRSave[MBB]; > + // Remember this block for adding restores to successor > + // blocks for multi-entry region. > + if (placedSpills) > + blks.push_back(MBB); > + > + DEBUG(if (! CSRSave[MBB].empty() && ShrinkWrapDebugging >= > Iterations) > + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRSave[MBB]) << "\n"); > + > + return placedSpills; > +} > + > +/// calcRestorePlacements - determine which CSRs should be restored > +/// in MBB using AvailOut sets of MBB's succcessors, keeping track > +/// of changes to restored reg sets. Add MBB to the set of blocks > +/// that need to be processed for propagating use info to cover > +/// multi-entry/exit regions. > +/// > +bool PEI::calcRestorePlacements(MachineBasicBlock* MBB, > + SmallVector > &blks, > + CSRegBlockMap &prevRestores) { > + bool placedRestores = false; > + // Intersect (CSRegs - AvailOut[S]) for S in Successors(MBB) > + CSRegSet availOutSucc; > + SmallVector successors; > + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > + SE = MBB->succ_end(); SI != SE; ++SI) { > + MachineBasicBlock* SUCC = *SI; > + if (SUCC != MBB) > + successors.push_back(SUCC); > + } > + unsigned i = 0, e = successors.size(); > + if (i != e) { > + MachineBasicBlock* SUCC = successors[i]; > + availOutSucc = UsedCSRegs - AvailOut[SUCC]; > + for (++i; i != e; ++i) { > + SUCC = successors[i]; > + availOutSucc &= (UsedCSRegs - AvailOut[SUCC]); > + } > + } else { > + if (! CSRUsed[MBB].empty() || ! AvailOut[MBB].empty()) { > + // Handle uses in return blocks (which have no successors). > + // This is necessary because the DFA formulation assumes the > + // entry and (multiple) exit nodes cannot have CSR uses, which > + // is not the case in the real world. > + availOutSucc = UsedCSRegs; > + } > + } > + // Compute restores required at MBB: > + CSRRestore[MBB] |= (AvailOut[MBB] - AnticOut[MBB]) & availOutSucc; > + > + // Postprocess restore placements at MBB. > + // Remove the CSRs that are restored in the return blocks. > + // Lest this be confusing, note that: > + // CSRSave[EntryBlock] == CSRRestore[B] for all B in ReturnBlocks. > + if (MBB->succ_size() && ! CSRRestore[MBB].empty()) { > + if (! CSRSave[EntryBlock].empty()) > + CSRRestore[MBB] = CSRRestore[MBB] - CSRSave[EntryBlock]; > + } > + placedRestores = (CSRRestore[MBB] != prevRestores[MBB]); > + prevRestores[MBB] = CSRRestore[MBB]; > + // Remember this block for adding saves to predecessor > + // blocks for multi-entry region. > + if (placedRestores) > + blks.push_back(MBB); > + > + DEBUG(if (! CSRRestore[MBB].empty() && ShrinkWrapDebugging >= > Iterations) > + DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"); > + > + return placedRestores; > +} > + > +/// placeSpillsAndRestores - place spills and restores of CSRs > +/// used in MBBs in minimal regions that contain the uses. > +/// > +void PEI::placeSpillsAndRestores(MachineFunction &Fn) { > + CSRegBlockMap prevCSRSave; > + CSRegBlockMap prevCSRRestore; > + SmallVector cvBlocks, ncvBlocks; > + bool changed = true; > + unsigned iterations = 0; > + > + // Iterate computation of spill and restore placements in the > MCFG until: > + // 1. CSR use info has been fully propagated around the MCFG, and > + // 2. computation of CSRSave[], CSRRestore[] reach fixed points. > + while (changed) { > + changed = false; > + ++iterations; > + > + DEBUG(if (ShrinkWrapDebugging >= Iterations) > + DOUT << "iter " << iterations > + << " > --------------------------------------------------\n"); > + > + // Calculate CSR{Save,Restore} sets using Antic, Avail on the > MCFG, > + // which determines the placements of spills and restores. > + // Keep track of changes to spills, restores in each iteration to > + // minimize the total iterations. > + bool SRChanged = false; > + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end > (); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + > + // Place spills for CSRs in MBB. > + SRChanged |= calcSpillPlacements(MBB, cvBlocks, prevCSRSave); > + > + // Place restores for CSRs in MBB. > + SRChanged |= calcRestorePlacements(MBB, cvBlocks, > prevCSRRestore); > + } > + > + // Add uses of CSRs used inside loops where needed. > + changed |= addUsesForTopLevelLoops(cvBlocks); > + > + // Add uses for CSRs spilled or restored at branch, join points. > + if (changed || SRChanged) { > + while (! cvBlocks.empty()) { > + MachineBasicBlock* MBB = cvBlocks.pop_back_val(); > + changed |= addUsesForMEMERegion(MBB, ncvBlocks); > + } > + if (! ncvBlocks.empty()) { > + cvBlocks = ncvBlocks; > + ncvBlocks.clear(); > + } > + } > + > + if (changed) { > + calculateAnticAvail(Fn); > + CSRSave.clear(); > + CSRRestore.clear(); > + } > + } > + > + // Check for effectiveness: > + // SR0 = {r | r in CSRSave[EntryBlock], CSRRestore[RB], RB in > ReturnBlocks} > + // numSRReduced = |(UsedCSRegs - SR0)|, approx. SR0 by CSRSave > [EntryBlock] > + // Gives a measure of how many CSR spills have been moved from > EntryBlock > + // to minimal regions enclosing their uses. > + CSRegSet notSpilledInEntryBlock = (UsedCSRegs - CSRSave > [EntryBlock]); > + unsigned numSRReducedThisFunc = notSpilledInEntryBlock.count(); > + numSRReduced += numSRReducedThisFunc; > + DEBUG(if (ShrinkWrapDebugging >= BasicInfo) { > + DOUT << > "-----------------------------------------------------------\n"; > + DOUT << "total iterations = " << iterations << " ( " > + << Fn.getFunction()->getName() > + << " " << numSRReducedThisFunc > + << " " << Fn.size() > + << " )\n"; > + DOUT << > "-----------------------------------------------------------\n"; > + dumpSRSets(); > + DOUT << > "-----------------------------------------------------------\n"; > + if (numSRReducedThisFunc) > + verifySpillRestorePlacement(); > + }); > +} > + > +// Debugging methods. > +#ifndef NDEBUG > +/// findFastExitPath - debugging method used to detect functions > +/// with at least one path from the entry block to a return block > +/// directly or which has a very small number of edges. > +/// > +void PEI::findFastExitPath() { > + if (! EntryBlock) > + return; > + // Fina a path from EntryBlock to any return block that does not > branch: > + // Entry > + // | ... > + // v | > + // B1<-----+ > + // | > + // v > + // Return > + for (MachineBasicBlock::succ_iterator SI = EntryBlock->succ_begin > (), > + SE = EntryBlock->succ_end(); SI != SE; ++SI) { > + MachineBasicBlock* SUCC = *SI; > + > + // Assume positive, disprove existence of fast path. > + HasFastExitPath = true; > + > + // Check the immediate successors. > + if (isReturnBlock(SUCC)) { > + if (ShrinkWrapDebugging >= BasicInfo) > + DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) > + << "->" << getBasicBlockName(SUCC) << "\n"; > + break; > + } > + // Traverse df from SUCC, look for a branch block. > + std::string exitPath = getBasicBlockName(SUCC); > + for (df_iterator BI = df_begin(SUCC), > + BE = df_end(SUCC); BI != BE; ++BI) { > + MachineBasicBlock* SBB = *BI; > + // Reject paths with branch nodes. > + if (SBB->succ_size() > 1) { > + HasFastExitPath = false; > + break; > + } > + exitPath += "->" + getBasicBlockName(SBB); > + } > + if (HasFastExitPath) { > + if (ShrinkWrapDebugging >= BasicInfo) > + DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) > + << "->" << exitPath << "\n"; > + break; > + } > + } > +} > + > +/// verifySpillRestorePlacement - check the current spill/restore > +/// sets for safety. Attempt to find spills without restores or > +/// restores without spills. > +/// Spills: walk df from each MBB in spill set ensuring that > +/// all CSRs spilled at MMBB are restored on all paths > +/// from MBB to all exit blocks. > +/// Restores: walk idf from each MBB in restore set ensuring that > +/// all CSRs restored at MBB are spilled on all paths > +/// reaching MBB. > +/// > +void PEI::verifySpillRestorePlacement() { > + unsigned numReturnBlocks = 0; > + for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF->end > (); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + if (isReturnBlock(MBB) || MBB->succ_size() == 0) > + ++numReturnBlocks; > + } > + for (CSRegBlockMap::iterator BI = CSRSave.begin(), > + BE = CSRSave.end(); BI != BE; ++BI) { > + MachineBasicBlock* MBB = BI->first; > + CSRegSet spilled = BI->second; > + CSRegSet restored; > + > + if (spilled.empty()) > + continue; > + > + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(spilled) > + << " RESTORE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; > + > + if (CSRRestore[MBB].intersects(spilled)) { > + restored |= (CSRRestore[MBB] & spilled); > + } > + > + // Walk depth first from MBB to find restores of all CSRs > spilled at MBB: > + // we must find restores for all spills w/no intervening spills > on all > + // paths from MBB to all return blocks. > + for (df_iterator BI = df_begin(MBB), > + BE = df_end(MBB); BI != BE; ++BI) { > + MachineBasicBlock* SBB = *BI; > + if (SBB == MBB) > + continue; > + // Stop when we encounter spills of any CSRs spilled at MBB > that > + // have not yet been seen to be restored. > + if (CSRSave[SBB].intersects(spilled) && > + !restored.contains(CSRSave[SBB] & spilled)) > + break; > + // Collect the CSRs spilled at MBB that are restored > + // at this DF successor of MBB. > + if (CSRRestore[SBB].intersects(spilled)) > + restored |= (CSRRestore[SBB] & spilled); > + // If we are at a retun block, check that the restores > + // we have seen so far exhaust the spills at MBB, then > + // reset the restores. > + if (isReturnBlock(SBB) || SBB->succ_size() == 0) { > + if (restored != spilled) { > + CSRegSet notRestored = (spilled - restored); > + DOUT << MF->getFunction()->getName() << ": " > + << stringifyCSRegSet(notRestored) > + << " spilled at " << getBasicBlockName(MBB) > + << " are never restored on path to return " > + << getBasicBlockName(SBB) << "\n"; > + } > + restored.clear(); > + } > + } > + } > + > + // Check restore placements. > + for (CSRegBlockMap::iterator BI = CSRRestore.begin(), > + BE = CSRRestore.end(); BI != BE; ++BI) { > + MachineBasicBlock* MBB = BI->first; > + CSRegSet restored = BI->second; > + CSRegSet spilled; > + > + if (restored.empty()) > + continue; > + > + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRSave[MBB]) > + << " RESTORE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(restored) << "\n"; > + > + if (CSRSave[MBB].intersects(restored)) { > + spilled |= (CSRSave[MBB] & restored); > + } > + // Walk inverse depth first from MBB to find spills of all > + // CSRs restored at MBB: > + for (idf_iterator BI = idf_begin(MBB), > + BE = idf_end(MBB); BI != BE; ++BI) { > + MachineBasicBlock* PBB = *BI; > + if (PBB == MBB) > + continue; > + // Stop when we encounter restores of any CSRs restored at > MBB that > + // have not yet been seen to be spilled. > + if (CSRRestore[PBB].intersects(restored) && > + !spilled.contains(CSRRestore[PBB] & restored)) > + break; > + // Collect the CSRs restored at MBB that are spilled > + // at this DF predecessor of MBB. > + if (CSRSave[PBB].intersects(restored)) > + spilled |= (CSRSave[PBB] & restored); > + } > + if (spilled != restored) { > + CSRegSet notSpilled = (restored - spilled); > + DOUT << MF->getFunction()->getName() << ": " > + << stringifyCSRegSet(notSpilled) > + << " restored at " << getBasicBlockName(MBB) > + << " are never spilled\n"; > + } > + } > +} > + > +// Debugging print methods. > +std::string PEI::getBasicBlockName(const MachineBasicBlock* MBB) { > + std::ostringstream name; > + if (MBB) { > + if (MBB->getBasicBlock()) > + name << MBB->getBasicBlock()->getName(); > + else > + name << "_MBB_" << MBB->getNumber(); > + } > + return name.str(); > +} > + > +std::string PEI::stringifyCSRegSet(const CSRegSet& s) { > + const TargetRegisterInfo* TRI = MF->getTarget().getRegisterInfo(); > + const std::vector CSI = > + MF->getFrameInfo()->getCalleeSavedInfo(); > + > + std::ostringstream srep; > + if (CSI.size() == 0) { > + srep << "[]"; > + return srep.str(); > + } > + srep << "["; > + CSRegSet::iterator I = s.begin(), E = s.end(); > + if (I != E) { > + unsigned reg = CSI[*I].getReg(); > + srep << TRI->getName(reg); > + for (++I; I != E; ++I) { > + reg = CSI[*I].getReg(); > + srep << ","; > + srep << TRI->getName(reg); > + } > + } > + srep << "]"; > + return srep.str(); > +} > + > +void PEI::dumpSet(const CSRegSet& s) { > + DOUT << stringifyCSRegSet(s) << "\n"; > +} > + > +void PEI::dumpUsed(MachineBasicBlock* MBB) { > + if (MBB) { > + DOUT << "CSRUsed[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRUsed[MBB]) << "\n"; > + } > +} > + > +void PEI::dumpAllUsed() { > + for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF- > >end(); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + dumpUsed(MBB); > + } > +} > + > +void PEI::dumpSets(MachineBasicBlock* MBB) { > + if (MBB) { > + DOUT << getBasicBlockName(MBB) << " | " > + << stringifyCSRegSet(CSRUsed[MBB]) << " | " > + << stringifyCSRegSet(AnticIn[MBB]) << " | " > + << stringifyCSRegSet(AnticOut[MBB]) << " | " > + << stringifyCSRegSet(AvailIn[MBB]) << " | " > + << stringifyCSRegSet(AvailOut[MBB]) << "\n"; > + } > +} > + > +void PEI::dumpSets1(MachineBasicBlock* MBB) { > + if (MBB) { > + DOUT << getBasicBlockName(MBB) << " | " > + << stringifyCSRegSet(CSRUsed[MBB]) << " | " > + << stringifyCSRegSet(AnticIn[MBB]) << " | " > + << stringifyCSRegSet(AnticOut[MBB]) << " | " > + << stringifyCSRegSet(AvailIn[MBB]) << " | " > + << stringifyCSRegSet(AvailOut[MBB]) << " | " > + << stringifyCSRegSet(CSRSave[MBB]) << " | " > + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; > + } > +} > + > +void PEI::dumpAllSets() { > + for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF- > >end(); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + dumpSets1(MBB); > + } > +} > + > +void PEI::dumpSRSets() { > + for (MachineFunction::iterator MBB = MF->begin(), E = MF->end(); > + MBB != E; ++MBB) { > + if (! CSRSave[MBB].empty()) { > + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRSave[MBB]); > + if (CSRRestore[MBB].empty()) > + DOUT << "\n"; > + } > + if (! CSRRestore[MBB].empty()) { > + if (! CSRSave[MBB].empty()) > + DOUT << " "; > + DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; > + } > + } > +} > +#endif > > > _______________________________________________ > 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 May 12 16:50:41 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 12 May 2009 14:50:41 -0700 Subject: [llvm-commits] MSVC cstdint In-Reply-To: <3f49a9f40905121414t6bf22586mca3dc0e0b92de303@mail.gmail.com> References: <3f49a9f40905121414t6bf22586mca3dc0e0b92de303@mail.gmail.com> Message-ID: On Tue, May 12, 2009 at 2:14 PM, OvermindDL1 wrote: > Which is more correct due to MSVC suffix (boost also defines > appropriate ones for appropriate compilers). The LLVM version is equally correct, as far as I can tell. Adding ifdefs seems reasonable, though. -Eli From isanbard at gmail.com Tue May 12 16:50:43 2009 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 12 May 2009 21:50:43 -0000 Subject: [llvm-commits] [llvm] r71600 - /llvm/trunk/include/llvm/ADT/SparseBitVector.h Message-ID: <200905122150.n4CLohVq009316@zion.cs.uiuc.edu> Author: void Date: Tue May 12 16:50:43 2009 New Revision: 71600 URL: http://llvm.org/viewvc/llvm-project?rev=71600&view=rev Log: Use struct instead of class to make MCVS compile. Modified: llvm/trunk/include/llvm/ADT/SparseBitVector.h Modified: llvm/trunk/include/llvm/ADT/SparseBitVector.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SparseBitVector.h?rev=71600&r1=71599&r2=71600&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/SparseBitVector.h (original) +++ llvm/trunk/include/llvm/ADT/SparseBitVector.h Tue May 12 16:50:43 2009 @@ -55,7 +55,7 @@ unsigned ElementIndex; BitWord Bits[BITWORDS_PER_ELEMENT]; // Needed for sentinels - friend class ilist_sentinel_traits; + friend struct ilist_sentinel_traits; SparseBitVectorElement() { ElementIndex = ~0U; memset(&Bits[0], 0, sizeof (BitWord) * BITWORDS_PER_ELEMENT); From isanbard at gmail.com Tue May 12 16:55:29 2009 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 12 May 2009 21:55:29 -0000 Subject: [llvm-commits] [llvm] r71601 - in /llvm/trunk: include/llvm/Analysis/LibCallAliasAnalysis.h lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h Message-ID: <200905122155.n4CLtUnC009483@zion.cs.uiuc.edu> Author: void Date: Tue May 12 16:55:29 2009 New Revision: 71601 URL: http://llvm.org/viewvc/llvm-project?rev=71601&view=rev Log: More MSVC fixes -- class/struct conflicts. Modified: llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h Modified: llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h?rev=71601&r1=71600&r2=71601&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h (original) +++ llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h Tue May 12 16:55:29 2009 @@ -19,7 +19,7 @@ namespace llvm { class LibCallInfo; - class LibCallFunctionInfo; + struct LibCallFunctionInfo; /// LibCallAliasAnalysis - Alias analysis driven from LibCallInfo. struct LibCallAliasAnalysis : public FunctionPass, AliasAnalysis { 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=71601&r1=71600&r2=71601&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h Tue May 12 16:55:29 2009 @@ -26,7 +26,7 @@ namespace llvm { -struct MachineJumpTableInfo; +class MachineJumpTableInfo; class VISIBILITY_HIDDEN X86ATTAsmPrinter : public AsmPrinter { DwarfWriter *DW; From andrewl at lenharth.org Tue May 12 16:56:13 2009 From: andrewl at lenharth.org (Andrew Lenharth) Date: Tue, 12 May 2009 16:56:13 -0500 Subject: [llvm-commits] RFC: initial union syntax support In-Reply-To: <85dfcd7f0905121101y62ac0c4esd27a518adbabd3b9@mail.gmail.com> References: <85dfcd7f0905121101y62ac0c4esd27a518adbabd3b9@mail.gmail.com> Message-ID: <85dfcd7f0905121456x5570de7dg3dfc35cde861ce1f@mail.gmail.com> with a couple more patches, codegen is working. the main in the example compiles to: movl foos(%rip), %ecx leal (%rcx,%rcx), %eax addl %ecx, %eax ret On Tue, May 12, 2009 at 1:01 PM, Andrew Lenharth wrote: > Below is initial syntax for union types. ?This is just syntax, I > haven't done an audit to find places that assume struct fields don't > overlap, nor updated the offset calculation code. ?A separate derived > class from CompositeType or StructType would also be reasonable if > people have objections to overloading StructType. > > This patch is enough to do things like: > ; ModuleID = '' > ? ? ? ?type union { i32, i8 } ? ? ? ? ?; type %0 > ? ? ? ?%struct.anon = type union { i8, i32, i32, i32 } > @foos = external global %struct.anon ? ? ? ? ? ?; <%struct.anon*> [#uses=3] > @bara = external global [2 x %0] ? ? ? ? ? ? ? ?; <[2 x %0]*> [#uses=2] > > define i32 @main() { > ? ? ? ?%tmp = load i32* getelementptr (%struct.anon* @foos, i32 0, > i32 1) ? ? ? ? ? ? ?; [#uses=1] > ? ? ? ?%tmp3 = load i32* getelementptr (%struct.anon* @foos, i32 0, > i32 2) ? ? ? ? ? ? ; [#uses=1] > ? ? ? ?%tmp6 = load i32* getelementptr (%struct.anon* @foos, i32 0, > i32 3) ? ? ? ? ? ? ; [#uses=1] > ? ? ? ?%tmp4 = add i32 %tmp3, %tmp ? ? ? ? ? ? ; [#uses=1] > ? ? ? ?%tmp7 = add i32 %tmp4, %tmp6 ? ? ? ? ? ?; [#uses=1] > ? ? ? ?ret i32 %tmp7 > } > > define i32 @bar() { > entry: > ? ? ? ?%tmp = load i32* getelementptr ([2 x %0]* @bara, i32 0, i32 0, > i32 0) ? ? ? ? ? ; [#uses=1] > ? ? ? ?%tmp4 = load i32* getelementptr ([2 x %0]* @bara, i32 0, i32 > 1, i32 0) ? ? ? ? ?; [#uses=1] > ? ? ? ?%tmp5 = add i32 %tmp4, %tmp ? ? ? ? ? ? ; [#uses=1] > ? ? ? ?ret i32 %tmp5 > } > > > > Index: include/llvm/DerivedTypes.h > =================================================================== > --- include/llvm/DerivedTypes.h (revision 71552) > +++ include/llvm/DerivedTypes.h (working copy) > @@ -218,13 +218,17 @@ > ? friend class TypeMap; > ? StructType(const StructType &); ? ? ? ? ? ? ? ? ? // Do not > implement > ? const StructType &operator=(const StructType &); ?// Do not > implement > - ?StructType(const std::vector &Types, bool isPacked); > + ?StructType(const std::vector &Types, > + ? ? ? ? ? ? bool isPacked, bool isUnion); > + ?enum {structPlain = 0, > + ? ? ? ?structPacked = 1, > + ? ? ? ?structUnion = 2}; > ?public: > ? /// StructType::get - This static method is the primary way to > create a > ? /// StructType. > ? /// > ? static StructType *get(const std::vector &Params, > - ? ? ? ? ? ? ? ? ? ? ? ? bool isPacked=false); > + ? ? ? ? ? ? ? ? ? ? ? ? bool isPacked=false, bool isUnion=false); > > ? /// StructType::get - This static method is a convenience method > for > ? /// creating structure types by specifying the elements as > arguments. > @@ -262,7 +266,9 @@ > ? ? return T->getTypeID() == StructTyID; > ? } > > - ?bool isPacked() const { return (0 != getSubclassData()) ? true : > false; } > + ?bool isPacked() const { return structPacked == getSubclassData(); } > + ?bool isUnion() const { return structUnion == getSubclassData(); } > + > ?}; > > > Index: include/llvm/Bitcode/LLVMBitCodes.h > =================================================================== > --- include/llvm/Bitcode/LLVMBitCodes.h (revision 71552) > +++ include/llvm/Bitcode/LLVMBitCodes.h (working copy) > @@ -90,7 +90,11 @@ > ? ? // binary compatibility. > ? ? TYPE_CODE_X86_FP80 = 13, ? // X86 LONG DOUBLE > ? ? TYPE_CODE_FP128 ? ?= 14, ? // LONG DOUBLE (112 bit mantissa) > - ? ?TYPE_CODE_PPC_FP128= 15 ? ?// PPC LONG DOUBLE (2 doubles) > + ? ?TYPE_CODE_PPC_FP128= 15, ? // PPC LONG DOUBLE (2 doubles) > + > + ? ?//Merge UNIOIN with STRUCT in LLVM 3.0 > + ? ?TYPE_CODE_UNION ? ?= 16 ? ?// UNIOIN: [eltty x N] > + > ? ? // Any other type code is assumed to be an unknown type. > ? }; > > Index: docs/LangRef.html > =================================================================== > --- docs/LangRef.html ? (revision 71552) > +++ docs/LangRef.html ? (working copy) > @@ -1579,8 +1579,31 @@ > ? > ? > ? > - > ? > + > +
> +
Overview:
> +

The union structure type is used to represent a collection of data > members > +overlapping in memory. ?All fields start at an offset of zero. ?The > elements of > +a union structure may be any type that has a size. ?The size of a > union is the > +size of the largest element. ?The alignment is the alignment of the > most restricted > +element.

> +

Structures are accessed using 'load > +and 'store' by getting a pointer to a > +field with the ' href="#i_getelementptr">getelementptr' > +instruction.

> +
Syntax:
> +
 ?< union { <type list> } > 
> +
Examples:
> + > + ? > + ? ? > + ? ? > + ? > +
< union { i32, i32*, i64 } >A union of three values
> +
> + > ? > ?
> ?
Overview:
> Index: lib/VMCore/AsmWriter.cpp > =================================================================== > --- lib/VMCore/AsmWriter.cpp ? ?(revision 71552) > +++ lib/VMCore/AsmWriter.cpp ? ?(working copy) > @@ -225,6 +225,8 @@ > ? ? const StructType *STy = cast(Ty); > ? ? if (STy->isPacked()) > ? ? ? OS << '<'; > + ? ?if (STy->isUnion()) > + ? ? ?OS << "union "; > ? ? OS << "{ "; > ? ? for (StructType::element_iterator I = STy->element_begin(), > ? ? ? ? ?E = STy->element_end(); I != E; ++I) { > Index: lib/VMCore/Type.cpp > =================================================================== > --- lib/VMCore/Type.cpp (revision 71552) > +++ lib/VMCore/Type.cpp (working copy) > @@ -338,11 +338,13 @@ > ? setAbstract(isAbstract); > ?} > > -StructType::StructType(const std::vector &Types, bool > isPacked) > +StructType::StructType(const std::vector &Types, bool > isPacked, > + ? ? ? ? ? ? ? ? ? ? ? bool isUnion) > ? : CompositeType(StructTyID) { > ? ContainedTys = reinterpret_cast(this + 1); > ? NumContainedTys = Types.size(); > - ?setSubclassData(isPacked); > + ?assert(!(isPacked && isUnion) && "Packed union not supported"); > + ?setSubclassData(isPacked + (int)isUnion * 2); > ? bool isAbstract = false; > ? for (unsigned i = 0; i < Types.size(); ++i) { > ? ? assert(Types[i] != Type::VoidTy && "Void type for structure > field!!"); > @@ -1107,9 +1109,11 @@ > ?class StructValType { > ? std::vector ElTypes; > ? bool packed; > + ?bool _union; > ?public: > - ?StructValType(const std::vector &args, bool isPacked) > - ? ?: ElTypes(args), packed(isPacked) {} > + ?StructValType(const std::vector &args, > + ? ? ? ? ? ? ? ?bool isPacked, bool isUnion) > + ? ?: ElTypes(args), packed(isPacked), _union(isUnion) {} > > ? static StructValType get(const StructType *ST) { > ? ? std::vector ElTypes; > @@ -1117,7 +1121,7 @@ > ? ? for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) > ? ? ? ElTypes.push_back(ST->getElementType(i)); > > - ? ?return StructValType(ElTypes, ST->isPacked()); > + ? ?return StructValType(ElTypes, ST->isPacked(), ?ST->isUnion()); > ? } > > ? static unsigned hashTypeStructure(const StructType *ST) { > @@ -1127,7 +1131,9 @@ > ? inline bool operator<(const StructValType &STV) const { > ? ? if (ElTypes < STV.ElTypes) return true; > ? ? else if (ElTypes > STV.ElTypes) return false; > - ? ?else return (int)packed < (int)STV.packed; > + ? ?else > + ? ? ?return (int)packed + 2 * (int)_union > + ? ? ? ? ? < (int)STV.packed + 2 * (int)STV._union; > ? } > ?}; > ?} > @@ -1135,15 +1141,15 @@ > ?static ManagedStatic > > StructTypes; > > ?StructType *StructType::get(const std::vector &ETypes, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ?bool isPacked) { > - ?StructValType STV(ETypes, isPacked); > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?bool isPacked, bool isUnion) { > + ?StructValType STV(ETypes, isPacked, isUnion); > ? StructType *ST = StructTypes->get(STV); > ? if (ST) return ST; > > ? // Value not found. ?Derive a new type! > ? ST = (StructType*) operator new(sizeof(StructType) + > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? sizeof(PATypeHandle) * > ETypes.size()); > - ?new (ST) StructType(ETypes, isPacked); > + ?new (ST) StructType(ETypes, isPacked, isUnion); > ? StructTypes->add(STV, ST); > > ?#ifdef DEBUG_MERGE_TYPES > Index: lib/AsmParser/LLParser.cpp > =================================================================== > --- lib/AsmParser/LLParser.cpp ?(revision 71552) > +++ lib/AsmParser/LLParser.cpp ?(working copy) > @@ -964,9 +964,15 @@ > ? ? Result = OpaqueType::get(); > ? ? Lex.Lex(); > ? ? break; > + ?case lltok::kw_union: > + ? ?// TypeRec ::= 'union' ... > + ? ?Lex.Lex(); //eat the kw_union > + ? ?if (ParseStructType(Result, false, true)) > + ? ? ?return true; > + ? ?break; > ? case lltok::lbrace: > ? ? // TypeRec ::= '{' ... '}' > - ? ?if (ParseStructType(Result, false)) > + ? ?if (ParseStructType(Result, false, false)) > ? ? ? return true; > ? ? break; > ? case lltok::lsquare: > @@ -979,7 +985,7 @@ > ? ? // TypeRec ::= '<' ... '>' > ? ? Lex.Lex(); > ? ? if (Lex.getKind() == lltok::lbrace) { > - ? ? ?if (ParseStructType(Result, true) || > + ? ? ?if (ParseStructType(Result, true, false) || > ? ? ? ? ? ParseToken(lltok::greater, "expected '>' at end of packed > struct")) > ? ? ? ? return true; > ? ? } else if (ParseArrayVectorType(Result, true)) > @@ -1222,18 +1228,22 @@ > ? return false; > ?} > > -/// ParseStructType: Handles packed and unpacked types. ? parsed > elsewhere. > +/// ParseStructType: Handles packed and unpacked types. ? and > union > +/// ? ? ? ? ? ? ? ? ?parsed elsewhere. > ?/// ? TypeRec > ?/// ? ? ::= '{' '}' > ?/// ? ? ::= '{' TypeRec (',' TypeRec)* '}' > ?/// ? ? ::= '<' '{' '}' '>' > ?/// ? ? ::= '<' '{' TypeRec (',' TypeRec)* '}' '>' > -bool LLParser::ParseStructType(PATypeHolder &Result, bool Packed) { > +/// ? ? ::= 'union' '{' '}' > +/// ? ? ::= 'union' '{' TypeRec (',' TypeRec)* '}' > + > +bool LLParser::ParseStructType(PATypeHolder &Result, bool Packed, > bool Union) { > ? assert(Lex.getKind() == lltok::lbrace); > ? Lex.Lex(); // Consume the '{' > > ? if (EatIfPresent(lltok::rbrace)) { > - ? ?Result = StructType::get(std::vector(), Packed); > + ? ?Result = StructType::get(std::vector(), Packed, > Union); > ? ? return false; > ? } > > @@ -1261,7 +1271,7 @@ > ? std::vector ParamsListTy; > ? for (unsigned i = 0, e = ParamsList.size(); i != e; ++i) > ? ? ParamsListTy.push_back(ParamsList[i].get()); > - ?Result = HandleUpRefs(StructType::get(ParamsListTy, Packed)); > + ?Result = HandleUpRefs(StructType::get(ParamsListTy, Packed, > Union)); > ? return false; > ?} > > Index: lib/AsmParser/LLLexer.cpp > =================================================================== > --- lib/AsmParser/LLLexer.cpp ? (revision 71552) > +++ lib/AsmParser/LLLexer.cpp ? (working copy) > @@ -550,6 +550,7 @@ > > ? KEYWORD(type); > ? KEYWORD(opaque); > + ?KEYWORD(union); > > ? KEYWORD(eq); KEYWORD(ne); KEYWORD(slt); KEYWORD(sgt); KEYWORD(sle); > ? KEYWORD(sge); KEYWORD(ult); KEYWORD(ugt); KEYWORD(ule); > KEYWORD(uge); > Index: lib/AsmParser/LLParser.h > =================================================================== > --- lib/AsmParser/LLParser.h ? ?(revision 71552) > +++ lib/AsmParser/LLParser.h ? ?(working copy) > @@ -147,7 +147,7 @@ > ? ? ? return ParseType(Result, AllowVoid); > ? ? } > ? ? bool ParseTypeRec(PATypeHolder &H); > - ? ?bool ParseStructType(PATypeHolder &H, bool Packed); > + ? ?bool ParseStructType(PATypeHolder &H, bool Packed, bool Union); > ? ? bool ParseArrayVectorType(PATypeHolder &H, bool isVector); > ? ? bool ParseFunctionType(PATypeHolder &Result); > ? ? PATypeHolder HandleUpRefs(const Type *Ty); > Index: lib/AsmParser/LLToken.h > =================================================================== > --- lib/AsmParser/LLToken.h ? ? (revision 71552) > +++ lib/AsmParser/LLToken.h ? ? (working copy) > @@ -83,6 +83,7 @@ > > ? ? kw_type, > ? ? kw_opaque, > + ? ?kw_union, > > ? ? kw_eq, kw_ne, kw_slt, kw_sgt, kw_sle, kw_sge, kw_ult, kw_ugt, > kw_ule, > ? ? kw_uge, kw_oeq, kw_one, kw_olt, kw_ogt, kw_ole, kw_oge, kw_ord, > kw_uno, > Index: lib/Bitcode/Reader/BitcodeReader.cpp > =================================================================== > --- lib/Bitcode/Reader/BitcodeReader.cpp ? ? ? ?(revision 71552) > +++ lib/Bitcode/Reader/BitcodeReader.cpp ? ? ? ?(working copy) > @@ -536,6 +536,13 @@ > ? ? ? ResultTy = StructType::get(EltTys, Record[0]); > ? ? ? break; > ? ? } > + ? ?case bitc::TYPE_CODE_UNION: { ?// UNION: [eltty x N] > + ? ? ?std::vector EltTys; > + ? ? ?for (unsigned i = 0, e = Record.size(); i != e; ++i) > + ? ? ? ?EltTys.push_back(getTypeByID(Record[i], true)); > + ? ? ?ResultTy = StructType::get(EltTys, false, true); > + ? ? ?break; > + ? ?} > ? ? case bitc::TYPE_CODE_ARRAY: ? ? // ARRAY: [numelts, eltty] > ? ? ? if (Record.size() < 2) > ? ? ? ? return Error("Invalid ARRAY type record"); > Index: lib/Bitcode/Writer/BitcodeWriter.cpp > =================================================================== > --- lib/Bitcode/Writer/BitcodeWriter.cpp ? ? ? ?(revision 71552) > +++ lib/Bitcode/Writer/BitcodeWriter.cpp ? ? ? ?(working copy) > @@ -176,6 +176,14 @@ > ? Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? Log2_32_Ceil(VE.getTypes().size()+1))); > ? unsigned StructAbbrev = Stream.EmitAbbrev(Abbv); > + > + ?// Abbrev for TYPE_CODE_UNION. > + ?Abbv = new BitCodeAbbrev(); > + ?Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_UNION)); > + ?Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); > + ?Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?Log2_32_Ceil(VE.getTypes().size()+1))); > + ?unsigned UnionAbbrev = Stream.EmitAbbrev(Abbv); > > ? // Abbrev for TYPE_CODE_ARRAY. > ? Abbv = new BitCodeAbbrev(); > @@ -235,14 +243,25 @@ > ? ? } > ? ? case Type::StructTyID: { > ? ? ? const StructType *ST = cast(T); > - ? ? ?// STRUCT: [ispacked, eltty x N] > - ? ? ?Code = bitc::TYPE_CODE_STRUCT; > - ? ? ?TypeVals.push_back(ST->isPacked()); > - ? ? ?// Output all of the element types. > - ? ? ?for (StructType::element_iterator I = ST->element_begin(), > - ? ? ? ? ? E = ST->element_end(); I != E; ++I) > - ? ? ? ?TypeVals.push_back(VE.getTypeID(*I)); > - ? ? ?AbbrevToUse = StructAbbrev; > + ? ? ?if (!ST->isUnion()) { > + ? ? ? ?// STRUCT: [ispacked, eltty x N] > + ? ? ? ?Code = bitc::TYPE_CODE_STRUCT; > + ? ? ? ?TypeVals.push_back(ST->isPacked()); > + ? ? ? ?// Output all of the element types. > + ? ? ? ?for (StructType::element_iterator I = ST->element_begin(), > + ? ? ? ? ? ? ? E = ST->element_end(); I != E; ++I) > + ? ? ? ? ?TypeVals.push_back(VE.getTypeID(*I)); > + ? ? ? ?AbbrevToUse = StructAbbrev; > + ? ? ?} else { > + ? ? ? ?//Unify with STRUCT in LLVM 3.0 > + ? ? ? ?// UNION: [eltty x N] > + ? ? ? ?Code = bitc::TYPE_CODE_UNION; > + ? ? ? ?// Output all of the element types. > + ? ? ? ?for (StructType::element_iterator I = ST->element_begin(), > + ? ? ? ? ? ? ? E = ST->element_end(); I != E; ++I) > + ? ? ? ? ?TypeVals.push_back(VE.getTypeID(*I)); > + ? ? ? ?AbbrevToUse = UnionAbbrev; > + ? ? ?} > ? ? ? break; > ? ? } > ? ? case Type::ArrayTyID: { > From ojomojo at gmail.com Tue May 12 17:04:17 2009 From: ojomojo at gmail.com (John Mosby) Date: Tue, 12 May 2009 16:04:17 -0600 Subject: [llvm-commits] [llvm] r71588 - in /llvm/trunk/lib/CodeGen: PEI.h PrologEpilogInserter.cpp ShrinkWrapping.cpp In-Reply-To: References: <200905122033.n4CKXUYg005872@zion.cs.uiuc.edu> Message-ID: <645d868c0905121504j76b77a97nf13faa6e0d556c92@mail.gmail.com> On Tue, May 12, 2009 at 3:32 PM, Evan Cheng wrote: > Thanks John. But the refactoring seems a bit strange to me. > > First of all, the convention is for the .h name to match the .cpp one. > So perhaps PEI.h should be PrologueEpilogueInserter.h? Of course, I'll rename it, sorry about that. > As for the > shrink wrapper, it doesn't have to be a separate pass, but can it be a > separate class? Are there too much sharing of information between the > two that the data passing overhead would be too high? A separate class will be better, there are only two maps that are shared. I'll put the shrink wrapping code into its own class. Thanks for the feedback! John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090512/ec5518ce/attachment.html From grosbach at apple.com Tue May 12 17:30:19 2009 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 12 May 2009 22:30:19 -0000 Subject: [llvm-commits] [llvm] r71602 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Message-ID: <200905122230.n4CMUJTs010764@zion.cs.uiuc.edu> Author: grosbach Date: Tue May 12 17:30:18 2009 New Revision: 71602 URL: http://llvm.org/viewvc/llvm-project?rev=71602&view=rev Log: correct register class for tADDspi to GPR since the register will always be SP 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=71602&r1=71601&r2=71602&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Tue May 12 17:30:18 2009 @@ -307,7 +307,7 @@ def tADDrSPi : TI<(outs tGPR:$dst), (ins GPR:$sp, i32imm:$rhs), "add $dst, $sp, $rhs * 4 @ addrspi", []>; -def tADDspi : TIt<(outs tGPR:$dst), (ins tGPR:$lhs, i32imm:$rhs), +def tADDspi : TIt<(outs GPR:$dst), (ins GPR:$lhs, i32imm:$rhs), "add $dst, $rhs * 4", []>; def tAND : TIt<(outs tGPR:$dst), (ins tGPR:$lhs, tGPR:$rhs), From dalej at apple.com Tue May 12 17:32:30 2009 From: dalej at apple.com (Dale Johannesen) Date: Tue, 12 May 2009 22:32:30 -0000 Subject: [llvm-commits] [llvm] r71603 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200905122232.n4CMWUVJ010853@zion.cs.uiuc.edu> Author: johannes Date: Tue May 12 17:32:29 2009 New Revision: 71603 URL: http://llvm.org/viewvc/llvm-project?rev=71603&view=rev Log: Slightly improve generated code in a degenerate case. Should remove a warning from MSVC. Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=71603&r1=71602&r2=71603&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Tue May 12 17:32:29 2009 @@ -2025,6 +2025,14 @@ OpcodeVTMap.find(OpName); std::vector &OpVTs = OpVTI->second; OS << " case " << OpName << ": {\n"; + // If we have only one variant and it's the default, elide the + // switch. Marginally faster, and makes MSVC happier. + if (OpVTs.size()==1 && OpVTs[0].empty()) { + OS << " return Select_" << getLegalCName(OpName) << "(N);\n"; + OS << " break;\n"; + OS << " }\n"; + continue; + } // Keep track of whether we see a pattern that has an iPtr result. bool HasPtrPattern = false; bool HasDefaultPattern = false; From andrewl at lenharth.org Tue May 12 18:00:13 2009 From: andrewl at lenharth.org (Andrew Lenharth) Date: Tue, 12 May 2009 18:00:13 -0500 Subject: [llvm-commits] RFC: initial union syntax support In-Reply-To: <85dfcd7f0905121456x5570de7dg3dfc35cde861ce1f@mail.gmail.com> References: <85dfcd7f0905121101y62ac0c4esd27a518adbabd3b9@mail.gmail.com> <85dfcd7f0905121456x5570de7dg3dfc35cde861ce1f@mail.gmail.com> Message-ID: <85dfcd7f0905121600w439bab62ncd3d7db1284749a7@mail.gmail.com> Updated patch. Supports C, Cpp, and all (?) native codegen. BasicAA updated to be conservative (but not completely enough yet). Making unions a type of struct makes most code just work as most code uses getOffset variants since structs can already have zero width elements. Index: include/llvm/DerivedTypes.h =================================================================== --- include/llvm/DerivedTypes.h (revision 71552) +++ include/llvm/DerivedTypes.h (working copy) @@ -218,13 +218,17 @@ friend class TypeMap; StructType(const StructType &); // Do not implement const StructType &operator=(const StructType &); // Do not implement - StructType(const std::vector &Types, bool isPacked); + StructType(const std::vector &Types, + bool isPacked, bool isUnion); + enum {structPlain = 0, + structPacked = 1, + structUnion = 2}; public: /// StructType::get - This static method is the primary way to create a /// StructType. /// static StructType *get(const std::vector &Params, - bool isPacked=false); + bool isPacked=false, bool isUnion=false); /// StructType::get - This static method is a convenience method for /// creating structure types by specifying the elements as arguments. @@ -262,7 +266,9 @@ return T->getTypeID() == StructTyID; } - bool isPacked() const { return (0 != getSubclassData()) ? true : false; } + bool isPacked() const { return structPacked == getSubclassData(); } + bool isUnion() const { return structUnion == getSubclassData(); } + }; Index: include/llvm/Bitcode/LLVMBitCodes.h =================================================================== --- include/llvm/Bitcode/LLVMBitCodes.h (revision 71552) +++ include/llvm/Bitcode/LLVMBitCodes.h (working copy) @@ -90,7 +90,11 @@ // binary compatibility. TYPE_CODE_X86_FP80 = 13, // X86 LONG DOUBLE TYPE_CODE_FP128 = 14, // LONG DOUBLE (112 bit mantissa) - TYPE_CODE_PPC_FP128= 15 // PPC LONG DOUBLE (2 doubles) + TYPE_CODE_PPC_FP128= 15, // PPC LONG DOUBLE (2 doubles) + + //Merge UNIOIN with STRUCT in LLVM 3.0 + TYPE_CODE_UNION = 16 // UNIOIN: [eltty x N] + // Any other type code is assumed to be an unknown type. }; Index: docs/LangRef.html =================================================================== --- docs/LangRef.html (revision 71552) +++ docs/LangRef.html (working copy) @@ -1579,8 +1579,31 @@
- + +
+
Overview:
+

The union structure type is used to represent a collection of data members +overlapping in memory. All fields start at an offset of zero. The elements of +a union structure may be any type that has a size. The size of a union is the +size of the largest element. The alignment is the alignment of the most restricted +element.

+

Structures are accessed using 'load +and 'store' by getting a pointer to a +field with the 'getelementptr' +instruction.

+
Syntax:
+
  < union { <type list> } > 
+
Examples:
+ + + + + +
< union { i32, i32*, i64 } >A union of three values
+
+
Overview:
Index: lib/Analysis/BasicAliasAnalysis.cpp =================================================================== --- lib/Analysis/BasicAliasAnalysis.cpp (revision 71552) +++ lib/Analysis/BasicAliasAnalysis.cpp (working copy) @@ -529,6 +529,12 @@ const PointerType *GEPPointerTy = cast(BasePtr1Ty); + //Fixme: Be conservative for Unions + //Fixme: This doesn't handle embedded unions + if (const StructType* STy = dyn_cast(GEPPointerTy->getElementType())) + if (STy->isUnion()) + return MayAlias; + // Find the (possibly empty) initial sequence of equal values... which are not // necessarily constants. unsigned NumGEP1Operands = NumGEP1Ops, NumGEP2Operands = NumGEP2Ops; @@ -570,7 +576,6 @@ if (AllAreZeros) return MustAlias; } - // So now we know that the indexes derived from the base pointers, // which are known to alias, are different. We can still determine a // no-alias result if there are differing constant pairs in the index Index: lib/Target/CBackend/CBackend.cpp =================================================================== --- lib/Target/CBackend/CBackend.cpp (revision 71552) +++ lib/Target/CBackend/CBackend.cpp (working copy) @@ -2132,7 +2132,9 @@ // Print out forward declarations for structure types before anything else! Out << "/* Structure forward decls */\n"; for (; I != End; ++I) { - std::string Name = "struct l_" + Mang->makeNameProper(I->first); + const StructType* STy = dyn_cast(I->second); + std::string Name = ((STy && STy->isUnion()) ? "union l_" : "struct l_") + + Mang->makeNameProper(I->first); Out << Name << ";\n"; TypeNames.insert(std::make_pair(I->second, Name)); } Index: lib/Target/CppBackend/CPPBackend.cpp =================================================================== --- lib/Target/CppBackend/CPPBackend.cpp (revision 71552) +++ lib/Target/CppBackend/CPPBackend.cpp (working copy) @@ -572,7 +572,10 @@ } Out << "StructType* " << typeName << " = StructType::get(" << typeName << "_fields, /*isPacked=*/" - << (ST->isPacked() ? "true" : "false") << ");"; + << (ST->isPacked() ? "true" : "false") + << ", /*isUnion=*/" + << (ST->isUnion() ? "true" : "false") + << ");"; nl(Out); break; } Index: lib/Target/TargetData.cpp =================================================================== --- lib/Target/TargetData.cpp (revision 71552) +++ lib/Target/TargetData.cpp (working copy) @@ -57,8 +57,13 @@ // Keep track of maximum alignment constraint. StructAlignment = std::max(TyAlign, StructAlignment); - MemberOffsets[i] = StructSize; - StructSize += TD.getTypeAllocSize(Ty); // Consume space for this data item + if (ST->isUnion()) { + MemberOffsets[i] = 0; + StructSize = std::max(StructSize, TD.getTypeAllocSize(Ty)); + } else { + MemberOffsets[i] = StructSize; + StructSize += TD.getTypeAllocSize(Ty); // Consume space for this data item + } } // Empty structures have alignment of 1 byte. @@ -84,6 +89,7 @@ "Upper bound didn't work!"); // Multiple fields can have the same offset if any of them are zero sized. + // This will also happen for union structures // For example, in { i32, [0 x i32], i32 }, searching for offset 4 will stop // at the i32 element, because it is the last element at that offset. This is // the right one to return, because anything after it will have a higher Index: lib/VMCore/AsmWriter.cpp =================================================================== --- lib/VMCore/AsmWriter.cpp (revision 71552) +++ lib/VMCore/AsmWriter.cpp (working copy) @@ -225,6 +225,8 @@ const StructType *STy = cast(Ty); if (STy->isPacked()) OS << '<'; + if (STy->isUnion()) + OS << "union "; OS << "{ "; for (StructType::element_iterator I = STy->element_begin(), E = STy->element_end(); I != E; ++I) { Index: lib/VMCore/Type.cpp =================================================================== --- lib/VMCore/Type.cpp (revision 71552) +++ lib/VMCore/Type.cpp (working copy) @@ -338,11 +338,13 @@ setAbstract(isAbstract); } -StructType::StructType(const std::vector &Types, bool isPacked) +StructType::StructType(const std::vector &Types, bool isPacked, + bool isUnion) : CompositeType(StructTyID) { ContainedTys = reinterpret_cast(this + 1); NumContainedTys = Types.size(); - setSubclassData(isPacked); + assert(!(isPacked && isUnion) && "Packed union not supported"); + setSubclassData(isPacked + (int)isUnion * 2); bool isAbstract = false; for (unsigned i = 0; i < Types.size(); ++i) { assert(Types[i] != Type::VoidTy && "Void type for structure field!!"); @@ -1107,9 +1109,11 @@ class StructValType { std::vector ElTypes; bool packed; + bool _union; public: - StructValType(const std::vector &args, bool isPacked) - : ElTypes(args), packed(isPacked) {} + StructValType(const std::vector &args, + bool isPacked, bool isUnion) + : ElTypes(args), packed(isPacked), _union(isUnion) {} static StructValType get(const StructType *ST) { std::vector ElTypes; @@ -1117,7 +1121,7 @@ for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) ElTypes.push_back(ST->getElementType(i)); - return StructValType(ElTypes, ST->isPacked()); + return StructValType(ElTypes, ST->isPacked(), ST->isUnion()); } static unsigned hashTypeStructure(const StructType *ST) { @@ -1127,7 +1131,9 @@ inline bool operator<(const StructValType &STV) const { if (ElTypes < STV.ElTypes) return true; else if (ElTypes > STV.ElTypes) return false; - else return (int)packed < (int)STV.packed; + else + return (int)packed + 2 * (int)_union + < (int)STV.packed + 2 * (int)STV._union; } }; } @@ -1135,15 +1141,15 @@ static ManagedStatic > StructTypes; StructType *StructType::get(const std::vector &ETypes, - bool isPacked) { - StructValType STV(ETypes, isPacked); + bool isPacked, bool isUnion) { + StructValType STV(ETypes, isPacked, isUnion); StructType *ST = StructTypes->get(STV); if (ST) return ST; // Value not found. Derive a new type! ST = (StructType*) operator new(sizeof(StructType) + sizeof(PATypeHandle) * ETypes.size()); - new (ST) StructType(ETypes, isPacked); + new (ST) StructType(ETypes, isPacked, isUnion); StructTypes->add(STV, ST); #ifdef DEBUG_MERGE_TYPES Index: lib/AsmParser/LLParser.cpp =================================================================== --- lib/AsmParser/LLParser.cpp (revision 71552) +++ lib/AsmParser/LLParser.cpp (working copy) @@ -964,9 +964,15 @@ Result = OpaqueType::get(); Lex.Lex(); break; + case lltok::kw_union: + // TypeRec ::= 'union' ... + Lex.Lex(); //eat the kw_union + if (ParseStructType(Result, false, true)) + return true; + break; case lltok::lbrace: // TypeRec ::= '{' ... '}' - if (ParseStructType(Result, false)) + if (ParseStructType(Result, false, false)) return true; break; case lltok::lsquare: @@ -979,7 +985,7 @@ // TypeRec ::= '<' ... '>' Lex.Lex(); if (Lex.getKind() == lltok::lbrace) { - if (ParseStructType(Result, true) || + if (ParseStructType(Result, true, false) || ParseToken(lltok::greater, "expected '>' at end of packed struct")) return true; } else if (ParseArrayVectorType(Result, true)) @@ -1222,18 +1228,22 @@ return false; } -/// ParseStructType: Handles packed and unpacked types. parsed elsewhere. +/// ParseStructType: Handles packed and unpacked types. and union +/// parsed elsewhere. /// TypeRec /// ::= '{' '}' /// ::= '{' TypeRec (',' TypeRec)* '}' /// ::= '<' '{' '}' '>' /// ::= '<' '{' TypeRec (',' TypeRec)* '}' '>' -bool LLParser::ParseStructType(PATypeHolder &Result, bool Packed) { +/// ::= 'union' '{' '}' +/// ::= 'union' '{' TypeRec (',' TypeRec)* '}' + +bool LLParser::ParseStructType(PATypeHolder &Result, bool Packed, bool Union) { assert(Lex.getKind() == lltok::lbrace); Lex.Lex(); // Consume the '{' if (EatIfPresent(lltok::rbrace)) { - Result = StructType::get(std::vector(), Packed); + Result = StructType::get(std::vector(), Packed, Union); return false; } @@ -1261,7 +1271,7 @@ std::vector ParamsListTy; for (unsigned i = 0, e = ParamsList.size(); i != e; ++i) ParamsListTy.push_back(ParamsList[i].get()); - Result = HandleUpRefs(StructType::get(ParamsListTy, Packed)); + Result = HandleUpRefs(StructType::get(ParamsListTy, Packed, Union)); return false; } Index: lib/AsmParser/LLLexer.cpp =================================================================== --- lib/AsmParser/LLLexer.cpp (revision 71552) +++ lib/AsmParser/LLLexer.cpp (working copy) @@ -550,6 +550,7 @@ KEYWORD(type); KEYWORD(opaque); + KEYWORD(union); KEYWORD(eq); KEYWORD(ne); KEYWORD(slt); KEYWORD(sgt); KEYWORD(sle); KEYWORD(sge); KEYWORD(ult); KEYWORD(ugt); KEYWORD(ule); KEYWORD(uge); Index: lib/AsmParser/LLParser.h =================================================================== --- lib/AsmParser/LLParser.h (revision 71552) +++ lib/AsmParser/LLParser.h (working copy) @@ -147,7 +147,7 @@ return ParseType(Result, AllowVoid); } bool ParseTypeRec(PATypeHolder &H); - bool ParseStructType(PATypeHolder &H, bool Packed); + bool ParseStructType(PATypeHolder &H, bool Packed, bool Union); bool ParseArrayVectorType(PATypeHolder &H, bool isVector); bool ParseFunctionType(PATypeHolder &Result); PATypeHolder HandleUpRefs(const Type *Ty); Index: lib/AsmParser/LLToken.h =================================================================== --- lib/AsmParser/LLToken.h (revision 71552) +++ lib/AsmParser/LLToken.h (working copy) @@ -83,6 +83,7 @@ kw_type, kw_opaque, + kw_union, kw_eq, kw_ne, kw_slt, kw_sgt, kw_sle, kw_sge, kw_ult, kw_ugt, kw_ule, kw_uge, kw_oeq, kw_one, kw_olt, kw_ogt, kw_ole, kw_oge, kw_ord, kw_uno, Index: lib/Transforms/Scalar/ScalarReplAggregates.cpp =================================================================== --- lib/Transforms/Scalar/ScalarReplAggregates.cpp (revision 71552) +++ lib/Transforms/Scalar/ScalarReplAggregates.cpp (working copy) @@ -562,8 +562,11 @@ // into. for (; I != E; ++I) { // Ignore struct elements, no extra checking needed for these. - if (isa(*I)) - continue; + if (StructType* STy = dyn_cast(*I)) + if (STy->isUnion()) + return MarkUnsafe(Info); + else + continue; ConstantInt *IdxVal = dyn_cast(I.getOperand()); if (!IdxVal) return MarkUnsafe(Info); @@ -1090,8 +1093,10 @@ /// HasPadding - Return true if the specified type has any structure or /// alignment padding, false otherwise. +/// Unions are conservatively assumed to have padding static bool HasPadding(const Type *Ty, const TargetData &TD) { if (const StructType *STy = dyn_cast(Ty)) { + if (STy->isUnion()) return true; const StructLayout *SL = TD.getStructLayout(STy); unsigned PrevFieldBitOffset = 0; for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { Index: lib/Bitcode/Reader/BitcodeReader.cpp =================================================================== --- lib/Bitcode/Reader/BitcodeReader.cpp (revision 71552) +++ lib/Bitcode/Reader/BitcodeReader.cpp (working copy) @@ -536,6 +536,13 @@ ResultTy = StructType::get(EltTys, Record[0]); break; } + case bitc::TYPE_CODE_UNION: { // UNION: [eltty x N] + std::vector EltTys; + for (unsigned i = 0, e = Record.size(); i != e; ++i) + EltTys.push_back(getTypeByID(Record[i], true)); + ResultTy = StructType::get(EltTys, false, true); + break; + } case bitc::TYPE_CODE_ARRAY: // ARRAY: [numelts, eltty] if (Record.size() < 2) return Error("Invalid ARRAY type record"); Index: lib/Bitcode/Writer/BitcodeWriter.cpp =================================================================== --- lib/Bitcode/Writer/BitcodeWriter.cpp (revision 71552) +++ lib/Bitcode/Writer/BitcodeWriter.cpp (working copy) @@ -176,6 +176,14 @@ Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, Log2_32_Ceil(VE.getTypes().size()+1))); unsigned StructAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_UNION. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_UNION)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(VE.getTypes().size()+1))); + unsigned UnionAbbrev = Stream.EmitAbbrev(Abbv); // Abbrev for TYPE_CODE_ARRAY. Abbv = new BitCodeAbbrev(); @@ -235,14 +243,25 @@ } case Type::StructTyID: { const StructType *ST = cast(T); - // STRUCT: [ispacked, eltty x N] - Code = bitc::TYPE_CODE_STRUCT; - TypeVals.push_back(ST->isPacked()); - // Output all of the element types. - for (StructType::element_iterator I = ST->element_begin(), - E = ST->element_end(); I != E; ++I) - TypeVals.push_back(VE.getTypeID(*I)); - AbbrevToUse = StructAbbrev; + if (!ST->isUnion()) { + // STRUCT: [ispacked, eltty x N] + Code = bitc::TYPE_CODE_STRUCT; + TypeVals.push_back(ST->isPacked()); + // Output all of the element types. + for (StructType::element_iterator I = ST->element_begin(), + E = ST->element_end(); I != E; ++I) + TypeVals.push_back(VE.getTypeID(*I)); + AbbrevToUse = StructAbbrev; + } else { + //Unify with STRUCT in LLVM 3.0 + // UNION: [eltty x N] + Code = bitc::TYPE_CODE_UNION; + // Output all of the element types. + for (StructType::element_iterator I = ST->element_begin(), + E = ST->element_end(); I != E; ++I) + TypeVals.push_back(VE.getTypeID(*I)); + AbbrevToUse = UnionAbbrev; + } break; } case Type::ArrayTyID: { From evan.cheng at apple.com Tue May 12 18:07:01 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 12 May 2009 23:07:01 -0000 Subject: [llvm-commits] [llvm] r71606 - in /llvm/trunk: lib/CodeGen/RegAllocLinearScan.cpp lib/CodeGen/VirtRegRewriter.cpp test/CodeGen/X86/2007-03-01-SpillerCrash.ll Message-ID: <200905122307.n4CN72m5012419@zion.cs.uiuc.edu> Author: evancheng Date: Tue May 12 18:07:00 2009 New Revision: 71606 URL: http://llvm.org/viewvc/llvm-project?rev=71606&view=rev Log: Teach TransferDeadness to delete truly dead instructions if they do not produce side effects. Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp llvm/trunk/lib/CodeGen/VirtRegRewriter.cpp llvm/trunk/test/CodeGen/X86/2007-03-01-SpillerCrash.ll Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=71606&r1=71605&r2=71606&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Tue May 12 18:07:00 2009 @@ -350,29 +350,44 @@ if (!vni->def || vni->def == ~1U || vni->def == ~0U) return Reg; MachineInstr *CopyMI = li_->getInstructionFromIndex(vni->def); - unsigned SrcReg, DstReg, SrcSubReg, DstSubReg; + unsigned SrcReg, DstReg, SrcSubReg, DstSubReg, PhysReg; if (!CopyMI || !tii_->isMoveInstr(*CopyMI, SrcReg, DstReg, SrcSubReg, DstSubReg)) return Reg; + PhysReg = SrcReg; if (TargetRegisterInfo::isVirtualRegister(SrcReg)) { if (!vrm_->isAssignedReg(SrcReg)) return Reg; - else - SrcReg = vrm_->getPhys(SrcReg); + PhysReg = vrm_->getPhys(SrcReg); } - if (Reg == SrcReg) + if (Reg == PhysReg) return Reg; const TargetRegisterClass *RC = mri_->getRegClass(cur.reg); - if (!RC->contains(SrcReg)) + if (!RC->contains(PhysReg)) return Reg; // Try to coalesce. - if (!li_->conflictsWithPhysRegDef(cur, *vrm_, SrcReg)) { - DOUT << "Coalescing: " << cur << " -> " << tri_->getName(SrcReg) + if (!li_->conflictsWithPhysRegDef(cur, *vrm_, PhysReg)) { + DOUT << "Coalescing: " << cur << " -> " << tri_->getName(PhysReg) << '\n'; vrm_->clearVirt(cur.reg); - vrm_->assignVirt2Phys(cur.reg, SrcReg); + vrm_->assignVirt2Phys(cur.reg, PhysReg); + + // Remove unnecessary kills since a copy does not clobber the register. + if (li_->hasInterval(SrcReg)) { + LiveInterval &SrcLI = li_->getInterval(SrcReg); + for (MachineRegisterInfo::reg_iterator I = mri_->reg_begin(cur.reg), + E = mri_->reg_end(); I != E; ++I) { + MachineOperand &O = I.getOperand(); + if (!O.isUse() || !O.isKill()) + continue; + MachineInstr *MI = &*I; + if (SrcLI.liveAt(li_->getDefIndex(li_->getInstructionIndex(MI)))) + O.setIsKill(false); + } + } + ++NumCoalesce; return SrcReg; } Modified: llvm/trunk/lib/CodeGen/VirtRegRewriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegRewriter.cpp?rev=71606&r1=71605&r2=71606&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/VirtRegRewriter.cpp (original) +++ llvm/trunk/lib/CodeGen/VirtRegRewriter.cpp Tue May 12 18:07:00 2009 @@ -851,6 +851,14 @@ } } +namespace { + struct RefSorter { + bool operator()(const std::pair &A, + const std::pair &B) { + return A.second < B.second; + } + }; +} // ***************************** // // Local Spiller Implementation // @@ -1313,9 +1321,10 @@ /// removed. Find the last def or use and mark it as dead / kill. void TransferDeadness(MachineBasicBlock *MBB, unsigned CurDist, unsigned Reg, BitVector &RegKills, - std::vector &KillOps) { - int LastUDDist = -1; - MachineInstr *LastUDMI = NULL; + std::vector &KillOps, + VirtRegMap &VRM) { + SmallPtrSet Seens; + SmallVector,8> Refs; for (MachineRegisterInfo::reg_iterator RI = RegInfo->reg_begin(Reg), RE = RegInfo->reg_end(); RI != RE; ++RI) { MachineInstr *UDMI = &*RI; @@ -1324,13 +1333,18 @@ DenseMap::iterator DI = DistanceMap.find(UDMI); if (DI == DistanceMap.end() || DI->second > CurDist) continue; - if ((int)DI->second < LastUDDist) - continue; - LastUDDist = DI->second; - LastUDMI = UDMI; + if (Seens.insert(UDMI)) + Refs.push_back(std::make_pair(UDMI, DI->second)); } - if (LastUDMI) { + if (Refs.empty()) + return; + std::sort(Refs.begin(), Refs.end(), RefSorter()); + + while (!Refs.empty()) { + MachineInstr *LastUDMI = Refs.back().first; + Refs.pop_back(); + MachineOperand *LastUD = NULL; for (unsigned i = 0, e = LastUDMI->getNumOperands(); i != e; ++i) { MachineOperand &MO = LastUDMI->getOperand(i); @@ -1339,14 +1353,24 @@ if (!LastUD || (LastUD->isUse() && MO.isDef())) LastUD = &MO; if (LastUDMI->isRegTiedToDefOperand(i)) - return; + break; } - if (LastUD->isDef()) - LastUD->setIsDead(); - else { + if (LastUD->isDef()) { + // If the instruction has no side effect, delete it and propagate + // backward further. Otherwise, mark is dead and we are done. + const TargetInstrDesc &TID = LastUDMI->getDesc(); + if (TID.mayStore() || TID.isCall() || TID.isTerminator() || + TID.hasUnmodeledSideEffects()) { + LastUD->setIsDead(); + break; + } + VRM.RemoveMachineInstrFromMaps(LastUDMI); + MBB->erase(LastUDMI); + } else { LastUD->setIsKill(); RegKills.set(Reg); KillOps[Reg] = LastUD; + break; } } } @@ -2027,7 +2051,7 @@ TRI->isSubRegister(KillRegs[0], Dst) || TRI->isSuperRegister(KillRegs[0], Dst)); // Last def is now dead. - TransferDeadness(&MBB, Dist, Src, RegKills, KillOps); + TransferDeadness(&MBB, Dist, Src, RegKills, KillOps, VRM); } VRM.RemoveMachineInstrFromMaps(&MI); MBB.erase(&MI); Modified: llvm/trunk/test/CodeGen/X86/2007-03-01-SpillerCrash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-03-01-SpillerCrash.ll?rev=71606&r1=71605&r2=71606&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2007-03-01-SpillerCrash.ll (original) +++ llvm/trunk/test/CodeGen/X86/2007-03-01-SpillerCrash.ll Tue May 12 18:07:00 2009 @@ -1,4 +1,5 @@ ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin8 -mattr=+sse2 +; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin8 -mattr=+sse2 | not grep movhlps define void @test() nounwind { test.exit: From evan.cheng at apple.com Tue May 12 18:52:16 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 12 May 2009 16:52:16 -0700 Subject: [llvm-commits] [llvm] r71438 - in /llvm/trunk: include/llvm/ADT/SparseBitVector.h lib/CodeGen/PrologEpilogInserter.cpp In-Reply-To: <200905111704.n4BH4Kr9026553@zion.cs.uiuc.edu> References: <200905111704.n4BH4Kr9026553@zion.cs.uiuc.edu> Message-ID: On May 11, 2009, at 10:04 AM, John Mosby wrote: > Author: jdm > Date: Mon May 11 12:04:19 2009 > New Revision: 71438 > > URL: http://llvm.org/viewvc/llvm-project?rev=71438&view=rev > Log: > > Shrink wrapping in PEI: > - reduces _static_ callee saved register spills > and restores similar to Chow's original algorithm. > - iterative implementation with simple heuristic > limits to mitigate compile time impact. > - handles placing spills/restores for multi-entry, > multi-exit regions in the Machine CFG without > splitting edges. > - passes test-suite in LLCBETA mode. Hi John, Were there any noticeable performance differences? Thanks, Evan > > Added contains() method to ADT/SparseBitVector. > > Modified: > llvm/trunk/include/llvm/ADT/SparseBitVector.h > llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp > > Modified: llvm/trunk/include/llvm/ADT/SparseBitVector.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SparseBitVector.h?rev=71438&r1=71437&r2=71438&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/include/llvm/ADT/SparseBitVector.h (original) > +++ llvm/trunk/include/llvm/ADT/SparseBitVector.h Mon May 11 > 12:04:19 2009 > @@ -641,8 +641,8 @@ > return changed; > } > > - // Intersect our bitmap with the complement of the RHS and return > true if ours > - // changed. > + // Intersect our bitmap with the complement of the RHS and return > true > + // if ours changed. > bool intersectWithComplement(const SparseBitVector &RHS) { > bool changed = false; > ElementListIter Iter1 = Elements.begin(); > @@ -685,8 +685,8 @@ > } > > > - // Three argument version of intersectWithComplement. Result of > RHS1 & ~RHS2 > - // is stored into this bitmap. > + // Three argument version of intersectWithComplement. > + // Result of RHS1 & ~RHS2 is stored into this bitmap. > void intersectWithComplement(const SparseBitVector > &RHS1, > const SparseBitVector > &RHS2) > { > @@ -775,6 +775,14 @@ > return false; > } > > + // Return true iff all bits set in this SparseBitVector are > + // also set in RHS. > + bool contains(const SparseBitVector &RHS) const { > + SparseBitVector Result(*this); > + Result &= RHS; > + return (Result == RHS); > + } > + > // Return the first set bit in the bitmap. Return -1 if no bits > are set. > int find_first() const { > if (Elements.empty()) > @@ -875,6 +883,8 @@ > } > > > + > + > // Dump a SparseBitVector to a stream > template > void dump(const SparseBitVector &LHS, llvm::OStream > &out) { > > Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=71438&r1=71437&r2=71438&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) > +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Mon May 11 > 12:04:19 2009 > @@ -60,15 +60,41 @@ > #include "llvm/Support/Compiler.h" > #include "llvm/Support/Debug.h" > #include "llvm/ADT/STLExtras.h" > +#include "llvm/ADT/Statistic.h" > #include > #include > > using namespace llvm; > > +STATISTIC(numSRReduced, "Number of CSR spills+restores reduced."); > + > // Shrink Wrapping: > static cl::opt > ShrinkWrapping("shrink-wrap", > - cl::desc("Apply shrink wrapping to callee-saved register spills/ > restores")); > + cl::desc("Shrink wrap callee-saved register spills/ > restores")); > + > +// Shrink wrap only the specified function, a debugging aid. > +static cl::opt > +ShrinkWrapFunc("shrink-wrap-func", cl::Hidden, > + cl::desc("Shrink wrap the specified function"), > + cl::value_desc("funcname"), > + cl::init("")); > + > +// Debugging level for shrink wrapping. > +enum ShrinkWrapDebugLevel { > + None, BasicInfo, Iterations, Details > +}; > + > +static cl::opt > +ShrinkWrapDebugging("shrink-wrap-dbg", cl::Hidden, > + cl::desc("Print shrink wrapping debugging information"), > + cl::values( > + clEnumVal(None , "disable debug output"), > + clEnumVal(BasicInfo , "print basic DF sets"), > + clEnumVal(Iterations, "print SR sets for each iteration"), > + clEnumVal(Details , "print all DF sets"), > + clEnumValEnd)); > + > > namespace { > struct VISIBILITY_HIDDEN PEI : public MachineFunctionPass { > @@ -81,7 +107,7 @@ > > virtual void getAnalysisUsage(AnalysisUsage &AU) const { > AU.setPreservesCFG(); > - if (ShrinkWrapping) { > + if (ShrinkWrapping || ShrinkWrapFunc != "") { > AU.addRequired(); > AU.addRequired(); > } > @@ -97,6 +123,8 @@ > const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo > (); > RS = TRI->requiresRegisterScavenging(Fn) ? new RegScavenger > () : NULL; > > + DEBUG(MF = &Fn); > + > // Get MachineModuleInfo so that we can track the construction > of the > // frame. > if (MachineModuleInfo *MMI = > getAnalysisIfAvailable()) > @@ -127,7 +155,7 @@ > // before the frame layout is finalized. > TRI->processFunctionBeforeFrameFinalized(Fn); > > - // Calculate actual frame offsets for all of the abstract > stack objects... > + // Calculate actual frame offsets for all abstract stack > objects... > calculateFrameObjectOffsets(Fn); > > // Add prolog and epilog code to the function. This function > is required > @@ -143,6 +171,7 @@ > replaceFrameIndices(Fn); > > delete RS; > + clearAllSets(); > return true; > } > > @@ -172,7 +201,6 @@ > // available in a basic block (Avail{In,Out}) > // to be spilled at the entry to a basic block (CSRSave) > // to be restored at the end of a basic block (CSRRestore) > - > CSRegSet UsedCSRegs; > CSRegBlockMap CSRUsed; > CSRegBlockMap AnticIn, AnticOut; > @@ -184,22 +212,37 @@ > MachineBasicBlock* EntryBlock; > SmallVector ReturnBlocks; > > + // Map of MBBs to top level MachineLoops. > + DenseMap TLLoops; > + > // Flag to control shrink wrapping per-function: > // may choose to skip shrink wrapping for certain > // functions. > bool ShrinkWrapThisFunction; > > +#ifndef NDEBUG > + // Machine function handle. > + MachineFunction* MF; > + > + // Flag indicating that the current function > + // has at least one "short" path in the machine > + // CFG from the entry block to an exit block. > + bool HasFastExitPath; > +#endif > + > bool calculateSets(MachineFunction &Fn); > + bool calcAnticInOut(MachineBasicBlock* MBB); > + bool calcAvailInOut(MachineBasicBlock* MBB); > void calculateAnticAvail(MachineFunction &Fn); > - MachineBasicBlock* moveSpillsOutOfLoops(MachineFunction &Fn, > - MachineBasicBlock* MBB); > - void addRestoresForSBranchBlock(MachineFunction &Fn, > - MachineBasicBlock* MBB); > - void moveRestoresOutOfLoops(MachineFunction& Fn, > - MachineBasicBlock* MBB, > - std::vector& > SBLKS); > - void addSavesForRJoinBlocks(MachineFunction& Fn, > - std::vector& > SBLKS); > + bool addUsesForMEMERegion(MachineBasicBlock* MBB, > + SmallVector& > blks); > + bool addUsesForTopLevelLoops(SmallVector 4>& blks); > + bool calcSpillPlacements(MachineBasicBlock* MBB, > + SmallVector > &blks, > + CSRegBlockMap &prevSpills); > + bool calcRestorePlacements(MachineBasicBlock* MBB, > + SmallVector > &blks, > + CSRegBlockMap &prevRestores); > void placeSpillsAndRestores(MachineFunction &Fn); > void placeCSRSpillsAndRestores(MachineFunction &Fn); > void calculateCalleeSavedRegisters(MachineFunction &Fn); > @@ -208,21 +251,13 @@ > void replaceFrameIndices(MachineFunction &Fn); > void insertPrologEpilogCode(MachineFunction &Fn); > > + // Initialize DFA sets, called before iterations. > + void clearAnticAvailSets(); > + // Clear all sets constructed by shrink wrapping. > + void clearAllSets(); > + > // Initialize all shrink wrapping data. > - void initShrinkWrappingInfo() { > - UsedCSRegs.clear(); > - CSRUsed.clear(); > - AnticIn.clear(); > - AnticOut.clear(); > - AvailIn.clear(); > - AvailOut.clear(); > - CSRSave.clear(); > - CSRRestore.clear(); > - EntryBlock = 0; > - if (! ReturnBlocks.empty()) > - ReturnBlocks.clear(); > - ShrinkWrapThisFunction = ShrinkWrapping; > - } > + void initShrinkWrappingInfo(); > > // Convienences for dealing with machine loops. > MachineBasicBlock* getTopLevelLoopPreheader(MachineLoop* LP) { > @@ -247,60 +282,79 @@ > return LP; > } > > + // Propgate CSRs used in MBB to all MBBs of loop LP. > + void propagateUsesAroundLoop(MachineBasicBlock* MBB, > MachineLoop* LP); > + > + // Convenience for recognizing return blocks. > + bool isReturnBlock(MachineBasicBlock* MBB) { > + return (MBB && !MBB->empty() && MBB->back().getDesc().isReturn > ()); > + } > + > #ifndef NDEBUG > // Debugging methods. > - static std::string getBasicBlockName(const MachineBasicBlock* > MBB) { > - std::ostringstream name; > - if (MBB) { > - if (MBB->getBasicBlock()) > - name << MBB->getBasicBlock()->getName(); > - else > - name << "_MBB_" << MBB->getNumber(); > - } > - return name.str(); > - } > > - static std::string stringifyCSRegSet(const CSRegSet& s, > - MachineFunction &Fn) { > - const TargetRegisterInfo* TRI = Fn.getTarget().getRegisterInfo > (); > - const std::vector CSI = > - Fn.getFrameInfo()->getCalleeSavedInfo(); > - > - std::ostringstream srep; > - if (CSI.size() == 0) { > - srep << "[]"; > - return srep.str(); > - } > - srep << "["; > - CSRegSet::iterator I = s.begin(), E = s.end(); > - if (I != E) { > - unsigned reg = CSI[*I].getReg(); > - srep << TRI->getName(reg); > - for (++I; I != E; ++I) { > - reg = CSI[*I].getReg(); > - srep << ","; > - srep << TRI->getName(reg); > - } > - } > - srep << "]"; > - return srep.str(); > - } > + // Mark this function as having fast exit paths. > + void findFastExitPath(); > > - static void dumpSet(const CSRegSet& s, MachineFunction &Fn) { > - DOUT << stringifyCSRegSet(s, Fn) << "\n"; > - } > + // Verify placement of spills/restores. > + void verifySpillRestorePlacement(); > + > + std::string getBasicBlockName(const MachineBasicBlock* MBB); > + std::string stringifyCSRegSet(const CSRegSet& s); > + void dumpSet(const CSRegSet& s); > + void dumpUsed(MachineBasicBlock* MBB); > + void dumpAllUsed(); > + void dumpSets(MachineBasicBlock* MBB); > + void dumpSets1(MachineBasicBlock* MBB); > + void dumpAllSets(); > + void dumpSRSets(); > #endif > > }; > char PEI::ID = 0; > } > > +// Initialize shrink wrapping DFA sets, called before iterations. > +void PEI::clearAnticAvailSets() { > + AnticIn.clear(); > + AnticOut.clear(); > + AvailIn.clear(); > + AvailOut.clear(); > +} > + > +// Clear all sets constructed by shrink wrapping. > +void PEI::clearAllSets() { > + ReturnBlocks.clear(); > + clearAnticAvailSets(); > + UsedCSRegs.clear(); > + CSRUsed.clear(); > + TLLoops.clear(); > + CSRSave.clear(); > + CSRRestore.clear(); > +} > + > +// Initialize all shrink wrapping data. > +void PEI::initShrinkWrappingInfo() { > + clearAllSets(); > + EntryBlock = 0; > + HasFastExitPath = false; > + ShrinkWrapThisFunction = ShrinkWrapping; > + // DEBUG: enable or disable shrink wrapping for the current > function > + // via --shrink-wrap-func=. > +#ifndef NDEBUG > + if (ShrinkWrapFunc != "") { > + std::string MFName = MF->getFunction()->getName(); > + ShrinkWrapThisFunction = (MFName == ShrinkWrapFunc); > + } > +#endif > +} > + > + > /// createPrologEpilogCodeInserter - This function returns a pass > that inserts > /// prolog and epilog code, and eliminates abstract frame references. > /// > FunctionPass *llvm::createPrologEpilogCodeInserter() { return new PEI > (); } > > - > /// placeCSRSpillsAndRestores - determine which MBBs of the function > /// need save, restore code for callee-saved registers by doing a DF > analysis > /// similar to the one used in code motion (GVNPRE). This produces > maps of MBBs > @@ -316,167 +370,222 @@ > /// > void PEI::placeCSRSpillsAndRestores(MachineFunction &Fn) { > > -#ifndef NDEBUG > - DOUT << "Place CSR spills/restores for " > - << Fn.getFunction()->getName() << "\n"; > -#endif > - > initShrinkWrappingInfo(); > > + DEBUG(if (ShrinkWrapThisFunction) { > + DOUT << "Place CSR spills/restores for " > + << MF->getFunction()->getName() << "\n"; > + }); > + > if (calculateSets(Fn)) > placeSpillsAndRestores(Fn); > } > > -/// calculateAnticAvail - helper for computing the data flow > -/// sets required for determining spill/restore placements. > +/// calcAnticInOut - calculate the anticipated in/out reg sets > +/// for the given MBB by looking forward in the MCFG at MBB's > +/// successors. > +/// > +bool PEI::calcAnticInOut(MachineBasicBlock* MBB) { > + bool changed = false; > + > + // AnticOut[MBB] = INTERSECT(AnticIn[S] for S in SUCCESSORS(MBB)) > + SmallVector successors; > + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > + SE = MBB->succ_end(); SI != SE; ++SI) { > + MachineBasicBlock* SUCC = *SI; > + if (SUCC != MBB) > + successors.push_back(SUCC); > + } > + > + unsigned i = 0, e = successors.size(); > + if (i != e) { > + CSRegSet prevAnticOut = AnticOut[MBB]; > + MachineBasicBlock* SUCC = successors[i]; > + > + AnticOut[MBB] = AnticIn[SUCC]; > + for (++i; i != e; ++i) { > + SUCC = successors[i]; > + AnticOut[MBB] &= AnticIn[SUCC]; > + } > + if (prevAnticOut != AnticOut[MBB]) > + changed = true; > + } > + > + // AnticIn[MBB] = UNION(CSRUsed[MBB], AnticOut[MBB]); > + CSRegSet prevAnticIn = AnticIn[MBB]; > + AnticIn[MBB] = CSRUsed[MBB] | AnticOut[MBB]; > + if (prevAnticIn |= AnticIn[MBB]) > + changed = true; > + return changed; > +} > + > +/// calcAvailInOut - calculate the available in/out reg sets > +/// for the given MBB by looking backward in the MCFG at MBB's > +/// predecessors. > +/// > +bool PEI::calcAvailInOut(MachineBasicBlock* MBB) { > + bool changed = false; > + > + // AvailIn[MBB] = INTERSECT(AvailOut[P] for P in PREDECESSORS(MBB)) > + SmallVector predecessors; > + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > + PE = MBB->pred_end(); PI != PE; ++PI) { > + MachineBasicBlock* PRED = *PI; > + if (PRED != MBB) > + predecessors.push_back(PRED); > + } > + > + unsigned i = 0, e = predecessors.size(); > + if (i != e) { > + CSRegSet prevAvailIn = AvailIn[MBB]; > + MachineBasicBlock* PRED = predecessors[i]; > + > + AvailIn[MBB] = AvailOut[PRED]; > + for (++i; i != e; ++i) { > + PRED = predecessors[i]; > + AvailIn[MBB] &= AvailOut[PRED]; > + } > + if (prevAvailIn != AvailIn[MBB]) > + changed = true; > + } > + > + // AvailOut[MBB] = UNION(CSRUsed[MBB], AvailIn[MBB]); > + CSRegSet prevAvailOut = AvailOut[MBB]; > + AvailOut[MBB] = CSRUsed[MBB] | AvailIn[MBB]; > + if (prevAvailOut |= AvailOut[MBB]) > + changed = true; > + return changed; > +} > + > +/// calculateAnticAvail - build the sets anticipated and available > +/// registers in the MCFG of the current function iteratively, > +/// doing a combined forward and backward analysis. > /// > void PEI::calculateAnticAvail(MachineFunction &Fn) { > + // Initialize data flow sets. > + clearAnticAvailSets(); > > // Calulate Antic{In,Out} and Avail{In,Out} iteratively on the MCFG. > bool changed = true; > unsigned iterations = 0; > while (changed) { > changed = false; > + ++iterations; > for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); > MBBI != MBBE; ++MBBI) { > MachineBasicBlock* MBB = MBBI; > > - // AnticOut[MBB] = INTERSECT(AnticIn[S] for S in SUCC(MBB)) > - MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > - SE = MBB->succ_end(); > - if (SI != SE) { > - CSRegSet prevAnticOut = AnticOut[MBB]; > - MachineBasicBlock* SUCC = *SI; > - AnticOut[MBB] = AnticIn[SUCC]; > - for (++SI; SI != SE; ++SI) { > - SUCC = *SI; > - AnticOut[MBB] &= AnticIn[SUCC]; > - } > - if (prevAnticOut != AnticOut[MBB]) > - changed = true; > - } > - // AnticIn[MBB] = CSRUsed[MBB] | AnticOut[MBB]; > - CSRegSet prevAnticIn = AnticIn[MBB]; > - AnticIn[MBB] = CSRUsed[MBB] | AnticOut[MBB]; > - if (prevAnticIn |= AnticIn[MBB]) > - changed = true; > - > - // AvailIn[MBB] = INTERSECT(AvailOut[S] for S in PRED(MBB)) > - MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > - PE = MBB->pred_end(); > - if (PI != PE) { > - CSRegSet prevAvailIn = AvailIn[MBB]; > - MachineBasicBlock* PRED = *PI; > - AvailIn[MBB] = AvailOut[PRED]; > - for (++PI; PI != PE; ++PI) { > - PRED = *PI; > - AvailIn[MBB] &= AvailOut[PRED]; > - } > - if (prevAvailIn != AvailIn[MBB]) > - changed = true; > - } > - // AvailOut[MBB] = CSRUsed[MBB] | AvailIn[MBB]; > - CSRegSet prevAvailOut = AvailOut[MBB]; > - AvailOut[MBB] = CSRUsed[MBB] | AvailIn[MBB]; > - if (prevAvailOut |= AvailOut[MBB]) > - changed = true; > + // Calculate anticipated in, out regs at MBB from > + // anticipated at successors of MBB. > + changed |= calcAnticInOut(MBB); > + > + // Calculate available in, out regs at MBB from > + // available at predecessors of MBB. > + changed |= calcAvailInOut(MBB); > } > - ++iterations; > } > > - // EXP > - AnticIn[EntryBlock].clear(); > - AnticOut[EntryBlock].clear(); > + DEBUG(if (ShrinkWrapDebugging >= Details) { > + DOUT << > "-----------------------------------------------------------\n"; > + DOUT << " Antic/Avail Sets:\n"; > + DOUT << > "-----------------------------------------------------------\n"; > + DOUT << "iterations = " << iterations << "\n"; > + DOUT << > "-----------------------------------------------------------\n"; > + DOUT << "MBB | USED | ANTIC_IN | ANTIC_OUT | AVAIL_IN | > AVAIL_OUT\n"; > + DOUT << > "-----------------------------------------------------------\n"; > + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = > Fn.end(); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + dumpSets(MBB); > + } > + DOUT << > "-----------------------------------------------------------\n"; > + }); > +} > > -#ifndef NDEBUG > - DOUT << > "-----------------------------------------------------------\n"; > - DOUT << "iterations = " << iterations << "\n"; > - DOUT << > "-----------------------------------------------------------\n"; > - DOUT << "MBB | ANTIC_IN | ANTIC_OUT | AVAIL_IN | AVAIL_OUT\n"; > - DOUT << > "-----------------------------------------------------------\n"; > - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); > - MBBI != MBBE; ++MBBI) { > - MachineBasicBlock* MBB = MBBI; > +/// propagateUsesAroundLoop - copy used register info from MBB to > all blocks > +/// of the loop given by LP and its parent loops. This prevents > spills/restores > +/// from being placed in the bodies of loops. > +/// > +void PEI::propagateUsesAroundLoop(MachineBasicBlock* MBB, > MachineLoop* LP) { > + if (! MBB || !LP) > + return; > > - DOUT << getBasicBlockName(MBB) << " | " > - << stringifyCSRegSet(AnticIn[MBB], Fn) > - << " | " > - << stringifyCSRegSet(AnticOut[MBB], Fn) > - << " | " > - << stringifyCSRegSet(AvailIn[MBB], Fn) > - << " | " > - << stringifyCSRegSet(AvailOut[MBB], Fn) > - << "\n"; > + std::vector loopBlocks = LP->getBlocks(); > + for (unsigned i = 0, e = loopBlocks.size(); i != e; ++i) { > + MachineBasicBlock* LBB = loopBlocks[i]; > + if (LBB == MBB) > + continue; > + if (CSRUsed[LBB].contains(CSRUsed[MBB])) > + continue; > + CSRUsed[LBB] |= CSRUsed[MBB]; > } > -#endif > } > > -/// calculateSets - helper function for placeCSRSpillsAndRestores, > -/// collect the CSRs used in this function, develop the DF sets that > -/// describe the minimal regions in the Machine CFG around which > spills, > -/// restores must be placed. > -/// > -/// This function decides if shrink wrapping should actually be done: > -/// if all CSR uses are in the entry block, no shrink wrapping is > possible, > -/// so ShrinkWrapping is turned off (for the current function) > and the > -/// function returns false. > +/// calculateSets - collect the CSRs used in this function, compute > +/// the DF sets that describe the initial minimal regions in the > +/// Machine CFG around which CSR spills and restores must be placed. > +/// > +/// Additionally, this function decides if shrink wrapping should > +/// be disabled for the current function, checking the following: > +/// 1. the current function has more than 500 MBBs: heuristic limit > +/// on function size to reduce compile time impact of the current > +/// iterative algorithm. > +/// 2. all CSRs are used in the entry block. > +/// 3. all CSRs are used in all immediate successors of the entry > block. > +/// 4. all CSRs are used in a subset of blocks, each of which > dominates > +/// all return blocks. These blocks, taken as a subgraph of the > MCFG, > +/// are equivalent to the entry block since all execution paths > pass > +/// through them. > /// > bool PEI::calculateSets(MachineFunction &Fn) { > - > // Sets used to compute spill, restore placement sets. > const std::vector CSI = > Fn.getFrameInfo()->getCalleeSavedInfo(); > > // If no CSRs used, we are done. > if (CSI.empty()) { > -#ifndef NDEBUG > - DOUT << Fn.getFunction()->getName() > - << " uses no callee-saved registers.\n"; > -#endif > + DEBUG(if (ShrinkWrapThisFunction) > + DOUT << "DISABLED: " << Fn.getFunction()->getName() > + << ": uses no callee-saved registers\n"); > return false; > } > > -#ifndef NDEBUG > - DOUT << > "-----------------------------------------------------------\n"; > -#endif > - > - const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo(); > - bool allCSRUsesInEntryBlock = true; > - > - // Initialize UsedCSRegs set, CSRUsed map. > - // At the same time, put entry block directly into > - // CSRSave, CSRRestore sets if any CSRs are used. > - // > - // Quick exit option (not implemented): > - // Given N CSR uses in entry block, > - // revert to default behavior, skip the placement > - // step and put all saves in entry, restores in > - // return blocks. > - > - // Set up entry and return blocks. > + // Save refs to entry and return blocks. > EntryBlock = Fn.begin(); > for (MachineFunction::iterator MBB = Fn.begin(), E = Fn.end(); > MBB != E; ++MBB) > - if (!MBB->empty() && MBB->back().getDesc().isReturn()) > + if (isReturnBlock(MBB)) > ReturnBlocks.push_back(MBB); > > - // TODO -- check for a use of a CSR in each imm. successor of > EntryBlock, > - // do not shrink wrap this function if this is the case. > + // Determine if this function has fast exit paths. > + DEBUG(if (ShrinkWrapThisFunction) > + findFastExitPath()); > + > + // Limit shrink wrapping via the current iterative bit vector > + // implementation to functions with <= 500 MBBs. > + if (Fn.size() > 500) { > + DEBUG(if (ShrinkWrapThisFunction) > + DOUT << "DISABLED: " << Fn.getFunction()->getName() > + << ": too large (" << Fn.size() << " MBBs)\n"); > + ShrinkWrapThisFunction = false; > + } > > - // If not shrink wrapping (this function) at this point, set bits > in > - // CSR{Save,Restore}[] and UsedCSRegs, then return. > - if (! ShrinkWrapThisFunction) { > - for (unsigned inx = 0, e = CSI.size(); inx != e; ++inx) { > - UsedCSRegs.set(inx); > - CSRSave[EntryBlock].set(inx); > - for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) > - CSRRestore[ReturnBlocks[ri]].set(inx); > - } > + // Return now if not shrink wrapping. > + if (! ShrinkWrapThisFunction) > return false; > + > + // Collect set of used CSRs. > + for (unsigned inx = 0, e = CSI.size(); inx != e; ++inx) { > + UsedCSRegs.set(inx); > } > > - // Walk instructions in all MBBs, create basic sets, choose > + // Walk instructions in all MBBs, create CSRUsed[] sets, choose > // whether or not to shrink wrap this function. > + MachineLoopInfo &LI = getAnalysis(); > + MachineDominatorTree &DT = getAnalysis(); > + const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo(); > + > + bool allCSRUsesInEntryBlock = true; > for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); > MBBI != MBBE; ++MBBI) { > MachineBasicBlock* MBB = MBBI; > @@ -496,357 +605,453 @@ > if (MOReg == Reg || > (TargetRegisterInfo::isPhysicalRegister(MOReg) && > TargetRegisterInfo::isPhysicalRegister(Reg) && > - TRI->isSubRegister(MOReg, Reg))) { > + TRI->isSubRegister(Reg, MOReg))) { > // CSR Reg is defined/used in block MBB. > - UsedCSRegs.set(inx); > CSRUsed[MBB].set(inx); > - // Short-circuit analysis for entry, return blocks: > - // if a CSR is used in the entry block, add it directly > - // to CSRSave[EntryBlock] and to CSRRestore[R] for R > - // in ReturnBlocks. Note CSR uses in non-entry blocks. > - if (ShrinkWrapThisFunction) { > - if (MBB == EntryBlock) { > - CSRSave[MBB].set(inx); > - for (unsigned ri = 0, re = ReturnBlocks.size(); ri ! > = re; ++ri) > - CSRRestore[ReturnBlocks[ri]].set(inx); > - } else > - allCSRUsesInEntryBlock = false; > - } else { > - // Not shrink wrapping => ensure saves/restores are > correctly > - // added for entry, return blocks. > - CSRSave[EntryBlock].set(inx); > - for (unsigned ri = 0, re = ReturnBlocks.size(); ri != > re; ++ri) > - CSRRestore[ReturnBlocks[ri]].set(inx); > - } > + // Check for uses in EntryBlock. > + if (MBB != EntryBlock) > + allCSRUsesInEntryBlock = false; > } > } > } > } > -#ifndef NDEBUG > - DOUT << "CSRUsed[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(CSRUsed[MBB], Fn) << "\n"; > -#endif > - } > > -#ifndef NDEBUG > - DOUT << "UsedCSRegs = " << stringifyCSRegSet(UsedCSRegs, Fn) << > "\n"; > -#endif > + if (CSRUsed[MBB].empty()) > + continue; > > - // Early exit: > - // 1. Not asked to do shrink wrapping => just "place" all spills > (restores) > - // in the entry(return) block(s), already done above. > - // 2. All CSR uses in entry block => same as case 1, but say we > will > - // not shrink wrap the current function. > - ShrinkWrapThisFunction = (ShrinkWrapping && > - ShrinkWrapThisFunction && > - ! allCSRUsesInEntryBlock); > - if (! ShrinkWrapThisFunction) { > - return false; > + // Propagate CSRUsed[MBB] in loops > + if (MachineLoop* LP = LI.getLoopFor(MBB)) { > + // Add top level loop to work list. > + MachineBasicBlock* HDR = getTopLevelLoopPreheader(LP); > + MachineLoop* PLP = getTopLevelLoopParent(LP); > + > + if (! HDR) { > + HDR = PLP->getHeader(); > + assert(HDR->pred_size() > 0 && "Loop header has no > predecessors?"); > + MachineBasicBlock::pred_iterator PI = HDR->pred_begin(); > + HDR = *PI; > + } > + TLLoops[HDR] = PLP; > + > + // Push uses from inside loop to its parent loops, > + // or to all other MBBs in its loop. > + if (LP->getLoopDepth() > 1) { > + for (MachineLoop* PLP = LP->getParentLoop(); PLP; > + PLP = PLP->getParentLoop()) { > + propagateUsesAroundLoop(MBB, PLP); > + } > + } else { > + propagateUsesAroundLoop(MBB, LP); > + } > + } > } > > - calculateAnticAvail(Fn); > + if (allCSRUsesInEntryBlock) { > + DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() > + << ": all CSRs used in EntryBlock\n"); > + ShrinkWrapThisFunction = false; > + } else { > + bool allCSRsUsedInEntryFanout = true; > + for (MachineBasicBlock::succ_iterator SI = EntryBlock- > >succ_begin(), > + SE = EntryBlock->succ_end(); SI != SE; ++SI) { > + MachineBasicBlock* SUCC = *SI; > + if (CSRUsed[SUCC] != UsedCSRegs) > + allCSRsUsedInEntryFanout = false; > + } > + if (allCSRsUsedInEntryFanout) { > + DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() > + << ": all CSRs used in imm successors of EntryBlock\n"); > + ShrinkWrapThisFunction = false; > + } > + } > > - return true; > -} > + if (ShrinkWrapThisFunction) { > + // Check if MBB uses CSRs and dominates all exit nodes. > + // Such nodes are equiv. to the entry node w.r.t. > + // CSR uses: every path through the function must > + // pass through this node. If each CSR is used at least > + // once by these nodes, shrink wrapping is disabled. > + CSRegSet CSRUsedInChokePoints; > + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end > (); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + if (MBB == EntryBlock || CSRUsed[MBB].empty() || MBB- > >succ_size() < 1) > + continue; > + bool dominatesExitNodes = true; > + for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) > + if (! DT.dominates(MBB, ReturnBlocks[ri])) { > + dominatesExitNodes = false; > + break; > + } > + if (dominatesExitNodes) { > + CSRUsedInChokePoints |= CSRUsed[MBB]; > + if (CSRUsedInChokePoints == UsedCSRegs) { > + DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() > + << ": all CSRs used in choke point(s) at " > + << getBasicBlockName(MBB) << "\n"); > + ShrinkWrapThisFunction = false; > + break; > + } > + } > + } > + } > > -/// moveSpillsOutOfLoops - helper for placeSpillsAndRestores() which > -/// relocates a spill from a subgraph in a loop to the loop > preheader. > -/// Returns the MBB to which saves have been moved, or the given MBB > -/// if it is a branch point. > -/// > -MachineBasicBlock* PEI::moveSpillsOutOfLoops(MachineFunction &Fn, > - MachineBasicBlock* > MBB) { > - if (MBB == 0 || CSRSave[MBB].empty()) > - return 0; > + // Return now if we have decided not to apply shrink wrapping > + // to the current function. > + if (! ShrinkWrapThisFunction) > + return false; > > - // Block to which saves are moved. > - MachineBasicBlock* DEST = 0; > - MachineLoopInfo &LI = getAnalysis(); > + DEBUG({ > + DOUT << "ENABLED: " << Fn.getFunction()->getName(); > + if (HasFastExitPath) > + DOUT << " (fast exit path)"; > + DOUT << "\n"; > + if (ShrinkWrapDebugging >= BasicInfo) { > + DOUT << "------------------------------" > + << "-----------------------------\n"; > + DOUT << "UsedCSRegs = " << stringifyCSRegSet(UsedCSRegs) << > "\n"; > + if (ShrinkWrapDebugging >= Details) { > + DOUT << "------------------------------" > + << "-----------------------------\n"; > + dumpAllUsed(); > + } > + } > + }); > > - if (MachineLoop* LP = LI.getLoopFor(MBB)) { > - MachineBasicBlock* LPH = getTopLevelLoopPreheader(LP); > - assert(LPH && "Loop has no top level preheader?"); > + // Build initial DF sets to determine minimal regions in the > + // Machine CFG around which CSRs must be spilled and restored. > + calculateAnticAvail(Fn); > > -#ifndef NDEBUG > - DOUT << "Moving saves of " > - << stringifyCSRegSet(CSRSave[MBB], Fn) > - << " from " << getBasicBlockName(MBB) > - << " to " << getBasicBlockName(LPH) << "\n"; > -#endif > - // Add CSRegSet from MBB to LPH, empty out MBB's CSRegSet. > - CSRSave[LPH] |= CSRSave[MBB]; > - // If saves moved to entry block, add restores to returns. > - if (LPH == EntryBlock) { > - for (unsigned i = 0, e = ReturnBlocks.size(); i != e; ++i) > - CSRRestore[ReturnBlocks[i]] |= CSRSave[MBB]; > - } else { > - // Remember where we moved the save so we can add > - // restores on successor paths if necessary. > - if (LPH->succ_size() > 1) > - DEST = LPH; > - } > - CSRSave[MBB].clear(); > - } else if (MBB->succ_size() > 1) > - DEST = MBB; > - return DEST; > + return true; > } > > -/// addRestoresForSBranchBlock - helper for placeSpillsAndRestores > () which > -/// adds restores of CSRs saved in branch point MBBs to the front > of any > -/// successor blocks connected to regions with no uses of the saved > CSRs. > +/// addUsesForMEMERegion - add uses of CSRs spilled or restored in > +/// multi-entry, multi-exit (MEME) regions so spill and restore > +/// placement will not break code that enters or leaves a > +/// shrink-wrapped region by inducing spills with no matching > +/// restores or restores with no matching spills. A MEME region > +/// is a subgraph of the MCFG with multiple entry edges, multiple > +/// exit edges, or both. This code propagates use information > +/// through the MCFG until all paths requiring spills and restores > +/// _outside_ the computed minimal placement regions have been > covered. > /// > -void PEI::addRestoresForSBranchBlock(MachineFunction &Fn, > - MachineBasicBlock* MBB) { > +bool PEI::addUsesForMEMERegion(MachineBasicBlock* MBB, > + SmallVector& > blks) { > + if (MBB->succ_size() < 2 && MBB->pred_size() < 2) { > + bool processThisBlock = false; > + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > + SE = MBB->succ_end(); SI != SE; ++SI) { > + MachineBasicBlock* SUCC = *SI; > + if (SUCC->pred_size() > 1) { > + processThisBlock = true; > + break; > + } > + } > + if (!CSRRestore[MBB].empty() && MBB->succ_size() > 0) { > + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > + PE = MBB->pred_end(); PI != PE; ++PI) { > + MachineBasicBlock* PRED = *PI; > + if (PRED->succ_size() > 1) { > + processThisBlock = true; > + break; > + } > + } > + } > + if (! processThisBlock) > + return false; > + } > > - if (MBB == 0 || CSRSave[MBB].empty() || MBB->succ_size() < 2) > - return; > + CSRegSet prop; > + if (!CSRSave[MBB].empty()) > + prop = CSRSave[MBB]; > + else if (!CSRRestore[MBB].empty()) > + prop = CSRRestore[MBB]; > + else > + prop = CSRUsed[MBB]; > + if (prop.empty()) > + return false; > > - // Add restores of CSRs saved in branch point MBBs to the > - // front of any succ blocks flowing into regions that > - // have no uses of MBB's CSRs. > - bool hasCSRUses = false; > + // Propagate selected bits to successors, predecessors of MBB. > + bool addedUses = false; > for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > SE = MBB->succ_end(); SI != SE; ++SI) { > MachineBasicBlock* SUCC = *SI; > - bool needsRestore = false; > - if (CSRUsed[SUCC].intersects(CSRSave[MBB])) { > - hasCSRUses = true; > + // Self-loop > + if (SUCC == MBB) > continue; > + if (! CSRUsed[SUCC].contains(prop)) { > + CSRUsed[SUCC] |= prop; > + addedUses = true; > + blks.push_back(SUCC); > + DEBUG(if (ShrinkWrapDebugging >= Iterations) > + DOUT << getBasicBlockName(MBB) > + << "(" << stringifyCSRegSet(prop) << ")->" > + << "successor " << getBasicBlockName(SUCC) << > "\n"); > } > - needsRestore = true; > - for (df_iterator BI = df_begin(SUCC), > - BE = df_end(SUCC); BI != BE; ++BI) { > - MachineBasicBlock* SBB = *BI; > - if (CSRUsed[SBB].intersects(CSRSave[MBB])) { > - hasCSRUses = true; > - needsRestore = false; > - break; > - } > - } > - // Additional restores are needed for SUCC iff there is at least > - // one CSR use reachable from the successors of MBB and there > - // are no uses in or below SUCC. > - if (needsRestore && hasCSRUses) { > -#ifndef NDEBUG > - DOUT << "MBB " << getBasicBlockName(MBB) > - << " needs a restore on path to successor " > - << getBasicBlockName(SUCC) << "\n"; > -#endif > - // Add restores to SUCC for all CSRs saved in MBB... > - CSRRestore[SUCC] = CSRSave[MBB]; > + } > + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > + PE = MBB->pred_end(); PI != PE; ++PI) { > + MachineBasicBlock* PRED = *PI; > + // Self-loop > + if (PRED == MBB) > + continue; > + if (! CSRUsed[PRED].contains(prop)) { > + CSRUsed[PRED] |= prop; > + addedUses = true; > + blks.push_back(PRED); > + DEBUG(if (ShrinkWrapDebugging >= Iterations) > + DOUT << getBasicBlockName(MBB) > + << "(" << stringifyCSRegSet(prop) << ")->" > + << "predecessor " << getBasicBlockName(PRED) << > "\n"); > } > } > + return addedUses; > } > > -/// moveRestoresOutOfLoops - helper for placeSpillsAndRestores() > which > -/// relocates restores from a subgraph in a loop to the loop exit > blocks. > -/// This function records the MBBs to which restores have been > moved in > -/// SBLKS. If no restores are moved, SBLKS contains the input MBB > if it > -/// is a join point in the Machine CFG. > +/// addUsesForTopLevelLoops - add uses for CSRs used inside top > +/// level loops to the exit blocks of those loops. > /// > -void PEI::moveRestoresOutOfLoops(MachineFunction& Fn, > - MachineBasicBlock* MBB, > - std::vector& > SBLKS) { > - > - SBLKS.clear(); > - if (MBB == 0 || CSRRestore[MBB].empty()) > - return; > - > - MachineLoopInfo &LI = getAnalysis(); > - > - if (MachineLoop* LP = LI.getLoopFor(MBB)) { > - LP = getTopLevelLoopParent(LP); > - assert(LP && "Loop with no top level parent?"); > +bool PEI::addUsesForTopLevelLoops(SmallVector 4>& blks) { > + bool addedUses = false; > > + // Place restores for top level loops where needed. > + for (DenseMap::iterator > + I = TLLoops.begin(), E = TLLoops.end(); I != E; ++I) { > + MachineBasicBlock* MBB = I->first; > + MachineLoop* LP = I->second; > + MachineBasicBlock* HDR = LP->getHeader(); > SmallVector exitBlocks; > + CSRegSet loopSpills; > + > + loopSpills = CSRSave[MBB]; > + if (CSRSave[MBB].empty()) { > + loopSpills = CSRUsed[HDR]; > + assert(!loopSpills.empty() && "No CSRs used in loop?"); > + } else if (CSRRestore[MBB].contains(CSRSave[MBB])) > + continue; > > LP->getExitBlocks(exitBlocks); > - assert(exitBlocks.size() > 0 && > - "Loop has no top level exit blocks?"); > + assert(exitBlocks.size() > 0 && "Loop has no top level exit > blocks?"); > for (unsigned i = 0, e = exitBlocks.size(); i != e; ++i) { > MachineBasicBlock* EXB = exitBlocks[i]; > - > -#ifndef NDEBUG > - DOUT << "Moving restores of " > - << stringifyCSRegSet(CSRRestore[MBB], Fn) > - << " from " << getBasicBlockName(MBB) > - << " to " << getBasicBlockName(EXB) << "\n"; > -#endif > - > - // Add CSRegSet from MBB to LPE, empty out MBB's CSRegSet. > - CSRRestore[EXB] |= CSRRestore[MBB]; > - if (EXB->pred_size() > 1) > - SBLKS.push_back(EXB); > + if (! CSRUsed[EXB].contains(loopSpills)) { > + CSRUsed[EXB] |= loopSpills; > + addedUses = true; > + DEBUG(if (ShrinkWrapDebugging >= Iterations) > + DOUT << "LOOP " << getBasicBlockName(MBB) > + << "(" << stringifyCSRegSet(loopSpills) << ")->" > + << getBasicBlockName(EXB) << "\n"); > + if (EXB->succ_size() > 1 || EXB->pred_size() > 1) > + blks.push_back(EXB); > + } > } > - CSRRestore[MBB].clear(); > - } else if (MBB->pred_size() > 1) > - SBLKS.push_back(MBB); > + } > + return addedUses; > } > > -/// addSavesForRJoinBlocks - Add saves of CSRs restored in join > point MBBs > -/// to the ends of any pred blocks that flow into MBB from regions > that > -/// have no uses of MBB's CSRs. > +/// calcSpillPlacements - determine which CSRs should be spilled > +/// in MBB using AnticIn sets of MBB's predecessors, keeping track > +/// of changes to spilled reg sets. Add MBB to the set of blocks > +/// that need to be processed for propagating use info to cover > +/// multi-entry/exit regions. > /// > -void PEI::addSavesForRJoinBlocks(MachineFunction& Fn, > - std::vector& > SBLKS) { > +bool PEI::calcSpillPlacements(MachineBasicBlock* MBB, > + SmallVector > &blks, > + CSRegBlockMap &prevSpills) { > + bool placedSpills = false; > + // Intersect (CSRegs - AnticIn[P]) for P in Predecessors(MBB) > + CSRegSet anticInPreds; > + SmallVector predecessors; > + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > + PE = MBB->pred_end(); PI != PE; ++PI) { > + MachineBasicBlock* PRED = *PI; > + if (PRED != MBB) > + predecessors.push_back(PRED); > + } > + unsigned i = 0, e = predecessors.size(); > + if (i != e) { > + MachineBasicBlock* PRED = predecessors[i]; > + anticInPreds = UsedCSRegs - AnticIn[PRED]; > + for (++i; i != e; ++i) { > + PRED = predecessors[i]; > + anticInPreds &= (UsedCSRegs - AnticIn[PRED]); > + } > + } else { > + // Handle uses in entry blocks (which have no predecessors). > + // This is necessary because the DFA formulation assumes the > + // entry and (multiple) exit nodes cannot have CSR uses, which > + // is not the case in the real world. > + anticInPreds = UsedCSRegs; > + } > + // Compute spills required at MBB: > + CSRSave[MBB] |= (AnticIn[MBB] - AvailIn[MBB]) & anticInPreds; > > - if (SBLKS.empty()) > - return; > + if (! CSRSave[MBB].empty()) { > + if (MBB == EntryBlock) { > + for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) > + CSRRestore[ReturnBlocks[ri]] |= CSRSave[MBB]; > + } else { > + // Reset all regs spilled in MBB that are also spilled in > EntryBlock. > + if (CSRSave[EntryBlock].intersects(CSRSave[MBB])) { > + CSRSave[MBB] = CSRSave[MBB] - CSRSave[EntryBlock]; > + } > + } > + } > + placedSpills = (CSRSave[MBB] != prevSpills[MBB]); > + prevSpills[MBB] = CSRSave[MBB]; > + // Remember this block for adding restores to successor > + // blocks for multi-entry region. > + if (placedSpills) > + blks.push_back(MBB); > + > + DEBUG(if (! CSRSave[MBB].empty() && ShrinkWrapDebugging >= > Iterations) > + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRSave[MBB]) << "\n"); > > - for (unsigned i = 0, e = SBLKS.size(); i != e; ++i) { > - MachineBasicBlock* MBB = SBLKS[i]; > - if (MBB->pred_size() > 1) { > - bool needsSave = false; > - for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > - PE = MBB->pred_end(); PI != PE; ++PI) { > - MachineBasicBlock* PRED = *PI; > + return placedSpills; > +} > > - // Walk back up in the CFG from the preds of MBB, look for > - // a block that uses any CSR that is restored in MBB. > - if (CSRUsed[PRED].intersects(CSRRestore[MBB])) > - continue; > - needsSave = true; > - for (idf_iterator PPI = idf_begin(PRED), > - PPE = idf_end(PRED); PPI != PPE; ++PPI) { > - MachineBasicBlock* PBB = *PPI; > - if (CSRUsed[PBB].intersects(CSRRestore[MBB])) { > - needsSave = false; > - break; > - } > - } > - if (needsSave) { > - // Add saves to PRED for all CSRs restored in MBB... > -#ifndef NDEBUG > - DOUT << "MBB " << getBasicBlockName(MBB) > - << " needs a save on path from predecessor " > - << getBasicBlockName(PRED) << "\n"; > -#endif > - CSRSave[PRED] = CSRRestore[MBB]; > - } > - } > +/// calcRestorePlacements - determine which CSRs should be restored > +/// in MBB using AvailOut sets of MBB's succcessors, keeping track > +/// of changes to restored reg sets. Add MBB to the set of blocks > +/// that need to be processed for propagating use info to cover > +/// multi-entry/exit regions. > +/// > +bool PEI::calcRestorePlacements(MachineBasicBlock* MBB, > + SmallVector > &blks, > + CSRegBlockMap &prevRestores) { > + bool placedRestores = false; > + // Intersect (CSRegs - AvailOut[S]) for S in Successors(MBB) > + CSRegSet availOutSucc; > + SmallVector successors; > + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > + SE = MBB->succ_end(); SI != SE; ++SI) { > + MachineBasicBlock* SUCC = *SI; > + if (SUCC != MBB) > + successors.push_back(SUCC); > + } > + unsigned i = 0, e = successors.size(); > + if (i != e) { > + MachineBasicBlock* SUCC = successors[i]; > + availOutSucc = UsedCSRegs - AvailOut[SUCC]; > + for (++i; i != e; ++i) { > + SUCC = successors[i]; > + availOutSucc &= (UsedCSRegs - AvailOut[SUCC]); > + } > + } else { > + if (! CSRUsed[MBB].empty() || ! AvailOut[MBB].empty()) { > + // Handle uses in return blocks (which have no successors). > + // This is necessary because the DFA formulation assumes the > + // entry and (multiple) exit nodes cannot have CSR uses, which > + // is not the case in the real world. > + availOutSucc = UsedCSRegs; > } > } > + // Compute restores required at MBB: > + CSRRestore[MBB] |= (AvailOut[MBB] - AnticOut[MBB]) & availOutSucc; > + > + // Postprocess restore placements at MBB. > + // Remove the CSRs that are restored in the return blocks. > + // Lest this be confusing, note that: > + // CSRSave[EntryBlock] == CSRRestore[B] for all B in ReturnBlocks. > + if (MBB->succ_size() && ! CSRRestore[MBB].empty()) { > + if (! CSRSave[EntryBlock].empty()) > + CSRRestore[MBB] = CSRRestore[MBB] - CSRSave[EntryBlock]; > + } > + placedRestores = (CSRRestore[MBB] != prevRestores[MBB]); > + prevRestores[MBB] = CSRRestore[MBB]; > + // Remember this block for adding saves to predecessor > + // blocks for multi-entry region. > + if (placedRestores) > + blks.push_back(MBB); > + > + DEBUG(if (! CSRRestore[MBB].empty() && ShrinkWrapDebugging >= > Iterations) > + DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"); > + > + return placedRestores; > } > > -/// placeSpillsAndRestores - decide which MBBs need spills, restores > -/// of CSRs. > +/// placeSpillsAndRestores - place spills and restores of CSRs > +/// used in MBBs in minimal regions that contain the uses. > /// > void PEI::placeSpillsAndRestores(MachineFunction &Fn) { > + CSRegBlockMap prevCSRSave; > + CSRegBlockMap prevCSRRestore; > + SmallVector cvBlocks, ncvBlocks; > + bool changed = true; > + unsigned iterations = 0; > > -#ifndef NDEBUG > - DOUT << > "-----------------------------------------------------------\n"; > -#endif > + // Iterate computation of spill and restore placements in the > MCFG until: > + // 1. CSR use info has been fully propagated around the MCFG, and > + // 2. computation of CSRSave[], CSRRestore[] reach fixed points. > + while (changed) { > + changed = false; > + ++iterations; > > - // Calculate CSR{Save,Restore} using Antic, Avail on the Machine- > CFG. > - for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); > - MBBI != MBBE; ++MBBI) { > - MachineBasicBlock* MBB = MBBI; > - // Entry block saves are recorded in UsedCSRegs pass above. > - if (MBB != EntryBlock) { > - // Intersect (CSRegs - AnticIn[P]) for all predecessors P of > MBB > - CSRegSet anticInPreds; > - MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), > - PE = MBB->pred_end(); > - if (PI != PE) { > - MachineBasicBlock* PRED = *PI; > - anticInPreds = UsedCSRegs - AnticIn[PRED]; > - for (++PI; PI != PE; ++PI) { > - PRED = *PI; > - // Handle self loop. > - if (PRED != MBB) > - anticInPreds &= (UsedCSRegs - AnticIn[PRED]); > - } > - } > - // CSRSave[MBB] = (AnticIn[MBB] - AvailIn[MBB]) & anticInPreds > - CSRSave[MBB] = (AnticIn[MBB] - AvailIn[MBB]) & anticInPreds; > + DEBUG(if (ShrinkWrapDebugging >= Iterations) > + DOUT << "iter " << iterations > + << " > --------------------------------------------------\n"); > + > + // Calculate CSR{Save,Restore} sets using Antic, Avail on the > MCFG, > + // which determines the placements of spills and restores. > + // Keep track of changes to spills, restores in each iteration to > + // minimize the total iterations. > + bool SRChanged = false; > + for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end > (); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > > - // Remove the CSRs that are saved in the entry block > - if (! CSRSave[MBB].empty() && ! CSRSave[EntryBlock].empty()) > - CSRSave[MBB] = CSRSave[MBB] - CSRSave[EntryBlock]; > + // Place spills for CSRs in MBB. > + SRChanged |= calcSpillPlacements(MBB, cvBlocks, prevCSRSave); > > - // Move saves inside loops to the preheaders of the outermost > - // containing loops, add restores to blocks reached by saves > - // placed at branch points where necessary. > - if (MachineBasicBlock* DESTBB = moveSpillsOutOfLoops(Fn, > MBB)) { > - // Add restores to blocks reached by saves placed at branch > - // points where necessary. > - addRestoresForSBranchBlock(Fn, DESTBB); > - } > + // Place restores for CSRs in MBB. > + SRChanged |= calcRestorePlacements(MBB, cvBlocks, > prevCSRRestore); > } > > -#ifndef NDEBUG > - if (! CSRSave[MBB].empty()) > - DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(CSRSave[MBB], Fn) << "\n"; > -#endif > + // Add uses of CSRs used inside loops where needed. > + changed |= addUsesForTopLevelLoops(cvBlocks); > > - // Compute CSRRestore, which may already be set for return > blocks. > - if (! CSRRestore[MBB].empty() || MBB->pred_size() == 0) > - continue; > - > - // Intersect (CSRegs - AvailOut[S]) for all successors S of MBB > - CSRegSet availOutSucc; > - MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), > - SE = MBB->succ_end(); > - if (SI != SE) { > - MachineBasicBlock* SUCC = *SI; > - availOutSucc = UsedCSRegs - AvailOut[SUCC]; > - for (++SI; SI != SE; ++SI) { > - SUCC = *SI; > - // Handle self loop. > - if (SUCC != MBB) > - availOutSucc &= (UsedCSRegs - AvailOut[SUCC]); > + // Add uses for CSRs spilled or restored at branch, join points. > + if (changed || SRChanged) { > + while (! cvBlocks.empty()) { > + MachineBasicBlock* MBB = cvBlocks.pop_back_val(); > + changed |= addUsesForMEMERegion(MBB, ncvBlocks); > + } > + if (! ncvBlocks.empty()) { > + cvBlocks = ncvBlocks; > + ncvBlocks.clear(); > } > - } else if (! CSRUsed[MBB].empty()) { > - // Take care of uses in return blocks (which have no > successors). > - availOutSucc = UsedCSRegs; > } > - // CSRRestore[MBB] = (AvailOut[MBB] - AnticOut[MBB]) & > availOutSucc > - CSRRestore[MBB] = (AvailOut[MBB] - AnticOut[MBB]) & availOutSucc; > - > - // Remove the CSRs that are restored in the return blocks. > - // Lest this be confusing, note that: > - // CSRSave[EntryBlock] == CSRRestore[B] for all B in > ReturnBlocks. > - if (! CSRRestore[MBB].empty() && ! CSRSave[EntryBlock].empty()) > - CSRRestore[MBB] = CSRRestore[MBB] - CSRSave[EntryBlock]; > - > - // Move restores inside loops to the exits of the outermost > (top level) > - // containing loops. > - std::vector saveBlocks; > - moveRestoresOutOfLoops(Fn, MBB, saveBlocks); > - > - // Add saves of CSRs restored in join point MBBs to the ends > - // of any pred blocks that flow into MBB from regions that > - // have no uses of MBB's CSRs. > - addSavesForRJoinBlocks(Fn, saveBlocks); > > -#ifndef NDEBUG > - if (! CSRRestore[MBB].empty()) > - DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(CSRRestore[MBB], Fn) << "\n"; > -#endif > - } > - > -#ifndef NDEBUG > - DOUT << > "-----------------------------------------------------------\n"; > - DOUT << "Final SAVE, RESTORE:\n"; > - DOUT << > "-----------------------------------------------------------\n"; > - for (MachineFunction::iterator MBB = Fn.begin(), E = Fn.end(); > - MBB != E; ++MBB) { > - if (! CSRSave[MBB].empty()) { > - DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(CSRSave[MBB], Fn); > - if (CSRRestore[MBB].empty()) > - DOUT << "\n"; > - } > - if (! CSRRestore[MBB].empty()) { > - if (! CSRSave[MBB].empty()) > - DOUT << " "; > - DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(CSRRestore[MBB], Fn) << "\n"; > + if (changed) { > + calculateAnticAvail(Fn); > + CSRSave.clear(); > + CSRRestore.clear(); > } > } > -#endif > + > + // Check for effectiveness: > + // SR0 = {r | r in CSRSave[EntryBlock], CSRRestore[RB], RB in > ReturnBlocks} > + // numSRReduced = |(UsedCSRegs - SR0)|, approx. SR0 by CSRSave > [EntryBlock] > + // Gives a measure of how many CSR spills have been moved from > EntryBlock > + // to minimal regions enclosing their uses. > + CSRegSet notSpilledInEntryBlock = (UsedCSRegs - CSRSave > [EntryBlock]); > + unsigned numSRReducedThisFunc = notSpilledInEntryBlock.count(); > + numSRReduced += numSRReducedThisFunc; > + DEBUG(if (ShrinkWrapDebugging >= BasicInfo) { > + DOUT << > "-----------------------------------------------------------\n"; > + DOUT << "total iterations = " << iterations << " ( " > + << Fn.getFunction()->getName() > + << " " << numSRReducedThisFunc > + << " " << Fn.size() > + << " )\n"; > + DOUT << > "-----------------------------------------------------------\n"; > + dumpSRSets(); > + DOUT << > "-----------------------------------------------------------\n"; > + if (numSRReducedThisFunc) > + verifySpillRestorePlacement(); > + }); > } > > /// calculateCalleeSavedRegisters - Scan the function for modified > callee saved > @@ -982,90 +1187,29 @@ > > const TargetInstrInfo &TII = *Fn.getTarget().getInstrInfo(); > MachineBasicBlock::iterator I; > - std::vector blockCSI; > - > -#ifndef NDEBUG > - DOUT << "Inserting spill/restore code for CSRs in function " > - << Fn.getFunction()->getName() << "\n"; > -#endif > - > - // Insert spills. > - for (CSRegBlockMap::iterator > - BI = CSRSave.begin(), BE = CSRSave.end(); BI != BE; ++BI) { > - MachineBasicBlock* MBB = BI->first; > - CSRegSet save = BI->second; > - > - if (save.empty()) > - continue; > > - if (! ShrinkWrapThisFunction) { > - // Spill using target interface. > - I = MBB->begin(); > - if (!TII.spillCalleeSavedRegisters(*MBB, I, CSI)) { > - for (unsigned i = 0, e = CSI.size(); i != e; ++i) { > - // Add the callee-saved register as live-in. It's killed > at the spill. > - MBB->addLiveIn(CSI[i].getReg()); > - > - // Insert the spill to the stack frame. > - TII.storeRegToStackSlot(*MBB, I, CSI[i].getReg(), true, > - CSI[i].getFrameIdx(), CSI > [i].getRegClass()); > - } > - } > - } else { > -#ifndef NDEBUG > - DOUT << "CSRSave[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(save, Fn) << "\n"; > -#endif > + DEBUG(if (ShrinkWrapThisFunction && ShrinkWrapDebugging >= Details) > + DOUT << "Inserting CSR spills/restores in function " > + << Fn.getFunction()->getName() << "\n"); > > - blockCSI.clear(); > - for (CSRegSet::iterator RI = save.begin(), > - RE = save.end(); RI != RE; ++RI) { > - blockCSI.push_back(CSI[*RI]); > - } > - assert(blockCSI.size() > 0 && > - "Could not collect callee saved register info"); > - > - // If MBB has no uses of CSRs being saved, this means saves > - // must be inserted at the _end_. > - if (! MBB->empty() && ! CSRUsed[MBB].intersects(save)) { > - I = MBB->end(); > - --I; > - if (I->getDesc().isCall()) { > - ++I; > - } else { > - MachineBasicBlock::iterator I2 = I; > - while (I2 != MBB->begin() && (--I2)->getDesc > ().isTerminator()) > - I = I2; > - } > - } else { > - I = MBB->begin(); > - } > - > - // When shrink wrapping, use stack slot stores/loads. > - for (unsigned i = 0, e = blockCSI.size(); i != e; ++i) { > + if (! ShrinkWrapThisFunction) { > + // Spill using target interface. > + I = EntryBlock->begin(); > + if (!TII.spillCalleeSavedRegisters(*EntryBlock, I, CSI)) { > + for (unsigned i = 0, e = CSI.size(); i != e; ++i) { > // Add the callee-saved register as live-in. > // It's killed at the spill. > - MBB->addLiveIn(blockCSI[i].getReg()); > + EntryBlock->addLiveIn(CSI[i].getReg()); > > // Insert the spill to the stack frame. > - TII.storeRegToStackSlot(*MBB, I, blockCSI[i].getReg(), > - true, > - blockCSI[i].getFrameIdx(), > - blockCSI[i].getRegClass()); > + TII.storeRegToStackSlot(*EntryBlock, I, CSI[i].getReg(), > true, > + CSI[i].getFrameIdx(), CSI > [i].getRegClass()); > } > } > - } > - // Use CSRRestore to add code to restore the callee-saved > registers in > - // each block. > - for (CSRegBlockMap::iterator > - BI = CSRRestore.begin(), BE = CSRRestore.end(); BI != BE; + > +BI) { > - MachineBasicBlock* MBB = BI->first; > - CSRegSet restore = BI->second; > > - if (restore.empty()) > - continue; > - if (! ShrinkWrapThisFunction) { > - // Restore using target interface. > + // Restore using target interface. > + for (unsigned ri = 0, re = ReturnBlocks.size(); ri != re; ++ri) { > + MachineBasicBlock* MBB = ReturnBlocks[ri]; > I = MBB->end(); --I; > > // Skip over all terminator instructions, which are part of > the return > @@ -1098,79 +1242,117 @@ > } > } > } > - } else { > -#ifndef NDEBUG > - DOUT << "CSRRestore[" << getBasicBlockName(MBB) << "] = " > - << stringifyCSRegSet(restore, Fn) << "\n"; > -#endif > + } > + return; > + } > > - blockCSI.clear(); > - for (CSRegSet::iterator RI = restore.begin(), > - RE = restore.end(); RI != RE; ++RI) { > - blockCSI.push_back(CSI[*RI]); > - } > - assert(blockCSI.size() > 0 && > - "Could not find callee saved register info"); > - > - // If MBB uses no CSRs but has restores, this means > - // it must have restores inserted at the _beginning_. > - // N.B. -- not necessary if edge splitting done. > - if (MBB->empty() || ! CSRUsed[MBB].intersects(restore)) { > - I = MBB->begin(); > - } else { > - I = MBB->end(); > - --I; > + // Insert spills. > + std::vector blockCSI; > + for (CSRegBlockMap::iterator BI = CSRSave.begin(), > + BE = CSRSave.end(); BI != BE; ++BI) { > + MachineBasicBlock* MBB = BI->first; > + CSRegSet save = BI->second; > > - // EXP iff spill/restore implemented with push/pop: > - // append restore to block unless it ends in a > - // barrier terminator instruction. > - > - // Skip over all terminator instructions, which are part of > the > - // return sequence. > - if (I->getDesc().isCall()) { > - ++I; > - } else { > - MachineBasicBlock::iterator I2 = I; > - while (I2 != MBB->begin() && (--I2)->getDesc > ().isTerminator()) > - I = I2; > - } > - } > + if (save.empty()) > + continue; > > - bool AtStart = I == MBB->begin(); > - MachineBasicBlock::iterator BeforeI = I; > - if (!AtStart) > - --BeforeI; > + DEBUG(if (ShrinkWrapDebugging >= Details) > + DOUT << "Spilling " << stringifyCSRegSet(save) > + << " in " << getBasicBlockName(MBB) << "\n"); > > -#ifndef NDEBUG > - if (! MBB->empty() && ! CSRUsed[MBB].intersects(restore)) { > - MachineInstr* MI = BeforeI; > - DOUT << "adding restore after "; > - DEBUG(MI->dump()); > + blockCSI.clear(); > + for (CSRegSet::iterator RI = save.begin(), > + RE = save.end(); RI != RE; ++RI) { > + blockCSI.push_back(CSI[*RI]); > + } > + assert(blockCSI.size() > 0 && > + "Could not collect callee saved register info"); > + > + I = MBB->begin(); > + > + // When shrink wrapping, use stack slot stores/loads. > + for (unsigned i = 0, e = blockCSI.size(); i != e; ++i) { > + // Add the callee-saved register as live-in. > + // It's killed at the spill. > + MBB->addLiveIn(blockCSI[i].getReg()); > + > + // Insert the spill to the stack frame. > + TII.storeRegToStackSlot(*MBB, I, blockCSI[i].getReg(), > + true, > + blockCSI[i].getFrameIdx(), > + blockCSI[i].getRegClass()); > + } > + } > + > + DEBUG(if (ShrinkWrapDebugging >= Details) > + DOUT << "------------------------------" > + << "-----------------------------\n"); > + > + for (CSRegBlockMap::iterator BI = CSRRestore.begin(), > + BE = CSRRestore.end(); BI != BE; ++BI) { > + MachineBasicBlock* MBB = BI->first; > + CSRegSet restore = BI->second; > + > + if (restore.empty()) > + continue; > + > + DEBUG(if (ShrinkWrapDebugging >= Details) > + DOUT << "Restoring " << stringifyCSRegSet(restore) > + << " in " << getBasicBlockName(MBB) << "\n"); > + > + blockCSI.clear(); > + for (CSRegSet::iterator RI = restore.begin(), > + RE = restore.end(); RI != RE; ++RI) { > + blockCSI.push_back(CSI[*RI]); > + } > + assert(blockCSI.size() > 0 && > + "Could not find callee saved register info"); > + > + // If MBB is empty and needs restores, insert at the _beginning_. > + if (MBB->empty()) { > + I = MBB->begin(); > + } else { > + I = MBB->end(); > + --I; > + > + // Skip over all terminator instructions, which are part of the > + // return sequence. > + if (! I->getDesc().isTerminator()) { > + ++I; > } else { > - DOUT << "adding restore to beginning of " > - << getBasicBlockName(MBB) << "\n"; > + MachineBasicBlock::iterator I2 = I; > + while (I2 != MBB->begin() && (--I2)->getDesc().isTerminator > ()) > + I = I2; > } > -#endif > + } > > - // Restore all registers immediately before the return and any > - // terminators that preceed it. > - for (unsigned i = 0, e = blockCSI.size(); i != e; ++i) { > - TII.loadRegFromStackSlot(*MBB, I, blockCSI[i].getReg(), > - blockCSI[i].getFrameIdx(), > - blockCSI[i].getRegClass()); > - assert(I != MBB->begin() && > - "loadRegFromStackSlot didn't insert any code!"); > - // Insert in reverse order. loadRegFromStackSlot can insert > - // multiple instructions. > - if (AtStart) > - I = MBB->begin(); > - else { > - I = BeforeI; > - ++I; > - } > + bool AtStart = I == MBB->begin(); > + MachineBasicBlock::iterator BeforeI = I; > + if (!AtStart) > + --BeforeI; > + > + // Restore all registers immediately before the return and any > + // terminators that preceed it. > + for (unsigned i = 0, e = blockCSI.size(); i != e; ++i) { > + TII.loadRegFromStackSlot(*MBB, I, blockCSI[i].getReg(), > + blockCSI[i].getFrameIdx(), > + blockCSI[i].getRegClass()); > + assert(I != MBB->begin() && > + "loadRegFromStackSlot didn't insert any code!"); > + // Insert in reverse order. loadRegFromStackSlot can insert > + // multiple instructions. > + if (AtStart) > + I = MBB->begin(); > + else { > + I = BeforeI; > + ++I; > } > } > } > + > + DEBUG(if (ShrinkWrapDebugging >= Details) > + DOUT << "------------------------------" > + << "-----------------------------\n"); > } > > /// AdjustStackOffset - Helper function used to adjust the stack > frame offset. > @@ -1451,3 +1633,277 @@ > assert(SPAdj == 0 && "Unbalanced call frame setup / destroy > pairs?"); > } > } > + > +// Debugging methods for shrink wrapping. > +#ifndef NDEBUG > +/// findFastExitPath - debugging method used to detect functions > +/// with at least one path from the entry block to a return block > +/// directly or which has a very small number of edges. > +/// > +void PEI::findFastExitPath() { > + if (! EntryBlock) > + return; > + // Fina a path from EntryBlock to any return block that does not > branch: > + // Entry > + // | ... > + // v | > + // B1<-----+ > + // | > + // v > + // Return > + for (MachineBasicBlock::succ_iterator SI = EntryBlock->succ_begin > (), > + SE = EntryBlock->succ_end(); SI != SE; ++SI) { > + MachineBasicBlock* SUCC = *SI; > + > + // Assume positive, disprove existence of fast path. > + HasFastExitPath = true; > + > + // Check the immediate successors. > + if (isReturnBlock(SUCC)) { > + if (ShrinkWrapDebugging >= BasicInfo) > + DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) > + << "->" << getBasicBlockName(SUCC) << "\n"; > + break; > + } > + // Traverse df from SUCC, look for a branch block. > + std::string exitPath = getBasicBlockName(SUCC); > + for (df_iterator BI = df_begin(SUCC), > + BE = df_end(SUCC); BI != BE; ++BI) { > + MachineBasicBlock* SBB = *BI; > + // Reject paths with branch nodes. > + if (SBB->succ_size() > 1) { > + HasFastExitPath = false; > + break; > + } > + exitPath += "->" + getBasicBlockName(SBB); > + } > + if (HasFastExitPath) { > + if (ShrinkWrapDebugging >= BasicInfo) > + DOUT << "Fast exit path: " << getBasicBlockName(EntryBlock) > + << "->" << exitPath << "\n"; > + break; > + } > + } > +} > + > +/// verifySpillRestorePlacement - check the current spill/restore > +/// sets for safety. Attempt to find spills without restores or > +/// restores without spills. > +/// Spills: walk df from each MBB in spill set ensuring that > +/// all CSRs spilled at MMBB are restored on all paths > +/// from MBB to all exit blocks. > +/// Restores: walk idf from each MBB in restore set ensuring that > +/// all CSRs restored at MBB are spilled on all paths > +/// reaching MBB. > +/// > +void PEI::verifySpillRestorePlacement() { > + unsigned numReturnBlocks = 0; > + for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF->end > (); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + if (isReturnBlock(MBB) || MBB->succ_size() == 0) > + ++numReturnBlocks; > + } > + for (CSRegBlockMap::iterator BI = CSRSave.begin(), > + BE = CSRSave.end(); BI != BE; ++BI) { > + MachineBasicBlock* MBB = BI->first; > + CSRegSet spilled = BI->second; > + CSRegSet restored; > + > + if (spilled.empty()) > + continue; > + > + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(spilled) > + << " RESTORE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; > + > + if (CSRRestore[MBB].intersects(spilled)) { > + restored |= (CSRRestore[MBB] & spilled); > + } > + > + // Walk depth first from MBB to find restores of all CSRs > spilled at MBB: > + // we must find restores for all spills w/no intervening spills > on all > + // paths from MBB to all return blocks. > + for (df_iterator BI = df_begin(MBB), > + BE = df_end(MBB); BI != BE; ++BI) { > + MachineBasicBlock* SBB = *BI; > + if (SBB == MBB) > + continue; > + // Stop when we encounter spills of any CSRs spilled at MBB > that > + // have not yet been seen to be restored. > + if (CSRSave[SBB].intersects(spilled) && > + !restored.contains(CSRSave[SBB] & spilled)) > + break; > + // Collect the CSRs spilled at MBB that are restored > + // at this DF successor of MBB. > + if (CSRRestore[SBB].intersects(spilled)) > + restored |= (CSRRestore[SBB] & spilled); > + // If we are at a retun block, check that the restores > + // we have seen so far exhaust the spills at MBB, then > + // reset the restores. > + if (isReturnBlock(SBB) || SBB->succ_size() == 0) { > + if (restored != spilled) { > + CSRegSet notRestored = (spilled - restored); > + DOUT << MF->getFunction()->getName() << ": " > + << stringifyCSRegSet(notRestored) > + << " spilled at " << getBasicBlockName(MBB) > + << " are never restored on path to return " > + << getBasicBlockName(SBB) << "\n"; > + } > + restored.clear(); > + } > + } > + } > + > + // Check restore placements. > + for (CSRegBlockMap::iterator BI = CSRRestore.begin(), > + BE = CSRRestore.end(); BI != BE; ++BI) { > + MachineBasicBlock* MBB = BI->first; > + CSRegSet restored = BI->second; > + CSRegSet spilled; > + > + if (restored.empty()) > + continue; > + > + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRSave[MBB]) > + << " RESTORE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(restored) << "\n"; > + > + if (CSRSave[MBB].intersects(restored)) { > + spilled |= (CSRSave[MBB] & restored); > + } > + // Walk inverse depth first from MBB to find spills of all > + // CSRs restored at MBB: > + for (idf_iterator BI = idf_begin(MBB), > + BE = idf_end(MBB); BI != BE; ++BI) { > + MachineBasicBlock* PBB = *BI; > + if (PBB == MBB) > + continue; > + // Stop when we encounter restores of any CSRs restored at > MBB that > + // have not yet been seen to be spilled. > + if (CSRRestore[PBB].intersects(restored) && > + !spilled.contains(CSRRestore[PBB] & restored)) > + break; > + // Collect the CSRs restored at MBB that are spilled > + // at this DF predecessor of MBB. > + if (CSRSave[PBB].intersects(restored)) > + spilled |= (CSRSave[PBB] & restored); > + } > + if (spilled != restored) { > + CSRegSet notSpilled = (restored - spilled); > + DOUT << MF->getFunction()->getName() << ": " > + << stringifyCSRegSet(notSpilled) > + << " restored at " << getBasicBlockName(MBB) > + << " are never spilled\n"; > + } > + } > +} > + > +// Debugging print methods. > +std::string PEI::getBasicBlockName(const MachineBasicBlock* MBB) { > + std::ostringstream name; > + if (MBB) { > + if (MBB->getBasicBlock()) > + name << MBB->getBasicBlock()->getName(); > + else > + name << "_MBB_" << MBB->getNumber(); > + } > + return name.str(); > +} > + > +std::string PEI::stringifyCSRegSet(const CSRegSet& s) { > + const TargetRegisterInfo* TRI = MF->getTarget().getRegisterInfo(); > + const std::vector CSI = > + MF->getFrameInfo()->getCalleeSavedInfo(); > + > + std::ostringstream srep; > + if (CSI.size() == 0) { > + srep << "[]"; > + return srep.str(); > + } > + srep << "["; > + CSRegSet::iterator I = s.begin(), E = s.end(); > + if (I != E) { > + unsigned reg = CSI[*I].getReg(); > + srep << TRI->getName(reg); > + for (++I; I != E; ++I) { > + reg = CSI[*I].getReg(); > + srep << ","; > + srep << TRI->getName(reg); > + } > + } > + srep << "]"; > + return srep.str(); > +} > + > +void PEI::dumpSet(const CSRegSet& s) { > + DOUT << stringifyCSRegSet(s) << "\n"; > +} > + > +void PEI::dumpUsed(MachineBasicBlock* MBB) { > + if (MBB) { > + DOUT << "CSRUsed[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRUsed[MBB]) << "\n"; > + } > +} > + > +void PEI::dumpAllUsed() { > + for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF- > >end(); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + dumpUsed(MBB); > + } > +} > + > +void PEI::dumpSets(MachineBasicBlock* MBB) { > + if (MBB) { > + DOUT << getBasicBlockName(MBB) << " | " > + << stringifyCSRegSet(CSRUsed[MBB]) << " | " > + << stringifyCSRegSet(AnticIn[MBB]) << " | " > + << stringifyCSRegSet(AnticOut[MBB]) << " | " > + << stringifyCSRegSet(AvailIn[MBB]) << " | " > + << stringifyCSRegSet(AvailOut[MBB]) << "\n"; > + } > +} > + > +void PEI::dumpSets1(MachineBasicBlock* MBB) { > + if (MBB) { > + DOUT << getBasicBlockName(MBB) << " | " > + << stringifyCSRegSet(CSRUsed[MBB]) << " | " > + << stringifyCSRegSet(AnticIn[MBB]) << " | " > + << stringifyCSRegSet(AnticOut[MBB]) << " | " > + << stringifyCSRegSet(AvailIn[MBB]) << " | " > + << stringifyCSRegSet(AvailOut[MBB]) << " | " > + << stringifyCSRegSet(CSRSave[MBB]) << " | " > + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; > + } > +} > + > +void PEI::dumpAllSets() { > + for (MachineFunction::iterator MBBI = MF->begin(), MBBE = MF- > >end(); > + MBBI != MBBE; ++MBBI) { > + MachineBasicBlock* MBB = MBBI; > + dumpSets1(MBB); > + } > +} > + > +void PEI::dumpSRSets() { > + for (MachineFunction::iterator MBB = MF->begin(), E = MF->end(); > + MBB != E; ++MBB) { > + if (! CSRSave[MBB].empty()) { > + DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRSave[MBB]); > + if (CSRRestore[MBB].empty()) > + DOUT << "\n"; > + } > + if (! CSRRestore[MBB].empty()) { > + if (! CSRSave[MBB].empty()) > + DOUT << " "; > + DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " > + << stringifyCSRegSet(CSRRestore[MBB]) << "\n"; > + } > + } > +} > +#endif > > > _______________________________________________ > 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 May 12 18:58:14 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 12 May 2009 23:58:14 -0000 Subject: [llvm-commits] [llvm] r71609 - in /llvm/trunk: lib/CodeGen/CodePlacementOpt.cpp test/CodeGen/X86/avoid-loop-align-2.ll Message-ID: <200905122358.n4CNwEXs014739@zion.cs.uiuc.edu> Author: evancheng Date: Tue May 12 18:58:14 2009 New Revision: 71609 URL: http://llvm.org/viewvc/llvm-project?rev=71609&view=rev Log: If header of inner loop is aligned, do not align the outer loop header. We don't want to add nops in the outer loop for the sake of aligning the inner loop. Added: llvm/trunk/test/CodeGen/X86/avoid-loop-align-2.ll Modified: llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp Modified: llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp?rev=71609&r1=71608&r2=71609&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp (original) +++ llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp Tue May 12 18:58:14 2009 @@ -62,6 +62,8 @@ private: bool OptimizeIntraLoopEdges(); + bool HeaderShouldBeAligned(MachineBasicBlock *MBB, MachineLoop *L, + SmallPtrSet &DoNotAlign); bool AlignLoops(MachineFunction &MF); }; @@ -244,14 +246,37 @@ /// should be aligned. For now, we will not align it if all the predcessors /// (i.e. loop back edges) are laid out above the header. FIXME: Do not /// align small loops. -static bool HeaderShouldBeAligned(MachineBasicBlock *MBB) { +bool +CodePlacementOpt::HeaderShouldBeAligned(MachineBasicBlock *MBB, MachineLoop *L, + SmallPtrSet &DoNotAlign) { + if (DoNotAlign.count(MBB)) + return false; + + bool BackEdgeBelow = false; for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), PE = MBB->pred_end(); PI != PE; ++PI) { MachineBasicBlock *PredMBB = *PI; - if (PredMBB == MBB || PredMBB->getNumber() > MBB->getNumber()) - return true; + if (PredMBB == MBB || PredMBB->getNumber() > MBB->getNumber()) { + BackEdgeBelow = true; + break; + } + } + + if (!BackEdgeBelow) + return false; + + // Ok, we are going to align this loop header. If it's an inner loop, + // do not align its outer loop. + MachineBasicBlock *PreHeader = L->getLoopPreheader(); + if (PreHeader) { + MachineLoop *L = MLI->getLoopFor(PreHeader); + if (L) { + MachineBasicBlock *HeaderBlock = L->getHeader(); + HeaderBlock->setAlignment(0); + DoNotAlign.insert(HeaderBlock); + } } - return false; + return true; } /// AlignLoops - Align loop headers to target preferred alignments. @@ -269,14 +294,16 @@ MF.RenumberBlocks(); bool Changed = false; + SmallPtrSet DoNotAlign; for (unsigned i = 0, e = LoopHeaders.size(); i != e; ++i) { MachineBasicBlock *HeaderMBB = LoopHeaders[i]; MachineBasicBlock *PredMBB = prior(MachineFunction::iterator(HeaderMBB)); - if (MLI->getLoopFor(HeaderMBB) == MLI->getLoopFor(PredMBB)) + MachineLoop *L = MLI->getLoopFor(HeaderMBB); + if (L == MLI->getLoopFor(PredMBB)) // If previously BB is in the same loop, don't align this BB. We want // to prevent adding noop's inside a loop. continue; - if (HeaderShouldBeAligned(HeaderMBB)) { + if (HeaderShouldBeAligned(HeaderMBB, L, DoNotAlign)) { HeaderMBB->setAlignment(Align); Changed = true; ++NumHeaderAligned; Added: llvm/trunk/test/CodeGen/X86/avoid-loop-align-2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avoid-loop-align-2.ll?rev=71609&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/avoid-loop-align-2.ll (added) +++ llvm/trunk/test/CodeGen/X86/avoid-loop-align-2.ll Tue May 12 18:58:14 2009 @@ -0,0 +1,45 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep align | count 3 + + at x = external global i32* ; [#uses=1] + +define i32 @t(i32 %a, i32 %b) nounwind readonly ssp { +entry: + %0 = icmp eq i32 %a, 0 ; [#uses=1] + br i1 %0, label %bb5, label %bb.nph12 + +bb.nph12: ; preds = %entry + %1 = icmp eq i32 %b, 0 ; [#uses=1] + %2 = load i32** @x, align 8 ; [#uses=1] + br i1 %1, label %bb2.preheader, label %bb2.preheader.us + +bb2.preheader.us: ; preds = %bb2.bb3_crit_edge.us, %bb.nph12 + %indvar18 = phi i32 [ 0, %bb.nph12 ], [ %indvar.next19, %bb2.bb3_crit_edge.us ] ; [#uses=2] + %sum.111.us = phi i32 [ 0, %bb.nph12 ], [ %4, %bb2.bb3_crit_edge.us ] ; [#uses=0] + %tmp16 = mul i32 %indvar18, %a ; [#uses=1] + br label %bb1.us + +bb1.us: ; preds = %bb1.us, %bb2.preheader.us + %indvar = phi i32 [ 0, %bb2.preheader.us ], [ %indvar.next, %bb1.us ] ; [#uses=2] + %tmp17 = add i32 %indvar, %tmp16 ; [#uses=1] + %tmp. = zext i32 %tmp17 to i64 ; [#uses=1] + %3 = getelementptr i32* %2, i64 %tmp. ; [#uses=1] + %4 = load i32* %3, align 4 ; [#uses=2] + %indvar.next = add i32 %indvar, 1 ; [#uses=2] + %exitcond = icmp eq i32 %indvar.next, %b ; [#uses=1] + br i1 %exitcond, label %bb2.bb3_crit_edge.us, label %bb1.us + +bb2.bb3_crit_edge.us: ; preds = %bb1.us + %indvar.next19 = add i32 %indvar18, 1 ; [#uses=2] + %exitcond22 = icmp eq i32 %indvar.next19, %a ; [#uses=1] + br i1 %exitcond22, label %bb5, label %bb2.preheader.us + +bb2.preheader: ; preds = %bb2.preheader, %bb.nph12 + %indvar24 = phi i32 [ %indvar.next25, %bb2.preheader ], [ 0, %bb.nph12 ] ; [#uses=1] + %indvar.next25 = add i32 %indvar24, 1 ; [#uses=2] + %exitcond28 = icmp eq i32 %indvar.next25, %a ; [#uses=1] + br i1 %exitcond28, label %bb5, label %bb2.preheader + +bb5: ; preds = %bb2.preheader, %bb2.bb3_crit_edge.us, %entry + %sum.1.lcssa = phi i32 [ 0, %entry ], [ 0, %bb2.preheader ], [ %4, %bb2.bb3_crit_edge.us ] ; [#uses=1] + ret i32 %sum.1.lcssa +} From grosbach at apple.com Tue May 12 18:59:14 2009 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 12 May 2009 23:59:14 -0000 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/ARM/ARMInstrInfo.cpp lib/Target/ARM/ARMInstrInfo.td Message-ID: <200905122359.n4CNxEQb014794@zion.cs.uiuc.edu> Author: grosbach Date: Tue May 12 18:59:14 2009 New Revision: 71610 URL: http://llvm.org/viewvc/llvm-project?rev=71610&view=rev Log: Add support for GCC compatible builtin setjmp and longjmp intrinsics. This is a supporting preliminary patch for GCC-compatible SjLJ exception handling. Note that these intrinsics are not designed to be invoked directly by the user, but rather used by the front-end as target hooks for exception handling. Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h llvm/trunk/include/llvm/Intrinsics.td llvm/trunk/lib/CodeGen/MachineFunction.cpp llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.h llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=71610&r1=71609&r2=71610&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Tue May 12 18:59:14 2009 @@ -70,6 +70,10 @@ const Function *Fn; const TargetMachine &Target; + // HasBuiltinSetjmp - true if the function uses builtin_setjmp. Used to + // adjust callee-saved register tracking. + bool HasBuiltinSetjmp; + // RegInfo - Information about each register in use in the function. MachineRegisterInfo *RegInfo; @@ -123,6 +127,14 @@ /// const TargetMachine &getTarget() const { return Target; } + /// doesHaveBuiltinSetjmp - Return whether this function uses builtin_setjmp + /// + bool doesHaveBuiltinSetjmp() const { return HasBuiltinSetjmp; } + + /// setHasBuiltinSetjmp - Mark whether this function uses builtin_setjmp + /// + void setHasBuiltinSetjmp (bool flag) { HasBuiltinSetjmp = flag; } + /// getRegInfo - Return information about the registers currently in use. /// MachineRegisterInfo &getRegInfo() { return *RegInfo; } Modified: llvm/trunk/include/llvm/Intrinsics.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?rev=71610&r1=71609&r2=71610&view=diff ============================================================================== --- llvm/trunk/include/llvm/Intrinsics.td (original) +++ llvm/trunk/include/llvm/Intrinsics.td Tue May 12 18:59:14 2009 @@ -299,6 +299,11 @@ def int_eh_dwarf_cfa : Intrinsic<[llvm_ptr_ty], [llvm_i32_ty]>; +let Properties = [IntrNoMem] in { +def int_builtinsetjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; +def int_builtinlongjmp : Intrinsic<[llvm_void_ty], [llvm_ptr_ty, llvm_i32_ty]>; +} + //===---------------- Generic Variable Attribute Intrinsics----------------===// // def int_var_annotation : Intrinsic<[llvm_void_ty], Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=71610&r1=71609&r2=71610&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Tue May 12 18:59:14 2009 @@ -121,6 +121,7 @@ MachineRegisterInfo(*TM.getRegisterInfo()); else RegInfo = 0; + HasBuiltinSetjmp = false; MFInfo = 0; FrameInfo = new (Allocator.Allocate()) MachineFrameInfo(*TM.getFrameInfo()); Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=71610&r1=71609&r2=71610&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue May 12 18:59:14 2009 @@ -180,7 +180,7 @@ std::vector CSI; for (unsigned i = 0; CSRegs[i]; ++i) { unsigned Reg = CSRegs[i]; - if (Fn.getRegInfo().isPhysRegUsed(Reg)) { + if (Fn.getRegInfo().isPhysRegUsed(Reg) || Fn.doesHaveBuiltinSetjmp()) { // If the reg is modified, save it! CSI.push_back(CalleeSavedInfo(Reg, CSRegClasses[i])); } else { Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=71610&r1=71609&r2=71610&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Tue May 12 18:59:14 2009 @@ -3849,6 +3849,12 @@ case Intrinsic::longjmp: return "_longjmp"+!TLI.usesUnderscoreLongJmp(); break; + case Intrinsic::builtinsetjmp: + // Mark this function has using builtin_setjmp so context gets preserved + DAG.getMachineFunction().setHasBuiltinSetjmp(true); + // Turn it into a target intrinsic node for the codegen + visitTargetIntrinsic(I, Intrinsic); + return 0; case Intrinsic::memcpy: { SDValue Op1 = getValue(I.getOperand(1)); SDValue Op2 = getValue(I.getOperand(2)); Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=71610&r1=71609&r2=71610&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue May 12 18:59:14 2009 @@ -1035,14 +1035,19 @@ return DAG.getNode(ARMISD::PIC_ADD, dl, PtrVT, Result, PICLabel); } -static SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) { +SDValue +ARMTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) { MVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy(); unsigned IntNo = cast(Op.getOperand(0))->getZExtValue(); + DebugLoc dl = Op.getDebugLoc(); switch (IntNo) { default: return SDValue(); // Don't custom lower most intrinsics. case Intrinsic::arm_thread_pointer: - return DAG.getNode(ARMISD::THREAD_POINTER, DebugLoc::getUnknownLoc(), - PtrVT); + return DAG.getNode(ARMISD::THREAD_POINTER, dl, PtrVT); + case Intrinsic::builtinsetjmp: + SDValue Res = DAG.getNode(ARMISD::BUILTIN_SETJMP, dl, MVT::i32, + Op.getOperand(1)); + return Res; } } @@ -1431,6 +1436,20 @@ return DAG.getNode(ARMISD::CNEG, dl, VT, AbsVal, AbsVal, ARMCC, CCR, Cmp); } +SDValue ARMTargetLowering::LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) { + MachineFrameInfo *MFI = DAG.getMachineFunction().getFrameInfo(); + MFI->setFrameAddressIsTaken(true); + MVT VT = Op.getValueType(); + DebugLoc dl = Op.getDebugLoc(); // FIXME probably not meaningful + unsigned Depth = cast(Op.getOperand(0))->getZExtValue(); + unsigned FrameReg = (Subtarget->isThumb() || Subtarget->useThumbBacktraces()) + ? ARM::R7 : ARM::R11; + SDValue FrameAddr = DAG.getCopyFromReg(DAG.getEntryNode(), dl, FrameReg, VT); + while (Depth--) + FrameAddr = DAG.getLoad(VT, dl, DAG.getEntryNode(), FrameAddr, NULL, 0); + return FrameAddr; +} + SDValue ARMTargetLowering::EmitTargetCodeForMemcpy(SelectionDAG &DAG, DebugLoc dl, SDValue Chain, @@ -1612,7 +1631,7 @@ case ISD::FCOPYSIGN: return LowerFCOPYSIGN(Op, DAG); case ISD::FORMAL_ARGUMENTS: return LowerFORMAL_ARGUMENTS(Op, DAG); case ISD::RETURNADDR: break; - case ISD::FRAMEADDR: break; + case ISD::FRAMEADDR: return LowerFRAMEADDR(Op, DAG); case ISD::GLOBAL_OFFSET_TABLE: return LowerGLOBAL_OFFSET_TABLE(Op, DAG); case ISD::INTRINSIC_WO_CHAIN: return LowerINTRINSIC_WO_CHAIN(Op, DAG); case ISD::BIT_CONVERT: return ExpandBIT_CONVERT(Op.getNode(), DAG); Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=71610&r1=71609&r2=71610&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Tue May 12 18:59:14 2009 @@ -64,6 +64,9 @@ FMRRD, // double to two gprs. FMDRR, // Two gprs to double. + BUILTIN_SETJMP, // exception handling setjmp + BUILTIN_LONGJMP, // exception handling longjmp + THREAD_POINTER }; } @@ -154,6 +157,7 @@ SDNode *LowerCallResult(SDValue Chain, SDValue InFlag, CallSDNode *TheCall, unsigned CallingConv, SelectionDAG &DAG); SDValue LowerCALL(SDValue Op, SelectionDAG &DAG); + SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG); SDValue LowerRET(SDValue Op, SelectionDAG &DAG); SDValue LowerGlobalAddressDarwin(SDValue Op, SelectionDAG &DAG); SDValue LowerGlobalAddressELF(SDValue Op, SelectionDAG &DAG); @@ -165,6 +169,7 @@ SDValue LowerGLOBAL_OFFSET_TABLE(SDValue Op, SelectionDAG &DAG); SDValue LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG); SDValue LowerBR_JT(SDValue Op, SelectionDAG &DAG); + SDValue LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG); SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, DebugLoc dl, SDValue Chain, Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp?rev=71610&r1=71609&r2=71610&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp Tue May 12 18:59:14 2009 @@ -991,6 +991,7 @@ // If this machine instr is a constant pool entry, its size is recorded as // operand #2. return MI->getOperand(2).getImm(); + case ARM::Int_builtin_setjmp: return 12; case ARM::BR_JTr: case ARM::BR_JTm: case ARM::BR_JTadd: Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=71610&r1=71609&r2=71610&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue May 12 18:59:14 2009 @@ -40,6 +40,7 @@ SDTCisPtrTy<1>, SDTCisVT<2, i32>]>; def SDT_ARMThreadPointer : SDTypeProfile<1, 0, [SDTCisPtrTy<0>]>; +def SDT_ARMBuiltinSetjmp : SDTypeProfile<1, 1, [SDTCisInt<0>, SDTCisPtrTy<1>]>; // Node definitions. def ARMWrapper : SDNode<"ARMISD::Wrapper", SDTIntUnaryOp>; @@ -84,6 +85,7 @@ def ARMrrx : SDNode<"ARMISD::RRX" , SDTIntUnaryOp, [SDNPInFlag ]>; def ARMthread_pointer: SDNode<"ARMISD::THREAD_POINTER", SDT_ARMThreadPointer>; +def ARMbuiltin_setjmp: SDNode<"ARMISD::BUILTIN_SETJMP", SDT_ARMBuiltinSetjmp>; //===----------------------------------------------------------------------===// // ARM Instruction Predicate Definitions. @@ -1266,6 +1268,27 @@ } //===----------------------------------------------------------------------===// +// SJLJ Exception handling intrinsics +// setjmp() is a three instruction sequence to store the return address +// and save #0 in R0 for the non-longjmp case. +// Since by its nature we may be coming from some other function to get +// here, and we're using the stack frame for the containing function to +// save/restore registers, we can't keep anything live in regs across +// the setjmp(), else it will almost certainly have been tromped upon +// when we get here from a longjmp(). We force everthing out of registers +// except for our own input by listing the relevant registers in Defs. +let Defs = + [ R0, R1, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, LR, + D0, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15 ] in { + def Int_builtin_setjmp : XI<(outs), (ins GPR:$src), + AddrModeNone, SizeSpecial, IndexModeNone, Pseudo, + "add r0, pc, #4\n\t" + "str r0, [$src, #+4]\n\t" + "mov r0, #0 @ setjmp", "", + [(set R0, (ARMbuiltin_setjmp GPR:$src))]>; +} + +//===----------------------------------------------------------------------===// // Non-Instruction Patterns // From dalej at apple.com Tue May 12 19:24:24 2009 From: dalej at apple.com (Dale Johannesen) Date: Wed, 13 May 2009 00:24:24 -0000 Subject: [llvm-commits] [llvm] r71612 - in /llvm/trunk: include/llvm/Support/MathExtras.h lib/Target/Alpha/AlphaInstrInfo.td lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200905130024.n4D0OUQH015653@zion.cs.uiuc.edu> Author: johannes Date: Tue May 12 19:24:22 2009 New Revision: 71612 URL: http://llvm.org/viewvc/llvm-project?rev=71612&view=rev Log: Add an int64_t variant of abs, for host environments without one. Use it where we were using abs on int64_t objects. (I strongly suspect the casts to unsigned in the fragments in LoopStrengthReduce are not doing whatever the original intent was, but the obvious change to uint64_t doesn't work. Maybe later.) Modified: llvm/trunk/include/llvm/Support/MathExtras.h llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Modified: llvm/trunk/include/llvm/Support/MathExtras.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MathExtras.h?rev=71612&r1=71611&r2=71612&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/MathExtras.h (original) +++ llvm/trunk/include/llvm/Support/MathExtras.h Tue May 12 19:24:22 2009 @@ -425,6 +425,13 @@ return ((Value + Align - 1) / Align) * Align; } +/// abs64 - absolute value of a 64-bit int. Not all environments support +/// "abs" on whatever their name for the 64-bit int type is. The absolute +/// value of the largest negative number is undefined, as with "abs". +inline int64_t abs64(int64_t x) { + return (x < 0) ? -x : x; +} + } // End llvm namespace #endif Modified: llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td?rev=71612&r1=71611&r2=71612&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td (original) +++ llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td Tue May 12 19:24:22 2009 @@ -69,7 +69,7 @@ }]>; def nearP2RemX : SDNodeXFormgetZExtValue() - getNearPower2((uint64_t)N->getZExtValue())); + abs64(N->getZExtValue() - getNearPower2((uint64_t)N->getZExtValue())); return getI64Imm(Log2_64(x)); }]>; @@ -124,7 +124,7 @@ getNearPower2((uint64_t)N->getZExtValue())); }]>; def immUExt8ME : PatLeaf<(imm), [{ //use this imm for mulqi - int64_t d = abs((int64_t)N->getZExtValue() - + int64_t d = abs64((int64_t)N->getZExtValue() - (int64_t)getNearPower2((uint64_t)N->getZExtValue())); if (isPowerOf2_64(d)) return false; switch (d) { Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=71612&r1=71611&r2=71612&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Tue May 12 19:24:22 2009 @@ -1013,7 +1013,7 @@ continue; int64_t SSInt = cast(SI->first)->getValue()->getSExtValue(); if (SI->first != Stride && - (unsigned(abs(SInt)) < SSInt || (SInt % SSInt) != 0)) + (unsigned(abs64(SInt)) < SSInt || (SInt % SSInt) != 0)) continue; int64_t Scale = SInt / SSInt; // Check that this stride is valid for all the types used for loads and @@ -1900,7 +1900,7 @@ continue; int64_t SSInt = cast(SI->first)->getValue()->getSExtValue(); if (SSInt == CmpSSInt || - abs(SSInt) < abs(CmpSSInt) || + abs64(SSInt) < abs64(CmpSSInt) || (SSInt % CmpSSInt) != 0) continue; @@ -2336,7 +2336,7 @@ cast(SI->first)->getValue()->getSExtValue(); if (SSInt == SInt) return; // This can definitely be reused. - if (unsigned(abs(SSInt)) < SInt || (SSInt % SInt) != 0) + if (unsigned(abs64(SSInt)) < SInt || (SSInt % SInt) != 0) continue; int64_t Scale = SSInt / SInt; bool AllUsesAreAddresses = true; From ojomojo at gmail.com Tue May 12 19:36:14 2009 From: ojomojo at gmail.com (John Mosby) Date: Tue, 12 May 2009 18:36:14 -0600 Subject: [llvm-commits] [llvm] r71438 - in /llvm/trunk: include/llvm/ADT/SparseBitVector.h lib/CodeGen/PrologEpilogInserter.cpp In-Reply-To: References: <200905111704.n4BH4Kr9026553@zion.cs.uiuc.edu> Message-ID: <645d868c0905121736o2e848c8dt7fae593d2b061f43@mail.gmail.com> On Tue, May 12, 2009 at 5:52 PM, Evan Cheng wrote: > > On May 11, 2009, at 10:04 AM, John Mosby wrote: > > > Author: jdm > > Date: Mon May 11 12:04:19 2009 > > New Revision: 71438 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=71438&view=rev > > Log: > > > > Shrink wrapping in PEI: > > - reduces _static_ callee saved register spills > > and restores similar to Chow's original algorithm. > > - iterative implementation with simple heuristic > > limits to mitigate compile time impact. > > - handles placing spills/restores for multi-entry, > > multi-exit regions in the Machine CFG without > > splitting edges. > > - passes test-suite in LLCBETA mode. > > Hi John, > > Were there any noticeable performance differences? In MultiSource/Applications there were a few slightly improved runtimes, and a few degraded, but none more than a few percentage points of difference. John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090512/e74293c5/attachment.html From evan.cheng at apple.com Tue May 12 20:36:47 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 12 May 2009 18:36:47 -0700 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/ARM/ARMInstrInfo.cpp lib/Target/ARM/ARMInstrInfo.td In-Reply-To: <200905122359.n4CNxEQb014794@zion.cs.uiuc.edu> References: <200905122359.n4CNxEQb014794@zion.cs.uiuc.edu> Message-ID: Thanks Jim. But can you pick better names than builtinsetjmp / longjmp? These are not really setjmp / longjmp. Evan On May 12, 2009, at 4:59 PM, Jim Grosbach wrote: > Author: grosbach > Date: Tue May 12 18:59:14 2009 > New Revision: 71610 > > URL: http://llvm.org/viewvc/llvm-project?rev=71610&view=rev > Log: > Add support for GCC compatible builtin setjmp and longjmp > intrinsics. This is > a supporting preliminary patch for GCC-compatible SjLJ exception > handling. Note that these intrinsics are not designed to be invoked > directly by the user, but > rather used by the front-end as target hooks for exception handling. > > > Modified: > llvm/trunk/include/llvm/CodeGen/MachineFunction.h > llvm/trunk/include/llvm/Intrinsics.td > llvm/trunk/lib/CodeGen/MachineFunction.cpp > llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp > llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp > llvm/trunk/lib/Target/ARM/ARMISelLowering.h > llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp > llvm/trunk/lib/Target/ARM/ARMInstrInfo.td > > Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=71610&r1=71609&r2=71610&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original) > +++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Tue May 12 > 18:59:14 2009 > @@ -70,6 +70,10 @@ > const Function *Fn; > const TargetMachine &Target; > > + // HasBuiltinSetjmp - true if the function uses builtin_setjmp. > Used to > + // adjust callee-saved register tracking. > + bool HasBuiltinSetjmp; > + > // RegInfo - Information about each register in use in the function. > MachineRegisterInfo *RegInfo; > > @@ -123,6 +127,14 @@ > /// > const TargetMachine &getTarget() const { return Target; } > > + /// doesHaveBuiltinSetjmp - Return whether this function uses > builtin_setjmp > + /// > + bool doesHaveBuiltinSetjmp() const { return HasBuiltinSetjmp; } > + > + /// setHasBuiltinSetjmp - Mark whether this function uses > builtin_setjmp > + /// > + void setHasBuiltinSetjmp (bool flag) { HasBuiltinSetjmp = flag; } > + > /// getRegInfo - Return information about the registers currently > in use. > /// > MachineRegisterInfo &getRegInfo() { return *RegInfo; } > > Modified: llvm/trunk/include/llvm/Intrinsics.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?rev=71610&r1=71609&r2=71610&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/include/llvm/Intrinsics.td (original) > +++ llvm/trunk/include/llvm/Intrinsics.td Tue May 12 18:59:14 2009 > @@ -299,6 +299,11 @@ > > def int_eh_dwarf_cfa : Intrinsic<[llvm_ptr_ty], [llvm_i32_ty]>; > > +let Properties = [IntrNoMem] in { > +def int_builtinsetjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; > +def int_builtinlongjmp : Intrinsic<[llvm_void_ty], [llvm_ptr_ty, > llvm_i32_ty]>; > +} > + > //===---------------- Generic Variable Attribute > Intrinsics----------------===// > // > def int_var_annotation : Intrinsic<[llvm_void_ty], > > Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=71610&r1=71609&r2=71610&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original) > +++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Tue May 12 18:59:14 > 2009 > @@ -121,6 +121,7 @@ > MachineRegisterInfo(*TM.getRegisterInfo()); > else > RegInfo = 0; > + HasBuiltinSetjmp = false; > MFInfo = 0; > FrameInfo = new (Allocator.Allocate()) > MachineFrameInfo(*TM.getFrameInfo()); > > Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=71610&r1=71609&r2=71610&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) > +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue May 12 > 18:59:14 2009 > @@ -180,7 +180,7 @@ > std::vector CSI; > for (unsigned i = 0; CSRegs[i]; ++i) { > unsigned Reg = CSRegs[i]; > - if (Fn.getRegInfo().isPhysRegUsed(Reg)) { > + if (Fn.getRegInfo().isPhysRegUsed(Reg) || > Fn.doesHaveBuiltinSetjmp()) { > // If the reg is modified, save it! > CSI.push_back(CalleeSavedInfo(Reg, CSRegClasses[i])); > } else { > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=71610&r1=71609&r2=71610&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp > (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Tue > May 12 18:59:14 2009 > @@ -3849,6 +3849,12 @@ > case Intrinsic::longjmp: > return "_longjmp"+!TLI.usesUnderscoreLongJmp(); > break; > + case Intrinsic::builtinsetjmp: > + // Mark this function has using builtin_setjmp so context gets > preserved > + DAG.getMachineFunction().setHasBuiltinSetjmp(true); > + // Turn it into a target intrinsic node for the codegen > + visitTargetIntrinsic(I, Intrinsic); > + return 0; > case Intrinsic::memcpy: { > SDValue Op1 = getValue(I.getOperand(1)); > SDValue Op2 = getValue(I.getOperand(2)); > > Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=71610&r1=71609&r2=71610&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) > +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue May 12 > 18:59:14 2009 > @@ -1035,14 +1035,19 @@ > return DAG.getNode(ARMISD::PIC_ADD, dl, PtrVT, Result, PICLabel); > } > > -static SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG > &DAG) { > +SDValue > +ARMTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG > &DAG) { > MVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy(); > unsigned IntNo = cast(Op.getOperand(0))- > >getZExtValue(); > + DebugLoc dl = Op.getDebugLoc(); > switch (IntNo) { > default: return SDValue(); // Don't custom lower most intrinsics. > case Intrinsic::arm_thread_pointer: > - return DAG.getNode(ARMISD::THREAD_POINTER, > DebugLoc::getUnknownLoc(), > - PtrVT); > + return DAG.getNode(ARMISD::THREAD_POINTER, dl, PtrVT); > + case Intrinsic::builtinsetjmp: > + SDValue Res = DAG.getNode(ARMISD::BUILTIN_SETJMP, dl, MVT::i32, > + Op.getOperand(1)); > + return Res; > } > } > > @@ -1431,6 +1436,20 @@ > return DAG.getNode(ARMISD::CNEG, dl, VT, AbsVal, AbsVal, ARMCC, > CCR, Cmp); > } > > +SDValue ARMTargetLowering::LowerFRAMEADDR(SDValue Op, SelectionDAG > &DAG) { > + MachineFrameInfo *MFI = DAG.getMachineFunction().getFrameInfo(); > + MFI->setFrameAddressIsTaken(true); > + MVT VT = Op.getValueType(); > + DebugLoc dl = Op.getDebugLoc(); // FIXME probably not meaningful > + unsigned Depth = cast(Op.getOperand(0))- > >getZExtValue(); > + unsigned FrameReg = (Subtarget->isThumb() || Subtarget- > >useThumbBacktraces()) > + ? ARM::R7 : ARM::R11; > + SDValue FrameAddr = DAG.getCopyFromReg(DAG.getEntryNode(), dl, > FrameReg, VT); > + while (Depth--) > + FrameAddr = DAG.getLoad(VT, dl, DAG.getEntryNode(), FrameAddr, > NULL, 0); > + return FrameAddr; > +} > + > SDValue > ARMTargetLowering::EmitTargetCodeForMemcpy(SelectionDAG &DAG, > DebugLoc dl, > SDValue Chain, > @@ -1612,7 +1631,7 @@ > case ISD::FCOPYSIGN: return LowerFCOPYSIGN(Op, DAG); > case ISD::FORMAL_ARGUMENTS: return LowerFORMAL_ARGUMENTS(Op, DAG); > case ISD::RETURNADDR: break; > - case ISD::FRAMEADDR: break; > + case ISD::FRAMEADDR: return LowerFRAMEADDR(Op, DAG); > case ISD::GLOBAL_OFFSET_TABLE: return LowerGLOBAL_OFFSET_TABLE(Op, > DAG); > case ISD::INTRINSIC_WO_CHAIN: return LowerINTRINSIC_WO_CHAIN(Op, > DAG); > case ISD::BIT_CONVERT: return ExpandBIT_CONVERT(Op.getNode(), > DAG); > > Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=71610&r1=71609&r2=71610&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) > +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Tue May 12 18:59:14 > 2009 > @@ -64,6 +64,9 @@ > FMRRD, // double to two gprs. > FMDRR, // Two gprs to double. > > + BUILTIN_SETJMP, // exception handling setjmp > + BUILTIN_LONGJMP, // exception handling longjmp > + > THREAD_POINTER > }; > } > @@ -154,6 +157,7 @@ > SDNode *LowerCallResult(SDValue Chain, SDValue InFlag, > CallSDNode *TheCall, > unsigned CallingConv, SelectionDAG &DAG); > SDValue LowerCALL(SDValue Op, SelectionDAG &DAG); > + SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG); > SDValue LowerRET(SDValue Op, SelectionDAG &DAG); > SDValue LowerGlobalAddressDarwin(SDValue Op, SelectionDAG &DAG); > SDValue LowerGlobalAddressELF(SDValue Op, SelectionDAG &DAG); > @@ -165,6 +169,7 @@ > SDValue LowerGLOBAL_OFFSET_TABLE(SDValue Op, SelectionDAG &DAG); > SDValue LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG); > SDValue LowerBR_JT(SDValue Op, SelectionDAG &DAG); > + SDValue LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG); > > SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, DebugLoc dl, > SDValue Chain, > > Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp?rev=71610&r1=71609&r2=71610&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp (original) > +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp Tue May 12 18:59:14 > 2009 > @@ -991,6 +991,7 @@ > // If this machine instr is a constant pool entry, its size is > recorded as > // operand #2. > return MI->getOperand(2).getImm(); > + case ARM::Int_builtin_setjmp: return 12; > case ARM::BR_JTr: > case ARM::BR_JTm: > case ARM::BR_JTadd: > > Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=71610&r1=71609&r2=71610&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) > +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue May 12 18:59:14 2009 > @@ -40,6 +40,7 @@ > SDTCisPtrTy<1>, > SDTCisVT<2, i32>]>; > > def SDT_ARMThreadPointer : SDTypeProfile<1, 0, [SDTCisPtrTy<0>]>; > +def SDT_ARMBuiltinSetjmp : SDTypeProfile<1, 1, [SDTCisInt<0>, > SDTCisPtrTy<1>]>; > > // Node definitions. > def ARMWrapper : SDNode<"ARMISD::Wrapper", SDTIntUnaryOp>; > @@ -84,6 +85,7 @@ > def ARMrrx : SDNode<"ARMISD::RRX" , SDTIntUnaryOp, > [SDNPInFlag ]>; > > def ARMthread_pointer: SDNode<"ARMISD::THREAD_POINTER", > SDT_ARMThreadPointer>; > +def ARMbuiltin_setjmp: SDNode<"ARMISD::BUILTIN_SETJMP", > SDT_ARMBuiltinSetjmp>; > > // > = > = > = > ----------------------------------------------------------------------= > ==// > // ARM Instruction Predicate Definitions. > @@ -1266,6 +1268,27 @@ > } > > // > = > = > = > ----------------------------------------------------------------------= > ==// > +// SJLJ Exception handling intrinsics > +// setjmp() is a three instruction sequence to store the return > address > +// and save #0 in R0 for the non-longjmp case. > +// Since by its nature we may be coming from some other function > to get > +// here, and we're using the stack frame for the containing > function to > +// save/restore registers, we can't keep anything live in regs > across > +// the setjmp(), else it will almost certainly have been tromped > upon > +// when we get here from a longjmp(). We force everthing out of > registers > +// except for our own input by listing the relevant registers in > Defs. > +let Defs = > + [ R0, R1, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, LR, > + D0, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, > D15 ] in { > + def Int_builtin_setjmp : XI<(outs), (ins GPR:$src), > + AddrModeNone, SizeSpecial, > IndexModeNone, Pseudo, > + "add r0, pc, #4\n\t" > + "str r0, [$src, #+4]\n\t" > + "mov r0, #0 @ setjmp", "", > + [(set R0, (ARMbuiltin_setjmp GPR: > $src))]>; > +} > + > +// > = > = > = > ----------------------------------------------------------------------= > ==// > // Non-Instruction Patterns > // > > > > _______________________________________________ > 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 May 12 20:47:16 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 12 May 2009 18:47:16 -0700 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/AR Message-ID: On Tue, May 12, 2009 at 6:36 PM, Evan Cheng wrote: > Thanks Jim. But can you pick better names than builtinsetjmp / > longjmp? These are not really setjmp / longjmp. Mmm... agreed that they're not great names, but there is a reason for the names: they correspond to the gcc builtins __builtin_setjmp and __builtin_longjmp. -Eli From eli.friedman at gmail.com Tue May 12 20:51:57 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 12 May 2009 18:51:57 -0700 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/AR Message-ID: On Tue, May 12, 2009 at 4:59 PM, Jim Grosbach wrote: > +def int_builtinlongjmp : Intrinsic<[llvm_void_ty], [llvm_ptr_ty, llvm_i32_ty]>; Minor detail, but I don't think there's any good reason for this intrinsic to take two arguments: the second argument never actually gets used. -Eli From evan.cheng at apple.com Tue May 12 20:56:07 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 12 May 2009 18:56:07 -0700 Subject: [llvm-commits] [PATCH] Generate info about the JIT process In-Reply-To: <978B1AEF-4B6B-4BA1-A73F-6FEF5C95A12D@fallingsnow.net> References: <978B1AEF-4B6B-4BA1-A73F-6FEF5C95A12D@fallingsnow.net> Message-ID: On May 11, 2009, at 7:03 PM, Evan Phoenix wrote: >> Wow another Evan. :-) > Doin' my part to raise the quota! >> This looks fine but is it necessary? Can we just use >> MachineCodeEmitter to report these? Should it be under >> ExecutionEngine or CodeGen? Are you expecting to extend it to track >> more information? > After talking with a number of people in #llvm, this was the solution > we came up with. We couldn't come up with a solution for reporting > the info from MachineCodeEmitter that didn't require restructuring > things a lot, so this was the idea we came up with. Ok. > > One upside is that because it's isolated, we have the ability to > easily extend it to track more information. One thing I eventually > want to report is the Relocation information, so that the machine code > can be manipulated outside of LLVMs control. > > I consider it to be a phase 1 of http://wiki.llvm.org/Provide_more_control_over_and_access_to_JIT%27s_output > , which Jeffrey Yasskin and I have been discussing. > > So I guess my point is that I'm open to reporting this data a > different way, but we haven't yet seen one that is as simple. :) Ok. My only real complain about the patch is MachineCodeInfo.h should be in CodeGen just like MachineCodeEmitter. Evan > > Additionally, I'm happy to craft this patch externally, but I think it > would make everyones life easier to get it into the repo, so that > others can work on adding things to the API. >> Evan > Also Evan >> > _______________________________________________ > 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 May 12 20:57:36 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 12 May 2009 18:57:36 -0700 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/AR In-Reply-To: References: Message-ID: <787F4540-7E6B-41E4-80F8-7F527F135A60@apple.com> On May 12, 2009, at 6:47 PM, Eli Friedman wrote: > On Tue, May 12, 2009 at 6:36 PM, Evan Cheng > wrote: >> Thanks Jim. But can you pick better names than builtinsetjmp / >> longjmp? These are not really setjmp / longjmp. > > Mmm... agreed that they're not great names, but there is a reason for > the names: they correspond to the gcc builtins __builtin_setjmp and > __builtin_longjmp. I understand. But it's still not a very confusing name. Do we have to follow use gcc's builtin names? These are llvm intrinsics, we can define them how we want. It just happens we implement gcc's __builtin_setjmp / longjmp with these. :-) Evan > > -Eli > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From gohman at apple.com Tue May 12 22:46:43 2009 From: gohman at apple.com (Dan Gohman) Date: Wed, 13 May 2009 03:46:43 -0000 Subject: [llvm-commits] [llvm] r71632 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolution.h lib/Analysis/ScalarEvolution.cpp Message-ID: <200905130346.n4D3kjF3023766@zion.cs.uiuc.edu> Author: djg Date: Tue May 12 22:46:30 2009 New Revision: 71632 URL: http://llvm.org/viewvc/llvm-project?rev=71632&view=rev Log: Add three new helper routines, getNoopOrZeroExtend, getNoopOrSignExtend, and getTruncateOrNoop. These are similar to getTruncateOrZeroExtend etc., except that they assert that the conversion is either not widening or narrowing, as appropriate. These will be used in some upcoming fixes. Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=71632&r1=71631&r2=71632&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original) +++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Tue May 12 22:46:30 2009 @@ -446,6 +446,21 @@ /// extended, it is sign extended. SCEVHandle getTruncateOrSignExtend(const SCEVHandle &V, const Type *Ty); + /// getNoopOrZeroExtend - Return a SCEV corresponding to a conversion of + /// the input value to the specified type. If the type must be extended, + /// it is zero extended. The conversion must not be narrowing. + SCEVHandle getNoopOrZeroExtend(const SCEVHandle &V, const Type *Ty); + + /// getNoopOrSignExtend - Return a SCEV corresponding to a conversion of + /// the input value to the specified type. If the type must be extended, + /// it is sign extended. The conversion must not be narrowing. + SCEVHandle getNoopOrSignExtend(const SCEVHandle &V, const Type *Ty); + + /// getTruncateOrNoop - Return a SCEV corresponding to a conversion of the + /// input value to the specified type. The conversion must not be + /// widening. + SCEVHandle getTruncateOrNoop(const SCEVHandle &V, const Type *Ty); + /// getIntegerSCEV - Given an integer or FP type, create a constant for the /// specified signed integer value and return a SCEV for the constant. SCEVHandle getIntegerSCEV(int Val, const Type *Ty); Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=71632&r1=71631&r2=71632&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Tue May 12 22:46:30 2009 @@ -1807,6 +1807,53 @@ return getSignExtendExpr(V, Ty); } +/// getNoopOrZeroExtend - Return a SCEV corresponding to a conversion of the +/// input value to the specified type. If the type must be extended, it is zero +/// extended. The conversion must not be narrowing. +SCEVHandle +ScalarEvolution::getNoopOrZeroExtend(const SCEVHandle &V, const Type *Ty) { + const Type *SrcTy = V->getType(); + assert((SrcTy->isInteger() || (TD && isa(SrcTy))) && + (Ty->isInteger() || (TD && isa(Ty))) && + "Cannot noop or zero extend with non-integer arguments!"); + assert(getTypeSizeInBits(SrcTy) <= getTypeSizeInBits(Ty) && + "getNoopOrZeroExtend cannot truncate!"); + if (getTypeSizeInBits(SrcTy) == getTypeSizeInBits(Ty)) + return V; // No conversion + return getZeroExtendExpr(V, Ty); +} + +/// getNoopOrSignExtend - Return a SCEV corresponding to a conversion of the +/// input value to the specified type. If the type must be extended, it is sign +/// extended. The conversion must not be narrowing. +SCEVHandle +ScalarEvolution::getNoopOrSignExtend(const SCEVHandle &V, const Type *Ty) { + const Type *SrcTy = V->getType(); + assert((SrcTy->isInteger() || (TD && isa(SrcTy))) && + (Ty->isInteger() || (TD && isa(Ty))) && + "Cannot noop or sign extend with non-integer arguments!"); + assert(getTypeSizeInBits(SrcTy) <= getTypeSizeInBits(Ty) && + "getNoopOrSignExtend cannot truncate!"); + if (getTypeSizeInBits(SrcTy) == getTypeSizeInBits(Ty)) + return V; // No conversion + return getSignExtendExpr(V, Ty); +} + +/// getTruncateOrNoop - Return a SCEV corresponding to a conversion of the +/// input value to the specified type. The conversion must not be widening. +SCEVHandle +ScalarEvolution::getTruncateOrNoop(const SCEVHandle &V, const Type *Ty) { + const Type *SrcTy = V->getType(); + assert((SrcTy->isInteger() || (TD && isa(SrcTy))) && + (Ty->isInteger() || (TD && isa(Ty))) && + "Cannot truncate or noop with non-integer arguments!"); + assert(getTypeSizeInBits(SrcTy) >= getTypeSizeInBits(Ty) && + "getTruncateOrNoop cannot extend!"); + if (getTypeSizeInBits(SrcTy) == getTypeSizeInBits(Ty)) + return V; // No conversion + return getTruncateExpr(V, Ty); +} + /// ReplaceSymbolicValueWithConcrete - This looks up the computed SCEV value for /// the specified instruction and replaces any references to the symbolic value /// SymName with the specified value. This is used during PHI resolution. From lhames at gmail.com Tue May 12 23:18:59 2009 From: lhames at gmail.com (Lang Hames) Date: Wed, 13 May 2009 04:18:59 -0000 Subject: [llvm-commits] [llvm] r71635 - /llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Message-ID: <200905130419.n4D4J1cf024928@zion.cs.uiuc.edu> Author: lhames Date: Tue May 12 23:18:47 2009 New Revision: 71635 URL: http://llvm.org/viewvc/llvm-project?rev=71635&view=rev Log: Fix for PR4121. If TwoAddressInstructionPass removes a dead def, and the regB operand was killed, the kill needs to be removed from regB's VarInfo. 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=71635&r1=71634&r2=71635&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original) +++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Tue May 12 23:18:47 2009 @@ -858,6 +858,12 @@ } } } + + // We're really going to nuke the old inst. If regB was marked + // as a kill we need to update its Kills list. + if (mi->getOperand(si).isKill()) + LV->removeVirtualRegisterKilled(regB, mi); + mbbi->erase(mi); // Nuke the old inst. mi = nmi; ++NumDeletes; From grosbach at apple.com Tue May 12 23:24:10 2009 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 12 May 2009 21:24:10 -0700 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/ARM/ARMInstrInfo.cpp lib/Target/ARM/ARMInstrInfo.td In-Reply-To: References: <200905122359.n4CNxEQb014794@zion.cs.uiuc.edu> Message-ID: <318A3D76-55D6-480D-8280-97C240E1F067@apple.com> I'll see what I can come up with. I stuck with the GCC naming since that's what it's intended to be compatible with. You're right, though, that it gets confusing in the other direction since the semantics are not the same as the library setjmp and longjmp. I'm definitely open to suggestions if anyone has ideas. :) -jim On May 12, 2009, at 6:36 PM, Evan Cheng wrote: > Thanks Jim. But can you pick better names than builtinsetjmp / > longjmp? These are not really setjmp / longjmp. > > Evan > > On May 12, 2009, at 4:59 PM, Jim Grosbach wrote: > >> Author: grosbach >> Date: Tue May 12 18:59:14 2009 >> New Revision: 71610 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=71610&view=rev >> Log: >> Add support for GCC compatible builtin setjmp and longjmp >> intrinsics. This is >> a supporting preliminary patch for GCC-compatible SjLJ exception >> handling. Note that these intrinsics are not designed to be invoked >> directly by the user, but >> rather used by the front-end as target hooks for exception handling. >> >> >> Modified: >> llvm/trunk/include/llvm/CodeGen/MachineFunction.h >> llvm/trunk/include/llvm/Intrinsics.td >> llvm/trunk/lib/CodeGen/MachineFunction.cpp >> llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp >> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp >> llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp >> llvm/trunk/lib/Target/ARM/ARMISelLowering.h >> llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp >> llvm/trunk/lib/Target/ARM/ARMInstrInfo.td >> >> Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=71610&r1=71609&r2=71610&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original) >> +++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Tue May 12 >> 18:59:14 2009 >> @@ -70,6 +70,10 @@ >> const Function *Fn; >> const TargetMachine &Target; >> >> + // HasBuiltinSetjmp - true if the function uses builtin_setjmp. >> Used to >> + // adjust callee-saved register tracking. >> + bool HasBuiltinSetjmp; >> + >> // RegInfo - Information about each register in use in the function. >> MachineRegisterInfo *RegInfo; >> >> @@ -123,6 +127,14 @@ >> /// >> const TargetMachine &getTarget() const { return Target; } >> >> + /// doesHaveBuiltinSetjmp - Return whether this function uses >> builtin_setjmp >> + /// >> + bool doesHaveBuiltinSetjmp() const { return HasBuiltinSetjmp; } >> + >> + /// setHasBuiltinSetjmp - Mark whether this function uses >> builtin_setjmp >> + /// >> + void setHasBuiltinSetjmp (bool flag) { HasBuiltinSetjmp = flag; } >> + >> /// getRegInfo - Return information about the registers currently >> in use. >> /// >> MachineRegisterInfo &getRegInfo() { return *RegInfo; } >> >> Modified: llvm/trunk/include/llvm/Intrinsics.td >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?rev=71610&r1=71609&r2=71610&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/include/llvm/Intrinsics.td (original) >> +++ llvm/trunk/include/llvm/Intrinsics.td Tue May 12 18:59:14 2009 >> @@ -299,6 +299,11 @@ >> >> def int_eh_dwarf_cfa : Intrinsic<[llvm_ptr_ty], [llvm_i32_ty]>; >> >> +let Properties = [IntrNoMem] in { >> +def int_builtinsetjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; >> +def int_builtinlongjmp : Intrinsic<[llvm_void_ty], [llvm_ptr_ty, >> llvm_i32_ty]>; >> +} >> + >> //===---------------- Generic Variable Attribute >> Intrinsics----------------===// >> // >> def int_var_annotation : Intrinsic<[llvm_void_ty], >> >> Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=71610&r1=71609&r2=71610&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original) >> +++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Tue May 12 18:59:14 >> 2009 >> @@ -121,6 +121,7 @@ >> MachineRegisterInfo(*TM.getRegisterInfo()); >> else >> RegInfo = 0; >> + HasBuiltinSetjmp = false; >> MFInfo = 0; >> FrameInfo = new (Allocator.Allocate()) >> MachineFrameInfo(*TM.getFrameInfo()); >> >> Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=71610&r1=71609&r2=71610&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) >> +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue May 12 >> 18:59:14 2009 >> @@ -180,7 +180,7 @@ >> std::vector CSI; >> for (unsigned i = 0; CSRegs[i]; ++i) { >> unsigned Reg = CSRegs[i]; >> - if (Fn.getRegInfo().isPhysRegUsed(Reg)) { >> + if (Fn.getRegInfo().isPhysRegUsed(Reg) || >> Fn.doesHaveBuiltinSetjmp()) { >> // If the reg is modified, save it! >> CSI.push_back(CalleeSavedInfo(Reg, CSRegClasses[i])); >> } else { >> >> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=71610&r1=71609&r2=71610&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp >> (original) >> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Tue >> May 12 18:59:14 2009 >> @@ -3849,6 +3849,12 @@ >> case Intrinsic::longjmp: >> return "_longjmp"+!TLI.usesUnderscoreLongJmp(); >> break; >> + case Intrinsic::builtinsetjmp: >> + // Mark this function has using builtin_setjmp so context gets >> preserved >> + DAG.getMachineFunction().setHasBuiltinSetjmp(true); >> + // Turn it into a target intrinsic node for the codegen >> + visitTargetIntrinsic(I, Intrinsic); >> + return 0; >> case Intrinsic::memcpy: { >> SDValue Op1 = getValue(I.getOperand(1)); >> SDValue Op2 = getValue(I.getOperand(2)); >> >> Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=71610&r1=71609&r2=71610&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) >> +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue May 12 >> 18:59:14 2009 >> @@ -1035,14 +1035,19 @@ >> return DAG.getNode(ARMISD::PIC_ADD, dl, PtrVT, Result, PICLabel); >> } >> >> -static SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG >> &DAG) { >> +SDValue >> +ARMTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG >> &DAG) { >> MVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy(); >> unsigned IntNo = cast(Op.getOperand(0))- >>> getZExtValue(); >> + DebugLoc dl = Op.getDebugLoc(); >> switch (IntNo) { >> default: return SDValue(); // Don't custom lower most intrinsics. >> case Intrinsic::arm_thread_pointer: >> - return DAG.getNode(ARMISD::THREAD_POINTER, >> DebugLoc::getUnknownLoc(), >> - PtrVT); >> + return DAG.getNode(ARMISD::THREAD_POINTER, dl, PtrVT); >> + case Intrinsic::builtinsetjmp: >> + SDValue Res = DAG.getNode(ARMISD::BUILTIN_SETJMP, dl, >> MVT::i32, >> + Op.getOperand(1)); >> + return Res; >> } >> } >> >> @@ -1431,6 +1436,20 @@ >> return DAG.getNode(ARMISD::CNEG, dl, VT, AbsVal, AbsVal, ARMCC, >> CCR, Cmp); >> } >> >> +SDValue ARMTargetLowering::LowerFRAMEADDR(SDValue Op, SelectionDAG >> &DAG) { >> + MachineFrameInfo *MFI = DAG.getMachineFunction().getFrameInfo(); >> + MFI->setFrameAddressIsTaken(true); >> + MVT VT = Op.getValueType(); >> + DebugLoc dl = Op.getDebugLoc(); // FIXME probably not meaningful >> + unsigned Depth = cast(Op.getOperand(0))- >>> getZExtValue(); >> + unsigned FrameReg = (Subtarget->isThumb() || Subtarget- >>> useThumbBacktraces()) >> + ? ARM::R7 : ARM::R11; >> + SDValue FrameAddr = DAG.getCopyFromReg(DAG.getEntryNode(), dl, >> FrameReg, VT); >> + while (Depth--) >> + FrameAddr = DAG.getLoad(VT, dl, DAG.getEntryNode(), FrameAddr, >> NULL, 0); >> + return FrameAddr; >> +} >> + >> SDValue >> ARMTargetLowering::EmitTargetCodeForMemcpy(SelectionDAG &DAG, >> DebugLoc dl, >> SDValue Chain, >> @@ -1612,7 +1631,7 @@ >> case ISD::FCOPYSIGN: return LowerFCOPYSIGN(Op, DAG); >> case ISD::FORMAL_ARGUMENTS: return LowerFORMAL_ARGUMENTS(Op, DAG); >> case ISD::RETURNADDR: break; >> - case ISD::FRAMEADDR: break; >> + case ISD::FRAMEADDR: return LowerFRAMEADDR(Op, DAG); >> case ISD::GLOBAL_OFFSET_TABLE: return LowerGLOBAL_OFFSET_TABLE(Op, >> DAG); >> case ISD::INTRINSIC_WO_CHAIN: return LowerINTRINSIC_WO_CHAIN(Op, >> DAG); >> case ISD::BIT_CONVERT: return ExpandBIT_CONVERT(Op.getNode(), >> DAG); >> >> Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=71610&r1=71609&r2=71610&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) >> +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Tue May 12 18:59:14 >> 2009 >> @@ -64,6 +64,9 @@ >> FMRRD, // double to two gprs. >> FMDRR, // Two gprs to double. >> >> + BUILTIN_SETJMP, // exception handling setjmp >> + BUILTIN_LONGJMP, // exception handling longjmp >> + >> THREAD_POINTER >> }; >> } >> @@ -154,6 +157,7 @@ >> SDNode *LowerCallResult(SDValue Chain, SDValue InFlag, >> CallSDNode *TheCall, >> unsigned CallingConv, SelectionDAG &DAG); >> SDValue LowerCALL(SDValue Op, SelectionDAG &DAG); >> + SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG); >> SDValue LowerRET(SDValue Op, SelectionDAG &DAG); >> SDValue LowerGlobalAddressDarwin(SDValue Op, SelectionDAG &DAG); >> SDValue LowerGlobalAddressELF(SDValue Op, SelectionDAG &DAG); >> @@ -165,6 +169,7 @@ >> SDValue LowerGLOBAL_OFFSET_TABLE(SDValue Op, SelectionDAG &DAG); >> SDValue LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG); >> SDValue LowerBR_JT(SDValue Op, SelectionDAG &DAG); >> + SDValue LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG); >> >> SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, DebugLoc dl, >> SDValue Chain, >> >> Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp?rev=71610&r1=71609&r2=71610&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp (original) >> +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp Tue May 12 18:59:14 >> 2009 >> @@ -991,6 +991,7 @@ >> // If this machine instr is a constant pool entry, its size is >> recorded as >> // operand #2. >> return MI->getOperand(2).getImm(); >> + case ARM::Int_builtin_setjmp: return 12; >> case ARM::BR_JTr: >> case ARM::BR_JTm: >> case ARM::BR_JTadd: >> >> Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=71610&r1=71609&r2=71610&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) >> +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue May 12 18:59:14 >> 2009 >> @@ -40,6 +40,7 @@ >> SDTCisPtrTy<1>, >> SDTCisVT<2, i32>]>; >> >> def SDT_ARMThreadPointer : SDTypeProfile<1, 0, [SDTCisPtrTy<0>]>; >> +def SDT_ARMBuiltinSetjmp : SDTypeProfile<1, 1, [SDTCisInt<0>, >> SDTCisPtrTy<1>]>; >> >> // Node definitions. >> def ARMWrapper : SDNode<"ARMISD::Wrapper", SDTIntUnaryOp>; >> @@ -84,6 +85,7 @@ >> def ARMrrx : SDNode<"ARMISD::RRX" , SDTIntUnaryOp, >> [SDNPInFlag ]>; >> >> def ARMthread_pointer: SDNode<"ARMISD::THREAD_POINTER", >> SDT_ARMThreadPointer>; >> +def ARMbuiltin_setjmp: SDNode<"ARMISD::BUILTIN_SETJMP", >> SDT_ARMBuiltinSetjmp>; >> >> // >> = >> = >> = >> ----------------------------------------------------------------------= >> ==// >> // ARM Instruction Predicate Definitions. >> @@ -1266,6 +1268,27 @@ >> } >> >> // >> = >> = >> = >> ----------------------------------------------------------------------= >> ==// >> +// SJLJ Exception handling intrinsics >> +// setjmp() is a three instruction sequence to store the return >> address >> +// and save #0 in R0 for the non-longjmp case. >> +// Since by its nature we may be coming from some other function >> to get >> +// here, and we're using the stack frame for the containing >> function to >> +// save/restore registers, we can't keep anything live in regs >> across >> +// the setjmp(), else it will almost certainly have been tromped >> upon >> +// when we get here from a longjmp(). We force everthing out of >> registers >> +// except for our own input by listing the relevant registers in >> Defs. >> +let Defs = >> + [ R0, R1, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, LR, >> + D0, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, >> D15 ] in { >> + def Int_builtin_setjmp : XI<(outs), (ins GPR:$src), >> + AddrModeNone, SizeSpecial, >> IndexModeNone, Pseudo, >> + "add r0, pc, #4\n\t" >> + "str r0, [$src, #+4]\n\t" >> + "mov r0, #0 @ setjmp", "", >> + [(set R0, (ARMbuiltin_setjmp GPR: >> $src))]>; >> +} >> + >> +// >> = >> = >> = >> ----------------------------------------------------------------------= >> ==// >> // Non-Instruction Patterns >> // >> >> >> >> _______________________________________________ >> 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 clattner at apple.com Wed May 13 00:57:10 2009 From: clattner at apple.com (Chris Lattner) Date: Tue, 12 May 2009 22:57:10 -0700 Subject: [llvm-commits] RFC: initial union syntax support In-Reply-To: <85dfcd7f0905121600w439bab62ncd3d7db1284749a7@mail.gmail.com> References: <85dfcd7f0905121101y62ac0c4esd27a518adbabd3b9@mail.gmail.com> <85dfcd7f0905121456x5570de7dg3dfc35cde861ce1f@mail.gmail.com> <85dfcd7f0905121600w439bab62ncd3d7db1284749a7@mail.gmail.com> Message-ID: <636C07B5-EF49-45E8-BECA-D3F46AB5D70E@apple.com> On May 12, 2009, at 4:00 PM, Andrew Lenharth wrote: > Updated patch. Supports C, Cpp, and all (?) native codegen. BasicAA > updated to be conservative (but not completely enough yet). > > Making unions a type of struct makes most code just work as most code > uses getOffset variants since structs can already have zero width > elements. Hi Andrew, What problem does this solve? -Chris From nicholas at mxc.ca Wed May 13 01:07:47 2009 From: nicholas at mxc.ca (Nick Lewycky) Date: Tue, 12 May 2009 23:07:47 -0700 Subject: [llvm-commits] RFC: initial union syntax support In-Reply-To: <85dfcd7f0905121600w439bab62ncd3d7db1284749a7@mail.gmail.com> References: <85dfcd7f0905121101y62ac0c4esd27a518adbabd3b9@mail.gmail.com> <85dfcd7f0905121456x5570de7dg3dfc35cde861ce1f@mail.gmail.com> <85dfcd7f0905121600w439bab62ncd3d7db1284749a7@mail.gmail.com> Message-ID: <4A0A63B3.6010908@mxc.ca> Andrew Lenharth wrote: > Updated patch. Supports C, Cpp, and all (?) native codegen. BasicAA > updated to be conservative (but not completely enough yet). I still don't like the fact that StructType is UnionType, but that's more subjective than objective. I really don't like allowing a union to contain the same type twice. That should be illegal no matter what the object hierarchy is. Nick > Making unions a type of struct makes most code just work as most code > uses getOffset variants since structs can already have zero width > elements. > > Index: include/llvm/DerivedTypes.h > =================================================================== > --- include/llvm/DerivedTypes.h (revision 71552) > +++ include/llvm/DerivedTypes.h (working copy) > @@ -218,13 +218,17 @@ > friend class TypeMap; > StructType(const StructType &); // Do not implement > const StructType &operator=(const StructType &); // Do not implement > - StructType(const std::vector &Types, bool isPacked); > + StructType(const std::vector &Types, > + bool isPacked, bool isUnion); > + enum {structPlain = 0, > + structPacked = 1, > + structUnion = 2}; > public: > /// StructType::get - This static method is the primary way to create a > /// StructType. > /// > static StructType *get(const std::vector &Params, > - bool isPacked=false); > + bool isPacked=false, bool isUnion=false); > > /// StructType::get - This static method is a convenience method for > /// creating structure types by specifying the elements as arguments. > @@ -262,7 +266,9 @@ > return T->getTypeID() == StructTyID; > } > > - bool isPacked() const { return (0 != getSubclassData()) ? true : false; } > + bool isPacked() const { return structPacked == getSubclassData(); } > + bool isUnion() const { return structUnion == getSubclassData(); } > + > }; > > > Index: include/llvm/Bitcode/LLVMBitCodes.h > =================================================================== > --- include/llvm/Bitcode/LLVMBitCodes.h (revision 71552) > +++ include/llvm/Bitcode/LLVMBitCodes.h (working copy) > @@ -90,7 +90,11 @@ > // binary compatibility. > TYPE_CODE_X86_FP80 = 13, // X86 LONG DOUBLE > TYPE_CODE_FP128 = 14, // LONG DOUBLE (112 bit mantissa) > - TYPE_CODE_PPC_FP128= 15 // PPC LONG DOUBLE (2 doubles) > + TYPE_CODE_PPC_FP128= 15, // PPC LONG DOUBLE (2 doubles) > + > + //Merge UNIOIN with STRUCT in LLVM 3.0 > + TYPE_CODE_UNION = 16 // UNIOIN: [eltty x N] UNIOIN -> UNION, twice. > + > // Any other type code is assumed to be an unknown type. > }; > > Index: docs/LangRef.html > =================================================================== > --- docs/LangRef.html (revision 71552) > +++ docs/LangRef.html (working copy) > @@ -1579,8 +1579,31 @@ > > >
> - > > + > +
> +
Overview:
> +

The union structure type is used to represent a collection of data members > +overlapping in memory. All fields start at an offset of zero. The elements of > +a union structure may be any type that has a size. The size of a union is the > +size of the largest element. The alignment is the alignment of the > most restricted > +element.

> +

Structures are accessed using 'load > +and 'store' by getting a pointer to a > +field with the 'getelementptr' > +instruction.

> +
Syntax:
> +
  < union { <type list> } > 
> +
Examples:
> + > + > + > + > + > +
< union { i32, i32*, i64 } >A union of three values
> +
> + > >
>
Overview:
> Index: lib/Analysis/BasicAliasAnalysis.cpp > =================================================================== > --- lib/Analysis/BasicAliasAnalysis.cpp (revision 71552) > +++ lib/Analysis/BasicAliasAnalysis.cpp (working copy) > @@ -529,6 +529,12 @@ > > const PointerType *GEPPointerTy = cast(BasePtr1Ty); > > + //Fixme: Be conservative for Unions > + //Fixme: This doesn't handle embedded unions > + if (const StructType* STy = > dyn_cast(GEPPointerTy->getElementType())) > + if (STy->isUnion()) > + return MayAlias; > + > // Find the (possibly empty) initial sequence of equal values... > which are not > // necessarily constants. > unsigned NumGEP1Operands = NumGEP1Ops, NumGEP2Operands = NumGEP2Ops; > @@ -570,7 +576,6 @@ > if (AllAreZeros) return MustAlias; > } > > - > // So now we know that the indexes derived from the base pointers, > // which are known to alias, are different. We can still determine a > // no-alias result if there are differing constant pairs in the index > Index: lib/Target/CBackend/CBackend.cpp > =================================================================== > --- lib/Target/CBackend/CBackend.cpp (revision 71552) > +++ lib/Target/CBackend/CBackend.cpp (working copy) > @@ -2132,7 +2132,9 @@ > // Print out forward declarations for structure types before anything else! > Out << "/* Structure forward decls */\n"; > for (; I != End; ++I) { > - std::string Name = "struct l_" + Mang->makeNameProper(I->first); > + const StructType* STy = dyn_cast(I->second); > + std::string Name = ((STy && STy->isUnion()) ? "union l_" : "struct l_") > + + Mang->makeNameProper(I->first); > Out << Name << ";\n"; > TypeNames.insert(std::make_pair(I->second, Name)); > } > Index: lib/Target/CppBackend/CPPBackend.cpp > =================================================================== > --- lib/Target/CppBackend/CPPBackend.cpp (revision 71552) > +++ lib/Target/CppBackend/CPPBackend.cpp (working copy) > @@ -572,7 +572,10 @@ > } > Out << "StructType* " << typeName << " = StructType::get(" > << typeName << "_fields, /*isPacked=*/" > - << (ST->isPacked() ? "true" : "false") << ");"; > + << (ST->isPacked() ? "true" : "false") > + << ", /*isUnion=*/" > + << (ST->isUnion() ? "true" : "false") > + << ");"; > nl(Out); > break; > } > Index: lib/Target/TargetData.cpp > =================================================================== > --- lib/Target/TargetData.cpp (revision 71552) > +++ lib/Target/TargetData.cpp (working copy) > @@ -57,8 +57,13 @@ > // Keep track of maximum alignment constraint. > StructAlignment = std::max(TyAlign, StructAlignment); > > - MemberOffsets[i] = StructSize; > - StructSize += TD.getTypeAllocSize(Ty); // Consume space for this data item > + if (ST->isUnion()) { > + MemberOffsets[i] = 0; > + StructSize = std::max(StructSize, TD.getTypeAllocSize(Ty)); > + } else { > + MemberOffsets[i] = StructSize; > + StructSize += TD.getTypeAllocSize(Ty); // Consume space for > this data item > + } > } > > // Empty structures have alignment of 1 byte. > @@ -84,6 +89,7 @@ > "Upper bound didn't work!"); > > // Multiple fields can have the same offset if any of them are zero sized. > + // This will also happen for union structures > // For example, in { i32, [0 x i32], i32 }, searching for offset 4 will stop > // at the i32 element, because it is the last element at that > offset. This is > // the right one to return, because anything after it will have a higher > Index: lib/VMCore/AsmWriter.cpp > =================================================================== > --- lib/VMCore/AsmWriter.cpp (revision 71552) > +++ lib/VMCore/AsmWriter.cpp (working copy) > @@ -225,6 +225,8 @@ > const StructType *STy = cast(Ty); > if (STy->isPacked()) > OS << '<'; > + if (STy->isUnion()) > + OS << "union "; > OS << "{ "; > for (StructType::element_iterator I = STy->element_begin(), > E = STy->element_end(); I != E; ++I) { > Index: lib/VMCore/Type.cpp > =================================================================== > --- lib/VMCore/Type.cpp (revision 71552) > +++ lib/VMCore/Type.cpp (working copy) > @@ -338,11 +338,13 @@ > setAbstract(isAbstract); > } > > -StructType::StructType(const std::vector &Types, bool isPacked) > +StructType::StructType(const std::vector &Types, bool isPacked, > + bool isUnion) > : CompositeType(StructTyID) { > ContainedTys = reinterpret_cast(this + 1); > NumContainedTys = Types.size(); > - setSubclassData(isPacked); > + assert(!(isPacked && isUnion) && "Packed union not supported"); > + setSubclassData(isPacked + (int)isUnion * 2); > bool isAbstract = false; > for (unsigned i = 0; i < Types.size(); ++i) { > assert(Types[i] != Type::VoidTy && "Void type for structure field!!"); > @@ -1107,9 +1109,11 @@ > class StructValType { > std::vector ElTypes; > bool packed; > + bool _union; > public: > - StructValType(const std::vector &args, bool isPacked) > - : ElTypes(args), packed(isPacked) {} > + StructValType(const std::vector &args, > + bool isPacked, bool isUnion) > + : ElTypes(args), packed(isPacked), _union(isUnion) {} > > static StructValType get(const StructType *ST) { > std::vector ElTypes; > @@ -1117,7 +1121,7 @@ > for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) > ElTypes.push_back(ST->getElementType(i)); > > - return StructValType(ElTypes, ST->isPacked()); > + return StructValType(ElTypes, ST->isPacked(), ST->isUnion()); > } > > static unsigned hashTypeStructure(const StructType *ST) { > @@ -1127,7 +1131,9 @@ > inline bool operator<(const StructValType &STV) const { > if (ElTypes < STV.ElTypes) return true; > else if (ElTypes > STV.ElTypes) return false; > - else return (int)packed < (int)STV.packed; > + else > + return (int)packed + 2 * (int)_union > + < (int)STV.packed + 2 * (int)STV._union; > } > }; > } > @@ -1135,15 +1141,15 @@ > static ManagedStatic > StructTypes; > > StructType *StructType::get(const std::vector &ETypes, > - bool isPacked) { > - StructValType STV(ETypes, isPacked); > + bool isPacked, bool isUnion) { > + StructValType STV(ETypes, isPacked, isUnion); > StructType *ST = StructTypes->get(STV); > if (ST) return ST; > > // Value not found. Derive a new type! > ST = (StructType*) operator new(sizeof(StructType) + > sizeof(PATypeHandle) * ETypes.size()); > - new (ST) StructType(ETypes, isPacked); > + new (ST) StructType(ETypes, isPacked, isUnion); > StructTypes->add(STV, ST); > > #ifdef DEBUG_MERGE_TYPES > Index: lib/AsmParser/LLParser.cpp > =================================================================== > --- lib/AsmParser/LLParser.cpp (revision 71552) > +++ lib/AsmParser/LLParser.cpp (working copy) > @@ -964,9 +964,15 @@ > Result = OpaqueType::get(); > Lex.Lex(); > break; > + case lltok::kw_union: > + // TypeRec ::= 'union' ... > + Lex.Lex(); //eat the kw_union > + if (ParseStructType(Result, false, true)) > + return true; > + break; > case lltok::lbrace: > // TypeRec ::= '{' ... '}' > - if (ParseStructType(Result, false)) > + if (ParseStructType(Result, false, false)) > return true; > break; > case lltok::lsquare: > @@ -979,7 +985,7 @@ > // TypeRec ::= '<' ... '>' > Lex.Lex(); > if (Lex.getKind() == lltok::lbrace) { > - if (ParseStructType(Result, true) || > + if (ParseStructType(Result, true, false) || > ParseToken(lltok::greater, "expected '>' at end of packed struct")) > return true; > } else if (ParseArrayVectorType(Result, true)) > @@ -1222,18 +1228,22 @@ > return false; > } > > -/// ParseStructType: Handles packed and unpacked types. parsed elsewhere. > +/// ParseStructType: Handles packed and unpacked types. and union > +/// parsed elsewhere. > /// TypeRec > /// ::= '{' '}' > /// ::= '{' TypeRec (',' TypeRec)* '}' > /// ::= '<' '{' '}' '>' > /// ::= '<' '{' TypeRec (',' TypeRec)* '}' '>' > -bool LLParser::ParseStructType(PATypeHolder &Result, bool Packed) { > +/// ::= 'union' '{' '}' > +/// ::= 'union' '{' TypeRec (',' TypeRec)* '}' > + > +bool LLParser::ParseStructType(PATypeHolder &Result, bool Packed, bool Union) { > assert(Lex.getKind() == lltok::lbrace); > Lex.Lex(); // Consume the '{' > > if (EatIfPresent(lltok::rbrace)) { > - Result = StructType::get(std::vector(), Packed); > + Result = StructType::get(std::vector(), Packed, Union); > return false; > } > > @@ -1261,7 +1271,7 @@ > std::vector ParamsListTy; > for (unsigned i = 0, e = ParamsList.size(); i != e; ++i) > ParamsListTy.push_back(ParamsList[i].get()); > - Result = HandleUpRefs(StructType::get(ParamsListTy, Packed)); > + Result = HandleUpRefs(StructType::get(ParamsListTy, Packed, Union)); > return false; > } > > Index: lib/AsmParser/LLLexer.cpp > =================================================================== > --- lib/AsmParser/LLLexer.cpp (revision 71552) > +++ lib/AsmParser/LLLexer.cpp (working copy) > @@ -550,6 +550,7 @@ > > KEYWORD(type); > KEYWORD(opaque); > + KEYWORD(union); > > KEYWORD(eq); KEYWORD(ne); KEYWORD(slt); KEYWORD(sgt); KEYWORD(sle); > KEYWORD(sge); KEYWORD(ult); KEYWORD(ugt); KEYWORD(ule); KEYWORD(uge); > Index: lib/AsmParser/LLParser.h > =================================================================== > --- lib/AsmParser/LLParser.h (revision 71552) > +++ lib/AsmParser/LLParser.h (working copy) > @@ -147,7 +147,7 @@ > return ParseType(Result, AllowVoid); > } > bool ParseTypeRec(PATypeHolder &H); > - bool ParseStructType(PATypeHolder &H, bool Packed); > + bool ParseStructType(PATypeHolder &H, bool Packed, bool Union); > bool ParseArrayVectorType(PATypeHolder &H, bool isVector); > bool ParseFunctionType(PATypeHolder &Result); > PATypeHolder HandleUpRefs(const Type *Ty); > Index: lib/AsmParser/LLToken.h > =================================================================== > --- lib/AsmParser/LLToken.h (revision 71552) > +++ lib/AsmParser/LLToken.h (working copy) > @@ -83,6 +83,7 @@ > > kw_type, > kw_opaque, > + kw_union, > > kw_eq, kw_ne, kw_slt, kw_sgt, kw_sle, kw_sge, kw_ult, kw_ugt, kw_ule, > kw_uge, kw_oeq, kw_one, kw_olt, kw_ogt, kw_ole, kw_oge, kw_ord, kw_uno, > Index: lib/Transforms/Scalar/ScalarReplAggregates.cpp > =================================================================== > --- lib/Transforms/Scalar/ScalarReplAggregates.cpp (revision 71552) > +++ lib/Transforms/Scalar/ScalarReplAggregates.cpp (working copy) > @@ -562,8 +562,11 @@ > // into. > for (; I != E; ++I) { > // Ignore struct elements, no extra checking needed for these. > - if (isa(*I)) > - continue; > + if (StructType* STy = dyn_cast(*I)) > + if (STy->isUnion()) > + return MarkUnsafe(Info); > + else > + continue; > > ConstantInt *IdxVal = dyn_cast(I.getOperand()); > if (!IdxVal) return MarkUnsafe(Info); > @@ -1090,8 +1093,10 @@ > > /// HasPadding - Return true if the specified type has any structure or > /// alignment padding, false otherwise. > +/// Unions are conservatively assumed to have padding > static bool HasPadding(const Type *Ty, const TargetData &TD) { > if (const StructType *STy = dyn_cast(Ty)) { > + if (STy->isUnion()) return true; > const StructLayout *SL = TD.getStructLayout(STy); > unsigned PrevFieldBitOffset = 0; > for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { > Index: lib/Bitcode/Reader/BitcodeReader.cpp > =================================================================== > --- lib/Bitcode/Reader/BitcodeReader.cpp (revision 71552) > +++ lib/Bitcode/Reader/BitcodeReader.cpp (working copy) > @@ -536,6 +536,13 @@ > ResultTy = StructType::get(EltTys, Record[0]); > break; > } > + case bitc::TYPE_CODE_UNION: { // UNION: [eltty x N] > + std::vector EltTys; > + for (unsigned i = 0, e = Record.size(); i != e; ++i) > + EltTys.push_back(getTypeByID(Record[i], true)); > + ResultTy = StructType::get(EltTys, false, true); > + break; > + } > case bitc::TYPE_CODE_ARRAY: // ARRAY: [numelts, eltty] > if (Record.size() < 2) > return Error("Invalid ARRAY type record"); > Index: lib/Bitcode/Writer/BitcodeWriter.cpp > =================================================================== > --- lib/Bitcode/Writer/BitcodeWriter.cpp (revision 71552) > +++ lib/Bitcode/Writer/BitcodeWriter.cpp (working copy) > @@ -176,6 +176,14 @@ > Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, > Log2_32_Ceil(VE.getTypes().size()+1))); > unsigned StructAbbrev = Stream.EmitAbbrev(Abbv); > + > + // Abbrev for TYPE_CODE_UNION. > + Abbv = new BitCodeAbbrev(); > + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_UNION)); > + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); > + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, > + Log2_32_Ceil(VE.getTypes().size()+1))); > + unsigned UnionAbbrev = Stream.EmitAbbrev(Abbv); > > // Abbrev for TYPE_CODE_ARRAY. > Abbv = new BitCodeAbbrev(); > @@ -235,14 +243,25 @@ > } > case Type::StructTyID: { > const StructType *ST = cast(T); > - // STRUCT: [ispacked, eltty x N] > - Code = bitc::TYPE_CODE_STRUCT; > - TypeVals.push_back(ST->isPacked()); > - // Output all of the element types. > - for (StructType::element_iterator I = ST->element_begin(), > - E = ST->element_end(); I != E; ++I) > - TypeVals.push_back(VE.getTypeID(*I)); > - AbbrevToUse = StructAbbrev; > + if (!ST->isUnion()) { > + // STRUCT: [ispacked, eltty x N] > + Code = bitc::TYPE_CODE_STRUCT; > + TypeVals.push_back(ST->isPacked()); > + // Output all of the element types. > + for (StructType::element_iterator I = ST->element_begin(), > + E = ST->element_end(); I != E; ++I) > + TypeVals.push_back(VE.getTypeID(*I)); > + AbbrevToUse = StructAbbrev; > + } else { > + //Unify with STRUCT in LLVM 3.0 > + // UNION: [eltty x N] > + Code = bitc::TYPE_CODE_UNION; > + // Output all of the element types. > + for (StructType::element_iterator I = ST->element_begin(), > + E = ST->element_end(); I != E; ++I) > + TypeVals.push_back(VE.getTypeID(*I)); > + AbbrevToUse = UnionAbbrev; > + } > break; > } > case Type::ArrayTyID: { > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From nicholas at mxc.ca Wed May 13 01:19:28 2009 From: nicholas at mxc.ca (Nick Lewycky) Date: Tue, 12 May 2009 23:19:28 -0700 Subject: [llvm-commits] RFC: initial union syntax support In-Reply-To: <4A0A63B3.6010908@mxc.ca> References: <85dfcd7f0905121101y62ac0c4esd27a518adbabd3b9@mail.gmail.com> <85dfcd7f0905121456x5570de7dg3dfc35cde861ce1f@mail.gmail.com> <85dfcd7f0905121600w439bab62ncd3d7db1284749a7@mail.gmail.com> <4A0A63B3.6010908@mxc.ca> Message-ID: <4A0A6670.1090100@mxc.ca> Nick Lewycky wrote: > Andrew Lenharth wrote: >> Updated patch. Supports C, Cpp, and all (?) native codegen. BasicAA >> updated to be conservative (but not completely enough yet). > > I still don't like the fact that StructType is UnionType, but that's > more subjective than objective. > > I really don't like allowing a union to contain the same type twice. > That should be illegal no matter what the object hierarchy is. For that matter, I just realized after sending that and must be the same type. Nick > >> Making unions a type of struct makes most code just work as most code >> uses getOffset variants since structs can already have zero width >> elements. >> >> Index: include/llvm/DerivedTypes.h >> =================================================================== >> --- include/llvm/DerivedTypes.h (revision 71552) >> +++ include/llvm/DerivedTypes.h (working copy) >> @@ -218,13 +218,17 @@ >> friend class TypeMap; >> StructType(const StructType &); // Do not implement >> const StructType &operator=(const StructType &); // Do not implement >> - StructType(const std::vector &Types, bool isPacked); >> + StructType(const std::vector &Types, >> + bool isPacked, bool isUnion); >> + enum {structPlain = 0, >> + structPacked = 1, >> + structUnion = 2}; >> public: >> /// StructType::get - This static method is the primary way to create a >> /// StructType. >> /// >> static StructType *get(const std::vector &Params, >> - bool isPacked=false); >> + bool isPacked=false, bool isUnion=false); >> >> /// StructType::get - This static method is a convenience method for >> /// creating structure types by specifying the elements as arguments. >> @@ -262,7 +266,9 @@ >> return T->getTypeID() == StructTyID; >> } >> >> - bool isPacked() const { return (0 != getSubclassData()) ? true : false; } >> + bool isPacked() const { return structPacked == getSubclassData(); } >> + bool isUnion() const { return structUnion == getSubclassData(); } >> + >> }; >> >> >> Index: include/llvm/Bitcode/LLVMBitCodes.h >> =================================================================== >> --- include/llvm/Bitcode/LLVMBitCodes.h (revision 71552) >> +++ include/llvm/Bitcode/LLVMBitCodes.h (working copy) >> @@ -90,7 +90,11 @@ >> // binary compatibility. >> TYPE_CODE_X86_FP80 = 13, // X86 LONG DOUBLE >> TYPE_CODE_FP128 = 14, // LONG DOUBLE (112 bit mantissa) >> - TYPE_CODE_PPC_FP128= 15 // PPC LONG DOUBLE (2 doubles) >> + TYPE_CODE_PPC_FP128= 15, // PPC LONG DOUBLE (2 doubles) >> + >> + //Merge UNIOIN with STRUCT in LLVM 3.0 >> + TYPE_CODE_UNION = 16 // UNIOIN: [eltty x N] > > UNIOIN -> UNION, twice. > >> + >> // Any other type code is assumed to be an unknown type. >> }; >> >> Index: docs/LangRef.html >> =================================================================== >> --- docs/LangRef.html (revision 71552) >> +++ docs/LangRef.html (working copy) >> @@ -1579,8 +1579,31 @@ >> >> >>
>> - >> >> + >> +
>> +
Overview:
>> +

The union structure type is used to represent a collection of data members >> +overlapping in memory. All fields start at an offset of zero. The elements of >> +a union structure may be any type that has a size. The size of a union is the >> +size of the largest element. The alignment is the alignment of the >> most restricted >> +element.

>> +

Structures are accessed using 'load >> +and 'store' by getting a pointer to a >> +field with the 'getelementptr' >> +instruction.

>> +
Syntax:
>> +
  < union { <type list> } > 
>> +
Examples:
>> + >> + >> + >> + >> + >> +
< union { i32, i32*, i64 } >A union of three values
>> +
>> + >> >>
>>
Overview:
>> Index: lib/Analysis/BasicAliasAnalysis.cpp >> =================================================================== >> --- lib/Analysis/BasicAliasAnalysis.cpp (revision 71552) >> +++ lib/Analysis/BasicAliasAnalysis.cpp (working copy) >> @@ -529,6 +529,12 @@ >> >> const PointerType *GEPPointerTy = cast(BasePtr1Ty); >> >> + //Fixme: Be conservative for Unions >> + //Fixme: This doesn't handle embedded unions >> + if (const StructType* STy = >> dyn_cast(GEPPointerTy->getElementType())) >> + if (STy->isUnion()) >> + return MayAlias; >> + >> // Find the (possibly empty) initial sequence of equal values... >> which are not >> // necessarily constants. >> unsigned NumGEP1Operands = NumGEP1Ops, NumGEP2Operands = NumGEP2Ops; >> @@ -570,7 +576,6 @@ >> if (AllAreZeros) return MustAlias; >> } >> >> - >> // So now we know that the indexes derived from the base pointers, >> // which are known to alias, are different. We can still determine a >> // no-alias result if there are differing constant pairs in the index >> Index: lib/Target/CBackend/CBackend.cpp >> =================================================================== >> --- lib/Target/CBackend/CBackend.cpp (revision 71552) >> +++ lib/Target/CBackend/CBackend.cpp (working copy) >> @@ -2132,7 +2132,9 @@ >> // Print out forward declarations for structure types before anything else! >> Out << "/* Structure forward decls */\n"; >> for (; I != End; ++I) { >> - std::string Name = "struct l_" + Mang->makeNameProper(I->first); >> + const StructType* STy = dyn_cast(I->second); >> + std::string Name = ((STy && STy->isUnion()) ? "union l_" : "struct l_") >> + + Mang->makeNameProper(I->first); >> Out << Name << ";\n"; >> TypeNames.insert(std::make_pair(I->second, Name)); >> } >> Index: lib/Target/CppBackend/CPPBackend.cpp >> =================================================================== >> --- lib/Target/CppBackend/CPPBackend.cpp (revision 71552) >> +++ lib/Target/CppBackend/CPPBackend.cpp (working copy) >> @@ -572,7 +572,10 @@ >> } >> Out << "StructType* " << typeName << " = StructType::get(" >> << typeName << "_fields, /*isPacked=*/" >> - << (ST->isPacked() ? "true" : "false") << ");"; >> + << (ST->isPacked() ? "true" : "false") >> + << ", /*isUnion=*/" >> + << (ST->isUnion() ? "true" : "false") >> + << ");"; >> nl(Out); >> break; >> } >> Index: lib/Target/TargetData.cpp >> =================================================================== >> --- lib/Target/TargetData.cpp (revision 71552) >> +++ lib/Target/TargetData.cpp (working copy) >> @@ -57,8 +57,13 @@ >> // Keep track of maximum alignment constraint. >> StructAlignment = std::max(TyAlign, StructAlignment); >> >> - MemberOffsets[i] = StructSize; >> - StructSize += TD.getTypeAllocSize(Ty); // Consume space for this data item >> + if (ST->isUnion()) { >> + MemberOffsets[i] = 0; >> + StructSize = std::max(StructSize, TD.getTypeAllocSize(Ty)); >> + } else { >> + MemberOffsets[i] = StructSize; >> + StructSize += TD.getTypeAllocSize(Ty); // Consume space for >> this data item >> + } >> } >> >> // Empty structures have alignment of 1 byte. >> @@ -84,6 +89,7 @@ >> "Upper bound didn't work!"); >> >> // Multiple fields can have the same offset if any of them are zero sized. >> + // This will also happen for union structures >> // For example, in { i32, [0 x i32], i32 }, searching for offset 4 will stop >> // at the i32 element, because it is the last element at that >> offset. This is >> // the right one to return, because anything after it will have a higher >> Index: lib/VMCore/AsmWriter.cpp >> =================================================================== >> --- lib/VMCore/AsmWriter.cpp (revision 71552) >> +++ lib/VMCore/AsmWriter.cpp (working copy) >> @@ -225,6 +225,8 @@ >> const StructType *STy = cast(Ty); >> if (STy->isPacked()) >> OS << '<'; >> + if (STy->isUnion()) >> + OS << "union "; >> OS << "{ "; >> for (StructType::element_iterator I = STy->element_begin(), >> E = STy->element_end(); I != E; ++I) { >> Index: lib/VMCore/Type.cpp >> =================================================================== >> --- lib/VMCore/Type.cpp (revision 71552) >> +++ lib/VMCore/Type.cpp (working copy) >> @@ -338,11 +338,13 @@ >> setAbstract(isAbstract); >> } >> >> -StructType::StructType(const std::vector &Types, bool isPacked) >> +StructType::StructType(const std::vector &Types, bool isPacked, >> + bool isUnion) >> : CompositeType(StructTyID) { >> ContainedTys = reinterpret_cast(this + 1); >> NumContainedTys = Types.size(); >> - setSubclassData(isPacked); >> + assert(!(isPacked && isUnion) && "Packed union not supported"); >> + setSubclassData(isPacked + (int)isUnion * 2); >> bool isAbstract = false; >> for (unsigned i = 0; i < Types.size(); ++i) { >> assert(Types[i] != Type::VoidTy && "Void type for structure field!!"); >> @@ -1107,9 +1109,11 @@ >> class StructValType { >> std::vector ElTypes; >> bool packed; >> + bool _union; >> public: >> - StructValType(const std::vector &args, bool isPacked) >> - : ElTypes(args), packed(isPacked) {} >> + StructValType(const std::vector &args, >> + bool isPacked, bool isUnion) >> + : ElTypes(args), packed(isPacked), _union(isUnion) {} >> >> static StructValType get(const StructType *ST) { >> std::vector ElTypes; >> @@ -1117,7 +1121,7 @@ >> for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) >> ElTypes.push_back(ST->getElementType(i)); >> >> - return StructValType(ElTypes, ST->isPacked()); >> + return StructValType(ElTypes, ST->isPacked(), ST->isUnion()); >> } >> >> static unsigned hashTypeStructure(const StructType *ST) { >> @@ -1127,7 +1131,9 @@ >> inline bool operator<(const StructValType &STV) const { >> if (ElTypes < STV.ElTypes) return true; >> else if (ElTypes > STV.ElTypes) return false; >> - else return (int)packed < (int)STV.packed; >> + else >> + return (int)packed + 2 * (int)_union >> + < (int)STV.packed + 2 * (int)STV._union; >> } >> }; >> } >> @@ -1135,15 +1141,15 @@ >> static ManagedStatic > StructTypes; >> >> StructType *StructType::get(const std::vector &ETypes, >> - bool isPacked) { >> - StructValType STV(ETypes, isPacked); >> + bool isPacked, bool isUnion) { >> + StructValType STV(ETypes, isPacked, isUnion); >> StructType *ST = StructTypes->get(STV); >> if (ST) return ST; >> >> // Value not found. Derive a new type! >> ST = (StructType*) operator new(sizeof(StructType) + >> sizeof(PATypeHandle) * ETypes.size()); >> - new (ST) StructType(ETypes, isPacked); >> + new (ST) StructType(ETypes, isPacked, isUnion); >> StructTypes->add(STV, ST); >> >> #ifdef DEBUG_MERGE_TYPES >> Index: lib/AsmParser/LLParser.cpp >> =================================================================== >> --- lib/AsmParser/LLParser.cpp (revision 71552) >> +++ lib/AsmParser/LLParser.cpp (working copy) >> @@ -964,9 +964,15 @@ >> Result = OpaqueType::get(); >> Lex.Lex(); >> break; >> + case lltok::kw_union: >> + // TypeRec ::= 'union' ... >> + Lex.Lex(); //eat the kw_union >> + if (ParseStructType(Result, false, true)) >> + return true; >> + break; >> case lltok::lbrace: >> // TypeRec ::= '{' ... '}' >> - if (ParseStructType(Result, false)) >> + if (ParseStructType(Result, false, false)) >> return true; >> break; >> case lltok::lsquare: >> @@ -979,7 +985,7 @@ >> // TypeRec ::= '<' ... '>' >> Lex.Lex(); >> if (Lex.getKind() == lltok::lbrace) { >> - if (ParseStructType(Result, true) || >> + if (ParseStructType(Result, true, false) || >> ParseToken(lltok::greater, "expected '>' at end of packed struct")) >> return true; >> } else if (ParseArrayVectorType(Result, true)) >> @@ -1222,18 +1228,22 @@ >> return false; >> } >> >> -/// ParseStructType: Handles packed and unpacked types. parsed elsewhere. >> +/// ParseStructType: Handles packed and unpacked types. and union >> +/// parsed elsewhere. >> /// TypeRec >> /// ::= '{' '}' >> /// ::= '{' TypeRec (',' TypeRec)* '}' >> /// ::= '<' '{' '}' '>' >> /// ::= '<' '{' TypeRec (',' TypeRec)* '}' '>' >> -bool LLParser::ParseStructType(PATypeHolder &Result, bool Packed) { >> +/// ::= 'union' '{' '}' >> +/// ::= 'union' '{' TypeRec (',' TypeRec)* '}' >> + >> +bool LLParser::ParseStructType(PATypeHolder &Result, bool Packed, bool Union) { >> assert(Lex.getKind() == lltok::lbrace); >> Lex.Lex(); // Consume the '{' >> >> if (EatIfPresent(lltok::rbrace)) { >> - Result = StructType::get(std::vector(), Packed); >> + Result = StructType::get(std::vector(), Packed, Union); >> return false; >> } >> >> @@ -1261,7 +1271,7 @@ >> std::vector ParamsListTy; >> for (unsigned i = 0, e = ParamsList.size(); i != e; ++i) >> ParamsListTy.push_back(ParamsList[i].get()); >> - Result = HandleUpRefs(StructType::get(ParamsListTy, Packed)); >> + Result = HandleUpRefs(StructType::get(ParamsListTy, Packed, Union)); >> return false; >> } >> >> Index: lib/AsmParser/LLLexer.cpp >> =================================================================== >> --- lib/AsmParser/LLLexer.cpp (revision 71552) >> +++ lib/AsmParser/LLLexer.cpp (working copy) >> @@ -550,6 +550,7 @@ >> >> KEYWORD(type); >> KEYWORD(opaque); >> + KEYWORD(union); >> >> KEYWORD(eq); KEYWORD(ne); KEYWORD(slt); KEYWORD(sgt); KEYWORD(sle); >> KEYWORD(sge); KEYWORD(ult); KEYWORD(ugt); KEYWORD(ule); KEYWORD(uge); >> Index: lib/AsmParser/LLParser.h >> =================================================================== >> --- lib/AsmParser/LLParser.h (revision 71552) >> +++ lib/AsmParser/LLParser.h (working copy) >> @@ -147,7 +147,7 @@ >> return ParseType(Result, AllowVoid); >> } >> bool ParseTypeRec(PATypeHolder &H); >> - bool ParseStructType(PATypeHolder &H, bool Packed); >> + bool ParseStructType(PATypeHolder &H, bool Packed, bool Union); >> bool ParseArrayVectorType(PATypeHolder &H, bool isVector); >> bool ParseFunctionType(PATypeHolder &Result); >> PATypeHolder HandleUpRefs(const Type *Ty); >> Index: lib/AsmParser/LLToken.h >> =================================================================== >> --- lib/AsmParser/LLToken.h (revision 71552) >> +++ lib/AsmParser/LLToken.h (working copy) >> @@ -83,6 +83,7 @@ >> >> kw_type, >> kw_opaque, >> + kw_union, >> >> kw_eq, kw_ne, kw_slt, kw_sgt, kw_sle, kw_sge, kw_ult, kw_ugt, kw_ule, >> kw_uge, kw_oeq, kw_one, kw_olt, kw_ogt, kw_ole, kw_oge, kw_ord, kw_uno, >> Index: lib/Transforms/Scalar/ScalarReplAggregates.cpp >> =================================================================== >> --- lib/Transforms/Scalar/ScalarReplAggregates.cpp (revision 71552) >> +++ lib/Transforms/Scalar/ScalarReplAggregates.cpp (working copy) >> @@ -562,8 +562,11 @@ >> // into. >> for (; I != E; ++I) { >> // Ignore struct elements, no extra checking needed for these. >> - if (isa(*I)) >> - continue; >> + if (StructType* STy = dyn_cast(*I)) >> + if (STy->isUnion()) >> + return MarkUnsafe(Info); >> + else >> + continue; >> >> ConstantInt *IdxVal = dyn_cast(I.getOperand()); >> if (!IdxVal) return MarkUnsafe(Info); >> @@ -1090,8 +1093,10 @@ >> >> /// HasPadding - Return true if the specified type has any structure or >> /// alignment padding, false otherwise. >> +/// Unions are conservatively assumed to have padding >> static bool HasPadding(const Type *Ty, const TargetData &TD) { >> if (const StructType *STy = dyn_cast(Ty)) { >> + if (STy->isUnion()) return true; >> const StructLayout *SL = TD.getStructLayout(STy); >> unsigned PrevFieldBitOffset = 0; >> for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { >> Index: lib/Bitcode/Reader/BitcodeReader.cpp >> =================================================================== >> --- lib/Bitcode/Reader/BitcodeReader.cpp (revision 71552) >> +++ lib/Bitcode/Reader/BitcodeReader.cpp (working copy) >> @@ -536,6 +536,13 @@ >> ResultTy = StructType::get(EltTys, Record[0]); >> break; >> } >> + case bitc::TYPE_CODE_UNION: { // UNION: [eltty x N] >> + std::vector EltTys; >> + for (unsigned i = 0, e = Record.size(); i != e; ++i) >> + EltTys.push_back(getTypeByID(Record[i], true)); >> + ResultTy = StructType::get(EltTys, false, true); >> + break; >> + } >> case bitc::TYPE_CODE_ARRAY: // ARRAY: [numelts, eltty] >> if (Record.size() < 2) >> return Error("Invalid ARRAY type record"); >> Index: lib/Bitcode/Writer/BitcodeWriter.cpp >> =================================================================== >> --- lib/Bitcode/Writer/BitcodeWriter.cpp (revision 71552) >> +++ lib/Bitcode/Writer/BitcodeWriter.cpp (working copy) >> @@ -176,6 +176,14 @@ >> Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, >> Log2_32_Ceil(VE.getTypes().size()+1))); >> unsigned StructAbbrev = Stream.EmitAbbrev(Abbv); >> + >> + // Abbrev for TYPE_CODE_UNION. >> + Abbv = new BitCodeAbbrev(); >> + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_UNION)); >> + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); >> + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, >> + Log2_32_Ceil(VE.getTypes().size()+1))); >> + unsigned UnionAbbrev = Stream.EmitAbbrev(Abbv); >> >> // Abbrev for TYPE_CODE_ARRAY. >> Abbv = new BitCodeAbbrev(); >> @@ -235,14 +243,25 @@ >> } >> case Type::StructTyID: { >> const StructType *ST = cast(T); >> - // STRUCT: [ispacked, eltty x N] >> - Code = bitc::TYPE_CODE_STRUCT; >> - TypeVals.push_back(ST->isPacked()); >> - // Output all of the element types. >> - for (StructType::element_iterator I = ST->element_begin(), >> - E = ST->element_end(); I != E; ++I) >> - TypeVals.push_back(VE.getTypeID(*I)); >> - AbbrevToUse = StructAbbrev; >> + if (!ST->isUnion()) { >> + // STRUCT: [ispacked, eltty x N] >> + Code = bitc::TYPE_CODE_STRUCT; >> + TypeVals.push_back(ST->isPacked()); >> + // Output all of the element types. >> + for (StructType::element_iterator I = ST->element_begin(), >> + E = ST->element_end(); I != E; ++I) >> + TypeVals.push_back(VE.getTypeID(*I)); >> + AbbrevToUse = StructAbbrev; >> + } else { >> + //Unify with STRUCT in LLVM 3.0 >> + // UNION: [eltty x N] >> + Code = bitc::TYPE_CODE_UNION; >> + // Output all of the element types. >> + for (StructType::element_iterator I = ST->element_begin(), >> + E = ST->element_end(); I != E; ++I) >> + TypeVals.push_back(VE.getTypeID(*I)); >> + AbbrevToUse = UnionAbbrev; >> + } >> break; >> } >> case Type::ArrayTyID: { >> _______________________________________________ >> 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 Wed May 13 01:26:11 2009 From: sabre at nondot.org (Chris Lattner) Date: Wed, 13 May 2009 06:26:11 -0000 Subject: [llvm-commits] [llvm] r71644 - in /llvm/trunk: lib/Transforms/Scalar/SimplifyLibCalls.cpp test/Transforms/SimplifyLibCalls/FFS.ll Message-ID: <200905130626.n4D6QBdZ029345@zion.cs.uiuc.edu> Author: lattner Date: Wed May 13 01:26:11 2009 New Revision: 71644 URL: http://llvm.org/viewvc/llvm-project?rev=71644&view=rev Log: Fix PR4206 - crash in simplify lib calls Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp llvm/trunk/test/Transforms/SimplifyLibCalls/FFS.ll Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=71644&r1=71643&r2=71644&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Wed May 13 01:26:11 2009 @@ -1116,7 +1116,7 @@ Value *F = Intrinsic::getDeclaration(Callee->getParent(), Intrinsic::cttz, &ArgType, 1); Value *V = B.CreateCall(F, Op, "cttz"); - V = B.CreateAdd(V, ConstantInt::get(Type::Int32Ty, 1), "tmp"); + V = B.CreateAdd(V, ConstantInt::get(V->getType(), 1), "tmp"); V = B.CreateIntCast(V, Type::Int32Ty, false, "tmp"); Value *Cond = B.CreateICmpNE(Op, Constant::getNullValue(ArgType), "tmp"); Modified: llvm/trunk/test/Transforms/SimplifyLibCalls/FFS.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyLibCalls/FFS.ll?rev=71644&r1=71643&r2=71644&view=diff ============================================================================== --- llvm/trunk/test/Transforms/SimplifyLibCalls/FFS.ll (original) +++ llvm/trunk/test/Transforms/SimplifyLibCalls/FFS.ll Wed May 13 01:26:11 2009 @@ -28,3 +28,9 @@ ret i32 %rslt5 } + +; PR4206 +define i32 @a(i64) nounwind { + %2 = call i32 @ffsll(i64 %0) ; [#uses=1] + ret i32 %2 +} From sabre at nondot.org Wed May 13 01:27:38 2009 From: sabre at nondot.org (Chris Lattner) Date: Wed, 13 May 2009 06:27:38 -0000 Subject: [llvm-commits] [llvm] r71645 - /llvm/trunk/lib/CodeGen/CMakeLists.txt Message-ID: <200905130627.n4D6Rdcr029442@zion.cs.uiuc.edu> Author: lattner Date: Wed May 13 01:27:38 2009 New Revision: 71645 URL: http://llvm.org/viewvc/llvm-project?rev=71645&view=rev Log: add ShrinkWrapping.cpp Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CMakeLists.txt?rev=71645&r1=71644&r2=71645&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/CMakeLists.txt (original) +++ llvm/trunk/lib/CodeGen/CMakeLists.txt Wed May 13 01:27:38 2009 @@ -46,6 +46,7 @@ ScheduleDAGInstrs.cpp ScheduleDAGPrinter.cpp ShadowStackGC.cpp + ShrinkWrapping.cpp SimpleRegisterCoalescing.cpp StackProtector.cpp StackSlotColoring.cpp From sabre at nondot.org Wed May 13 01:28:04 2009 From: sabre at nondot.org (Chris Lattner) Date: Wed, 13 May 2009 06:28:04 -0000 Subject: [llvm-commits] [llvm] r71646 - /llvm/trunk/lib/Analysis/CMakeLists.txt Message-ID: <200905130628.n4D6S4OC029467@zion.cs.uiuc.edu> Author: lattner Date: Wed May 13 01:28:04 2009 New Revision: 71646 URL: http://llvm.org/viewvc/llvm-project?rev=71646&view=rev Log: add IVUsers.cpp Modified: llvm/trunk/lib/Analysis/CMakeLists.txt Modified: llvm/trunk/lib/Analysis/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CMakeLists.txt?rev=71646&r1=71645&r2=71646&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/CMakeLists.txt (original) +++ llvm/trunk/lib/Analysis/CMakeLists.txt Wed May 13 01:28:04 2009 @@ -14,6 +14,7 @@ InstCount.cpp Interval.cpp IntervalPartition.cpp + IVUsers.cpp LibCallAliasAnalysis.cpp LibCallSemantics.cpp LiveValues.cpp From clattner at apple.com Wed May 13 01:36:52 2009 From: clattner at apple.com (Chris Lattner) Date: Tue, 12 May 2009 23:36:52 -0700 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/ARM/ARMInstrInfo.cpp lib/Target/ARM/ARMInstrInfo.td In-Reply-To: <200905122359.n4CNxEQb014794@zion.cs.uiuc.edu> References: <200905122359.n4CNxEQb014794@zion.cs.uiuc.edu> Message-ID: <4958E38B-1013-4FDA-8BA3-A3BDF4767FCA@apple.com> On May 12, 2009, at 4:59 PM, Jim Grosbach wrote: > URL: http://llvm.org/viewvc/llvm-project?rev=71610&view=rev > Log: > Add support for GCC compatible builtin setjmp and longjmp > intrinsics. This is > a supporting preliminary patch for GCC-compatible SjLJ exception > handling. Note that these intrinsics are not designed to be invoked > directly by the user, but > rather used by the front-end as target hooks for exception handling. All new non-target-specific intrinsics need to be documented in LangRef. How about llvm.save.register.state() and llvm.restore.register.state(). LangRef should document that these are compatible with the GCC builtins. Also, you should use GCCBuiltin<> in the .td file so that these work with the CBE etc. Please make sure to update 'HasBuiltinSetjmp' and the accessors when you rename the intrinsic. > + // HasBuiltinSetjmp - true if the function uses builtin_setjmp. > Used to > + // adjust callee-saved register tracking. > + bool HasBuiltinSetjmp; ... > +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue May 12 > 18:59:14 2009 > @@ -180,7 +180,7 @@ > std::vector CSI; > for (unsigned i = 0; CSRegs[i]; ++i) { > unsigned Reg = CSRegs[i]; > - if (Fn.getRegInfo().isPhysRegUsed(Reg)) { > + if (Fn.getRegInfo().isPhysRegUsed(Reg) || > Fn.doesHaveBuiltinSetjmp()) { This is unfortunate, why does PEI need to know about this? Shouldn't the 'Int_builtin_setjmp' use and def all these registers? > +let Properties = [IntrNoMem] in { > +def int_builtinsetjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; > +def int_builtinlongjmp : Intrinsic<[llvm_void_ty], [llvm_ptr_ty, > llvm_i32_ty]>; If there is no reason to have both arguments, please drop the extra one. > // > = > = > = > ----------------------------------------------------------------------= > ==// > +// SJLJ Exception handling intrinsics > +// setjmp() is a three instruction sequence to store the return > address This is *not* setjmp and longjmp. Please be very precise here. -Chris From akyrtzi at gmail.com Wed May 13 01:45:25 2009 From: akyrtzi at gmail.com (Argiris Kirtzidis) Date: Wed, 13 May 2009 09:45:25 +0300 Subject: [llvm-commits] [PATCH] Generate info about the JIT process In-Reply-To: <978B1AEF-4B6B-4BA1-A73F-6FEF5C95A12D@fallingsnow.net> References: <978B1AEF-4B6B-4BA1-A73F-6FEF5C95A12D@fallingsnow.net> Message-ID: <4A0A6C85.1030909@gmail.com> Hi Evan, Evan Phoenix wrote: >> Wow another Evan. :-) >> > Doin' my part to raise the quota! > >> This looks fine but is it necessary? Can we just use >> MachineCodeEmitter to report these? Should it be under >> ExecutionEngine or CodeGen? Are you expecting to extend it to track >> more information? >> > After talking with a number of people in #llvm, this was the solution > we came up with. We couldn't come up with a solution for reporting > the info from MachineCodeEmitter that didn't require restructuring > things a lot, so this was the idea we came up with. > > One upside is that because it's isolated, we have the ability to > easily extend it to track more information. One thing I eventually > want to report is the Relocation information, so that the machine code > can be manipulated outside of LLVMs control. > > I consider it to be a phase 1 of http://wiki.llvm.org/Provide_more_control_over_and_access_to_JIT%27s_output > , which Jeffrey Yasskin and I have been discussing. > > So I guess my point is that I'm open to reporting this data a > different way, but we haven't yet seen one that is as simple. :) > > Additionally, I'm happy to craft this patch externally, but I think it > would make everyones life easier to get it into the repo, so that > others can work on adding things to the API. > I'm interested in this as well. How about passing an abstract class object to JIT (JITListener ?), essentially passing hooks that the JIT calls to pass information during JIT compilation process; the application will have full flexibility about what it will do with this information. The LLVM side can be "oblivious" about how to represent the information, it only needs to call the abstract hooks. (I have something like this in a local patch which gathers debug info from JITed code.) -Argiris From baldrick at free.fr Wed May 13 02:12:16 2009 From: baldrick at free.fr (Duncan Sands) Date: Wed, 13 May 2009 09:12:16 +0200 Subject: [llvm-commits] [llvm] r71612 - in /llvm/trunk: include/llvm/Support/MathExtras.h lib/Target/Alpha/AlphaInstrInfo.td lib/Transforms/Scalar/LoopStrengthReduce.cpp In-Reply-To: <200905130024.n4D0OUQH015653@zion.cs.uiuc.edu> References: <200905130024.n4D0OUQH015653@zion.cs.uiuc.edu> Message-ID: <200905130912.17943.baldrick@free.fr> Hi Dale, > +/// abs64 - absolute value of a 64-bit int. Not all environments support > +/// "abs" on whatever their name for the 64-bit int type is. The absolute on whatever -> or whatever Ciao, Duncan. From baldrick at free.fr Wed May 13 02:26:59 2009 From: baldrick at free.fr (Duncan Sands) Date: Wed, 13 May 2009 09:26:59 +0200 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/ARM/ARMInstrInfo.cpp lib/Target/ARM/ARMInstrInfo.td In-Reply-To: <200905122359.n4CNxEQb014794@zion.cs.uiuc.edu> References: <200905122359.n4CNxEQb014794@zion.cs.uiuc.edu> Message-ID: <200905130926.59798.baldrick@free.fr> Hi Jim, > +let Properties = [IntrNoMem] in { doesn't this mean that all builtinlongjmp intrinsics will be deleted (since they have no return value, their result is never used) and likewise for every builtinsetjmp if the result is unused? I suppose this may not matter if they are only being generated by the backend, but it seems philosophically very wrong. > +def int_builtinsetjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; > +def int_builtinlongjmp : Intrinsic<[llvm_void_ty], [llvm_ptr_ty, llvm_i32_ty]>; How about using GCCBuiltin to have these be automagically mapped to the GCC intrinsics by the CBE? Ciao, Duncan. From evan at fallingsnow.net Wed May 13 02:47:00 2009 From: evan at fallingsnow.net (Evan Phoenix) Date: Wed, 13 May 2009 00:47:00 -0700 Subject: [llvm-commits] [PATCH] Generate info about the JIT process In-Reply-To: References: <978B1AEF-4B6B-4BA1-A73F-6FEF5C95A12D@fallingsnow.net> Message-ID: See below. On May 12, 2009, at 6:56 PM, Evan Cheng wrote: > > On May 11, 2009, at 7:03 PM, Evan Phoenix wrote: > >>> Wow another Evan. :-) >> Doin' my part to raise the quota! >>> This looks fine but is it necessary? Can we just use >>> MachineCodeEmitter to report these? Should it be under >>> ExecutionEngine or CodeGen? Are you expecting to extend it to track >>> more information? >> After talking with a number of people in #llvm, this was the solution >> we came up with. We couldn't come up with a solution for reporting >> the info from MachineCodeEmitter that didn't require restructuring >> things a lot, so this was the idea we came up with. > > Ok. > >> >> One upside is that because it's isolated, we have the ability to >> easily extend it to track more information. One thing I eventually >> want to report is the Relocation information, so that the machine >> code >> can be manipulated outside of LLVMs control. >> >> I consider it to be a phase 1 of http://wiki.llvm.org/Provide_more_control_over_and_access_to_JIT%27s_output >> , which Jeffrey Yasskin and I have been discussing. >> >> So I guess my point is that I'm open to reporting this data a >> different way, but we haven't yet seen one that is as simple. :) > > Ok. My only real complain about the patch is MachineCodeInfo.h should > be in CodeGen just like MachineCodeEmitter. Ok, moved! See attached patch. > > > Evan > >> >> Additionally, I'm happy to craft this patch externally, but I think >> it >> would make everyones life easier to get it into the repo, so that >> others can work on adding things to the API. >>> Evan >> Also Evan >>> >> _______________________________________________ >> 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: jit-info.diff Type: application/octet-stream Size: 6460 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090513/fc4210d5/attachment.obj -------------- next part -------------- From fvbommel at wxs.nl Wed May 13 03:18:39 2009 From: fvbommel at wxs.nl (Frits van Bommel) Date: Wed, 13 May 2009 10:18:39 +0200 Subject: [llvm-commits] RFC: initial union syntax support In-Reply-To: <4A0A63B3.6010908@mxc.ca> References: <85dfcd7f0905121101y62ac0c4esd27a518adbabd3b9@mail.gmail.com> <85dfcd7f0905121456x5570de7dg3dfc35cde861ce1f@mail.gmail.com> <85dfcd7f0905121600w439bab62ncd3d7db1284749a7@mail.gmail.com> <4A0A63B3.6010908@mxc.ca> Message-ID: <4A0A825F.9040400@wxs.nl> Nick Lewycky wrote: > I really don't like allowing a union to contain the same type twice. > That should be illegal no matter what the object hierarchy is. That would require the frontend to make sure different types being inserted into the union don't happen to have the same LLVM type. For instance, 'int' and 'unsigned' are different in the frontend, but the same in LLVM. This is a simple case, but the same goes for more complicated struct types and such so in practice this would require some kind of hashset in the frontend, just to construct a union of arbitrary types. Is there any actual harm in allowing it? From mikael.lepisto at tut.fi Wed May 13 03:41:27 2009 From: mikael.lepisto at tut.fi (=?ISO-8859-1?Q?Mikael_Lepist=F6?=) Date: Wed, 13 May 2009 11:41:27 +0300 Subject: [llvm-commits] [PATCH] Added TCE target to llvm-gcc In-Reply-To: <83AF3DAA-E4AC-4BDA-8B2F-2BBF5C6336E0@apple.com> References: <49CB688D.8070606@tut.fi> <200903261405.48884.baldrick@free.fr> <49CB8AC9.80308@tut.fi> <4A02943D.9010108@tut.fi> <83AF3DAA-E4AC-4BDA-8B2F-2BBF5C6336E0@apple.com> Message-ID: <4A0A87B7.7000703@tut.fi> Chris Lattner wrote: > On May 7, 2009, at 12:56 AM, Mikael Lepist? wrote: >> Any news if this patch could be applied and which modifications it >> would need? I attached the latest version of the patch which is made >> towards llvm-gcc trunk with "svn diff -x -u". >> >> This patch would help greatly our users to be able to use llvm-gcc >> sources gotten directly from llvm, instead using our patched version. >> Also it would help a bit maintaining llvm trunk synchronized branch >> of the tce toolset. > > Hi Mikael, > > The patch looks reasonable to me, but we need to have "LLVM LOCAL" > markers on the changes, so that they don't get lost in a merge. Can > you please add these to the files? > > -Chris Hi, this is great news, I attached updated patch with LLVM LOCAL markers. Mikael Lepist? -------------- next part -------------- A non-text attachment was scrubbed... Name: tce_target_with_llvm_local_markers.patch Type: text/x-patch Size: 48021 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090513/e9aa8110/attachment.bin From akyrtzi at gmail.com Wed May 13 04:20:59 2009 From: akyrtzi at gmail.com (Argiris Kirtzidis) Date: Wed, 13 May 2009 12:20:59 +0300 Subject: [llvm-commits] [PATCH] Generate info about the JIT process In-Reply-To: References: <978B1AEF-4B6B-4BA1-A73F-6FEF5C95A12D@fallingsnow.net> <4A0A6C85.1030909@gmail.com> Message-ID: <4A0A90FB.3000907@gmail.com> (CC'ed llvm-commits) Evan Phoenix wrote: > > On May 12, 2009, at 11:45 PM, Argiris Kirtzidis wrote: > >> Hi Evan, >> >> Evan Phoenix wrote: >>>> Wow another Evan. :-) >>>> >>> Doin' my part to raise the quota! >>> >>>> This looks fine but is it necessary? Can we just use >>>> MachineCodeEmitter to report these? Should it be under >>>> ExecutionEngine or CodeGen? Are you expecting to extend it to >>>> track more information? >>>> >>> After talking with a number of people in #llvm, this was the >>> solution we came up with. We couldn't come up with a solution for >>> reporting the info from MachineCodeEmitter that didn't require >>> restructuring things a lot, so this was the idea we came up with. >>> >>> One upside is that because it's isolated, we have the ability to >>> easily extend it to track more information. One thing I eventually >>> want to report is the Relocation information, so that the machine >>> code can be manipulated outside of LLVMs control. >>> >>> I consider it to be a phase 1 of >>> http://wiki.llvm.org/Provide_more_control_over_and_access_to_JIT%27s_output , >>> which Jeffrey Yasskin and I have been discussing. >>> >>> So I guess my point is that I'm open to reporting this data a >>> different way, but we haven't yet seen one that is as simple. :) >>> >>> Additionally, I'm happy to craft this patch externally, but I think >>> it would make everyones life easier to get it into the repo, so >>> that others can work on adding things to the API. >>> >> >> I'm interested in this as well. How about passing an abstract class >> object to JIT (JITListener ?), essentially passing hooks that the JIT >> calls to pass information during JIT compilation process; the >> application will have full flexibility about what it will do with >> this information. The LLVM side can be "oblivious" about how to >> represent the information, it only needs to call the abstract hooks. >> (I have something like this in a local patch which gathers debug info >> from JITed code.) > > Thats basically what MachineCodeInfo enables. ATM, there are only 2 > things it publishes directly to the MCI, but future APIs can easily be > added using virtual methods to allow for subclasses of MachineCodeInfo > to do new things. > > This is far from a final set of things MCI will do, it's primarily a > way of introduce an API that we can add future things to. Ok, that sounds great. It's just that MachineCodeInfo is restricted to the "function level", how about "module level" info, specifically getting notifications during code execution like: -"I lazy JITed this function" -"I allocated this memory chunk for this global variable" Of course, MachineCodeInfo could be the one for the "function level" and something like "JITListener" at the module level. The JITListener could have a method that passes a MachineCodeInfo before function JITing. IMO this is flexible and clean. Any thoughts on the above ? -Argiris From baldrick at free.fr Wed May 13 07:52:44 2009 From: baldrick at free.fr (Duncan Sands) Date: Wed, 13 May 2009 12:52:44 -0000 Subject: [llvm-commits] [llvm] r71654 - /llvm/trunk/lib/Analysis/IVUsers.cpp Message-ID: <200905131252.n4DCqikU024479@zion.cs.uiuc.edu> Author: baldrick Date: Wed May 13 07:52:44 2009 New Revision: 71654 URL: http://llvm.org/viewvc/llvm-project?rev=71654&view=rev Log: Avoid getting a compiler warning IVUsers.cpp: In member function ?bool llvm::IVUsers::AddUsersIfInteresting(llvm::Instruction*)?: IVUsers.cpp:221: warning: ?isSigned? may be used uninitialized in this function with gcc-4.3. Modified: llvm/trunk/lib/Analysis/IVUsers.cpp Modified: llvm/trunk/lib/Analysis/IVUsers.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IVUsers.cpp?rev=71654&r1=71653&r2=71654&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IVUsers.cpp (original) +++ llvm/trunk/lib/Analysis/IVUsers.cpp Wed May 13 07:52:44 2009 @@ -218,7 +218,7 @@ Loop *UseLoop = LI->getLoopFor(I->getParent()); SCEVHandle Start = SE->getIntegerSCEV(0, ISE->getType()); SCEVHandle Stride = Start; - bool isSigned; + bool isSigned = false; // Arbitrary initial value - pacifies compiler. if (!getSCEVStartAndStride(ISE, L, UseLoop, Start, Stride, isSigned, SE, DT)) return false; // Non-reducible symbolic expression, bail out. From baldrick at free.fr Wed May 13 08:10:25 2009 From: baldrick at free.fr (Duncan Sands) Date: Wed, 13 May 2009 13:10:25 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r71655 - in /llvm-gcc-4.2/trunk: config.sub configure configure.in gcc/Makefile.in gcc/config.gcc gcc/config/tce/ gcc/config/tce/t-tce gcc/config/tce/tce.c gcc/config/tce/tce.h gcc/config/tce/tce.md Message-ID: <200905131310.n4DDAULj025173@zion.cs.uiuc.edu> Author: baldrick Date: Wed May 13 08:10:04 2009 New Revision: 71655 URL: http://llvm.org/viewvc/llvm-project?rev=71655&view=rev Log: Add TCE target. Patch by Mikael Lepist?. Added: llvm-gcc-4.2/trunk/gcc/config/tce/ llvm-gcc-4.2/trunk/gcc/config/tce/t-tce llvm-gcc-4.2/trunk/gcc/config/tce/tce.c llvm-gcc-4.2/trunk/gcc/config/tce/tce.h llvm-gcc-4.2/trunk/gcc/config/tce/tce.md Modified: llvm-gcc-4.2/trunk/config.sub llvm-gcc-4.2/trunk/configure llvm-gcc-4.2/trunk/configure.in llvm-gcc-4.2/trunk/gcc/Makefile.in llvm-gcc-4.2/trunk/gcc/config.gcc Modified: llvm-gcc-4.2/trunk/config.sub URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/config.sub?rev=71655&r1=71654&r2=71655&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/config.sub (original) +++ llvm-gcc-4.2/trunk/config.sub Wed May 13 08:10:04 2009 @@ -1154,6 +1154,11 @@ pmac | pmac-mpw) basic_machine=powerpc-apple ;; +# LLVM LOCAL begin - TCE target + tce*) + basic_machine=tce- + ;; +# LLVM LOCAL end - TCE target *-unknown) # Make sure to match an already-canonicalized machine name. ;; @@ -1355,6 +1360,10 @@ -zvmoe) os=-zvmoe ;; +# LLVM LOCAL begin - TCE target + -llvm*) + ;; +# LLVM LOCAL end - TCE target -none) ;; *) Modified: llvm-gcc-4.2/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/configure?rev=71655&r1=71654&r2=71655&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/configure (original) +++ llvm-gcc-4.2/trunk/configure Wed May 13 08:10:04 2009 @@ -1640,6 +1640,11 @@ spu-*-*) skipdirs="target-libiberty target-libssp" ;; +# LLVM LOCAL begin - TCE target + tce-*-*) + skipdirs="target-libssp target-libstdc++-v3" + ;; +# LLVM LOCAL end - TCE target v810-*-*) noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}" ;; Modified: llvm-gcc-4.2/trunk/configure.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/configure.in?rev=71655&r1=71654&r2=71655&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/configure.in (original) +++ llvm-gcc-4.2/trunk/configure.in Wed May 13 08:10:04 2009 @@ -800,6 +800,11 @@ spu-*-*) skipdirs="target-libiberty target-libssp" ;; +# LLVM LOCAL begin - TCE target + tce-*-*) + skipdirs="target-libssp target-libstdc++-v3" + ;; +# LLVM LOCAL end - TCE target v810-*-*) noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}" ;; 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=71655&r1=71654&r2=71655&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/Makefile.in (original) +++ llvm-gcc-4.2/trunk/gcc/Makefile.in Wed May 13 08:10:04 2009 @@ -1152,6 +1152,7 @@ sparc-*-*) echo sparc;; \ sparcv9-*-*) echo sparc;; \ spu-*-*) echo cellspu;; \ + tce-*-*) echo tce;; \ esac LLVMTARGETOBJ := $(shell $(LLVMTARGETCOMPONENT)) @@ -1159,6 +1160,12 @@ $(error Unsuported LLVM Target $(target)) endif +# TCE is external backend so we just set target obj to be all to get all +# libs to be included to LLVMLIBFILES list +ifeq ($(LLVMTARGETOBJ),tce) +LLVMTARGETOBJ := all +endif + # If in BUILD_LLVM_INTO_A_DYLIB mode, always link in the x86/ppc backends. # See below for more details. ifdef BUILD_LLVM_INTO_A_DYLIB @@ -1184,6 +1191,7 @@ # libraries change the tools should be relinked. LIBDEPS += $(LLVMLIBFILES) LLVMBACKENDFILES := $(LLVMLIBFILES) +# LLVM LOCAL end # LLVM LOCAL begin - set DYLD path SET_DYLIB_PATH=0 Modified: llvm-gcc-4.2/trunk/gcc/config.gcc URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config.gcc?rev=71655&r1=71654&r2=71655&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config.gcc (original) +++ llvm-gcc-4.2/trunk/gcc/config.gcc Wed May 13 08:10:04 2009 @@ -2425,6 +2425,19 @@ md_file=arm/arm.md extra_modes=arm/arm-modes.def ;; +# LLVM LOCAL begin - TCE target +tce*-llvm*) + use_fixproto=yes + use_collect2=no + +# this didn't have any effect - tce.md was still needed +# md_file="" + + tm_p_file="" + tmake_file="tce/t-tce" + tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" + ;; +# LLVM LOCAL end - TCE target v850e1-*-*) target_cpu_default="TARGET_CPU_v850e1" tm_file="dbxelf.h elfos.h svr4.h v850/v850.h" Added: llvm-gcc-4.2/trunk/gcc/config/tce/t-tce URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/tce/t-tce?rev=71655&view=auto ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/tce/t-tce (added) +++ llvm-gcc-4.2/trunk/gcc/config/tce/t-tce Wed May 13 08:10:04 2009 @@ -0,0 +1,27 @@ +# LLVM LOCAL begin - TCE target + +# Makes --emit-llvm to be added to gcc command by default and +# sets tools to use llvm-ld, llvm-as etc. as binutils for copiler. +# TODO: IMPLEMENT THIS DEFINE +# (maybe could be useful for other new bitcode only targets) +ALWAYS_EMIT_LLVM=1 + +# we want to output bitcode +TARGET_LIBGCC2_CFLAGS = --emit-llvm + +# These does not seem to work correctly. +# For some reason overrides does not reach +# e.g. libgcc2 compilation +LD_FOR_TARGET = llvm-ld +AS_FOR_TARGET = llvm-as +NM_FOR_TARGET = llvm-nm +RANLIB_FOR_TARGET = llvm-ranlib +AR_FOR_TARGET = llvm-ar + +# So instead you have to give these for main level configure as follows + +# AR_FOR_TARGET=`which llvm-ar` RANLIB_FOR_TARGET=`which llvm-ranlib` \ +# AS_FOR_TARGET=`which llvm-as` LD_FOR_TARGET=`which llvm-ld` \ +# NM_FOR_TARGET=`which llvm-nm` + +# LLVM LOCAL end - TCE target Added: llvm-gcc-4.2/trunk/gcc/config/tce/tce.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/tce/tce.c?rev=71655&view=auto ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/tce/tce.c (added) +++ llvm-gcc-4.2/trunk/gcc/config/tce/tce.c Wed May 13 08:10:04 2009 @@ -0,0 +1,29 @@ +// LLVM LOCAL begin - TCE target + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "tm.h" +#include "rtl.h" +#include "regs.h" +#include "hard-reg-set.h" +#include "real.h" +#include "insn-config.h" +#include "conditions.h" +#include "insn-attr.h" +#include "flags.h" +#include "recog.h" +#include "tree.h" +#include "output.h" +#include "expr.h" +#include "obstack.h" +#include "except.h" +#include "function.h" +#include "toplev.h" +#include "tm_p.h" +#include "target.h" +#include "target-def.h" + +struct gcc_target targetm = TARGET_INITIALIZER; + +// LLVM LOCAL end - TCE target Added: llvm-gcc-4.2/trunk/gcc/config/tce/tce.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/tce/tce.h?rev=71655&view=auto ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/tce/tce.h (added) +++ llvm-gcc-4.2/trunk/gcc/config/tce/tce.h Wed May 13 08:10:04 2009 @@ -0,0 +1,845 @@ +// LLVM LOCAL begin - TCE target +/* +Definitions of TCE target +Mikael Lepist?? (mikael.lepisto at tut.fi) +based on fr30 target by Cygnus Solutions. + +This is part of minimal implementation for being able to +compile llvm-gcc with tce-llvm target. + +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 declaration should be present. */ +extern int target_flags; + +#define REAL_LD_FILE_NAME "llvm-ld" +#define REAL_NM_FILE_NAME "llvm-nm" +#define DEAFULT_LINKER "llvm-ld" + +/* To make llvm-backend.cpp recognice us ok... */ +#define LLVM_OVERRIDE_TARGET_ARCH() "mips" + + +#define TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + builtin_define_std ("tce"); \ + builtin_define_std ("__TCE__"); \ + builtin_define_std ("__TCE_V1__"); \ + } \ + while (0) + +/* The -Q options from svr4.h aren't understood and must be removed. */ +#undef ASM_SPEC +#define ASM_SPEC \ + "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} -f" + +#undef LINK_SPEC +#define LINK_SPEC "-disable-opt -disable-internalize" + +/** + * For C++ support there migh be necessary to add crt1.o also.. + */ +#undef STARTFILE_SPEC +#define STARTFILE_SPEC "crt0.o%s" + +#undef ENDFILE_SPEC +/* +#define ENDFILE_SPEC "libc.a%s libnosys.a%s libm.a%s emulation_functions.o%s crtend.o%s" +*/ + +/* emulation functions are linked in lowermissing pass */ +#define ENDFILE_SPEC "libc.a%s libnosys.a%s libm.a%s crtend.o%s" + +/* There is no default multilib. */ +#undef MULTILIB_DEFAULTS + +/** + * Future switches... + * + * Type sizes, endianess, registers... + */ +/* +#define TARGET_SWITCHES \ +{ \ + { "", 0, "" } \ +} +*/ + +/* + Turn off replacement of mallocs and free calls with + corresponding llvm assembler instructions. +-ffreestanding + flag_freestanding = 1; didn't work.. has to be switch... +-fno-unit-at-a-time + flag_unit_at_a_time = 0; give this also to compiler... +*/ +#undef OVERRIDE_OPTIONS +#define OVERRIDE_OPTIONS \ +{ \ + emit_llvm = 1; \ +} + +#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \ + do \ + { \ + } \ + while (0) + +#define TARGET_VERSION fprintf (stderr, " (tce)"); + +/* Number of hardware registers known to the compiler. They receive numbers 0 + through `FIRST_PSEUDO_REGISTER-1'; thus, the first pseudo register's number + really is assigned the number `FIRST_PSEUDO_REGISTER'. */ +#define FIRST_FP_REGISTER 512 + +#define FIRST_PSEUDO_REGISTER 1024 + + +/* A C type for declaring a variable that is used as the first argument of + `FUNCTION_ARG' and other related values. For some target machines, the type + `int' suffices and can hold the number of bytes of argument so far. + + There is no need to record in `CUMULATIVE_ARGS' anything about the arguments + that have been passed on the stack. The compiler has other variables to + keep track of that. For target machines on which all arguments are passed + on the stack, there is no need to store anything in `CUMULATIVE_ARGS'; + however, the data structure must exist and should not be empty, so use + `int'. */ +/* On the FR30 this value is an accumulating count of the number of argument + registers that have been filled with argument values, as opposed to say, + the number of bytes of argument accumulated so far. */ +#define CUMULATIVE_ARGS int + +/*{{{ Register Classes. */ + +/* An enumeral type that must be defined with all the register class names as + enumeral values. `NO_REGS' must be first. `ALL_REGS' must be the last + register class, followed by one more enumeral value, `LIM_REG_CLASSES', + which is not a register class but rather tells how many classes there are. + + Each register class has a number, which is the value of casting the class + name to type `int'. The number serves as an index in many of the tables + described below. */ +enum reg_class +{ + NO_REGS, + INT_REGS, /* i.e. all the general hardware registers on the FR30 */ + FP_REGS, + ALL_REGS, + LIM_REG_CLASSES +}; + +#define N_REG_CLASSES ((int) LIM_REG_CLASSES) + +#define STRICT_ALIGNMENT 1 + +/*{{{ Layout of Source Language Data Types. */ + +#define CHAR_TYPE_SIZE 8 +#define SHORT_TYPE_SIZE 16 +#define INT_TYPE_SIZE 32 +#define LONG_TYPE_SIZE 32 + +/* Enable this if you like to start fixing 64bit ISEL issues */ +#if 0 +#define LONG_LONG_TYPE_SIZE 64 +#else +#define LONG_LONG_TYPE_SIZE 32 +/* to omit compilation of libgcc2 (it wont work without long long 64bit) */ +#define LIBGCC2_UNITS_PER_WORD 8 +#endif + +#define FLOAT_TYPE_SIZE 32 +#define DOUBLE_TYPE_SIZE 32 +#define LONG_DOUBLE_TYPE_SIZE 32 + +#define POINTER_SIZE 32 + +#define DEFAULT_SIGNED_CHAR 1 + +/*{{{ Storage Layout. */ +#define BITS_BIG_ENDIAN 1 +#define BYTES_BIG_ENDIAN 1 +#define WORDS_BIG_ENDIAN 1 +#define UNITS_PER_WORD 4 + +#define FUNCTION_BOUNDARY 32 +#define BIGGEST_ALIGNMENT 64 +#define STACK_BOUNDARY 32 + +/* A C expression for the size in bytes of the trampoline, as an integer. */ +#define TRAMPOLINE_SIZE 18 + +/* The register number of the stack pointer register, which must also be a + fixed register according to `FIXED_REGISTERS'. On most machines, the + hardware determines which register this is. */ +#define STACK_POINTER_REGNUM 1 + +/* The register number of the frame pointer register, which is used to access + automatic variables in the stack frame. On some machines, the hardware + determines which register this is. On other machines, you can choose any + register you wish for this purpose. */ +#define FRAME_POINTER_REGNUM 6 + +/* The register number of the arg pointer register, which is used to access the + function's argument list. On some machines, this is the same as the frame + pointer register. On some machines, the hardware determines which register + this is. On other machines, you can choose any register you wish for this + purpose. If this is not the same register as the frame pointer register, + then you must mark it as a fixed register according to `FIXED_REGISTERS', or + arrange to be able to eliminate it. */ +#define ARG_POINTER_REGNUM 2 + +/* The first register that can contain the arguments to a function. */ +#define FIRST_ARG_REGNUM 2 + +/* The register that contains the result of a function call. */ +#define RETURN_VALUE_REGNUM 0 + +#define EH_RETURN_DATA_REGNO(N) (RETURN_VALUE_REGNUM) + +#define DWARF_FRAME_REGNUM(REG) (REG) +#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (1) + +/* A C expression that is nonzero if REGNO is the number of a hard register in + which function arguments are sometimes passed. This does *not* include + implicit arguments such as the static chain and the structure-value address. + On many machines, no registers can be used for this purpose since all + function arguments are pushed on the stack. */ +/* #define FUNCTION_ARG_REGNO_P(REGNO) */ +#define FUNCTION_ARG_REGNO_P(REGNO) ((REGNO) >= FIRST_ARG_REGNUM) + +/* A C expression that is nonzero if it is permissible to store a value of mode + MODE in hard register number REGNO (or in several registers starting with + that one). */ +#define HARD_REGNO_MODE_OK(REGNO, MODE) 1 + +#define PARM_BOUNDARY 32 + +/* A C statement to initialize the variable parts of a trampoline. ADDR is an + RTX for the address of the trampoline; FNADDR is an RTX for the address of + the nested function; STATIC_CHAIN is an RTX for the static chain value that + should be passed to the function when it is called. */ +#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \ +do \ +{ \ + emit_move_insn (gen_rtx_MEM (SImode, plus_constant (ADDR, 4)), STATIC_CHAIN);\ + emit_move_insn (gen_rtx_MEM (SImode, plus_constant (ADDR, 12)), FNADDR); \ +} while (0); + + +/* A macro whose definition is the name of the class to which a valid base + register must belong. A base register is one used in an address which is + the register value plus a displacement. */ +#define BASE_REG_CLASS INT_REGS + +#define GENERAL_REGS INT_REGS + +/*{{{ Describing Relative Costs of Operations */ + +/* Define this macro as a C expression which is nonzero if accessing less than + a word of memory (i.e. a `char' or a `short') is no faster than accessing a + word of memory, i.e., if such access require more than one instruction or if + there is no difference in cost between byte and (aligned) word loads. + + When this macro is not defined, the compiler will access a field by finding + the smallest containing object; when it is defined, a fullword load will be + used if alignment permits. Unless bytes accesses are faster than word + accesses, using word accesses is preferable since it may eliminate + subsequent memory access if subsequent accesses occur to other fields in the + same word of the structure, but to different bytes. */ +#define SLOW_BYTE_ACCESS 1 + +/* A number, the maximum number of registers that can appear in a valid memory + address. Note that it is up to you to specify a value equal to the maximum + number that `GO_IF_LEGITIMATE_ADDRESS' would ever accept. */ +#define MAX_REGS_PER_ADDRESS 1 + +/* A C string constant for text to be output before each `asm' statement or + group of consecutive ones. Normally this is `"#APP"', which is a comment + that has no effect on most assemblers but tells the GNU assembler that it + must check the lines that follow for all valid assembler constructs. */ +#define ASM_APP_ON "#APP\n" + +/* A C string constant for text to be output after each `asm' statement or + group of consecutive ones. Normally this is `"#NO_APP"', which tells the + GNU assembler to resume making the time-saving assumptions that are valid + for ordinary compiler output. */ +#define ASM_APP_OFF "#NO_APP\n" + +/* A C expression which is nonzero if a function must have and use a frame + pointer. This expression is evaluated in the reload pass. If its value is + nonzero the function will have a frame pointer. + + The expression can in principle examine the current function and decide + according to the facts, but on most machines the constant 0 or the constant + 1 suffices. Use 0 when the machine allows code to be generated with no + frame pointer, and doing so saves some time or space. Use 1 when there is + no possible advantage to avoiding a frame pointer. + + In certain cases, the compiler does not know how to produce valid code + without a frame pointer. The compiler recognizes those cases and + automatically gives the function a frame pointer regardless of what + `FRAME_POINTER_REQUIRED' says. You don't need to worry about them. + + In a function that does not require a frame pointer, the frame pointer + register can be allocated for ordinary usage, unless you mark it as a fixed + register. See `FIXED_REGISTERS' for more information. */ +/* #define FRAME_POINTER_REQUIRED 0 */ +#define FRAME_POINTER_REQUIRED \ + (flag_omit_frame_pointer == 0 || current_function_pretend_args_size > 0) + +/* Offset from the frame pointer to the first local variable slot to be + allocated. + + If `FRAME_GROWS_DOWNWARD', find the next slot's offset by subtracting the + first slot's length from `STARTING_FRAME_OFFSET'. Otherwise, it is found by + adding the length of the first slot to the value `STARTING_FRAME_OFFSET'. */ +/* #define STARTING_FRAME_OFFSET -4 */ +#define STARTING_FRAME_OFFSET 0 + +/* A macro whose definition is the name of the class to which a valid index + register must belong. An index register is one used in an address where its + value is either multiplied by a scale factor or added to another register + (as well as added to a displacement). */ +#define INDEX_REG_CLASS INT_REGS + +/* A C expression whose value is a register class containing hard register + REGNO. In general there is more than one such class; choose a class which + is "minimal", meaning that no smaller class also contains the register. */ +#define REGNO_REG_CLASS(REGNO) ((REGNO > FIRST_FP_REGISTER )?(INT_REGS):(FP_REGS)) + +/* A C expression that is nonzero if X is a legitimate constant for an + immediate operand on the target machine. You can assume that X satisfies + `CONSTANT_P', so you need not check this. In fact, `1' is a suitable + definition for this macro on machines where anything `CONSTANT_P' is valid. */ +#define LEGITIMATE_CONSTANT_P(X) 1 + +#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \ + do \ + { \ + if (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ + goto LABEL; \ + if (GET_CODE (X) == PLUS \ + && ((MODE) == SImode || (MODE) == SFmode) \ + && XEXP (X, 0) == stack_pointer_rtx \ + && GET_CODE (XEXP (X, 1)) == CONST_INT \ + && IN_RANGE (INTVAL (XEXP (X, 1)), 0, (1 << 6) - 4)) \ + goto LABEL; \ + if (GET_CODE (X) == PLUS \ + && ((MODE) == SImode || (MODE) == SFmode) \ + && GET_CODE (XEXP (X, 0)) == REG \ + && (REGNO (XEXP (X, 0)) == FRAME_POINTER_REGNUM \ + || REGNO (XEXP (X, 0)) == ARG_POINTER_REGNUM) \ + && GET_CODE (XEXP (X, 1)) == CONST_INT \ + && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 << 9) - 4)) \ + goto LABEL; \ + } \ + while (0) + +/* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for + use as a base register. For hard registers, it should always accept those + which the hardware permits and reject the others. Whether the macro accepts + or rejects pseudo registers must be controlled by `REG_OK_STRICT' as + described above. This usually requires two variant definitions, of which + `REG_OK_STRICT' controls the one actually used. */ +#define REG_OK_FOR_BASE_P(X) 1 + + +/* A C statement or compound statement with a conditional `goto LABEL;' + executed if memory address X (an RTX) can have different meanings depending + on the machine mode of the memory reference it is used for or if the address + is valid for some modes but not others. + + Autoincrement and autodecrement addresses typically have mode-dependent + effects because the amount of the increment or decrement is the size of the + operand being addressed. Some machines have other mode-dependent addresses. + Many RISC machines have no mode-dependent addresses. + + You may assume that ADDR is a valid address for the machine. */ +#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) + + +/* An initializer that says which registers are used for fixed purposes all + throughout the compiled code and are therefore not available for general + allocation. These would include the stack pointer, the frame pointer + (except on machines where that can be used as a general register when no + frame pointer is needed), the program counter on machines where that is + considered one of the addressable registers, and any other numbered register + with a standard use. + + This information is expressed as a sequence of numbers, separated by commas + and surrounded by braces. The Nth number is 1 if register N is fixed, 0 + otherwise. + + The table initialized from this macro, and the table initialized by the + following one, may be overridden at run time either automatically, by the + actions of the macro `CONDITIONAL_REGISTER_USAGE', or by the user with the + command options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. */ +#define FIXED_REGISTERS \ + { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ +/* 256-511 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ +/* fp 512 - 767 */ \ + 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ +/* fp 768 - 1024 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \ + } + +/* Like `FIXED_REGISTERS' but has 1 for each register that is clobbered (in + general) by function calls as well as for fixed registers. This macro + therefore identifies the registers that are not available for general + allocation of values that must live across function calls. + + If a register has 0 in `CALL_USED_REGISTERS', the compiler automatically + saves it on function entry and restores it on function exit, if the register + is used within the function. */ +#define CALL_USED_REGISTERS \ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ +/* 256-511 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ +/* fp 512 - 767 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ +/* fp 768 - 1024 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \ + } + +/* An initializer containing the contents of the register classes, as integers + which are bit masks. The Nth integer specifies the contents of class N. + The way the integer MASK is interpreted is that register R is in the class + if `MASK & (1 << R)' is 1. + + When the machine has more than 32 registers, an integer does not suffice. + Then the integers are replaced by sub-initializers, braced groupings + containing several integers. Each sub-initializer must be suitable as an + initializer for the type `HARD_REG_SET' which is defined in + `hard-reg-set.h'. */ +#define REG_CLASS_CONTENTS \ +{ \ +} + +/* A C initializer containing the assembler's names for the machine registers, + each one as a C string constant. This is what translates register numbers + in the compiler into assembler language. */ +#define REGISTER_NAMES \ +{ "rv", "sp", "iarg1", "iarg2", "iarg3", "iarg4", "fp", "r7" } + +/* An initializer containing the names of the register classes as C string + constants. These names are used in writing some of the debugging dumps. */ +#define REG_CLASS_NAMES \ +{ \ + "NO_REGS", \ + "INT_REGS", \ + "FP_REGS", \ + "ALL_REGS" \ + } + +/* A C expression whose value is a string containing the assembler operation + that should precede instructions and read-only data. Normally `".text"' is + right. */ +#define TEXT_SECTION_ASM_OP "\t.text" + +/* A C expression whose value is a string containing the assembler operation to + identify the following data as writable initialized data. Normally + `".data"' is right. */ +#define DATA_SECTION_ASM_OP "\t.data" + +/* Globalizing directive for a label. */ +#define GLOBAL_ASM_OP "\t.globl " + +/* A C expression which defines the machine-dependent operand constraint + letters for register classes. If CHAR is such a letter, the value should be + the register class corresponding to it. Otherwise, the value should be + `NO_REGS'. The register letter `r', corresponding to class `GENERAL_REGS', + will not be passed to this macro; you do not need to handle it. + + The following letters are unavailable, due to being used as + constraints: + '0'..'9' + '<', '>' + 'E', 'F', 'G', 'H' + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P' + 'Q', 'R', 'S', 'T', 'U' + 'V', 'X' + 'g', 'i', 'm', 'n', 'o', 'p', 'r', 's' */ + +#define REG_CLASS_FROM_LETTER(CHAR) \ + ( (CHAR) == 'r' ? INT_REGS \ + : (CHAR) == 'f' ? FP_REGS \ + : NO_REGS) + + +/* An alias for the machine mode for pointers. On most machines, define this + to be the integer mode corresponding to the width of a hardware pointer; + `SImode' on 32-bit machine or `DImode' on 64-bit machines. On some machines + you must define this to be one of the partial integer modes, such as + `PSImode'. + + The width of `Pmode' must be at least as large as the value of + `POINTER_SIZE'. If it is not equal, you must define the macro + `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to `Pmode'. */ +#define Pmode SImode + +/* An alias for the machine mode used for memory references to functions being + called, in `call' RTL expressions. On most machines this should be + `QImode'. */ +#define FUNCTION_MODE SImode + +/* The maximum number of bytes that a single instruction can move quickly from + memory to memory. */ +#define MOVE_MAX 4 + +/* An alias for a machine mode name. This is the machine mode that elements of + a jump-table should have. */ +#define CASE_VECTOR_MODE SImode + +/* A C expression that should indicate the number of bytes of its own arguments + that a function pops on returning, or 0 if the function pops no arguments + and the caller must therefore pop them all after the function returns. + + FUNDECL is a C variable whose value is a tree node that describes the + function in question. Normally it is a node of type `FUNCTION_DECL' that + describes the declaration of the function. From this it is possible to + obtain the DECL_ATTRIBUTES of the function. + + FUNTYPE is a C variable whose value is a tree node that describes the + function in question. Normally it is a node of type `FUNCTION_TYPE' that + describes the data type of the function. From this it is possible to obtain + the data types of the value and arguments (if known). + + When a call to a library function is being considered, FUNTYPE will contain + an identifier node for the library function. Thus, if you need to + distinguish among various library functions, you can do so by their names. + Note that "library function" in this context means a function used to + perform arithmetic, whose name is known specially in the compiler and was + not mentioned in the C code being compiled. + + STACK-SIZE is the number of bytes of arguments passed on the stack. If a + variable number of bytes is passed, it is zero, and argument popping will + always be the responsibility of the calling function. + + On the VAX, all functions always pop their arguments, so the definition of + this macro is STACK-SIZE. On the 68000, using the standard calling + convention, no functions pop their arguments, so the value of the macro is + always 0 in this case. But an alternative calling convention is available + in which functions that take a fixed number of arguments pop them but other + functions (such as `printf') pop nothing (the caller pops all). When this + convention is in use, FUNTYPE is examined to determine whether a function + takes a fixed number of arguments. */ +#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0 + +/* A C statement (sans semicolon) for initializing the variable CUM for the + state at the beginning of the argument list. The variable has type + `CUMULATIVE_ARGS'. The value of FNTYPE is the tree node for the data type + of the function which will receive the args, or 0 if the args are to a + compiler support library function. The value of INDIRECT is nonzero when + processing an indirect call, for example a call through a function pointer. + The value of INDIRECT is zero for a call to an explicitly named function, a + library function call, or when `INIT_CUMULATIVE_ARGS' is used to find + arguments for the function being compiled. + + When processing a call to a compiler support library function, LIBNAME + identifies which one. It is a `symbol_ref' rtx which contains the name of + the function, as a string. LIBNAME is 0 when an ordinary C function call is + being processed. Thus, each time this macro is called, either LIBNAME or + FNTYPE is nonzero, but never both of them at once. */ +#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ + (CUM) = 0 + +/* The number of register assigned to holding function arguments. */ + +#define ARG_REGS 4 + +#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ + ( (NAMED) == 0 ? NULL_RTX \ + : targetm.calls.must_pass_in_stack (MODE, TYPE) ? NULL_RTX \ + : (CUM) >= ARG_REGS ? NULL_RTX \ + : gen_rtx_REG (MODE, CUM + FIRST_ARG_REGNUM)) + +/* A C statement (sans semicolon) to update the summarizer variable CUM to + advance past an argument in the argument list. The values MODE, TYPE and + NAMED describe that argument. Once this is done, the variable CUM is + suitable for analyzing the *following* argument with `FUNCTION_ARG', etc. + + This macro need not do anything if the argument in question was passed on + the stack. The compiler knows how to track the amount of stack space used + for arguments without any special help. */ +#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) + +/* A C expression which is nonzero if on this machine it is safe to "convert" + an integer of INPREC bits to one of OUTPREC bits (where OUTPREC is smaller + than INPREC) by merely operating on it as if it had only OUTPREC bits. + + On many machines, this expression can be 1. + + When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for modes for + which `MODES_TIEABLE_P' is 0, suboptimal code can result. If this is the + case, making `TRULY_NOOP_TRUNCATION' return 0 in such cases may improve + things. */ +#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 + +/*{{{ Assembler Commands for Alignment. */ + +/* A C statement to output to the stdio stream STREAM an assembler command to + advance the location counter to a multiple of 2 to the POWER bytes. POWER + will be a C expression of type `int'. */ + +#define ASM_OUTPUT_ALIGN(STREAM, POWER) \ + fprintf ((STREAM), "\t.p2align %d\n", (POWER)) + +/* A C expression that is 1 if the RTX X is a constant which is a valid + address. On most machines, this can be defined as `CONSTANT_P (X)', but a + few machines are more restrictive in which constant addresses are supported. + + `CONSTANT_P' accepts integer-values expressions whose values are not + explicitly known, such as `symbol_ref', `label_ref', and `high' expressions + and `const' arithmetic expressions, in addition to `const_int' and + `const_double' expressions. */ +#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) + +#define FUNCTION_VALUE(VALTYPE, FUNC) \ + gen_rtx_REG (TYPE_MODE (VALTYPE), RETURN_VALUE_REGNUM) + +/* A C expression to create an RTX representing the place where a library + function returns a value of mode MODE. If the precise function being called + is known, FUNC is a tree node (`FUNCTION_DECL') for it; otherwise, FUNC is a + null pointer. This makes it possible to use a different value-returning + convention for specific functions when all their calls are known. + + Note that "library function" in this context means a compiler support + routine, used to perform arithmetic, whose name is known specially by the + compiler and was not mentioned in the C code being compiled. + + The definition of `LIBRARY_VALUE' need not be concerned aggregate data + types, because none of the library functions returns such types. */ +#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, RETURN_VALUE_REGNUM) + +/* A C compound statement to output to stdio stream STREAM the assembler syntax + for an instruction operand X. X is an RTL expression. + + CODE is a value that can be used to specify one of several ways of printing + the operand. It is used when identical operands must be printed differently + depending on the context. CODE comes from the `%' specification that was + used to request printing of the operand. If the specification was just + `%DIGIT' then CODE is 0; if the specification was `%LTR DIGIT' then CODE is + the ASCII code for LTR. + + If X is a register, this macro should print the register's name. The names + can be found in an array `reg_names' whose type is `char *[]'. `reg_names' + is initialized from `REGISTER_NAMES'. + + When the machine description has a specification `%PUNCT' (a `%' followed by + a punctuation character), this macro is called with a null pointer for X and + the punctuation character for CODE. */ +#define PRINT_OPERAND(STREAM, X, CODE) + + +/* A C compound statement to output to stdio stream STREAM the assembler syntax + for an instruction operand that is a memory reference whose address is X. X + is an RTL expression. */ + +#define PRINT_OPERAND_ADDRESS(STREAM, X) + +/* A C statement or compound statement to output to FILE some assembler code to + call the profiling subroutine `mcount'. Before calling, the assembler code + must load the address of a counter variable into a register where `mcount' + expects to find the address. The name of this variable is `LP' followed by + the number LABELNO, so you would generate the name using `LP%d' in a + `fprintf'. + + The details of how the address should be passed to `mcount' are determined + by your operating system environment, not by GCC. To figure them out, + compile a small program for profiling using the system's installed C + compiler and look at the assembler code that results. */ +#define FUNCTION_PROFILER(FILE, LABELNO) \ +{ \ + fprintf (FILE, "\t mov rp, r1\n" ); \ + fprintf (FILE, "\t ldi:32 mcount, r0\n" ); \ + fprintf (FILE, "\t call @r0\n" ); \ + fprintf (FILE, ".word\tLP%d\n", LABELNO); \ +} + +/* Offset from the argument pointer register to the first argument's address. + On some machines it may depend on the data type of the function. + + If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first + argument's address. */ +#define FIRST_PARM_OFFSET(FUNDECL) 0 + +/* A C expression that is nonzero if it is desirable to choose register + allocation so as to avoid move instructions between a value of mode MODE1 + and a value of mode MODE2. + + If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R, MODE2)' are + ever different for any R, then `MODES_TIEABLE_P (MODE1, MODE2)' must be + zero. */ +#define MODES_TIEABLE_P(MODE1, MODE2) 1 + +/* A C expression that defines the machine-dependent operand constraint letters + (`I', `J', `K', .. 'P') that specify particular ranges of integer values. + If C is one of those letters, the expression should check that VALUE, an + integer, is in the appropriate range and return 1 if so, 0 otherwise. If C + is not one of those letters, the value should be 0 regardless of VALUE. */ +#define CONST_OK_FOR_LETTER_P(VALUE, C) \ + ( (C) == 'I' ? IN_RANGE (VALUE, 0, 15) \ + : (C) == 'J' ? IN_RANGE (VALUE, -16, -1) \ + : (C) == 'K' ? IN_RANGE (VALUE, 16, 31) \ + : (C) == 'L' ? IN_RANGE (VALUE, 0, (1 << 8) - 1) \ + : (C) == 'M' ? IN_RANGE (VALUE, 0, (1 << 20) - 1) \ + : (C) == 'P' ? IN_RANGE (VALUE, -(1 << 8), (1 << 8) - 1) \ + : 0) + +/* A C expression that defines the machine-dependent operand constraint letters + (`G', `H') that specify particular ranges of `const_double' values. + + If C is one of those letters, the expression should check that VALUE, an RTX + of code `const_double', is in the appropriate range and return 1 if so, 0 + otherwise. If C is not one of those letters, the value should be 0 + regardless of VALUE. + + `const_double' is used for all floating-point constants and for `DImode' + fixed-point constants. A given letter can accept either or both kinds of + values. It can use `GET_MODE' to distinguish between these kinds. */ +#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0 + +/* A C expression that places additional restrictions on the register class to + use when it is necessary to copy value X into a register in class CLASS. + The value is a register class; perhaps CLASS, or perhaps another, smaller + class. On many machines, the following definition is safe: + + #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS + + Sometimes returning a more restrictive class makes better code. For + example, on the 68000, when X is an integer constant that is in range for a + `moveq' instruction, the value of this macro is always `DATA_REGS' as long + as CLASS includes the data registers. Requiring a data register guarantees + that a `moveq' will be used. + + If X is a `const_double', by returning `NO_REGS' you can force X into a + memory constant. This is useful on certain machines where immediate + floating values cannot be loaded into certain kinds of registers. */ +#define PREFERRED_RELOAD_CLASS(X, CLASS) CLASS + +/* A C expression for the maximum number of consecutive registers of + class CLASS needed to hold a value of mode MODE. + + This is closely related to the macro `HARD_REGNO_NREGS'. In fact, the value + of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be the maximum value of + `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO values in the class CLASS. + + This macro helps control the handling of multiple-word values in + the reload pass. */ +#define CLASS_MAX_NREGS(CLASS, MODE) HARD_REGNO_NREGS (0, MODE) + +/* A C expression for the number of consecutive hard registers, starting at + register number REGNO, required to hold a value of mode MODE. */ + +#define HARD_REGNO_NREGS(REGNO, MODE) \ + ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) + +/* A C expression which is nonzero if register number NUM is suitable for use + as a base register in operand addresses. It may be either a suitable hard + register or a pseudo register that has been allocated such a hard register. */ +#define REGNO_OK_FOR_BASE_P(NUM) 1 + +/* A C expression which is nonzero if register number NUM is suitable for use + as an index register in operand addresses. It may be either a suitable hard + register or a pseudo register that has been allocated such a hard register. + + The difference between an index register and a base register is that the + index register may be scaled. If an address involves the sum of two + registers, neither one of them scaled, then either one may be labeled the + "base" and the other the "index"; but whichever labeling is used must fit + the machine's constraints of which registers may serve in each capacity. + The compiler will try both labelings, looking for one that is valid, and + will reload one or both registers only if neither labeling works. */ +#define REGNO_OK_FOR_INDEX_P(NUM) 1 + +/* A C expression that is nonzero if REGNO is the number of a hard register in + which the values of called function may come back. */ +#define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == RETURN_VALUE_REGNUM) + +/* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for + use as an index register. + + The difference between an index register and a base register is that the + index register may be scaled. If an address involves the sum of two + registers, neither one of them scaled, then either one may be labeled the + "base" and the other the "index"; but whichever labeling is used must fit + the machine's constraints of which registers may serve in each capacity. + The compiler will try both labelings, looking for one that is valid, and + will reload one or both registers only if neither labeling works. */ +#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X) +// LLVM LOCAL end - TCE target Added: llvm-gcc-4.2/trunk/gcc/config/tce/tce.md URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/tce/tce.md?rev=71655&view=auto ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/tce/tce.md (added) +++ llvm-gcc-4.2/trunk/gcc/config/tce/tce.md Wed May 13 08:10:04 2009 @@ -0,0 +1,14 @@ +;; LLVM LOCAL begin - TCE target +(define_insn "jump" + [(set (pc) (label_ref (match_operand 0 "" "")))] + "" + "*" +) + +;; Indirect jump through a register +(define_insn "indirect_jump" + [(set (pc) (match_operand:SI 0 "" "r"))] + "GET_CODE (operands[0]) != MEM || GET_CODE (XEXP (operands[0], 0)) != PLUS" + "" +) +;; LLVM LOCAL end - TCE target From baldrick at free.fr Wed May 13 08:11:20 2009 From: baldrick at free.fr (Duncan Sands) Date: Wed, 13 May 2009 15:11:20 +0200 Subject: [llvm-commits] [PATCH] Added TCE target to llvm-gcc In-Reply-To: <4A0A87B7.7000703@tut.fi> References: <49CB688D.8070606@tut.fi> <83AF3DAA-E4AC-4BDA-8B2F-2BBF5C6336E0@apple.com> <4A0A87B7.7000703@tut.fi> Message-ID: <200905131511.21432.baldrick@free.fr> > I attached updated patch with LLVM LOCAL markers. Applied, thanks! Ciao, Duncan. From baldrick at free.fr Wed May 13 08:13:20 2009 From: baldrick at free.fr (Duncan Sands) Date: Wed, 13 May 2009 13:13:20 -0000 Subject: [llvm-commits] [llvm] r71656 - in /llvm/trunk: autoconf/configure.ac configure Message-ID: <200905131313.n4DDDLPM025365@zion.cs.uiuc.edu> Author: baldrick Date: Wed May 13 08:13:18 2009 New Revision: 71656 URL: http://llvm.org/viewvc/llvm-project?rev=71656&view=rev Log: Fix typo. Modified: llvm/trunk/autoconf/configure.ac llvm/trunk/configure Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=71656&r1=71655&r2=71656&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Wed May 13 08:13:18 2009 @@ -495,7 +495,7 @@ dnl Specify extra build options AC_ARG_WITH(extra-options, AS_HELP_STRING([--with-extra-options], - [Specify addtional options to compile LLVM with]),, + [Specify additional options to compile LLVM with]),, withval=default) case "$withval" in default) EXTRA_OPTIONS= ;; Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=71656&r1=71655&r2=71656&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Wed May 13 08:13:18 2009 @@ -1569,7 +1569,7 @@ searches PATH) --with-llvmgxx Specify location of llvm-g++ driver (default searches PATH) - --with-extra-options Specify addtional options to compile LLVM with + --with-extra-options Specify additional options to compile LLVM with --with-ocaml-libdir Specify install location for ocaml bindings (default is stdlib) --with-binutils-include Specify path to binutils/include/ containing From andrewl at lenharth.org Wed May 13 09:02:00 2009 From: andrewl at lenharth.org (Andrew Lenharth) Date: Wed, 13 May 2009 09:02:00 -0500 Subject: [llvm-commits] RFC: initial union syntax support In-Reply-To: <636C07B5-EF49-45E8-BECA-D3F46AB5D70E@apple.com> References: <85dfcd7f0905121101y62ac0c4esd27a518adbabd3b9@mail.gmail.com> <85dfcd7f0905121456x5570de7dg3dfc35cde861ce1f@mail.gmail.com> <85dfcd7f0905121600w439bab62ncd3d7db1284749a7@mail.gmail.com> <636C07B5-EF49-45E8-BECA-D3F46AB5D70E@apple.com> Message-ID: <85dfcd7f0905130702maaf1079v96dd52b7cd9b211a@mail.gmail.com> On Wed, May 13, 2009 at 12:57 AM, Chris Lattner wrote: > > On May 12, 2009, at 4:00 PM, Andrew Lenharth wrote: > >> Updated patch. ?Supports C, Cpp, and all (?) native codegen. ?BasicAA >> updated to be conservative (but not completely enough yet). >> >> Making unions a type of struct makes most code just work as most code >> uses getOffset variants since structs can already have zero width >> elements. > > Hi Andrew, > > What problem does this solve? Being able to write target independent frontends with union support. {int, union {...} } becomes a nice tagged union without having to try to figure out the largest object or the most restricted alignment (necessary if using bitcasts). More generally, there is no way to write target independent unions right now. (size_t problem). Cleaning up the mess of casts that is the current llvm-gcc output for unions (where possible). This might have a code size reduction (larger types and one more GEP constant instead of casts) (or increase), I haven't tackled the llvm-gcc portion as the union handling was more than I wanted to figure out yesterday. Andrew > > -Chris > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From sanjiv.gupta at microchip.com Wed May 13 10:13:29 2009 From: sanjiv.gupta at microchip.com (Sanjiv Gupta) Date: Wed, 13 May 2009 15:13:29 -0000 Subject: [llvm-commits] [llvm] r71661 - in /llvm/trunk/lib/Target/PIC16: PIC16AsmPrinter.cpp PIC16AsmPrinter.h PIC16TargetAsmInfo.cpp PIC16TargetAsmInfo.h Message-ID: <200905131513.n4DFDblv031043@zion.cs.uiuc.edu> Author: sgupta Date: Wed May 13 10:13:17 2009 New Revision: 71661 URL: http://llvm.org/viewvc/llvm-project?rev=71661&view=rev Log: Run through the list of globals once and sectionize all types of globlas includeing declarations. Later emit them from their section lists. Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h 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=71661&r1=71660&r2=71661&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.cpp Wed May 13 10:13:17 2009 @@ -133,7 +133,7 @@ // If its a libcall name, record it to decls section. if (PAN::getSymbolTag(Sname) == PAN::LIBCALL) { - Decls.push_back(Sname); + LibcallDecls.push_back(Sname); } O << Sname; @@ -153,16 +153,16 @@ O << PIC16CondCodeToString((PIC16CC::CondCodes)CC); } -void PIC16AsmPrinter::printDecls(void) { +void PIC16AsmPrinter::printLibcallDecls(void) { // If no libcalls used, return. - if (Decls.empty()) return; + if (LibcallDecls.empty()) return; O << TAI->getCommentString() << "External decls for libcalls - BEGIN." <<"\n"; // Remove duplicate entries. - Decls.sort(); - Decls.unique(); - for (std::list::const_iterator I = Decls.begin(); - I != Decls.end(); I++) { + LibcallDecls.sort(); + LibcallDecls.unique(); + for (std::list::const_iterator I = LibcallDecls.begin(); + I != LibcallDecls.end(); I++) { O << TAI->getExternDirective() << *I << "\n"; O << TAI->getExternDirective() << PAN::getArgsLabel(*I) << "\n"; O << TAI->getExternDirective() << PAN::getRetvalLabel(*I) << "\n"; @@ -188,17 +188,22 @@ I->setSection(TAI->SectionForGlobal(I)->getName()); } - EmitExternsAndGlobals (M); + EmitFunctionDecls(M); + EmitUndefinedVars(M); + EmitDefinedVars(M); EmitIData(M); EmitUData(M); - EmitAutos(M); EmitRomData(M); + EmitAutos(M); return Result; } -void PIC16AsmPrinter::EmitExternsAndGlobals (Module &M) { +// Emit extern decls for functions imported from other modules, and emit +// global declarations for function defined in this module and which are +// available to other modules. +void PIC16AsmPrinter::EmitFunctionDecls (Module &M) { // Emit declarations for external functions. - O << TAI->getCommentString() << "External defs and decls - BEGIN." <<"\n"; + O << TAI->getCommentString() << "Function Declarations - BEGIN." <<"\n"; for (Module::iterator I = M.begin(), E = M.end(); I != E; I++) { std::string Name = Mang->getValueName(I); if (Name.compare("@abort") == 0) @@ -219,33 +224,38 @@ O << directive << PAN::getArgsLabel(Name) << "\n"; } - // Emit header file to include declaration of library functions - // FIXME: find out libcall names. - // O << "\t#include C16IntrinsicCalls.INC\n"; - - // Emit declarations for external variable declarations and definitions. - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; I++) { - // Any variables reaching here with ".auto." in its name is a local scope - // variable and should not be printed in global data section. - std::string Name = Mang->getValueName(I); - if (PAN::isLocalName(Name)) - continue; + O << TAI->getCommentString() << "Function Declarations - END." <<"\n"; +} - if (!(I->isDeclaration() || I->hasExternalLinkage() || - I->hasCommonLinkage())) - continue; +// Emit variables imported from other Modules. +void PIC16AsmPrinter::EmitUndefinedVars (Module &M) +{ + std::vector Items = PTAI->ExternalVarDecls->Items; + if (! Items.size()) return; - const char *directive = I->isDeclaration() ? TAI->getExternDirective() : - TAI->getGlobalDirective(); - O << directive << Name << "\n"; + O << "\n" << TAI->getCommentString() << "Imported Variables - BEGIN" << "\n"; + for (unsigned j = 0; j < Items.size(); j++) { + O << TAI->getExternDirective() << Mang->getValueName(Items[j]) << "\n"; + } + O << TAI->getCommentString() << "Imported Variables - END" << "\n"; +} + +// Emit variables defined in this module and are available to other modules. +void PIC16AsmPrinter::EmitDefinedVars (Module &M) +{ + std::vector Items = PTAI->ExternalVarDefs->Items; + if (! Items.size()) return; + + O << "\n" << TAI->getCommentString() << "Exported Variables - BEGIN" << "\n"; + for (unsigned j = 0; j < Items.size(); j++) { + O << TAI->getGlobalDirective() << Mang->getValueName(Items[j]) << "\n"; } - O << TAI->getCommentString() << "External defs and decls - END." <<"\n"; + O << TAI->getCommentString() << "Exported Variables - END" << "\n"; } +// Emit initialized data placed in ROM. void PIC16AsmPrinter::EmitRomData (Module &M) { - const PIC16TargetAsmInfo *PTAI = static_cast(TAI); std::vector Items = PTAI->ROSection->Items; if (! Items.size()) return; @@ -262,7 +272,7 @@ } bool PIC16AsmPrinter::doFinalization(Module &M) { - printDecls(); + printLibcallDecls(); O << "\t" << "END\n"; bool Result = AsmPrinter::doFinalization(M); return Result; @@ -314,7 +324,6 @@ } void PIC16AsmPrinter::EmitIData (Module &M) { - const PIC16TargetAsmInfo *PTAI = static_cast(TAI); // Print all IDATA sections. std::vector IDATASections = PTAI->IDATASections; @@ -333,7 +342,6 @@ } void PIC16AsmPrinter::EmitUData (Module &M) { - const PIC16TargetAsmInfo *PTAI = static_cast(TAI); const TargetData *TD = TM.getTargetData(); // Print all BSS sections. @@ -358,7 +366,6 @@ { // Section names for all globals are already set. - const PIC16TargetAsmInfo *PTAI = static_cast(TAI); const TargetData *TD = TM.getTargetData(); // Now print all Autos sections. Modified: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h?rev=71661&r1=71660&r2=71661&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h Wed May 13 10:13:17 2009 @@ -17,6 +17,7 @@ #include "PIC16.h" #include "PIC16TargetMachine.h" +#include "PIC16TargetAsmInfo.h" #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/Support/CommandLine.h" #include "llvm/Target/TargetAsmInfo.h" @@ -31,6 +32,7 @@ bool V) : AsmPrinter(O, TM, T, OL, V) { PTLI = TM.getTargetLowering(); + PTAI = static_cast (T); } private : virtual const char *getPassName() const { @@ -42,13 +44,15 @@ void printCCOperand(const MachineInstr *MI, int opNum); bool printInstruction(const MachineInstr *MI); // definition autogenerated. bool printMachineInstruction(const MachineInstr *MI); - void EmitExternsAndGlobals (Module &M); + void EmitFunctionDecls (Module &M); + void EmitUndefinedVars (Module &M); + void EmitDefinedVars (Module &M); void EmitIData (Module &M); void EmitUData (Module &M); void EmitAutos (Module &M); void EmitRomData (Module &M); void emitFunctionData(MachineFunction &MF); - void printDecls(void); + void printLibcallDecls(void); protected: bool doInitialization(Module &M); @@ -56,7 +60,8 @@ private: PIC16TargetLowering *PTLI; - std::list Decls; // List of extern decls. + const PIC16TargetAsmInfo *PTAI; + std::list LibcallDecls; // List of extern decls. }; } // end of namespace Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp?rev=71661&r1=71660&r2=71661&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp Wed May 13 10:13:17 2009 @@ -45,6 +45,8 @@ // in BeginModule, and gpasm cribbs for that .text symbol. TextSection = getUnnamedSection("", SectionFlags::Code); ROSection = new PIC16Section(getReadOnlySection()); + ExternalVarDecls = new PIC16Section(getNamedSection("ExternalVarDecls")); + ExternalVarDefs = new PIC16Section(getNamedSection("ExternalVarDefs")); } const char *PIC16TargetAsmInfo::getRomDirective(unsigned size) const @@ -196,9 +198,18 @@ // We select the section based on the initializer here, so it really // has to be a GlobalVariable. const GlobalVariable *GV = dyn_cast(GV1); - if (!GV1 || ! GV->hasInitializer()) + + if (!GV) return TargetAsmInfo::SelectSectionForGlobal(GV1); + // Record Exteranl Var Decls. + if (GV->isDeclaration()) { + ExternalVarDecls->Items.push_back(GV); + return ExternalVarDecls->S_; + } + + 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. const std::string name = GV->getName(); @@ -206,6 +217,11 @@ return getSectionForAuto(GV); } + // Record Exteranl Var Defs. + if (GV->hasExternalLinkage() || GV->hasCommonLinkage()) { + ExternalVarDefs->Items.push_back(GV); + } + // See if this is an uninitialized global. const Constant *C = GV->getInitializer(); if (C->isNullValue()) @@ -240,4 +256,6 @@ } delete ROSection; + delete ExternalVarDecls; + delete ExternalVarDefs; } Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h?rev=71661&r1=71660&r2=71661&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.h Wed May 13 10:13:17 2009 @@ -45,6 +45,8 @@ mutable std::vector IDATASections; mutable std::vector AutosSections; mutable PIC16Section *ROSection; + mutable PIC16Section *ExternalVarDecls; + mutable PIC16Section *ExternalVarDefs; virtual ~PIC16TargetAsmInfo(); private: @@ -57,6 +59,8 @@ const Section *getIDATASectionForGlobal(const GlobalVariable *GV) const; const Section *getSectionForAuto(const GlobalVariable *GV) const; virtual const Section *SelectSectionForGlobal(const GlobalValue *GV) const; + + public: void SetSectionForGVs(Module &M); std::vector getBSSSections() const { From dalej at apple.com Wed May 13 11:44:49 2009 From: dalej at apple.com (Dale Johannesen) Date: Wed, 13 May 2009 09:44:49 -0700 Subject: [llvm-commits] [llvm] r71612 - in /llvm/trunk: include/llvm/Support/MathExtras.h lib/Target/Alpha/AlphaInstrInfo.td lib/Transforms/Scalar/LoopStrengthReduce.cpp In-Reply-To: <200905130912.17943.baldrick@free.fr> References: <200905130024.n4D0OUQH015653@zion.cs.uiuc.edu> <200905130912.17943.baldrick@free.fr> Message-ID: On May 13, 2009, at 12:12 AMPDT, Duncan Sands wrote: > Hi Dale, > >> +/// abs64 - absolute value of a 64-bit int. Not all environments >> support >> +/// "abs" on whatever their name for the 64-bit int type is. The >> absolute > > on whatever -> or whatever "on" is what I meant, as in "using 'abs' on". From clattner at apple.com Wed May 13 12:21:41 2009 From: clattner at apple.com (Chris Lattner) Date: Wed, 13 May 2009 10:21:41 -0700 Subject: [llvm-commits] [PATCH] Generate info about the JIT process In-Reply-To: <4A0A90FB.3000907@gmail.com> References: <978B1AEF-4B6B-4BA1-A73F-6FEF5C95A12D@fallingsnow.net> <4A0A6C85.1030909@gmail.com> <4A0A90FB.3000907@gmail.com> Message-ID: <0A9506FE-111E-4D3C-BC04-D962645AA1DE@apple.com> On May 13, 2009, at 2:20 AM, Argiris Kirtzidis wrote: >> Thats basically what MachineCodeInfo enables. ATM, there are only 2 >> things it publishes directly to the MCI, but future APIs can easily >> be >> added using virtual methods to allow for subclasses of >> MachineCodeInfo >> to do new things. >> >> This is far from a final set of things MCI will do, it's primarily a >> way of introduce an API that we can add future things to. > > Ok, that sounds great. It's just that MachineCodeInfo is restricted to > the "function level", how about "module level" info, specifically > getting notifications during code execution like: > -"I lazy JITed this function" > -"I allocated this memory chunk for this global variable" > > Of course, MachineCodeInfo could be the one for the "function level" > and > something like "JITListener" at the module level. The JITListener > could > have a method that passes a MachineCodeInfo before function JITing. > IMO > this is flexible and clean. I agree with Argiris: there should be a simple abstract interface with methods like the above. The JIT should have an optional pointer to it. If non-null, it would invoke the methods on the JITListener. This would allow lots of detailed instrumentation, but would introduce no overhead if it's not being used. -Chris From sabre at nondot.org Wed May 13 12:39:34 2009 From: sabre at nondot.org (Chris Lattner) Date: Wed, 13 May 2009 17:39:34 -0000 Subject: [llvm-commits] [llvm] r71676 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/nothrow.ll Message-ID: <200905131740.n4DHe6Ql004209@zion.cs.uiuc.edu> Author: lattner Date: Wed May 13 12:39:14 2009 New Revision: 71676 URL: http://llvm.org/viewvc/llvm-project?rev=71676&view=rev Log: calls in nothrow functions can be marked nothrow even if the callee is not known to be nothrow. This allows readnone/readonly functions to be deleted even if we don't know whether the callee can throw. Added: llvm/trunk/test/Transforms/InstCombine/nothrow.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=71676&r1=71675&r2=71676&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Wed May 13 12:39:14 2009 @@ -9578,6 +9578,16 @@ /// the heavy lifting. /// Instruction *InstCombiner::visitCallInst(CallInst &CI) { + // If the caller function is nounwind, mark the call as nounwind, even if the + // callee isn't. + if (CI.getParent()->getParent()->doesNotThrow() && + !CI.doesNotThrow()) { + CI.setDoesNotThrow(); + return &CI; + } + + + IntrinsicInst *II = dyn_cast(&CI); if (!II) return visitCallSite(&CI); Added: llvm/trunk/test/Transforms/InstCombine/nothrow.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/nothrow.ll?rev=71676&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/nothrow.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/nothrow.ll Wed May 13 12:39:14 2009 @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep call +; rdar://6880732 +declare double @t1(i32) readonly + +define void @t2() nounwind { + call double @t1(i32 42) ;; dead call even though callee is not nothrow. + ret void +} From ojomojo at gmail.com Wed May 13 12:52:16 2009 From: ojomojo at gmail.com (John Mosby) Date: Wed, 13 May 2009 17:52:16 -0000 Subject: [llvm-commits] [llvm] r71678 - in /llvm/trunk/lib/CodeGen: PEI.h PrologEpilogInserter.cpp PrologEpilogInserter.h ShrinkWrapping.cpp Message-ID: <200905131752.n4DHqGXE004678@zion.cs.uiuc.edu> Author: jdm Date: Wed May 13 12:52:11 2009 New Revision: 71678 URL: http://llvm.org/viewvc/llvm-project?rev=71678&view=rev Log: PEI: rename PEI.h to PrologEpilogInserter.h to adhere to file naming standard Added: llvm/trunk/lib/CodeGen/PrologEpilogInserter.h - copied unchanged from r71676, llvm/trunk/lib/CodeGen/PEI.h Removed: llvm/trunk/lib/CodeGen/PEI.h Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp Removed: llvm/trunk/lib/CodeGen/PEI.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PEI.h?rev=71677&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/PEI.h (original) +++ llvm/trunk/lib/CodeGen/PEI.h (removed) @@ -1,167 +0,0 @@ -//===-- PrologEpilogInserter.h - Prolog/Epilog code insertion -*- C++ -* --===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This pass is responsible for finalizing the functions frame layout, saving -// callee saved registers, and for emitting prolog & epilog code for the -// function. -// -// This pass must be run after register allocation. After this pass is -// executed, it is illegal to construct MO_FrameIndex operands. -// -// This pass also implements a shrink wrapping variant of prolog/epilog -// insertion. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_PEI_H -#define LLVM_CODEGEN_PEI_H - -#include "llvm/CodeGen/Passes.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineLoopInfo.h" -#include "llvm/ADT/SparseBitVector.h" -#include "llvm/ADT/DenseMap.h" - -namespace llvm { - class RegScavenger; - class MachineBasicBlock; - - class PEI : public MachineFunctionPass { - public: - static char ID; - PEI() : MachineFunctionPass(&ID) {} - - const char *getPassName() const { - return "Prolog/Epilog Insertion & Frame Finalization"; - } - - virtual void getAnalysisUsage(AnalysisUsage &AU) const; - - /// runOnMachineFunction - Insert prolog/epilog code and replace abstract - /// frame indexes with appropriate references. - /// - bool runOnMachineFunction(MachineFunction &Fn); - - private: - RegScavenger *RS; - - // MinCSFrameIndex, MaxCSFrameIndex - Keeps the range of callee saved - // stack frame indexes. - unsigned MinCSFrameIndex, MaxCSFrameIndex; - - // Analysis info for spill/restore placement. - // "CSR": "callee saved register". - - // CSRegSet contains indices into the Callee Saved Register Info - // vector built by calculateCalleeSavedRegisters() and accessed - // via MF.getFrameInfo()->getCalleeSavedInfo(). - typedef SparseBitVector<> CSRegSet; - - // CSRegBlockMap maps MachineBasicBlocks to sets of callee - // saved register indices. - typedef DenseMap CSRegBlockMap; - - // Set and maps for computing CSR spill/restore placement: - // used in function (UsedCSRegs) - // used in a basic block (CSRUsed) - // anticipatable in a basic block (Antic{In,Out}) - // available in a basic block (Avail{In,Out}) - // to be spilled at the entry to a basic block (CSRSave) - // to be restored at the end of a basic block (CSRRestore) - CSRegSet UsedCSRegs; - CSRegBlockMap CSRUsed; - CSRegBlockMap AnticIn, AnticOut; - CSRegBlockMap AvailIn, AvailOut; - CSRegBlockMap CSRSave; - CSRegBlockMap CSRRestore; - - // Entry and return blocks of the current function. - MachineBasicBlock* EntryBlock; - SmallVector ReturnBlocks; - - // Map of MBBs to top level MachineLoops. - DenseMap TLLoops; - - // Flag to control shrink wrapping per-function: - // may choose to skip shrink wrapping for certain - // functions. - bool ShrinkWrapThisFunction; - -#ifndef NDEBUG - // Machine function handle. - MachineFunction* MF; - - // Flag indicating that the current function - // has at least one "short" path in the machine - // CFG from the entry block to an exit block. - bool HasFastExitPath; -#endif - - bool calculateSets(MachineFunction &Fn); - bool calcAnticInOut(MachineBasicBlock* MBB); - bool calcAvailInOut(MachineBasicBlock* MBB); - void calculateAnticAvail(MachineFunction &Fn); - bool addUsesForMEMERegion(MachineBasicBlock* MBB, - SmallVector& blks); - bool addUsesForTopLevelLoops(SmallVector& blks); - bool calcSpillPlacements(MachineBasicBlock* MBB, - SmallVector &blks, - CSRegBlockMap &prevSpills); - bool calcRestorePlacements(MachineBasicBlock* MBB, - SmallVector &blks, - CSRegBlockMap &prevRestores); - void placeSpillsAndRestores(MachineFunction &Fn); - void placeCSRSpillsAndRestores(MachineFunction &Fn); - void calculateCalleeSavedRegisters(MachineFunction &Fn); - void insertCSRSpillsAndRestores(MachineFunction &Fn); - void calculateFrameObjectOffsets(MachineFunction &Fn); - void replaceFrameIndices(MachineFunction &Fn); - void insertPrologEpilogCode(MachineFunction &Fn); - - // Initialize DFA sets, called before iterations. - void clearAnticAvailSets(); - // Clear all sets constructed by shrink wrapping. - void clearAllSets(); - - // Initialize all shrink wrapping data. - void initShrinkWrappingInfo(); - - // Convienences for dealing with machine loops. - MachineBasicBlock* getTopLevelLoopPreheader(MachineLoop* LP); - MachineLoop* getTopLevelLoopParent(MachineLoop *LP); - - // Propgate CSRs used in MBB to all MBBs of loop LP. - void propagateUsesAroundLoop(MachineBasicBlock* MBB, MachineLoop* LP); - - // Convenience for recognizing return blocks. - bool isReturnBlock(MachineBasicBlock* MBB); - -#ifndef NDEBUG - // Debugging methods. - - // Mark this function as having fast exit paths. - void findFastExitPath(); - - // Verify placement of spills/restores. - void verifySpillRestorePlacement(); - - std::string getBasicBlockName(const MachineBasicBlock* MBB); - std::string stringifyCSRegSet(const CSRegSet& s); - void dumpSet(const CSRegSet& s); - void dumpUsed(MachineBasicBlock* MBB); - void dumpAllUsed(); - void dumpSets(MachineBasicBlock* MBB); - void dumpSets1(MachineBasicBlock* MBB); - void dumpAllSets(); - void dumpSRSets(); -#endif - - }; -} // End llvm namespace -#endif Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=71678&r1=71677&r2=71678&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Wed May 13 12:52:11 2009 @@ -19,7 +19,7 @@ // //===----------------------------------------------------------------------===// -#include "PEI.h" +#include "PrologEpilogInserter.h" #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/MachineInstr.h" Modified: llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp?rev=71678&r1=71677&r2=71678&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp (original) +++ llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp Wed May 13 12:52:11 2009 @@ -34,7 +34,7 @@ #define DEBUG_TYPE "shrink-wrap" -#include "PEI.h" +#include "PrologEpilogInserter.h" #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/MachineInstr.h" From sabre at nondot.org Wed May 13 13:02:21 2009 From: sabre at nondot.org (Chris Lattner) Date: Wed, 13 May 2009 18:02:21 -0000 Subject: [llvm-commits] [llvm] r71680 - /llvm/trunk/docs/GarbageCollection.html Message-ID: <200905131802.n4DI2NrL005216@zion.cs.uiuc.edu> Author: lattner Date: Wed May 13 13:02:09 2009 New Revision: 71680 URL: http://llvm.org/viewvc/llvm-project?rev=71680&view=rev Log: garbage allocation is not a good idea :) Modified: llvm/trunk/docs/GarbageCollection.html Modified: llvm/trunk/docs/GarbageCollection.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GarbageCollection.html?rev=71680&r1=71679&r2=71680&view=diff ============================================================================== --- llvm/trunk/docs/GarbageCollection.html (original) +++ llvm/trunk/docs/GarbageCollection.html Wed May 13 13:02:09 2009 @@ -118,7 +118,7 @@ they can suffer from degraded scalar optimization of the program. In particular, because the runtime must be able to identify and update all pointers active in the program, some optimizations are less effective. In practice, however, the -locality and performance benefits of using aggressive garbage allocation +locality and performance benefits of using aggressive garbage collection techniques dominates any low-level losses.

This document describes the mechanisms and interfaces provided by LLVM to From grosbach at apple.com Wed May 13 13:09:24 2009 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 13 May 2009 11:09:24 -0700 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/ARM/ARMInstrInfo.cpp lib/Target/ARM/ARMInstrInfo.td In-Reply-To: <4958E38B-1013-4FDA-8BA3-A3BDF4767FCA@apple.com> References: <200905122359.n4CNxEQb014794@zion.cs.uiuc.edu> <4958E38B-1013-4FDA-8BA3-A3BDF4767FCA@apple.com> Message-ID: On May 12, 2009, at 11:36 PM, Chris Lattner wrote: > On May 12, 2009, at 4:59 PM, Jim Grosbach wrote: >> URL: http://llvm.org/viewvc/llvm-project?rev=71610&view=rev >> Log: >> Add support for GCC compatible builtin setjmp and longjmp >> intrinsics. This is >> a supporting preliminary patch for GCC-compatible SjLJ exception >> handling. Note that these intrinsics are not designed to be invoked >> directly by the user, but >> rather used by the front-end as target hooks for exception handling. > > All new non-target-specific intrinsics need to be documented in > LangRef. Drat. I knew I'd forget something. Quite right. I'll take care of that. > > How about llvm.save.register.state() and > llvm.restore.register.state(). LangRef should document that these > are compatible with the GCC builtins. Also, you should use > GCCBuiltin<> in the .td file so that these work with the CBE etc. > Please make sure to update 'HasBuiltinSetjmp' and the accessors when > you rename the intrinsic. I didn't put in the GCCBuiltin<> reference because these intrinsics are not exactly equivalent. The intent is to generate code that will interoperate correctly with the GCC versions, but there are differences in the implementation currently. I may be able to reconcile the details, and if so, I'll add in the GCCBuiltin bits. > >> + // HasBuiltinSetjmp - true if the function uses builtin_setjmp. >> Used to >> + // adjust callee-saved register tracking. >> + bool HasBuiltinSetjmp; > ... >> +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue May 12 >> 18:59:14 2009 >> @@ -180,7 +180,7 @@ >> std::vector CSI; >> for (unsigned i = 0; CSRegs[i]; ++i) { >> unsigned Reg = CSRegs[i]; >> - if (Fn.getRegInfo().isPhysRegUsed(Reg)) { >> + if (Fn.getRegInfo().isPhysRegUsed(Reg) || >> Fn.doesHaveBuiltinSetjmp()) { > > This is unfortunate, why does PEI need to know about this? > Shouldn't the 'Int_builtin_setjmp' use and def all these registers? > It's the PEI that does the actual save/restore of the registers. The intrinsic just tells the function that it's necessary. This allows the actual jump buffer for the intrinsics to be very small (five words) since the majority of the context save is on the stack, not in the jump buffer. Callee-saved register values be preserved across function calls, and inside our function, any values which are live at the time need to be preserved across the setjmp() call itself. For the former, the compiler already handles the requisite dirty work in the epilogue and prologue code generation for any callee saved registers potentially clobbered by the function. When a function contains a builtin setjmp, we mark the function and consider all callee-saved registers to be used in prologue/epiloge generation. For the latter, we want to ensure that all values we care about are not stored in registers across the setjmp, so the target implementation of the intrinsic should mark it as defining all relevant registers (via Defs = ...). > >> +let Properties = [IntrNoMem] in { >> +def int_builtinsetjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; >> +def int_builtinlongjmp : Intrinsic<[llvm_void_ty], [llvm_ptr_ty, >> llvm_i32_ty]>; > > If there is no reason to have both arguments, please drop the extra > one. > I'm not sure I follow. builtinsetjmp takes a single argument, and builtinlongjmp takes two. All arguments will be used. >> // >> = >> = >> = >> ----------------------------------------------------------------------= >> ==// >> +// SJLJ Exception handling intrinsics >> +// setjmp() is a three instruction sequence to store the return >> address > > This is *not* setjmp and longjmp. Please be very precise here. > Yep. I'll clean that up. Thanks for the feedback! -Jim From gohman at apple.com Wed May 13 13:11:36 2009 From: gohman at apple.com (Dan Gohman) Date: Wed, 13 May 2009 11:11:36 -0700 Subject: [llvm-commits] [llvm] r71535 - in /llvm/trunk: include/llvm/Analysis/ lib/Analysis/ lib/Target/ lib/Transforms/Scalar/ test/CodeGen/X86/ test/Transforms/IndVarSimplify/ test/Transforms/LoopStrengthReduce/ In-Reply-To: <200905121105.54778.baldrick@free.fr> References: <200905120217.n4C2HFP0014960@zion.cs.uiuc.edu> <200905121105.54778.baldrick@free.fr> Message-ID: <45174253-187E-4319-81F1-897B7A1B4625@apple.com> On May 12, 2009, at 2:05 AM, Duncan Sands wrote: > Hi Dan, thank you for doing this! > >> Now that IndVarSimplify is being more aggressive, it occasionally >> runs >> into the problem where ScalarEvolutionExpander's code for avoiding >> duplicate expansions makes it difficult to ensure that all expanded >> instructions dominate all the instructions that will use them. As a >> temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs >> function >> to fix up instructions inserted by SCEVExpander. Fortunately, this >> code >> is contained, and can be easily removed once a more comprehensive >> solution is available. > > Unfortunately this causes several Ada testsuite failures. I've > attached > a reduced testcase (all the failures seem be to for the same reason). > > $ opt -indvars c35503g.bc -disable-output > opt: llvm/include/llvm/ADT/ilist.h:197: typename > bidirectional_iterator::reference > llvm::ilist_iterator::operator*() const [with NodeTy = > llvm::Instruction]: Assertion `Traits::getNext(NodePtr) != 0 && > "Dereferencing end()!"' failed. > 0 opt 0x08448bc8 > Stack dump: > 0. Running pass 'Function Pass Manager' on module 'c35503g.bc'. > 1. Running pass 'Loop Pass Manager' on function '@_ada_c35503g' > 2. Running pass 'Canonicalize Induction Variables' on basic block > '%bb123' > Hi Duncan, This testcase exposes a mistaken assumption in my patch, that terminators never have users. I'm working on a fix for this, but it may be a few days before it's ready. If these failures are causing trouble for you, feel free to revert the patch, or possibly just the IndVarSimplify.cpp portion of the patch. Dan From kremenek at apple.com Wed May 13 13:16:50 2009 From: kremenek at apple.com (Ted Kremenek) Date: Wed, 13 May 2009 18:16:50 -0000 Subject: [llvm-commits] [llvm] r71686 - /llvm/tags/checker/checker-0.204/ Message-ID: <200905131816.n4DIGohn005819@zion.cs.uiuc.edu> Author: kremenek Date: Wed May 13 13:16:48 2009 New Revision: 71686 URL: http://llvm.org/viewvc/llvm-project?rev=71686&view=rev Log: Tagging checker-0.204. Added: llvm/tags/checker/checker-0.204/ - copied from r71685, llvm/trunk/ From clattner at apple.com Wed May 13 13:21:17 2009 From: clattner at apple.com (Chris Lattner) Date: Wed, 13 May 2009 11:21:17 -0700 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/ARM/ARMInstrInfo.cpp lib/Target/ARM/ARMInstrInfo.td In-Reply-To: References: <200905122359.n4CNxEQb014794@zion.cs.uiuc.edu> <4958E38B-1013-4FDA-8BA3-A3BDF4767FCA@apple.com> Message-ID: On May 13, 2009, at 11:09 AM, Jim Grosbach wrote: >> How about llvm.save.register.state() and >> llvm.restore.register.state(). LangRef should document that these >> are compatible with the GCC builtins. Also, you should use >> GCCBuiltin<> in the .td file so that these work with the CBE etc. >> Please make sure to update 'HasBuiltinSetjmp' and the accessors >> when you rename the intrinsic. > > I didn't put in the GCCBuiltin<> reference because these intrinsics > are not exactly equivalent. The intent is to generate code that will > interoperate correctly with the GCC versions, but there are > differences in the implementation currently. I may be able to > reconcile the details, and if so, I'll add in the GCCBuiltin bits. Ok. >>> +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue May 12 >>> 18:59:14 2009 >>> @@ -180,7 +180,7 @@ >>> std::vector CSI; >>> for (unsigned i = 0; CSRegs[i]; ++i) { >>> unsigned Reg = CSRegs[i]; >>> - if (Fn.getRegInfo().isPhysRegUsed(Reg)) { >>> + if (Fn.getRegInfo().isPhysRegUsed(Reg) || >>> Fn.doesHaveBuiltinSetjmp()) { >> >> This is unfortunate, why does PEI need to know about this? >> Shouldn't the 'Int_builtin_setjmp' use and def all these registers? >> > > It's the PEI that does the actual save/restore of the registers. The > intrinsic just tells the function that it's necessary. This allows > the actual jump buffer for the intrinsics to be very small (five > words) since the majority of the context save is on the stack, not > in the jump buffer. Ok, that makes sense. I'm not arguing about the generated code, I'd just like to get rid of the doesHaveBuiltinSetjmp() bool and special case in PEI. > Callee-saved register values be preserved across function calls, and > inside our function, any values which are live at the time need to > be preserved across the setjmp() call itself. For the former, the > compiler already handles the requisite dirty work in the epilogue > and prologue code generation for any callee saved registers > potentially clobbered by the function. When a function contains a > builtin setjmp, we mark the function and consider all callee-saved > registers to be used in prologue/epiloge generation. For the latter, > we want to ensure that all values we care about are not stored in > registers across the setjmp, so the target implementation of the > intrinsic should mark it as defining all relevant registers (via > Defs = ...). Ok, I understand how this works with your patch, but I still don't understand why it is needed. Doesn't the machine instr that you insert end up using or def'ing these registers? If so, isn't that already sufficient to get PEI to do the right thing without the bool? >>> +let Properties = [IntrNoMem] in { >>> +def int_builtinsetjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; >>> +def int_builtinlongjmp : Intrinsic<[llvm_void_ty], [llvm_ptr_ty, >>> llvm_i32_ty]>; >> >> If there is no reason to have both arguments, please drop the extra >> one. >> > I'm not sure I follow. builtinsetjmp takes a single argument, and > builtinlongjmp takes two. All arguments will be used. Ok. -Chris From grosbach at apple.com Wed May 13 13:24:27 2009 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 13 May 2009 11:24:27 -0700 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/ARM/ARMInstrInfo.cpp lib/Target/ARM/ARMInstrInfo.td In-Reply-To: <200905130926.59798.baldrick@free.fr> References: <200905122359.n4CNxEQb014794@zion.cs.uiuc.edu> <200905130926.59798.baldrick@free.fr> Message-ID: <62E6EB3F-D847-4DF7-A472-DF25F25BCA4C@apple.com> On May 13, 2009, at 12:26 AM, Duncan Sands wrote: > Hi Jim, > >> +let Properties = [IntrNoMem] in { > > doesn't this mean that all builtinlongjmp intrinsics will be > deleted (since they have no return value, their result is never > used) and likewise for every builtinsetjmp if the result is unused? > I suppose this may not matter if they are only being generated by > the backend, but it seems philosophically very wrong. Agreed. This is something I want to get straightened out to be more accurate. Regardless if whether it will cause incorrectness, it's important that the definitions match what's actually going on as much as possible. > > >> +def int_builtinsetjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; >> +def int_builtinlongjmp : Intrinsic<[llvm_void_ty], [llvm_ptr_ty, >> llvm_i32_ty]>; > > How about using GCCBuiltin to have these be automagically mapped to > the GCC intrinsics > by the CBE? Did my response to Chris' email cover your question? Happy to elaborate if not. Thanks! -Jim From dalej at apple.com Wed May 13 13:25:25 2009 From: dalej at apple.com (Dale Johannesen) Date: Wed, 13 May 2009 18:25:25 -0000 Subject: [llvm-commits] [llvm] r71688 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Message-ID: <200905131825.n4DIPRbH006226@zion.cs.uiuc.edu> Author: johannes Date: Wed May 13 13:25:07 2009 New Revision: 71688 URL: http://llvm.org/viewvc/llvm-project?rev=71688&view=rev Log: Don't generate a select whose operand is load of a weak external. These may have address 0 and are not safe to execute unconditionally. Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=71688&r1=71687&r2=71688&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Wed May 13 13:25:07 2009 @@ -18,6 +18,7 @@ #include "llvm/IntrinsicInst.h" #include "llvm/Type.h" #include "llvm/DerivedTypes.h" +#include "llvm/GlobalVariable.h" #include "llvm/Support/CFG.h" #include "llvm/Support/Debug.h" #include "llvm/Analysis/ConstantFolding.h" @@ -393,6 +394,11 @@ if (!isa(I->getOperand(0)) && !isa(I->getOperand(0))) return false; + // External weak globals may have address 0, so we can't load them. + if (GlobalVariable* GV= dyn_cast(I->getOperand(0))) { + if (GV->hasExternalWeakLinkage()) + return false; + } // Finally, we have to check to make sure there are no instructions // before the load in its basic block, as we are going to hoist the loop From mrs at apple.com Wed May 13 13:27:54 2009 From: mrs at apple.com (Mike Stump) Date: Wed, 13 May 2009 11:27:54 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r71287 - in /llvm-gcc-4.2/trunk: build_gcc gcc/ChangeLog.apple gcc/config/arm/arm.c gcc/cp/mangle.c gcc/objc/ChangeLog.apple gcc/objc/objc-act.c gcc/testsuite/ChangeLog.apple gcc/testsuite/g++.apple/anon-1.C gcc/testsuite/gcc.apple/weak.c gcc/testsuite/objc.dg/property-16.m gcc/tree-eh.c gcc/version.c In-Reply-To: <200905110918.32499.baldrick@free.fr> References: <200905082316.n48NGDbU031470@zion.cs.uiuc.edu> <200905090837.04512.baldrick@free.fr> <200905110918.32499.baldrick@free.fr> Message-ID: <529A0CB1-82A6-4E83-8750-751BBE1B669B@apple.com> On May 11, 2009, at 12:18 AM, Duncan Sands wrote: > isn't that exactly what ExternalWeakLinkage is about? A variable that > ends up with WeakLinkage in LLVM is always defined. I think you didn't catch my example in my previous email where I detailed how I think the above isn't true. I think this gap comes from trying to treat defined at static link time the same as defined at runtime; they are different concepts and you have to treat them differently. Now, I must admit, I didn't run the testcase I'm thinking about though the system to see if it behaves as I expected, but I think I have it right. From clattner at apple.com Wed May 13 13:29:38 2009 From: clattner at apple.com (Chris Lattner) Date: Wed, 13 May 2009 11:29:38 -0700 Subject: [llvm-commits] [llvm] r71688 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp In-Reply-To: <200905131825.n4DIPRbH006226@zion.cs.uiuc.edu> References: <200905131825.n4DIPRbH006226@zion.cs.uiuc.edu> Message-ID: <6901145B-4DAC-4D8F-89A5-3FE7EC9AE938@apple.com> On May 13, 2009, at 11:25 AM, Dale Johannesen wrote: > Author: johannes > Date: Wed May 13 13:25:07 2009 > New Revision: 71688 > > URL: http://llvm.org/viewvc/llvm-project?rev=71688&view=rev > Log: > Don't generate a select whose operand is load of a weak > external. These may have address 0 and are not safe > to execute unconditionally. Hi Dale, Thanks for working on this, but I don't think that this is sufficient: it will fail for getelementptr constant exprs of a weak global. I think this should probably use something like isSafeToLoadUnconditionally in instcombine. Maybe that function should move to transforms/utils. Also, testcase? :) -Chris > > > > Modified: > llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp > > Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=71688&r1=71687&r2=71688&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original) > +++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Wed May 13 > 13:25:07 2009 > @@ -18,6 +18,7 @@ > #include "llvm/IntrinsicInst.h" > #include "llvm/Type.h" > #include "llvm/DerivedTypes.h" > +#include "llvm/GlobalVariable.h" > #include "llvm/Support/CFG.h" > #include "llvm/Support/Debug.h" > #include "llvm/Analysis/ConstantFolding.h" > @@ -393,6 +394,11 @@ > if (!isa(I->getOperand(0)) && > !isa(I->getOperand(0))) > return false; > + // External weak globals may have address 0, so we can't > load them. > + if (GlobalVariable* GV= dyn_cast(I- > >getOperand(0))) { > + if (GV->hasExternalWeakLinkage()) > + return false; > + } > > // Finally, we have to check to make sure there are no > instructions > // before the load in its basic block, as we are going to > hoist the loop > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From grosbach at apple.com Wed May 13 13:33:10 2009 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 13 May 2009 11:33:10 -0700 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/ARM/ARMInstrInfo.cpp lib/Target/ARM/ARMInstrInfo.td In-Reply-To: References: <200905122359.n4CNxEQb014794@zion.cs.uiuc.edu> <4958E38B-1013-4FDA-8BA3-A3BDF4767FCA@apple.com> Message-ID: On May 13, 2009, at 11:21 AM, Chris Lattner wrote: > On May 13, 2009, at 11:09 AM, Jim Grosbach wrote: >>> How about llvm.save.register.state() and >>> llvm.restore.register.state(). LangRef should document that these >>> are compatible with the GCC builtins. Also, you should use >>> GCCBuiltin<> in the .td file so that these work with the CBE etc. >>> Please make sure to update 'HasBuiltinSetjmp' and the accessors >>> when you rename the intrinsic. >> >> I didn't put in the GCCBuiltin<> reference because these intrinsics >> are not exactly equivalent. The intent is to generate code that >> will interoperate correctly with the GCC versions, but there are >> differences in the implementation currently. I may be able to >> reconcile the details, and if so, I'll add in the GCCBuiltin bits. > > Ok. > >>>> +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue May 12 >>>> 18:59:14 2009 >>>> @@ -180,7 +180,7 @@ >>>> std::vector CSI; >>>> for (unsigned i = 0; CSRegs[i]; ++i) { >>>> unsigned Reg = CSRegs[i]; >>>> - if (Fn.getRegInfo().isPhysRegUsed(Reg)) { >>>> + if (Fn.getRegInfo().isPhysRegUsed(Reg) || >>>> Fn.doesHaveBuiltinSetjmp()) { >>> >>> This is unfortunate, why does PEI need to know about this? >>> Shouldn't the 'Int_builtin_setjmp' use and def all these registers? >>> >> >> It's the PEI that does the actual save/restore of the registers. >> The intrinsic just tells the function that it's necessary. This >> allows the actual jump buffer for the intrinsics to be very small >> (five words) since the majority of the context save is on the >> stack, not in the jump buffer. > > Ok, that makes sense. I'm not arguing about the generated code, I'd > just like to get rid of the doesHaveBuiltinSetjmp() bool and special > case in PEI. > >> Callee-saved register values be preserved across function calls, >> and inside our function, any values which are live at the time need >> to be preserved across the setjmp() call itself. For the former, >> the compiler already handles the requisite dirty work in the >> epilogue and prologue code generation for any callee saved >> registers potentially clobbered by the function. When a function >> contains a builtin setjmp, we mark the function and consider all >> callee-saved registers to be used in prologue/epiloge generation. >> For the latter, we want to ensure that all values we care about are >> not stored in registers across the setjmp, so the target >> implementation of the intrinsic should mark it as defining all >> relevant registers (via Defs = ...). > > Ok, I understand how this works with your patch, but I still don't > understand why it is needed. Doesn't the machine instr that you > insert end up using or def'ing these registers? If so, isn't that > already sufficient to get PEI to do the right thing without the bool? Ah, gotcha. I understand better what you're asking now. Sorry for the confusion. Hmmm... I didn't see that happening when I was working through those bits before; however, I may not have had everything hooked up right yet at the time. I agree it would be far, far preferable to not need the "magic save everything" flag on the function. I'll play around with this some more and see what I can do. Thanks again. -Jim > > >>>> +let Properties = [IntrNoMem] in { >>>> +def int_builtinsetjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; >>>> +def int_builtinlongjmp : Intrinsic<[llvm_void_ty], [llvm_ptr_ty, >>>> llvm_i32_ty]>; >>> >>> If there is no reason to have both arguments, please drop the >>> extra one. >>> >> I'm not sure I follow. builtinsetjmp takes a single argument, and >> builtinlongjmp takes two. All arguments will be used. > > Ok. > > -Chris From dalej at apple.com Wed May 13 13:33:35 2009 From: dalej at apple.com (Dale Johannesen) Date: Wed, 13 May 2009 18:33:35 -0000 Subject: [llvm-commits] [llvm] r71691 - /llvm/trunk/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll Message-ID: <200905131833.n4DIXZiM006587@zion.cs.uiuc.edu> Author: johannes Date: Wed May 13 13:33:24 2009 New Revision: 71691 URL: http://llvm.org/viewvc/llvm-project?rev=71691&view=rev Log: Testcase for 71688. Added: llvm/trunk/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll Added: llvm/trunk/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll?rev=71691&view=auto ============================================================================== --- llvm/trunk/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll (added) +++ llvm/trunk/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll Wed May 13 13:33:24 2009 @@ -0,0 +1,47 @@ +; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep select +; ModuleID = '' +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" +target triple = "i386-apple-darwin10.0" +module asm ".globl _foo" +module asm "_foo: ret" +module asm ".globl _i" +module asm ".set _i, 0" + at i = extern_weak global i32 ; [#uses=2] + at j = common global i32 0 ; [#uses=1] + at ed = common global double 0.000000e+00, align 8 ; [#uses=1] + +define i32 @main() nounwind ssp { +entry: + br label %bb4 + +bb: ; preds = %bb4 + br i1 icmp ne (i32* @i, i32* null), label %bb1, label %bb2 + +bb1: ; preds = %bb + %0 = load i32* @i, align 4 ; [#uses=1] + br label %bb3 + +bb2: ; preds = %bb + br label %bb3 + +bb3: ; preds = %bb2, %bb1 + %storemerge = phi i32 [ %0, %bb1 ], [ 0, %bb2 ] ; [#uses=2] + store i32 %storemerge, i32* @j + %1 = sitofp i32 %storemerge to double ; [#uses=1] + %2 = call double @sin(double %1) nounwind readonly ; [#uses=1] + %3 = add double %2, %d.0 ; [#uses=1] + %4 = add i32 %l.0, 1 ; [#uses=1] + br label %bb4 + +bb4: ; preds = %bb3, %entry + %d.0 = phi double [ undef, %entry ], [ %3, %bb3 ] ; [#uses=2] + %l.0 = phi i32 [ 0, %entry ], [ %4, %bb3 ] ; [#uses=2] + %5 = icmp sgt i32 %l.0, 99 ; [#uses=1] + br i1 %5, label %bb5, label %bb + +bb5: ; preds = %bb4 + store double %d.0, double* @ed, align 8 + ret i32 0 +} + +declare double @sin(double) nounwind readonly From mrs at apple.com Wed May 13 13:52:25 2009 From: mrs at apple.com (Mike Stump) Date: Wed, 13 May 2009 11:52:25 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r71287 - in /llvm-gcc-4.2/trunk: build_gcc gcc/ChangeLog.apple gcc/config/arm/arm.c gcc/cp/mangle.c gcc/objc/ChangeLog.apple gcc/objc/objc-act.c gcc/testsuite/ChangeLog.apple gcc/testsuite/g++.apple/anon-1.C gcc/testsuite/gcc.apple/weak.c gcc/testsuite/objc.dg/property-16.m gcc/tree-eh.c gcc/version.c In-Reply-To: References: <200905082316.n48NGDbU031470@zion.cs.uiuc.edu> <200905090837.04512.baldrick@free.fr> Message-ID: On May 10, 2009, at 11:58 PM, Mike Stump wrote: > I don't know why that would be the case. Also, chosen for symmetry > with the case just before it. I don't see why one can't have a weak > definition that winds up not being used that turns out to be not > defined as runtime, thus, being 0. Anything prevent that case? Ah, curiouser and curiouser... I talked with my expert, and at least on darwin, things conspire so that only weak references can be 0. If it were just weak, it would wind up having a real address. The case I was thinking about can't happen as the weak definition would be retained and used, thus preventing the address from being 0. From dalej at apple.com Wed May 13 14:03:24 2009 From: dalej at apple.com (Dale Johannesen) Date: Wed, 13 May 2009 12:03:24 -0700 Subject: [llvm-commits] [llvm] r71688 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp In-Reply-To: <6901145B-4DAC-4D8F-89A5-3FE7EC9AE938@apple.com> References: <200905131825.n4DIPRbH006226@zion.cs.uiuc.edu> <6901145B-4DAC-4D8F-89A5-3FE7EC9AE938@apple.com> Message-ID: <29A05EE6-A231-4F9D-BB98-243D3FD66F80@apple.com> On May 13, 2009, at 11:29 AMPDT, Chris Lattner wrote: > > On May 13, 2009, at 11:25 AM, Dale Johannesen wrote: > >> Author: johannes >> Date: Wed May 13 13:25:07 2009 >> New Revision: 71688 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=71688&view=rev >> Log: >> Don't generate a select whose operand is load of a weak >> external. These may have address 0 and are not safe >> to execute unconditionally. > > Hi Dale, > > Thanks for working on this, but I don't think that this is > sufficient: it will fail for getelementptr constant exprs of a weak > global. I think this should probably use something like > isSafeToLoadUnconditionally in instcombine. Maybe that function > should move to transforms/utils. The previous test >> if (!isa(I->getOperand(0)) && >> !isa(I->getOperand(0))) >> return false; will reject GEP's won't it? > Also, testcase? :) Done. > -Chris > >> >> >> >> Modified: >> llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp >> >> Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=71688&r1=71687&r2=71688&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original) >> +++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Wed May 13 >> 13:25:07 2009 >> @@ -18,6 +18,7 @@ >> #include "llvm/IntrinsicInst.h" >> #include "llvm/Type.h" >> #include "llvm/DerivedTypes.h" >> +#include "llvm/GlobalVariable.h" >> #include "llvm/Support/CFG.h" >> #include "llvm/Support/Debug.h" >> #include "llvm/Analysis/ConstantFolding.h" >> @@ -393,6 +394,11 @@ >> if (!isa(I->getOperand(0)) && >> !isa(I->getOperand(0))) >> return false; >> + // External weak globals may have address 0, so we can't >> load them. >> + if (GlobalVariable* GV= dyn_cast(I- >> >getOperand(0))) { >> + if (GV->hasExternalWeakLinkage()) >> + return false; >> + } >> >> // Finally, we have to check to make sure there are no >> instructions >> // before the load in its basic block, as we are going to >> hoist the loop >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From baldrick at free.fr Wed May 13 14:19:50 2009 From: baldrick at free.fr (Duncan Sands) Date: Wed, 13 May 2009 21:19:50 +0200 Subject: [llvm-commits] [llvm] r71535 - in /llvm/trunk: include/llvm/Analysis/ lib/Analysis/ lib/Target/ lib/Transforms/Scalar/ test/CodeGen/X86/ test/Transforms/IndVarSimplify/ test/Transforms/LoopStrengthReduce/ In-Reply-To: <45174253-187E-4319-81F1-897B7A1B4625@apple.com> References: <200905120217.n4C2HFP0014960@zion.cs.uiuc.edu> <200905121105.54778.baldrick@free.fr> <45174253-187E-4319-81F1-897B7A1B4625@apple.com> Message-ID: <200905132119.51342.baldrick@free.fr> Hi Dan, > This testcase exposes a mistaken assumption in my patch, that > terminators never have users. the Ada testsuite does love to do exception handling in loops... > I'm working on a fix for this, but it may be a few > days > before it's ready. If these failures are causing trouble for you, feel > free to revert the patch, or possibly just the IndVarSimplify.cpp > portion > of the patch. It's not a problem for the moment. Thanks for looking into it! Ciao, Duncan. From baldrick at free.fr Wed May 13 14:23:58 2009 From: baldrick at free.fr (Duncan Sands) Date: Wed, 13 May 2009 21:23:58 +0200 Subject: [llvm-commits] =?iso-8859-1?q?=5Bllvm-gcc-4=2E2=5D_r71287_-_in_/l?= =?iso-8859-1?q?lvm-gcc-4=2E2/trunk=3A_build=5Fgcc_gcc/ChangeLog=2Eapple?= =?iso-8859-1?q?=09gcc/config/arm/arm=2Ec=09gcc/cp/mangle=2Ec_gcc/objc/Cha?= =?iso-8859-1?q?ngeLog=2Eapple=09gcc/objc/objc-act=2Ec=09gcc/testsuite/Cha?= =?iso-8859-1?q?ngeLog=2Eapple_gcc/testsuite/g++=2Eapple/anon-1=2EC=09gcc/?= =?iso-8859-1?q?testsuite/gcc=2Eapple/weak=2Ec_gcc/testsuite/objc=2Edg/pro?= =?iso-8859-1?q?perty-16=2Em_gcc/tree-eh=2Ec_gcc/version=2Ec?= In-Reply-To: References: <200905082316.n48NGDbU031470@zion.cs.uiuc.edu> Message-ID: <200905132123.58725.baldrick@free.fr> Hi Mike, > > I don't know why that would be the case. Also, chosen for symmetry > > with the case just before it. I don't see why one can't have a weak > > definition that winds up not being used that turns out to be not > > defined as runtime, thus, being 0. Anything prevent that case? > > Ah, curiouser and curiouser... I talked with my expert, and at least > on darwin, things conspire so that only weak references can be 0. If > it were just weak, it would wind up having a real address. The case I > was thinking about can't happen as the weak definition would be > retained and used, thus preventing the address from being 0. that's how it is modeled in LLVM at least: WeakLinkage => address will never be 0, ExternalWeakLinkage -> address may be 0. Ciao, Duncan. From kremenek at apple.com Wed May 13 14:27:53 2009 From: kremenek at apple.com (Ted Kremenek) Date: Wed, 13 May 2009 19:27:53 -0000 Subject: [llvm-commits] [llvm] r71702 - /llvm/tags/checker/checker-0.204/ Message-ID: <200905131927.n4DJRrNq008710@zion.cs.uiuc.edu> Author: kremenek Date: Wed May 13 14:27:47 2009 New Revision: 71702 URL: http://llvm.org/viewvc/llvm-project?rev=71702&view=rev Log: Removing checker-0.204. Removed: llvm/tags/checker/checker-0.204/ From kremenek at apple.com Wed May 13 14:28:38 2009 From: kremenek at apple.com (Ted Kremenek) Date: Wed, 13 May 2009 19:28:38 -0000 Subject: [llvm-commits] [llvm] r71704 - /llvm/tags/checker/checker-0.204/ Message-ID: <200905131928.n4DJSdvt008751@zion.cs.uiuc.edu> Author: kremenek Date: Wed May 13 14:28:33 2009 New Revision: 71704 URL: http://llvm.org/viewvc/llvm-project?rev=71704&view=rev Log: Tagging checker-0.204. Added: llvm/tags/checker/checker-0.204/ - copied from r71703, llvm/trunk/ From eli.friedman at gmail.com Wed May 13 15:12:00 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 13 May 2009 13:12:00 -0700 Subject: [llvm-commits] [llvm] r71610 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h include/llvm/Intrinsics.td lib/CodeGen/MachineFunction.cpp lib/CodeGen/PrologEpilogInserter.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/ARM/AR Message-ID: On Wed, May 13, 2009 at 11:09 AM, Jim Grosbach wrote: >>> +let Properties = [IntrNoMem] in { >>> +def int_builtinsetjmp ?: Intrinsic<[llvm_i32_ty], ?[llvm_ptr_ty]>; >>> +def int_builtinlongjmp : Intrinsic<[llvm_void_ty], [llvm_ptr_ty, >>> llvm_i32_ty]>; >> >> If there is no reason to have both arguments, please drop the extra >> one. >> > > I'm not sure I follow. builtinsetjmp takes a single argument, and > builtinlongjmp takes two. All arguments will be used. How exactly will the second argument to builtinlongjmp be used? gcc requires that the second argument to __builtin_longjmp is a constant 1. -Eli From eli.friedman at gmail.com Wed May 13 15:15:21 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 13 May 2009 13:15:21 -0700 Subject: [llvm-commits] [llvm] r71688 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp In-Reply-To: <29A05EE6-A231-4F9D-BB98-243D3FD66F80@apple.com> References: <200905131825.n4DIPRbH006226@zion.cs.uiuc.edu> <6901145B-4DAC-4D8F-89A5-3FE7EC9AE938@apple.com> <29A05EE6-A231-4F9D-BB98-243D3FD66F80@apple.com> Message-ID: On Wed, May 13, 2009 at 12:03 PM, Dale Johannesen wrote: > The previous test > >>> ? ? ? ?if (!isa(I->getOperand(0)) && >>> ? ? ? ? ? ?!isa(I->getOperand(0))) >>> ? ? ? ? ?return false; > > will reject GEP's won't it? It will reject GEP instructions, but not GEP constant expressions. -Eli From dalej at apple.com Wed May 13 15:18:31 2009 From: dalej at apple.com (Dale Johannesen) Date: Wed, 13 May 2009 13:18:31 -0700 Subject: [llvm-commits] [llvm] r71688 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp In-Reply-To: References: <200905131825.n4DIPRbH006226@zion.cs.uiuc.edu> <6901145B-4DAC-4D8F-89A5-3FE7EC9AE938@apple.com> <29A05EE6-A231-4F9D-BB98-243D3FD66F80@apple.com> Message-ID: <16F70B66-0E72-4BD5-927C-36D6E6A6DAF0@apple.com> On May 13, 2009, at 1:15 PMPDT, Eli Friedman wrote: > On Wed, May 13, 2009 at 12:03 PM, Dale Johannesen > wrote: >> The previous test >> >>>> if (!isa(I->getOperand(0)) && >>>> !isa(I->getOperand(0))) >>>> return false; >> >> will reject GEP's won't it? > > It will reject GEP instructions, but not GEP constant expressions. Right, a couple people have explained that. However, the case we want to look for is a weak external, which is undefined and therefore cannot be initialized. I think constant expressions can only arise from initializers? From eli.friedman at gmail.com Wed May 13 15:24:26 2009 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 13 May 2009 13:24:26 -0700 Subject: [llvm-commits] [llvm] r71688 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp In-Reply-To: <16F70B66-0E72-4BD5-927C-36D6E6A6DAF0@apple.com> References: <200905131825.n4DIPRbH006226@zion.cs.uiuc.edu> <6901145B-4DAC-4D8F-89A5-3FE7EC9AE938@apple.com> <29A05EE6-A231-4F9D-BB98-243D3FD66F80@apple.com> <16F70B66-0E72-4BD5-927C-36D6E6A6DAF0@apple.com> Message-ID: On Wed, May 13, 2009 at 1:18 PM, Dale Johannesen wrote: > > On May 13, 2009, at 1:15 PMPDT, Eli Friedman wrote: > >> On Wed, May 13, 2009 at 12:03 PM, Dale Johannesen >> wrote: >>> The previous test >>> >>>>> ? ? ? ?if (!isa(I->getOperand(0)) && >>>>> ? ? ? ? ? ?!isa(I->getOperand(0))) >>>>> ? ? ? ? ?return false; >>> >>> will reject GEP's won't it? >> >> It will reject GEP instructions, but not GEP constant expressions. > > Right, a couple people have explained that. ?However, the case we want > to look for is a weak external, which is undefined and therefore > cannot be initialized. ?I think constant expressions can only arise > from initializers? Wrong; for example, take a testcase like the following: __attribute((weak)) extern int x[2]; int a() { return x[0]; } -Eli From dalej at apple.com Wed May 13 15:27:15 2009 From: dalej at apple.com (Dale Johannesen) Date: Wed, 13 May 2009 13:27:15 -0700 Subject: [llvm-commits] [llvm] r71688 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp In-Reply-To: References: <200905131825.n4DIPRbH006226@zion.cs.uiuc.edu> <6901145B-4DAC-4D8F-89A5-3FE7EC9AE938@apple.com> <29A05EE6-A231-4F9D-BB98-243D3FD66F80@apple.com> <16F70B66-0E72-4BD5-927C-36D6E6A6DAF0@apple.com> Message-ID: <5E7B9B84-A73D-4C5B-9F03-B651B0631592@apple.com> On May 13, 2009, at 1:24 PMPDT, Eli Friedman wrote: > On Wed, May 13, 2009 at 1:18 PM, Dale Johannesen > wrote: >> >> On May 13, 2009, at 1:15 PMPDT, Eli Friedman wrote: >> >>> On Wed, May 13, 2009 at 12:03 PM, Dale Johannesen >>> wrote: >>>> The previous test >>>> >>>>>> if (!isa(I->getOperand(0)) && >>>>>> !isa(I->getOperand(0))) >>>>>> return false; >>>> >>>> will reject GEP's won't it? >>> >>> It will reject GEP instructions, but not GEP constant expressions. >> >> Right, a couple people have explained that. However, the case we >> want >> to look for is a weak external, which is undefined and therefore >> cannot be initialized. I think constant expressions can only arise >> from initializers? > > Wrong; for example, take a testcase like the following: > __attribute((weak)) extern int x[2]; > int a() { return x[0]; } Yeah. From isanbard at gmail.com Wed May 13 15:33:38 2009 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 13 May 2009 20:33:38 -0000 Subject: [llvm-commits] [llvm] r71714 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfWriter.cpp test/DebugInfo/2009-05-13-VariableScope.ll Message-ID: <200905132033.n4DKXekW011071@zion.cs.uiuc.edu> Author: void Date: Wed May 13 15:33:33 2009 New Revision: 71714 URL: http://llvm.org/viewvc/llvm-project?rev=71714&view=rev Log: Move the bookkeeping of the debug scopes back to the place where it belonged. The variable declaration stuff wasn't happy with it where it was. Sorry that the testcase is so big. Bugpoint wasn't able to reduce it successfully. Added: llvm/trunk/test/DebugInfo/2009-05-13-VariableScope.ll Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=71714&r1=71713&r2=71714&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Wed May 13 15:33:33 2009 @@ -1286,9 +1286,9 @@ /// DbgScopeMap - Tracks the scopes in the current function. DenseMap DbgScopeMap; - /// DbgConcreteScopeMap - Tracks inlined scopes in the current function. + /// DbgInlinedScopeMap - Tracks inlined scopes in the current function. DenseMap > DbgConcreteScopeMap; + SmallVector > DbgInlinedScopeMap; /// InlineInfo - Keep track of inlined functions and their location. This /// information is used to populate debug_inlined section. @@ -3434,7 +3434,7 @@ if (FunctionDbgScope) { delete FunctionDbgScope; DbgScopeMap.clear(); - DbgConcreteScopeMap.clear(); + DbgInlinedScopeMap.clear(); InlinedVariableScopes.clear(); FunctionDbgScope = NULL; LexicalScopeStack.clear(); @@ -3619,6 +3619,15 @@ // could be more elegant. AddUInt(SPDie, DW_AT_inline, 0, DW_INL_declared_not_inlined); + // Keep track of the scope that's inlined into this function. + DenseMap >::iterator + SI = DbgInlinedScopeMap.find(GV); + + if (SI == DbgInlinedScopeMap.end()) + DbgInlinedScopeMap[GV].push_back(Scope); + else + SI->second.push_back(Scope); + AbstractInstanceRootMap[GV] = Scope; AbstractInstanceRootList.push_back(Scope); } @@ -3641,15 +3650,6 @@ LexicalScopeStack.back()->AddConcreteInst(ConcreteScope); - // Keep track of the scope that's inlined into this function. - DenseMap >::iterator - SI = DbgConcreteScopeMap.find(GV); - - if (SI == DbgConcreteScopeMap.end()) - DbgConcreteScopeMap[GV].push_back(ConcreteScope); - else - SI->second.push_back(ConcreteScope); - // Track the start label for this inlined function. DenseMap >::iterator I = InlineInfo.find(GV); @@ -3674,19 +3674,19 @@ DebugTimer->startTimer(); GlobalVariable *GV = SP.getGV(); - DenseMap >::iterator - I = DbgConcreteScopeMap.find(GV); + DenseMap >::iterator + I = DbgInlinedScopeMap.find(GV); - if (I == DbgConcreteScopeMap.end()) { + if (I == DbgInlinedScopeMap.end()) { if (TimePassesIsEnabled) DebugTimer->stopTimer(); return 0; } - SmallVector &Scopes = I->second; + SmallVector &Scopes = I->second; assert(!Scopes.empty() && "We should have at least one debug scope!"); - DbgConcreteScope *Scope = Scopes.back(); Scopes.pop_back(); + DbgScope *Scope = Scopes.back(); Scopes.pop_back(); unsigned ID = MMI->NextLabelID(); MMI->RecordUsedDbgLabel(ID); Scope->setEndLabelID(ID); @@ -3714,9 +3714,9 @@ return; } - DenseMap >::iterator - I = DbgConcreteScopeMap.find(SP.getGV()); - if (I != DbgConcreteScopeMap.end()) + DenseMap >::iterator + I = DbgInlinedScopeMap.find(SP.getGV()); + if (I != DbgInlinedScopeMap.end()) InlinedVariableScopes[DeclareMI] = I->second.back(); if (TimePassesIsEnabled) Added: llvm/trunk/test/DebugInfo/2009-05-13-VariableScope.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/2009-05-13-VariableScope.ll?rev=71714&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/2009-05-13-VariableScope.ll (added) +++ llvm/trunk/test/DebugInfo/2009-05-13-VariableScope.ll Wed May 13 15:33:33 2009 @@ -0,0 +1,3256 @@ +; RUN: llvm-as < %s | llc -O0 + +module asm "\09.lazy_reference .objc_class_name_NSTextFieldCell" +module asm "\09.objc_class_name_DVIconAndTextCell=0" +module asm "\09.globl .objc_class_name_DVIconAndTextCell" +module asm "" +module asm "" + type { i32, [2 x %struct._objc_ivar] } ; type %0 + type { i8*, i32, [23 x %struct._objc_method] } ; type %1 + type { i32, %struct.objc_selector*, i16, i16, [1 x i8*] } ; type %2 + type opaque ; type %3 + type opaque ; type %4 + type opaque ; type %5 + type opaque ; type %6 + type opaque ; type %7 + type opaque ; type %8 + type opaque ; type %9 + %llvm.dbg.anchor.type = type { i32, i32 } + %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 } + %llvm.dbg.variable.type = type { i32, { }*, i8*, { }*, i32, { }* } + %struct.CGPoint = type <{ double, double }> + %struct.CGRect = type <{ %struct.CGPoint, %struct.CGPoint }> + %struct.CGSize = type <{ double, double }> + %struct.NSConstantString = type <{ i32*, i32, i8*, i32 }> + %struct._NSZone = type opaque + %struct._objc_cache = type opaque + %struct._objc_category = type { i8*, i8*, %struct._objc_method_list*, %struct._objc_method_list*, %struct._objc_protocol_list*, i32, %struct._prop_list_t* } + %struct._objc_class = type { %struct._objc_class*, %struct._objc_class*, i8*, i32, i32, i32, %struct._objc_ivar_list*, %struct._objc_method_list*, %struct._objc_cache*, %struct._objc_protocol_list*, i8*, %struct._objc_class_extension* } + %struct._objc_class_extension = type { i32, i8*, %struct._prop_list_t* } + %struct._objc_exception_data = type { [18 x i32], [4 x i8*] } + %struct._objc_ivar = type { i8*, i8*, i32 } + %struct._objc_ivar_list = type opaque + %struct._objc_method = type { %struct.objc_selector*, i8*, i8* } + %struct._objc_method_description = type { %struct.objc_selector*, i8* } + %struct._objc_method_description_list = type { i32, [0 x %struct._objc_method_description] } + %struct._objc_method_list = type opaque + %struct._objc_module = type { i32, i32, i8*, %struct._objc_symtab* } + %struct._objc_protocol = type { %struct._objc_protocol_extension*, i8*, %struct._objc_protocol_list*, %struct._objc_method_description_list*, %struct._objc_method_description_list* } + %struct._objc_protocol_extension = type { i32, %struct._objc_method_description_list*, %struct._objc_method_description_list*, %struct._prop_list_t* } + %struct._objc_protocol_list = type { %struct._objc_protocol_list*, i32, [0 x %struct._objc_protocol] } + %struct._objc_super = type <{ %struct.objc_object*, %struct.objc_class* }> + %struct._objc_symtab = type { i32, %struct.objc_selector*, i16, i16, [0 x i8*] } + %struct._prop_list_t = type { i32, i32, [0 x %struct._prop_t] } + %struct._prop_t = type { i8*, i8* } + %struct.objc_class = type opaque + %struct.objc_object = type <{ %struct.objc_class* }> + %struct.objc_selector = type opaque +@"\01L_OBJC_IMAGE_INFO" = internal constant [2 x i32] [i32 0, i32 16], section "__OBJC, __image_info,regular" ; <[2 x i32]*> [#uses=1] + at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] + at .str = internal constant [20 x i8] c"DVIconAndTextCell.m\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] + at .str1 = internal constant [103 x i8] c"/Volumes/Data/ddunbar/private/GarnetXcodeIDE/XcodeIDE/Frameworks/DocSetManagementViewing/DocSetViewing\00", section "llvm.metadata" ; <[103 x i8]*> [#uses=1] + at .str2 = internal constant [10 x i8] c"clang 1.0\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([20 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([103 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str3 = internal constant [7 x i8] c"objc.h\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at .str4 = internal constant [18 x i8] c"/usr/include/objc\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.compile_unit5 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([7 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str4, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str6 = internal constant [12 x i8] c"objc_object\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at .str7 = internal constant [11 x i8] c"objc_class\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.composite8 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str7, i32 0, i32 0), { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite8 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str9 = internal constant [6 x i8] c"Class\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype10 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str9, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to { }*), i32 35, 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 .str11 = internal constant [4 x i8] c"isa\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] + at llvm.dbg.derivedtype12 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str11, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to { }*), i32 37, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype10 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype12 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] + at llvm.dbg.composite13 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str6, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to { }*), i32 36, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype14 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite13 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str15 = internal constant [3 x i8] c"id\00", section "llvm.metadata" ; <[3 x i8]*> [#uses=1] + at llvm.dbg.derivedtype16 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([3 x i8]* @.str15, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to { }*), i32 38, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype14 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] + at .str17 = internal constant [36 x i8] c"\01-[DVIconAndTextCell initTextCell:]\00", section "llvm.metadata" ; <[36 x i8]*> [#uses=1] + at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([36 x i8]* @.str17, i32 0, i32 0), i8* getelementptr ([36 x i8]* @.str17, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 15, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str18 = internal constant [10 x i8] c"\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at .str19 = internal constant [22 x i8] c"/Volumes/Sandbox/llvm\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] + at llvm.dbg.compile_unit20 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([10 x i8]* @.str18, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str19, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str21 = internal constant [20 x i8] c"DVIconAndTextCell.h\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] + at llvm.dbg.compile_unit22 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([20 x i8]* @.str21, i32 0, i32 0), i8* getelementptr ([103 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str23 = internal constant [18 x i8] c"DVIconAndTextCell\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at .str24 = internal constant [18 x i8] c"NSTextFieldCell.h\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at .str25 = internal constant [52 x i8] c"/System/Library/Frameworks/AppKit.framework/Headers\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] + at llvm.dbg.compile_unit26 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([18 x i8]* @.str24, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str27 = internal constant [16 x i8] c"NSTextFieldCell\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at .str29 = internal constant [15 x i8] c"NSActionCell.h\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.compile_unit30 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([15 x i8]* @.str29, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str31 = internal constant [13 x i8] c"NSActionCell\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at .str33 = internal constant [9 x i8] c"NSCell.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.compile_unit34 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([9 x i8]* @.str33, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str35 = internal constant [7 x i8] c"NSCell\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at .str37 = internal constant [11 x i8] c"NSObject.h\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at .str38 = internal constant [56 x i8] c"/System/Library/Frameworks/Foundation.framework/Headers\00", section "llvm.metadata" ; <[56 x i8]*> [#uses=1] + at llvm.dbg.compile_unit39 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([11 x i8]* @.str37, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str40 = internal constant [9 x i8] c"NSObject\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype42 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([4 x i8]* @.str11, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit39 to { }*), i32 66, i64 32, i64 32, i64 0, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype10 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array43 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype42 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] + at llvm.dbg.composite44 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str40, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit39 to { }*), i32 65, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array43 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype45 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str46 = internal constant [10 x i8] c"_contents\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype47 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str46, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 168, i64 32, i64 32, i64 32, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str48 = internal constant [9 x i8] c"__CFlags\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at .str50 = internal constant [13 x i8] c"unsigned int\00", section "llvm.metadata" ; <[13 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_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str50, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 7 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] + at .str51 = internal constant [6 x i8] c"state\00", section "llvm.metadata" ; <[6 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_unit20 to { }*), i8* getelementptr ([6 x i8]* @.str51, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 112, i64 1, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str53 = internal constant [12 x i8] c"highlighted\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype54 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([12 x i8]* @.str53, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 113, i64 1, i64 32, i64 1, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str55 = internal constant [9 x i8] c"disabled\00", section "llvm.metadata" ; <[9 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_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str55, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 114, i64 1, i64 32, i64 2, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str57 = internal constant [9 x i8] c"editable\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype58 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str57, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 115, i64 1, i64 32, i64 3, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str59 = internal constant [14 x i8] c"unsigned long\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.basictype60 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str59, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 7 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] + at .str61 = internal constant [16 x i8] c"NSObjCRuntime.h\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.compile_unit62 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([16 x i8]* @.str61, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str63 = internal constant [11 x i8] c"NSUInteger\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype64 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str63, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit62 to { }*), i32 161, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype60 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str65 = internal constant [11 x i8] c"NSCellType\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype66 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str65, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 31, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype64 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str67 = internal constant [5 x i8] c"type\00", section "llvm.metadata" ; <[5 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_unit20 to { }*), i8* getelementptr ([5 x i8]* @.str67, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 116, i64 2, i64 32, i64 4, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype66 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str69 = internal constant [10 x i8] c"vCentered\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype70 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str69, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 117, i64 1, i64 32, i64 6, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str71 = internal constant [10 x i8] c"hCentered\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype72 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str71, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 118, i64 1, i64 32, i64 7, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str73 = internal constant [9 x i8] c"bordered\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype74 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str73, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 119, i64 1, i64 32, i64 8, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str75 = internal constant [8 x i8] c"bezeled\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype76 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str75, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 120, i64 1, i64 32, i64 9, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str77 = internal constant [11 x i8] c"selectable\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype78 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str77, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 121, i64 1, i64 32, i64 10, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str79 = internal constant [11 x i8] c"scrollable\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype80 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str79, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 122, i64 1, i64 32, i64 11, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str81 = internal constant [11 x i8] c"continuous\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype82 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str81, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 123, i64 1, i64 32, i64 12, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str83 = internal constant [15 x i8] c"actOnMouseDown\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype84 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([15 x i8]* @.str83, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 124, i64 1, i64 32, i64 13, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str85 = internal constant [7 x i8] c"isLeaf\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype86 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str85, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 125, i64 1, i64 32, i64 14, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str87 = internal constant [19 x i8] c"invalidObjectValue\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.derivedtype88 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([19 x i8]* @.str87, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 126, i64 1, i64 32, i64 15, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str89 = internal constant [12 x i8] c"invalidFont\00", section "llvm.metadata" ; <[12 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_unit20 to { }*), i8* getelementptr ([12 x i8]* @.str89, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 127, i64 1, i64 32, i64 16, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str91 = internal constant [19 x i8] c"NSParagraphStyle.h\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.compile_unit92 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([19 x i8]* @.str91, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str93 = internal constant [16 x i8] c"NSLineBreakMode\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype94 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str93, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit92 to { }*), i32 28, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype64 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str95 = internal constant [14 x i8] c"lineBreakMode\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype96 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str95, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 128, i64 3, i64 32, i64 17, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype94 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str97 = internal constant [14 x i8] c"cellReserved1\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype98 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str97, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 129, i64 2, i64 32, i64 20, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str99 = internal constant [15 x i8] c"singleLineMode\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype100 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([15 x i8]* @.str99, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 130, i64 1, i64 32, i64 22, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str101 = internal constant [18 x i8] c"actOnMouseDragged\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.derivedtype102 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([18 x i8]* @.str101, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 131, i64 1, i64 32, i64 23, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str103 = internal constant [9 x i8] c"isLoaded\00", section "llvm.metadata" ; <[9 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_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str103, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 132, i64 1, i64 32, i64 24, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str105 = internal constant [17 x i8] c"truncateLastLine\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype106 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str105, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 133, i64 1, i64 32, i64 25, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str107 = internal constant [17 x i8] c"dontActOnMouseUp\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype108 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str107, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 134, i64 1, i64 32, i64 26, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str109 = internal constant [8 x i8] c"isWhite\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype110 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str109, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 135, i64 1, i64 32, i64 27, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str111 = internal constant [21 x i8] c"useUserKeyEquivalent\00", section "llvm.metadata" ; <[21 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_unit20 to { }*), i8* getelementptr ([21 x i8]* @.str111, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 136, i64 1, i64 32, i64 28, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str113 = internal constant [20 x i8] c"showsFirstResponder\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] + at llvm.dbg.derivedtype114 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([20 x i8]* @.str113, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 137, i64 1, i64 32, i64 29, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str115 = internal constant [14 x i8] c"focusRingType\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype116 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str115, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 138, i64 2, i64 32, i64 30, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str117 = internal constant [14 x i8] c"wasSelectable\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype118 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str117, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 139, i64 1, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str119 = internal constant [17 x i8] c"hasInvalidObject\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype120 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str119, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 140, i64 1, i64 32, i64 33, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str121 = internal constant [28 x i8] c"allowsEditingTextAttributes\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] + at llvm.dbg.derivedtype122 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([28 x i8]* @.str121, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 141, i64 1, i64 32, i64 34, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str123 = internal constant [16 x i8] c"importsGraphics\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype124 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str123, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 142, i64 1, i64 32, i64 35, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str125 = internal constant [9 x i8] c"NSText.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.compile_unit126 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([9 x i8]* @.str125, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str127 = internal constant [16 x i8] c"NSTextAlignment\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype128 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str127, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit126 to { }*), i32 36, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype64 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str129 = internal constant [10 x i8] c"alignment\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype130 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str129, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 143, i64 3, i64 32, i64 36, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype128 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str131 = internal constant [19 x i8] c"layoutDirectionRTL\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.derivedtype132 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([19 x i8]* @.str131, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 144, i64 1, i64 32, i64 39, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str133 = internal constant [16 x i8] c"backgroundStyle\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype134 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str133, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 145, i64 3, i64 32, i64 40, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str135 = internal constant [14 x i8] c"cellReserved2\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype136 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str135, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 146, i64 4, i64 32, i64 43, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str137 = internal constant [22 x i8] c"refusesFirstResponder\00", section "llvm.metadata" ; <[22 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_unit20 to { }*), i8* getelementptr ([22 x i8]* @.str137, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 147, i64 1, i64 32, i64 47, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str139 = internal constant [21 x i8] c"needsHighlightedText\00", section "llvm.metadata" ; <[21 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_unit20 to { }*), i8* getelementptr ([21 x i8]* @.str139, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 148, i64 1, i64 32, i64 48, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str141 = internal constant [15 x i8] c"dontAllowsUndo\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype142 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([15 x i8]* @.str141, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 149, i64 1, i64 32, i64 49, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str143 = internal constant [17 x i8] c"currentlyEditing\00", section "llvm.metadata" ; <[17 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_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str143, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 150, i64 1, i64 32, i64 50, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str145 = internal constant [17 x i8] c"allowsMixedState\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype146 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str145, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 151, i64 1, i64 32, i64 51, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str147 = internal constant [13 x i8] c"inMixedState\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype148 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str147, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 152, i64 1, i64 32, i64 52, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str149 = internal constant [24 x i8] c"sendsActionOnEndEditing\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] + at llvm.dbg.derivedtype150 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([24 x i8]* @.str149, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 153, i64 1, i64 32, i64 53, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str151 = internal constant [13 x i8] c"inSendAction\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype152 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str151, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 154, i64 1, i64 32, i64 54, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str153 = internal constant [11 x i8] c"menuWasSet\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype154 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str153, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 155, i64 1, i64 32, i64 55, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str155 = internal constant [12 x i8] c"controlTint\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype156 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([12 x i8]* @.str155, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 156, i64 3, i64 32, i64 56, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str157 = internal constant [12 x i8] c"controlSize\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype158 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([12 x i8]* @.str157, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 157, i64 2, i64 32, i64 59, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str159 = internal constant [20 x i8] c"branchImageDisabled\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] + at llvm.dbg.derivedtype160 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([20 x i8]* @.str159, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 158, i64 1, i64 32, i64 61, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str161 = internal constant [20 x i8] c"drawingInRevealover\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] + at llvm.dbg.derivedtype162 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([20 x i8]* @.str161, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 159, i64 1, i64 32, i64 62, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str163 = internal constant [25 x i8] c"needsHighlightedTextHint\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] + at llvm.dbg.derivedtype164 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([25 x i8]* @.str163, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 160, i64 1, i64 32, i64 63, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array165 = internal constant [49 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype52 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype54 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype56 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype58 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype68 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype70 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype72 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype74 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype76 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype78 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype82 to { }*), { }* bitcast (%llvm.dbg.! derivedtype.type* @llvm.dbg.derivedtype84 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype86 to { }*), { }* 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.derivedtype96 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype98 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype100 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype102 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype104 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype106 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype108 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype110 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype112 to { }*), { }* bitcast (%ll! vm.dbg.derivedtype.type* @llvm.dbg.derivedtype114 to { }*), { ! }* bitca st (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype116 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype118 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype120 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype122 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype124 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype130 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype132 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype134 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype136 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype138 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype140 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype142 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype144 to { }*)! , { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype146 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype148 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype150 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype152 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype154 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype156 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype158 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype160 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype162 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype164 to { }*)], section "llvm.metadata" ; <[49 x { }*]*> [#uses=1] + at llvm.dbg.composite166 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str48, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 111, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([49 x { }*]* @llvm.dbg.array165 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str167 = internal constant [8 x i8] c"_CFlags\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype168 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str167, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 161, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite166 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str169 = internal constant [8 x i8] c"_cFlags\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype170 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str169, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 169, i64 64, i64 32, i64 64, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype168 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str171 = internal constant [9 x i8] c"_support\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype172 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str171, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 173, i64 32, i64 32, i64 128, i32 1, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array173 = internal constant [4 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype45 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype47 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype170 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype172 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] + at llvm.dbg.composite174 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str35, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 165, i64 160, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array173 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype175 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite174 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str176 = internal constant [5 x i8] c"long\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.basictype177 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([5 x i8]* @.str176, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] + at .str178 = internal constant [10 x i8] c"NSInteger\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype179 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str178, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit62 to { }*), i32 160, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype177 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str180 = internal constant [5 x i8] c"_tag\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.derivedtype181 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([5 x i8]* @.str180, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 13, i64 32, i64 32, i64 160, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype179 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str182 = internal constant [8 x i8] c"_target\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype183 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str182, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 14, i64 32, i64 32, i64 192, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str184 = internal constant [14 x i8] c"objc_selector\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.composite185 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str184, i32 0, i32 0), { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype186 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite185 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str187 = internal constant [4 x i8] c"SEL\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] + at llvm.dbg.derivedtype188 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([4 x i8]* @.str187, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to { }*), i32 41, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype186 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str189 = internal constant [8 x i8] c"_action\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype190 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str189, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 15, i64 32, i64 32, i64 224, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str191 = internal constant [13 x i8] c"_controlView\00", section "llvm.metadata" ; <[13 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_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str191, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 16, i64 32, i64 32, i64 256, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array193 = internal constant [5 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype175 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype181 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype183 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype190 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype192 to { }*)], section "llvm.metadata" ; <[5 x { }*]*> [#uses=1] + at llvm.dbg.composite194 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str31, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 10, i64 288, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([5 x { }*]* @llvm.dbg.array193 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype195 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite194 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str196 = internal constant [10 x i8] c"NSColor.h\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.compile_unit197 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([10 x i8]* @.str196, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str198 = internal constant [8 x i8] c"NSColor\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype200 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array201 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype200 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] + at llvm.dbg.composite202 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str198, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit197 to { }*), i32 43, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array201 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype203 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite202 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str204 = internal constant [17 x i8] c"_backgroundColor\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype205 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str204, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 22, i64 32, i64 32, i64 288, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype203 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str206 = internal constant [11 x i8] c"_textColor\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype207 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str206, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 23, i64 32, i64 32, i64 320, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype203 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str208 = internal constant [10 x i8] c"__tfFlags\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at .str210 = internal constant [16 x i8] c"drawsBackground\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype211 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str210, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 25, i64 1, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str212 = internal constant [11 x i8] c"bezelStyle\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype213 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str212, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 26, i64 3, i64 32, i64 1, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str214 = internal constant [17 x i8] c"thcSortDirection\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype215 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str214, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 27, i64 2, i64 32, i64 4, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str216 = internal constant [16 x i8] c"thcSortPriority\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype217 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str216, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 28, i64 4, i64 32, i64 6, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str218 = internal constant [5 x i8] c"mini\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.derivedtype219 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([5 x i8]* @.str218, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 29, i64 1, i64 32, i64 10, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str220 = internal constant [34 x i8] c"textColorIgnoresNormalDisableFlag\00", section "llvm.metadata" ; <[34 x i8]*> [#uses=1] + at llvm.dbg.derivedtype221 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([34 x i8]* @.str220, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 30, i64 1, i64 32, i64 11, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str222 = internal constant [21 x i8] c"textColorDisableFlag\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] + at llvm.dbg.derivedtype223 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([21 x i8]* @.str222, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 31, i64 1, i64 32, i64 12, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str224 = internal constant [25 x i8] c"thcForceHighlightForSort\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] + at llvm.dbg.derivedtype225 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([25 x i8]* @.str224, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 32, i64 1, i64 32, i64 13, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str226 = internal constant [17 x i8] c"invalidTextColor\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype227 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str226, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 33, i64 1, i64 32, i64 14, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str228 = internal constant [26 x i8] c"notificationForMarkedText\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] + at llvm.dbg.derivedtype229 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([26 x i8]* @.str228, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 34, i64 1, i64 32, i64 15, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str230 = internal constant [22 x i8] c"reservedTextFieldCell\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] + at llvm.dbg.derivedtype231 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([22 x i8]* @.str230, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 35, i64 16, i64 32, i64 16, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array232 = internal constant [11 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype211 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype213 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype215 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype217 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype219 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype221 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype223 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype225 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype227 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype229 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype231 to { }*)], section "llvm.metadata" ; <[11 x { }*]*> [#uses=1] + at llvm.dbg.composite233 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str208, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 24, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([11 x { }*]* @llvm.dbg.array232 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str234 = internal constant [9 x i8] c"_tfFlags\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype235 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str234, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 36, i64 32, i64 32, i64 352, i32 2, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite233 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array236 = internal constant [4 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype195 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype205 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype207 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype235 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] + at llvm.dbg.composite237 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str27, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 20, i64 384, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array236 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype238 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite237 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str239 = internal constant [10 x i8] c"NSImage.h\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.compile_unit240 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([10 x i8]* @.str239, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str241 = internal constant [8 x i8] c"NSImage\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype243 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str244 = internal constant [11 x i8] c"NSString.h\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.compile_unit245 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([11 x i8]* @.str244, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str246 = internal constant [9 x i8] c"NSString\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype248 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array249 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype248 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] + at llvm.dbg.composite250 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str246, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit245 to { }*), i32 84, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array249 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype251 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite250 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str252 = internal constant [6 x i8] c"_name\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype253 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([6 x i8]* @.str252, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 50, i64 32, i64 32, i64 32, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype251 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str254 = internal constant [13 x i8] c"CGGeometry.h\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at .str255 = internal constant [110 x i8] c"/System/Library/Frameworks/ApplicationServices.framework/Headers/../Frameworks/CoreGraphics.framework/Headers\00", section "llvm.metadata" ; <[110 x i8]*> [#uses=1] + at llvm.dbg.compile_unit256 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([13 x i8]* @.str254, i32 0, i32 0), i8* getelementptr ([110 x i8]* @.str255, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str257 = internal constant [7 x i8] c"CGSize\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at .str259 = internal constant [7 x i8] c"double\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.basictype260 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str259, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i32 0, i64 64, i64 32, i64 0, i32 0, i32 4 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] + at .str261 = internal constant [9 x i8] c"CGBase.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.compile_unit262 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([9 x i8]* @.str261, i32 0, i32 0), i8* getelementptr ([110 x i8]* @.str255, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str263 = internal constant [8 x i8] c"CGFloat\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype264 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str263, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit262 to { }*), i32 105, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype260 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str265 = internal constant [6 x i8] c"width\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype266 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([6 x i8]* @.str265, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 22, i64 64, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str267 = internal constant [7 x i8] c"height\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype268 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str267, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 23, i64 64, i64 32, i64 64, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array269 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype266 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype268 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite270 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str257, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 21, i64 128, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array269 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype271 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str257, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 25, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite270 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str272 = internal constant [13 x i8] c"NSGeometry.h\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.compile_unit273 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([13 x i8]* @.str272, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str274 = internal constant [7 x i8] c"NSSize\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype275 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str274, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 26, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype271 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str276 = internal constant [6 x i8] c"_size\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype277 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([6 x i8]* @.str276, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 51, i64 128, i64 32, i64 64, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str278 = internal constant [13 x i8] c"__imageFlags\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at .str280 = internal constant [9 x i8] c"scalable\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype281 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str280, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 53, i64 1, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str282 = internal constant [13 x i8] c"dataRetained\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype283 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str282, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 54, i64 1, i64 32, i64 1, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str284 = internal constant [13 x i8] c"uniqueWindow\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype285 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str284, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 55, i64 1, i64 32, i64 2, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str286 = internal constant [21 x i8] c"sizeWasExplicitlySet\00", section "llvm.metadata" ; <[21 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_unit20 to { }*), i8* getelementptr ([21 x i8]* @.str286, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 56, i64 1, i64 32, i64 3, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str288 = internal constant [8 x i8] c"builtIn\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype289 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str288, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 57, i64 1, i64 32, i64 4, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str290 = internal constant [14 x i8] c"needsToExpand\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype291 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str290, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 58, i64 1, i64 32, i64 5, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str292 = internal constant [27 x i8] c"useEPSOnResolutionMismatch\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] + at llvm.dbg.derivedtype293 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([27 x i8]* @.str292, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 59, i64 1, i64 32, i64 6, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str294 = internal constant [20 x i8] c"colorMatchPreferred\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] + at llvm.dbg.derivedtype295 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([20 x i8]* @.str294, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 60, i64 1, i64 32, i64 7, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str296 = internal constant [27 x i8] c"multipleResolutionMatching\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] + at llvm.dbg.derivedtype297 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([27 x i8]* @.str296, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 61, i64 1, i64 32, i64 8, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str298 = internal constant [21 x i8] c"focusedWhilePrinting\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] + at llvm.dbg.derivedtype299 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([21 x i8]* @.str298, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 62, i64 1, i64 32, i64 9, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str300 = internal constant [14 x i8] c"archiveByName\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype301 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str300, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 63, i64 1, i64 32, i64 10, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str302 = internal constant [20 x i8] c"unboundedCacheDepth\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] + at llvm.dbg.derivedtype303 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([20 x i8]* @.str302, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 64, i64 1, i64 32, i64 11, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str304 = internal constant [8 x i8] c"flipped\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype305 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str304, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 65, i64 1, i64 32, i64 12, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str306 = internal constant [8 x i8] c"aliased\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype307 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str306, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 66, i64 1, i64 32, i64 13, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str308 = internal constant [8 x i8] c"dirtied\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype309 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str308, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 67, i64 1, i64 32, i64 14, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str310 = internal constant [10 x i8] c"cacheMode\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype311 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str310, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 68, i64 2, i64 32, i64 15, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str312 = internal constant [11 x i8] c"sampleMode\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype313 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str312, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 69, i64 3, i64 32, i64 17, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str314 = internal constant [10 x i8] c"reserved2\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype315 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str314, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 70, i64 1, i64 32, i64 20, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str316 = internal constant [11 x i8] c"isTemplate\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype317 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str316, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 71, i64 1, i64 32, i64 21, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str318 = internal constant [15 x i8] c"failedToExpand\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype319 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([15 x i8]* @.str318, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 72, i64 1, i64 32, i64 22, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str320 = internal constant [10 x i8] c"reserved1\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype321 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str320, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 73, i64 9, i64 32, i64 23, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array322 = internal constant [21 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype281 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype283 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype287 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype289 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype291 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype293 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype295 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype297 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype299 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype301 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype303 to { }*), { }* bitcast! (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype305 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype307 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype309 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype311 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype313 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype315 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype317 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype319 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype321 to { }*)], section "llvm.metadata" ; <[21 x { }*]*> [#uses=1] + at llvm.dbg.composite323 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str278, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 52, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([21 x { }*]* @llvm.dbg.array322 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str324 = internal constant [7 x i8] c"_flags\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype325 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str324, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 74, i64 32, i64 32, i64 192, i32 2, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite323 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str326 = internal constant [6 x i8] c"_reps\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype327 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([6 x i8]* @.str326, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 75, i64 32, i64 32, i64 224, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str328 = internal constant [18 x i8] c"_NSImageAuxiliary\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.composite329 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([18 x i8]* @.str328, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 40, i64 0, i64 0, i64 0, i32 0, { }* null, { }* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype330 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite329 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str331 = internal constant [16 x i8] c"_imageAuxiliary\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype332 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str331, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 76, i64 32, i64 32, i64 256, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype330 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array333 = internal constant [6 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype243 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype253 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype277 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype325 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype327 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype332 to { }*)], section "llvm.metadata" ; <[6 x { }*]*> [#uses=1] + at llvm.dbg.composite334 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str241, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 42, i64 288, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([6 x { }*]* @llvm.dbg.array333 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype335 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite334 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str336 = internal constant [5 x i8] c"icon\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.derivedtype337 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([5 x i8]* @.str336, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit22 to { }*), i32 15, i64 32, i64 32, i64 384, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype335 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str338 = internal constant [18 x i8] c"preferredIconSize\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.derivedtype339 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([18 x i8]* @.str338, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit22 to { }*), i32 16, i64 128, i64 32, i64 416, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array340 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype238 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype337 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype339 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] + at llvm.dbg.composite341 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([18 x i8]* @.str23, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit22 to { }*), i32 12, i64 544, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array340 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype342 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite341 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str343 = internal constant [5 x i8] c"self\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.variable = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str344 = internal constant [5 x i8] c"_cmd\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.variable345 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str346 = internal constant [7 x i8] c"string\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.variable347 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*), i8* getelementptr ([7 x i8]* @.str346, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 15, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype251 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_CLASS_NAME_" = internal global [16 x i8] c"NSTextFieldCell\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[16 x i8]*> [#uses=2] +@"\01L_OBJC_CLASS_REFERENCES_" = internal global %struct._objc_class* bitcast ([16 x i8]* @"\01L_OBJC_CLASS_NAME_" to %struct._objc_class*), section "__OBJC,__cls_refs,literal_pointers,no_dead_strip", align 4 ; <%struct._objc_class**> [#uses=6] +@"\01L_OBJC_METH_VAR_NAME_" = internal global [14 x i8] c"initTextCell:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[14 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_" = internal global %struct.objc_selector* bitcast ([14 x i8]* @"\01L_OBJC_METH_VAR_NAME_" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] +@"\01L_OBJC_METH_VAR_NAME_348" = internal global [18 x i8] c"setLineBreakMode:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[18 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_349" = internal global %struct.objc_selector* bitcast ([18 x i8]* @"\01L_OBJC_METH_VAR_NAME_348" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] +@"\01L_OBJC_METH_VAR_NAME_350" = internal global [18 x i8] c"setFocusRingType:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[18 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_351" = internal global %struct.objc_selector* bitcast ([18 x i8]* @"\01L_OBJC_METH_VAR_NAME_350" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] + at .str352 = internal constant [27 x i8] c"\01-[DVIconAndTextCell init]\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] + at llvm.dbg.subprogram353 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([27 x i8]* @.str352, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str352, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 23, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable354 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram353 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable355 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram353 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at __CFConstantStringClassReference = external global [0 x i32] ; <[0 x i32]*> [#uses=1] +@"\01LC" = internal constant [1 x i8] zeroinitializer, section "__TEXT,__cstring,cstring_literals" ; <[1 x i8]*> [#uses=1] +@"\01LC356" = internal constant %struct.NSConstantString <{ i32* getelementptr ([0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr ([1 x i8]* @"\01LC", i32 0, i32 0), i32 0 }>, section "__DATA,__cfstring" ; <%struct.NSConstantString*> [#uses=1] + at .str357 = internal constant [36 x i8] c"\01-[DVIconAndTextCell copyWithZone:]\00", section "llvm.metadata" ; <[36 x i8]*> [#uses=1] + at llvm.dbg.subprogram358 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([36 x i8]* @.str357, i32 0, i32 0), i8* getelementptr ([36 x i8]* @.str357, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 27, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable359 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram358 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable360 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram358 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str361 = internal constant [9 x i8] c"NSZone.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.compile_unit362 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([9 x i8]* @.str361, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str363 = internal constant [8 x i8] c"_NSZone\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.composite = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str363, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit362 to { }*), i32 10, i64 0, i64 0, i64 0, i32 0, { }* null, { }* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str364 = internal constant [7 x i8] c"NSZone\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype365 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str364, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit362 to { }*), i32 10, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype366 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype365 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str367 = internal constant [5 x i8] c"zone\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.variable368 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram358 to { }*), i8* getelementptr ([5 x i8]* @.str367, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 27, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype366 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str369 = internal constant [5 x i8] c"copy\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.variable370 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram358 to { }*), i8* getelementptr ([5 x i8]* @.str369, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 28, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_371" = internal global [14 x i8] c"copyWithZone:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[14 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_372" = internal global %struct.objc_selector* bitcast ([14 x i8]* @"\01L_OBJC_METH_VAR_NAME_371" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] +@"\01L_OBJC_METH_VAR_NAME_373" = internal global [7 x i8] c"retain\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[7 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_374" = internal global %struct.objc_selector* bitcast ([7 x i8]* @"\01L_OBJC_METH_VAR_NAME_373" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] + at .str375 = internal constant [30 x i8] c"\01-[DVIconAndTextCell dealloc]\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] + at llvm.dbg.subprogram376 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([30 x i8]* @.str375, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str375, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 34, { }* null, i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable377 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram376 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable378 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram376 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_379" = internal global [8 x i8] c"release\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[8 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_380" = internal global %struct.objc_selector* bitcast ([8 x i8]* @"\01L_OBJC_METH_VAR_NAME_379" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] +@"\01L_OBJC_METH_VAR_NAME_381" = internal global [8 x i8] c"dealloc\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[8 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_382" = internal global %struct.objc_selector* bitcast ([8 x i8]* @"\01L_OBJC_METH_VAR_NAME_381" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] + at .str383 = internal constant [31 x i8] c"\01-[DVIconAndTextCell setIcon:]\00", section "llvm.metadata" ; <[31 x i8]*> [#uses=1] + at llvm.dbg.subprogram384 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([31 x i8]* @.str383, i32 0, i32 0), i8* getelementptr ([31 x i8]* @.str383, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 39, { }* null, i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable385 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram384 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable386 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram384 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str387 = internal constant [8 x i8] c"newIcon\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.variable388 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram384 to { }*), i8* getelementptr ([8 x i8]* @.str387, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 39, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype335 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str389 = internal constant [27 x i8] c"\01-[DVIconAndTextCell icon]\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] + at llvm.dbg.subprogram390 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([27 x i8]* @.str389, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str389, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 46, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype335 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable391 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram390 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable392 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram390 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str393 = internal constant [40 x i8] c"\01-[DVIconAndTextCell preferredIconSize]\00", section "llvm.metadata" ; <[40 x i8]*> [#uses=1] + at llvm.dbg.subprogram394 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([40 x i8]* @.str393, i32 0, i32 0), i8* getelementptr ([40 x i8]* @.str393, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 50, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable395 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram394 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable396 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram394 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str397 = internal constant [44 x i8] c"\01-[DVIconAndTextCell setPreferredIconSize:]\00", section "llvm.metadata" ; <[44 x i8]*> [#uses=1] + at llvm.dbg.subprogram398 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([44 x i8]* @.str397, i32 0, i32 0), i8* getelementptr ([44 x i8]* @.str397, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 54, { }* null, i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable399 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram398 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable400 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram398 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str401 = internal constant [5 x i8] c"size\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.variable402 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram398 to { }*), i8* getelementptr ([5 x i8]* @.str401, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 54, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str403 = internal constant [41 x i8] c"\01-[DVIconAndTextCell iconSizeForBounds:]\00", section "llvm.metadata" ; <[41 x i8]*> [#uses=1] + at llvm.dbg.subprogram404 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([41 x i8]* @.str403, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str403, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 58, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable405 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram404 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable406 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram404 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str407 = internal constant [7 x i8] c"CGRect\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at .str409 = internal constant [8 x i8] c"CGPoint\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at .str411 = internal constant [2 x i8] c"x\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] + at llvm.dbg.derivedtype412 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str411, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 14, i64 64, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str413 = internal constant [2 x i8] c"y\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] + at llvm.dbg.derivedtype414 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str413, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 15, i64 64, i64 32, i64 64, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array415 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype412 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype414 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite416 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str409, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 13, i64 128, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array415 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype417 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str409, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 17, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite416 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str418 = internal constant [7 x i8] c"origin\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype419 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str418, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 30, i64 128, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype417 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype420 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([5 x i8]* @.str401, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 31, i64 128, i64 32, i64 128, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype271 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array421 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype419 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype420 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite422 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str407, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 29, i64 256, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array421 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype423 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str407, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 33, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite422 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str424 = internal constant [7 x i8] c"NSRect\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype425 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str424, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 31, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype423 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str426 = internal constant [7 x i8] c"bounds\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.variable427 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram404 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 58, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str428 = internal constant [9 x i8] c"iconSize\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.variable429 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram404 to { }*), i8* getelementptr ([9 x i8]* @.str428, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 59, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_430" = internal global [5 x i8] c"icon\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[5 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_431" = internal global %struct.objc_selector* bitcast ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_430" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=4] +@"\01L_OBJC_METH_VAR_NAME_432" = internal global [5 x i8] c"size\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[5 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_433" = internal global %struct.objc_selector* bitcast ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_432" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] + at NSZeroSize = external constant %struct.CGPoint ; <%struct.CGPoint*> [#uses=1] + at .str434 = internal constant [42 x i8] c"\01-[DVIconAndTextCell iconInsetForBounds:]\00", section "llvm.metadata" ; <[42 x i8]*> [#uses=1] + at llvm.dbg.subprogram435 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([42 x i8]* @.str434, i32 0, i32 0), i8* getelementptr ([42 x i8]* @.str434, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 66, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable436 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram435 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable437 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram435 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable438 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram435 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 66, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_439" = internal global [19 x i8] c"iconSizeForBounds:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[19 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_440" = internal global %struct.objc_selector* bitcast ([19 x i8]* @"\01L_OBJC_METH_VAR_NAME_439" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=6] + at .str441 = internal constant [42 x i8] c"\01-[DVIconAndTextCell textInsetForBounds:]\00", section "llvm.metadata" ; <[42 x i8]*> [#uses=1] + at llvm.dbg.subprogram442 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([42 x i8]* @.str441, i32 0, i32 0), i8* getelementptr ([42 x i8]* @.str441, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 70, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable443 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram442 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable444 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram442 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable445 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram442 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 70, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str446 = internal constant [21 x i8] c"NSAttributedString.h\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] + at llvm.dbg.compile_unit447 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([21 x i8]* @.str446, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str448 = internal constant [19 x i8] c"NSAttributedString\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.derivedtype450 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array451 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype450 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] + at llvm.dbg.composite452 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str448, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit447 to { }*), i32 8, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array451 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype453 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite452 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str454 = internal constant [38 x i8] c"\01-[DVIconAndTextCell attributedTitle]\00", section "llvm.metadata" ; <[38 x i8]*> [#uses=1] + at llvm.dbg.subprogram455 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([38 x i8]* @.str454, i32 0, i32 0), i8* getelementptr ([38 x i8]* @.str454, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 74, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype453 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable456 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram455 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable457 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram455 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str458 = internal constant [26 x i8] c"NSMutableAttributedString\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] + at llvm.dbg.derivedtype460 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite452 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array461 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype460 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] + at llvm.dbg.composite462 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([26 x i8]* @.str458, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit447 to { }*), i32 43, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array461 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype463 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite462 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str464 = internal constant [6 x i8] c"title\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.variable465 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram455 to { }*), i8* getelementptr ([6 x i8]* @.str464, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 75, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype463 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_466" = internal global [22 x i8] c"attributedStringValue\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[22 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_467" = internal global %struct.objc_selector* bitcast ([22 x i8]* @"\01L_OBJC_METH_VAR_NAME_466" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] +@"\01L_OBJC_METH_VAR_NAME_468" = internal global [12 x i8] c"mutableCopy\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[12 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_469" = internal global %struct.objc_selector* bitcast ([12 x i8]* @"\01L_OBJC_METH_VAR_NAME_468" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] +@"\01L_OBJC_METH_VAR_NAME_470" = internal global [12 x i8] c"autorelease\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[12 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_471" = internal global %struct.objc_selector* bitcast ([12 x i8]* @"\01L_OBJC_METH_VAR_NAME_470" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] + at .str472 = internal constant [32 x i8] c"\01-[DVIconAndTextCell titleSize]\00", section "llvm.metadata" ; <[32 x i8]*> [#uses=1] + at llvm.dbg.subprogram473 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([32 x i8]* @.str472, i32 0, i32 0), i8* getelementptr ([32 x i8]* @.str472, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 79, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable474 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram473 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable475 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram473 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_476" = internal global [16 x i8] c"attributedTitle\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[16 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_477" = internal global %struct.objc_selector* bitcast ([16 x i8]* @"\01L_OBJC_METH_VAR_NAME_476" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] + at .str478 = internal constant [49 x i8] c"\01-[DVIconAndTextCell titleAndIconRectForBounds:]\00", section "llvm.metadata" ; <[49 x i8]*> [#uses=1] + at llvm.dbg.subprogram479 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([49 x i8]* @.str478, i32 0, i32 0), i8* getelementptr ([49 x i8]* @.str478, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 83, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable480 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable481 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable482 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 83, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str483 = internal constant [10 x i8] c"iconInset\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.variable484 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([10 x i8]* @.str483, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 84, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_485" = internal global [20 x i8] c"iconInsetForBounds:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[20 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_486" = internal global %struct.objc_selector* bitcast ([20 x i8]* @"\01L_OBJC_METH_VAR_NAME_485" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] + at .str487 = internal constant [10 x i8] c"textInset\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.variable488 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([10 x i8]* @.str487, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 85, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_489" = internal global [20 x i8] c"textInsetForBounds:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[20 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_490" = internal global %struct.objc_selector* bitcast ([20 x i8]* @"\01L_OBJC_METH_VAR_NAME_489" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] + at llvm.dbg.variable491 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([9 x i8]* @.str428, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 86, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str492 = internal constant [9 x i8] c"textSize\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.variable493 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([9 x i8]* @.str492, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 87, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_494" = internal global [10 x i8] c"titleSize\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[10 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_495" = internal global %struct.objc_selector* bitcast ([10 x i8]* @"\01L_OBJC_METH_VAR_NAME_494" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] + at .str496 = internal constant [14 x i8] c"maxLegalWidth\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.variable497 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([14 x i8]* @.str496, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 88, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str498 = internal constant [17 x i8] c"titleAndIconSize\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.variable499 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([17 x i8]* @.str498, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 89, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable500 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([2 x i8]* @.str411, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 90, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable501 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([2 x i8]* @.str413, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 90, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str502 = internal constant [41 x i8] c"\01-[DVIconAndTextCell iconRectForBounds:]\00", section "llvm.metadata" ; <[41 x i8]*> [#uses=1] + at llvm.dbg.subprogram503 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([41 x i8]* @.str502, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str502, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 95, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable504 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable505 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable506 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 95, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable507 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([9 x i8]* @.str428, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 96, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str508 = internal constant [10 x i8] c"unionRect\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.variable509 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([10 x i8]* @.str508, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 97, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_510" = internal global [27 x i8] c"titleAndIconRectForBounds:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[27 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_511" = internal global %struct.objc_selector* bitcast ([27 x i8]* @"\01L_OBJC_METH_VAR_NAME_510" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=4] + at .str512 = internal constant [12 x i8] c"signed char\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.basictype513 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str512, 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 6 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] + at .str514 = internal constant [5 x i8] c"BOOL\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.derivedtype515 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([5 x i8]* @.str514, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to { }*), i32 43, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype513 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str516 = internal constant [8 x i8] c"shorter\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.variable517 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([8 x i8]* @.str516, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 98, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype515 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable518 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([2 x i8]* @.str413, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 99, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str519 = internal constant [42 x i8] c"\01-[DVIconAndTextCell titleRectForBounds:]\00", section "llvm.metadata" ; <[42 x i8]*> [#uses=1] + at llvm.dbg.subprogram520 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([42 x i8]* @.str519, i32 0, i32 0), i8* getelementptr ([42 x i8]* @.str519, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 103, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable521 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable522 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable523 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 103, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable524 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([10 x i8]* @.str487, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 104, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable525 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([9 x i8]* @.str428, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 105, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str526 = internal constant [10 x i8] c"titleSize\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.variable527 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([10 x i8]* @.str526, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 106, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable528 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([10 x i8]* @.str508, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 107, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str529 = internal constant [10 x i8] c"iconIndet\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.variable530 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([10 x i8]* @.str529, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 108, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable531 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([8 x i8]* @.str516, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 109, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype515 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable532 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([2 x i8]* @.str413, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 110, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable533 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([7 x i8]* @.str267, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 111, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str534 = internal constant [54 x i8] c"\01-[DVIconAndTextCell expansionFrameWithFrame:inView:]\00", section "llvm.metadata" ; <[54 x i8]*> [#uses=1] + at llvm.dbg.subprogram535 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([54 x i8]* @.str534, i32 0, i32 0), i8* getelementptr ([54 x i8]* @.str534, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 115, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable536 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram535 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable537 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram535 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str538 = internal constant [10 x i8] c"cellFrame\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.variable539 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram535 to { }*), i8* getelementptr ([10 x i8]* @.str538, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 115, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str540 = internal constant [9 x i8] c"NSView.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.compile_unit541 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([9 x i8]* @.str540, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str542 = internal constant [7 x i8] c"NSView\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at .str544 = internal constant [14 x i8] c"NSResponder.h\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.compile_unit545 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([14 x i8]* @.str544, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str546 = internal constant [12 x i8] c"NSResponder\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype548 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str549 = internal constant [15 x i8] c"_nextResponder\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype550 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str549, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit545 to { }*), i32 15, i64 32, i64 32, i64 32, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array551 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype548 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype550 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite552 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str546, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit545 to { }*), i32 12, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array551 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype553 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite552 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str554 = internal constant [7 x i8] c"_frame\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype555 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str554, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 128, i64 256, i64 32, i64 64, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str556 = internal constant [8 x i8] c"_bounds\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype557 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str556, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 129, i64 256, i64 32, i64 320, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str558 = internal constant [11 x i8] c"_superview\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype559 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str558, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 130, i64 32, i64 32, i64 576, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str560 = internal constant [10 x i8] c"_subviews\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype561 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str560, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 131, i64 32, i64 32, i64 608, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str562 = internal constant [11 x i8] c"NSWindow.h\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.compile_unit563 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([11 x i8]* @.str562, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str564 = internal constant [9 x i8] c"NSWindow\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype566 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite552 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype567 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str554, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 164, i64 256, i64 32, i64 64, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str568 = internal constant [13 x i8] c"_contentView\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype569 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str568, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 165, i64 32, i64 32, i64 320, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str570 = internal constant [10 x i8] c"_delegate\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype571 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str570, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 166, i64 32, i64 32, i64 352, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype572 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite552 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str573 = internal constant [16 x i8] c"_firstResponder\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype574 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str573, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 167, i64 32, i64 32, i64 384, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype572 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype575 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite873 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str576 = internal constant [13 x i8] c"_lastLeftHit\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype577 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str576, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 168, i64 32, i64 32, i64 416, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype575 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str578 = internal constant [14 x i8] c"_lastRightHit\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype579 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str578, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 169, i64 32, i64 32, i64 448, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype575 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str580 = internal constant [13 x i8] c"_counterpart\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype581 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str580, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 170, i64 32, i64 32, i64 480, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str582 = internal constant [13 x i8] c"_fieldEditor\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype583 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str582, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 171, i64 32, i64 32, i64 512, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str584 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] + at llvm.dbg.basictype585 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str584, 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 .str586 = internal constant [14 x i8] c"_winEventMask\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype587 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str586, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 172, i64 32, i64 32, i64 544, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype585 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str588 = internal constant [11 x i8] c"_windowNum\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype589 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str588, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 173, i64 32, i64 32, i64 576, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype179 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str590 = internal constant [7 x i8] c"_level\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype591 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str590, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 174, i64 32, i64 32, i64 608, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype585 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype592 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str204, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 175, i64 32, i64 32, i64 640, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype203 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str593 = internal constant [12 x i8] c"_borderView\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype594 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str593, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 176, i64 32, i64 32, i64 672, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str595 = internal constant [14 x i8] c"unsigned char\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.basictype596 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str595, 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 .str597 = internal constant [17 x i8] c"_postingDisabled\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype598 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str597, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 177, i64 8, i64 8, i64 704, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype596 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str599 = internal constant [11 x i8] c"_styleMask\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype600 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str599, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 178, i64 8, i64 8, i64 712, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype596 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str601 = internal constant [15 x i8] c"_flushDisabled\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype602 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str601, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 179, i64 8, i64 8, i64 720, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype596 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str603 = internal constant [17 x i8] c"_reservedWindow1\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype604 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str603, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 180, i64 8, i64 8, i64 728, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype596 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype605 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* null }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str606 = internal constant [13 x i8] c"_cursorRects\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype607 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str606, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 181, i64 32, i64 32, i64 736, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype605 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str608 = internal constant [12 x i8] c"_trectTable\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype609 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str608, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 182, i64 32, i64 32, i64 768, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype605 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str610 = internal constant [10 x i8] c"_miniIcon\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype611 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str610, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 183, i64 32, i64 32, i64 800, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype335 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str612 = internal constant [8 x i8] c"_unused\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype613 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str612, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 184, i64 32, i64 32, i64 832, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype585 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str614 = internal constant [8 x i8] c"NSSet.h\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.compile_unit615 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([8 x i8]* @.str614, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str616 = internal constant [13 x i8] c"NSMutableSet\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at .str618 = internal constant [6 x i8] c"NSSet\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype620 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array621 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype620 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] + at llvm.dbg.composite622 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str618, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit615 to { }*), i32 12, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array621 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype623 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite622 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array624 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype623 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] + at llvm.dbg.composite625 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str616, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit615 to { }*), i32 67, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array624 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype626 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite625 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str627 = internal constant [11 x i8] c"_dragTypes\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype628 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str627, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 185, i64 32, i64 32, i64 864, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype626 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str629 = internal constant [8 x i8] c"NSURL.h\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.compile_unit630 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([8 x i8]* @.str629, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at .str631 = internal constant [6 x i8] c"NSURL\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.derivedtype633 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str634 = internal constant [11 x i8] c"_urlString\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype635 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str634, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit630 to { }*), i32 39, i64 32, i64 32, i64 32, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype251 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype636 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite645 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str637 = internal constant [9 x i8] c"_baseURL\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype638 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str637, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit630 to { }*), i32 40, i64 32, i64 32, i64 64, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype636 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str639 = internal constant [9 x i8] c"_clients\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype640 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str639, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit630 to { }*), i32 41, i64 32, i64 32, i64 96, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype605 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype641 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* null }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str642 = internal constant [10 x i8] c"_reserved\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype643 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str642, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit630 to { }*), i32 42, i64 32, i64 32, i64 128, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype641 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array644 = internal constant [5 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype633 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype635 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype638 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype640 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype643 to { }*)], section "llvm.metadata" ; <[5 x { }*]*> [#uses=1] + at llvm.dbg.composite645 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str631, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit630 to { }*), i32 36, i64 160, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([5 x { }*]* @llvm.dbg.array644 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype646 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite645 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str647 = internal constant [16 x i8] c"_representedURL\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype648 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str647, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 186, i64 32, i64 32, i64 896, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype646 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype649 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str650 = internal constant [12 x i8] c"_sizeLimits\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype651 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str650, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 187, i64 32, i64 32, i64 928, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype649 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str652 = internal constant [15 x i8] c"_frameSaveName\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype653 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str652, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 188, i64 32, i64 32, i64 960, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype251 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype654 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite622 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str655 = internal constant [14 x i8] c"_regDragTypes\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype656 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str655, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 189, i64 32, i64 32, i64 992, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype654 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str657 = internal constant [9 x i8] c"__wFlags\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at .str659 = internal constant [8 x i8] c"backing\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype660 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str659, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 191, i64 2, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str661 = internal constant [8 x i8] c"visible\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype662 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str661, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 192, i64 1, i64 32, i64 2, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str663 = internal constant [13 x i8] c"isMainWindow\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype664 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str663, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 193, i64 1, i64 32, i64 3, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str665 = internal constant [12 x i8] c"isKeyWindow\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype666 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str665, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 194, i64 1, i64 32, i64 4, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str667 = internal constant [18 x i8] c"hidesOnDeactivate\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.derivedtype668 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str667, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 195, i64 1, i64 32, i64 5, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str669 = internal constant [19 x i8] c"dontFreeWhenClosed\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.derivedtype670 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str669, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 196, i64 1, i64 32, i64 6, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str671 = internal constant [8 x i8] c"oneShot\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype672 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str671, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 197, i64 1, i64 32, i64 7, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str673 = internal constant [9 x i8] c"deferred\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype674 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str673, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 198, i64 1, i64 32, i64 8, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str675 = internal constant [20 x i8] c"cursorRectsDisabled\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] + at llvm.dbg.derivedtype676 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([20 x i8]* @.str675, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 199, i64 1, i64 32, i64 9, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str677 = internal constant [20 x i8] c"haveFreeCursorRects\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] + at llvm.dbg.derivedtype678 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([20 x i8]* @.str677, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 200, i64 1, i64 32, i64 10, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str679 = internal constant [17 x i8] c"validCursorRects\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype680 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str679, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 201, i64 1, i64 32, i64 11, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str681 = internal constant [10 x i8] c"docEdited\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype682 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str681, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 202, i64 1, i64 32, i64 12, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str683 = internal constant [18 x i8] c"dynamicDepthLimit\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.derivedtype684 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str683, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 203, i64 1, i64 32, i64 13, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str685 = internal constant [15 x i8] c"worksWhenModal\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype686 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str685, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 204, i64 1, i64 32, i64 14, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str687 = internal constant [17 x i8] c"limitedBecomeKey\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype688 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str687, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 205, i64 1, i64 32, i64 15, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str689 = internal constant [11 x i8] c"needsFlush\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype690 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str689, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 206, i64 1, i64 32, i64 16, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str691 = internal constant [17 x i8] c"viewsNeedDisplay\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype692 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str691, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 207, i64 1, i64 32, i64 17, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str693 = internal constant [18 x i8] c"ignoredFirstMouse\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.derivedtype694 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str693, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 208, i64 1, i64 32, i64 18, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str695 = internal constant [19 x i8] c"repostedFirstMouse\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.derivedtype696 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str695, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 209, i64 1, i64 32, i64 19, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str697 = internal constant [12 x i8] c"windowDying\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype698 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str697, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 210, i64 1, i64 32, i64 20, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str699 = internal constant [11 x i8] c"tempHidden\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype700 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str699, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 211, i64 1, i64 32, i64 21, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str701 = internal constant [14 x i8] c"floatingPanel\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype702 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str701, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 212, i64 1, i64 32, i64 22, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str703 = internal constant [22 x i8] c"wantsToBeOnMainScreen\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] + at llvm.dbg.derivedtype704 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([22 x i8]* @.str703, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 213, i64 1, i64 32, i64 23, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str705 = internal constant [19 x i8] c"optimizedDrawingOk\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.derivedtype706 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str705, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 214, i64 1, i64 32, i64 24, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str707 = internal constant [16 x i8] c"optimizeDrawing\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype708 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str707, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 215, i64 1, i64 32, i64 25, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str709 = internal constant [27 x i8] c"titleIsRepresentedFilename\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] + at llvm.dbg.derivedtype710 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([27 x i8]* @.str709, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 216, i64 1, i64 32, i64 26, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str711 = internal constant [24 x i8] c"excludedFromWindowsMenu\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] + at llvm.dbg.derivedtype712 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([24 x i8]* @.str711, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 217, i64 1, i64 32, i64 27, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str713 = internal constant [11 x i8] c"depthLimit\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype714 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str713, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 218, i64 4, i64 32, i64 28, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str715 = internal constant [30 x i8] c"delegateReturnsValidRequestor\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] + at llvm.dbg.derivedtype716 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([30 x i8]* @.str715, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 219, i64 1, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str717 = internal constant [16 x i8] c"lmouseupPending\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype718 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str717, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 220, i64 1, i64 32, i64 33, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str719 = internal constant [16 x i8] c"rmouseupPending\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype720 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str719, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 221, i64 1, i64 32, i64 34, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str721 = internal constant [25 x i8] c"wantsToDestroyRealWindow\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] + at llvm.dbg.derivedtype722 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([25 x i8]* @.str721, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 222, i64 1, i64 32, i64 35, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str723 = internal constant [20 x i8] c"wantsToRegDragTypes\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] + at llvm.dbg.derivedtype724 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([20 x i8]* @.str723, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 223, i64 1, i64 32, i64 36, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str725 = internal constant [29 x i8] c"sentInvalidateCursorRectsMsg\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] + at llvm.dbg.derivedtype726 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([29 x i8]* @.str725, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 224, i64 1, i64 32, i64 37, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str727 = internal constant [17 x i8] c"avoidsActivation\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype728 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str727, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 225, i64 1, i64 32, i64 38, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str729 = internal constant [21 x i8] c"frameSavedUsingTitle\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] + at llvm.dbg.derivedtype730 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([21 x i8]* @.str729, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 226, i64 1, i64 32, i64 39, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str731 = internal constant [16 x i8] c"didRegDragTypes\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype732 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str731, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 227, i64 1, i64 32, i64 40, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str733 = internal constant [15 x i8] c"delayedOneShot\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype734 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str733, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 228, i64 1, i64 32, i64 41, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str735 = internal constant [23 x i8] c"postedNeedsDisplayNote\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] + at llvm.dbg.derivedtype736 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([23 x i8]* @.str735, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 229, i64 1, i64 32, i64 42, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str737 = internal constant [29 x i8] c"postedInvalidCursorRectsNote\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] + at llvm.dbg.derivedtype738 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([29 x i8]* @.str737, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 230, i64 1, i64 32, i64 43, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str739 = internal constant [29 x i8] c"initialFirstResponderTempSet\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] + at llvm.dbg.derivedtype740 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([29 x i8]* @.str739, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 231, i64 1, i64 32, i64 44, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str741 = internal constant [12 x i8] c"autodisplay\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype742 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str741, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 232, i64 1, i64 32, i64 45, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str743 = internal constant [17 x i8] c"tossedFirstEvent\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype744 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str743, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 233, i64 1, i64 32, i64 46, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str745 = internal constant [13 x i8] c"isImageCache\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype746 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str745, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 234, i64 1, i64 32, i64 47, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str747 = internal constant [15 x i8] c"interfaceStyle\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype748 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str747, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 235, i64 3, i64 32, i64 48, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str749 = internal constant [26 x i8] c"keyViewSelectionDirection\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] + at llvm.dbg.derivedtype750 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([26 x i8]* @.str749, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 236, i64 2, i64 32, i64 51, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str751 = internal constant [39 x i8] c"defaultButtonCellKETemporarilyDisabled\00", section "llvm.metadata" ; <[39 x i8]*> [#uses=1] + at llvm.dbg.derivedtype752 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([39 x i8]* @.str751, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 237, i64 1, i64 32, i64 53, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str753 = internal constant [28 x i8] c"defaultButtonCellKEDisabled\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] + at llvm.dbg.derivedtype754 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([28 x i8]* @.str753, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 238, i64 1, i64 32, i64 54, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str755 = internal constant [15 x i8] c"menuHasBeenSet\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype756 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str755, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 239, i64 1, i64 32, i64 55, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str757 = internal constant [15 x i8] c"wantsToBeModal\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype758 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str757, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 240, i64 1, i64 32, i64 56, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str759 = internal constant [18 x i8] c"showingModalFrame\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.derivedtype760 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str759, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 241, i64 1, i64 32, i64 57, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str761 = internal constant [14 x i8] c"isTerminating\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype762 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str761, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 242, i64 1, i64 32, i64 58, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str763 = internal constant [31 x i8] c"win32MouseActivationInProgress\00", section "llvm.metadata" ; <[31 x i8]*> [#uses=1] + at llvm.dbg.derivedtype764 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([31 x i8]* @.str763, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 243, i64 1, i64 32, i64 59, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str765 = internal constant [33 x i8] c"makingFirstResponderForMouseDown\00", section "llvm.metadata" ; <[33 x i8]*> [#uses=1] + at llvm.dbg.derivedtype766 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([33 x i8]* @.str765, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 244, i64 1, i64 32, i64 60, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str767 = internal constant [10 x i8] c"needsZoom\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype768 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str767, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 245, i64 1, i64 32, i64 61, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str769 = internal constant [26 x i8] c"sentWindowNeedsDisplayMsg\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] + at llvm.dbg.derivedtype770 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([26 x i8]* @.str769, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 246, i64 1, i64 32, i64 62, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str771 = internal constant [17 x i8] c"liveResizeActive\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype772 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str771, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 247, i64 1, i64 32, i64 63, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array773 = internal constant [57 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype660 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype662 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype664 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype666 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype668 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype670 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype672 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype674 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype676 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype678 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype680 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype682 to { }*), { }* bitcast! (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype684 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype686 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype688 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype690 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype692 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype694 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype696 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype698 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype700 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype702 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype704 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype706 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype708 to { }*),! { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedty! pe710 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype712 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype714 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype716 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype718 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype720 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype722 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype724 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype726 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype728 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype730 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype732 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype734 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.deriv! edtype736 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype738 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype740 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype742 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype744 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype746 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype748 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype750 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype752 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype754 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype756 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype758 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype760 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @l! lvm.dbg.derivedtype762 to { }*), { }* bitcast (%llvm.dbg.deriv! edtype.t ype* @llvm.dbg.derivedtype764 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype766 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype768 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype770 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype772 to { }*)], section "llvm.metadata" ; <[57 x { }*]*> [#uses=1] + at llvm.dbg.composite774 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str657, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 190, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([57 x { }*]* @llvm.dbg.array773 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str775 = internal constant [8 x i8] c"_wFlags\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype776 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str775, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 248, i64 64, i64 32, i64 1024, i32 2, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite774 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str777 = internal constant [19 x i8] c"_defaultButtonCell\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.derivedtype778 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str777, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 249, i64 32, i64 32, i64 1088, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str779 = internal constant [23 x i8] c"_initialFirstResponder\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] + at llvm.dbg.derivedtype780 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([23 x i8]* @.str779, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 250, i64 32, i64 32, i64 1120, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype575 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str781 = internal constant [18 x i8] c"NSWindowAuxiliary\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.composite782 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str781, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 152, i64 0, i64 0, i64 0, i32 0, { }* null, { }* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype783 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite782 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str784 = internal constant [18 x i8] c"_auxiliaryStorage\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.derivedtype785 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str784, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 251, i64 32, i64 32, i64 1152, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype783 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array786 = internal constant [31 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype566 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype567 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype569 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype571 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype574 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype577 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype579 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype581 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype583 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype587 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype589 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype591 to { }*), { }* bitcast! (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype592 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype594 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype598 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype600 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype602 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype604 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype607 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype609 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype611 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype613 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype628 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype648 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype651 to { }*),! { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedty! pe653 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype656 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype776 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype778 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype780 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype785 to { }*)], section "llvm.metadata" ; <[31 x { }*]*> [#uses=1] + at llvm.dbg.composite787 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str564, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 156, i64 1184, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([31 x { }*]* @llvm.dbg.array786 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype788 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite787 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str789 = internal constant [8 x i8] c"_window\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype790 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str789, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 132, i64 32, i64 32, i64 640, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype788 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str791 = internal constant [8 x i8] c"_gState\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype792 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str791, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 133, i64 32, i64 32, i64 672, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str793 = internal constant [13 x i8] c"_frameMatrix\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype794 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str793, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 134, i64 32, i64 32, i64 704, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str795 = internal constant [12 x i8] c"_drawMatrix\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype796 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str795, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 135, i64 32, i64 32, i64 736, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype797 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str627, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 136, i64 32, i64 32, i64 768, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str798 = internal constant [17 x i8] c"_NSViewAuxiliary\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.composite799 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str798, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 120, i64 0, i64 0, i64 0, i32 0, { }* null, { }* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype800 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite799 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str801 = internal constant [15 x i8] c"_viewAuxiliary\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.derivedtype802 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str801, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 137, i64 32, i64 32, i64 800, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype800 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str803 = internal constant [9 x i8] c"__VFlags\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at .str805 = internal constant [14 x i8] c"aboutToResize\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype806 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str805, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 92, i64 1, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str807 = internal constant [19 x i8] c"retainCountOverMax\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.derivedtype808 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str807, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 93, i64 1, i64 32, i64 1, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str809 = internal constant [12 x i8] c"retainCount\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype810 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str809, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 94, i64 6, i64 32, i64 2, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str811 = internal constant [16 x i8] c"interfaceStyle1\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype812 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str811, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 95, i64 1, i64 32, i64 8, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str813 = internal constant [17 x i8] c"specialArchiving\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] + at llvm.dbg.derivedtype814 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str813, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 96, i64 1, i64 32, i64 9, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str815 = internal constant [22 x i8] c"needsDisplayForBounds\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] + at llvm.dbg.derivedtype816 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([22 x i8]* @.str815, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 97, i64 1, i64 32, i64 10, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str817 = internal constant [16 x i8] c"interfaceStyle0\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype818 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str817, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 98, i64 1, i64 32, i64 11, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str819 = internal constant [28 x i8] c"removingWithoutInvalidation\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] + at llvm.dbg.derivedtype820 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([28 x i8]* @.str819, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 99, i64 1, i64 32, i64 12, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str821 = internal constant [22 x i8] c"needsBoundsChangeNote\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] + at llvm.dbg.derivedtype822 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([22 x i8]* @.str821, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 100, i64 1, i64 32, i64 13, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str823 = internal constant [27 x i8] c"boundsChangeNotesSuspended\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] + at llvm.dbg.derivedtype824 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([27 x i8]* @.str823, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 101, i64 1, i64 32, i64 14, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str825 = internal constant [26 x i8] c"focusChangeNotesSuspended\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] + at llvm.dbg.derivedtype826 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([26 x i8]* @.str825, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 102, i64 1, i64 32, i64 15, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str827 = internal constant [21 x i8] c"needsFrameChangeNote\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] + at llvm.dbg.derivedtype828 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([21 x i8]* @.str827, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 103, i64 1, i64 32, i64 16, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str829 = internal constant [26 x i8] c"frameChangeNotesSuspended\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] + at llvm.dbg.derivedtype830 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([26 x i8]* @.str829, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 104, i64 1, i64 32, i64 17, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str831 = internal constant [21 x i8] c"noVerticalAutosizing\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] + at llvm.dbg.derivedtype832 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([21 x i8]* @.str831, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 105, i64 1, i64 32, i64 18, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str833 = internal constant [10 x i8] c"newGState\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.derivedtype834 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str833, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 106, i64 1, i64 32, i64 19, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str835 = internal constant [12 x i8] c"validGState\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype836 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str835, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 107, i64 1, i64 32, i64 20, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str837 = internal constant [13 x i8] c"needsDisplay\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] + at llvm.dbg.derivedtype838 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str837, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 108, i64 1, i64 32, i64 21, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str839 = internal constant [12 x i8] c"wantsGState\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.derivedtype840 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str839, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 109, i64 1, i64 32, i64 22, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str841 = internal constant [19 x i8] c"autoresizeSubviews\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.derivedtype842 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str841, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 110, i64 1, i64 32, i64 23, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str843 = internal constant [11 x i8] c"autosizing\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype844 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str843, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 111, i64 6, i64 32, i64 24, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str845 = internal constant [24 x i8] c"rotatedOrScaledFromBase\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] + at llvm.dbg.derivedtype846 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([24 x i8]* @.str845, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 112, i64 1, i64 32, i64 30, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str847 = internal constant [16 x i8] c"rotatedFromBase\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.derivedtype848 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str847, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 113, i64 1, i64 32, i64 31, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array849 = internal constant [22 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype806 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype808 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype810 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype812 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype814 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype816 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype818 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype820 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype822 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype824 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype826 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype828 to { }*), { }* bitcast! (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype830 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype832 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype834 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype836 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype838 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype840 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype842 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype844 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype846 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype848 to { }*)], section "llvm.metadata" ; <[22 x { }*]*> [#uses=1] + at llvm.dbg.composite850 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str803, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 67, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([22 x { }*]* @llvm.dbg.array849 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str851 = internal constant [8 x i8] c"_VFlags\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype852 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str851, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 115, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite850 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str853 = internal constant [8 x i8] c"_vFlags\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.derivedtype854 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str853, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 138, i64 32, i64 32, i64 832, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype852 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str855 = internal constant [10 x i8] c"__VFlags2\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at .str857 = internal constant [20 x i8] c"nextKeyViewRefCount\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] + at llvm.dbg.derivedtype858 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([20 x i8]* @.str857, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 140, i64 14, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str859 = internal constant [24 x i8] c"previousKeyViewRefCount\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] + at llvm.dbg.derivedtype860 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([24 x i8]* @.str859, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 141, i64 14, i64 32, i64 14, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str861 = internal constant [14 x i8] c"isVisibleRect\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] + at llvm.dbg.derivedtype862 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str861, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 142, i64 1, i64 32, i64 28, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str863 = internal constant [11 x i8] c"hasToolTip\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.derivedtype864 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str863, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 143, i64 1, i64 32, i64 29, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str865 = internal constant [19 x i8] c"needsRealLockFocus\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] + at llvm.dbg.derivedtype866 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str865, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 144, i64 1, i64 32, i64 30, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.derivedtype867 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str153, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 145, i64 1, i64 32, i64 31, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array868 = internal constant [6 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype858 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype860 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype862 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype864 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype866 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype867 to { }*)], section "llvm.metadata" ; <[6 x { }*]*> [#uses=1] + at llvm.dbg.composite869 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str855, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 139, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([6 x { }*]* @llvm.dbg.array868 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at .str870 = internal constant [9 x i8] c"_vFlags2\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.derivedtype871 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str870, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 146, i64 32, i64 32, i64 864, i32 2, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite869 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array872 = internal constant [13 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype553 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype555 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype557 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype559 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype561 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype790 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype792 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype794 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype796 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype797 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype802 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype854 to { }*), { }* bitcast! (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype871 to { }*)], section "llvm.metadata" ; <[13 x { }*]*> [#uses=1] + at llvm.dbg.composite873 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str542, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 122, i64 896, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([13 x { }*]* @llvm.dbg.array872 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype874 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite873 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str875 = internal constant [5 x i8] c"view\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.variable876 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram535 to { }*), i8* getelementptr ([5 x i8]* @.str875, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 115, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype874 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str877 = internal constant [15 x i8] c"expansionFrame\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] + at llvm.dbg.variable878 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram535 to { }*), i8* getelementptr ([15 x i8]* @.str877, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 116, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_879" = internal global [9 x i8] c"cellSize\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[9 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_880" = internal global %struct.objc_selector* bitcast ([9 x i8]* @"\01L_OBJC_METH_VAR_NAME_879" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] + at NSZeroRect = external constant %struct.CGRect ; <%struct.CGRect*> [#uses=1] + at .str881 = internal constant [41 x i8] c"\01-[DVIconAndTextCell cellSizeForBounds:]\00", section "llvm.metadata" ; <[41 x i8]*> [#uses=1] + at llvm.dbg.subprogram882 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([41 x i8]* @.str881, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str881, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 125, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable883 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram882 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable884 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram882 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable885 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram882 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 125, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable886 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram882 to { }*), i8* getelementptr ([10 x i8]* @.str483, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 126, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str887 = internal constant [12 x i8] c"contentSize\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.variable888 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram882 to { }*), i8* getelementptr ([12 x i8]* @.str887, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 127, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str889 = internal constant [31 x i8] c"\01-[DVIconAndTextCell isOpaque]\00", section "llvm.metadata" ; <[31 x i8]*> [#uses=1] + at llvm.dbg.subprogram890 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([31 x i8]* @.str889, i32 0, i32 0), i8* getelementptr ([31 x i8]* @.str889, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 131, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype515 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable891 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram890 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable892 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram890 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str893 = internal constant [53 x i8] c"\01-[DVIconAndTextCell drawWithExpansionFrame:inView:]\00", section "llvm.metadata" ; <[53 x i8]*> [#uses=1] + at llvm.dbg.subprogram894 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([53 x i8]* @.str893, i32 0, i32 0), i8* getelementptr ([53 x i8]* @.str893, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 135, { }* null, i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable895 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram894 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable896 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram894 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable897 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram894 to { }*), i8* getelementptr ([10 x i8]* @.str538, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 135, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable898 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram894 to { }*), i8* getelementptr ([5 x i8]* @.str875, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 135, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype874 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_899" = internal global [31 x i8] c"drawWithExpansionFrame:inView:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[31 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_900" = internal global %struct.objc_selector* bitcast ([31 x i8]* @"\01L_OBJC_METH_VAR_NAME_899" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] + at .str901 = internal constant [52 x i8] c"\01-[DVIconAndTextCell drawInteriorWithFrame:inView:]\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] + at llvm.dbg.subprogram902 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([52 x i8]* @.str901, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str901, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 141, { }* null, i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable903 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram902 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable904 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram902 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable905 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram902 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 141, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str906 = internal constant [12 x i8] c"controlView\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] + at llvm.dbg.variable907 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram902 to { }*), i8* getelementptr ([12 x i8]* @.str906, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 141, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype874 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_908" = internal global [19 x i8] c"iconRectForBounds:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[19 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_909" = internal global %struct.objc_selector* bitcast ([19 x i8]* @"\01L_OBJC_METH_VAR_NAME_908" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] +@"\01L_OBJC_METH_VAR_NAME_910" = internal global [10 x i8] c"isFlipped\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[10 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_911" = internal global %struct.objc_selector* bitcast ([10 x i8]* @"\01L_OBJC_METH_VAR_NAME_910" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] +@"\01L_OBJC_METH_VAR_NAME_912" = internal global [38 x i8] c"drawInRect:operation:fraction:unflip:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[38 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_913" = internal global %struct.objc_selector* bitcast ([38 x i8]* @"\01L_OBJC_METH_VAR_NAME_912" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] + at .str914 = internal constant [16 x i8] c"attributedTitle\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] + at llvm.dbg.variable915 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram902 to { }*), i8* getelementptr ([16 x i8]* @.str914, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 145, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype453 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str916 = internal constant [10 x i8] c"titleRect\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] + at llvm.dbg.variable917 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram902 to { }*), i8* getelementptr ([10 x i8]* @.str916, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 146, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_918" = internal global [20 x i8] c"titleRectForBounds:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[20 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_919" = internal global %struct.objc_selector* bitcast ([20 x i8]* @"\01L_OBJC_METH_VAR_NAME_918" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] +@"\01L_OBJC_METH_VAR_NAME_920" = internal global [12 x i8] c"drawInRect:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[12 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_921" = internal global %struct.objc_selector* bitcast ([12 x i8]* @"\01L_OBJC_METH_VAR_NAME_920" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] + at .str922 = internal constant [49 x i8] c"\01-[DVIconAndTextCell titleEditingRectForBounds:]\00", section "llvm.metadata" ; <[49 x i8]*> [#uses=1] + at llvm.dbg.subprogram923 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([49 x i8]* @.str922, i32 0, i32 0), i8* getelementptr ([49 x i8]* @.str922, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 150, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable924 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram923 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable925 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram923 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable926 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram923 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 150, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable927 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram923 to { }*), i8* getelementptr ([10 x i8]* @.str916, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 151, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str928 = internal constant [75 x i8] c"\01-[DVIconAndTextCell selectWithFrame:inView:editor:delegate:start:length:]\00", section "llvm.metadata" ; <[75 x i8]*> [#uses=1] + at llvm.dbg.subprogram929 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([75 x i8]* @.str928, i32 0, i32 0), i8* getelementptr ([75 x i8]* @.str928, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 155, { }* null, i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable930 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram929 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable931 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram929 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str932 = internal constant [6 x i8] c"frame\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.variable933 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram929 to { }*), i8* getelementptr ([6 x i8]* @.str932, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 155, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable934 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram929 to { }*), i8* getelementptr ([12 x i8]* @.str906, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 155, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype874 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str935 = internal constant [7 x i8] c"NSText\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype937 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite873 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str938 = internal constant [7 x i8] c"_ivars\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.derivedtype939 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str938, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit126 to { }*), i32 74, i64 32, i64 32, i64 896, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at llvm.dbg.array940 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype937 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype939 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] + at llvm.dbg.composite941 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str935, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit126 to { }*), i32 72, i64 928, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array940 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] + at llvm.dbg.derivedtype942 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite941 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] + at .str943 = internal constant [5 x i8] c"text\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] + at llvm.dbg.variable944 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram929 to { }*), i8* getelementptr ([5 x i8]* @.str943, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 155, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype942 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str945 = internal constant [9 x i8] c"delegate\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.variable946 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram929 to { }*), i8* getelementptr ([9 x i8]* @.str945, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 155, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str947 = internal constant [6 x i8] c"start\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.variable948 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram929 to { }*), i8* getelementptr ([6 x i8]* @.str947, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 155, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype179 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str949 = internal constant [7 x i8] c"length\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.variable950 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram929 to { }*), i8* getelementptr ([7 x i8]* @.str949, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 155, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype179 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_951" = internal global [27 x i8] c"titleEditingRectForBounds:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[27 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_952" = internal global %struct.objc_selector* bitcast ([27 x i8]* @"\01L_OBJC_METH_VAR_NAME_951" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] +@"\01L_OBJC_METH_VAR_NAME_953" = internal global [53 x i8] c"selectWithFrame:inView:editor:delegate:start:length:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[53 x i8]*> [#uses=2] +@"\01L_OBJC_SELECTOR_REFERENCES_954" = internal global %struct.objc_selector* bitcast ([53 x i8]* @"\01L_OBJC_METH_VAR_NAME_953" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] +@"\01L_OBJC_METH_VAR_TYPE_" = internal global [10 x i8] c"@12 at 0:4 at 8\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[10 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_955" = internal global [5 x i8] c"init\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[5 x i8]*> [#uses=2] +@"\01L_OBJC_METH_VAR_TYPE_956" = internal global [7 x i8] c"@8 at 0:4\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[7 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_TYPE_957" = internal global [20 x i8] c"@12 at 0:4^{_NSZone=}8\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[20 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_TYPE_958" = internal global [7 x i8] c"v8 at 0:4\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[7 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_959" = internal global [9 x i8] c"setIcon:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[9 x i8]*> [#uses=2] +@"\01L_OBJC_METH_VAR_TYPE_960" = internal global [10 x i8] c"v12 at 0:4 at 8\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[10 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_961" = internal global [18 x i8] c"preferredIconSize\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[18 x i8]*> [#uses=2] +@"\01L_OBJC_METH_VAR_TYPE_962" = internal global [17 x i8] c"{CGSize=dd}8 at 0:4\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[17 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_963" = internal global [22 x i8] c"setPreferredIconSize:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[22 x i8]*> [#uses=2] +@"\01L_OBJC_METH_VAR_TYPE_964" = internal global [20 x i8] c"v24 at 0:4{CGSize=dd}8\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[20 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_TYPE_965" = internal global [51 x i8] c"{CGSize=dd}40 at 0:4{CGRect={CGPoint=dd}{CGSize=dd}}8\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[51 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_TYPE_966" = internal global [41 x i8] c"d40 at 0:4{CGRect={CGPoint=dd}{CGSize=dd}}8\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[41 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_TYPE_967" = internal global [72 x i8] c"{CGRect={CGPoint=dd}{CGSize=dd}}40 at 0:4{CGRect={CGPoint=dd}{CGSize=dd}}8\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[72 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_968" = internal global [32 x i8] c"expansionFrameWithFrame:inView:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[32 x i8]*> [#uses=2] +@"\01L_OBJC_METH_VAR_TYPE_969" = internal global [75 x i8] c"{CGRect={CGPoint=dd}{CGSize=dd}}44 at 0:4{CGRect={CGPoint=dd}{CGSize=dd}}8 at 40\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[75 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_970" = internal global [19 x i8] c"cellSizeForBounds:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[19 x i8]*> [#uses=2] +@"\01L_OBJC_METH_VAR_NAME_971" = internal global [9 x i8] c"isOpaque\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[9 x i8]*> [#uses=2] +@"\01L_OBJC_METH_VAR_TYPE_972" = internal global [7 x i8] c"c8 at 0:4\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[7 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_TYPE_973" = internal global [44 x i8] c"v44 at 0:4{CGRect={CGPoint=dd}{CGSize=dd}}8 at 40\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[44 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_NAME_974" = internal global [30 x i8] c"drawInteriorWithFrame:inView:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[30 x i8]*> [#uses=2] +@"\01L_OBJC_METH_VAR_TYPE_975" = internal global [56 x i8] c"v60 at 0:4{CGRect={CGPoint=dd}{CGSize=dd}}8 at 40@44 at 48l52l56\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[56 x i8]*> [#uses=1] +@"\01L_OBJC_CLASS_NAME_976" = internal global [9 x i8] c"NSObject\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[9 x i8]*> [#uses=2] +@"\01L_OBJC_CLASS_NAME_977" = internal global [18 x i8] c"DVIconAndTextCell\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[18 x i8]*> [#uses=1] +@"\01L_OBJC_METACLASS_DVIconAndTextCell" = internal global %struct._objc_class { %struct._objc_class* bitcast ([9 x i8]* @"\01L_OBJC_CLASS_NAME_976" to %struct._objc_class*), %struct._objc_class* bitcast ([16 x i8]* @"\01L_OBJC_CLASS_NAME_" to %struct._objc_class*), i8* getelementptr ([18 x i8]* @"\01L_OBJC_CLASS_NAME_977", i32 0, i32 0), i32 0, i32 2, i32 48, %struct._objc_ivar_list* null, %struct._objc_method_list* null, %struct._objc_cache* null, %struct._objc_protocol_list* null, i8* null, %struct._objc_class_extension* null }, section "__OBJC,__meta_class,regular,no_dead_strip", align 4 ; <%struct._objc_class*> [#uses=2] +@"\01L_OBJC_METH_VAR_TYPE_978" = internal global [11 x i8] c"@\22NSImage\22\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[11 x i8]*> [#uses=1] +@"\01L_OBJC_METH_VAR_TYPE_979" = internal global [27 x i8] c"{CGSize=\22width\22d\22height\22d}\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[27 x i8]*> [#uses=1] +@"\01L_OBJC_INSTANCE_VARIABLES_DVIconAndTextCell" = internal global %0 { i32 2, [2 x %struct._objc_ivar] [%struct._objc_ivar { i8* getelementptr ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_430", i32 0, i32 0), i8* getelementptr ([11 x i8]* @"\01L_OBJC_METH_VAR_TYPE_978", i32 0, i32 0), i32 48 }, %struct._objc_ivar { i8* getelementptr ([18 x i8]* @"\01L_OBJC_METH_VAR_NAME_961", i32 0, i32 0), i8* getelementptr ([27 x i8]* @"\01L_OBJC_METH_VAR_TYPE_979", i32 0, i32 0), i32 52 }] }, section "__OBJC,__instance_vars,regular,no_dead_strip", align 4 ; <%0*> [#uses=2] +@"\01L_OBJC_INSTANCE_METHODS_DVIconAndTextCell" = internal global %1 { i8* null, i32 23, [23 x %struct._objc_method] [%struct._objc_method { %struct.objc_selector* bitcast ([14 x i8]* @"\01L_OBJC_METH_VAR_NAME_" to %struct.objc_selector*), i8* getelementptr ([10 x i8]* @"\01L_OBJC_METH_VAR_TYPE_", i32 0, i32 0), i8* bitcast (%struct.objc_object* (%3*, %struct.objc_selector*, %4*)* @"\01-[DVIconAndTextCell initTextCell:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_955" to %struct.objc_selector*), i8* getelementptr ([7 x i8]* @"\01L_OBJC_METH_VAR_TYPE_956", i32 0, i32 0), i8* bitcast (%struct.objc_object* (%3*, %struct.objc_selector*)* @"\01-[DVIconAndTextCell init]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([14 x i8]* @"\01L_OBJC_METH_VAR_NAME_371" to %struct.objc_selector*), i8* getelementptr ([20 x i8]* @"\01L_OBJC_METH_VAR_TYPE_957", i32 0, i32 0), i8* bitcast (%struct.objc_object* (%3*, %s! truct.objc_selector*, %struct._NSZone*)* @"\01-[DVIconAndTextCell copyWithZone:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([8 x i8]* @"\01L_OBJC_METH_VAR_NAME_381" to %struct.objc_selector*), i8* getelementptr ([7 x i8]* @"\01L_OBJC_METH_VAR_TYPE_958", i32 0, i32 0), i8* bitcast (void (%3*, %struct.objc_selector*)* @"\01-[DVIconAndTextCell dealloc]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([9 x i8]* @"\01L_OBJC_METH_VAR_NAME_959" to %struct.objc_selector*), i8* getelementptr ([10 x i8]* @"\01L_OBJC_METH_VAR_TYPE_960", i32 0, i32 0), i8* bitcast (void (%3*, %struct.objc_selector*, %5*)* @"\01-[DVIconAndTextCell setIcon:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_430" to %struct.objc_selector*), i8* getelementptr ([7 x i8]* @"\01L_OBJC_METH_VAR_TYPE_956", i32 0, i32 0), i8* bitcast (%5* (%3*, %struct.objc_selector*)* @"\01-[DVIconAndTextCell icon]" to i8*) }, %struct! ._objc_method { %struct.objc_selector* bitcast ([18 x i8]* @"\! 01L_OBJC _METH_VAR_NAME_961" to %struct.objc_selector*), i8* getelementptr ([17 x i8]* @"\01L_OBJC_METH_VAR_TYPE_962", i32 0, i32 0), i8* bitcast (void (%struct.CGPoint*, %3*, %struct.objc_selector*)* @"\01-[DVIconAndTextCell preferredIconSize]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([22 x i8]* @"\01L_OBJC_METH_VAR_NAME_963" to %struct.objc_selector*), i8* getelementptr ([20 x i8]* @"\01L_OBJC_METH_VAR_TYPE_964", i32 0, i32 0), i8* bitcast (void (%3*, %struct.objc_selector*, double, double)* @"\01-[DVIconAndTextCell setPreferredIconSize:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([19 x i8]* @"\01L_OBJC_METH_VAR_NAME_439" to %struct.objc_selector*), i8* getelementptr ([51 x i8]* @"\01L_OBJC_METH_VAR_TYPE_965", i32 0, i32 0), i8* bitcast (void (%struct.CGPoint*, %3*, %struct.objc_selector*, %struct.CGRect*)* @"\01-[DVIconAndTextCell iconSizeForBounds:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([20 x i8]* @"\01! L_OBJC_METH_VAR_NAME_485" to %struct.objc_selector*), i8* getelementptr ([41 x i8]* @"\01L_OBJC_METH_VAR_TYPE_966", i32 0, i32 0), i8* bitcast (double (%3*, %struct.objc_selector*, %struct.CGRect*)* @"\01-[DVIconAndTextCell iconInsetForBounds:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([20 x i8]* @"\01L_OBJC_METH_VAR_NAME_489" to %struct.objc_selector*), i8* getelementptr ([41 x i8]* @"\01L_OBJC_METH_VAR_TYPE_966", i32 0, i32 0), i8* bitcast (double (%3*, %struct.objc_selector*, %struct.CGRect*)* @"\01-[DVIconAndTextCell textInsetForBounds:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([16 x i8]* @"\01L_OBJC_METH_VAR_NAME_476" to %struct.objc_selector*), i8* getelementptr ([7 x i8]* @"\01L_OBJC_METH_VAR_TYPE_956", i32 0, i32 0), i8* bitcast (%6* (%3*, %struct.objc_selector*)* @"\01-[DVIconAndTextCell attributedTitle]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([10 x i8]* @"\01L_OBJC_METH_VAR_NAME_494" to ! %struct.objc_selector*), i8* getelementptr ([17 x i8]* @"\01L_! OBJC_MET H_VAR_TYPE_962", i32 0, i32 0), i8* bitcast (void (%struct.CGPoint*, %3*, %struct.objc_selector*)* @"\01-[DVIconAndTextCell titleSize]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([27 x i8]* @"\01L_OBJC_METH_VAR_NAME_510" to %struct.objc_selector*), i8* getelementptr ([72 x i8]* @"\01L_OBJC_METH_VAR_TYPE_967", i32 0, i32 0), i8* bitcast (void (%struct.CGRect*, %3*, %struct.objc_selector*, %struct.CGRect*)* @"\01-[DVIconAndTextCell titleAndIconRectForBounds:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([19 x i8]* @"\01L_OBJC_METH_VAR_NAME_908" to %struct.objc_selector*), i8* getelementptr ([72 x i8]* @"\01L_OBJC_METH_VAR_TYPE_967", i32 0, i32 0), i8* bitcast (void (%struct.CGRect*, %3*, %struct.objc_selector*, %struct.CGRect*)* @"\01-[DVIconAndTextCell iconRectForBounds:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([20 x i8]* @"\01L_OBJC_METH_VAR_NAME_918" to %struct.objc_selector*), i8* getelementptr ([72 x ! i8]* @"\01L_OBJC_METH_VAR_TYPE_967", i32 0, i32 0), i8* bitcast (void (%struct.CGRect*, %3*, %struct.objc_selector*, %struct.CGRect*)* @"\01-[DVIconAndTextCell titleRectForBounds:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([32 x i8]* @"\01L_OBJC_METH_VAR_NAME_968" to %struct.objc_selector*), i8* getelementptr ([75 x i8]* @"\01L_OBJC_METH_VAR_TYPE_969", i32 0, i32 0), i8* bitcast (void (%struct.CGRect*, %3*, %struct.objc_selector*, %struct.CGRect*, %8*)* @"\01-[DVIconAndTextCell expansionFrameWithFrame:inView:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([19 x i8]* @"\01L_OBJC_METH_VAR_NAME_970" to %struct.objc_selector*), i8* getelementptr ([51 x i8]* @"\01L_OBJC_METH_VAR_TYPE_965", i32 0, i32 0), i8* bitcast (void (%struct.CGPoint*, %3*, %struct.objc_selector*, %struct.CGRect*)* @"\01-[DVIconAndTextCell cellSizeForBounds:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([9 x i8]* @"\01L_OBJC_METH_VAR_NAME_9! 71" to %struct.objc_selector*), i8* getelementptr ([7 x i8]* @! "\01L_OB JC_METH_VAR_TYPE_972", i32 0, i32 0), i8* bitcast (i8 (%3*, %struct.objc_selector*)* @"\01-[DVIconAndTextCell isOpaque]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([31 x i8]* @"\01L_OBJC_METH_VAR_NAME_899" to %struct.objc_selector*), i8* getelementptr ([44 x i8]* @"\01L_OBJC_METH_VAR_TYPE_973", i32 0, i32 0), i8* bitcast (void (%3*, %struct.objc_selector*, %struct.CGRect*, %8*)* @"\01-[DVIconAndTextCell drawWithExpansionFrame:inView:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([30 x i8]* @"\01L_OBJC_METH_VAR_NAME_974" to %struct.objc_selector*), i8* getelementptr ([44 x i8]* @"\01L_OBJC_METH_VAR_TYPE_973", i32 0, i32 0), i8* bitcast (void (%3*, %struct.objc_selector*, %struct.CGRect*, %8*)* @"\01-[DVIconAndTextCell drawInteriorWithFrame:inView:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([27 x i8]* @"\01L_OBJC_METH_VAR_NAME_951" to %struct.objc_selector*), i8* getelementptr ([72 x i8]* @"\01L_OBJC_METH_VA! R_TYPE_967", i32 0, i32 0), i8* bitcast (void (%struct.CGRect*, %3*, %struct.objc_selector*, %struct.CGRect*)* @"\01-[DVIconAndTextCell titleEditingRectForBounds:]" to i8*) }, %struct._objc_method { %struct.objc_selector* bitcast ([53 x i8]* @"\01L_OBJC_METH_VAR_NAME_953" to %struct.objc_selector*), i8* getelementptr ([56 x i8]* @"\01L_OBJC_METH_VAR_TYPE_975", i32 0, i32 0), i8* bitcast (void (%3*, %struct.objc_selector*, %struct.CGRect*, %8*, %9*, %struct.objc_object*, i32, i32)* @"\01-[DVIconAndTextCell selectWithFrame:inView:editor:delegate:start:length:]" to i8*) }] }, section "__OBJC,__inst_meth,regular,no_dead_strip", align 4 ; <%1*> [#uses=2] +@"\01L_OBJC_CLASS_DVIconAndTextCell" = internal global %struct._objc_class { %struct._objc_class* @"\01L_OBJC_METACLASS_DVIconAndTextCell", %struct._objc_class* bitcast ([16 x i8]* @"\01L_OBJC_CLASS_NAME_" to %struct._objc_class*), i8* getelementptr ([18 x i8]* @"\01L_OBJC_CLASS_NAME_977", i32 0, i32 0), i32 0, i32 1, i32 68, %struct._objc_ivar_list* bitcast (%0* @"\01L_OBJC_INSTANCE_VARIABLES_DVIconAndTextCell" to %struct._objc_ivar_list*), %struct._objc_method_list* bitcast (%1* @"\01L_OBJC_INSTANCE_METHODS_DVIconAndTextCell" to %struct._objc_method_list*), %struct._objc_cache* null, %struct._objc_protocol_list* null, i8* null, %struct._objc_class_extension* null }, section "__OBJC,__class,regular,no_dead_strip", align 4 ; <%struct._objc_class*> [#uses=1] + at .str980 = internal constant [7 x i8] c"NSMaxX\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.subprogram981 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i8* getelementptr ([7 x i8]* @.str980, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str980, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 109, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str982 = internal constant [6 x i8] c"aRect\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.variable983 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram981 to { }*), i8* getelementptr ([6 x i8]* @.str982, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 109, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str984 = internal constant [11 x i8] c"NSMakeRect\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.subprogram985 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i8* getelementptr ([11 x i8]* @.str984, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str984, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 100, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable986 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram985 to { }*), i8* getelementptr ([2 x i8]* @.str411, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 100, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable987 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram985 to { }*), i8* getelementptr ([2 x i8]* @.str413, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 100, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str988 = internal constant [2 x i8] c"w\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] + at llvm.dbg.variable989 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram985 to { }*), i8* getelementptr ([2 x i8]* @.str988, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 100, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str990 = internal constant [2 x i8] c"h\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] + at llvm.dbg.variable991 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram985 to { }*), i8* getelementptr ([2 x i8]* @.str990, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 100, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str992 = internal constant [2 x i8] c"r\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] + at llvm.dbg.variable993 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram985 to { }*), i8* getelementptr ([2 x i8]* @.str992, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 101, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str994 = internal constant [7 x i8] c"NSMinX\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.subprogram995 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i8* getelementptr ([7 x i8]* @.str994, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str994, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 125, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable996 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram995 to { }*), i8* getelementptr ([6 x i8]* @.str982, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 125, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str997 = internal constant [7 x i8] c"NSMinY\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.subprogram998 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i8* getelementptr ([7 x i8]* @.str997, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str997, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 129, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable999 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram998 to { }*), i8* getelementptr ([6 x i8]* @.str982, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 129, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str1000 = internal constant [9 x i8] c"NSHeight\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.subprogram1001 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i8* getelementptr ([9 x i8]* @.str1000, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str1000, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 137, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable1002 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1001 to { }*), i8* getelementptr ([6 x i8]* @.str982, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 137, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str1003 = internal constant [11 x i8] c"NSMakeSize\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.subprogram1004 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i8* getelementptr ([11 x i8]* @.str1003, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str1003, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 93, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable1005 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1004 to { }*), i8* getelementptr ([2 x i8]* @.str988, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 93, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at llvm.dbg.variable1006 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1004 to { }*), i8* getelementptr ([2 x i8]* @.str990, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 93, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str1007 = internal constant [2 x i8] c"s\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] + at llvm.dbg.variable1008 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1004 to { }*), i8* getelementptr ([2 x i8]* @.str1007, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 94, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] + at .str1009 = internal constant [8 x i8] c"NSWidth\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] + at llvm.dbg.subprogram1010 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i8* getelementptr ([8 x i8]* @.str1009, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1009, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 133, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] + at llvm.dbg.variable1011 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1010 to { }*), i8* getelementptr ([6 x i8]* @.str982, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 133, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] +@"\01L_OBJC_CLASS_NAME_1012" = internal global [1 x i8] zeroinitializer, section "__TEXT,__cstring,cstring_literals", align 1 ; <[1 x i8]*> [#uses=1] +@"\01L_OBJC_SYMBOLS" = internal global %2 { i32 0, %struct.objc_selector* null, i16 1, i16 0, [1 x i8*] [i8* bitcast (%struct._objc_class* @"\01L_OBJC_CLASS_DVIconAndTextCell" to i8*)] }, section "__OBJC,__symbols,regular,no_dead_strip", align 4 ; <%2*> [#uses=2] +@"\01L_OBJC_MODULES" = internal global %struct._objc_module { i32 7, i32 16, i8* getelementptr ([1 x i8]* @"\01L_OBJC_CLASS_NAME_1012", i32 0, i32 0), %struct._objc_symtab* bitcast (%2* @"\01L_OBJC_SYMBOLS" to %struct._objc_symtab*) }, section "__OBJC,__module_info,regular,no_dead_strip", align 4 ; <%struct._objc_module*> [#uses=1] + at llvm.used = appending global [90 x i8*] [i8* bitcast ([2 x i32]* @"\01L_OBJC_IMAGE_INFO" to i8*), i8* getelementptr ([16 x i8]* @"\01L_OBJC_CLASS_NAME_", i32 0, i32 0), i8* bitcast (%struct._objc_class** @"\01L_OBJC_CLASS_REFERENCES_" to i8*), i8* getelementptr ([14 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_" to i8*), i8* getelementptr ([18 x i8]* @"\01L_OBJC_METH_VAR_NAME_348", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_349" to i8*), i8* getelementptr ([18 x i8]* @"\01L_OBJC_METH_VAR_NAME_350", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_351" to i8*), i8* getelementptr ([14 x i8]* @"\01L_OBJC_METH_VAR_NAME_371", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_372" to i8*), i8* getelementptr ([7 x i8]* @"\01L_OBJC_METH_VAR_NAME_373", i32 0, i32 0), i8* bitcast (%struct.objc_selecto! r** @"\01L_OBJC_SELECTOR_REFERENCES_374" to i8*), i8* getelementptr ([8 x i8]* @"\01L_OBJC_METH_VAR_NAME_379", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_380" to i8*), i8* getelementptr ([8 x i8]* @"\01L_OBJC_METH_VAR_NAME_381", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_382" to i8*), i8* getelementptr ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_430", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_431" to i8*), i8* getelementptr ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_432", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_433" to i8*), i8* getelementptr ([19 x i8]* @"\01L_OBJC_METH_VAR_NAME_439", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_440" to i8*), i8* getelementptr ([22 x i8]* @"\01L_OBJC_METH_VAR_NAME_466", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFEREN! CES_467" to i8*), i8* getelementptr ([12 x i8]* @"\01L_OBJC_ME! TH_VAR_N AME_468", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_469" to i8*), i8* getelementptr ([12 x i8]* @"\01L_OBJC_METH_VAR_NAME_470", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_471" to i8*), i8* getelementptr ([16 x i8]* @"\01L_OBJC_METH_VAR_NAME_476", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_477" to i8*), i8* getelementptr ([20 x i8]* @"\01L_OBJC_METH_VAR_NAME_485", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_486" to i8*), i8* getelementptr ([20 x i8]* @"\01L_OBJC_METH_VAR_NAME_489", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_490" to i8*), i8* getelementptr ([10 x i8]* @"\01L_OBJC_METH_VAR_NAME_494", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_495" to i8*), i8* getelementptr ([27 x i8]* @"\01L_OBJC_METH_VAR_NAME_510", i32 0, i32 0), i8* ! bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_511" to i8*), i8* getelementptr ([9 x i8]* @"\01L_OBJC_METH_VAR_NAME_879", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_880" to i8*), i8* getelementptr ([31 x i8]* @"\01L_OBJC_METH_VAR_NAME_899", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_900" to i8*), i8* getelementptr ([19 x i8]* @"\01L_OBJC_METH_VAR_NAME_908", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_909" to i8*), i8* getelementptr ([10 x i8]* @"\01L_OBJC_METH_VAR_NAME_910", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_911" to i8*), i8* getelementptr ([38 x i8]* @"\01L_OBJC_METH_VAR_NAME_912", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_913" to i8*), i8* getelementptr ([20 x i8]* @"\01L_OBJC_METH_VAR_NAME_918", i32 0, i32 0), i8* bitcast (%struct.objc_selecto! r** @"\01L_OBJC_SELECTOR_REFERENCES_919" to i8*), i8* geteleme! ntptr ([ 12 x i8]* @"\01L_OBJC_METH_VAR_NAME_920", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_921" to i8*), i8* getelementptr ([27 x i8]* @"\01L_OBJC_METH_VAR_NAME_951", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_952" to i8*), i8* getelementptr ([53 x i8]* @"\01L_OBJC_METH_VAR_NAME_953", i32 0, i32 0), i8* bitcast (%struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_954" to i8*), i8* getelementptr ([10 x i8]* @"\01L_OBJC_METH_VAR_TYPE_", i32 0, i32 0), i8* getelementptr ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_955", i32 0, i32 0), i8* getelementptr ([7 x i8]* @"\01L_OBJC_METH_VAR_TYPE_956", i32 0, i32 0), i8* getelementptr ([20 x i8]* @"\01L_OBJC_METH_VAR_TYPE_957", i32 0, i32 0), i8* getelementptr ([7 x i8]* @"\01L_OBJC_METH_VAR_TYPE_958", i32 0, i32 0), i8* getelementptr ([9 x i8]* @"\01L_OBJC_METH_VAR_NAME_959", i32 0, i32 0), i8* getelementptr ([10 x i8]* @"\01L_OBJC_METH_VAR_TYPE_960", i32 0, i32 0! ), i8* getelementptr ([18 x i8]* @"\01L_OBJC_METH_VAR_NAME_961", i32 0, i32 0), i8* getelementptr ([17 x i8]* @"\01L_OBJC_METH_VAR_TYPE_962", i32 0, i32 0), i8* getelementptr ([22 x i8]* @"\01L_OBJC_METH_VAR_NAME_963", i32 0, i32 0), i8* getelementptr ([20 x i8]* @"\01L_OBJC_METH_VAR_TYPE_964", i32 0, i32 0), i8* getelementptr ([51 x i8]* @"\01L_OBJC_METH_VAR_TYPE_965", i32 0, i32 0), i8* getelementptr ([41 x i8]* @"\01L_OBJC_METH_VAR_TYPE_966", i32 0, i32 0), i8* getelementptr ([72 x i8]* @"\01L_OBJC_METH_VAR_TYPE_967", i32 0, i32 0), i8* getelementptr ([32 x i8]* @"\01L_OBJC_METH_VAR_NAME_968", i32 0, i32 0), i8* getelementptr ([75 x i8]* @"\01L_OBJC_METH_VAR_TYPE_969", i32 0, i32 0), i8* getelementptr ([19 x i8]* @"\01L_OBJC_METH_VAR_NAME_970", i32 0, i32 0), i8* getelementptr ([9 x i8]* @"\01L_OBJC_METH_VAR_NAME_971", i32 0, i32 0), i8* getelementptr ([7 x i8]* @"\01L_OBJC_METH_VAR_TYPE_972", i32 0, i32 0), i8* getelementptr ([44 x i8]* @"\01L_OBJC_METH_VAR_TYPE_973", i! 32 0, i32 0), i8* getelementptr ([30 x i8]* @"\01L_OBJC_METH_V! AR_NAME_ 974", i32 0, i32 0), i8* getelementptr ([56 x i8]* @"\01L_OBJC_METH_VAR_TYPE_975", i32 0, i32 0), i8* getelementptr ([9 x i8]* @"\01L_OBJC_CLASS_NAME_976", i32 0, i32 0), i8* getelementptr ([18 x i8]* @"\01L_OBJC_CLASS_NAME_977", i32 0, i32 0), i8* bitcast (%struct._objc_class* @"\01L_OBJC_METACLASS_DVIconAndTextCell" to i8*), i8* getelementptr ([11 x i8]* @"\01L_OBJC_METH_VAR_TYPE_978", i32 0, i32 0), i8* getelementptr ([27 x i8]* @"\01L_OBJC_METH_VAR_TYPE_979", i32 0, i32 0), i8* bitcast (%0* @"\01L_OBJC_INSTANCE_VARIABLES_DVIconAndTextCell" to i8*), i8* bitcast (%1* @"\01L_OBJC_INSTANCE_METHODS_DVIconAndTextCell" to i8*), i8* bitcast (%struct._objc_class* @"\01L_OBJC_CLASS_DVIconAndTextCell" to i8*), i8* getelementptr ([1 x i8]* @"\01L_OBJC_CLASS_NAME_1012", i32 0, i32 0), i8* bitcast (%2* @"\01L_OBJC_SYMBOLS" to i8*), i8* bitcast (%struct._objc_module* @"\01L_OBJC_MODULES" to i8*)], section "llvm.metadata" ; <[90 x i8*]*> [#uses=0] + +define internal %struct.objc_object* @"\01-[DVIconAndTextCell initTextCell:]"(%3* %self, %struct.objc_selector* %_cmd, %4* %string) nounwind { +entry: + %retval = alloca %struct.objc_object* ; <%struct.objc_object**> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=7] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %string.addr = alloca %4* ; <%4**> [#uses=3] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable345 to { }*)) + store %4* %string, %4** %string.addr + %2 = bitcast %4** %string.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable347 to { }*)) + call void @llvm.dbg.stoppoint(i32 16, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %self1 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp = load %4** %string.addr ; <%4*> [#uses=1] + %objc_super = alloca %struct._objc_super ; <%struct._objc_super*> [#uses=3] + %3 = bitcast %3* %self1 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %4 = getelementptr %struct._objc_super* %objc_super, i32 0, i32 0 ; <%struct.objc_object**> [#uses=1] + store %struct.objc_object* %3, %struct.objc_object** %4 + %tmp2 = load %struct._objc_class** @"\01L_OBJC_CLASS_REFERENCES_" ; <%struct._objc_class*> [#uses=1] + %5 = bitcast %struct._objc_class* %tmp2 to %struct.objc_class* ; <%struct.objc_class*> [#uses=1] + %6 = getelementptr %struct._objc_super* %objc_super, i32 0, i32 1 ; <%struct.objc_class**> [#uses=1] + store %struct.objc_class* %5, %struct.objc_class** %6 + %tmp3 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_" ; <%struct.objc_selector*> [#uses=1] + %call = call %struct.objc_object* bitcast (%struct.objc_object* (%struct._objc_super*, %struct.objc_selector*, ...)* @objc_msgSendSuper to %struct.objc_object* (%struct._objc_super*, %struct.objc_selector*, %4*)*)(%struct._objc_super* %objc_super, %struct.objc_selector* %tmp3, %4* %tmp) ; <%struct.objc_object*> [#uses=1] + %conv = bitcast %struct.objc_object* %call to %3* ; <%3*> [#uses=2] + store %3* %conv, %3** %self.addr + %tobool = icmp ne %3* %conv, null ; [#uses=1] + br i1 %tobool, label %if.then, label %if.end + +if.then: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 17, i32 9, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp4 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp5 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_349" ; <%struct.objc_selector*> [#uses=1] + %tmp6 = bitcast %3* %tmp4 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to void (%struct.objc_object*, %struct.objc_selector*, i32)*)(%struct.objc_object* %tmp6, %struct.objc_selector* %tmp5, i32 4) + call void @llvm.dbg.stoppoint(i32 18, i32 9, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp7 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp8 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_351" ; <%struct.objc_selector*> [#uses=1] + %tmp9 = bitcast %3* %tmp7 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to void (%struct.objc_object*, %struct.objc_selector*, i32)*)(%struct.objc_object* %tmp9, %struct.objc_selector* %tmp8, i32 2) + br label %if.end + +if.end: ; preds = %if.then, %entry + call void @llvm.dbg.stoppoint(i32 20, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp10 = load %3** %self.addr ; <%3*> [#uses=1] + %conv11 = bitcast %3* %tmp10 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + store %struct.objc_object* %conv11, %struct.objc_object** %retval + br label %return + ; No predecessors! + br label %return + +return: ; preds = %7, %if.end + call void @llvm.dbg.stoppoint(i32 21, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) + %8 = load %struct.objc_object** %retval ; <%struct.objc_object*> [#uses=1] + ret %struct.objc_object* %8 +} + +declare void @llvm.dbg.func.start({ }*) nounwind readnone + +declare void @llvm.dbg.declare({ }*, { }*) nounwind readnone + +declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind readnone + +declare %struct.objc_object* @objc_msgSendSuper(%struct._objc_super*, %struct.objc_selector*, ...) + +declare %struct.objc_object* @objc_msgSend(%struct.objc_object*, %struct.objc_selector*, ...) + +declare void @llvm.dbg.region.end({ }*) nounwind readnone + +define internal %struct.objc_object* @"\01-[DVIconAndTextCell init]"(%3* %self, %struct.objc_selector* %_cmd) nounwind { +entry: + %retval = alloca %struct.objc_object* ; <%struct.objc_object**> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=3] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram353 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable354 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable355 to { }*)) + call void @llvm.dbg.stoppoint(i32 24, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %tmp1 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_" ; <%struct.objc_selector*> [#uses=1] + %tmp2 = bitcast %3* %tmp to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call = call %struct.objc_object* bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to %struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, %4*)*)(%struct.objc_object* %tmp2, %struct.objc_selector* %tmp1, %4* bitcast (%struct.NSConstantString* @"\01LC356" to %4*)) ; <%struct.objc_object*> [#uses=1] + store %struct.objc_object* %call, %struct.objc_object** %retval + br label %return + ; No predecessors! + br label %return + +return: ; preds = %2, %entry + call void @llvm.dbg.stoppoint(i32 25, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram353 to { }*)) + %3 = load %struct.objc_object** %retval ; <%struct.objc_object*> [#uses=1] + ret %struct.objc_object* %3 +} + +define internal %struct.objc_object* @"\01-[DVIconAndTextCell copyWithZone:]"(%3* %self, %struct.objc_selector* %_cmd, %struct._NSZone* %zone) nounwind { +entry: + %retval = alloca %struct.objc_object* ; <%struct.objc_object**> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=5] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %zone.addr = alloca %struct._NSZone* ; <%struct._NSZone**> [#uses=3] + %copy = alloca %3*, align 4 ; <%3**> [#uses=5] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram358 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable359 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable360 to { }*)) + store %struct._NSZone* %zone, %struct._NSZone** %zone.addr + %2 = bitcast %struct._NSZone** %zone.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable368 to { }*)) + call void @llvm.dbg.stoppoint(i32 28, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = bitcast %3** %copy to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable370 to { }*)) + %self1 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp = load %struct._NSZone** %zone.addr ; <%struct._NSZone*> [#uses=1] + %objc_super = alloca %struct._objc_super ; <%struct._objc_super*> [#uses=3] + %4 = bitcast %3* %self1 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %5 = getelementptr %struct._objc_super* %objc_super, i32 0, i32 0 ; <%struct.objc_object**> [#uses=1] + store %struct.objc_object* %4, %struct.objc_object** %5 + %tmp2 = load %struct._objc_class** @"\01L_OBJC_CLASS_REFERENCES_" ; <%struct._objc_class*> [#uses=1] + %6 = bitcast %struct._objc_class* %tmp2 to %struct.objc_class* ; <%struct.objc_class*> [#uses=1] + %7 = getelementptr %struct._objc_super* %objc_super, i32 0, i32 1 ; <%struct.objc_class**> [#uses=1] + store %struct.objc_class* %6, %struct.objc_class** %7 + %tmp3 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_372" ; <%struct.objc_selector*> [#uses=1] + %call = call %struct.objc_object* bitcast (%struct.objc_object* (%struct._objc_super*, %struct.objc_selector*, ...)* @objc_msgSendSuper to %struct.objc_object* (%struct._objc_super*, %struct.objc_selector*, %struct._NSZone*)*)(%struct._objc_super* %objc_super, %struct.objc_selector* %tmp3, %struct._NSZone* %tmp) ; <%struct.objc_object*> [#uses=1] + %conv = bitcast %struct.objc_object* %call to %3* ; <%3*> [#uses=1] + store %3* %conv, %3** %copy + call void @llvm.dbg.stoppoint(i32 29, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp4 = load %3** %copy ; <%3*> [#uses=1] + %8 = bitcast %3* %tmp4 to i8* ; [#uses=1] + %add.ptr = getelementptr i8* %8, i32 48 ; [#uses=1] + %9 = bitcast i8* %add.ptr to %5** ; <%5**> [#uses=1] + %tmp5 = load %3** %self.addr ; <%3*> [#uses=1] + %10 = bitcast %3* %tmp5 to i8* ; [#uses=1] + %add.ptr6 = getelementptr i8* %10, i32 48 ; [#uses=1] + %11 = bitcast i8* %add.ptr6 to %5** ; <%5**> [#uses=1] + %tmp7 = load %5** %11 ; <%5*> [#uses=1] + %tmp8 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_374" ; <%struct.objc_selector*> [#uses=1] + %tmp9 = bitcast %5* %tmp7 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call10 = call %struct.objc_object* bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to %struct.objc_object* (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %tmp9, %struct.objc_selector* %tmp8) ; <%struct.objc_object*> [#uses=1] + %conv11 = bitcast %struct.objc_object* %call10 to %5* ; <%5*> [#uses=1] + store %5* %conv11, %5** %9 + call void @llvm.dbg.stoppoint(i32 30, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp12 = load %3** %copy ; <%3*> [#uses=1] + %12 = bitcast %3* %tmp12 to i8* ; [#uses=1] + %add.ptr13 = getelementptr i8* %12, i32 52 ; [#uses=1] + %13 = bitcast i8* %add.ptr13 to %struct.CGPoint* ; <%struct.CGPoint*> [#uses=1] + %tmp14 = load %3** %self.addr ; <%3*> [#uses=1] + %14 = bitcast %3* %tmp14 to i8* ; [#uses=1] + %add.ptr15 = getelementptr i8* %14, i32 52 ; [#uses=1] + %15 = bitcast i8* %add.ptr15 to %struct.CGPoint* ; <%struct.CGPoint*> [#uses=1] + %tmp16 = bitcast %struct.CGPoint* %13 to i8* ; [#uses=1] + %tmp17 = bitcast %struct.CGPoint* %15 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp16, i8* %tmp17, i32 16, i32 4) + call void @llvm.dbg.stoppoint(i32 31, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp18 = load %3** %copy ; <%3*> [#uses=1] + %conv19 = bitcast %3* %tmp18 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + store %struct.objc_object* %conv19, %struct.objc_object** %retval + br label %return + ; No predecessors! + br label %return + +return: ; preds = %16, %entry + call void @llvm.dbg.stoppoint(i32 32, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram358 to { }*)) + %17 = load %struct.objc_object** %retval ; <%struct.objc_object*> [#uses=1] + ret %struct.objc_object* %17 +} + +declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind + +define internal void @"\01-[DVIconAndTextCell dealloc]"(%3* %self, %struct.objc_selector* %_cmd) nounwind { +entry: + %self.addr = alloca %3* ; <%3**> [#uses=4] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram376 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable377 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable378 to { }*)) + call void @llvm.dbg.stoppoint(i32 35, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %2 = bitcast %3* %tmp to i8* ; [#uses=1] + %add.ptr = getelementptr i8* %2, i32 48 ; [#uses=1] + %3 = bitcast i8* %add.ptr to %5** ; <%5**> [#uses=1] + %tmp1 = load %5** %3 ; <%5*> [#uses=1] + %tmp2 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_380" ; <%struct.objc_selector*> [#uses=1] + %tmp3 = bitcast %5* %tmp1 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to void (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %tmp3, %struct.objc_selector* %tmp2) + call void @llvm.dbg.stoppoint(i32 36, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %self4 = load %3** %self.addr ; <%3*> [#uses=1] + %objc_super = alloca %struct._objc_super ; <%struct._objc_super*> [#uses=3] + %4 = bitcast %3* %self4 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %5 = getelementptr %struct._objc_super* %objc_super, i32 0, i32 0 ; <%struct.objc_object**> [#uses=1] + store %struct.objc_object* %4, %struct.objc_object** %5 + %tmp5 = load %struct._objc_class** @"\01L_OBJC_CLASS_REFERENCES_" ; <%struct._objc_class*> [#uses=1] + %6 = bitcast %struct._objc_class* %tmp5 to %struct.objc_class* ; <%struct.objc_class*> [#uses=1] + %7 = getelementptr %struct._objc_super* %objc_super, i32 0, i32 1 ; <%struct.objc_class**> [#uses=1] + store %struct.objc_class* %6, %struct.objc_class** %7 + %tmp6 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_382" ; <%struct.objc_selector*> [#uses=1] + call void bitcast (%struct.objc_object* (%struct._objc_super*, %struct.objc_selector*, ...)* @objc_msgSendSuper to void (%struct._objc_super*, %struct.objc_selector*)*)(%struct._objc_super* %objc_super, %struct.objc_selector* %tmp6) + call void @llvm.dbg.stoppoint(i32 37, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram376 to { }*)) + ret void +} + +define internal void @"\01-[DVIconAndTextCell setIcon:]"(%3* %self, %struct.objc_selector* %_cmd, %5* %newIcon) nounwind { +entry: + %self.addr = alloca %3* ; <%3**> [#uses=5] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %newIcon.addr = alloca %5* ; <%5**> [#uses=4] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram384 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable385 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable386 to { }*)) + store %5* %newIcon, %5** %newIcon.addr + %2 = bitcast %5** %newIcon.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable388 to { }*)) + call void @llvm.dbg.stoppoint(i32 40, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %3 = bitcast %3* %tmp to i8* ; [#uses=1] + %add.ptr = getelementptr i8* %3, i32 48 ; [#uses=1] + %4 = bitcast i8* %add.ptr to %5** ; <%5**> [#uses=1] + %tmp1 = load %5** %4 ; <%5*> [#uses=1] + %tmp2 = load %5** %newIcon.addr ; <%5*> [#uses=1] + %cmp = icmp ne %5* %tmp1, %tmp2 ; [#uses=1] + br i1 %cmp, label %if.then, label %if.end + +if.then: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 41, i32 9, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp3 = load %3** %self.addr ; <%3*> [#uses=1] + %5 = bitcast %3* %tmp3 to i8* ; [#uses=1] + %add.ptr4 = getelementptr i8* %5, i32 48 ; [#uses=1] + %6 = bitcast i8* %add.ptr4 to %5** ; <%5**> [#uses=1] + %tmp5 = load %5** %6 ; <%5*> [#uses=1] + %tmp6 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_380" ; <%struct.objc_selector*> [#uses=1] + %tmp7 = bitcast %5* %tmp5 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to void (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %tmp7, %struct.objc_selector* %tmp6) + call void @llvm.dbg.stoppoint(i32 42, i32 9, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp8 = load %3** %self.addr ; <%3*> [#uses=1] + %7 = bitcast %3* %tmp8 to i8* ; [#uses=1] + %add.ptr9 = getelementptr i8* %7, i32 48 ; [#uses=1] + %8 = bitcast i8* %add.ptr9 to %5** ; <%5**> [#uses=1] + %tmp10 = load %5** %newIcon.addr ; <%5*> [#uses=1] + %tmp11 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_374" ; <%struct.objc_selector*> [#uses=1] + %tmp12 = bitcast %5* %tmp10 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call = call %struct.objc_object* bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to %struct.objc_object* (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %tmp12, %struct.objc_selector* %tmp11) ; <%struct.objc_object*> [#uses=1] + %conv = bitcast %struct.objc_object* %call to %5* ; <%5*> [#uses=1] + store %5* %conv, %5** %8 + br label %if.end + +if.end: ; preds = %if.then, %entry + call void @llvm.dbg.stoppoint(i32 44, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram384 to { }*)) + ret void +} + +define internal %5* @"\01-[DVIconAndTextCell icon]"(%3* %self, %struct.objc_selector* %_cmd) nounwind { +entry: + %retval = alloca %5* ; <%5**> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=3] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram390 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable391 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable392 to { }*)) + call void @llvm.dbg.stoppoint(i32 47, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %2 = bitcast %3* %tmp to i8* ; [#uses=1] + %add.ptr = getelementptr i8* %2, i32 48 ; [#uses=1] + %3 = bitcast i8* %add.ptr to %5** ; <%5**> [#uses=1] + %tmp1 = load %5** %3 ; <%5*> [#uses=1] + store %5* %tmp1, %5** %retval + br label %return + ; No predecessors! + br label %return + +return: ; preds = %4, %entry + call void @llvm.dbg.stoppoint(i32 48, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram390 to { }*)) + %5 = load %5** %retval ; <%5*> [#uses=1] + ret %5* %5 +} + +define internal void @"\01-[DVIconAndTextCell preferredIconSize]"(%struct.CGPoint* noalias sret %agg.result, %3* %self, %struct.objc_selector* %_cmd) nounwind { +entry: + %retval = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=3] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram394 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable395 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable396 to { }*)) + call void @llvm.dbg.stoppoint(i32 51, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %2 = bitcast %3* %tmp to i8* ; [#uses=1] + %add.ptr = getelementptr i8* %2, i32 52 ; [#uses=1] + %3 = bitcast i8* %add.ptr to %struct.CGPoint* ; <%struct.CGPoint*> [#uses=1] + %tmp1 = bitcast %struct.CGPoint* %retval to i8* ; [#uses=1] + %tmp2 = bitcast %struct.CGPoint* %3 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp1, i8* %tmp2, i32 16, i32 4) + br label %return + ; No predecessors! + br label %return + +return: ; preds = %4, %entry + call void @llvm.dbg.stoppoint(i32 52, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram394 to { }*)) + %tmp3 = bitcast %struct.CGPoint* %agg.result to i8* ; [#uses=1] + %tmp4 = bitcast %struct.CGPoint* %retval to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp3, i8* %tmp4, i32 16, i32 4) + ret void +} + +define internal void @"\01-[DVIconAndTextCell setPreferredIconSize:]"(%3* %self, %struct.objc_selector* %_cmd, double %size.0, double %size.1) nounwind { +entry: + %self.addr = alloca %3* ; <%3**> [#uses=3] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %size = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=4] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram398 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable399 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable400 to { }*)) + %tmp = getelementptr %struct.CGPoint* %size, i32 0, i32 0 ; [#uses=1] + store double %size.0, double* %tmp + %tmp1 = getelementptr %struct.CGPoint* %size, i32 0, i32 1 ; [#uses=1] + store double %size.1, double* %tmp1 + %2 = bitcast %struct.CGPoint* %size to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable402 to { }*)) + call void @llvm.dbg.stoppoint(i32 55, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp2 = load %3** %self.addr ; <%3*> [#uses=1] + %3 = bitcast %3* %tmp2 to i8* ; [#uses=1] + %add.ptr = getelementptr i8* %3, i32 52 ; [#uses=1] + %4 = bitcast i8* %add.ptr to %struct.CGPoint* ; <%struct.CGPoint*> [#uses=1] + %tmp3 = bitcast %struct.CGPoint* %4 to i8* ; [#uses=1] + %tmp4 = bitcast %struct.CGPoint* %size to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp3, i8* %tmp4, i32 16, i32 4) + call void @llvm.dbg.stoppoint(i32 56, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram398 to { }*)) + ret void +} + +define internal void @"\01-[DVIconAndTextCell iconSizeForBounds:]"(%struct.CGPoint* noalias sret %agg.result, %3* %self, %struct.objc_selector* %_cmd, %struct.CGRect* byval %bounds) nounwind { +entry: + %retval = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=6] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %iconSize = alloca %struct.CGPoint, align 4 ; <%struct.CGPoint*> [#uses=5] + %agg.tmp = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=3] + %tmp22 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram404 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable405 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable406 to { }*)) + %2 = bitcast %struct.CGRect* %bounds to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable427 to { }*)) + call void @llvm.dbg.stoppoint(i32 59, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = bitcast %struct.CGPoint* %iconSize to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable429 to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %4 = bitcast %3* %tmp to i8* ; [#uses=1] + %add.ptr = getelementptr i8* %4, i32 52 ; [#uses=1] + %5 = bitcast i8* %add.ptr to %struct.CGPoint* ; <%struct.CGPoint*> [#uses=1] + %tmp1 = bitcast %struct.CGPoint* %iconSize to i8* ; [#uses=1] + %tmp2 = bitcast %struct.CGPoint* %5 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp1, i8* %tmp2, i32 16, i32 4) + call void @llvm.dbg.stoppoint(i32 60, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp3 = load %3** %self.addr ; <%3*> [#uses=1] + %6 = bitcast %3* %tmp3 to i8* ; [#uses=1] + %add.ptr4 = getelementptr i8* %6, i32 52 ; [#uses=1] + %7 = bitcast i8* %add.ptr4 to %struct.CGPoint* ; <%struct.CGPoint*> [#uses=1] + %tmp5 = bitcast %struct.CGPoint* %agg.tmp to i8* ; [#uses=1] + %tmp6 = bitcast %struct.CGPoint* %7 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp5, i8* %tmp6, i32 16, i32 4) + %tmp7 = getelementptr %struct.CGPoint* %agg.tmp, i32 0, i32 0 ; [#uses=1] + %tmp8 = load double* %tmp7 ; [#uses=1] + %tmp9 = getelementptr %struct.CGPoint* %agg.tmp, i32 0, i32 1 ; [#uses=1] + %tmp10 = load double* %tmp9 ; [#uses=1] + %call = call signext i8 @DVIsEmptySize(double %tmp8, double %tmp10) ; [#uses=1] + %tobool = icmp ne i8 %call, 0 ; [#uses=1] + br i1 %tobool, label %if.then, label %if.end + +if.then: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 61, i32 9, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp11 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp12 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_431" ; <%struct.objc_selector*> [#uses=1] + %tmp13 = bitcast %3* %tmp11 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call14 = call %5* bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to %5* (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %tmp13, %struct.objc_selector* %tmp12) ; <%5*> [#uses=1] + %tobool15 = icmp ne %5* %call14, null ; [#uses=1] + br i1 %tobool15, label %cond.true, label %cond.false + +cond.true: ; preds = %if.then + %tmp16 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp17 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_431" ; <%struct.objc_selector*> [#uses=1] + %tmp18 = bitcast %3* %tmp16 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call19 = call %5* bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to %5* (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %tmp18, %struct.objc_selector* %tmp17) ; <%5*> [#uses=1] + %tmp20 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_433" ; <%struct.objc_selector*> [#uses=1] + %tmp21 = bitcast %5* %call19 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGPoint*, %struct.objc_object*, %struct.objc_selector*)*)(%struct.CGPoint* noalias sret %tmp22, %struct.objc_object* %tmp21, %struct.objc_selector* %tmp20) + %tmp23 = bitcast %struct.CGPoint* %iconSize to i8* ; [#uses=1] + %tmp24 = bitcast %struct.CGPoint* %tmp22 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp23, i8* %tmp24, i32 16, i32 4) + br label %cond.end + +cond.false: ; preds = %if.then + %tmp25 = bitcast %struct.CGPoint* %iconSize to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp25, i8* bitcast (%struct.CGPoint* @NSZeroSize to i8*), i32 16, i32 4) + br label %cond.end + +cond.end: ; preds = %cond.false, %cond.true + br label %if.end + +if.end: ; preds = %cond.end, %entry + call void @llvm.dbg.stoppoint(i32 63, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp26 = bitcast %struct.CGPoint* %retval to i8* ; [#uses=1] + %tmp27 = bitcast %struct.CGPoint* %iconSize to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp26, i8* %tmp27, i32 16, i32 4) + br label %return + ; No predecessors! + br label %return + +return: ; preds = %8, %if.end + call void @llvm.dbg.stoppoint(i32 64, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram404 to { }*)) + %tmp28 = bitcast %struct.CGPoint* %agg.result to i8* ; [#uses=1] + %tmp29 = bitcast %struct.CGPoint* %retval to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp28, i8* %tmp29, i32 16, i32 4) + ret void +} + +declare signext i8 @DVIsEmptySize(double, double) + +declare void @objc_msgSend_stret(%struct.objc_object*, %struct.objc_selector*, ...) + +define internal double @"\01-[DVIconAndTextCell iconInsetForBounds:]"(%3* %self, %struct.objc_selector* %_cmd, %struct.CGRect* byval %bounds) nounwind { +entry: + %retval = alloca double ; [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=3] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %agg.tmp = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp5 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram435 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable436 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable437 to { }*)) + %2 = bitcast %struct.CGRect* %bounds to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable438 to { }*)) + call void @llvm.dbg.stoppoint(i32 67, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %tmp1 = bitcast %struct.CGRect* %agg.tmp to i8* ; [#uses=1] + %tmp2 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp1, i8* %tmp2, i32 32, i32 4) + %tmp3 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_440" ; <%struct.objc_selector*> [#uses=1] + %tmp4 = bitcast %3* %tmp to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGPoint*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGPoint* noalias sret %tmp5, %struct.objc_object* %tmp4, %struct.objc_selector* %tmp3, %struct.CGRect* byval %agg.tmp) + %tmp6 = getelementptr %struct.CGPoint* %tmp5, i32 0, i32 0 ; [#uses=1] + %tmp7 = load double* %tmp6 ; [#uses=1] + %div = fdiv double %tmp7, 3.000000e+00 ; [#uses=1] + %call = call double @floor(double %div) ; [#uses=1] + store double %call, double* %retval + br label %return + ; No predecessors! + br label %return + +return: ; preds = %3, %entry + call void @llvm.dbg.stoppoint(i32 68, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram435 to { }*)) + %4 = load double* %retval ; [#uses=1] + ret double %4 +} + +declare double @floor(double) + +define internal double @"\01-[DVIconAndTextCell textInsetForBounds:]"(%3* %self, %struct.objc_selector* %_cmd, %struct.CGRect* byval %bounds) nounwind { +entry: + %retval = alloca double ; [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=3] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %agg.tmp = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp5 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram442 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable443 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable444 to { }*)) + %2 = bitcast %struct.CGRect* %bounds to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable445 to { }*)) + call void @llvm.dbg.stoppoint(i32 71, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %tmp1 = bitcast %struct.CGRect* %agg.tmp to i8* ; [#uses=1] + %tmp2 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp1, i8* %tmp2, i32 32, i32 4) + %tmp3 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_440" ; <%struct.objc_selector*> [#uses=1] + %tmp4 = bitcast %3* %tmp to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGPoint*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGPoint* noalias sret %tmp5, %struct.objc_object* %tmp4, %struct.objc_selector* %tmp3, %struct.CGRect* byval %agg.tmp) + %tmp6 = getelementptr %struct.CGPoint* %tmp5, i32 0, i32 0 ; [#uses=1] + %tmp7 = load double* %tmp6 ; [#uses=1] + %div = fdiv double %tmp7, 3.000000e+00 ; [#uses=1] + %call = call double @floor(double %div) ; [#uses=1] + store double %call, double* %retval + br label %return + ; No predecessors! + br label %return + +return: ; preds = %3, %entry + call void @llvm.dbg.stoppoint(i32 72, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram442 to { }*)) + %4 = load double* %retval ; [#uses=1] + ret double %4 +} + +define internal %6* @"\01-[DVIconAndTextCell attributedTitle]"(%3* %self, %struct.objc_selector* %_cmd) nounwind { +entry: + %retval = alloca %6* ; <%6**> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=3] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %title = alloca %7*, align 4 ; <%7**> [#uses=3] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram455 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable456 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable457 to { }*)) + call void @llvm.dbg.stoppoint(i32 75, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %2 = bitcast %7** %title to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable465 to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %tmp1 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_467" ; <%struct.objc_selector*> [#uses=1] + %tmp2 = bitcast %3* %tmp to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call = call %6* bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to %6* (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %tmp2, %struct.objc_selector* %tmp1) ; <%6*> [#uses=1] + %tmp3 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_469" ; <%struct.objc_selector*> [#uses=1] + %tmp4 = bitcast %6* %call to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call5 = call %struct.objc_object* bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to %struct.objc_object* (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %tmp4, %struct.objc_selector* %tmp3) ; <%struct.objc_object*> [#uses=1] + %tmp6 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_471" ; <%struct.objc_selector*> [#uses=1] + %call7 = call %struct.objc_object* bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to %struct.objc_object* (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %call5, %struct.objc_selector* %tmp6) ; <%struct.objc_object*> [#uses=1] + %conv = bitcast %struct.objc_object* %call7 to %7* ; <%7*> [#uses=1] + store %7* %conv, %7** %title + call void @llvm.dbg.stoppoint(i32 76, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp8 = load %7** %title ; <%7*> [#uses=1] + %conv9 = bitcast %7* %tmp8 to %6* ; <%6*> [#uses=1] + store %6* %conv9, %6** %retval + br label %return + ; No predecessors! + br label %return + +return: ; preds = %3, %entry + call void @llvm.dbg.stoppoint(i32 77, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram455 to { }*)) + %4 = load %6** %retval ; <%6*> [#uses=1] + ret %6* %4 +} + +define internal void @"\01-[DVIconAndTextCell titleSize]"(%struct.CGPoint* noalias sret %agg.result, %3* %self, %struct.objc_selector* %_cmd) nounwind { +entry: + %retval = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=3] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %tmp5 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram473 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable474 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable475 to { }*)) + call void @llvm.dbg.stoppoint(i32 80, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %tmp1 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_477" ; <%struct.objc_selector*> [#uses=1] + %tmp2 = bitcast %3* %tmp to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call = call %6* bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to %6* (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %tmp2, %struct.objc_selector* %tmp1) ; <%6*> [#uses=1] + %tmp3 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_433" ; <%struct.objc_selector*> [#uses=1] + %tmp4 = bitcast %6* %call to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGPoint*, %struct.objc_object*, %struct.objc_selector*)*)(%struct.CGPoint* noalias sret %tmp5, %struct.objc_object* %tmp4, %struct.objc_selector* %tmp3) + %tmp6 = bitcast %struct.CGPoint* %retval to i8* ; [#uses=1] + %tmp7 = bitcast %struct.CGPoint* %tmp5 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp6, i8* %tmp7, i32 16, i32 4) + br label %return + ; No predecessors! + br label %return + +return: ; preds = %2, %entry + call void @llvm.dbg.stoppoint(i32 81, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram473 to { }*)) + %tmp8 = bitcast %struct.CGPoint* %agg.result to i8* ; [#uses=1] + %tmp9 = bitcast %struct.CGPoint* %retval to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp8, i8* %tmp9, i32 16, i32 4) + ret void +} + +define internal void @"\01-[DVIconAndTextCell titleAndIconRectForBounds:]"(%struct.CGRect* noalias sret %agg.result, %3* %self, %struct.objc_selector* %_cmd, %struct.CGRect* byval %bounds) nounwind { +entry: + %retval.i175 = alloca double ; [#uses=2] + %aRect172 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i168 = alloca double ; [#uses=2] + %aRect165 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i154 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %w.addr.i155 = alloca double ; [#uses=3] + %h.addr.i156 = alloca double ; [#uses=3] + %s.i = alloca %struct.CGPoint, align 4 ; <%struct.CGPoint*> [#uses=4] + %retval.i150 = alloca double ; [#uses=2] + %aRect147 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i143 = alloca double ; [#uses=2] + %aRect140 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i136 = alloca double ; [#uses=2] + %aRect133 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i129 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %x.addr.i = alloca double ; [#uses=3] + %y.addr.i = alloca double ; [#uses=3] + %w.addr.i = alloca double ; [#uses=3] + %h.addr.i = alloca double ; [#uses=3] + %r.i = alloca %struct.CGRect, align 4 ; <%struct.CGRect*> [#uses=6] + %retval.i = alloca double ; [#uses=2] + %aRect = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=6] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %iconInset = alloca double, align 8 ; [#uses=3] + %agg.tmp = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %textInset = alloca double, align 8 ; [#uses=5] + %agg.tmp7 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %iconSize = alloca %struct.CGPoint, align 4 ; <%struct.CGPoint*> [#uses=8] + %agg.tmp15 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp20 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %textSize = alloca %struct.CGPoint, align 4 ; <%struct.CGPoint*> [#uses=8] + %tmp27 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %maxLegalWidth = alloca double, align 8 ; [#uses=4] + %agg.tmp31 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %titleAndIconSize = alloca %struct.CGPoint, align 4 ; <%struct.CGPoint*> [#uses=5] + %agg.tmp65 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp85 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp91 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %x = alloca double, align 8 ; [#uses=4] + %y = alloca double, align 8 ; [#uses=3] + %agg.tmp96 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp100 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp110 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp122 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable480 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable481 to { }*)) + %2 = bitcast %struct.CGRect* %bounds to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable482 to { }*)) + call void @llvm.dbg.stoppoint(i32 84, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = bitcast double* %iconInset to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable484 to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %tmp1 = bitcast %struct.CGRect* %agg.tmp to i8* ; [#uses=1] + %tmp2 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp1, i8* %tmp2, i32 32, i32 4) + %tmp3 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_486" ; <%struct.objc_selector*> [#uses=1] + %tmp4 = bitcast %3* %tmp to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call = call double bitcast (double (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_fpret to double (%struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.objc_object* %tmp4, %struct.objc_selector* %tmp3, %struct.CGRect* byval %agg.tmp) ; [#uses=1] + store double %call, double* %iconInset + call void @llvm.dbg.stoppoint(i32 85, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = bitcast double* %textInset to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %4, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable488 to { }*)) + %tmp6 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp8 = bitcast %struct.CGRect* %agg.tmp7 to i8* ; [#uses=1] + %tmp9 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp8, i8* %tmp9, i32 32, i32 4) + %tmp10 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_490" ; <%struct.objc_selector*> [#uses=1] + %tmp11 = bitcast %3* %tmp6 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call12 = call double bitcast (double (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_fpret to double (%struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.objc_object* %tmp11, %struct.objc_selector* %tmp10, %struct.CGRect* byval %agg.tmp7) ; [#uses=1] + store double %call12, double* %textInset + call void @llvm.dbg.stoppoint(i32 86, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %5 = bitcast %struct.CGPoint* %iconSize to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %5, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable491 to { }*)) + %tmp14 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp16 = bitcast %struct.CGRect* %agg.tmp15 to i8* ; [#uses=1] + %tmp17 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp16, i8* %tmp17, i32 32, i32 4) + %tmp18 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_440" ; <%struct.objc_selector*> [#uses=1] + %tmp19 = bitcast %3* %tmp14 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGPoint*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGPoint* noalias sret %tmp20, %struct.objc_object* %tmp19, %struct.objc_selector* %tmp18, %struct.CGRect* byval %agg.tmp15) + %tmp21 = bitcast %struct.CGPoint* %iconSize to i8* ; [#uses=1] + %tmp22 = bitcast %struct.CGPoint* %tmp20 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp21, i8* %tmp22, i32 16, i32 4) + call void @llvm.dbg.stoppoint(i32 87, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %6 = bitcast %struct.CGPoint* %textSize to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %6, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable493 to { }*)) + %tmp24 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp25 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_495" ; <%struct.objc_selector*> [#uses=1] + %tmp26 = bitcast %3* %tmp24 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGPoint*, %struct.objc_object*, %struct.objc_selector*)*)(%struct.CGPoint* noalias sret %tmp27, %struct.objc_object* %tmp26, %struct.objc_selector* %tmp25) + %tmp28 = bitcast %struct.CGPoint* %textSize to i8* ; [#uses=1] + %tmp29 = bitcast %struct.CGPoint* %tmp27 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp28, i8* %tmp29, i32 16, i32 4) + call void @llvm.dbg.stoppoint(i32 88, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %7 = bitcast double* %maxLegalWidth to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %7, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable497 to { }*)) + %tmp32 = bitcast %struct.CGRect* %agg.tmp31 to i8* ; [#uses=1] + %tmp33 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp32, i8* %tmp33, i32 32, i32 4) + %tmp127 = bitcast %struct.CGRect* %aRect to i8* ; [#uses=1] + %tmp128 = bitcast %struct.CGRect* %agg.tmp31 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp127, i8* %tmp128, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1010 to { }*)) + %8 = bitcast %struct.CGRect* %aRect to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %8, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1011 to { }*)) + call void @llvm.dbg.stoppoint(i32 134, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i = getelementptr %struct.CGRect* %aRect, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i = getelementptr %struct.CGPoint* %tmp.i, i32 0, i32 0 ; [#uses=1] + %tmp2.i = load double* %tmp1.i ; [#uses=1] + store double %tmp2.i, double* %retval.i + call void @llvm.dbg.stoppoint(i32 135, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %9 = load double* %retval.i ; [#uses=1] + %tmp35 = load double* %textInset ; [#uses=1] + %sub = sub double %9, %tmp35 ; [#uses=1] + store double %sub, double* %maxLegalWidth + call void @llvm.dbg.stoppoint(i32 89, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1010 to { }*)) + %10 = bitcast %struct.CGPoint* %titleAndIconSize to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %10, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable499 to { }*)) + %tmp37 = getelementptr %struct.CGPoint* %iconSize, i32 0, i32 0 ; [#uses=1] + %tmp38 = load double* %tmp37 ; [#uses=1] + %tmp39 = load double* %textInset ; [#uses=1] + %add = add double %tmp38, %tmp39 ; [#uses=1] + %tmp40 = getelementptr %struct.CGPoint* %textSize, i32 0, i32 0 ; [#uses=1] + %tmp41 = load double* %tmp40 ; [#uses=1] + %add42 = add double %add, %tmp41 ; [#uses=1] + %tmp43 = load double* %maxLegalWidth ; [#uses=1] + %cmp = fcmp olt double %add42, %tmp43 ; [#uses=1] + br i1 %cmp, label %cond.true, label %cond.false + +cond.true: ; preds = %entry + %tmp44 = getelementptr %struct.CGPoint* %iconSize, i32 0, i32 0 ; [#uses=1] + %tmp45 = load double* %tmp44 ; [#uses=1] + %tmp46 = load double* %textInset ; [#uses=1] + %add47 = add double %tmp45, %tmp46 ; [#uses=1] + %tmp48 = getelementptr %struct.CGPoint* %textSize, i32 0, i32 0 ; [#uses=1] + %tmp49 = load double* %tmp48 ; [#uses=1] + %add50 = add double %add47, %tmp49 ; [#uses=1] + br label %cond.end + +cond.false: ; preds = %entry + %tmp51 = load double* %maxLegalWidth ; [#uses=1] + br label %cond.end + +cond.end: ; preds = %cond.false, %cond.true + %cond = phi double [ %add50, %cond.true ], [ %tmp51, %cond.false ] ; [#uses=1] + %tmp52 = getelementptr %struct.CGPoint* %iconSize, i32 0, i32 1 ; [#uses=1] + %tmp53 = load double* %tmp52 ; [#uses=1] + %tmp54 = getelementptr %struct.CGPoint* %textSize, i32 0, i32 1 ; [#uses=1] + %tmp55 = load double* %tmp54 ; [#uses=1] + %cmp56 = fcmp ogt double %tmp53, %tmp55 ; [#uses=1] + br i1 %cmp56, label %cond.true57, label %cond.false60 + +cond.true57: ; preds = %cond.end + %tmp58 = getelementptr %struct.CGPoint* %iconSize, i32 0, i32 1 ; [#uses=1] + %tmp59 = load double* %tmp58 ; [#uses=1] + br label %cond.end63 + +cond.false60: ; preds = %cond.end + %tmp61 = getelementptr %struct.CGPoint* %textSize, i32 0, i32 1 ; [#uses=1] + %tmp62 = load double* %tmp61 ; [#uses=1] + br label %cond.end63 + +cond.end63: ; preds = %cond.false60, %cond.true57 + %cond64 = phi double [ %tmp59, %cond.true57 ], [ %tmp62, %cond.false60 ] ; [#uses=1] + %tmp66 = bitcast %struct.CGRect* %agg.tmp65 to i8* ; [#uses=1] + %tmp67 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp66, i8* %tmp67, i32 32, i32 4) + %tmp173 = bitcast %struct.CGRect* %aRect172 to i8* ; [#uses=1] + %tmp174 = bitcast %struct.CGRect* %agg.tmp65 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp173, i8* %tmp174, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1001 to { }*)) + %11 = bitcast %struct.CGRect* %aRect172 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %11, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1002 to { }*)) + call void @llvm.dbg.stoppoint(i32 138, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i176 = getelementptr %struct.CGRect* %aRect172, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i177 = getelementptr %struct.CGPoint* %tmp.i176, i32 0, i32 1 ; [#uses=1] + %tmp2.i178 = load double* %tmp1.i177 ; [#uses=1] + store double %tmp2.i178, double* %retval.i175 + call void @llvm.dbg.stoppoint(i32 139, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %12 = load double* %retval.i175 ; [#uses=1] + %cmp69 = fcmp olt double %cond64, %12 ; [#uses=1] + br i1 %cmp69, label %cond.true70, label %cond.false84 + +cond.true70: ; preds = %cond.end63 + %tmp71 = getelementptr %struct.CGPoint* %iconSize, i32 0, i32 1 ; [#uses=1] + %tmp72 = load double* %tmp71 ; [#uses=1] + %tmp73 = getelementptr %struct.CGPoint* %textSize, i32 0, i32 1 ; [#uses=1] + %tmp74 = load double* %tmp73 ; [#uses=1] + %cmp75 = fcmp ogt double %tmp72, %tmp74 ; [#uses=1] + br i1 %cmp75, label %cond.true76, label %cond.false79 + +cond.true76: ; preds = %cond.true70 + %tmp77 = getelementptr %struct.CGPoint* %iconSize, i32 0, i32 1 ; [#uses=1] + %tmp78 = load double* %tmp77 ; [#uses=1] + br label %cond.end82 + +cond.false79: ; preds = %cond.true70 + %tmp80 = getelementptr %struct.CGPoint* %textSize, i32 0, i32 1 ; [#uses=1] + %tmp81 = load double* %tmp80 ; [#uses=1] + br label %cond.end82 + +cond.end82: ; preds = %cond.false79, %cond.true76 + %cond83 = phi double [ %tmp78, %cond.true76 ], [ %tmp81, %cond.false79 ] ; [#uses=1] + br label %cond.end89 + +cond.false84: ; preds = %cond.end63 + %tmp86 = bitcast %struct.CGRect* %agg.tmp85 to i8* ; [#uses=1] + %tmp87 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp86, i8* %tmp87, i32 32, i32 4) + %tmp166 = bitcast %struct.CGRect* %aRect165 to i8* ; [#uses=1] + %tmp167 = bitcast %struct.CGRect* %agg.tmp85 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp166, i8* %tmp167, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1001 to { }*)) + %13 = bitcast %struct.CGRect* %aRect165 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %13, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1002 to { }*)) + call void @llvm.dbg.stoppoint(i32 138, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i169 = getelementptr %struct.CGRect* %aRect165, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i170 = getelementptr %struct.CGPoint* %tmp.i169, i32 0, i32 1 ; [#uses=1] + %tmp2.i171 = load double* %tmp1.i170 ; [#uses=1] + store double %tmp2.i171, double* %retval.i168 + call void @llvm.dbg.stoppoint(i32 139, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %14 = load double* %retval.i168 ; [#uses=1] + br label %cond.end89 + +cond.end89: ; preds = %cond.false84, %cond.end82 + %cond90 = phi double [ %cond83, %cond.end82 ], [ %14, %cond.false84 ] ; [#uses=1] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1004 to { }*)) nounwind + store double %cond, double* %w.addr.i155 + %15 = bitcast double* %w.addr.i155 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %15, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1005 to { }*)) nounwind + store double %cond90, double* %h.addr.i156 + %16 = bitcast double* %h.addr.i156 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %16, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1006 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 94, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %17 = bitcast %struct.CGPoint* %s.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %17, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1008 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 95, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp.i157 = getelementptr %struct.CGPoint* %s.i, i32 0, i32 0 ; [#uses=1] + %tmp1.i158 = load double* %w.addr.i155 ; [#uses=1] + store double %tmp1.i158, double* %tmp.i157 + call void @llvm.dbg.stoppoint(i32 96, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp2.i159 = getelementptr %struct.CGPoint* %s.i, i32 0, i32 1 ; [#uses=1] + %tmp3.i160 = load double* %h.addr.i156 ; [#uses=1] + store double %tmp3.i160, double* %tmp2.i159 + call void @llvm.dbg.stoppoint(i32 97, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp4.i161 = bitcast %struct.CGPoint* %retval.i154 to i8* ; [#uses=1] + %tmp5.i162 = bitcast %struct.CGPoint* %s.i to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp4.i161, i8* %tmp5.i162, i32 16, i32 4) nounwind + call void @llvm.dbg.stoppoint(i32 98, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp6.i163 = bitcast %struct.CGPoint* %tmp91 to i8* ; [#uses=1] + %tmp7.i164 = bitcast %struct.CGPoint* %retval.i154 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp6.i163, i8* %tmp7.i164, i32 16, i32 4) nounwind + %tmp92 = bitcast %struct.CGPoint* %titleAndIconSize to i8* ; [#uses=1] + %tmp93 = bitcast %struct.CGPoint* %tmp91 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp92, i8* %tmp93, i32 16, i32 4) + call void @llvm.dbg.stoppoint(i32 90, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1004 to { }*)) + %18 = bitcast double* %x to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %18, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable500 to { }*)) + store double 0.000000e+00, double* %x + %19 = bitcast double* %y to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %19, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable501 to { }*)) + %tmp97 = bitcast %struct.CGRect* %agg.tmp96 to i8* ; [#uses=1] + %tmp98 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp97, i8* %tmp98, i32 32, i32 4) + %tmp148 = bitcast %struct.CGRect* %aRect147 to i8* ; [#uses=1] + %tmp149 = bitcast %struct.CGRect* %agg.tmp96 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp148, i8* %tmp149, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram998 to { }*)) + %20 = bitcast %struct.CGRect* %aRect147 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %20, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable999 to { }*)) + call void @llvm.dbg.stoppoint(i32 130, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i151 = getelementptr %struct.CGRect* %aRect147, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i152 = getelementptr %struct.CGPoint* %tmp.i151, i32 0, i32 1 ; [#uses=1] + %tmp2.i153 = load double* %tmp1.i152 ; [#uses=1] + store double %tmp2.i153, double* %retval.i150 + call void @llvm.dbg.stoppoint(i32 131, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %21 = load double* %retval.i150 ; [#uses=1] + %tmp101 = bitcast %struct.CGRect* %agg.tmp100 to i8* ; [#uses=1] + %tmp102 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp101, i8* %tmp102, i32 32, i32 4) + %tmp141 = bitcast %struct.CGRect* %aRect140 to i8* ; [#uses=1] + %tmp142 = bitcast %struct.CGRect* %agg.tmp100 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp141, i8* %tmp142, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1001 to { }*)) + %22 = bitcast %struct.CGRect* %aRect140 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %22, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1002 to { }*)) + call void @llvm.dbg.stoppoint(i32 138, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram998 to { }*)) + %tmp.i144 = getelementptr %struct.CGRect* %aRect140, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i145 = getelementptr %struct.CGPoint* %tmp.i144, i32 0, i32 1 ; [#uses=1] + %tmp2.i146 = load double* %tmp1.i145 ; [#uses=1] + store double %tmp2.i146, double* %retval.i143 + call void @llvm.dbg.stoppoint(i32 139, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %23 = load double* %retval.i143 ; [#uses=1] + %div = fdiv double %23, 2.000000e+00 ; [#uses=1] + %tmp104 = getelementptr %struct.CGPoint* %titleAndIconSize, i32 0, i32 1 ; [#uses=1] + %tmp105 = load double* %tmp104 ; [#uses=1] + %div106 = fdiv double %tmp105, 2.000000e+00 ; [#uses=1] + %sub107 = sub double %div, %div106 ; [#uses=1] + %call108 = call double @floor(double %sub107) ; [#uses=1] + %add109 = add double %21, %call108 ; [#uses=1] + store double %add109, double* %y + call void @llvm.dbg.stoppoint(i32 91, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1001 to { }*)) + %tmp111 = bitcast %struct.CGRect* %agg.tmp110 to i8* ; [#uses=1] + %tmp112 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp111, i8* %tmp112, i32 32, i32 4) + %tmp134 = bitcast %struct.CGRect* %aRect133 to i8* ; [#uses=1] + %tmp135 = bitcast %struct.CGRect* %agg.tmp110 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp134, i8* %tmp135, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram995 to { }*)) + %24 = bitcast %struct.CGRect* %aRect133 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %24, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable996 to { }*)) + call void @llvm.dbg.stoppoint(i32 126, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i137 = getelementptr %struct.CGRect* %aRect133, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i138 = getelementptr %struct.CGPoint* %tmp.i137, i32 0, i32 0 ; [#uses=1] + %tmp2.i139 = load double* %tmp1.i138 ; [#uses=1] + store double %tmp2.i139, double* %retval.i136 + call void @llvm.dbg.stoppoint(i32 127, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %25 = load double* %retval.i136 ; [#uses=1] + %tmp114 = load double* %iconInset ; [#uses=1] + %add115 = add double %25, %tmp114 ; [#uses=1] + store double %add115, double* %x + call void @llvm.dbg.stoppoint(i32 92, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram995 to { }*)) + %tmp116 = load double* %x ; [#uses=1] + %tmp117 = load double* %y ; [#uses=1] + %tmp118 = getelementptr %struct.CGPoint* %titleAndIconSize, i32 0, i32 0 ; [#uses=1] + %tmp119 = load double* %tmp118 ; [#uses=1] + %tmp120 = getelementptr %struct.CGPoint* %titleAndIconSize, i32 0, i32 1 ; [#uses=1] + %tmp121 = load double* %tmp120 ; [#uses=1] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram985 to { }*)) nounwind + store double %tmp116, double* %x.addr.i + %26 = bitcast double* %x.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %26, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable986 to { }*)) nounwind + store double %tmp117, double* %y.addr.i + %27 = bitcast double* %y.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %27, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable987 to { }*)) nounwind + store double %tmp119, double* %w.addr.i + %28 = bitcast double* %w.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %28, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable989 to { }*)) nounwind + store double %tmp121, double* %h.addr.i + %29 = bitcast double* %h.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %29, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable991 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 101, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %30 = bitcast %struct.CGRect* %r.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %30, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable993 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 102, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp.i130 = getelementptr %struct.CGRect* %r.i, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i131 = getelementptr %struct.CGPoint* %tmp.i130, i32 0, i32 0 ; [#uses=1] + %tmp2.i132 = load double* %x.addr.i ; [#uses=1] + store double %tmp2.i132, double* %tmp1.i131 + call void @llvm.dbg.stoppoint(i32 103, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp3.i = getelementptr %struct.CGRect* %r.i, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp4.i = getelementptr %struct.CGPoint* %tmp3.i, i32 0, i32 1 ; [#uses=1] + %tmp5.i = load double* %y.addr.i ; [#uses=1] + store double %tmp5.i, double* %tmp4.i + call void @llvm.dbg.stoppoint(i32 104, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp6.i = getelementptr %struct.CGRect* %r.i, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp7.i = getelementptr %struct.CGPoint* %tmp6.i, i32 0, i32 0 ; [#uses=1] + %tmp8.i = load double* %w.addr.i ; [#uses=1] + store double %tmp8.i, double* %tmp7.i + call void @llvm.dbg.stoppoint(i32 105, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp9.i = getelementptr %struct.CGRect* %r.i, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp10.i = getelementptr %struct.CGPoint* %tmp9.i, i32 0, i32 1 ; [#uses=1] + %tmp11.i = load double* %h.addr.i ; [#uses=1] + store double %tmp11.i, double* %tmp10.i + call void @llvm.dbg.stoppoint(i32 106, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp12.i = bitcast %struct.CGRect* %retval.i129 to i8* ; [#uses=1] + %tmp13.i = bitcast %struct.CGRect* %r.i to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp12.i, i8* %tmp13.i, i32 32, i32 4) nounwind + call void @llvm.dbg.stoppoint(i32 107, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp14.i = bitcast %struct.CGRect* %tmp122 to i8* ; [#uses=1] + %tmp15.i = bitcast %struct.CGRect* %retval.i129 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp14.i, i8* %tmp15.i, i32 32, i32 4) nounwind + %tmp123 = bitcast %struct.CGRect* %retval to i8* ; [#uses=1] + %tmp124 = bitcast %struct.CGRect* %tmp122 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp123, i8* %tmp124, i32 32, i32 4) + br label %return + ; No predecessors! + br label %return + +return: ; preds = %31, %cond.end89 + call void @llvm.dbg.stoppoint(i32 93, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*)) + %tmp125 = bitcast %struct.CGRect* %agg.result to i8* ; [#uses=1] + %tmp126 = bitcast %struct.CGRect* %retval to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp125, i8* %tmp126, i32 32, i32 4) + ret void +} + +declare double @objc_msgSend_fpret(%struct.objc_object*, %struct.objc_selector*, ...) + +define internal void @"\01-[DVIconAndTextCell iconRectForBounds:]"(%struct.CGRect* noalias sret %agg.result, %3* %self, %struct.objc_selector* %_cmd, %struct.CGRect* byval %bounds) nounwind { +entry: + %retval.i77 = alloca double ; [#uses=2] + %aRect74 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i70 = alloca double ; [#uses=2] + %aRect67 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i63 = alloca double ; [#uses=2] + %aRect60 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i56 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %x.addr.i = alloca double ; [#uses=3] + %y.addr.i = alloca double ; [#uses=3] + %w.addr.i = alloca double ; [#uses=3] + %h.addr.i = alloca double ; [#uses=3] + %r.i = alloca %struct.CGRect, align 4 ; <%struct.CGRect*> [#uses=6] + %retval.i = alloca double ; [#uses=2] + %aRect = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=4] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %iconSize = alloca %struct.CGPoint, align 4 ; <%struct.CGPoint*> [#uses=6] + %agg.tmp = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp5 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %unionRect = alloca %struct.CGRect, align 4 ; <%struct.CGRect*> [#uses=6] + %agg.tmp10 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp15 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %shorter = alloca i8, align 1 ; [#uses=3] + %agg.tmp21 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %y = alloca double, align 8 ; [#uses=3] + %agg.tmp26 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp32 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp40 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp49 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable504 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable505 to { }*)) + %2 = bitcast %struct.CGRect* %bounds to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable506 to { }*)) + call void @llvm.dbg.stoppoint(i32 96, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = bitcast %struct.CGPoint* %iconSize to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable507 to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %tmp1 = bitcast %struct.CGRect* %agg.tmp to i8* ; [#uses=1] + %tmp2 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp1, i8* %tmp2, i32 32, i32 4) + %tmp3 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_440" ; <%struct.objc_selector*> [#uses=1] + %tmp4 = bitcast %3* %tmp to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGPoint*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGPoint* noalias sret %tmp5, %struct.objc_object* %tmp4, %struct.objc_selector* %tmp3, %struct.CGRect* byval %agg.tmp) + %tmp6 = bitcast %struct.CGPoint* %iconSize to i8* ; [#uses=1] + %tmp7 = bitcast %struct.CGPoint* %tmp5 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp6, i8* %tmp7, i32 16, i32 4) + call void @llvm.dbg.stoppoint(i32 97, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = bitcast %struct.CGRect* %unionRect to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %4, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable509 to { }*)) + %tmp9 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp11 = bitcast %struct.CGRect* %agg.tmp10 to i8* ; [#uses=1] + %tmp12 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp11, i8* %tmp12, i32 32, i32 4) + %tmp13 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_511" ; <%struct.objc_selector*> [#uses=1] + %tmp14 = bitcast %3* %tmp9 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGRect*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGRect* noalias sret %tmp15, %struct.objc_object* %tmp14, %struct.objc_selector* %tmp13, %struct.CGRect* byval %agg.tmp10) + %tmp16 = bitcast %struct.CGRect* %unionRect to i8* ; [#uses=1] + %tmp17 = bitcast %struct.CGRect* %tmp15 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp16, i8* %tmp17, i32 32, i32 4) + call void @llvm.dbg.stoppoint(i32 98, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %5 = bitcast i8* %shorter to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %5, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable517 to { }*)) + %tmp19 = getelementptr %struct.CGPoint* %iconSize, i32 0, i32 1 ; [#uses=1] + %tmp20 = load double* %tmp19 ; [#uses=1] + %tmp22 = bitcast %struct.CGRect* %agg.tmp21 to i8* ; [#uses=1] + %tmp23 = bitcast %struct.CGRect* %unionRect to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp22, i8* %tmp23, i32 32, i32 4) + %tmp54 = bitcast %struct.CGRect* %aRect to i8* ; [#uses=1] + %tmp55 = bitcast %struct.CGRect* %agg.tmp21 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp54, i8* %tmp55, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1001 to { }*)) + %6 = bitcast %struct.CGRect* %aRect to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %6, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1002 to { }*)) + call void @llvm.dbg.stoppoint(i32 138, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i = getelementptr %struct.CGRect* %aRect, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i = getelementptr %struct.CGPoint* %tmp.i, i32 0, i32 1 ; [#uses=1] + %tmp2.i = load double* %tmp1.i ; [#uses=1] + store double %tmp2.i, double* %retval.i + call void @llvm.dbg.stoppoint(i32 139, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %7 = load double* %retval.i ; [#uses=1] + %cmp = fcmp olt double %tmp20, %7 ; [#uses=1] + %conv = zext i1 %cmp to i32 ; [#uses=1] + %conv24 = trunc i32 %conv to i8 ; [#uses=1] + store i8 %conv24, i8* %shorter + call void @llvm.dbg.stoppoint(i32 99, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1001 to { }*)) + %8 = bitcast double* %y to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %8, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable518 to { }*)) + %tmp27 = bitcast %struct.CGRect* %agg.tmp26 to i8* ; [#uses=1] + %tmp28 = bitcast %struct.CGRect* %unionRect to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp27, i8* %tmp28, i32 32, i32 4) + %tmp75 = bitcast %struct.CGRect* %aRect74 to i8* ; [#uses=1] + %tmp76 = bitcast %struct.CGRect* %agg.tmp26 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp75, i8* %tmp76, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram998 to { }*)) + %9 = bitcast %struct.CGRect* %aRect74 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %9, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable999 to { }*)) + call void @llvm.dbg.stoppoint(i32 130, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i78 = getelementptr %struct.CGRect* %aRect74, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i79 = getelementptr %struct.CGPoint* %tmp.i78, i32 0, i32 1 ; [#uses=1] + %tmp2.i80 = load double* %tmp1.i79 ; [#uses=1] + store double %tmp2.i80, double* %retval.i77 + call void @llvm.dbg.stoppoint(i32 131, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %10 = load double* %retval.i77 ; [#uses=1] + %tmp30 = load i8* %shorter ; [#uses=1] + %conv31 = sext i8 %tmp30 to i32 ; [#uses=1] + %tobool = icmp ne i32 %conv31, 0 ; [#uses=1] + br i1 %tobool, label %cond.true, label %cond.false + +cond.true: ; preds = %entry + %tmp33 = bitcast %struct.CGRect* %agg.tmp32 to i8* ; [#uses=1] + %tmp34 = bitcast %struct.CGRect* %unionRect to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp33, i8* %tmp34, i32 32, i32 4) + %tmp68 = bitcast %struct.CGRect* %aRect67 to i8* ; [#uses=1] + %tmp69 = bitcast %struct.CGRect* %agg.tmp32 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp68, i8* %tmp69, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1001 to { }*)) + %11 = bitcast %struct.CGRect* %aRect67 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %11, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1002 to { }*)) + call void @llvm.dbg.stoppoint(i32 138, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i71 = getelementptr %struct.CGRect* %aRect67, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i72 = getelementptr %struct.CGPoint* %tmp.i71, i32 0, i32 1 ; [#uses=1] + %tmp2.i73 = load double* %tmp1.i72 ; [#uses=1] + store double %tmp2.i73, double* %retval.i70 + call void @llvm.dbg.stoppoint(i32 139, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %12 = load double* %retval.i70 ; [#uses=1] + %div = fdiv double %12, 2.000000e+00 ; [#uses=1] + %tmp36 = getelementptr %struct.CGPoint* %iconSize, i32 0, i32 1 ; [#uses=1] + %tmp37 = load double* %tmp36 ; [#uses=1] + %div38 = fdiv double %tmp37, 2.000000e+00 ; [#uses=1] + %sub = sub double %div, %div38 ; [#uses=1] + br label %cond.end + +cond.false: ; preds = %entry + br label %cond.end + +cond.end: ; preds = %cond.false, %cond.true + %cond = phi double [ %sub, %cond.true ], [ 0.000000e+00, %cond.false ] ; [#uses=1] + %call39 = call double @floor(double %cond) ; [#uses=1] + %add = add double %10, %call39 ; [#uses=1] + store double %add, double* %y + call void @llvm.dbg.stoppoint(i32 100, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp41 = bitcast %struct.CGRect* %agg.tmp40 to i8* ; [#uses=1] + %tmp42 = bitcast %struct.CGRect* %unionRect to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp41, i8* %tmp42, i32 32, i32 4) + %tmp61 = bitcast %struct.CGRect* %aRect60 to i8* ; [#uses=1] + %tmp62 = bitcast %struct.CGRect* %agg.tmp40 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp61, i8* %tmp62, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram995 to { }*)) + %13 = bitcast %struct.CGRect* %aRect60 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %13, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable996 to { }*)) + call void @llvm.dbg.stoppoint(i32 126, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i64 = getelementptr %struct.CGRect* %aRect60, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i65 = getelementptr %struct.CGPoint* %tmp.i64, i32 0, i32 0 ; [#uses=1] + %tmp2.i66 = load double* %tmp1.i65 ; [#uses=1] + store double %tmp2.i66, double* %retval.i63 + call void @llvm.dbg.stoppoint(i32 127, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %14 = load double* %retval.i63 ; [#uses=1] + %tmp44 = load double* %y ; [#uses=1] + %tmp45 = getelementptr %struct.CGPoint* %iconSize, i32 0, i32 0 ; [#uses=1] + %tmp46 = load double* %tmp45 ; [#uses=1] + %tmp47 = getelementptr %struct.CGPoint* %iconSize, i32 0, i32 1 ; [#uses=1] + %tmp48 = load double* %tmp47 ; [#uses=1] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram985 to { }*)) nounwind + store double %14, double* %x.addr.i + %15 = bitcast double* %x.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %15, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable986 to { }*)) nounwind + store double %tmp44, double* %y.addr.i + %16 = bitcast double* %y.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %16, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable987 to { }*)) nounwind + store double %tmp46, double* %w.addr.i + %17 = bitcast double* %w.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %17, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable989 to { }*)) nounwind + store double %tmp48, double* %h.addr.i + %18 = bitcast double* %h.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %18, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable991 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 101, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram995 to { }*)) + %19 = bitcast %struct.CGRect* %r.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %19, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable993 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 102, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp.i57 = getelementptr %struct.CGRect* %r.i, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i58 = getelementptr %struct.CGPoint* %tmp.i57, i32 0, i32 0 ; [#uses=1] + %tmp2.i59 = load double* %x.addr.i ; [#uses=1] + store double %tmp2.i59, double* %tmp1.i58 + call void @llvm.dbg.stoppoint(i32 103, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp3.i = getelementptr %struct.CGRect* %r.i, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp4.i = getelementptr %struct.CGPoint* %tmp3.i, i32 0, i32 1 ; [#uses=1] + %tmp5.i = load double* %y.addr.i ; [#uses=1] + store double %tmp5.i, double* %tmp4.i + call void @llvm.dbg.stoppoint(i32 104, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp6.i = getelementptr %struct.CGRect* %r.i, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp7.i = getelementptr %struct.CGPoint* %tmp6.i, i32 0, i32 0 ; [#uses=1] + %tmp8.i = load double* %w.addr.i ; [#uses=1] + store double %tmp8.i, double* %tmp7.i + call void @llvm.dbg.stoppoint(i32 105, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp9.i = getelementptr %struct.CGRect* %r.i, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp10.i = getelementptr %struct.CGPoint* %tmp9.i, i32 0, i32 1 ; [#uses=1] + %tmp11.i = load double* %h.addr.i ; [#uses=1] + store double %tmp11.i, double* %tmp10.i + call void @llvm.dbg.stoppoint(i32 106, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp12.i = bitcast %struct.CGRect* %retval.i56 to i8* ; [#uses=1] + %tmp13.i = bitcast %struct.CGRect* %r.i to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp12.i, i8* %tmp13.i, i32 32, i32 4) nounwind + call void @llvm.dbg.stoppoint(i32 107, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp14.i = bitcast %struct.CGRect* %tmp49 to i8* ; [#uses=1] + %tmp15.i = bitcast %struct.CGRect* %retval.i56 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp14.i, i8* %tmp15.i, i32 32, i32 4) nounwind + %tmp50 = bitcast %struct.CGRect* %retval to i8* ; [#uses=1] + %tmp51 = bitcast %struct.CGRect* %tmp49 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp50, i8* %tmp51, i32 32, i32 4) + br label %return + ; No predecessors! + br label %return + +return: ; preds = %20, %cond.end + call void @llvm.dbg.stoppoint(i32 101, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*)) + %tmp52 = bitcast %struct.CGRect* %agg.result to i8* ; [#uses=1] + %tmp53 = bitcast %struct.CGRect* %retval to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp52, i8* %tmp53, i32 32, i32 4) + ret void +} + +define internal void @"\01-[DVIconAndTextCell titleRectForBounds:]"(%struct.CGRect* noalias sret %agg.result, %3* %self, %struct.objc_selector* %_cmd, %struct.CGRect* byval %bounds) nounwind { +entry: + %retval.i130 = alloca double ; [#uses=2] + %aRect127 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i123 = alloca double ; [#uses=2] + %aRect120 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i116 = alloca double ; [#uses=2] + %aRect113 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i109 = alloca double ; [#uses=2] + %aRect106 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i102 = alloca double ; [#uses=2] + %aRect99 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval.i95 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %x.addr.i = alloca double ; [#uses=3] + %y.addr.i = alloca double ; [#uses=3] + %w.addr.i = alloca double ; [#uses=3] + %h.addr.i = alloca double ; [#uses=3] + %r.i = alloca %struct.CGRect, align 4 ; <%struct.CGRect*> [#uses=6] + %retval.i = alloca double ; [#uses=2] + %aRect = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=3] + %retval = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=6] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %textInset = alloca double, align 8 ; [#uses=3] + %agg.tmp = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %iconSize = alloca %struct.CGPoint, align 4 ; <%struct.CGPoint*> [#uses=3] + %agg.tmp7 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp12 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %titleSize = alloca %struct.CGPoint, align 4 ; <%struct.CGPoint*> [#uses=5] + %tmp19 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %unionRect = alloca %struct.CGRect, align 4 ; <%struct.CGRect*> [#uses=8] + %agg.tmp24 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp29 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %iconIndet = alloca double, align 8 ; [#uses=4] + %shorter = alloca i8, align 1 ; [#uses=4] + %agg.tmp39 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %y = alloca double, align 8 ; [#uses=3] + %agg.tmp45 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp51 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %height = alloca double, align 8 ; [#uses=3] + %agg.tmp68 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp74 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp81 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp88 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable521 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable522 to { }*)) + %2 = bitcast %struct.CGRect* %bounds to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable523 to { }*)) + call void @llvm.dbg.stoppoint(i32 104, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = bitcast double* %textInset to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable524 to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %tmp1 = bitcast %struct.CGRect* %agg.tmp to i8* ; [#uses=1] + %tmp2 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp1, i8* %tmp2, i32 32, i32 4) + %tmp3 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_490" ; <%struct.objc_selector*> [#uses=1] + %tmp4 = bitcast %3* %tmp to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call = call double bitcast (double (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_fpret to double (%struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.objc_object* %tmp4, %struct.objc_selector* %tmp3, %struct.CGRect* byval %agg.tmp) ; [#uses=1] + store double %call, double* %textInset + call void @llvm.dbg.stoppoint(i32 105, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = bitcast %struct.CGPoint* %iconSize to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %4, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable525 to { }*)) + %tmp6 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp8 = bitcast %struct.CGRect* %agg.tmp7 to i8* ; [#uses=1] + %tmp9 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp8, i8* %tmp9, i32 32, i32 4) + %tmp10 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_440" ; <%struct.objc_selector*> [#uses=1] + %tmp11 = bitcast %3* %tmp6 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGPoint*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGPoint* noalias sret %tmp12, %struct.objc_object* %tmp11, %struct.objc_selector* %tmp10, %struct.CGRect* byval %agg.tmp7) + %tmp13 = bitcast %struct.CGPoint* %iconSize to i8* ; [#uses=1] + %tmp14 = bitcast %struct.CGPoint* %tmp12 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp13, i8* %tmp14, i32 16, i32 4) + call void @llvm.dbg.stoppoint(i32 106, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %5 = bitcast %struct.CGPoint* %titleSize to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %5, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable527 to { }*)) + %tmp16 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp17 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_495" ; <%struct.objc_selector*> [#uses=1] + %tmp18 = bitcast %3* %tmp16 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGPoint*, %struct.objc_object*, %struct.objc_selector*)*)(%struct.CGPoint* noalias sret %tmp19, %struct.objc_object* %tmp18, %struct.objc_selector* %tmp17) + %tmp20 = bitcast %struct.CGPoint* %titleSize to i8* ; [#uses=1] + %tmp21 = bitcast %struct.CGPoint* %tmp19 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp20, i8* %tmp21, i32 16, i32 4) + call void @llvm.dbg.stoppoint(i32 107, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %6 = bitcast %struct.CGRect* %unionRect to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %6, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable528 to { }*)) + %tmp23 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp25 = bitcast %struct.CGRect* %agg.tmp24 to i8* ; [#uses=1] + %tmp26 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp25, i8* %tmp26, i32 32, i32 4) + %tmp27 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_511" ; <%struct.objc_selector*> [#uses=1] + %tmp28 = bitcast %3* %tmp23 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGRect*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGRect* noalias sret %tmp29, %struct.objc_object* %tmp28, %struct.objc_selector* %tmp27, %struct.CGRect* byval %agg.tmp24) + %tmp30 = bitcast %struct.CGRect* %unionRect to i8* ; [#uses=1] + %tmp31 = bitcast %struct.CGRect* %tmp29 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp30, i8* %tmp31, i32 32, i32 4) + call void @llvm.dbg.stoppoint(i32 108, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %7 = bitcast double* %iconIndet to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %7, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable530 to { }*)) + %tmp33 = getelementptr %struct.CGPoint* %iconSize, i32 0, i32 0 ; [#uses=1] + %tmp34 = load double* %tmp33 ; [#uses=1] + %tmp35 = load double* %textInset ; [#uses=1] + %add = add double %tmp34, %tmp35 ; [#uses=1] + store double %add, double* %iconIndet + call void @llvm.dbg.stoppoint(i32 109, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %8 = bitcast i8* %shorter to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %8, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable531 to { }*)) + %tmp37 = getelementptr %struct.CGPoint* %titleSize, i32 0, i32 1 ; [#uses=1] + %tmp38 = load double* %tmp37 ; [#uses=1] + %tmp40 = bitcast %struct.CGRect* %agg.tmp39 to i8* ; [#uses=1] + %tmp41 = bitcast %struct.CGRect* %unionRect to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp40, i8* %tmp41, i32 32, i32 4) + %tmp93 = bitcast %struct.CGRect* %aRect to i8* ; [#uses=1] + %tmp94 = bitcast %struct.CGRect* %agg.tmp39 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp93, i8* %tmp94, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1001 to { }*)) + %9 = bitcast %struct.CGRect* %aRect to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %9, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1002 to { }*)) + call void @llvm.dbg.stoppoint(i32 138, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i = getelementptr %struct.CGRect* %aRect, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i = getelementptr %struct.CGPoint* %tmp.i, i32 0, i32 1 ; [#uses=1] + %tmp2.i = load double* %tmp1.i ; [#uses=1] + store double %tmp2.i, double* %retval.i + call void @llvm.dbg.stoppoint(i32 139, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %10 = load double* %retval.i ; [#uses=1] + %cmp = fcmp olt double %tmp38, %10 ; [#uses=1] + %conv = zext i1 %cmp to i32 ; [#uses=1] + %conv43 = trunc i32 %conv to i8 ; [#uses=1] + store i8 %conv43, i8* %shorter + call void @llvm.dbg.stoppoint(i32 110, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1001 to { }*)) + %11 = bitcast double* %y to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %11, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable532 to { }*)) + %tmp46 = bitcast %struct.CGRect* %agg.tmp45 to i8* ; [#uses=1] + %tmp47 = bitcast %struct.CGRect* %unionRect to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp46, i8* %tmp47, i32 32, i32 4) + %tmp128 = bitcast %struct.CGRect* %aRect127 to i8* ; [#uses=1] + %tmp129 = bitcast %struct.CGRect* %agg.tmp45 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp128, i8* %tmp129, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram998 to { }*)) + %12 = bitcast %struct.CGRect* %aRect127 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %12, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable999 to { }*)) + call void @llvm.dbg.stoppoint(i32 130, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i131 = getelementptr %struct.CGRect* %aRect127, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i132 = getelementptr %struct.CGPoint* %tmp.i131, i32 0, i32 1 ; [#uses=1] + %tmp2.i133 = load double* %tmp1.i132 ; [#uses=1] + store double %tmp2.i133, double* %retval.i130 + call void @llvm.dbg.stoppoint(i32 131, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %13 = load double* %retval.i130 ; [#uses=1] + %tmp49 = load i8* %shorter ; [#uses=1] + %conv50 = sext i8 %tmp49 to i32 ; [#uses=1] + %tobool = icmp ne i32 %conv50, 0 ; [#uses=1] + br i1 %tobool, label %cond.true, label %cond.false + +cond.true: ; preds = %entry + %tmp52 = bitcast %struct.CGRect* %agg.tmp51 to i8* ; [#uses=1] + %tmp53 = bitcast %struct.CGRect* %unionRect to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp52, i8* %tmp53, i32 32, i32 4) + %tmp121 = bitcast %struct.CGRect* %aRect120 to i8* ; [#uses=1] + %tmp122 = bitcast %struct.CGRect* %agg.tmp51 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp121, i8* %tmp122, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1001 to { }*)) + %14 = bitcast %struct.CGRect* %aRect120 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %14, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1002 to { }*)) + call void @llvm.dbg.stoppoint(i32 138, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i124 = getelementptr %struct.CGRect* %aRect120, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i125 = getelementptr %struct.CGPoint* %tmp.i124, i32 0, i32 1 ; [#uses=1] + %tmp2.i126 = load double* %tmp1.i125 ; [#uses=1] + store double %tmp2.i126, double* %retval.i123 + call void @llvm.dbg.stoppoint(i32 139, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %15 = load double* %retval.i123 ; [#uses=1] + %div = fdiv double %15, 2.000000e+00 ; [#uses=1] + %tmp55 = getelementptr %struct.CGPoint* %titleSize, i32 0, i32 1 ; [#uses=1] + %tmp56 = load double* %tmp55 ; [#uses=1] + %div57 = fdiv double %tmp56, 2.000000e+00 ; [#uses=1] + %sub = sub double %div, %div57 ; [#uses=1] + br label %cond.end + +cond.false: ; preds = %entry + br label %cond.end + +cond.end: ; preds = %cond.false, %cond.true + %cond = phi double [ %sub, %cond.true ], [ 0.000000e+00, %cond.false ] ; [#uses=1] + %call58 = call double @floor(double %cond) ; [#uses=1] + %add59 = add double %13, %call58 ; [#uses=1] + store double %add59, double* %y + call void @llvm.dbg.stoppoint(i32 111, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %16 = bitcast double* %height to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %16, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable533 to { }*)) + %tmp61 = load i8* %shorter ; [#uses=1] + %conv62 = sext i8 %tmp61 to i32 ; [#uses=1] + %tobool63 = icmp ne i32 %conv62, 0 ; [#uses=1] + br i1 %tobool63, label %cond.true64, label %cond.false67 + +cond.true64: ; preds = %cond.end + %tmp65 = getelementptr %struct.CGPoint* %titleSize, i32 0, i32 1 ; [#uses=1] + %tmp66 = load double* %tmp65 ; [#uses=1] + br label %cond.end72 + +cond.false67: ; preds = %cond.end + %tmp69 = bitcast %struct.CGRect* %agg.tmp68 to i8* ; [#uses=1] + %tmp70 = bitcast %struct.CGRect* %unionRect to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp69, i8* %tmp70, i32 32, i32 4) + %tmp114 = bitcast %struct.CGRect* %aRect113 to i8* ; [#uses=1] + %tmp115 = bitcast %struct.CGRect* %agg.tmp68 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp114, i8* %tmp115, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1001 to { }*)) + %17 = bitcast %struct.CGRect* %aRect113 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %17, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1002 to { }*)) + call void @llvm.dbg.stoppoint(i32 138, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i117 = getelementptr %struct.CGRect* %aRect113, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i118 = getelementptr %struct.CGPoint* %tmp.i117, i32 0, i32 1 ; [#uses=1] + %tmp2.i119 = load double* %tmp1.i118 ; [#uses=1] + store double %tmp2.i119, double* %retval.i116 + call void @llvm.dbg.stoppoint(i32 139, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %18 = load double* %retval.i116 ; [#uses=1] + br label %cond.end72 + +cond.end72: ; preds = %cond.false67, %cond.true64 + %cond73 = phi double [ %tmp66, %cond.true64 ], [ %18, %cond.false67 ] ; [#uses=1] + store double %cond73, double* %height + call void @llvm.dbg.stoppoint(i32 112, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp75 = bitcast %struct.CGRect* %agg.tmp74 to i8* ; [#uses=1] + %tmp76 = bitcast %struct.CGRect* %unionRect to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp75, i8* %tmp76, i32 32, i32 4) + %tmp107 = bitcast %struct.CGRect* %aRect106 to i8* ; [#uses=1] + %tmp108 = bitcast %struct.CGRect* %agg.tmp74 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp107, i8* %tmp108, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram995 to { }*)) + %19 = bitcast %struct.CGRect* %aRect106 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %19, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable996 to { }*)) + call void @llvm.dbg.stoppoint(i32 126, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i110 = getelementptr %struct.CGRect* %aRect106, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i111 = getelementptr %struct.CGPoint* %tmp.i110, i32 0, i32 0 ; [#uses=1] + %tmp2.i112 = load double* %tmp1.i111 ; [#uses=1] + store double %tmp2.i112, double* %retval.i109 + call void @llvm.dbg.stoppoint(i32 127, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %20 = load double* %retval.i109 ; [#uses=1] + %tmp78 = load double* %iconIndet ; [#uses=1] + %add79 = add double %20, %tmp78 ; [#uses=1] + %tmp80 = load double* %y ; [#uses=1] + %tmp82 = bitcast %struct.CGRect* %agg.tmp81 to i8* ; [#uses=1] + %tmp83 = bitcast %struct.CGRect* %unionRect to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp82, i8* %tmp83, i32 32, i32 4) + %tmp100 = bitcast %struct.CGRect* %aRect99 to i8* ; [#uses=1] + %tmp101 = bitcast %struct.CGRect* %agg.tmp81 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp100, i8* %tmp101, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1010 to { }*)) + %21 = bitcast %struct.CGRect* %aRect99 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %21, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1011 to { }*)) + call void @llvm.dbg.stoppoint(i32 134, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram995 to { }*)) + %tmp.i103 = getelementptr %struct.CGRect* %aRect99, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i104 = getelementptr %struct.CGPoint* %tmp.i103, i32 0, i32 0 ; [#uses=1] + %tmp2.i105 = load double* %tmp1.i104 ; [#uses=1] + store double %tmp2.i105, double* %retval.i102 + call void @llvm.dbg.stoppoint(i32 135, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %22 = load double* %retval.i102 ; [#uses=1] + %tmp85 = load double* %iconIndet ; [#uses=1] + %sub86 = sub double %22, %tmp85 ; [#uses=1] + %tmp87 = load double* %height ; [#uses=1] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram985 to { }*)) nounwind + store double %add79, double* %x.addr.i + %23 = bitcast double* %x.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %23, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable986 to { }*)) nounwind + store double %tmp80, double* %y.addr.i + %24 = bitcast double* %y.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %24, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable987 to { }*)) nounwind + store double %sub86, double* %w.addr.i + %25 = bitcast double* %w.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %25, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable989 to { }*)) nounwind + store double %tmp87, double* %h.addr.i + %26 = bitcast double* %h.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %26, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable991 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 101, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1010 to { }*)) + %27 = bitcast %struct.CGRect* %r.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %27, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable993 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 102, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp.i96 = getelementptr %struct.CGRect* %r.i, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i97 = getelementptr %struct.CGPoint* %tmp.i96, i32 0, i32 0 ; [#uses=1] + %tmp2.i98 = load double* %x.addr.i ; [#uses=1] + store double %tmp2.i98, double* %tmp1.i97 + call void @llvm.dbg.stoppoint(i32 103, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp3.i = getelementptr %struct.CGRect* %r.i, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp4.i = getelementptr %struct.CGPoint* %tmp3.i, i32 0, i32 1 ; [#uses=1] + %tmp5.i = load double* %y.addr.i ; [#uses=1] + store double %tmp5.i, double* %tmp4.i + call void @llvm.dbg.stoppoint(i32 104, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp6.i = getelementptr %struct.CGRect* %r.i, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp7.i = getelementptr %struct.CGPoint* %tmp6.i, i32 0, i32 0 ; [#uses=1] + %tmp8.i = load double* %w.addr.i ; [#uses=1] + store double %tmp8.i, double* %tmp7.i + call void @llvm.dbg.stoppoint(i32 105, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp9.i = getelementptr %struct.CGRect* %r.i, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp10.i = getelementptr %struct.CGPoint* %tmp9.i, i32 0, i32 1 ; [#uses=1] + %tmp11.i = load double* %h.addr.i ; [#uses=1] + store double %tmp11.i, double* %tmp10.i + call void @llvm.dbg.stoppoint(i32 106, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp12.i = bitcast %struct.CGRect* %retval.i95 to i8* ; [#uses=1] + %tmp13.i = bitcast %struct.CGRect* %r.i to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp12.i, i8* %tmp13.i, i32 32, i32 4) nounwind + call void @llvm.dbg.stoppoint(i32 107, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp14.i = bitcast %struct.CGRect* %tmp88 to i8* ; [#uses=1] + %tmp15.i = bitcast %struct.CGRect* %retval.i95 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp14.i, i8* %tmp15.i, i32 32, i32 4) nounwind + %tmp89 = bitcast %struct.CGRect* %retval to i8* ; [#uses=1] + %tmp90 = bitcast %struct.CGRect* %tmp88 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp89, i8* %tmp90, i32 32, i32 4) + br label %return + ; No predecessors! + br label %return + +return: ; preds = %28, %cond.end72 + call void @llvm.dbg.stoppoint(i32 113, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*)) + %tmp91 = bitcast %struct.CGRect* %agg.result to i8* ; [#uses=1] + %tmp92 = bitcast %struct.CGRect* %retval to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp91, i8* %tmp92, i32 32, i32 4) + ret void +} + +define internal void @"\01-[DVIconAndTextCell expansionFrameWithFrame:inView:]"(%struct.CGRect* noalias sret %agg.result, %3* %self, %struct.objc_selector* %_cmd, %struct.CGRect* byval %cellFrame, %8* %view) nounwind { +entry: + %retval = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=3] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %view.addr = alloca %8* ; <%8**> [#uses=2] + %expansionFrame = alloca %struct.CGRect, align 4 ; <%struct.CGRect*> [#uses=7] + %tmp8 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %agg.tmp = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp13 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram535 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable536 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable537 to { }*)) + %2 = bitcast %struct.CGRect* %cellFrame to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable539 to { }*)) + store %8* %view, %8** %view.addr + %3 = bitcast %8** %view.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable876 to { }*)) + call void @llvm.dbg.stoppoint(i32 116, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = bitcast %struct.CGRect* %expansionFrame to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %4, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable878 to { }*)) + %tmp = getelementptr %struct.CGRect* %expansionFrame, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1 = getelementptr %struct.CGRect* %cellFrame, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp2 = bitcast %struct.CGPoint* %tmp to i8* ; [#uses=1] + %tmp3 = bitcast %struct.CGPoint* %tmp1 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp2, i8* %tmp3, i32 16, i32 4) + %tmp4 = getelementptr %struct.CGRect* %expansionFrame, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp5 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp6 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_880" ; <%struct.objc_selector*> [#uses=1] + %tmp7 = bitcast %3* %tmp5 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGPoint*, %struct.objc_object*, %struct.objc_selector*)*)(%struct.CGPoint* noalias sret %tmp8, %struct.objc_object* %tmp7, %struct.objc_selector* %tmp6) + %tmp9 = bitcast %struct.CGPoint* %tmp4 to i8* ; [#uses=1] + %tmp10 = bitcast %struct.CGPoint* %tmp8 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp9, i8* %tmp10, i32 16, i32 4) + call void @llvm.dbg.stoppoint(i32 117, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp11 = bitcast %struct.CGRect* %agg.tmp to i8* ; [#uses=1] + %tmp12 = bitcast %struct.CGRect* %cellFrame to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp11, i8* %tmp12, i32 32, i32 4) + %tmp14 = bitcast %struct.CGRect* %agg.tmp13 to i8* ; [#uses=1] + %tmp15 = bitcast %struct.CGRect* %expansionFrame to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp14, i8* %tmp15, i32 32, i32 4) + %call = call signext i8 @NSContainsRect(%struct.CGRect* byval %agg.tmp, %struct.CGRect* byval %agg.tmp13) ; [#uses=1] + %tobool = icmp ne i8 %call, 0 ; [#uses=1] + br i1 %tobool, label %if.else, label %if.then + +if.then: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 118, i32 9, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp16 = getelementptr %struct.CGRect* %expansionFrame, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp17 = getelementptr %struct.CGPoint* %tmp16, i32 0, i32 1 ; [#uses=2] + %tmp18 = load double* %tmp17 ; [#uses=1] + %add = add double %tmp18, 1.000000e+00 ; [#uses=1] + store double %add, double* %tmp17 + br label %if.end + +if.else: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 120, i32 9, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp19 = bitcast %struct.CGRect* %expansionFrame to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp19, i8* bitcast (%struct.CGRect* @NSZeroRect to i8*), i32 32, i32 4) + br label %if.end + +if.end: ; preds = %if.else, %if.then + call void @llvm.dbg.stoppoint(i32 122, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp20 = bitcast %struct.CGRect* %retval to i8* ; [#uses=1] + %tmp21 = bitcast %struct.CGRect* %expansionFrame to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp20, i8* %tmp21, i32 32, i32 4) + br label %return + ; No predecessors! + br label %return + +return: ; preds = %5, %if.end + call void @llvm.dbg.stoppoint(i32 123, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram535 to { }*)) + %tmp22 = bitcast %struct.CGRect* %agg.result to i8* ; [#uses=1] + %tmp23 = bitcast %struct.CGRect* %retval to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp22, i8* %tmp23, i32 32, i32 4) + ret void +} + +declare signext i8 @NSContainsRect(%struct.CGRect* byval, %struct.CGRect* byval) + +define internal void @"\01-[DVIconAndTextCell cellSizeForBounds:]"(%struct.CGPoint* noalias sret %agg.result, %3* %self, %struct.objc_selector* %_cmd, %struct.CGRect* byval %bounds) nounwind { +entry: + %retval.i = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %w.addr.i = alloca double ; [#uses=3] + %h.addr.i = alloca double ; [#uses=3] + %s.i = alloca %struct.CGPoint, align 4 ; <%struct.CGPoint*> [#uses=4] + %retval = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=4] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %iconInset = alloca double, align 8 ; [#uses=3] + %agg.tmp = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %contentSize = alloca %struct.CGPoint, align 4 ; <%struct.CGPoint*> [#uses=4] + %agg.tmp7 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp12 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp21 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram882 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable883 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable884 to { }*)) + %2 = bitcast %struct.CGRect* %bounds to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable885 to { }*)) + call void @llvm.dbg.stoppoint(i32 126, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = bitcast double* %iconInset to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable886 to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %tmp1 = bitcast %struct.CGRect* %agg.tmp to i8* ; [#uses=1] + %tmp2 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp1, i8* %tmp2, i32 32, i32 4) + %tmp3 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_486" ; <%struct.objc_selector*> [#uses=1] + %tmp4 = bitcast %3* %tmp to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call = call double bitcast (double (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_fpret to double (%struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.objc_object* %tmp4, %struct.objc_selector* %tmp3, %struct.CGRect* byval %agg.tmp) ; [#uses=1] + store double %call, double* %iconInset + call void @llvm.dbg.stoppoint(i32 127, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = bitcast %struct.CGPoint* %contentSize to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %4, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable888 to { }*)) + %tmp6 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp8 = bitcast %struct.CGRect* %agg.tmp7 to i8* ; [#uses=1] + %tmp9 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp8, i8* %tmp9, i32 32, i32 4) + %tmp10 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_511" ; <%struct.objc_selector*> [#uses=1] + %tmp11 = bitcast %3* %tmp6 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGRect*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGRect* noalias sret %tmp12, %struct.objc_object* %tmp11, %struct.objc_selector* %tmp10, %struct.CGRect* byval %agg.tmp7) + %tmp13 = getelementptr %struct.CGRect* %tmp12, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp14 = bitcast %struct.CGPoint* %contentSize to i8* ; [#uses=1] + %tmp15 = bitcast %struct.CGPoint* %tmp13 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp14, i8* %tmp15, i32 16, i32 4) + call void @llvm.dbg.stoppoint(i32 128, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp16 = getelementptr %struct.CGPoint* %contentSize, i32 0, i32 0 ; [#uses=1] + %tmp17 = load double* %tmp16 ; [#uses=1] + %tmp18 = load double* %iconInset ; [#uses=1] + %add = add double %tmp17, %tmp18 ; [#uses=1] + %tmp19 = getelementptr %struct.CGPoint* %contentSize, i32 0, i32 1 ; [#uses=1] + %tmp20 = load double* %tmp19 ; [#uses=1] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1004 to { }*)) nounwind + store double %add, double* %w.addr.i + %5 = bitcast double* %w.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %5, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1005 to { }*)) nounwind + store double %tmp20, double* %h.addr.i + %6 = bitcast double* %h.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %6, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1006 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 94, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %7 = bitcast %struct.CGPoint* %s.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %7, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1008 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 95, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp.i = getelementptr %struct.CGPoint* %s.i, i32 0, i32 0 ; [#uses=1] + %tmp1.i = load double* %w.addr.i ; [#uses=1] + store double %tmp1.i, double* %tmp.i + call void @llvm.dbg.stoppoint(i32 96, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp2.i = getelementptr %struct.CGPoint* %s.i, i32 0, i32 1 ; [#uses=1] + %tmp3.i = load double* %h.addr.i ; [#uses=1] + store double %tmp3.i, double* %tmp2.i + call void @llvm.dbg.stoppoint(i32 97, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp4.i = bitcast %struct.CGPoint* %retval.i to i8* ; [#uses=1] + %tmp5.i = bitcast %struct.CGPoint* %s.i to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp4.i, i8* %tmp5.i, i32 16, i32 4) nounwind + call void @llvm.dbg.stoppoint(i32 98, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp6.i = bitcast %struct.CGPoint* %tmp21 to i8* ; [#uses=1] + %tmp7.i = bitcast %struct.CGPoint* %retval.i to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp6.i, i8* %tmp7.i, i32 16, i32 4) nounwind + %tmp22 = bitcast %struct.CGPoint* %retval to i8* ; [#uses=1] + %tmp23 = bitcast %struct.CGPoint* %tmp21 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp22, i8* %tmp23, i32 16, i32 4) + br label %return + ; No predecessors! + br label %return + +return: ; preds = %8, %entry + call void @llvm.dbg.stoppoint(i32 129, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram882 to { }*)) + %tmp24 = bitcast %struct.CGPoint* %agg.result to i8* ; [#uses=1] + %tmp25 = bitcast %struct.CGPoint* %retval to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp24, i8* %tmp25, i32 16, i32 4) + ret void +} + +define internal signext i8 @"\01-[DVIconAndTextCell isOpaque]"(%3* %self, %struct.objc_selector* %_cmd) nounwind { +entry: + %retval = alloca i8 ; [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=2] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram890 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable891 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable892 to { }*)) + call void @llvm.dbg.stoppoint(i32 132, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + store i8 0, i8* %retval + br label %return + ; No predecessors! + br label %return + +return: ; preds = %2, %entry + call void @llvm.dbg.stoppoint(i32 133, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram890 to { }*)) + %3 = load i8* %retval ; [#uses=1] + ret i8 %3 +} + +define internal void @"\01-[DVIconAndTextCell drawWithExpansionFrame:inView:]"(%3* %self, %struct.objc_selector* %_cmd, %struct.CGRect* byval %cellFrame, %8* %view) nounwind { +entry: + %self.addr = alloca %3* ; <%3**> [#uses=3] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %view.addr = alloca %8* ; <%8**> [#uses=3] + %agg.tmp = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=3] + %tmp4 = alloca %struct.CGPoint ; <%struct.CGPoint*> [#uses=2] + %agg.tmp12 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram894 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable895 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable896 to { }*)) + %2 = bitcast %struct.CGRect* %cellFrame to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable897 to { }*)) + store %8* %view, %8** %view.addr + %3 = bitcast %8** %view.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable898 to { }*)) + call void @llvm.dbg.stoppoint(i32 137, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp = getelementptr %struct.CGRect* %cellFrame, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1 = getelementptr %struct.CGRect* %cellFrame, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp2 = bitcast %struct.CGPoint* %agg.tmp to i8* ; [#uses=1] + %tmp3 = bitcast %struct.CGPoint* %tmp1 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp2, i8* %tmp3, i32 16, i32 4) + %tmp5 = getelementptr %struct.CGPoint* %agg.tmp, i32 0, i32 0 ; [#uses=1] + %tmp6 = load double* %tmp5 ; [#uses=1] + %tmp7 = getelementptr %struct.CGPoint* %agg.tmp, i32 0, i32 1 ; [#uses=1] + %tmp8 = load double* %tmp7 ; [#uses=1] + call void @DVPointByFlooringPoint(%struct.CGPoint* noalias sret %tmp4, double %tmp6, double %tmp8) + %tmp9 = bitcast %struct.CGPoint* %tmp to i8* ; [#uses=1] + %tmp10 = bitcast %struct.CGPoint* %tmp4 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp9, i8* %tmp10, i32 16, i32 4) + call void @llvm.dbg.stoppoint(i32 138, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %self11 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp13 = bitcast %struct.CGRect* %agg.tmp12 to i8* ; [#uses=1] + %tmp14 = bitcast %struct.CGRect* %cellFrame to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp13, i8* %tmp14, i32 32, i32 4) + %tmp15 = load %8** %view.addr ; <%8*> [#uses=1] + %objc_super = alloca %struct._objc_super ; <%struct._objc_super*> [#uses=3] + %4 = bitcast %3* %self11 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %5 = getelementptr %struct._objc_super* %objc_super, i32 0, i32 0 ; <%struct.objc_object**> [#uses=1] + store %struct.objc_object* %4, %struct.objc_object** %5 + %tmp16 = load %struct._objc_class** @"\01L_OBJC_CLASS_REFERENCES_" ; <%struct._objc_class*> [#uses=1] + %6 = bitcast %struct._objc_class* %tmp16 to %struct.objc_class* ; <%struct.objc_class*> [#uses=1] + %7 = getelementptr %struct._objc_super* %objc_super, i32 0, i32 1 ; <%struct.objc_class**> [#uses=1] + store %struct.objc_class* %6, %struct.objc_class** %7 + %tmp17 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_900" ; <%struct.objc_selector*> [#uses=1] + call void bitcast (%struct.objc_object* (%struct._objc_super*, %struct.objc_selector*, ...)* @objc_msgSendSuper to void (%struct._objc_super*, %struct.objc_selector*, %struct.CGRect*, %8*)*)(%struct._objc_super* %objc_super, %struct.objc_selector* %tmp17, %struct.CGRect* byval %agg.tmp12, %8* %tmp15) + call void @llvm.dbg.stoppoint(i32 139, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram894 to { }*)) + ret void +} + +declare void @DVPointByFlooringPoint(%struct.CGPoint* noalias sret, double, double) + +define internal void @"\01-[DVIconAndTextCell drawInteriorWithFrame:inView:]"(%3* %self, %struct.objc_selector* %_cmd, %struct.CGRect* byval %bounds, %8* %controlView) nounwind { +entry: + %self.addr = alloca %3* ; <%3**> [#uses=7] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %controlView.addr = alloca %8* ; <%8**> [#uses=3] + %agg.tmp = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp2 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp4 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp9 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp16 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp18 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp23 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %attributedTitle = alloca %6*, align 4 ; <%6**> [#uses=3] + %titleRect = alloca %struct.CGRect, align 4 ; <%struct.CGRect*> [#uses=3] + %agg.tmp39 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp44 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp48 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram902 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable903 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable904 to { }*)) + %2 = bitcast %struct.CGRect* %bounds to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable905 to { }*)) + store %8* %controlView, %8** %controlView.addr + %3 = bitcast %8** %controlView.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable907 to { }*)) + call void @llvm.dbg.stoppoint(i32 142, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp = bitcast %struct.CGRect* %agg.tmp to i8* ; [#uses=1] + %tmp1 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp, i8* %tmp1, i32 32, i32 4) + %tmp3 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp5 = bitcast %struct.CGRect* %agg.tmp4 to i8* ; [#uses=1] + %tmp6 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp5, i8* %tmp6, i32 32, i32 4) + %tmp7 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_909" ; <%struct.objc_selector*> [#uses=1] + %tmp8 = bitcast %3* %tmp3 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGRect*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGRect* noalias sret %tmp9, %struct.objc_object* %tmp8, %struct.objc_selector* %tmp7, %struct.CGRect* byval %agg.tmp4) + %tmp10 = bitcast %struct.CGRect* %agg.tmp2 to i8* ; [#uses=1] + %tmp11 = bitcast %struct.CGRect* %tmp9 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp10, i8* %tmp11, i32 32, i32 4) + %call = call signext i8 @NSContainsRect(%struct.CGRect* byval %agg.tmp, %struct.CGRect* byval %agg.tmp2) ; [#uses=1] + %tobool = icmp ne i8 %call, 0 ; [#uses=1] + br i1 %tobool, label %if.then, label %if.end + +if.then: ; preds = %entry + call void @llvm.dbg.stoppoint(i32 143, i32 9, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp12 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp13 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_431" ; <%struct.objc_selector*> [#uses=1] + %tmp14 = bitcast %3* %tmp12 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call15 = call %5* bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to %5* (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %tmp14, %struct.objc_selector* %tmp13) ; <%5*> [#uses=1] + %tmp17 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp19 = bitcast %struct.CGRect* %agg.tmp18 to i8* ; [#uses=1] + %tmp20 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp19, i8* %tmp20, i32 32, i32 4) + %tmp21 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_909" ; <%struct.objc_selector*> [#uses=1] + %tmp22 = bitcast %3* %tmp17 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGRect*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGRect* noalias sret %tmp23, %struct.objc_object* %tmp22, %struct.objc_selector* %tmp21, %struct.CGRect* byval %agg.tmp18) + %tmp24 = bitcast %struct.CGRect* %agg.tmp16 to i8* ; [#uses=1] + %tmp25 = bitcast %struct.CGRect* %tmp23 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp24, i8* %tmp25, i32 32, i32 4) + %tmp26 = load %8** %controlView.addr ; <%8*> [#uses=1] + %tmp27 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_911" ; <%struct.objc_selector*> [#uses=1] + %tmp28 = bitcast %8* %tmp26 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call29 = call signext i8 bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to i8 (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %tmp28, %struct.objc_selector* %tmp27) ; [#uses=1] + %tmp30 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_913" ; <%struct.objc_selector*> [#uses=1] + %tmp31 = bitcast %5* %call15 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to void (%struct.objc_object*, %struct.objc_selector*, %struct.CGRect*, i32, double, i8)*)(%struct.objc_object* %tmp31, %struct.objc_selector* %tmp30, %struct.CGRect* byval %agg.tmp16, i32 2, double 1.000000e+00, i8 signext %call29) + br label %if.end + +if.end: ; preds = %if.then, %entry + call void @llvm.dbg.stoppoint(i32 145, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %4 = bitcast %6** %attributedTitle to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %4, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable915 to { }*)) + %tmp33 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp34 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_477" ; <%struct.objc_selector*> [#uses=1] + %tmp35 = bitcast %3* %tmp33 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %call36 = call %6* bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to %6* (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %tmp35, %struct.objc_selector* %tmp34) ; <%6*> [#uses=1] + store %6* %call36, %6** %attributedTitle + call void @llvm.dbg.stoppoint(i32 146, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %5 = bitcast %struct.CGRect* %titleRect to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %5, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable917 to { }*)) + %tmp38 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp40 = bitcast %struct.CGRect* %agg.tmp39 to i8* ; [#uses=1] + %tmp41 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp40, i8* %tmp41, i32 32, i32 4) + %tmp42 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_919" ; <%struct.objc_selector*> [#uses=1] + %tmp43 = bitcast %3* %tmp38 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGRect*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGRect* noalias sret %tmp44, %struct.objc_object* %tmp43, %struct.objc_selector* %tmp42, %struct.CGRect* byval %agg.tmp39) + %tmp45 = bitcast %struct.CGRect* %titleRect to i8* ; [#uses=1] + %tmp46 = bitcast %struct.CGRect* %tmp44 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp45, i8* %tmp46, i32 32, i32 4) + call void @llvm.dbg.stoppoint(i32 147, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp47 = load %6** %attributedTitle ; <%6*> [#uses=1] + %tmp49 = bitcast %struct.CGRect* %agg.tmp48 to i8* ; [#uses=1] + %tmp50 = bitcast %struct.CGRect* %titleRect to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp49, i8* %tmp50, i32 32, i32 4) + %tmp51 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_921" ; <%struct.objc_selector*> [#uses=1] + %tmp52 = bitcast %6* %tmp47 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to void (%struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.objc_object* %tmp52, %struct.objc_selector* %tmp51, %struct.CGRect* byval %agg.tmp48) + call void @llvm.dbg.stoppoint(i32 148, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram902 to { }*)) + ret void +} + +define internal void @"\01-[DVIconAndTextCell titleEditingRectForBounds:]"(%struct.CGRect* noalias sret %agg.result, %3* %self, %struct.objc_selector* %_cmd, %struct.CGRect* byval %bounds) nounwind { +entry: + %retval.i46 = alloca double ; [#uses=2] + %aRect43 = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=4] + %retval.i36 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %x.addr.i = alloca double ; [#uses=3] + %y.addr.i = alloca double ; [#uses=3] + %w.addr.i = alloca double ; [#uses=3] + %h.addr.i = alloca double ; [#uses=3] + %r.i = alloca %struct.CGRect, align 4 ; <%struct.CGRect*> [#uses=6] + %retval.i = alloca double ; [#uses=2] + %aRect = alloca %struct.CGRect, align 8 ; <%struct.CGRect*> [#uses=4] + %retval = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %self.addr = alloca %3* ; <%3**> [#uses=3] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %titleRect = alloca %struct.CGRect, align 4 ; <%struct.CGRect*> [#uses=7] + %agg.tmp = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp5 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp17 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp20 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp29 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram923 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable924 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable925 to { }*)) + %2 = bitcast %struct.CGRect* %bounds to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable926 to { }*)) + call void @llvm.dbg.stoppoint(i32 151, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %3 = bitcast %struct.CGRect* %titleRect to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable927 to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %tmp1 = bitcast %struct.CGRect* %agg.tmp to i8* ; [#uses=1] + %tmp2 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp1, i8* %tmp2, i32 32, i32 4) + %tmp3 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_919" ; <%struct.objc_selector*> [#uses=1] + %tmp4 = bitcast %3* %tmp to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGRect*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGRect* noalias sret %tmp5, %struct.objc_object* %tmp4, %struct.objc_selector* %tmp3, %struct.CGRect* byval %agg.tmp) + %tmp6 = bitcast %struct.CGRect* %titleRect to i8* ; [#uses=1] + %tmp7 = bitcast %struct.CGRect* %tmp5 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp6, i8* %tmp7, i32 32, i32 4) + call void @llvm.dbg.stoppoint(i32 152, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp8 = getelementptr %struct.CGRect* %titleRect, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp9 = getelementptr %struct.CGPoint* %tmp8, i32 0, i32 0 ; [#uses=1] + %tmp10 = load double* %tmp9 ; [#uses=1] + %sub = sub double %tmp10, 2.000000e+00 ; [#uses=1] + %tmp11 = getelementptr %struct.CGRect* %titleRect, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp12 = getelementptr %struct.CGPoint* %tmp11, i32 0, i32 1 ; [#uses=1] + %tmp13 = load double* %tmp12 ; [#uses=1] + %tmp14 = getelementptr %struct.CGRect* %titleRect, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp15 = getelementptr %struct.CGPoint* %tmp14, i32 0, i32 0 ; [#uses=1] + %tmp16 = load double* %tmp15 ; [#uses=1] + %tmp18 = bitcast %struct.CGRect* %agg.tmp17 to i8* ; [#uses=1] + %tmp19 = bitcast %struct.CGRect* %bounds to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp18, i8* %tmp19, i32 32, i32 4) + %tmp34 = bitcast %struct.CGRect* %aRect to i8* ; [#uses=1] + %tmp35 = bitcast %struct.CGRect* %agg.tmp17 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp34, i8* %tmp35, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram981 to { }*)) + %4 = bitcast %struct.CGRect* %aRect to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %4, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable983 to { }*)) + call void @llvm.dbg.stoppoint(i32 110, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i = getelementptr %struct.CGRect* %aRect, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i = getelementptr %struct.CGPoint* %tmp.i, i32 0, i32 0 ; [#uses=1] + %tmp2.i = load double* %tmp1.i ; [#uses=1] + %tmp3.i = getelementptr %struct.CGRect* %aRect, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp4.i = getelementptr %struct.CGPoint* %tmp3.i, i32 0, i32 0 ; [#uses=1] + %tmp5.i = load double* %tmp4.i ; [#uses=1] + %add.i = add double %tmp2.i, %tmp5.i ; [#uses=1] + store double %add.i, double* %retval.i + call void @llvm.dbg.stoppoint(i32 111, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %5 = load double* %retval.i ; [#uses=1] + %add = add double %tmp16, %5 ; [#uses=1] + %tmp21 = bitcast %struct.CGRect* %agg.tmp20 to i8* ; [#uses=1] + %tmp22 = bitcast %struct.CGRect* %titleRect to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp21, i8* %tmp22, i32 32, i32 4) + %tmp44 = bitcast %struct.CGRect* %aRect43 to i8* ; [#uses=1] + %tmp45 = bitcast %struct.CGRect* %agg.tmp20 to i8* ; [#uses=1] + call void @llvm.memcpy.i64(i8* %tmp44, i8* %tmp45, i64 32, i32 1) + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram981 to { }*)) + %6 = bitcast %struct.CGRect* %aRect43 to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %6, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable983 to { }*)) + call void @llvm.dbg.stoppoint(i32 110, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %tmp.i47 = getelementptr %struct.CGRect* %aRect43, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i48 = getelementptr %struct.CGPoint* %tmp.i47, i32 0, i32 0 ; [#uses=1] + %tmp2.i49 = load double* %tmp1.i48 ; [#uses=1] + %tmp3.i50 = getelementptr %struct.CGRect* %aRect43, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp4.i51 = getelementptr %struct.CGPoint* %tmp3.i50, i32 0, i32 0 ; [#uses=1] + %tmp5.i52 = load double* %tmp4.i51 ; [#uses=1] + %add.i53 = add double %tmp2.i49, %tmp5.i52 ; [#uses=1] + store double %add.i53, double* %retval.i46 + call void @llvm.dbg.stoppoint(i32 111, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) + %7 = load double* %retval.i46 ; [#uses=1] + %sub24 = sub double %add, %7 ; [#uses=1] + %sub25 = sub double %sub24, 4.000000e+00 ; [#uses=1] + %tmp26 = getelementptr %struct.CGRect* %titleRect, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp27 = getelementptr %struct.CGPoint* %tmp26, i32 0, i32 1 ; [#uses=1] + %tmp28 = load double* %tmp27 ; [#uses=1] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram985 to { }*)) nounwind + store double %sub, double* %x.addr.i + %8 = bitcast double* %x.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %8, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable986 to { }*)) nounwind + store double %tmp13, double* %y.addr.i + %9 = bitcast double* %y.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %9, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable987 to { }*)) nounwind + store double %sub25, double* %w.addr.i + %10 = bitcast double* %w.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %10, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable989 to { }*)) nounwind + store double %tmp28, double* %h.addr.i + %11 = bitcast double* %h.addr.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %11, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable991 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 101, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram981 to { }*)) + %12 = bitcast %struct.CGRect* %r.i to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %12, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable993 to { }*)) nounwind + call void @llvm.dbg.stoppoint(i32 102, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp.i37 = getelementptr %struct.CGRect* %r.i, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp1.i38 = getelementptr %struct.CGPoint* %tmp.i37, i32 0, i32 0 ; [#uses=1] + %tmp2.i39 = load double* %x.addr.i ; [#uses=1] + store double %tmp2.i39, double* %tmp1.i38 + call void @llvm.dbg.stoppoint(i32 103, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp3.i40 = getelementptr %struct.CGRect* %r.i, i32 0, i32 0 ; <%struct.CGPoint*> [#uses=1] + %tmp4.i41 = getelementptr %struct.CGPoint* %tmp3.i40, i32 0, i32 1 ; [#uses=1] + %tmp5.i42 = load double* %y.addr.i ; [#uses=1] + store double %tmp5.i42, double* %tmp4.i41 + call void @llvm.dbg.stoppoint(i32 104, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp6.i = getelementptr %struct.CGRect* %r.i, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp7.i = getelementptr %struct.CGPoint* %tmp6.i, i32 0, i32 0 ; [#uses=1] + %tmp8.i = load double* %w.addr.i ; [#uses=1] + store double %tmp8.i, double* %tmp7.i + call void @llvm.dbg.stoppoint(i32 105, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp9.i = getelementptr %struct.CGRect* %r.i, i32 0, i32 1 ; <%struct.CGPoint*> [#uses=1] + %tmp10.i = getelementptr %struct.CGPoint* %tmp9.i, i32 0, i32 1 ; [#uses=1] + %tmp11.i = load double* %h.addr.i ; [#uses=1] + store double %tmp11.i, double* %tmp10.i + call void @llvm.dbg.stoppoint(i32 106, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp12.i = bitcast %struct.CGRect* %retval.i36 to i8* ; [#uses=1] + %tmp13.i = bitcast %struct.CGRect* %r.i to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp12.i, i8* %tmp13.i, i32 32, i32 4) nounwind + call void @llvm.dbg.stoppoint(i32 107, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*)) nounwind + %tmp14.i = bitcast %struct.CGRect* %tmp29 to i8* ; [#uses=1] + %tmp15.i = bitcast %struct.CGRect* %retval.i36 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp14.i, i8* %tmp15.i, i32 32, i32 4) nounwind + %tmp30 = bitcast %struct.CGRect* %retval to i8* ; [#uses=1] + %tmp31 = bitcast %struct.CGRect* %tmp29 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp30, i8* %tmp31, i32 32, i32 4) + br label %return + ; No predecessors! + br label %return + +return: ; preds = %13, %entry + call void @llvm.dbg.stoppoint(i32 153, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram923 to { }*)) + %tmp32 = bitcast %struct.CGRect* %agg.result to i8* ; [#uses=1] + %tmp33 = bitcast %struct.CGRect* %retval to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp32, i8* %tmp33, i32 32, i32 4) + ret void +} + +define internal void @"\01-[DVIconAndTextCell selectWithFrame:inView:editor:delegate:start:length:]"(%3* %self, %struct.objc_selector* %_cmd, %struct.CGRect* byval %frame, %8* %controlView, %9* %text, %struct.objc_object* %delegate, i32 %start, i32 %length) nounwind { +entry: + %self.addr = alloca %3* ; <%3**> [#uses=4] + %_cmd.addr = alloca %struct.objc_selector* ; <%struct.objc_selector**> [#uses=2] + %controlView.addr = alloca %8* ; <%8**> [#uses=3] + %text.addr = alloca %9* ; <%9**> [#uses=3] + %delegate.addr = alloca %struct.objc_object* ; <%struct.objc_object**> [#uses=3] + %start.addr = alloca i32 ; [#uses=3] + %length.addr = alloca i32 ; [#uses=3] + %agg.tmp = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %tmp5 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + %agg.tmp9 = alloca %struct.CGRect ; <%struct.CGRect*> [#uses=2] + call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram929 to { }*)) + store %3* %self, %3** %self.addr + %0 = bitcast %3** %self.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable930 to { }*)) + store %struct.objc_selector* %_cmd, %struct.objc_selector** %_cmd.addr + %1 = bitcast %struct.objc_selector** %_cmd.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %1, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable931 to { }*)) + %2 = bitcast %struct.CGRect* %frame to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable933 to { }*)) + store %8* %controlView, %8** %controlView.addr + %3 = bitcast %8** %controlView.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable934 to { }*)) + store %9* %text, %9** %text.addr + %4 = bitcast %9** %text.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %4, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable944 to { }*)) + store %struct.objc_object* %delegate, %struct.objc_object** %delegate.addr + %5 = bitcast %struct.objc_object** %delegate.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %5, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable946 to { }*)) + store i32 %start, i32* %start.addr + %6 = bitcast i32* %start.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %6, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable948 to { }*)) + store i32 %length, i32* %length.addr + %7 = bitcast i32* %length.addr to { }* ; <{ }*> [#uses=1] + call void @llvm.dbg.declare({ }* %7, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable950 to { }*)) + call void @llvm.dbg.stoppoint(i32 156, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %tmp = load %3** %self.addr ; <%3*> [#uses=1] + %tmp1 = bitcast %struct.CGRect* %agg.tmp to i8* ; [#uses=1] + %tmp2 = bitcast %struct.CGRect* %frame to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp1, i8* %tmp2, i32 32, i32 4) + %tmp3 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_952" ; <%struct.objc_selector*> [#uses=1] + %tmp4 = bitcast %3* %tmp to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + call void bitcast (void (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend_stret to void (%struct.CGRect*, %struct.objc_object*, %struct.objc_selector*, %struct.CGRect*)*)(%struct.CGRect* noalias sret %tmp5, %struct.objc_object* %tmp4, %struct.objc_selector* %tmp3, %struct.CGRect* byval %agg.tmp) + %tmp6 = bitcast %struct.CGRect* %frame to i8* ; [#uses=1] + %tmp7 = bitcast %struct.CGRect* %tmp5 to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp6, i8* %tmp7, i32 32, i32 4) + call void @llvm.dbg.stoppoint(i32 157, i32 5, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + %self8 = load %3** %self.addr ; <%3*> [#uses=1] + %tmp10 = bitcast %struct.CGRect* %agg.tmp9 to i8* ; [#uses=1] + %tmp11 = bitcast %struct.CGRect* %frame to i8* ; [#uses=1] + call void @llvm.memcpy.i32(i8* %tmp10, i8* %tmp11, i32 32, i32 4) + %tmp12 = load %8** %controlView.addr ; <%8*> [#uses=1] + %tmp13 = load %9** %text.addr ; <%9*> [#uses=1] + %tmp14 = load %struct.objc_object** %delegate.addr ; <%struct.objc_object*> [#uses=1] + %tmp15 = load i32* %start.addr ; [#uses=1] + %tmp16 = load i32* %length.addr ; [#uses=1] + %objc_super = alloca %struct._objc_super ; <%struct._objc_super*> [#uses=3] + %8 = bitcast %3* %self8 to %struct.objc_object* ; <%struct.objc_object*> [#uses=1] + %9 = getelementptr %struct._objc_super* %objc_super, i32 0, i32 0 ; <%struct.objc_object**> [#uses=1] + store %struct.objc_object* %8, %struct.objc_object** %9 + %tmp17 = load %struct._objc_class** @"\01L_OBJC_CLASS_REFERENCES_" ; <%struct._objc_class*> [#uses=1] + %10 = bitcast %struct._objc_class* %tmp17 to %struct.objc_class* ; <%struct.objc_class*> [#uses=1] + %11 = getelementptr %struct._objc_super* %objc_super, i32 0, i32 1 ; <%struct.objc_class**> [#uses=1] + store %struct.objc_class* %10, %struct.objc_class** %11 + %tmp18 = load %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_954" ; <%struct.objc_selector*> [#uses=1] + call void bitcast (%struct.objc_object* (%struct._objc_super*, %struct.objc_selector*, ...)* @objc_msgSendSuper to void (%struct._objc_super*, %struct.objc_selector*, %struct.CGRect*, %8*, %9*, %struct.objc_object*, i32, i32)*)(%struct._objc_super* %objc_super, %struct.objc_selector* %tmp18, %struct.CGRect* byval %agg.tmp9, %8* %tmp12, %9* %tmp13, %struct.objc_object* %tmp14, i32 %tmp15, i32 %tmp16) + call void @llvm.dbg.stoppoint(i32 158, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) + call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram929 to { }*)) + ret void +} + +declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind From dalej at apple.com Wed May 13 15:56:15 2009 From: dalej at apple.com (Dale Johannesen) Date: Wed, 13 May 2009 20:56:15 -0000 Subject: [llvm-commits] [llvm] r71717 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Message-ID: <200905132056.n4DKuKfZ011957@zion.cs.uiuc.edu> Author: johannes Date: Wed May 13 15:55:30 2009 New Revision: 71717 URL: http://llvm.org/viewvc/llvm-project?rev=71717&view=rev Log: Handle some additonal cases of external weak globals. Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=71717&r1=71716&r2=71717&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Wed May 13 15:55:30 2009 @@ -348,6 +348,20 @@ return 0; } +/// findGlobalVariableBase - Recurse into a ConstantExpr to find the underlying +/// GlobalVariable, if there is one. +static GlobalVariable* findGlobalVariableBase(ConstantExpr* CE) { + if (isa(CE)) + return dyn_cast(CE); + if (CE->getOpcode()==Instruction::GetElementPtr || + CE->getOpcode()==Instruction::BitCast) { + if (isa(CE->getOperand(0))) + return dyn_cast(CE->getOperand(0)); + if (ConstantExpr *CE2 = dyn_cast(CE->getOperand(0))) + return findGlobalVariableBase(CE2); + } + return NULL; +} /// DominatesMergePoint - If we have a merge point of an "if condition" as /// accepted above, return true if the specified value dominates the block. We @@ -395,10 +409,14 @@ !isa(I->getOperand(0))) return false; // External weak globals may have address 0, so we can't load them. - if (GlobalVariable* GV= dyn_cast(I->getOperand(0))) { - if (GV->hasExternalWeakLinkage()) - return false; - } + GlobalVariable* GV = dyn_cast(I->getOperand(0)); + if (GV && GV->hasExternalWeakLinkage()) + return false; + // The global may be buried within a ConstantExpr. + if (ConstantExpr *CE = dyn_cast(I->getOperand(0))) + GV = findGlobalVariableBase(CE); + if (GV && GV->hasExternalWeakLinkage()) + return false; // Finally, we have to check to make sure there are no instructions // before the load in its basic block, as we are going to hoist the loop From isanbard at gmail.com Wed May 13 16:33:47 2009 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 13 May 2009 21:33:47 -0000 Subject: [llvm-commits] [llvm] r71722 - in /llvm/trunk: docs/ include/llvm/CodeGen/ lib/CodeGen/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/CellSPU/ lib/Target/IA64/ lib/Target/MSP430/ lib/Target/Mips/ lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/Target/X86/ lib/Target/XCore/ Message-ID: <200905132134.n4DLYDM2013530@zion.cs.uiuc.edu> Author: void Date: Wed May 13 16:33:08 2009 New Revision: 71722 URL: http://llvm.org/viewvc/llvm-project?rev=71722&view=rev Log: Change MachineInstrBuilder::addReg() to take a flag instead of a list of booleans. This gives a better indication of what the "addReg()" is doing. Remembering what all of those booleans mean isn't easy, especially if you aren't spending all of your time in that code. I took Jakob's suggestion and made it illegal to pass in "true" for the flag. This should hopefully prevent any unintended misuse of this (by reverting to the old way of using addReg()). Modified: llvm/trunk/docs/CodeGenerator.html llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp llvm/trunk/lib/Target/ARM/ARMRegisterInfo.cpp llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.cpp llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.cpp llvm/trunk/lib/Target/IA64/IA64InstrInfo.cpp llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.cpp llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.cpp llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp llvm/trunk/lib/Target/X86/X86InstrBuilder.h llvm/trunk/lib/Target/X86/X86InstrInfo.cpp llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp llvm/trunk/lib/Target/XCore/XCoreRegisterInfo.cpp Modified: llvm/trunk/docs/CodeGenerator.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodeGenerator.html?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/docs/CodeGenerator.html (original) +++ llvm/trunk/docs/CodeGenerator.html Wed May 13 16:33:08 2009 @@ -600,7 +600,7 @@

-MI.addReg(Reg, MachineOperand::Def);
+MI.addReg(Reg, RegState::Define);
 
Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h Wed May 13 16:33:08 2009 @@ -23,6 +23,18 @@ class TargetInstrDesc; +namespace RegState { + enum { + Define = 0x2, + Implicit = 0x4, + Kill = 0x8, + Dead = 0x10, + EarlyClobber = 0x20, + ImplicitDefine = Implicit | Define, + ImplicitKill = Implicit | Kill + }; +} + class MachineInstrBuilder { MachineInstr *MI; public: @@ -36,12 +48,17 @@ /// addReg - Add a new virtual register operand... /// const - MachineInstrBuilder &addReg(unsigned RegNo, bool isDef = false, - bool isImp = false, bool isKill = false, - bool isDead = false, unsigned SubReg = 0, - bool isEarlyClobber = false) const { - MI->addOperand(MachineOperand::CreateReg(RegNo, isDef, isImp, isKill, - isDead, SubReg, isEarlyClobber)); + MachineInstrBuilder &addReg(unsigned RegNo, unsigned flags = 0, + unsigned SubReg = 0) const { + assert((flags & 0x1) == 0 && + "Passing in 'true' to addReg is forbidden! Use enums instead."); + MI->addOperand(MachineOperand::CreateReg(RegNo, + flags & RegState::Define, + flags & RegState::Implicit, + flags & RegState::Kill, + flags & RegState::Dead, + SubReg, + flags & RegState::EarlyClobber)); return *this; } @@ -97,9 +114,13 @@ const MachineInstrBuilder &addOperand(const MachineOperand &MO) const { if (MO.isReg()) - return addReg(MO.getReg(), MO.isDef(), MO.isImplicit(), - MO.isKill(), MO.isDead(), MO.getSubReg(), - MO.isEarlyClobber()); + return addReg(MO.getReg(), + (MO.isDef() ? RegState::Define : 0) | + (MO.isImplicit() ? RegState::Implicit : 0) | + (MO.isKill() ? RegState::Kill : 0) | + (MO.isDead() ? RegState::Dead : 0) | + (MO.isEarlyClobber() ? RegState::EarlyClobber : 0), + MO.getSubReg()); if (MO.isImm()) return addImm(MO.getImm()); if (MO.isFI()) @@ -135,7 +156,7 @@ const TargetInstrDesc &TID, unsigned DestReg) { return MachineInstrBuilder(MF.CreateMachineInstr(TID, DL)) - .addReg(DestReg, true); + .addReg(DestReg, RegState::Define); } /// BuildMI - This version of the builder inserts the newly-built @@ -149,7 +170,7 @@ unsigned DestReg) { MachineInstr *MI = BB.getParent()->CreateMachineInstr(TID, DL); BB.insert(I, MI); - return MachineInstrBuilder(MI).addReg(DestReg, true); + return MachineInstrBuilder(MI).addReg(DestReg, RegState::Define); } /// BuildMI - This version of the builder inserts the newly-built @@ -186,6 +207,19 @@ return BuildMI(*BB, BB->end(), DL, TID, DestReg); } +inline unsigned getDefRegState(bool B) { + return B ? RegState::Define : 0; +} +inline unsigned getImplRegState(bool B) { + return B ? RegState::Implicit : 0; +} +inline unsigned getKillRegState(bool B) { + return B ? RegState::Kill : 0; +} +inline unsigned getDeadRegState(bool B) { + return B ? RegState::Dead : 0; +} + } // End llvm namespace #endif Modified: llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp (original) +++ llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp Wed May 13 16:33:08 2009 @@ -45,9 +45,9 @@ bool Reg0IsDead = MI->getOperand(0).isDead(); MachineFunction &MF = *MI->getParent()->getParent(); return BuildMI(MF, MI->getDebugLoc(), MI->getDesc()) - .addReg(Reg0, true, false, false, Reg0IsDead) - .addReg(Reg2, false, false, Reg2IsKill) - .addReg(Reg1, false, false, Reg1IsKill); + .addReg(Reg0, RegState::Define | getDeadRegState(Reg0IsDead)) + .addReg(Reg2, getKillRegState(Reg2IsKill)) + .addReg(Reg1, getKillRegState(Reg2IsKill)); } if (ChangeReg0) Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp Wed May 13 16:33:08 2009 @@ -546,23 +546,23 @@ ARMFunctionInfo *AFI = MF.getInfo(); assert (!AFI->isThumbFunction()); AddDefaultPred(BuildMI(MBB, I, DL, get(ARM::STR)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FI).addReg(0).addImm(0)); } else if (RC == ARM::tGPRRegisterClass) { MachineFunction &MF = *MBB.getParent(); ARMFunctionInfo *AFI = MF.getInfo(); assert (AFI->isThumbFunction()); BuildMI(MBB, I, DL, get(ARM::tSpill)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FI).addImm(0); } else if (RC == ARM::DPRRegisterClass) { AddDefaultPred(BuildMI(MBB, I, DL, get(ARM::FSTD)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FI).addImm(0)); } else { assert(RC == ARM::SPRRegisterClass && "Unknown regclass!"); AddDefaultPred(BuildMI(MBB, I, DL, get(ARM::FSTS)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FI).addImm(0)); } } @@ -579,7 +579,7 @@ if (AFI->isThumbFunction()) { Opc = Addr[0].isFI() ? ARM::tSpill : ARM::tSTR; MachineInstrBuilder MIB = - BuildMI(MF, DL, get(Opc)).addReg(SrcReg, false, false, isKill); + BuildMI(MF, DL, get(Opc)).addReg(SrcReg, getKillRegState(isKill)); for (unsigned i = 0, e = Addr.size(); i != e; ++i) MIB.addOperand(Addr[i]); NewMIs.push_back(MIB); @@ -594,7 +594,7 @@ } MachineInstrBuilder MIB = - BuildMI(MF, DL, get(Opc)).addReg(SrcReg, false, false, isKill); + BuildMI(MF, DL, get(Opc)).addReg(SrcReg, getKillRegState(isKill)); for (unsigned i = 0, e = Addr.size(); i != e; ++i) MIB.addOperand(Addr[i]); AddDefaultPred(MIB); @@ -681,7 +681,7 @@ unsigned Reg = CSI[i-1].getReg(); // Add the callee-saved register as live-in. It's killed at the spill. MBB.addLiveIn(Reg); - MIB.addReg(Reg, false/*isDef*/,false/*isImp*/,true/*isKill*/); + MIB.addReg(Reg, RegState::Kill); } return true; } @@ -733,13 +733,13 @@ unsigned SrcReg = MI->getOperand(1).getReg(); bool isKill = MI->getOperand(1).isKill(); NewMI = BuildMI(MF, MI->getDebugLoc(), get(ARM::STR)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FI).addReg(0).addImm(0).addImm(Pred).addReg(PredReg); } else { // move -> load unsigned DstReg = MI->getOperand(0).getReg(); bool isDead = MI->getOperand(0).isDead(); NewMI = BuildMI(MF, MI->getDebugLoc(), get(ARM::LDR)) - .addReg(DstReg, true, false, false, isDead) + .addReg(DstReg, RegState::Define | getDeadRegState(isDead)) .addFrameIndex(FI).addReg(0).addImm(0).addImm(Pred).addReg(PredReg); } break; @@ -755,7 +755,7 @@ // tSpill cannot take a high register operand. break; NewMI = BuildMI(MF, MI->getDebugLoc(), get(ARM::tSpill)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FI).addImm(0); } else { // move -> load unsigned DstReg = MI->getOperand(0).getReg(); @@ -764,7 +764,7 @@ break; bool isDead = MI->getOperand(0).isDead(); NewMI = BuildMI(MF, MI->getDebugLoc(), get(ARM::tRestore)) - .addReg(DstReg, true, false, false, isDead) + .addReg(DstReg, RegState::Define | getDeadRegState(isDead)) .addFrameIndex(FI).addImm(0); } break; @@ -792,13 +792,13 @@ unsigned SrcReg = MI->getOperand(1).getReg(); bool isKill = MI->getOperand(1).isKill(); NewMI = BuildMI(MF, MI->getDebugLoc(), get(ARM::FSTD)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FI).addImm(0).addImm(Pred).addReg(PredReg); } else { // move -> load unsigned DstReg = MI->getOperand(0).getReg(); bool isDead = MI->getOperand(0).isDead(); NewMI = BuildMI(MF, MI->getDebugLoc(), get(ARM::FLDD)) - .addReg(DstReg, true, false, false, isDead) + .addReg(DstReg, RegState::Define | getDeadRegState(isDead)) .addFrameIndex(FI).addImm(0).addImm(Pred).addReg(PredReg); } break; Modified: llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp Wed May 13 16:33:08 2009 @@ -159,7 +159,7 @@ return false; // Probably not worth it then. BuildMI(MBB, MBBI, dl, TII->get(BaseOpc), NewBase) - .addReg(Base, false, false, BaseKill).addImm(ImmedOffset) + .addReg(Base, getKillRegState(BaseKill)).addImm(ImmedOffset) .addImm(Pred).addReg(PredReg).addReg(0); Base = NewBase; BaseKill = true; // New base is always killed right its use. @@ -170,14 +170,15 @@ Opcode = getLoadStoreMultipleOpcode(Opcode); MachineInstrBuilder MIB = (isAM4) ? BuildMI(MBB, MBBI, dl, TII->get(Opcode)) - .addReg(Base, false, false, BaseKill) + .addReg(Base, getKillRegState(BaseKill)) .addImm(ARM_AM::getAM4ModeImm(Mode)).addImm(Pred).addReg(PredReg) : BuildMI(MBB, MBBI, dl, TII->get(Opcode)) - .addReg(Base, false, false, BaseKill) + .addReg(Base, getKillRegState(BaseKill)) .addImm(ARM_AM::getAM5Opc(Mode, false, isDPR ? NumRegs<<1 : NumRegs)) .addImm(Pred).addReg(PredReg); for (unsigned i = 0; i != NumRegs; ++i) - MIB = MIB.addReg(Regs[i].first, isDef, false, Regs[i].second); + MIB = MIB.addReg(Regs[i].first, getDefRegState(isDef) + | getKillRegState(Regs[i].second)); return true; } @@ -516,26 +517,26 @@ if (isAM2) // LDR_PRE, LDR_POST; BuildMI(MBB, MBBI, dl, TII->get(NewOpc), MI->getOperand(0).getReg()) - .addReg(Base, true) + .addReg(Base, RegState::Define) .addReg(Base).addReg(0).addImm(Offset).addImm(Pred).addReg(PredReg); else // FLDMS, FLDMD BuildMI(MBB, MBBI, dl, TII->get(NewOpc)) - .addReg(Base, false, false, BaseKill) + .addReg(Base, getKillRegState(BaseKill)) .addImm(Offset).addImm(Pred).addReg(PredReg) - .addReg(MI->getOperand(0).getReg(), true); + .addReg(MI->getOperand(0).getReg(), RegState::Define); } else { MachineOperand &MO = MI->getOperand(0); if (isAM2) // STR_PRE, STR_POST; BuildMI(MBB, MBBI, dl, TII->get(NewOpc), Base) - .addReg(MO.getReg(), false, false, MO.isKill()) + .addReg(MO.getReg(), getKillRegState(BaseKill)) .addReg(Base).addReg(0).addImm(Offset).addImm(Pred).addReg(PredReg); else // FSTMS, FSTMD BuildMI(MBB, MBBI, dl, TII->get(NewOpc)).addReg(Base).addImm(Offset) .addImm(Pred).addReg(PredReg) - .addReg(MO.getReg(), false, false, MO.isKill()); + .addReg(MO.getReg(), getKillRegState(MO.isKill())); } MBB.erase(MBBI); Modified: llvm/trunk/lib/Target/ARM/ARMRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMRegisterInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMRegisterInfo.cpp Wed May 13 16:33:08 2009 @@ -368,7 +368,7 @@ // Build the new ADD / SUB. BuildMI(MBB, MBBI, dl, TII.get(isSub ? ARM::SUBri : ARM::ADDri), DestReg) - .addReg(BaseReg, false, false, true).addImm(SOImmVal) + .addReg(BaseReg, RegState::Kill).addImm(SOImmVal) .addImm((unsigned)Pred).addReg(PredReg).addReg(0); BaseReg = DestReg; } @@ -426,7 +426,7 @@ assert(BaseReg == ARM::SP && "Unexpected!"); LdReg = ARM::R3; BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVlor2hir), ARM::R12) - .addReg(ARM::R3, false, false, true); + .addReg(ARM::R3, RegState::Kill); } if (NumBytes <= 255 && NumBytes >= 0) @@ -434,7 +434,7 @@ else if (NumBytes < 0 && NumBytes >= -255) { BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVi8), LdReg).addImm(NumBytes); BuildMI(MBB, MBBI, dl, TII.get(ARM::tNEG), LdReg) - .addReg(LdReg, false, false, true); + .addReg(LdReg, RegState::Kill); } else MRI.emitLoadConstPool(MBB, MBBI, LdReg, NumBytes, ARMCC::AL, 0, &TII, true, dl); @@ -444,12 +444,12 @@ const MachineInstrBuilder MIB = BuildMI(MBB, MBBI, dl, TII.get(Opc), DestReg); if (DestReg == ARM::SP || isSub) - MIB.addReg(BaseReg).addReg(LdReg, false, false, true); + MIB.addReg(BaseReg).addReg(LdReg, RegState::Kill); else - MIB.addReg(LdReg).addReg(BaseReg, false, false, true); + MIB.addReg(LdReg).addReg(BaseReg, RegState::Kill); if (DestReg == ARM::SP) BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVhir2lor), ARM::R3) - .addReg(ARM::R12, false, false, true); + .addReg(ARM::R12, RegState::Kill); } /// emitThumbRegPlusImmediate - Emits a series of instructions to materialize @@ -518,10 +518,10 @@ unsigned ThisVal = (Bytes > Chunk) ? Chunk : Bytes; Bytes -= ThisVal; BuildMI(MBB, MBBI, dl,TII.get(isSub ? ARM::tSUBi3 : ARM::tADDi3), DestReg) - .addReg(BaseReg, false, false, true).addImm(ThisVal); + .addReg(BaseReg, RegState::Kill).addImm(ThisVal); } else { BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVr), DestReg) - .addReg(BaseReg, false, false, true); + .addReg(BaseReg, RegState::Kill); } BaseReg = DestReg; } @@ -538,7 +538,7 @@ else { bool isKill = BaseReg != ARM::SP; BuildMI(MBB, MBBI, dl, TII.get(Opc), DestReg) - .addReg(BaseReg, false, false, isKill).addImm(ThisVal); + .addReg(BaseReg, getKillRegState(isKill)).addImm(ThisVal); BaseReg = DestReg; if (Opc == ARM::tADDrSPi) { @@ -556,7 +556,7 @@ if (ExtraOpc) BuildMI(MBB, MBBI, dl, TII.get(ExtraOpc), DestReg) - .addReg(DestReg, false, false, true) + .addReg(DestReg, RegState::Kill) .addImm(((unsigned)NumBytes) & 3); } @@ -631,7 +631,7 @@ emitThumbRegPlusImmediate(MBB, MBBI, DestReg, DestReg, Imm, TII, MRI, dl); if (isSub) BuildMI(MBB, MBBI, dl, TII.get(ARM::tNEG), DestReg) - .addReg(DestReg, false, false, true); + .addReg(DestReg, RegState::Kill); } /// findScratchRegister - Find a 'free' ARM register. If register scavenger @@ -918,12 +918,12 @@ bool UseRR = false; if (ValReg == ARM::R3) { BuildMI(MBB, II, dl, TII.get(ARM::tMOVlor2hir), ARM::R12) - .addReg(ARM::R2, false, false, true); + .addReg(ARM::R2, RegState::Kill); TmpReg = ARM::R2; } if (TmpReg == ARM::R3 && AFI->isR3LiveIn()) BuildMI(MBB, II, dl, TII.get(ARM::tMOVlor2hir), ARM::R12) - .addReg(ARM::R3, false, false, true); + .addReg(ARM::R3, RegState::Kill); if (Opcode == ARM::tSpill) { if (FrameReg == ARM::SP) emitThumbRegPlusImmInReg(MBB, II, TmpReg, FrameReg, @@ -946,10 +946,10 @@ MachineBasicBlock::iterator NII = next(II); if (ValReg == ARM::R3) BuildMI(MBB, NII, dl, TII.get(ARM::tMOVhir2lor), ARM::R2) - .addReg(ARM::R12, false, false, true); + .addReg(ARM::R12, RegState::Kill); if (TmpReg == ARM::R3 && AFI->isR3LiveIn()) BuildMI(MBB, NII, dl, TII.get(ARM::tMOVhir2lor), ARM::R3) - .addReg(ARM::R12, false, false, true); + .addReg(ARM::R12, RegState::Kill); } else assert(false && "Unexpected opcode!"); } else { Modified: llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.cpp Wed May 13 16:33:08 2009 @@ -187,15 +187,15 @@ if (RC == Alpha::F4RCRegisterClass) BuildMI(MBB, MI, DL, get(Alpha::STS)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FrameIdx).addReg(Alpha::F31); else if (RC == Alpha::F8RCRegisterClass) BuildMI(MBB, MI, DL, get(Alpha::STT)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FrameIdx).addReg(Alpha::F31); else if (RC == Alpha::GPRCRegisterClass) BuildMI(MBB, MI, DL, get(Alpha::STQ)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FrameIdx).addReg(Alpha::F31); else abort(); @@ -217,7 +217,7 @@ abort(); DebugLoc DL = DebugLoc::getUnknownLoc(); MachineInstrBuilder MIB = - BuildMI(MF, DL, get(Opc)).addReg(SrcReg, false, false, isKill); + BuildMI(MF, DL, get(Opc)).addReg(SrcReg, getKillRegState(isKill)); for (unsigned i = 0, e = Addr.size(); i != e; ++i) MIB.addOperand(Addr[i]); NewMIs.push_back(MIB); @@ -290,7 +290,7 @@ Opc = (Opc == Alpha::BISr) ? Alpha::STQ : ((Opc == Alpha::CPYSS) ? Alpha::STS : Alpha::STT); NewMI = BuildMI(MF, MI->getDebugLoc(), get(Opc)) - .addReg(InReg, false, false, isKill) + .addReg(InReg, getKillRegState(isKill)) .addFrameIndex(FrameIndex) .addReg(Alpha::F31); } else { // load -> move @@ -299,7 +299,7 @@ Opc = (Opc == Alpha::BISr) ? Alpha::LDQ : ((Opc == Alpha::CPYSS) ? Alpha::LDS : Alpha::LDT); NewMI = BuildMI(MF, MI->getDebugLoc(), get(Opc)) - .addReg(OutReg, true, false, false, isDead) + .addReg(OutReg, RegState::Define | getDeadRegState(isDead)) .addFrameIndex(FrameIndex) .addReg(Alpha::F31); } Modified: llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.cpp Wed May 13 16:33:08 2009 @@ -320,7 +320,7 @@ DebugLoc DL = DebugLoc::getUnknownLoc(); if (MI != MBB.end()) DL = MI->getDebugLoc(); addFrameReference(BuildMI(MBB, MI, DL, get(opc)) - .addReg(SrcReg, false, false, isKill), FrameIdx); + .addReg(SrcReg, getKillRegState(isKill)), FrameIdx); } void SPUInstrInfo::storeRegToAddr(MachineFunction &MF, unsigned SrcReg, @@ -353,7 +353,7 @@ } DebugLoc DL = DebugLoc::getUnknownLoc(); MachineInstrBuilder MIB = BuildMI(MF, DL, get(Opc)) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); for (unsigned i = 0, e = Addr.size(); i != e; ++i) MIB.addOperand(Addr[i]); NewMIs.push_back(MIB); @@ -495,7 +495,7 @@ MachineInstrBuilder MIB = BuildMI(MF, MI->getDebugLoc(), get(SPU::STQDr32)); - MIB.addReg(InReg, false, false, isKill); + MIB.addReg(InReg, getKillRegState(isKill)); NewMI = addFrameReference(MIB, FrameIndex); } } else { // move -> load @@ -503,7 +503,7 @@ bool isDead = MI->getOperand(0).isDead(); MachineInstrBuilder MIB = BuildMI(MF, MI->getDebugLoc(), get(Opc)); - MIB.addReg(OutReg, true, false, false, isDead); + MIB.addReg(OutReg, RegState::Define | getDeadRegState(isDead)); Opc = (FrameIndex < SPUFrameInfo::maxFrameOffset()) ? SPU::STQDr32 : SPU::STQXr32; NewMI = addFrameReference(MIB, FrameIndex); Modified: llvm/trunk/lib/Target/IA64/IA64InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/IA64InstrInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/IA64/IA64InstrInfo.cpp (original) +++ llvm/trunk/lib/Target/IA64/IA64InstrInfo.cpp Wed May 13 16:33:08 2009 @@ -96,17 +96,17 @@ if (RC == IA64::FPRegisterClass) { BuildMI(MBB, MI, DL, get(IA64::STF_SPILL)).addFrameIndex(FrameIdx) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); } else if (RC == IA64::GRRegisterClass) { BuildMI(MBB, MI, DL, get(IA64::ST8)).addFrameIndex(FrameIdx) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); } else if (RC == IA64::PRRegisterClass) { /* we use IA64::r2 as a temporary register for doing this hackery. */ // first we load 0: BuildMI(MBB, MI, DL, get(IA64::MOV), IA64::r2).addReg(IA64::r0); // then conditionally add 1: BuildMI(MBB, MI, DL, get(IA64::CADDIMM22), IA64::r2).addReg(IA64::r2) - .addImm(1).addReg(SrcReg, false, false, isKill); + .addImm(1).addReg(SrcReg, getKillRegState(isKill)); // and then store it to the stack BuildMI(MBB, MI, DL, get(IA64::ST8)) .addFrameIndex(FrameIdx) @@ -136,7 +136,7 @@ MachineInstrBuilder MIB = BuildMI(MF, DL, get(Opc)); for (unsigned i = 0, e = Addr.size(); i != e; ++i) MIB.addOperand(Addr[i]); - MIB.addReg(SrcReg, false, false, isKill); + MIB.addReg(SrcReg, getKillRegState(isKill)); NewMIs.push_back(MIB); return; Modified: llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.cpp Wed May 13 16:33:08 2009 @@ -38,11 +38,11 @@ if (RC == &MSP430::GR16RegClass) BuildMI(MBB, MI, DL, get(MSP430::MOV16mr)) .addFrameIndex(FrameIdx).addImm(0) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); else if (RC == &MSP430::GR8RegClass) BuildMI(MBB, MI, DL, get(MSP430::MOV8mr)) .addFrameIndex(FrameIdx).addImm(0) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); else assert(0 && "Cannot store this register to stack slot!"); } @@ -129,7 +129,7 @@ // Add the callee-saved register as live-in. It's killed at the spill. MBB.addLiveIn(Reg); BuildMI(MBB, MI, DL, get(MSP430::PUSH16r)) - .addReg(Reg, /*isDef=*/false, /*isImp=*/false, /*isKill=*/true); + .addReg(Reg, RegState::Kill); } return true; } Modified: llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp Wed May 13 16:33:08 2009 @@ -241,7 +241,7 @@ // Save FPW into the appropriate stack slot... BuildMI(MBB, MBBI, DL, TII.get(MSP430::PUSH16r)) - .addReg(MSP430::FPW, /*isDef=*/false, /*isImp=*/false, /*isKill=*/true); + .addReg(MSP430::FPW, RegState::Kill); // Update FPW with the new base value... BuildMI(MBB, MBBI, DL, TII.get(MSP430::MOV16rr), MSP430::FPW) Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp Wed May 13 16:33:08 2009 @@ -197,7 +197,7 @@ Opc = Mips::SDC1; } - BuildMI(MBB, I, DL, get(Opc)).addReg(SrcReg, false, false, isKill) + BuildMI(MBB, I, DL, get(Opc)).addReg(SrcReg, getKillRegState(isKill)) .addImm(0).addFrameIndex(FI); } @@ -217,7 +217,7 @@ DebugLoc DL = DebugLoc::getUnknownLoc(); MachineInstrBuilder MIB = BuildMI(MF, DL, get(Opc)) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); for (unsigned i = 0, e = Addr.size(); i != e; ++i) MIB.addOperand(Addr[i]); NewMIs.push_back(MIB); @@ -285,13 +285,13 @@ unsigned SrcReg = MI->getOperand(2).getReg(); bool isKill = MI->getOperand(2).isKill(); NewMI = BuildMI(MF, MI->getDebugLoc(), get(Mips::SW)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addImm(0).addFrameIndex(FI); } else { // COPY -> LOAD unsigned DstReg = MI->getOperand(0).getReg(); bool isDead = MI->getOperand(0).isDead(); NewMI = BuildMI(MF, MI->getDebugLoc(), get(Mips::LW)) - .addReg(DstReg, true, false, false, isDead) + .addReg(DstReg, RegState::Define | getDeadRegState(isDead)) .addImm(0).addFrameIndex(FI); } } @@ -315,13 +315,13 @@ unsigned SrcReg = MI->getOperand(1).getReg(); bool isKill = MI->getOperand(1).isKill(); NewMI = BuildMI(MF, MI->getDebugLoc(), get(StoreOpc)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addImm(0).addFrameIndex(FI) ; } else { // COPY -> LOAD unsigned DstReg = MI->getOperand(0).getReg(); bool isDead = MI->getOperand(0).isDead(); NewMI = BuildMI(MF, MI->getDebugLoc(), get(LoadOpc)) - .addReg(DstReg, true, false, false, isDead) + .addReg(DstReg, RegState::Define | getDeadRegState(isDead)) .addImm(0).addFrameIndex(FI); } } Modified: llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.cpp Wed May 13 16:33:08 2009 @@ -83,7 +83,7 @@ //MachineFunction &MF = *MBB.getParent(); //MachineRegisterInfo &RI = MF.getRegInfo(); BuildMI(MBB, I, DL, get(PIC16::movwf)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addImm(PTLI->GetTmpOffsetForFI(FI, 1)) .addExternalSymbol(tmpName) .addImm(1); // Emit banksel for it. @@ -98,7 +98,7 @@ unsigned opcode = (SrcReg == PIC16::FSR0) ? PIC16::save_fsr0 : PIC16::save_fsr1; BuildMI(MBB, I, DL, get(opcode)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addImm(PTLI->GetTmpOffsetForFI(FI, 3)) .addExternalSymbol(tmpName) .addImm(1); // Emit banksel for it. Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp Wed May 13 16:33:08 2009 @@ -175,9 +175,9 @@ unsigned Reg0 = ChangeReg0 ? Reg2 : MI->getOperand(0).getReg(); bool Reg0IsDead = MI->getOperand(0).isDead(); return BuildMI(MF, MI->getDebugLoc(), MI->getDesc()) - .addReg(Reg0, true, false, false, Reg0IsDead) - .addReg(Reg2, false, false, Reg2IsKill) - .addReg(Reg1, false, false, Reg1IsKill) + .addReg(Reg0, RegState::Define | getDeadRegState(Reg0IsDead)) + .addReg(Reg2, getKillRegState(Reg2IsKill)) + .addReg(Reg1, getKillRegState(Reg1IsKill)) .addImm((ME+1) & 31) .addImm((MB-1) & 31); } @@ -370,7 +370,8 @@ if (RC == PPC::GPRCRegisterClass) { if (SrcReg != PPC::LR) { NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::STW)) - .addReg(SrcReg, false, false, isKill), + .addReg(SrcReg, + getKillRegState(isKill)), FrameIdx)); } else { // FIXME: this spills LR immediately to memory in one step. To do this, @@ -378,33 +379,43 @@ // a hack. NewMIs.push_back(BuildMI(MF, DL, get(PPC::MFLR), PPC::R11)); NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::STW)) - .addReg(PPC::R11, false, false, isKill), + .addReg(PPC::R11, + getKillRegState(isKill)), FrameIdx)); } } else if (RC == PPC::G8RCRegisterClass) { if (SrcReg != PPC::LR8) { NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::STD)) - .addReg(SrcReg, false, false, isKill), FrameIdx)); + .addReg(SrcReg, + getKillRegState(isKill)), + FrameIdx)); } else { // FIXME: this spills LR immediately to memory in one step. To do this, // we use R11, which we know cannot be used in the prolog/epilog. This is // a hack. NewMIs.push_back(BuildMI(MF, DL, get(PPC::MFLR8), PPC::X11)); NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::STD)) - .addReg(PPC::X11, false, false, isKill), FrameIdx)); + .addReg(PPC::X11, + getKillRegState(isKill)), + FrameIdx)); } } else if (RC == PPC::F8RCRegisterClass) { NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::STFD)) - .addReg(SrcReg, false, false, isKill), FrameIdx)); + .addReg(SrcReg, + getKillRegState(isKill)), + FrameIdx)); } else if (RC == PPC::F4RCRegisterClass) { NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::STFS)) - .addReg(SrcReg, false, false, isKill), FrameIdx)); + .addReg(SrcReg, + getKillRegState(isKill)), + FrameIdx)); } else if (RC == PPC::CRRCRegisterClass) { if ((EnablePPC32RS && !TM.getSubtargetImpl()->isPPC64()) || (EnablePPC64RS && TM.getSubtargetImpl()->isPPC64())) { // FIXME (64-bit): Enable NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::SPILL_CR)) - .addReg(SrcReg, false, false, isKill), + .addReg(SrcReg, + getKillRegState(isKill)), FrameIdx)); return true; } else { @@ -423,7 +434,8 @@ } NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::STW)) - .addReg(PPC::R0, false, false, isKill), + .addReg(PPC::R0, + getKillRegState(isKill)), FrameIdx)); } } else if (RC == PPC::CRBITRCRegisterClass) { @@ -461,7 +473,9 @@ NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::ADDI), PPC::R0), FrameIdx, 0, 0)); NewMIs.push_back(BuildMI(MF, DL, get(PPC::STVX)) - .addReg(SrcReg, false, false, isKill).addReg(PPC::R0).addReg(PPC::R0)); + .addReg(SrcReg, getKillRegState(isKill)) + .addReg(PPC::R0) + .addReg(PPC::R0)); } else { assert(0 && "Unknown regclass!"); abort(); @@ -519,7 +533,7 @@ abort(); } MachineInstrBuilder MIB = BuildMI(MF, DL, get(Opc)) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); for (unsigned i = 0, e = Addr.size(); i != e; ++i) MIB.addOperand(Addr[i]); NewMIs.push_back(MIB); @@ -678,13 +692,15 @@ unsigned InReg = MI->getOperand(1).getReg(); bool isKill = MI->getOperand(1).isKill(); NewMI = addFrameReference(BuildMI(MF, MI->getDebugLoc(), get(PPC::STW)) - .addReg(InReg, false, false, isKill), + .addReg(InReg, getKillRegState(isKill)), FrameIndex); } else { // move -> load unsigned OutReg = MI->getOperand(0).getReg(); bool isDead = MI->getOperand(0).isDead(); NewMI = addFrameReference(BuildMI(MF, MI->getDebugLoc(), get(PPC::LWZ)) - .addReg(OutReg, true, false, false, isDead), + .addReg(OutReg, + RegState::Define | + getDeadRegState(isDead)), FrameIndex); } } else if ((Opc == PPC::OR8 && @@ -693,13 +709,15 @@ unsigned InReg = MI->getOperand(1).getReg(); bool isKill = MI->getOperand(1).isKill(); NewMI = addFrameReference(BuildMI(MF, MI->getDebugLoc(), get(PPC::STD)) - .addReg(InReg, false, false, isKill), + .addReg(InReg, getKillRegState(isKill)), FrameIndex); } else { // move -> load unsigned OutReg = MI->getOperand(0).getReg(); bool isDead = MI->getOperand(0).isDead(); NewMI = addFrameReference(BuildMI(MF, MI->getDebugLoc(), get(PPC::LD)) - .addReg(OutReg, true, false, false, isDead), + .addReg(OutReg, + RegState::Define | + getDeadRegState(isDead)), FrameIndex); } } else if (Opc == PPC::FMRD) { @@ -707,13 +725,15 @@ unsigned InReg = MI->getOperand(1).getReg(); bool isKill = MI->getOperand(1).isKill(); NewMI = addFrameReference(BuildMI(MF, MI->getDebugLoc(), get(PPC::STFD)) - .addReg(InReg, false, false, isKill), + .addReg(InReg, getKillRegState(isKill)), FrameIndex); } else { // move -> load unsigned OutReg = MI->getOperand(0).getReg(); bool isDead = MI->getOperand(0).isDead(); NewMI = addFrameReference(BuildMI(MF, MI->getDebugLoc(), get(PPC::LFD)) - .addReg(OutReg, true, false, false, isDead), + .addReg(OutReg, + RegState::Define | + getDeadRegState(isDead)), FrameIndex); } } else if (Opc == PPC::FMRS) { @@ -721,13 +741,15 @@ unsigned InReg = MI->getOperand(1).getReg(); bool isKill = MI->getOperand(1).isKill(); NewMI = addFrameReference(BuildMI(MF, MI->getDebugLoc(), get(PPC::STFS)) - .addReg(InReg, false, false, isKill), + .addReg(InReg, getKillRegState(isKill)), FrameIndex); } else { // move -> load unsigned OutReg = MI->getOperand(0).getReg(); bool isDead = MI->getOperand(0).isDead(); NewMI = addFrameReference(BuildMI(MF, MI->getDebugLoc(), get(PPC::LFS)) - .addReg(OutReg, true, false, false, isDead), + .addReg(OutReg, + RegState::Define | + getDeadRegState(isDead)), FrameIndex); } } Modified: llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp Wed May 13 16:33:08 2009 @@ -437,7 +437,7 @@ BuildMI(MBB, MBBI, dl, TII.get(LISInstr), TmpReg) .addImm(CalleeAmt >> 16); BuildMI(MBB, MBBI, dl, TII.get(ORIInstr), TmpReg) - .addReg(TmpReg, false, false, true) + .addReg(TmpReg, RegState::Kill) .addImm(CalleeAmt & 0xFFFF); BuildMI(MBB, MBBI, dl, TII.get(ADDInstr)) .addReg(StackReg) @@ -537,12 +537,12 @@ if (LP64) { if (EnableRegisterScavenging) // FIXME (64-bit): Use "true" part. BuildMI(MBB, II, dl, TII.get(PPC::STDUX)) - .addReg(Reg, false, false, true) + .addReg(Reg, RegState::Kill) .addReg(PPC::X1) .addReg(MI.getOperand(1).getReg()); else BuildMI(MBB, II, dl, TII.get(PPC::STDUX)) - .addReg(PPC::X0, false, false, true) + .addReg(PPC::X0, RegState::Kill) .addReg(PPC::X1) .addReg(MI.getOperand(1).getReg()); @@ -555,10 +555,10 @@ BuildMI(MBB, II, dl, TII.get(PPC::ADDI8), MI.getOperand(0).getReg()) .addReg(PPC::X1) .addImm(maxCallFrameSize) - .addReg(MI.getOperand(1).getReg(), false, true, true); + .addReg(MI.getOperand(1).getReg(), RegState::ImplicitKill); } else { BuildMI(MBB, II, dl, TII.get(PPC::STWUX)) - .addReg(Reg, false, false, true) + .addReg(Reg, RegState::Kill) .addReg(PPC::R1) .addReg(MI.getOperand(1).getReg()); @@ -571,7 +571,7 @@ BuildMI(MBB, II, dl, TII.get(PPC::ADDI), MI.getOperand(0).getReg()) .addReg(PPC::R1) .addImm(maxCallFrameSize) - .addReg(MI.getOperand(1).getReg(), false, true, true); + .addReg(MI.getOperand(1).getReg(), RegState::ImplicitKill); } // Discard the DYNALLOC instruction. @@ -607,7 +607,7 @@ else // Implicitly kill the CR register. BuildMI(MBB, II, dl, TII.get(PPC::MFCR), Reg) - .addReg(MI.getOperand(0).getReg(), false, true, true); + .addReg(MI.getOperand(0).getReg(), RegState::ImplicitKill); // If the saved register wasn't CR0, shift the bits left so that they are in // CR0's slot. @@ -615,13 +615,13 @@ if (SrcReg != PPC::CR0) // rlwinm rA, rA, ShiftBits, 0, 31. BuildMI(MBB, II, dl, TII.get(PPC::RLWINM), Reg) - .addReg(Reg, false, false, true) + .addReg(Reg, RegState::Kill) .addImm(PPCRegisterInfo::getRegisterNumbering(SrcReg) * 4) .addImm(0) .addImm(31); addFrameReference(BuildMI(MBB, II, dl, TII.get(PPC::STW)) - .addReg(Reg, false, false, MI.getOperand(1).getImm()), + .addReg(Reg, getKillRegState(MI.getOperand(1).getImm())), FrameIndex); // Discard the pseudo instruction. @@ -735,7 +735,7 @@ BuildMI(MBB, II, dl, TII.get(PPC::LIS), SReg) .addImm(Offset >> 16); BuildMI(MBB, II, dl, TII.get(PPC::ORI), SReg) - .addReg(SReg, false, false, true) + .addReg(SReg, RegState::Kill) .addImm(Offset); // Convert into indexed form of the instruction: @@ -861,7 +861,7 @@ .addImm(UsedRegMask); else BuildMI(*MI->getParent(), MI, dl, TII.get(PPC::ORI), DstReg) - .addReg(SrcReg, false, false, true) + .addReg(SrcReg, RegState::Kill) .addImm(UsedRegMask); } else if ((UsedRegMask & 0xFFFF0000) == UsedRegMask) { if (DstReg != SrcReg) @@ -870,7 +870,7 @@ .addImm(UsedRegMask >> 16); else BuildMI(*MI->getParent(), MI, dl, TII.get(PPC::ORIS), DstReg) - .addReg(SrcReg, false, false, true) + .addReg(SrcReg, RegState::Kill) .addImm(UsedRegMask >> 16); } else { if (DstReg != SrcReg) @@ -879,11 +879,11 @@ .addImm(UsedRegMask >> 16); else BuildMI(*MI->getParent(), MI, dl, TII.get(PPC::ORIS), DstReg) - .addReg(SrcReg, false, false, true) + .addReg(SrcReg, RegState::Kill) .addImm(UsedRegMask >> 16); BuildMI(*MI->getParent(), MI, dl, TII.get(PPC::ORI), DstReg) - .addReg(DstReg, false, false, true) + .addReg(DstReg, RegState::Kill) .addImm(UsedRegMask & 0xFFFF); } @@ -1101,7 +1101,7 @@ .addImm(32 - Log2_32(MaxAlign)) .addImm(31); BuildMI(MBB, MBBI, dl, TII.get(PPC::SUBFIC) ,PPC::R0) - .addReg(PPC::R0, false, false, true) + .addReg(PPC::R0, RegState::Kill) .addImm(NegFrameSize); BuildMI(MBB, MBBI, dl, TII.get(PPC::STWUX)) .addReg(PPC::R1) @@ -1116,7 +1116,7 @@ BuildMI(MBB, MBBI, dl, TII.get(PPC::LIS), PPC::R0) .addImm(NegFrameSize >> 16); BuildMI(MBB, MBBI, dl, TII.get(PPC::ORI), PPC::R0) - .addReg(PPC::R0, false, false, true) + .addReg(PPC::R0, RegState::Kill) .addImm(NegFrameSize & 0xFFFF); BuildMI(MBB, MBBI, dl, TII.get(PPC::STWUX)) .addReg(PPC::R1) @@ -1148,7 +1148,7 @@ BuildMI(MBB, MBBI, dl, TII.get(PPC::LIS8), PPC::X0) .addImm(NegFrameSize >> 16); BuildMI(MBB, MBBI, dl, TII.get(PPC::ORI8), PPC::X0) - .addReg(PPC::X0, false, false, true) + .addReg(PPC::X0, RegState::Kill) .addImm(NegFrameSize & 0xFFFF); BuildMI(MBB, MBBI, dl, TII.get(PPC::STDUX)) .addReg(PPC::X1) @@ -1288,7 +1288,7 @@ BuildMI(MBB, MBBI, dl, TII.get(PPC::LIS), PPC::R0) .addImm(FrameSize >> 16); BuildMI(MBB, MBBI, dl, TII.get(PPC::ORI), PPC::R0) - .addReg(PPC::R0, false, false, true) + .addReg(PPC::R0, RegState::Kill) .addImm(FrameSize & 0xFFFF); BuildMI(MBB, MBBI, dl, TII.get(PPC::ADD4)) .addReg(PPC::R1) @@ -1312,7 +1312,7 @@ BuildMI(MBB, MBBI, dl, TII.get(PPC::LIS8), PPC::X0) .addImm(FrameSize >> 16); BuildMI(MBB, MBBI, dl, TII.get(PPC::ORI8), PPC::X0) - .addReg(PPC::X0, false, false, true) + .addReg(PPC::X0, RegState::Kill) .addImm(FrameSize & 0xFFFF); BuildMI(MBB, MBBI, dl, TII.get(PPC::ADD8)) .addReg(PPC::X1) @@ -1374,7 +1374,7 @@ BuildMI(MBB, MBBI, dl, TII.get(LISInstr), TmpReg) .addImm(CallerAllocatedAmt >> 16); BuildMI(MBB, MBBI, dl, TII.get(ORIInstr), TmpReg) - .addReg(TmpReg, false, false, true) + .addReg(TmpReg, RegState::Kill) .addImm(CallerAllocatedAmt & 0xFFFF); BuildMI(MBB, MBBI, dl, TII.get(ADDInstr)) .addReg(StackReg) Modified: llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp Wed May 13 16:33:08 2009 @@ -152,13 +152,13 @@ // On the order of operands here: think "[FrameIdx + 0] = SrcReg". if (RC == SP::IntRegsRegisterClass) BuildMI(MBB, I, DL, get(SP::STri)).addFrameIndex(FI).addImm(0) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); else if (RC == SP::FPRegsRegisterClass) BuildMI(MBB, I, DL, get(SP::STFri)).addFrameIndex(FI).addImm(0) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); else if (RC == SP::DFPRegsRegisterClass) BuildMI(MBB, I, DL, get(SP::STDFri)).addFrameIndex(FI).addImm(0) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); else assert(0 && "Can't store this register to stack slot"); } @@ -181,7 +181,7 @@ MachineInstrBuilder MIB = BuildMI(MF, DL, get(Opc)); for (unsigned i = 0, e = Addr.size(); i != e; ++i) MIB.addOperand(Addr[i]); - MIB.addReg(SrcReg, false, false, isKill); + MIB.addReg(SrcReg, getKillRegState(isKill)); NewMIs.push_back(MIB); return; } @@ -260,13 +260,13 @@ get(isFloat ? SP::STFri : SP::STDFri)) .addFrameIndex(FI) .addImm(0) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); } else { // COPY -> LOAD unsigned DstReg = MI->getOperand(0).getReg(); bool isDead = MI->getOperand(0).isDead(); NewMI = BuildMI(MF, MI->getDebugLoc(), get(isFloat ? SP::LDFri : SP::LDDFri)) - .addReg(DstReg, true, false, false, isDead) + .addReg(DstReg, RegState::Define | getDeadRegState(isDead)) .addFrameIndex(FI) .addImm(0); } Modified: llvm/trunk/lib/Target/X86/X86InstrBuilder.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrBuilder.h?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrBuilder.h (original) +++ llvm/trunk/lib/Target/X86/X86InstrBuilder.h Wed May 13 16:33:08 2009 @@ -83,13 +83,13 @@ inline const MachineInstrBuilder &addRegOffset(const MachineInstrBuilder &MIB, unsigned Reg, bool isKill, int Offset) { - return addOffset(MIB.addReg(Reg, false, false, isKill), Offset); + return addOffset(MIB.addReg(Reg, getKillRegState(isKill)), Offset); } inline const MachineInstrBuilder &addLeaRegOffset(const MachineInstrBuilder &MIB, unsigned Reg, bool isKill, int Offset) { - return addLeaOffset(MIB.addReg(Reg, false, false, isKill), Offset); + return addLeaOffset(MIB.addReg(Reg, getKillRegState(isKill)), Offset); } /// addRegReg - This function is used to add a memory reference of the form: @@ -97,8 +97,8 @@ inline const MachineInstrBuilder &addRegReg(const MachineInstrBuilder &MIB, unsigned Reg1, bool isKill1, unsigned Reg2, bool isKill2) { - return MIB.addReg(Reg1, false, false, isKill1).addImm(1) - .addReg(Reg2, false, false, isKill2).addImm(0); + return MIB.addReg(Reg1, getKillRegState(isKill1)).addImm(1) + .addReg(Reg2, getKillRegState(isKill2)).addImm(0); } inline const MachineInstrBuilder &addLeaAddress(const MachineInstrBuilder &MIB, Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Wed May 13 16:33:08 2009 @@ -1032,8 +1032,8 @@ unsigned A = MI->getOperand(0).getReg(); unsigned M = MI->getOperand(3).getImm(); NewMI = BuildMI(MF, MI->getDebugLoc(), get(X86::PSHUFDri)) - .addReg(A, true, false, false, isDead) - .addReg(B, false, false, isKill).addImm(M); + .addReg(A, RegState::Define | getDeadRegState(isDead)) + .addReg(B, getKillRegState(isKill)).addImm(M); break; } case X86::SHL64ri: { @@ -1044,8 +1044,10 @@ if (ShAmt == 0 || ShAmt >= 4) return 0; NewMI = BuildMI(MF, MI->getDebugLoc(), get(X86::LEA64r)) - .addReg(Dest, true, false, false, isDead) - .addReg(0).addImm(1 << ShAmt).addReg(Src, false, false, isKill).addImm(0); + .addReg(Dest, RegState::Define | getDeadRegState(isDead)) + .addReg(0).addImm(1 << ShAmt) + .addReg(Src, getKillRegState(isKill)) + .addImm(0); break; } case X86::SHL32ri: { @@ -1058,9 +1060,9 @@ unsigned Opc = TM.getSubtarget().is64Bit() ? X86::LEA64_32r : X86::LEA32r; NewMI = BuildMI(MF, MI->getDebugLoc(), get(Opc)) - .addReg(Dest, true, false, false, isDead) + .addReg(Dest, RegState::Define | getDeadRegState(isDead)) .addReg(0).addImm(1 << ShAmt) - .addReg(Src, false, false, isKill).addImm(0); + .addReg(Src, getKillRegState(isKill)).addImm(0); break; } case X86::SHL16ri: { @@ -1083,17 +1085,20 @@ BuildMI(*MFI, MBBI, MI->getDebugLoc(), get(X86::IMPLICIT_DEF), leaInReg); MachineInstr *InsMI = BuildMI(*MFI, MBBI, MI->getDebugLoc(), get(X86::INSERT_SUBREG),leaInReg) - .addReg(leaInReg).addReg(Src, false, false, isKill) + .addReg(leaInReg) + .addReg(Src, getKillRegState(isKill)) .addImm(X86::SUBREG_16BIT); NewMI = BuildMI(*MFI, MBBI, MI->getDebugLoc(), get(Opc), leaOutReg) .addReg(0).addImm(1 << ShAmt) - .addReg(leaInReg, false, false, true).addImm(0); + .addReg(leaInReg, RegState::Kill) + .addImm(0); MachineInstr *ExtMI = BuildMI(*MFI, MBBI, MI->getDebugLoc(), get(X86::EXTRACT_SUBREG)) - .addReg(Dest, true, false, false, isDead) - .addReg(leaOutReg, false, false, true).addImm(X86::SUBREG_16BIT); + .addReg(Dest, RegState::Define | getDeadRegState(isDead)) + .addReg(leaOutReg, RegState::Kill) + .addImm(X86::SUBREG_16BIT); if (LV) { // Update live variables @@ -1107,9 +1112,10 @@ return ExtMI; } else { NewMI = BuildMI(MF, MI->getDebugLoc(), get(X86::LEA16r)) - .addReg(Dest, true, false, false, isDead) + .addReg(Dest, RegState::Define | getDeadRegState(isDead)) .addReg(0).addImm(1 << ShAmt) - .addReg(Src, false, false, isKill).addImm(0); + .addReg(Src, getKillRegState(isKill)) + .addImm(0); } break; } @@ -1130,7 +1136,8 @@ unsigned Opc = MIOpc == X86::INC64r ? X86::LEA64r : (is64Bit ? X86::LEA64_32r : X86::LEA32r); NewMI = addLeaRegOffset(BuildMI(MF, MI->getDebugLoc(), get(Opc)) - .addReg(Dest, true, false, false, isDead), + .addReg(Dest, RegState::Define | + getDeadRegState(isDead)), Src, isKill, 1); break; } @@ -1139,7 +1146,8 @@ if (DisableLEA16) return 0; assert(MI->getNumOperands() >= 2 && "Unknown inc instruction!"); NewMI = addRegOffset(BuildMI(MF, MI->getDebugLoc(), get(X86::LEA16r)) - .addReg(Dest, true, false, false, isDead), + .addReg(Dest, RegState::Define | + getDeadRegState(isDead)), Src, isKill, 1); break; case X86::DEC64r: @@ -1149,7 +1157,8 @@ unsigned Opc = MIOpc == X86::DEC64r ? X86::LEA64r : (is64Bit ? X86::LEA64_32r : X86::LEA32r); NewMI = addLeaRegOffset(BuildMI(MF, MI->getDebugLoc(), get(Opc)) - .addReg(Dest, true, false, false, isDead), + .addReg(Dest, RegState::Define | + getDeadRegState(isDead)), Src, isKill, -1); break; } @@ -1158,7 +1167,8 @@ if (DisableLEA16) return 0; assert(MI->getNumOperands() >= 2 && "Unknown dec instruction!"); NewMI = addRegOffset(BuildMI(MF, MI->getDebugLoc(), get(X86::LEA16r)) - .addReg(Dest, true, false, false, isDead), + .addReg(Dest, RegState::Define | + getDeadRegState(isDead)), Src, isKill, -1); break; case X86::ADD64rr: @@ -1169,7 +1179,8 @@ unsigned Src2 = MI->getOperand(2).getReg(); bool isKill2 = MI->getOperand(2).isKill(); NewMI = addRegReg(BuildMI(MF, MI->getDebugLoc(), get(Opc)) - .addReg(Dest, true, false, false, isDead), + .addReg(Dest, RegState::Define | + getDeadRegState(isDead)), Src, isKill, Src2, isKill2); if (LV && isKill2) LV->replaceKillInstruction(Src2, MI, NewMI); @@ -1181,7 +1192,8 @@ unsigned Src2 = MI->getOperand(2).getReg(); bool isKill2 = MI->getOperand(2).isKill(); NewMI = addRegReg(BuildMI(MF, MI->getDebugLoc(), get(X86::LEA16r)) - .addReg(Dest, true, false, false, isDead), + .addReg(Dest, RegState::Define | + getDeadRegState(isDead)), Src, isKill, Src2, isKill2); if (LV && isKill2) LV->replaceKillInstruction(Src2, MI, NewMI); @@ -1192,7 +1204,8 @@ assert(MI->getNumOperands() >= 3 && "Unknown add instruction!"); if (MI->getOperand(2).isImm()) NewMI = addLeaRegOffset(BuildMI(MF, MI->getDebugLoc(), get(X86::LEA64r)) - .addReg(Dest, true, false, false, isDead), + .addReg(Dest, RegState::Define | + getDeadRegState(isDead)), Src, isKill, MI->getOperand(2).getImm()); break; case X86::ADD32ri: @@ -1201,7 +1214,8 @@ if (MI->getOperand(2).isImm()) { unsigned Opc = is64Bit ? X86::LEA64_32r : X86::LEA32r; NewMI = addLeaRegOffset(BuildMI(MF, MI->getDebugLoc(), get(Opc)) - .addReg(Dest, true, false, false, isDead), + .addReg(Dest, RegState::Define | + getDeadRegState(isDead)), Src, isKill, MI->getOperand(2).getImm()); } break; @@ -1211,7 +1225,8 @@ assert(MI->getNumOperands() >= 3 && "Unknown add instruction!"); if (MI->getOperand(2).isImm()) NewMI = addRegOffset(BuildMI(MF, MI->getDebugLoc(), get(X86::LEA16r)) - .addReg(Dest, true, false, false, isDead), + .addReg(Dest, RegState::Define | + getDeadRegState(isDead)), Src, isKill, MI->getOperand(2).getImm()); break; case X86::SHL16ri: @@ -1229,7 +1244,8 @@ : (MIOpc == X86::SHL32ri ? (is64Bit ? X86::LEA64_32r : X86::LEA32r) : X86::LEA16r); NewMI = addFullAddress(BuildMI(MF, MI->getDebugLoc(), get(Opc)) - .addReg(Dest, true, false, false, isDead), AM); + .addReg(Dest, RegState::Define | + getDeadRegState(isDead)), AM); if (isKill) NewMI->getOperand(3).setIsKill(true); } @@ -1870,7 +1886,7 @@ DebugLoc DL = DebugLoc::getUnknownLoc(); if (MI != MBB.end()) DL = MI->getDebugLoc(); addFrameReference(BuildMI(MBB, MI, DL, get(Opc)), FrameIdx) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); } void X86InstrInfo::storeRegToAddr(MachineFunction &MF, unsigned SrcReg, @@ -1885,7 +1901,7 @@ MachineInstrBuilder MIB = BuildMI(MF, DL, get(Opc)); for (unsigned i = 0, e = Addr.size(); i != e; ++i) MIB.addOperand(Addr[i]); - MIB.addReg(SrcReg, false, false, isKill); + MIB.addReg(SrcReg, getKillRegState(isKill)); NewMIs.push_back(MIB); } @@ -2001,7 +2017,7 @@ // Add the callee-saved register as live-in. It's killed at the spill. MBB.addLiveIn(Reg); BuildMI(MBB, MI, DL, get(Opc)) - .addReg(Reg, /*isDef=*/false, /*isImp=*/false, /*isKill=*/true); + .addReg(Reg, RegState::Kill); } return true; } @@ -2396,7 +2412,7 @@ MachineInstrBuilder MIB(DataMI); if (FoldedStore) - MIB.addReg(Reg, true); + MIB.addReg(Reg, RegState::Define); for (unsigned i = 0, e = BeforeOps.size(); i != e; ++i) MIB.addOperand(BeforeOps[i]); if (FoldedLoad) @@ -2405,7 +2421,11 @@ MIB.addOperand(AfterOps[i]); for (unsigned i = 0, e = ImpOps.size(); i != e; ++i) { MachineOperand &MO = ImpOps[i]; - MIB.addReg(MO.getReg(), MO.isDef(), true, MO.isKill(), MO.isDead()); + MIB.addReg(MO.getReg(), + getDefRegState(MO.isDef()) | + RegState::Implicit | + getKillRegState(MO.isKill()) | + getDeadRegState(MO.isDead())); } // Change CMP32ri r, 0 back to TEST32rr r, r, etc. unsigned NewOpc = 0; Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Wed May 13 16:33:08 2009 @@ -789,7 +789,7 @@ // Save EBP into the appropriate stack slot... BuildMI(MBB, MBBI, DL, TII.get(Is64Bit ? X86::PUSH64r : X86::PUSH32r)) - .addReg(FramePtr, /*isDef=*/false, /*isImp=*/false, /*isKill=*/true); + .addReg(FramePtr, RegState::Kill); if (needsFrameMoves) { // Mark effective beginning of when frame pointer becomes valid. @@ -860,7 +860,7 @@ } else { // Save EAX BuildMI(MBB, MBBI, DL, TII.get(X86::PUSH32r)) - .addReg(X86::EAX, /*isDef=*/false, /*isImp=*/false, /*isKill=*/true); + .addReg(X86::EAX, RegState::Kill); // Allocate NumBytes-4 bytes on stack. We'll also use 4 already // allocated bytes for EAX. BuildMI(MBB, MBBI, DL, Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp Wed May 13 16:33:08 2009 @@ -397,7 +397,7 @@ DebugLoc DL = DebugLoc::getUnknownLoc(); if (I != MBB.end()) DL = I->getDebugLoc(); BuildMI(MBB, I, DL, get(XCore::STWFI)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FrameIndex) .addImm(0); } Modified: llvm/trunk/lib/Target/XCore/XCoreRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreRegisterInfo.cpp?rev=71722&r1=71721&r2=71722&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreRegisterInfo.cpp Wed May 13 16:33:08 2009 @@ -237,18 +237,18 @@ case XCore::LDWFI: New = BuildMI(MBB, II, dl, TII.get(XCore::LDW_3r), Reg) .addReg(FramePtr) - .addReg(ScratchReg, false, false, true); + .addReg(ScratchReg, RegState::Kill); break; case XCore::STWFI: New = BuildMI(MBB, II, dl, TII.get(XCore::STW_3r)) - .addReg(Reg, false, false, isKill) + .addReg(Reg, getKillRegState(isKill)) .addReg(FramePtr) - .addReg(ScratchReg, false, false, true); + .addReg(ScratchReg, RegState::Kill); break; case XCore::LDAWFI: New = BuildMI(MBB, II, dl, TII.get(XCore::LDAWF_l3r), Reg) .addReg(FramePtr) - .addReg(ScratchReg, false, false, true); + .addReg(ScratchReg, RegState::Kill); break; default: assert(0 && "Unexpected Opcode\n"); @@ -262,7 +262,7 @@ break; case XCore::STWFI: New = BuildMI(MBB, II, dl, TII.get(XCore::STW_2rus)) - .addReg(Reg, false, false, isKill) + .addReg(Reg, getKillRegState(isKill)) .addReg(FramePtr) .addImm(Offset); break; @@ -293,7 +293,7 @@ case XCore::STWFI: NewOpcode = (isU6) ? XCore::STWSP_ru6 : XCore::STWSP_lru6; BuildMI(MBB, II, dl, TII.get(NewOpcode)) - .addReg(Reg, false, false, isKill) + .addReg(Reg, getKillRegState(isKill)) .addImm(Offset); break; case XCore::LDAWFI: From clattner at apple.com Wed May 13 16:36:52 2009 From: clattner at apple.com (Chris Lattner) Date: Wed, 13 May 2009 14:36:52 -0700 Subject: [llvm-commits] [llvm] r71714 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfWriter.cpp test/DebugInfo/2009-05-13-VariableScope.ll In-Reply-To: <200905132033.n4DKXekW011071@zion.cs.uiuc.edu> References: <200905132033.n4DKXekW011071@zion.cs.uiuc.edu> Message-ID: <9726D4CE-4D55-4405-B9D8-47ABEC83DF21@apple.com> On May 13, 2009, at 1:33 PM, Bill Wendling wrote: > Author: void > Date: Wed May 13 15:33:33 2009 > New Revision: 71714 > > URL: http://llvm.org/viewvc/llvm-project?rev=71714&view=rev > Log: > Move the bookkeeping of the debug scopes back to the place where it > belonged. The variable declaration stuff wasn't happy with it where it > was. Sorry that the testcase is so big. Bugpoint wasn't able to > reduce it > successfully. Please hand reduce or remove the testcase. It is too large, -Chris From evan.cheng at apple.com Wed May 13 16:39:28 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 13 May 2009 21:39:28 -0000 Subject: [llvm-commits] [llvm] r71724 - /llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Message-ID: <200905132139.n4DLdUQb013740@zion.cs.uiuc.edu> Author: evancheng Date: Wed May 13 16:39:20 2009 New Revision: 71724 URL: http://llvm.org/viewvc/llvm-project?rev=71724&view=rev Log: Indentation. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=71724&r1=71723&r2=71724&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Wed May 13 16:39:20 2009 @@ -316,7 +316,7 @@ // indicates that there is potentially an incoming flag value (if Flag is not // null) and that there should be a flag result. SDValue getCopyToReg(SDValue Chain, DebugLoc dl, unsigned Reg, SDValue N, - SDValue Flag) { + SDValue Flag) { SDVTList VTs = getVTList(MVT::Other, MVT::Flag); SDValue Ops[] = { Chain, getRegister(Reg, N.getValueType()), N, Flag }; return getNode(ISD::CopyToReg, dl, VTs, Ops, Flag.getNode() ? 4 : 3); From evan.cheng at apple.com Wed May 13 16:42:20 2009 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 13 May 2009 21:42:20 -0000 Subject: [llvm-commits] [llvm] r71726 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/CodePlacementOpt.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/X86/X86ISelLowering.cpp Message-ID: <200905132142.n4DLgMjx013856@zion.cs.uiuc.edu> Author: evancheng Date: Wed May 13 16:42:09 2009 New Revision: 71726 URL: http://llvm.org/viewvc/llvm-project?rev=71726&view=rev Log: Run code placement optimization for targets that want it (arm and x86 for now). Modified: llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=71726&r1=71725&r2=71726&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Wed May 13 16:42:09 2009 @@ -620,6 +620,13 @@ return allowUnalignedMemoryAccesses; } + /// This function returns true if the target would benefit from code placement + /// optimization. + /// @brief Determine if the target should perform code placement optimization. + bool shouldOptimizeCodePlacement() const { + return benefitFromCodePlacementOpt; + } + /// getOptimalMemOpType - Returns the target specific optimal type for load /// and store operations as a result of memset, memcpy, and memmove lowering. /// It returns MVT::iAny if SelectionDAG should be responsible for @@ -1652,6 +1659,10 @@ /// operations when copying small arrays and other similar tasks. /// @brief Indicate whether the target permits unaligned memory accesses. bool allowUnalignedMemoryAccesses; + + /// This field specifies whether the target can benefit from code placement + /// optimization. + bool benefitFromCodePlacementOpt; }; } // end llvm namespace Modified: llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp?rev=71726&r1=71725&r2=71726&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp (original) +++ llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp Wed May 13 16:42:09 2009 @@ -104,6 +104,9 @@ /// jcc C, [exit] /// bool CodePlacementOpt::OptimizeIntraLoopEdges() { + if (!TLI->shouldOptimizeCodePlacement()) + return false; + bool Changed = false; for (unsigned i = 0, e = UncondJmpMBBs.size(); i != e; ++i) { MachineBasicBlock *MBB = UncondJmpMBBs[i].first; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=71726&r1=71725&r2=71726&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Wed May 13 16:42:09 2009 @@ -483,6 +483,7 @@ memset(TargetDAGCombineArray, 0, array_lengthof(TargetDAGCombineArray)); maxStoresPerMemset = maxStoresPerMemcpy = maxStoresPerMemmove = 8; allowUnalignedMemoryAccesses = false; + benefitFromCodePlacementOpt = false; UseUnderscoreSetJmp = false; UseUnderscoreLongJmp = false; SelectIsExpensive = false; Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=71726&r1=71725&r2=71726&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Wed May 13 16:42:09 2009 @@ -288,6 +288,7 @@ setIfCvtDupBlockSizeLimit(Subtarget->isThumb() ? 0 : 2); maxStoresPerMemcpy = 1; //// temporary - rewrite interface to use type + benefitFromCodePlacementOpt = true; } const char *ARMTargetLowering::getTargetNodeName(unsigned Opcode) const { Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=71726&r1=71725&r2=71726&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed May 13 16:42:09 2009 @@ -844,6 +844,7 @@ maxStoresPerMemmove = 3; // For @llvm.memmove -> sequence of stores allowUnalignedMemoryAccesses = true; // x86 supports it! setPrefLoopAlignment(16); + benefitFromCodePlacementOpt = true; } From isanbard at gmail.com Wed May 13 16:47:12 2009 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 13 May 2009 21:47:12 -0000 Subject: [llvm-commits] [llvm] r71727 - /llvm/tags/Apple/llvmCore-2109.2/ Message-ID: <200905132147.n4DLlF1H014072@zion.cs.uiuc.edu> Author: void Date: Wed May 13 16:46:39 2009 New Revision: 71727 URL: http://llvm.org/viewvc/llvm-project?rev=71727&view=rev Log: Creating llvmCore-2109.2 branch Added: llvm/tags/Apple/llvmCore-2109.2/ - copied from r71726, llvm/branches/Apple/Dib/ From isanbard at gmail.com Wed May 13 16:47:34 2009 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 13 May 2009 21:47:34 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r71728 - /llvm-gcc-4.2/tags/Apple/llvmgcc42-2109.2/ Message-ID: <200905132147.n4DLlYiG014091@zion.cs.uiuc.edu> Author: void Date: Wed May 13 16:47:32 2009 New Revision: 71728 URL: http://llvm.org/viewvc/llvm-project?rev=71728&view=rev Log: Creating llvmgcc42-2109.2 branch Added: llvm-gcc-4.2/tags/Apple/llvmgcc42-2109.2/ - copied from r71727, llvm-gcc-4.2/branches/Apple/Dib/ From isanbard at gmail.com Wed May 13 16:49:57 2009 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 13 May 2009 21:49:57 -0000 Subject: [llvm-commits] [llvm] r71729 - /llvm/tags/Apple/llvmCore-2109.2/ Message-ID: <200905132149.n4DLnvJM014214@zion.cs.uiuc.edu> Author: void Date: Wed May 13 16:49:55 2009 New Revision: 71729 URL: http://llvm.org/viewvc/llvm-project?rev=71729&view=rev Log: Premature tagging. Removed: llvm/tags/Apple/llvmCore-2109.2/ From isanbard at gmail.com Wed May 13 16:50:02 2009 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 13 May 2009 21:50:02 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r71729 - /llvm-gcc-4.2/tags/Apple/llvmgcc42-2109.2/ Message-ID: <200905132150.n4DLo2OX014222@zion.cs.uiuc.edu> Author: void Date: Wed May 13 16:49:55 2009 New Revision: 71729 URL: http://llvm.org/viewvc/llvm-project?rev=71729&view=rev Log: Premature tagging. Removed: llvm-gcc-4.2/tags/Apple/llvmgcc42-2109.2/ From isanbard at gmail.com Wed May 13 16:51:33 2009 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 13 May 2009 14:51:33 -0700 Subject: [llvm-commits] [llvm] r71714 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfWriter.cpp test/DebugInfo/2009-05-13-VariableScope.ll In-Reply-To: <9726D4CE-4D55-4405-B9D8-47ABEC83DF21@apple.com> References: <200905132033.n4DKXekW011071@zion.cs.uiuc.edu> <9726D4CE-4D55-4405-B9D8-47ABEC83DF21@apple.com> Message-ID: <16e5fdf90905131451q1bea801fp731b7a9ad4740a9b@mail.gmail.com> On Wed, May 13, 2009 at 2:36 PM, Chris Lattner wrote: > > On May 13, 2009, at 1:33 PM, Bill Wendling wrote: > >> Author: void >> Date: Wed May 13 15:33:33 2009 >> New Revision: 71714 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=71714&view=rev >> Log: >> Move the bookkeeping of the debug scopes back to the place where it >> belonged. The variable declaration stuff wasn't happy with it where it >> was. Sorry that the testcase is so big. Bugpoint wasn't able to >> reduce it >> successfully. > > Please hand reduce or remove the testcase. ?It is too large, > Removing it for now. I'll work on reducing it later. -bw From isanbard at gmail.com Wed May 13 16:51:35 2009 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 13 May 2009 21:51:35 -0000 Subject: [llvm-commits] [llvm] r71730 - /llvm/trunk/test/DebugInfo/2009-05-13-VariableScope.ll Message-ID: <200905132151.n4DLpbt7014296@zion.cs.uiuc.edu> Author: void Date: Wed May 13 16:51:26 2009 New Revision: 71730 URL: http://llvm.org/viewvc/llvm-project?rev=71730&view=rev Log: Remove too large testcase. Removed: llvm/trunk/test/DebugInfo/2009-05-13-VariableScope.ll Removed: llvm/trunk/test/DebugInfo/2009-05-13-VariableScope.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/2009-05-13-VariableScope.ll?rev=71729&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/2009-05-13-VariableScope.ll (original) +++ llvm/trunk/test/DebugInfo/2009-05-13-VariableScope.ll (removed) @@ -1,3256 +0,0 @@ -; RUN: llvm-as < %s | llc -O0 - -module asm "\09.lazy_reference .objc_class_name_NSTextFieldCell" -module asm "\09.objc_class_name_DVIconAndTextCell=0" -module asm "\09.globl .objc_class_name_DVIconAndTextCell" -module asm "" -module asm "" - type { i32, [2 x %struct._objc_ivar] } ; type %0 - type { i8*, i32, [23 x %struct._objc_method] } ; type %1 - type { i32, %struct.objc_selector*, i16, i16, [1 x i8*] } ; type %2 - type opaque ; type %3 - type opaque ; type %4 - type opaque ; type %5 - type opaque ; type %6 - type opaque ; type %7 - type opaque ; type %8 - type opaque ; type %9 - %llvm.dbg.anchor.type = type { i32, i32 } - %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 } - %llvm.dbg.variable.type = type { i32, { }*, i8*, { }*, i32, { }* } - %struct.CGPoint = type <{ double, double }> - %struct.CGRect = type <{ %struct.CGPoint, %struct.CGPoint }> - %struct.CGSize = type <{ double, double }> - %struct.NSConstantString = type <{ i32*, i32, i8*, i32 }> - %struct._NSZone = type opaque - %struct._objc_cache = type opaque - %struct._objc_category = type { i8*, i8*, %struct._objc_method_list*, %struct._objc_method_list*, %struct._objc_protocol_list*, i32, %struct._prop_list_t* } - %struct._objc_class = type { %struct._objc_class*, %struct._objc_class*, i8*, i32, i32, i32, %struct._objc_ivar_list*, %struct._objc_method_list*, %struct._objc_cache*, %struct._objc_protocol_list*, i8*, %struct._objc_class_extension* } - %struct._objc_class_extension = type { i32, i8*, %struct._prop_list_t* } - %struct._objc_exception_data = type { [18 x i32], [4 x i8*] } - %struct._objc_ivar = type { i8*, i8*, i32 } - %struct._objc_ivar_list = type opaque - %struct._objc_method = type { %struct.objc_selector*, i8*, i8* } - %struct._objc_method_description = type { %struct.objc_selector*, i8* } - %struct._objc_method_description_list = type { i32, [0 x %struct._objc_method_description] } - %struct._objc_method_list = type opaque - %struct._objc_module = type { i32, i32, i8*, %struct._objc_symtab* } - %struct._objc_protocol = type { %struct._objc_protocol_extension*, i8*, %struct._objc_protocol_list*, %struct._objc_method_description_list*, %struct._objc_method_description_list* } - %struct._objc_protocol_extension = type { i32, %struct._objc_method_description_list*, %struct._objc_method_description_list*, %struct._prop_list_t* } - %struct._objc_protocol_list = type { %struct._objc_protocol_list*, i32, [0 x %struct._objc_protocol] } - %struct._objc_super = type <{ %struct.objc_object*, %struct.objc_class* }> - %struct._objc_symtab = type { i32, %struct.objc_selector*, i16, i16, [0 x i8*] } - %struct._prop_list_t = type { i32, i32, [0 x %struct._prop_t] } - %struct._prop_t = type { i8*, i8* } - %struct.objc_class = type opaque - %struct.objc_object = type <{ %struct.objc_class* }> - %struct.objc_selector = type opaque -@"\01L_OBJC_IMAGE_INFO" = internal constant [2 x i32] [i32 0, i32 16], section "__OBJC, __image_info,regular" ; <[2 x i32]*> [#uses=1] - at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str = internal constant [20 x i8] c"DVIconAndTextCell.m\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at .str1 = internal constant [103 x i8] c"/Volumes/Data/ddunbar/private/GarnetXcodeIDE/XcodeIDE/Frameworks/DocSetManagementViewing/DocSetViewing\00", section "llvm.metadata" ; <[103 x i8]*> [#uses=1] - at .str2 = internal constant [10 x i8] c"clang 1.0\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([20 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([103 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str3 = internal constant [7 x i8] c"objc.h\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str4 = internal constant [18 x i8] c"/usr/include/objc\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.compile_unit5 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([7 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str4, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str6 = internal constant [12 x i8] c"objc_object\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at .str7 = internal constant [11 x i8] c"objc_class\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.composite8 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str7, i32 0, i32 0), { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite8 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str9 = internal constant [6 x i8] c"Class\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype10 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str9, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to { }*), i32 35, 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 .str11 = internal constant [4 x i8] c"isa\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.derivedtype12 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str11, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to { }*), i32 37, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype10 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype12 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] - at llvm.dbg.composite13 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str6, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to { }*), i32 36, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype14 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite13 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str15 = internal constant [3 x i8] c"id\00", section "llvm.metadata" ; <[3 x i8]*> [#uses=1] - at llvm.dbg.derivedtype16 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([3 x i8]* @.str15, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to { }*), i32 38, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype14 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str17 = internal constant [36 x i8] c"\01-[DVIconAndTextCell initTextCell:]\00", section "llvm.metadata" ; <[36 x i8]*> [#uses=1] - at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([36 x i8]* @.str17, i32 0, i32 0), i8* getelementptr ([36 x i8]* @.str17, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 15, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str18 = internal constant [10 x i8] c"\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str19 = internal constant [22 x i8] c"/Volumes/Sandbox/llvm\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.compile_unit20 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([10 x i8]* @.str18, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str19, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str21 = internal constant [20 x i8] c"DVIconAndTextCell.h\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.compile_unit22 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([20 x i8]* @.str21, i32 0, i32 0), i8* getelementptr ([103 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str23 = internal constant [18 x i8] c"DVIconAndTextCell\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at .str24 = internal constant [18 x i8] c"NSTextFieldCell.h\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at .str25 = internal constant [52 x i8] c"/System/Library/Frameworks/AppKit.framework/Headers\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] - at llvm.dbg.compile_unit26 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([18 x i8]* @.str24, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str27 = internal constant [16 x i8] c"NSTextFieldCell\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at .str29 = internal constant [15 x i8] c"NSActionCell.h\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.compile_unit30 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([15 x i8]* @.str29, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str31 = internal constant [13 x i8] c"NSActionCell\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at .str33 = internal constant [9 x i8] c"NSCell.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.compile_unit34 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([9 x i8]* @.str33, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str35 = internal constant [7 x i8] c"NSCell\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str37 = internal constant [11 x i8] c"NSObject.h\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str38 = internal constant [56 x i8] c"/System/Library/Frameworks/Foundation.framework/Headers\00", section "llvm.metadata" ; <[56 x i8]*> [#uses=1] - at llvm.dbg.compile_unit39 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([11 x i8]* @.str37, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str40 = internal constant [9 x i8] c"NSObject\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype42 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([4 x i8]* @.str11, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit39 to { }*), i32 66, i64 32, i64 32, i64 0, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype10 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array43 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype42 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] - at llvm.dbg.composite44 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str40, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit39 to { }*), i32 65, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array43 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype45 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str46 = internal constant [10 x i8] c"_contents\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype47 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str46, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 168, i64 32, i64 32, i64 32, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str48 = internal constant [9 x i8] c"__CFlags\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at .str50 = internal constant [13 x i8] c"unsigned int\00", section "llvm.metadata" ; <[13 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_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str50, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 7 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str51 = internal constant [6 x i8] c"state\00", section "llvm.metadata" ; <[6 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_unit20 to { }*), i8* getelementptr ([6 x i8]* @.str51, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 112, i64 1, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str53 = internal constant [12 x i8] c"highlighted\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype54 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([12 x i8]* @.str53, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 113, i64 1, i64 32, i64 1, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str55 = internal constant [9 x i8] c"disabled\00", section "llvm.metadata" ; <[9 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_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str55, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 114, i64 1, i64 32, i64 2, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str57 = internal constant [9 x i8] c"editable\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype58 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str57, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 115, i64 1, i64 32, i64 3, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str59 = internal constant [14 x i8] c"unsigned long\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.basictype60 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str59, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 7 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str61 = internal constant [16 x i8] c"NSObjCRuntime.h\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.compile_unit62 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([16 x i8]* @.str61, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str63 = internal constant [11 x i8] c"NSUInteger\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype64 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str63, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit62 to { }*), i32 161, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype60 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str65 = internal constant [11 x i8] c"NSCellType\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype66 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str65, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 31, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype64 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str67 = internal constant [5 x i8] c"type\00", section "llvm.metadata" ; <[5 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_unit20 to { }*), i8* getelementptr ([5 x i8]* @.str67, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 116, i64 2, i64 32, i64 4, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype66 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str69 = internal constant [10 x i8] c"vCentered\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype70 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str69, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 117, i64 1, i64 32, i64 6, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str71 = internal constant [10 x i8] c"hCentered\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype72 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str71, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 118, i64 1, i64 32, i64 7, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str73 = internal constant [9 x i8] c"bordered\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype74 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str73, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 119, i64 1, i64 32, i64 8, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str75 = internal constant [8 x i8] c"bezeled\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype76 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str75, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 120, i64 1, i64 32, i64 9, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str77 = internal constant [11 x i8] c"selectable\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype78 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str77, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 121, i64 1, i64 32, i64 10, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str79 = internal constant [11 x i8] c"scrollable\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype80 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str79, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 122, i64 1, i64 32, i64 11, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str81 = internal constant [11 x i8] c"continuous\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype82 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str81, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 123, i64 1, i64 32, i64 12, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str83 = internal constant [15 x i8] c"actOnMouseDown\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype84 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([15 x i8]* @.str83, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 124, i64 1, i64 32, i64 13, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str85 = internal constant [7 x i8] c"isLeaf\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype86 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str85, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 125, i64 1, i64 32, i64 14, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str87 = internal constant [19 x i8] c"invalidObjectValue\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.derivedtype88 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([19 x i8]* @.str87, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 126, i64 1, i64 32, i64 15, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str89 = internal constant [12 x i8] c"invalidFont\00", section "llvm.metadata" ; <[12 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_unit20 to { }*), i8* getelementptr ([12 x i8]* @.str89, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 127, i64 1, i64 32, i64 16, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str91 = internal constant [19 x i8] c"NSParagraphStyle.h\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.compile_unit92 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([19 x i8]* @.str91, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str93 = internal constant [16 x i8] c"NSLineBreakMode\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype94 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str93, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit92 to { }*), i32 28, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype64 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str95 = internal constant [14 x i8] c"lineBreakMode\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype96 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str95, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 128, i64 3, i64 32, i64 17, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype94 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str97 = internal constant [14 x i8] c"cellReserved1\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype98 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str97, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 129, i64 2, i64 32, i64 20, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str99 = internal constant [15 x i8] c"singleLineMode\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype100 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([15 x i8]* @.str99, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 130, i64 1, i64 32, i64 22, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str101 = internal constant [18 x i8] c"actOnMouseDragged\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.derivedtype102 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([18 x i8]* @.str101, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 131, i64 1, i64 32, i64 23, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str103 = internal constant [9 x i8] c"isLoaded\00", section "llvm.metadata" ; <[9 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_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str103, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 132, i64 1, i64 32, i64 24, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str105 = internal constant [17 x i8] c"truncateLastLine\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype106 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str105, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 133, i64 1, i64 32, i64 25, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str107 = internal constant [17 x i8] c"dontActOnMouseUp\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype108 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str107, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 134, i64 1, i64 32, i64 26, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str109 = internal constant [8 x i8] c"isWhite\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype110 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str109, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 135, i64 1, i64 32, i64 27, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str111 = internal constant [21 x i8] c"useUserKeyEquivalent\00", section "llvm.metadata" ; <[21 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_unit20 to { }*), i8* getelementptr ([21 x i8]* @.str111, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 136, i64 1, i64 32, i64 28, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str113 = internal constant [20 x i8] c"showsFirstResponder\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.derivedtype114 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([20 x i8]* @.str113, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 137, i64 1, i64 32, i64 29, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str115 = internal constant [14 x i8] c"focusRingType\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype116 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str115, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 138, i64 2, i64 32, i64 30, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str117 = internal constant [14 x i8] c"wasSelectable\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype118 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str117, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 139, i64 1, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str119 = internal constant [17 x i8] c"hasInvalidObject\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype120 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str119, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 140, i64 1, i64 32, i64 33, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str121 = internal constant [28 x i8] c"allowsEditingTextAttributes\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.derivedtype122 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([28 x i8]* @.str121, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 141, i64 1, i64 32, i64 34, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str123 = internal constant [16 x i8] c"importsGraphics\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype124 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str123, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 142, i64 1, i64 32, i64 35, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str125 = internal constant [9 x i8] c"NSText.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.compile_unit126 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([9 x i8]* @.str125, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str127 = internal constant [16 x i8] c"NSTextAlignment\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype128 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str127, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit126 to { }*), i32 36, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype64 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str129 = internal constant [10 x i8] c"alignment\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype130 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str129, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 143, i64 3, i64 32, i64 36, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype128 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str131 = internal constant [19 x i8] c"layoutDirectionRTL\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.derivedtype132 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([19 x i8]* @.str131, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 144, i64 1, i64 32, i64 39, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str133 = internal constant [16 x i8] c"backgroundStyle\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype134 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str133, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 145, i64 3, i64 32, i64 40, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str135 = internal constant [14 x i8] c"cellReserved2\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype136 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str135, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 146, i64 4, i64 32, i64 43, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str137 = internal constant [22 x i8] c"refusesFirstResponder\00", section "llvm.metadata" ; <[22 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_unit20 to { }*), i8* getelementptr ([22 x i8]* @.str137, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 147, i64 1, i64 32, i64 47, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str139 = internal constant [21 x i8] c"needsHighlightedText\00", section "llvm.metadata" ; <[21 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_unit20 to { }*), i8* getelementptr ([21 x i8]* @.str139, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 148, i64 1, i64 32, i64 48, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str141 = internal constant [15 x i8] c"dontAllowsUndo\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype142 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([15 x i8]* @.str141, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 149, i64 1, i64 32, i64 49, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str143 = internal constant [17 x i8] c"currentlyEditing\00", section "llvm.metadata" ; <[17 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_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str143, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 150, i64 1, i64 32, i64 50, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str145 = internal constant [17 x i8] c"allowsMixedState\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype146 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str145, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 151, i64 1, i64 32, i64 51, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str147 = internal constant [13 x i8] c"inMixedState\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype148 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str147, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 152, i64 1, i64 32, i64 52, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str149 = internal constant [24 x i8] c"sendsActionOnEndEditing\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.derivedtype150 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([24 x i8]* @.str149, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 153, i64 1, i64 32, i64 53, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str151 = internal constant [13 x i8] c"inSendAction\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype152 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str151, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 154, i64 1, i64 32, i64 54, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str153 = internal constant [11 x i8] c"menuWasSet\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype154 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str153, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 155, i64 1, i64 32, i64 55, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str155 = internal constant [12 x i8] c"controlTint\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype156 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([12 x i8]* @.str155, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 156, i64 3, i64 32, i64 56, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str157 = internal constant [12 x i8] c"controlSize\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype158 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([12 x i8]* @.str157, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 157, i64 2, i64 32, i64 59, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str159 = internal constant [20 x i8] c"branchImageDisabled\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.derivedtype160 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([20 x i8]* @.str159, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 158, i64 1, i64 32, i64 61, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str161 = internal constant [20 x i8] c"drawingInRevealover\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.derivedtype162 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([20 x i8]* @.str161, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 159, i64 1, i64 32, i64 62, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str163 = internal constant [25 x i8] c"needsHighlightedTextHint\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] - at llvm.dbg.derivedtype164 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([25 x i8]* @.str163, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 160, i64 1, i64 32, i64 63, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array165 = internal constant [49 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype52 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype54 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype56 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype58 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype68 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype70 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype72 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype74 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype76 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype78 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype80 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype82 to { }*), { }* bitcast (%llvm.dbg.! derivedtype.type* @llvm.dbg.derivedtype84 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype86 to { }*), { }* 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.derivedtype96 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype98 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype100 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype102 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype104 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype106 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype108 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype110 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype112 to { }*), { }* bitcast (%ll! vm.dbg.derivedtype.type* @llvm.dbg.derivedtype114 to { }*), { ! }* bitca st (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype116 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype118 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype120 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype122 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype124 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype130 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype132 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype134 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype136 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype138 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype140 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype142 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype144 to { }*)! , { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype146 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype148 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype150 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype152 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype154 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype156 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype158 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype160 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype162 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype164 to { }*)], section "llvm.metadata" ; <[49 x { }*]*> [#uses=1] - at llvm.dbg.composite166 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str48, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 111, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([49 x { }*]* @llvm.dbg.array165 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str167 = internal constant [8 x i8] c"_CFlags\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype168 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str167, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 161, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite166 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str169 = internal constant [8 x i8] c"_cFlags\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype170 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str169, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 169, i64 64, i64 32, i64 64, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype168 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str171 = internal constant [9 x i8] c"_support\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype172 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str171, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 173, i64 32, i64 32, i64 128, i32 1, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array173 = internal constant [4 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype45 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype47 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype170 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype172 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] - at llvm.dbg.composite174 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str35, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit34 to { }*), i32 165, i64 160, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array173 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype175 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite174 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str176 = internal constant [5 x i8] c"long\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.basictype177 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([5 x i8]* @.str176, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str178 = internal constant [10 x i8] c"NSInteger\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype179 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str178, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit62 to { }*), i32 160, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype177 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str180 = internal constant [5 x i8] c"_tag\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.derivedtype181 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([5 x i8]* @.str180, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 13, i64 32, i64 32, i64 160, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype179 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str182 = internal constant [8 x i8] c"_target\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype183 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str182, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 14, i64 32, i64 32, i64 192, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str184 = internal constant [14 x i8] c"objc_selector\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.composite185 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str184, i32 0, i32 0), { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype186 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite185 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str187 = internal constant [4 x i8] c"SEL\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.derivedtype188 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([4 x i8]* @.str187, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to { }*), i32 41, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype186 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str189 = internal constant [8 x i8] c"_action\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype190 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str189, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 15, i64 32, i64 32, i64 224, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str191 = internal constant [13 x i8] c"_controlView\00", section "llvm.metadata" ; <[13 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_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str191, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 16, i64 32, i64 32, i64 256, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array193 = internal constant [5 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype175 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype181 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype183 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype190 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype192 to { }*)], section "llvm.metadata" ; <[5 x { }*]*> [#uses=1] - at llvm.dbg.composite194 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str31, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit30 to { }*), i32 10, i64 288, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([5 x { }*]* @llvm.dbg.array193 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype195 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite194 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str196 = internal constant [10 x i8] c"NSColor.h\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.compile_unit197 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([10 x i8]* @.str196, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str198 = internal constant [8 x i8] c"NSColor\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype200 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array201 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype200 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] - at llvm.dbg.composite202 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str198, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit197 to { }*), i32 43, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array201 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype203 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite202 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str204 = internal constant [17 x i8] c"_backgroundColor\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype205 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str204, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 22, i64 32, i64 32, i64 288, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype203 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str206 = internal constant [11 x i8] c"_textColor\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype207 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str206, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 23, i64 32, i64 32, i64 320, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype203 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str208 = internal constant [10 x i8] c"__tfFlags\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str210 = internal constant [16 x i8] c"drawsBackground\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype211 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str210, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 25, i64 1, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str212 = internal constant [11 x i8] c"bezelStyle\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype213 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str212, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 26, i64 3, i64 32, i64 1, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str214 = internal constant [17 x i8] c"thcSortDirection\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype215 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str214, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 27, i64 2, i64 32, i64 4, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str216 = internal constant [16 x i8] c"thcSortPriority\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype217 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str216, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 28, i64 4, i64 32, i64 6, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str218 = internal constant [5 x i8] c"mini\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.derivedtype219 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([5 x i8]* @.str218, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 29, i64 1, i64 32, i64 10, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str220 = internal constant [34 x i8] c"textColorIgnoresNormalDisableFlag\00", section "llvm.metadata" ; <[34 x i8]*> [#uses=1] - at llvm.dbg.derivedtype221 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([34 x i8]* @.str220, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 30, i64 1, i64 32, i64 11, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str222 = internal constant [21 x i8] c"textColorDisableFlag\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.derivedtype223 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([21 x i8]* @.str222, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 31, i64 1, i64 32, i64 12, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str224 = internal constant [25 x i8] c"thcForceHighlightForSort\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] - at llvm.dbg.derivedtype225 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([25 x i8]* @.str224, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 32, i64 1, i64 32, i64 13, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str226 = internal constant [17 x i8] c"invalidTextColor\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype227 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([17 x i8]* @.str226, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 33, i64 1, i64 32, i64 14, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str228 = internal constant [26 x i8] c"notificationForMarkedText\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.derivedtype229 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([26 x i8]* @.str228, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 34, i64 1, i64 32, i64 15, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str230 = internal constant [22 x i8] c"reservedTextFieldCell\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.derivedtype231 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([22 x i8]* @.str230, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 35, i64 16, i64 32, i64 16, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array232 = internal constant [11 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype211 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype213 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype215 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype217 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype219 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype221 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype223 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype225 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype227 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype229 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype231 to { }*)], section "llvm.metadata" ; <[11 x { }*]*> [#uses=1] - at llvm.dbg.composite233 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str208, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 24, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([11 x { }*]* @llvm.dbg.array232 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str234 = internal constant [9 x i8] c"_tfFlags\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype235 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str234, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 36, i64 32, i64 32, i64 352, i32 2, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite233 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array236 = internal constant [4 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype195 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype205 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype207 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype235 to { }*)], section "llvm.metadata" ; <[4 x { }*]*> [#uses=1] - at llvm.dbg.composite237 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str27, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit26 to { }*), i32 20, i64 384, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([4 x { }*]* @llvm.dbg.array236 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype238 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite237 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str239 = internal constant [10 x i8] c"NSImage.h\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.compile_unit240 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([10 x i8]* @.str239, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str241 = internal constant [8 x i8] c"NSImage\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype243 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str244 = internal constant [11 x i8] c"NSString.h\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.compile_unit245 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([11 x i8]* @.str244, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str246 = internal constant [9 x i8] c"NSString\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype248 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array249 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype248 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] - at llvm.dbg.composite250 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str246, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit245 to { }*), i32 84, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array249 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype251 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite250 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str252 = internal constant [6 x i8] c"_name\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype253 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([6 x i8]* @.str252, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 50, i64 32, i64 32, i64 32, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype251 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str254 = internal constant [13 x i8] c"CGGeometry.h\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at .str255 = internal constant [110 x i8] c"/System/Library/Frameworks/ApplicationServices.framework/Headers/../Frameworks/CoreGraphics.framework/Headers\00", section "llvm.metadata" ; <[110 x i8]*> [#uses=1] - at llvm.dbg.compile_unit256 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([13 x i8]* @.str254, i32 0, i32 0), i8* getelementptr ([110 x i8]* @.str255, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str257 = internal constant [7 x i8] c"CGSize\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str259 = internal constant [7 x i8] c"double\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.basictype260 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str259, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i32 0, i64 64, i64 32, i64 0, i32 0, i32 4 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str261 = internal constant [9 x i8] c"CGBase.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.compile_unit262 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([9 x i8]* @.str261, i32 0, i32 0), i8* getelementptr ([110 x i8]* @.str255, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str263 = internal constant [8 x i8] c"CGFloat\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype264 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str263, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit262 to { }*), i32 105, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype260 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str265 = internal constant [6 x i8] c"width\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype266 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([6 x i8]* @.str265, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 22, i64 64, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str267 = internal constant [7 x i8] c"height\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype268 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str267, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 23, i64 64, i64 32, i64 64, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array269 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype266 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype268 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite270 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str257, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 21, i64 128, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array269 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype271 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str257, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 25, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite270 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str272 = internal constant [13 x i8] c"NSGeometry.h\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.compile_unit273 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([13 x i8]* @.str272, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str274 = internal constant [7 x i8] c"NSSize\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype275 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str274, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 26, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype271 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str276 = internal constant [6 x i8] c"_size\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype277 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([6 x i8]* @.str276, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 51, i64 128, i64 32, i64 64, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str278 = internal constant [13 x i8] c"__imageFlags\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at .str280 = internal constant [9 x i8] c"scalable\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype281 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([9 x i8]* @.str280, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 53, i64 1, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str282 = internal constant [13 x i8] c"dataRetained\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype283 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str282, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 54, i64 1, i64 32, i64 1, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str284 = internal constant [13 x i8] c"uniqueWindow\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype285 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str284, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 55, i64 1, i64 32, i64 2, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str286 = internal constant [21 x i8] c"sizeWasExplicitlySet\00", section "llvm.metadata" ; <[21 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_unit20 to { }*), i8* getelementptr ([21 x i8]* @.str286, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 56, i64 1, i64 32, i64 3, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str288 = internal constant [8 x i8] c"builtIn\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype289 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str288, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 57, i64 1, i64 32, i64 4, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str290 = internal constant [14 x i8] c"needsToExpand\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype291 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str290, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 58, i64 1, i64 32, i64 5, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str292 = internal constant [27 x i8] c"useEPSOnResolutionMismatch\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.derivedtype293 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([27 x i8]* @.str292, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 59, i64 1, i64 32, i64 6, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str294 = internal constant [20 x i8] c"colorMatchPreferred\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.derivedtype295 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([20 x i8]* @.str294, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 60, i64 1, i64 32, i64 7, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str296 = internal constant [27 x i8] c"multipleResolutionMatching\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.derivedtype297 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([27 x i8]* @.str296, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 61, i64 1, i64 32, i64 8, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str298 = internal constant [21 x i8] c"focusedWhilePrinting\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.derivedtype299 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([21 x i8]* @.str298, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 62, i64 1, i64 32, i64 9, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str300 = internal constant [14 x i8] c"archiveByName\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype301 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([14 x i8]* @.str300, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 63, i64 1, i64 32, i64 10, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str302 = internal constant [20 x i8] c"unboundedCacheDepth\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.derivedtype303 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([20 x i8]* @.str302, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 64, i64 1, i64 32, i64 11, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str304 = internal constant [8 x i8] c"flipped\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype305 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str304, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 65, i64 1, i64 32, i64 12, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str306 = internal constant [8 x i8] c"aliased\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype307 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str306, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 66, i64 1, i64 32, i64 13, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str308 = internal constant [8 x i8] c"dirtied\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype309 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str308, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 67, i64 1, i64 32, i64 14, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str310 = internal constant [10 x i8] c"cacheMode\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype311 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str310, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 68, i64 2, i64 32, i64 15, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str312 = internal constant [11 x i8] c"sampleMode\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype313 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str312, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 69, i64 3, i64 32, i64 17, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str314 = internal constant [10 x i8] c"reserved2\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype315 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str314, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 70, i64 1, i64 32, i64 20, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str316 = internal constant [11 x i8] c"isTemplate\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype317 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([11 x i8]* @.str316, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 71, i64 1, i64 32, i64 21, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str318 = internal constant [15 x i8] c"failedToExpand\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype319 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([15 x i8]* @.str318, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 72, i64 1, i64 32, i64 22, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str320 = internal constant [10 x i8] c"reserved1\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype321 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([10 x i8]* @.str320, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 73, i64 9, i64 32, i64 23, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array322 = internal constant [21 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype281 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype283 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype287 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype289 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype291 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype293 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype295 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype297 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype299 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype301 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype303 to { }*), { }* bitcast! (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype305 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype307 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype309 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype311 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype313 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype315 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype317 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype319 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype321 to { }*)], section "llvm.metadata" ; <[21 x { }*]*> [#uses=1] - at llvm.dbg.composite323 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([13 x i8]* @.str278, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 52, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([21 x { }*]* @llvm.dbg.array322 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str324 = internal constant [7 x i8] c"_flags\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype325 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([7 x i8]* @.str324, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 74, i64 32, i64 32, i64 192, i32 2, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite323 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str326 = internal constant [6 x i8] c"_reps\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype327 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([6 x i8]* @.str326, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 75, i64 32, i64 32, i64 224, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str328 = internal constant [18 x i8] c"_NSImageAuxiliary\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.composite329 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([18 x i8]* @.str328, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 40, i64 0, i64 0, i64 0, i32 0, { }* null, { }* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype330 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite329 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str331 = internal constant [16 x i8] c"_imageAuxiliary\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype332 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([16 x i8]* @.str331, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 76, i64 32, i64 32, i64 256, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype330 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array333 = internal constant [6 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype243 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype253 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype277 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype325 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype327 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype332 to { }*)], section "llvm.metadata" ; <[6 x { }*]*> [#uses=1] - at llvm.dbg.composite334 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([8 x i8]* @.str241, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit240 to { }*), i32 42, i64 288, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([6 x { }*]* @llvm.dbg.array333 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype335 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite334 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str336 = internal constant [5 x i8] c"icon\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.derivedtype337 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([5 x i8]* @.str336, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit22 to { }*), i32 15, i64 32, i64 32, i64 384, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype335 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str338 = internal constant [18 x i8] c"preferredIconSize\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.derivedtype339 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([18 x i8]* @.str338, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit22 to { }*), i32 16, i64 128, i64 32, i64 416, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array340 = internal constant [3 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype238 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype337 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype339 to { }*)], section "llvm.metadata" ; <[3 x { }*]*> [#uses=1] - at llvm.dbg.composite341 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* getelementptr ([18 x i8]* @.str23, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit22 to { }*), i32 12, i64 544, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([3 x { }*]* @llvm.dbg.array340 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype342 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit20 to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite341 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str343 = internal constant [5 x i8] c"self\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.variable = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str344 = internal constant [5 x i8] c"_cmd\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.variable345 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str346 = internal constant [7 x i8] c"string\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.variable347 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*), i8* getelementptr ([7 x i8]* @.str346, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 15, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype251 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] -@"\01L_OBJC_CLASS_NAME_" = internal global [16 x i8] c"NSTextFieldCell\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[16 x i8]*> [#uses=2] -@"\01L_OBJC_CLASS_REFERENCES_" = internal global %struct._objc_class* bitcast ([16 x i8]* @"\01L_OBJC_CLASS_NAME_" to %struct._objc_class*), section "__OBJC,__cls_refs,literal_pointers,no_dead_strip", align 4 ; <%struct._objc_class**> [#uses=6] -@"\01L_OBJC_METH_VAR_NAME_" = internal global [14 x i8] c"initTextCell:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[14 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_" = internal global %struct.objc_selector* bitcast ([14 x i8]* @"\01L_OBJC_METH_VAR_NAME_" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] -@"\01L_OBJC_METH_VAR_NAME_348" = internal global [18 x i8] c"setLineBreakMode:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[18 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_349" = internal global %struct.objc_selector* bitcast ([18 x i8]* @"\01L_OBJC_METH_VAR_NAME_348" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] -@"\01L_OBJC_METH_VAR_NAME_350" = internal global [18 x i8] c"setFocusRingType:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[18 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_351" = internal global %struct.objc_selector* bitcast ([18 x i8]* @"\01L_OBJC_METH_VAR_NAME_350" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] - at .str352 = internal constant [27 x i8] c"\01-[DVIconAndTextCell init]\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram353 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([27 x i8]* @.str352, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str352, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 23, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable354 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram353 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable355 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram353 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at __CFConstantStringClassReference = external global [0 x i32] ; <[0 x i32]*> [#uses=1] -@"\01LC" = internal constant [1 x i8] zeroinitializer, section "__TEXT,__cstring,cstring_literals" ; <[1 x i8]*> [#uses=1] -@"\01LC356" = internal constant %struct.NSConstantString <{ i32* getelementptr ([0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr ([1 x i8]* @"\01LC", i32 0, i32 0), i32 0 }>, section "__DATA,__cfstring" ; <%struct.NSConstantString*> [#uses=1] - at .str357 = internal constant [36 x i8] c"\01-[DVIconAndTextCell copyWithZone:]\00", section "llvm.metadata" ; <[36 x i8]*> [#uses=1] - at llvm.dbg.subprogram358 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([36 x i8]* @.str357, i32 0, i32 0), i8* getelementptr ([36 x i8]* @.str357, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 27, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable359 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram358 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable360 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram358 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str361 = internal constant [9 x i8] c"NSZone.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.compile_unit362 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([9 x i8]* @.str361, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str363 = internal constant [8 x i8] c"_NSZone\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.composite = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str363, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit362 to { }*), i32 10, i64 0, i64 0, i64 0, i32 0, { }* null, { }* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str364 = internal constant [7 x i8] c"NSZone\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype365 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str364, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit362 to { }*), i32 10, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype366 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype365 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str367 = internal constant [5 x i8] c"zone\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.variable368 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram358 to { }*), i8* getelementptr ([5 x i8]* @.str367, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 27, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype366 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str369 = internal constant [5 x i8] c"copy\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.variable370 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram358 to { }*), i8* getelementptr ([5 x i8]* @.str369, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 28, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] -@"\01L_OBJC_METH_VAR_NAME_371" = internal global [14 x i8] c"copyWithZone:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[14 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_372" = internal global %struct.objc_selector* bitcast ([14 x i8]* @"\01L_OBJC_METH_VAR_NAME_371" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] -@"\01L_OBJC_METH_VAR_NAME_373" = internal global [7 x i8] c"retain\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[7 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_374" = internal global %struct.objc_selector* bitcast ([7 x i8]* @"\01L_OBJC_METH_VAR_NAME_373" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] - at .str375 = internal constant [30 x i8] c"\01-[DVIconAndTextCell dealloc]\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] - at llvm.dbg.subprogram376 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([30 x i8]* @.str375, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str375, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 34, { }* null, i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable377 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram376 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable378 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram376 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] -@"\01L_OBJC_METH_VAR_NAME_379" = internal global [8 x i8] c"release\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[8 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_380" = internal global %struct.objc_selector* bitcast ([8 x i8]* @"\01L_OBJC_METH_VAR_NAME_379" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] -@"\01L_OBJC_METH_VAR_NAME_381" = internal global [8 x i8] c"dealloc\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[8 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_382" = internal global %struct.objc_selector* bitcast ([8 x i8]* @"\01L_OBJC_METH_VAR_NAME_381" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] - at .str383 = internal constant [31 x i8] c"\01-[DVIconAndTextCell setIcon:]\00", section "llvm.metadata" ; <[31 x i8]*> [#uses=1] - at llvm.dbg.subprogram384 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([31 x i8]* @.str383, i32 0, i32 0), i8* getelementptr ([31 x i8]* @.str383, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 39, { }* null, i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable385 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram384 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable386 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram384 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str387 = internal constant [8 x i8] c"newIcon\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.variable388 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram384 to { }*), i8* getelementptr ([8 x i8]* @.str387, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 39, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype335 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str389 = internal constant [27 x i8] c"\01-[DVIconAndTextCell icon]\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram390 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([27 x i8]* @.str389, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str389, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 46, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype335 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable391 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram390 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable392 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram390 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str393 = internal constant [40 x i8] c"\01-[DVIconAndTextCell preferredIconSize]\00", section "llvm.metadata" ; <[40 x i8]*> [#uses=1] - at llvm.dbg.subprogram394 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([40 x i8]* @.str393, i32 0, i32 0), i8* getelementptr ([40 x i8]* @.str393, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 50, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable395 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram394 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable396 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram394 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str397 = internal constant [44 x i8] c"\01-[DVIconAndTextCell setPreferredIconSize:]\00", section "llvm.metadata" ; <[44 x i8]*> [#uses=1] - at llvm.dbg.subprogram398 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([44 x i8]* @.str397, i32 0, i32 0), i8* getelementptr ([44 x i8]* @.str397, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 54, { }* null, i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable399 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram398 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable400 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram398 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str401 = internal constant [5 x i8] c"size\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.variable402 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram398 to { }*), i8* getelementptr ([5 x i8]* @.str401, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 54, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str403 = internal constant [41 x i8] c"\01-[DVIconAndTextCell iconSizeForBounds:]\00", section "llvm.metadata" ; <[41 x i8]*> [#uses=1] - at llvm.dbg.subprogram404 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([41 x i8]* @.str403, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str403, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 58, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable405 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram404 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable406 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram404 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str407 = internal constant [7 x i8] c"CGRect\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str409 = internal constant [8 x i8] c"CGPoint\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str411 = internal constant [2 x i8] c"x\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.derivedtype412 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str411, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 14, i64 64, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str413 = internal constant [2 x i8] c"y\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.derivedtype414 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str413, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 15, i64 64, i64 32, i64 64, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array415 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype412 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype414 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite416 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str409, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 13, i64 128, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array415 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype417 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str409, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 17, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite416 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str418 = internal constant [7 x i8] c"origin\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype419 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str418, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 30, i64 128, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype417 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype420 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([5 x i8]* @.str401, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 31, i64 128, i64 32, i64 128, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype271 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array421 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype419 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype420 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite422 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str407, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 29, i64 256, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array421 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype423 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str407, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit256 to { }*), i32 33, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite422 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str424 = internal constant [7 x i8] c"NSRect\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype425 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str424, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit273 to { }*), i32 31, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype423 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str426 = internal constant [7 x i8] c"bounds\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.variable427 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram404 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 58, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str428 = internal constant [9 x i8] c"iconSize\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.variable429 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram404 to { }*), i8* getelementptr ([9 x i8]* @.str428, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 59, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] -@"\01L_OBJC_METH_VAR_NAME_430" = internal global [5 x i8] c"icon\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[5 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_431" = internal global %struct.objc_selector* bitcast ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_430" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=4] -@"\01L_OBJC_METH_VAR_NAME_432" = internal global [5 x i8] c"size\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[5 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_433" = internal global %struct.objc_selector* bitcast ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_432" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] - at NSZeroSize = external constant %struct.CGPoint ; <%struct.CGPoint*> [#uses=1] - at .str434 = internal constant [42 x i8] c"\01-[DVIconAndTextCell iconInsetForBounds:]\00", section "llvm.metadata" ; <[42 x i8]*> [#uses=1] - at llvm.dbg.subprogram435 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([42 x i8]* @.str434, i32 0, i32 0), i8* getelementptr ([42 x i8]* @.str434, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 66, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable436 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram435 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable437 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram435 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable438 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram435 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 66, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] -@"\01L_OBJC_METH_VAR_NAME_439" = internal global [19 x i8] c"iconSizeForBounds:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[19 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_440" = internal global %struct.objc_selector* bitcast ([19 x i8]* @"\01L_OBJC_METH_VAR_NAME_439" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=6] - at .str441 = internal constant [42 x i8] c"\01-[DVIconAndTextCell textInsetForBounds:]\00", section "llvm.metadata" ; <[42 x i8]*> [#uses=1] - at llvm.dbg.subprogram442 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([42 x i8]* @.str441, i32 0, i32 0), i8* getelementptr ([42 x i8]* @.str441, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 70, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable443 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram442 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable444 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram442 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable445 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram442 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 70, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str446 = internal constant [21 x i8] c"NSAttributedString.h\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.compile_unit447 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([21 x i8]* @.str446, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str448 = internal constant [19 x i8] c"NSAttributedString\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.derivedtype450 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array451 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype450 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] - at llvm.dbg.composite452 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str448, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit447 to { }*), i32 8, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array451 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype453 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite452 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str454 = internal constant [38 x i8] c"\01-[DVIconAndTextCell attributedTitle]\00", section "llvm.metadata" ; <[38 x i8]*> [#uses=1] - at llvm.dbg.subprogram455 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([38 x i8]* @.str454, i32 0, i32 0), i8* getelementptr ([38 x i8]* @.str454, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 74, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype453 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable456 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram455 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable457 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram455 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str458 = internal constant [26 x i8] c"NSMutableAttributedString\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.derivedtype460 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite452 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array461 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype460 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] - at llvm.dbg.composite462 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([26 x i8]* @.str458, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit447 to { }*), i32 43, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array461 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype463 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite462 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str464 = internal constant [6 x i8] c"title\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.variable465 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram455 to { }*), i8* getelementptr ([6 x i8]* @.str464, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 75, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype463 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] -@"\01L_OBJC_METH_VAR_NAME_466" = internal global [22 x i8] c"attributedStringValue\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[22 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_467" = internal global %struct.objc_selector* bitcast ([22 x i8]* @"\01L_OBJC_METH_VAR_NAME_466" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] -@"\01L_OBJC_METH_VAR_NAME_468" = internal global [12 x i8] c"mutableCopy\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[12 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_469" = internal global %struct.objc_selector* bitcast ([12 x i8]* @"\01L_OBJC_METH_VAR_NAME_468" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] -@"\01L_OBJC_METH_VAR_NAME_470" = internal global [12 x i8] c"autorelease\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[12 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_471" = internal global %struct.objc_selector* bitcast ([12 x i8]* @"\01L_OBJC_METH_VAR_NAME_470" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=2] - at .str472 = internal constant [32 x i8] c"\01-[DVIconAndTextCell titleSize]\00", section "llvm.metadata" ; <[32 x i8]*> [#uses=1] - at llvm.dbg.subprogram473 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([32 x i8]* @.str472, i32 0, i32 0), i8* getelementptr ([32 x i8]* @.str472, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 79, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable474 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram473 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable475 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram473 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] -@"\01L_OBJC_METH_VAR_NAME_476" = internal global [16 x i8] c"attributedTitle\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[16 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_477" = internal global %struct.objc_selector* bitcast ([16 x i8]* @"\01L_OBJC_METH_VAR_NAME_476" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] - at .str478 = internal constant [49 x i8] c"\01-[DVIconAndTextCell titleAndIconRectForBounds:]\00", section "llvm.metadata" ; <[49 x i8]*> [#uses=1] - at llvm.dbg.subprogram479 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([49 x i8]* @.str478, i32 0, i32 0), i8* getelementptr ([49 x i8]* @.str478, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 83, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable480 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable481 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable482 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 83, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str483 = internal constant [10 x i8] c"iconInset\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.variable484 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([10 x i8]* @.str483, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 84, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] -@"\01L_OBJC_METH_VAR_NAME_485" = internal global [20 x i8] c"iconInsetForBounds:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[20 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_486" = internal global %struct.objc_selector* bitcast ([20 x i8]* @"\01L_OBJC_METH_VAR_NAME_485" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] - at .str487 = internal constant [10 x i8] c"textInset\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.variable488 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([10 x i8]* @.str487, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 85, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] -@"\01L_OBJC_METH_VAR_NAME_489" = internal global [20 x i8] c"textInsetForBounds:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[20 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_490" = internal global %struct.objc_selector* bitcast ([20 x i8]* @"\01L_OBJC_METH_VAR_NAME_489" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] - at llvm.dbg.variable491 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([9 x i8]* @.str428, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 86, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str492 = internal constant [9 x i8] c"textSize\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.variable493 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([9 x i8]* @.str492, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 87, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] -@"\01L_OBJC_METH_VAR_NAME_494" = internal global [10 x i8] c"titleSize\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[10 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_495" = internal global %struct.objc_selector* bitcast ([10 x i8]* @"\01L_OBJC_METH_VAR_NAME_494" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=3] - at .str496 = internal constant [14 x i8] c"maxLegalWidth\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.variable497 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([14 x i8]* @.str496, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 88, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str498 = internal constant [17 x i8] c"titleAndIconSize\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.variable499 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([17 x i8]* @.str498, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 89, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable500 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([2 x i8]* @.str411, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 90, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable501 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to { }*), i8* getelementptr ([2 x i8]* @.str413, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 90, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str502 = internal constant [41 x i8] c"\01-[DVIconAndTextCell iconRectForBounds:]\00", section "llvm.metadata" ; <[41 x i8]*> [#uses=1] - at llvm.dbg.subprogram503 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([41 x i8]* @.str502, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str502, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 95, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable504 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable505 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable506 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 95, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable507 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([9 x i8]* @.str428, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 96, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str508 = internal constant [10 x i8] c"unionRect\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.variable509 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([10 x i8]* @.str508, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 97, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] -@"\01L_OBJC_METH_VAR_NAME_510" = internal global [27 x i8] c"titleAndIconRectForBounds:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[27 x i8]*> [#uses=2] -@"\01L_OBJC_SELECTOR_REFERENCES_511" = internal global %struct.objc_selector* bitcast ([27 x i8]* @"\01L_OBJC_METH_VAR_NAME_510" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <%struct.objc_selector**> [#uses=4] - at .str512 = internal constant [12 x i8] c"signed char\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.basictype513 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str512, 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 6 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str514 = internal constant [5 x i8] c"BOOL\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.derivedtype515 = internal constant %llvm.dbg.derivedtype.type { i32 458774, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([5 x i8]* @.str514, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to { }*), i32 43, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype513 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str516 = internal constant [8 x i8] c"shorter\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.variable517 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([8 x i8]* @.str516, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 98, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype515 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable518 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram503 to { }*), i8* getelementptr ([2 x i8]* @.str413, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 99, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str519 = internal constant [42 x i8] c"\01-[DVIconAndTextCell titleRectForBounds:]\00", section "llvm.metadata" ; <[42 x i8]*> [#uses=1] - at llvm.dbg.subprogram520 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([42 x i8]* @.str519, i32 0, i32 0), i8* getelementptr ([42 x i8]* @.str519, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 103, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable521 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable522 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable523 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([7 x i8]* @.str426, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 103, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable524 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([10 x i8]* @.str487, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 104, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable525 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([9 x i8]* @.str428, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 105, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str526 = internal constant [10 x i8] c"titleSize\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.variable527 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([10 x i8]* @.str526, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 106, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable528 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([10 x i8]* @.str508, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 107, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str529 = internal constant [10 x i8] c"iconIndet\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.variable530 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([10 x i8]* @.str529, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 108, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable531 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([8 x i8]* @.str516, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 109, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype515 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable532 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([2 x i8]* @.str413, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 110, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable533 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram520 to { }*), i8* getelementptr ([7 x i8]* @.str267, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 111, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype264 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str534 = internal constant [54 x i8] c"\01-[DVIconAndTextCell expansionFrameWithFrame:inView:]\00", section "llvm.metadata" ; <[54 x i8]*> [#uses=1] - at llvm.dbg.subprogram535 = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([54 x i8]* @.str534, i32 0, i32 0), i8* getelementptr ([54 x i8]* @.str534, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 115, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable536 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram535 to { }*), i8* getelementptr ([5 x i8]* @.str343, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype342 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable537 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram535 to { }*), i8* getelementptr ([5 x i8]* @.str344, i32 0, i32 0), { }* null, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype188 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str538 = internal constant [10 x i8] c"cellFrame\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.variable539 = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram535 to { }*), i8* getelementptr ([10 x i8]* @.str538, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 115, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str540 = internal constant [9 x i8] c"NSView.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.compile_unit541 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([9 x i8]* @.str540, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str542 = internal constant [7 x i8] c"NSView\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str544 = internal constant [14 x i8] c"NSResponder.h\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.compile_unit545 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([14 x i8]* @.str544, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str546 = internal constant [12 x i8] c"NSResponder\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype548 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str549 = internal constant [15 x i8] c"_nextResponder\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype550 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str549, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit545 to { }*), i32 15, i64 32, i64 32, i64 32, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array551 = internal constant [2 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype548 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype550 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite552 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str546, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit545 to { }*), i32 12, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array551 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype553 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite552 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str554 = internal constant [7 x i8] c"_frame\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype555 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str554, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 128, i64 256, i64 32, i64 64, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str556 = internal constant [8 x i8] c"_bounds\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype557 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str556, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 129, i64 256, i64 32, i64 320, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str558 = internal constant [11 x i8] c"_superview\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype559 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str558, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 130, i64 32, i64 32, i64 576, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str560 = internal constant [10 x i8] c"_subviews\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype561 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str560, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 131, i64 32, i64 32, i64 608, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str562 = internal constant [11 x i8] c"NSWindow.h\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.compile_unit563 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([11 x i8]* @.str562, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str564 = internal constant [9 x i8] c"NSWindow\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype566 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite552 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype567 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str554, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 164, i64 256, i64 32, i64 64, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype425 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str568 = internal constant [13 x i8] c"_contentView\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype569 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str568, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 165, i64 32, i64 32, i64 320, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str570 = internal constant [10 x i8] c"_delegate\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype571 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str570, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 166, i64 32, i64 32, i64 352, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype572 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite552 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str573 = internal constant [16 x i8] c"_firstResponder\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype574 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str573, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 167, i64 32, i64 32, i64 384, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype572 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype575 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite873 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str576 = internal constant [13 x i8] c"_lastLeftHit\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype577 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str576, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 168, i64 32, i64 32, i64 416, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype575 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str578 = internal constant [14 x i8] c"_lastRightHit\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype579 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str578, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 169, i64 32, i64 32, i64 448, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype575 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str580 = internal constant [13 x i8] c"_counterpart\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype581 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str580, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 170, i64 32, i64 32, i64 480, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str582 = internal constant [13 x i8] c"_fieldEditor\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype583 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str582, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 171, i64 32, i64 32, i64 512, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str584 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.basictype585 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str584, 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 .str586 = internal constant [14 x i8] c"_winEventMask\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype587 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str586, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 172, i64 32, i64 32, i64 544, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype585 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str588 = internal constant [11 x i8] c"_windowNum\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype589 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str588, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 173, i64 32, i64 32, i64 576, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype179 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str590 = internal constant [7 x i8] c"_level\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype591 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str590, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 174, i64 32, i64 32, i64 608, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype585 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype592 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str204, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 175, i64 32, i64 32, i64 640, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype203 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str593 = internal constant [12 x i8] c"_borderView\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype594 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str593, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 176, i64 32, i64 32, i64 672, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str595 = internal constant [14 x i8] c"unsigned char\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.basictype596 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str595, 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 .str597 = internal constant [17 x i8] c"_postingDisabled\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype598 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str597, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 177, i64 8, i64 8, i64 704, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype596 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str599 = internal constant [11 x i8] c"_styleMask\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype600 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str599, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 178, i64 8, i64 8, i64 712, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype596 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str601 = internal constant [15 x i8] c"_flushDisabled\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype602 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str601, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 179, i64 8, i64 8, i64 720, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype596 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str603 = internal constant [17 x i8] c"_reservedWindow1\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype604 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str603, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 180, i64 8, i64 8, i64 728, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype596 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype605 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* null }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str606 = internal constant [13 x i8] c"_cursorRects\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype607 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str606, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 181, i64 32, i64 32, i64 736, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype605 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str608 = internal constant [12 x i8] c"_trectTable\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype609 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str608, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 182, i64 32, i64 32, i64 768, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype605 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str610 = internal constant [10 x i8] c"_miniIcon\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype611 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str610, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 183, i64 32, i64 32, i64 800, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype335 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str612 = internal constant [8 x i8] c"_unused\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype613 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str612, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 184, i64 32, i64 32, i64 832, i32 2, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype585 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str614 = internal constant [8 x i8] c"NSSet.h\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.compile_unit615 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([8 x i8]* @.str614, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str616 = internal constant [13 x i8] c"NSMutableSet\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at .str618 = internal constant [6 x i8] c"NSSet\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype620 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array621 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype620 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] - at llvm.dbg.composite622 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str618, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit615 to { }*), i32 12, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array621 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype623 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite622 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array624 = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype623 to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] - at llvm.dbg.composite625 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str616, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit615 to { }*), i32 67, i64 32, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array624 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype626 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite625 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str627 = internal constant [11 x i8] c"_dragTypes\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype628 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str627, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 185, i64 32, i64 32, i64 864, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype626 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str629 = internal constant [8 x i8] c"NSURL.h\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.compile_unit630 = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 16, i8* getelementptr ([8 x i8]* @.str629, i32 0, i32 0), i8* getelementptr ([56 x i8]* @.str38, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str631 = internal constant [6 x i8] c"NSURL\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype633 = internal constant %llvm.dbg.derivedtype.type { i32 458780, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 0, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str634 = internal constant [11 x i8] c"_urlString\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype635 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str634, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit630 to { }*), i32 39, i64 32, i64 32, i64 32, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype251 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype636 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite645 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str637 = internal constant [9 x i8] c"_baseURL\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype638 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str637, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit630 to { }*), i32 40, i64 32, i64 32, i64 64, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype636 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str639 = internal constant [9 x i8] c"_clients\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype640 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str639, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit630 to { }*), i32 41, i64 32, i64 32, i64 96, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype605 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype641 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* null }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str642 = internal constant [10 x i8] c"_reserved\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype643 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str642, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit630 to { }*), i32 42, i64 32, i64 32, i64 128, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype641 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array644 = internal constant [5 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype633 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype635 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype638 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype640 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype643 to { }*)], section "llvm.metadata" ; <[5 x { }*]*> [#uses=1] - at llvm.dbg.composite645 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([6 x i8]* @.str631, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit630 to { }*), i32 36, i64 160, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([5 x { }*]* @llvm.dbg.array644 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype646 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite645 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str647 = internal constant [16 x i8] c"_representedURL\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype648 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str647, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 186, i64 32, i64 32, i64 896, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype646 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype649 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str650 = internal constant [12 x i8] c"_sizeLimits\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype651 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str650, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 187, i64 32, i64 32, i64 928, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype649 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str652 = internal constant [15 x i8] c"_frameSaveName\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype653 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str652, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 188, i64 32, i64 32, i64 960, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype251 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype654 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite622 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str655 = internal constant [14 x i8] c"_regDragTypes\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype656 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str655, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 189, i64 32, i64 32, i64 992, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype654 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str657 = internal constant [9 x i8] c"__wFlags\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at .str659 = internal constant [8 x i8] c"backing\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype660 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str659, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 191, i64 2, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str661 = internal constant [8 x i8] c"visible\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype662 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str661, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 192, i64 1, i64 32, i64 2, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str663 = internal constant [13 x i8] c"isMainWindow\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype664 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str663, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 193, i64 1, i64 32, i64 3, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str665 = internal constant [12 x i8] c"isKeyWindow\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype666 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str665, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 194, i64 1, i64 32, i64 4, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str667 = internal constant [18 x i8] c"hidesOnDeactivate\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.derivedtype668 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str667, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 195, i64 1, i64 32, i64 5, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str669 = internal constant [19 x i8] c"dontFreeWhenClosed\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.derivedtype670 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str669, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 196, i64 1, i64 32, i64 6, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str671 = internal constant [8 x i8] c"oneShot\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype672 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str671, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 197, i64 1, i64 32, i64 7, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str673 = internal constant [9 x i8] c"deferred\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype674 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str673, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 198, i64 1, i64 32, i64 8, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str675 = internal constant [20 x i8] c"cursorRectsDisabled\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.derivedtype676 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([20 x i8]* @.str675, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 199, i64 1, i64 32, i64 9, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str677 = internal constant [20 x i8] c"haveFreeCursorRects\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.derivedtype678 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([20 x i8]* @.str677, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 200, i64 1, i64 32, i64 10, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str679 = internal constant [17 x i8] c"validCursorRects\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype680 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str679, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 201, i64 1, i64 32, i64 11, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str681 = internal constant [10 x i8] c"docEdited\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype682 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str681, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 202, i64 1, i64 32, i64 12, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str683 = internal constant [18 x i8] c"dynamicDepthLimit\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.derivedtype684 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str683, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 203, i64 1, i64 32, i64 13, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str685 = internal constant [15 x i8] c"worksWhenModal\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype686 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str685, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 204, i64 1, i64 32, i64 14, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str687 = internal constant [17 x i8] c"limitedBecomeKey\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype688 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str687, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 205, i64 1, i64 32, i64 15, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str689 = internal constant [11 x i8] c"needsFlush\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype690 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str689, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 206, i64 1, i64 32, i64 16, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str691 = internal constant [17 x i8] c"viewsNeedDisplay\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype692 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str691, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 207, i64 1, i64 32, i64 17, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str693 = internal constant [18 x i8] c"ignoredFirstMouse\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.derivedtype694 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str693, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 208, i64 1, i64 32, i64 18, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str695 = internal constant [19 x i8] c"repostedFirstMouse\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.derivedtype696 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str695, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 209, i64 1, i64 32, i64 19, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str697 = internal constant [12 x i8] c"windowDying\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype698 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str697, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 210, i64 1, i64 32, i64 20, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str699 = internal constant [11 x i8] c"tempHidden\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype700 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str699, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 211, i64 1, i64 32, i64 21, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str701 = internal constant [14 x i8] c"floatingPanel\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype702 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str701, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 212, i64 1, i64 32, i64 22, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str703 = internal constant [22 x i8] c"wantsToBeOnMainScreen\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.derivedtype704 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([22 x i8]* @.str703, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 213, i64 1, i64 32, i64 23, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str705 = internal constant [19 x i8] c"optimizedDrawingOk\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.derivedtype706 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str705, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 214, i64 1, i64 32, i64 24, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str707 = internal constant [16 x i8] c"optimizeDrawing\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype708 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str707, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 215, i64 1, i64 32, i64 25, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str709 = internal constant [27 x i8] c"titleIsRepresentedFilename\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.derivedtype710 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([27 x i8]* @.str709, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 216, i64 1, i64 32, i64 26, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str711 = internal constant [24 x i8] c"excludedFromWindowsMenu\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.derivedtype712 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([24 x i8]* @.str711, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 217, i64 1, i64 32, i64 27, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str713 = internal constant [11 x i8] c"depthLimit\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype714 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str713, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 218, i64 4, i64 32, i64 28, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str715 = internal constant [30 x i8] c"delegateReturnsValidRequestor\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] - at llvm.dbg.derivedtype716 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([30 x i8]* @.str715, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 219, i64 1, i64 32, i64 32, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str717 = internal constant [16 x i8] c"lmouseupPending\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype718 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str717, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 220, i64 1, i64 32, i64 33, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str719 = internal constant [16 x i8] c"rmouseupPending\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype720 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str719, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 221, i64 1, i64 32, i64 34, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str721 = internal constant [25 x i8] c"wantsToDestroyRealWindow\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] - at llvm.dbg.derivedtype722 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([25 x i8]* @.str721, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 222, i64 1, i64 32, i64 35, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str723 = internal constant [20 x i8] c"wantsToRegDragTypes\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.derivedtype724 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([20 x i8]* @.str723, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 223, i64 1, i64 32, i64 36, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str725 = internal constant [29 x i8] c"sentInvalidateCursorRectsMsg\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.derivedtype726 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([29 x i8]* @.str725, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 224, i64 1, i64 32, i64 37, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str727 = internal constant [17 x i8] c"avoidsActivation\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype728 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str727, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 225, i64 1, i64 32, i64 38, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str729 = internal constant [21 x i8] c"frameSavedUsingTitle\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.derivedtype730 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([21 x i8]* @.str729, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 226, i64 1, i64 32, i64 39, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str731 = internal constant [16 x i8] c"didRegDragTypes\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype732 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str731, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 227, i64 1, i64 32, i64 40, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str733 = internal constant [15 x i8] c"delayedOneShot\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype734 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str733, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 228, i64 1, i64 32, i64 41, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str735 = internal constant [23 x i8] c"postedNeedsDisplayNote\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] - at llvm.dbg.derivedtype736 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([23 x i8]* @.str735, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 229, i64 1, i64 32, i64 42, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str737 = internal constant [29 x i8] c"postedInvalidCursorRectsNote\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.derivedtype738 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([29 x i8]* @.str737, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 230, i64 1, i64 32, i64 43, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str739 = internal constant [29 x i8] c"initialFirstResponderTempSet\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.derivedtype740 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([29 x i8]* @.str739, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 231, i64 1, i64 32, i64 44, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str741 = internal constant [12 x i8] c"autodisplay\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype742 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str741, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 232, i64 1, i64 32, i64 45, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str743 = internal constant [17 x i8] c"tossedFirstEvent\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype744 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str743, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 233, i64 1, i64 32, i64 46, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str745 = internal constant [13 x i8] c"isImageCache\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype746 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str745, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 234, i64 1, i64 32, i64 47, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str747 = internal constant [15 x i8] c"interfaceStyle\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype748 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str747, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 235, i64 3, i64 32, i64 48, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str749 = internal constant [26 x i8] c"keyViewSelectionDirection\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.derivedtype750 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([26 x i8]* @.str749, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 236, i64 2, i64 32, i64 51, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str751 = internal constant [39 x i8] c"defaultButtonCellKETemporarilyDisabled\00", section "llvm.metadata" ; <[39 x i8]*> [#uses=1] - at llvm.dbg.derivedtype752 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([39 x i8]* @.str751, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 237, i64 1, i64 32, i64 53, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str753 = internal constant [28 x i8] c"defaultButtonCellKEDisabled\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.derivedtype754 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([28 x i8]* @.str753, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 238, i64 1, i64 32, i64 54, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str755 = internal constant [15 x i8] c"menuHasBeenSet\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype756 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str755, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 239, i64 1, i64 32, i64 55, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str757 = internal constant [15 x i8] c"wantsToBeModal\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype758 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str757, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 240, i64 1, i64 32, i64 56, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str759 = internal constant [18 x i8] c"showingModalFrame\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.derivedtype760 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str759, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 241, i64 1, i64 32, i64 57, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str761 = internal constant [14 x i8] c"isTerminating\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype762 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str761, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 242, i64 1, i64 32, i64 58, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str763 = internal constant [31 x i8] c"win32MouseActivationInProgress\00", section "llvm.metadata" ; <[31 x i8]*> [#uses=1] - at llvm.dbg.derivedtype764 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([31 x i8]* @.str763, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 243, i64 1, i64 32, i64 59, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str765 = internal constant [33 x i8] c"makingFirstResponderForMouseDown\00", section "llvm.metadata" ; <[33 x i8]*> [#uses=1] - at llvm.dbg.derivedtype766 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([33 x i8]* @.str765, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 244, i64 1, i64 32, i64 60, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str767 = internal constant [10 x i8] c"needsZoom\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype768 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([10 x i8]* @.str767, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 245, i64 1, i64 32, i64 61, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str769 = internal constant [26 x i8] c"sentWindowNeedsDisplayMsg\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.derivedtype770 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([26 x i8]* @.str769, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 246, i64 1, i64 32, i64 62, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str771 = internal constant [17 x i8] c"liveResizeActive\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype772 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str771, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 247, i64 1, i64 32, i64 63, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array773 = internal constant [57 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype660 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype662 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype664 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype666 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype668 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype670 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype672 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype674 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype676 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype678 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype680 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype682 to { }*), { }* bitcast! (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype684 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype686 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype688 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype690 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype692 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype694 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype696 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype698 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype700 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype702 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype704 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype706 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype708 to { }*),! { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedty! pe710 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype712 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype714 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype716 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype718 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype720 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype722 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype724 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype726 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype728 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype730 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype732 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype734 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.deriv! edtype736 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype738 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype740 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype742 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype744 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype746 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype748 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype750 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype752 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype754 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype756 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype758 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype760 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @l! lvm.dbg.derivedtype762 to { }*), { }* bitcast (%llvm.dbg.deriv! edtype.t ype* @llvm.dbg.derivedtype764 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype766 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype768 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype770 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype772 to { }*)], section "llvm.metadata" ; <[57 x { }*]*> [#uses=1] - at llvm.dbg.composite774 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str657, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 190, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([57 x { }*]* @llvm.dbg.array773 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str775 = internal constant [8 x i8] c"_wFlags\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype776 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str775, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 248, i64 64, i64 32, i64 1024, i32 2, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite774 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str777 = internal constant [19 x i8] c"_defaultButtonCell\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.derivedtype778 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str777, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 249, i64 32, i64 32, i64 1088, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str779 = internal constant [23 x i8] c"_initialFirstResponder\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] - at llvm.dbg.derivedtype780 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([23 x i8]* @.str779, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 250, i64 32, i64 32, i64 1120, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype575 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str781 = internal constant [18 x i8] c"NSWindowAuxiliary\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.composite782 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str781, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 152, i64 0, i64 0, i64 0, i32 0, { }* null, { }* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype783 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite782 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str784 = internal constant [18 x i8] c"_auxiliaryStorage\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.derivedtype785 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str784, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 251, i64 32, i64 32, i64 1152, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype783 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array786 = internal constant [31 x { }*] [{ }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype566 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype567 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype569 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype571 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype574 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype577 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype579 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype581 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype583 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype587 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype589 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype591 to { }*), { }* bitcast! (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype592 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype594 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype598 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype600 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype602 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype604 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype607 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype609 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype611 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype613 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype628 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype648 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype651 to { }*),! { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedty! pe653 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype656 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype776 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype778 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype780 to { }*), { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype785 to { }*)], section "llvm.metadata" ; <[31 x { }*]*> [#uses=1] - at llvm.dbg.composite787 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str564, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit563 to { }*), i32 156, i64 1184, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([31 x { }*]* @llvm.dbg.array786 to { }*), i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype788 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite787 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str789 = internal constant [8 x i8] c"_window\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype790 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str789, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 132, i64 32, i64 32, i64 640, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype788 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str791 = internal constant [8 x i8] c"_gState\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype792 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([8 x i8]* @.str791, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 133, i64 32, i64 32, i64 672, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str793 = internal constant [13 x i8] c"_frameMatrix\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype794 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str793, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 134, i64 32, i64 32, i64 704, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str795 = internal constant [12 x i8] c"_drawMatrix\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype796 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([12 x i8]* @.str795, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 135, i64 32, i64 32, i64 736, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype797 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str627, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 136, i64 32, i64 32, i64 768, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype16 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str798 = internal constant [17 x i8] c"_NSViewAuxiliary\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.composite799 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([17 x i8]* @.str798, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 120, i64 0, i64 0, i64 0, i32 0, { }* null, { }* null, i32 1 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype800 = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite799 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str801 = internal constant [15 x i8] c"_viewAuxiliary\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype802 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([15 x i8]* @.str801, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 137, i64 32, i64 32, i64 800, i32 2, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype800 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str803 = internal constant [9 x i8] c"__VFlags\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at .str805 = internal constant [14 x i8] c"aboutToResize\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype806 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([14 x i8]* @.str805, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 92, i64 1, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str807 = internal constant [19 x i8] c"retainCountOverMax\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.derivedtype808 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([19 x i8]* @.str807, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit541 to { }*), i32 93, i64 1, i64 32, i64 1, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str809 = internal constant [12 x i8] c"retainCount\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype810 = internal constant %llvm.dbg.derivedtype.type { i32 458765, { }* bitcast (%