Date: Thu, 15 Jul 2010 17:06:12 +0000 (UTC) From: Roman Divacky <rdivacky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r210127 - in vendor/llvm/dist: . docs include/llvm include/llvm/ADT include/llvm/CodeGen include/llvm/MC/MCParser include/llvm/Support include/llvm/Target lib/Analysis lib/AsmParser lib... Message-ID: <201007151706.o6FH6Chx047561@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rdivacky Date: Thu Jul 15 17:06:11 2010 New Revision: 210127 URL: http://svn.freebsd.org/changeset/base/210127 Log: Update LLVM to r108428. Added: vendor/llvm/dist/test/CodeGen/ARM/sub.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sub3.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-28-DbgEntryPC.ll vendor/llvm/dist/test/CodeGen/X86/2010-07-13-indirectXconstraint.ll vendor/llvm/dist/test/CodeGen/X86/lsr-i386.ll vendor/llvm/dist/test/CodeGen/X86/sibcall-4.ll vendor/llvm/dist/test/FrontendC/2010-07-14-overconservative-align.c vendor/llvm/dist/test/FrontendC/2010-07-14-ref-off-end.c vendor/llvm/dist/test/FrontendC/vla-1.c vendor/llvm/dist/test/Transforms/InstCombine/bit-checks.ll Deleted: vendor/llvm/dist/lib/Target/X86/X86COFF.h vendor/llvm/dist/test/CodeGen/X86/fast-isel-loads.ll vendor/llvm/dist/test/FrontendC/2010-06-28-DbgEntryPC.c Modified: vendor/llvm/dist/Makefile.rules vendor/llvm/dist/docs/LangRef.html vendor/llvm/dist/docs/ProgrammersManual.html vendor/llvm/dist/docs/SourceLevelDebugging.html vendor/llvm/dist/include/llvm/ADT/APFloat.h vendor/llvm/dist/include/llvm/ADT/APInt.h vendor/llvm/dist/include/llvm/CodeGen/FastISel.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/ProcessImplicitDefs.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h vendor/llvm/dist/include/llvm/Support/COFF.h vendor/llvm/dist/include/llvm/Support/Regex.h vendor/llvm/dist/include/llvm/Support/StringPool.h vendor/llvm/dist/include/llvm/Target/TargetAsmParser.h vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetOptions.h vendor/llvm/dist/include/llvm/Value.h vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLParser.h vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/ProcessImplicitDefs.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/Support/APFloat.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/Regex.cpp vendor/llvm/dist/lib/Support/StringPool.cpp vendor/llvm/dist/lib/System/Unix/Program.inc vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMAddressingModes.h vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp vendor/llvm/dist/lib/Target/ARM/README.txt vendor/llvm/dist/lib/Target/Alpha/AlphaMCAsmInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaMCAsmInfo.h vendor/llvm/dist/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinMCAsmInfo.h vendor/llvm/dist/lib/Target/CellSPU/SPUMCAsmInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUMCAsmInfo.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeMCAsmInfo.h vendor/llvm/dist/lib/Target/MSIL/MSILWriter.cpp vendor/llvm/dist/lib/Target/MSIL/MSILWriter.h vendor/llvm/dist/lib/Target/MSP430/MSP430MCAsmInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430MCAsmInfo.h vendor/llvm/dist/lib/Target/Mips/MipsMCAsmInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsMCAsmInfo.h vendor/llvm/dist/lib/Target/PIC16/PIC16DebugInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16MCAsmInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16MCAsmInfo.h vendor/llvm/dist/lib/Target/Sparc/SparcMCAsmInfo.cpp vendor/llvm/dist/lib/Target/Sparc/SparcMCAsmInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZMCAsmInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZMCAsmInfo.h vendor/llvm/dist/lib/Target/TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86InstrFormats.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86MCCodeEmitter.cpp vendor/llvm/dist/lib/Target/XCore/XCoreMCAsmInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreMCAsmInfo.h vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp vendor/llvm/dist/lib/Transforms/IPO/MergeFunctions.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/VMCore/AsmWriter.cpp vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/test/CodeGen/ARM/fpcmp-opt.ll vendor/llvm/dist/test/CodeGen/ARM/reg_sequence.ll vendor/llvm/dist/test/CodeGen/ARM/vdup.ll vendor/llvm/dist/test/CodeGen/ARM/vmov.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sbc.ll vendor/llvm/dist/test/CodeGen/X86/2006-05-22-FPSetEQ.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-26-MachineLICMBug.ll vendor/llvm/dist/test/CodeGen/X86/2010-07-06-asm-RIP.ll vendor/llvm/dist/test/CodeGen/X86/fabs.ll vendor/llvm/dist/test/CodeGen/X86/sse-minmax.ll vendor/llvm/dist/test/Feature/metadata.ll vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-encoding.s vendor/llvm/dist/test/Makefile vendor/llvm/dist/test/Transforms/JumpThreading/crash.ll vendor/llvm/dist/tools/Makefile vendor/llvm/dist/tools/edis/Makefile vendor/llvm/dist/unittests/ADT/APIntTest.cpp vendor/llvm/dist/unittests/VMCore/PassManagerTest.cpp vendor/llvm/dist/utils/buildit/GNUmakefile vendor/llvm/dist/utils/buildit/build_llvm Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/Makefile.rules Thu Jul 15 17:06:11 2010 (r210127) @@ -42,7 +42,7 @@ VPATH=$(PROJ_SRC_DIR) # Reset the list of suffixes we know how to build. #-------------------------------------------------------------------- .SUFFIXES: -.SUFFIXES: .c .cpp .cc .h .hpp .o .a .bc .td .ps .dot .ll +.SUFFIXES: .c .cpp .cc .h .hpp .o .a .bc .td .ps .dot .ll .m .mm .SUFFIXES: $(SHLIBEXT) $(SUFFIXES) #-------------------------------------------------------------------- @@ -632,8 +632,13 @@ ifdef TOOLNAME endif endif endif +else +ifneq ($(DARWIN_MAJVERS),4) + LD.Flags += $(RPATH) -Wl,@executable_path/../lib +endif endif + #---------------------------------------------------------- # Options To Invoke Tools #---------------------------------------------------------- @@ -1442,6 +1447,11 @@ $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BU $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ $(DEPEND_MOVEFILE) +$(ObjDir)/%.o: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_SRC_DIR)/Makefile + $(Echo) "Compiling $*.mm for $(BuildMode) build" $(PIC_FLAG) + $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ + $(DEPEND_MOVEFILE) + $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_SRC_DIR)/Makefile $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG) $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ @@ -1452,6 +1462,11 @@ $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUIL $(Verb) if $(Compile.C) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ $(DEPEND_MOVEFILE) +$(ObjDir)/%.o: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_SRC_DIR)/Makefile + $(Echo) "Compiling $*.m for $(BuildMode) build" $(PIC_FLAG) + $(Verb) if $(Compile.C) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ + $(DEPEND_MOVEFILE) + #--------------------------------------------------------- # Create .bc files in the ObjDir directory from .cpp .cc and .c files... #--------------------------------------------------------- @@ -1470,6 +1485,12 @@ $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(B $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ $(BC_DEPEND_MOVEFILE) +$(ObjDir)/%.ll: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) + $(Echo) "Compiling $*.mm for $(BuildMode) build (bytecode)" + $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ + $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ + $(BC_DEPEND_MOVEFILE) + $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ @@ -1482,6 +1503,12 @@ $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUI $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ $(BC_DEPEND_MOVEFILE) +$(ObjDir)/%.ll: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) + $(Echo) "Compiling $*.m for $(BuildMode) build (bytecode)" + $(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 @@ -1489,6 +1516,10 @@ $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BU $(Echo) "Compiling $*.cpp for $(BuildMode) build" $(PIC_FLAG) $(Compile.CXX) $< -o $@ +$(ObjDir)/%.o: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.mm for $(BuildMode) build" $(PIC_FLAG) + $(Compile.CXX) $< -o $@ + $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG) $(Compile.CXX) $< -o $@ @@ -1497,10 +1528,18 @@ $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUIL $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG) $(Compile.C) $< -o $@ +$(ObjDir)/%.o: %.m $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.m for $(BuildMode) build" $(PIC_FLAG) + $(Compile.C) $< -o $@ + $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" $(BCCompile.CXX) $< -o $@ -S -emit-llvm +$(ObjDir)/%.ll: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) + $(Echo) "Compiling $*.mm for $(BuildMode) build (bytecode)" + $(BCCompile.CXX) $< -o $@ -S -emit-llvm + $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" $(BCCompile.CXX) $< -o $@ -S -emit-llvm @@ -1509,6 +1548,10 @@ $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUI $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" $(BCCompile.C) $< -o $@ -S -emit-llvm +$(ObjDir)/%.ll: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) + $(Echo) "Compiling $*.m for $(BuildMode) build (bytecode)" + $(BCCompile.C) $< -o $@ -S -emit-llvm + endif @@ -1517,6 +1560,10 @@ $(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file" $(Verb) $(Preprocess.CXX) $< -o $@ +$(BuildMode)/%.ii: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.mm for $(BuildMode) build to .ii file" + $(Verb) $(Preprocess.CXX) $< -o $@ + $(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file" $(Verb) $(Preprocess.CXX) $< -o $@ @@ -1525,11 +1572,19 @@ $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(B $(Echo) "Compiling $*.c for $(BuildMode) build to .i file" $(Verb) $(Preprocess.C) $< -o $@ +$(BuildMode)/%.i: %.m $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.m for $(BuildMode) build to .i file" + $(Verb) $(Preprocess.C) $< -o $@ + $(ObjDir)/%.s: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(Echo) "Compiling $*.cpp to asm for $(BuildMode) build" $(PIC_FLAG) $(Compile.CXX) $< -o $@ -S +$(ObjDir)/%.s: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.mm to asm for $(BuildMode) build" $(PIC_FLAG) + $(Compile.CXX) $< -o $@ -S + $(ObjDir)/%.s: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(Echo) "Compiling $*.cc to asm for $(BuildMode) build" $(PIC_FLAG) $(Compile.CXX) $< -o $@ -S @@ -1538,6 +1593,10 @@ $(ObjDir)/%.s: %.c $(ObjDir)/.dir $(BUIL $(Echo) "Compiling $*.c to asm for $(BuildMode) build" $(PIC_FLAG) $(Compile.C) $< -o $@ -S +$(ObjDir)/%.s: %.m $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.m to asm for $(BuildMode) build" $(PIC_FLAG) + $(Compile.C) $< -o $@ -S + # make the C and C++ compilers strip debug info out of bytecode libraries. ifdef DEBUG_RUNTIME @@ -1750,7 +1809,7 @@ ifndef DISABLE_AUTO_DEPENDENCIES ifndef IS_CLEANING_TARGET # Get the list of dependency files -DependSourceFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources))) +DependSourceFiles := $(basename $(filter %.cpp %.c %.cc %.m %.mm, $(Sources))) DependFiles := $(DependSourceFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d) # Include bitcode dependency files if using bitcode libraries Modified: vendor/llvm/dist/docs/LangRef.html ============================================================================== --- vendor/llvm/dist/docs/LangRef.html Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/docs/LangRef.html Thu Jul 15 17:06:11 2010 (r210127) @@ -954,7 +954,9 @@ define [<a href="#linkage">linkage</a>] <h5>Syntax:</h5> <pre class="doc_code"> +; An unnamed metadata node, which is referenced by the named metadata. !1 = metadata !{metadata !"one"} +; A named metadata. !name = !{null, !1} </pre> @@ -7744,7 +7746,7 @@ LLVM</a>.</p> <a href="mailto:sabre@nondot.org">Chris Lattner</a><br> <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br> - Last modified: $Date: 2010-07-13 14:26:09 +0200 (Tue, 13 Jul 2010) $ + Last modified: $Date: 2010-07-13 21:48:13 +0200 (Tue, 13 Jul 2010) $ </address> </body> Modified: vendor/llvm/dist/docs/ProgrammersManual.html ============================================================================== --- vendor/llvm/dist/docs/ProgrammersManual.html Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/docs/ProgrammersManual.html Thu Jul 15 17:06:11 2010 (r210127) @@ -457,8 +457,8 @@ StringMap class which is used extensivel may have embedded null characters. Therefore, they cannot simply take a <tt>const char *</tt>, and taking a <tt>const std::string&</tt> requires clients to perform a heap allocation which is usually unnecessary. Instead, -many LLVM APIs use a <tt>const StringRef&</tt> or a <tt>const -Twine&</tt> for passing strings efficiently.</p> +many LLVM APIs use a <tt>StringRef</tt> or a <tt>const Twine&</tt> for +passing strings efficiently.</p> </div> @@ -477,19 +477,17 @@ on <tt>std:string</tt>, but does not req an <tt>std::string</tt>, or explicitly with a character pointer and length. For example, the <tt>StringRef</tt> find function is declared as:</p> -<div class="doc_code"> - iterator find(const StringRef &Key); -</div> +<pre class="doc_code"> + iterator find(StringRef Key); +</pre> <p>and clients can call it using any one of:</p> -<div class="doc_code"> -<pre> +<pre class="doc_code"> Map.find("foo"); <i>// Lookup "foo"</i> Map.find(std::string("bar")); <i>// Lookup "bar"</i> Map.find(StringRef("\0baz", 4)); <i>// Lookup "\0baz"</i> </pre> -</div> <p>Similarly, APIs which need to return a string may return a <tt>StringRef</tt> instance, which can be used directly or converted to an <tt>std::string</tt> @@ -499,7 +497,8 @@ for more information.</p> <p>You should rarely use the <tt>StringRef</tt> class directly, because it contains pointers to external memory it is not generally safe to store an instance of the -class (unless you know that the external storage will not be freed).</p> +class (unless you know that the external storage will not be freed). StringRef is +small and pervasive enough in LLVM that it should always be passed by value.</p> </div> @@ -3943,7 +3942,7 @@ arguments. An argument has a pointer to <a href="mailto:dhurjati@cs.uiuc.edu">Dinakar Dhurjati</a> and <a href="mailto:sabre@nondot.org">Chris Lattner</a><br> <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br> - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-07-15 00:38:02 +0200 (Thu, 15 Jul 2010) $ </address> </body> Modified: vendor/llvm/dist/docs/SourceLevelDebugging.html ============================================================================== --- vendor/llvm/dist/docs/SourceLevelDebugging.html Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/docs/SourceLevelDebugging.html Thu Jul 15 17:06:11 2010 (r210127) @@ -1058,7 +1058,7 @@ int main(int argc, char *argv[]) { i32 524329, ;; Tag metadata !"MySource.cpp", metadata !"/Users/mine/sources", - metadata !3 ;; Compile unit + metadata !2 ;; Compile unit } ;; @@ -1068,7 +1068,7 @@ int main(int argc, char *argv[]) { i32 524329, ;; Tag metadata !"Myheader.h" metadata !"/Users/mine/sources", - metadata !3 ;; Compile unit + metadata !2 ;; Compile unit } ... @@ -1780,7 +1780,7 @@ enum Trees { <a href="mailto:sabre@nondot.org">Chris Lattner</a><br> <a href="http://llvm.org">LLVM Compiler Infrastructure</a><br> - Last modified: $Date: 2010-06-05 00:49:55 +0200 (Sat, 05 Jun 2010) $ + Last modified: $Date: 2010-07-13 18:53:20 +0200 (Tue, 13 Jul 2010) $ </address> </body> Modified: vendor/llvm/dist/include/llvm/ADT/APFloat.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/APFloat.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/ADT/APFloat.h Thu Jul 15 17:06:11 2010 (r210127) @@ -179,7 +179,7 @@ namespace llvm { // Constructors. APFloat(const fltSemantics &); // Default construct to 0.0 - APFloat(const fltSemantics &, const StringRef &); + APFloat(const fltSemantics &, StringRef); APFloat(const fltSemantics &, integerPart); APFloat(const fltSemantics &, fltCategory, bool negative); APFloat(const fltSemantics &, uninitializedTag); @@ -282,7 +282,7 @@ namespace llvm { bool, roundingMode); opStatus convertFromZeroExtendedInteger(const integerPart *, unsigned int, bool, roundingMode); - opStatus convertFromString(const StringRef&, roundingMode); + opStatus convertFromString(StringRef, roundingMode); APInt bitcastToAPInt() const; double convertToDouble() const; float convertToFloat() const; @@ -386,8 +386,8 @@ namespace llvm { roundingMode, bool *) const; opStatus convertFromUnsignedParts(const integerPart *, unsigned int, roundingMode); - opStatus convertFromHexadecimalString(const StringRef&, roundingMode); - opStatus convertFromDecimalString (const StringRef&, roundingMode); + opStatus convertFromHexadecimalString(StringRef, roundingMode); + opStatus convertFromDecimalString(StringRef, roundingMode); char *convertNormalToHexString(char *, unsigned int, bool, roundingMode) const; opStatus roundSignificandWithExponent(const integerPart *, unsigned int, Modified: vendor/llvm/dist/include/llvm/ADT/APInt.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/APInt.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/ADT/APInt.h Thu Jul 15 17:06:11 2010 (r210127) @@ -162,7 +162,7 @@ class APInt { /// /// @param radix 2, 8, 10, or 16 /// @brief Convert a char array into an APInt - void fromString(unsigned numBits, const StringRef &str, uint8_t radix); + void fromString(unsigned numBits, StringRef str, uint8_t radix); /// This is used by the toString method to divide by the radix. It simply /// provides a more convenient form of divide for internal use since KnuthDiv @@ -248,7 +248,7 @@ public: /// @param str the string to be interpreted /// @param radix the radix to use for the conversion /// @brief Construct an APInt from a string representation. - APInt(unsigned numBits, const StringRef &str, uint8_t radix); + APInt(unsigned numBits, StringRef str, uint8_t radix); /// Simply makes *this a copy of that. /// @brief Copy Constructor. @@ -1153,7 +1153,7 @@ public: /// This method determines how many bits are required to hold the APInt /// equivalent of the string given by \arg str. /// @brief Get bits required for string value. - static unsigned getBitsNeeded(const StringRef& str, uint8_t radix); + static unsigned getBitsNeeded(StringRef str, uint8_t radix); /// countLeadingZeros - This function is an APInt version of the /// countLeadingZeros_{32,64} functions in MathExtras.h. It counts the number Modified: vendor/llvm/dist/include/llvm/CodeGen/FastISel.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/FastISel.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/CodeGen/FastISel.h Thu Jul 15 17:06:11 2010 (r210127) @@ -106,12 +106,17 @@ public: /// into the current block. void recomputeInsertPt(); + struct SavePoint { + MachineBasicBlock::iterator InsertPt; + DebugLoc DL; + }; + /// enterLocalValueArea - Prepare InsertPt to begin inserting instructions /// into the local value area and return the old insert position. - MachineBasicBlock::iterator enterLocalValueArea(); + SavePoint enterLocalValueArea(); - /// leaveLocalValueArea - Reset InsertPt to the given old insert position - void leaveLocalValueArea(MachineBasicBlock::iterator OldInsertPt); + /// leaveLocalValueArea - Reset InsertPt to the given old insert position. + void leaveLocalValueArea(SavePoint Old); virtual ~FastISel(); @@ -302,8 +307,6 @@ protected: } private: - bool SelectLoad(const User *I); - bool SelectBinaryOp(const User *I, unsigned ISDOpcode); bool SelectFNeg(const User *I); Modified: vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h Thu Jul 15 17:06:11 2010 (r210127) @@ -272,10 +272,6 @@ namespace llvm { unsigned getNumConflictsWithPhysReg(const LiveInterval &li, unsigned PhysReg) const; - /// processImplicitDefs - Process IMPLICIT_DEF instructions. Add isUndef - /// marker to implicit_def defs and their uses. - void processImplicitDefs(); - /// intervalIsInOneMBB - Returns true if the specified interval is entirely /// within a single basic block. bool intervalIsInOneMBB(const LiveInterval &li) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Thu Jul 15 17:06:11 2010 (r210127) @@ -344,7 +344,7 @@ public: VariableDbgInfo.push_back(std::make_pair(N, std::make_pair(Slot, Loc))); } - VariableDbgInfoMapTy &getVariableDbgInfo() { return VariableDbgInfo; } + VariableDbgInfoMapTy &getVariableDbgInfo(); }; // End class MachineModuleInfo Modified: vendor/llvm/dist/include/llvm/CodeGen/ProcessImplicitDefs.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/ProcessImplicitDefs.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/CodeGen/ProcessImplicitDefs.h Thu Jul 15 17:06:11 2010 (r210127) @@ -12,6 +12,7 @@ #define LLVM_CODEGEN_PROCESSIMPLICITDEFS_H #include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/ADT/SmallSet.h" namespace llvm { @@ -24,7 +25,8 @@ namespace llvm { private: bool CanTurnIntoImplicitDef(MachineInstr *MI, unsigned Reg, - unsigned OpIdx, const TargetInstrInfo *tii_); + unsigned OpIdx, const TargetInstrInfo *tii_, + SmallSet<unsigned, 8> &ImpDefRegs); public: static char ID; Modified: vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h ============================================================================== --- vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h Thu Jul 15 17:06:11 2010 (r210127) @@ -107,7 +107,7 @@ private: void EatToEndOfStatement(); - bool ParseAssignment(const StringRef &Name); + bool ParseAssignment(StringRef Name); bool ParsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc); bool ParseBinOpRHS(unsigned Precedence, const MCExpr *&Res, SMLoc &EndLoc); Modified: vendor/llvm/dist/include/llvm/Support/COFF.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/COFF.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Support/COFF.h Thu Jul 15 17:06:11 2010 (r210127) @@ -10,12 +10,12 @@ // This file contains an definitions used in Windows COFF Files. // // Structures and enums defined within this file where created using -// information from Microsofts publicly available PE/COFF format document: +// information from Microsoft's publicly available PE/COFF format document: // // Microsoft Portable Executable and Common Object File Format Specification // Revision 8.1 - February 15, 2008 // -// As of 5/2/2010, hosted by microsoft at: +// As of 5/2/2010, hosted by Microsoft at: // http://www.microsoft.com/whdc/system/platform/firmware/pecoff.mspx // //===----------------------------------------------------------------------===// @@ -57,7 +57,7 @@ namespace COFF { uint8_t NumberOfAuxSymbols; }; - enum symbol_flags { + enum SymbolFlags { SF_TypeMask = 0x0000FFFF, SF_TypeShift = 0, @@ -67,36 +67,70 @@ namespace COFF { SF_WeakReference = 0x01000000 }; - enum symbol_storage_class { - IMAGE_SYM_CLASS_END_OF_FUNCTION = -1, - IMAGE_SYM_CLASS_NULL = 0, - IMAGE_SYM_CLASS_AUTOMATIC = 1, - IMAGE_SYM_CLASS_EXTERNAL = 2, - IMAGE_SYM_CLASS_STATIC = 3, - IMAGE_SYM_CLASS_REGISTER = 4, - IMAGE_SYM_CLASS_EXTERNAL_DEF = 5, - IMAGE_SYM_CLASS_LABEL = 6, - IMAGE_SYM_CLASS_UNDEFINED_LABEL = 7, - IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 8, - IMAGE_SYM_CLASS_ARGUMENT = 9, - IMAGE_SYM_CLASS_STRUCT_TAG = 10, - IMAGE_SYM_CLASS_MEMBER_OF_UNION = 11, - IMAGE_SYM_CLASS_UNION_TAG = 12, - IMAGE_SYM_CLASS_TYPE_DEFINITION = 13, - IMAGE_SYM_CLASS_UNDEFINED_STATIC = 14, - IMAGE_SYM_CLASS_ENUM_TAG = 15, - IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 16, - IMAGE_SYM_CLASS_REGISTER_PARAM = 17, - IMAGE_SYM_CLASS_BIT_FIELD = 18, + /// Storage class tells where and what the symbol represents + enum SymbolStorageClass { + IMAGE_SYM_CLASS_END_OF_FUNCTION = -1, ///< Physical end of function + IMAGE_SYM_CLASS_NULL = 0, ///< No symbol + IMAGE_SYM_CLASS_AUTOMATIC = 1, ///< Stack variable + IMAGE_SYM_CLASS_EXTERNAL = 2, ///< External symbol + IMAGE_SYM_CLASS_STATIC = 3, ///< Static + IMAGE_SYM_CLASS_REGISTER = 4, ///< Register variable + IMAGE_SYM_CLASS_EXTERNAL_DEF = 5, ///< External definition + IMAGE_SYM_CLASS_LABEL = 6, ///< Label + IMAGE_SYM_CLASS_UNDEFINED_LABEL = 7, ///< Undefined label + IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 8, ///< Member of structure + IMAGE_SYM_CLASS_ARGUMENT = 9, ///< Function argument + IMAGE_SYM_CLASS_STRUCT_TAG = 10, ///< Structure tag + IMAGE_SYM_CLASS_MEMBER_OF_UNION = 11, ///< Member of union + IMAGE_SYM_CLASS_UNION_TAG = 12, ///< Union tag + IMAGE_SYM_CLASS_TYPE_DEFINITION = 13, ///< Type definition + IMAGE_SYM_CLASS_UNDEFINED_STATIC = 14, ///< Undefined static + IMAGE_SYM_CLASS_ENUM_TAG = 15, ///< Enumeration tag + IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 16, ///< Member of enumeration + IMAGE_SYM_CLASS_REGISTER_PARAM = 17, ///< Register parameter + IMAGE_SYM_CLASS_BIT_FIELD = 18, ///< Bit field + /// ".bb" or ".eb" - beginning or end of block IMAGE_SYM_CLASS_BLOCK = 100, + /// ".bf" or ".ef" - beginning or end of function IMAGE_SYM_CLASS_FUNCTION = 101, - IMAGE_SYM_CLASS_END_OF_STRUCT = 102, - IMAGE_SYM_CLASS_FILE = 103, + IMAGE_SYM_CLASS_END_OF_STRUCT = 102, ///< End of structure + IMAGE_SYM_CLASS_FILE = 103, ///< File name + /// Line number, reformatted as symbol IMAGE_SYM_CLASS_SECTION = 104, - IMAGE_SYM_CLASS_WEAK_EXTERNAL = 105, + IMAGE_SYM_CLASS_WEAK_EXTERNAL = 105, ///< Duplicate tag + /// External symbol in dmert public lib IMAGE_SYM_CLASS_CLR_TOKEN = 107 }; + enum SymbolBaseType { + IMAGE_SYM_TYPE_NULL = 0, ///< No type information or unknown base type. + IMAGE_SYM_TYPE_VOID = 1, ///< Used with void pointers and functions. + IMAGE_SYM_TYPE_CHAR = 2, ///< A character (signed byte). + IMAGE_SYM_TYPE_SHORT = 3, ///< A 2-byte signed integer. + IMAGE_SYM_TYPE_INT = 4, ///< A natural integer type on the target. + IMAGE_SYM_TYPE_LONG = 5, ///< A 4-byte signed integer. + IMAGE_SYM_TYPE_FLOAT = 6, ///< A 4-byte floating-point number. + IMAGE_SYM_TYPE_DOUBLE = 7, ///< An 8-byte floating-point number. + IMAGE_SYM_TYPE_STRUCT = 8, ///< A structure. + IMAGE_SYM_TYPE_UNION = 9, ///< An union. + IMAGE_SYM_TYPE_ENUM = 10, ///< An enumerated type. + IMAGE_SYM_TYPE_MOE = 11, ///< A member of enumeration (a specific value). + IMAGE_SYM_TYPE_BYTE = 12, ///< A byte; unsigned 1-byte integer. + IMAGE_SYM_TYPE_WORD = 13, ///< A word; unsigned 2-byte integer. + IMAGE_SYM_TYPE_UINT = 14, ///< An unsigned integer of natural size. + IMAGE_SYM_TYPE_DWORD = 15 ///< An unsigned 4-byte integer. + }; + + enum SymbolComplexType { + IMAGE_SYM_DTYPE_NULL = 0, ///< No complex type; simple scalar variable. + IMAGE_SYM_DTYPE_POINTER = 1, ///< A pointer to base type. + IMAGE_SYM_DTYPE_FUNCTION = 2, ///< A function that returns a base type. + IMAGE_SYM_DTYPE_ARRAY = 3, ///< An array of base type. + + /// Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT)) + SCT_COMPLEX_TYPE_SHIFT = 4 + }; + struct section { char Name[NameSize]; uint32_t VirtualSize; @@ -110,7 +144,7 @@ namespace COFF { uint32_t Characteristics; }; - enum section_characteristics { + enum SectionCharacteristics { IMAGE_SCN_TYPE_NO_PAD = 0x00000008, IMAGE_SCN_CNT_CODE = 0x00000020, IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040, @@ -154,7 +188,7 @@ namespace COFF { uint16_t Type; }; - enum relocation_type_x86 { + enum RelocationTypeX86 { IMAGE_REL_I386_ABSOLUTE = 0x0000, IMAGE_REL_I386_DIR16 = 0x0001, IMAGE_REL_I386_REL16 = 0x0002, Modified: vendor/llvm/dist/include/llvm/Support/Regex.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/Regex.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Support/Regex.h Thu Jul 15 17:06:11 2010 (r210127) @@ -36,7 +36,7 @@ namespace llvm { /// Compiles the given POSIX Extended Regular Expression \arg Regex. /// This implementation supports regexes and matching strings with embedded /// NUL characters. - Regex(const StringRef &Regex, unsigned Flags = NoFlags); + Regex(StringRef Regex, unsigned Flags = NoFlags); ~Regex(); /// isValid - returns the error encountered during regex compilation, or @@ -55,7 +55,7 @@ namespace llvm { /// the first group is always the entire pattern. /// /// This returns true on a successful match. - bool match(const StringRef &String, SmallVectorImpl<StringRef> *Matches=0); + bool match(StringRef String, SmallVectorImpl<StringRef> *Matches = 0); /// sub - Return the result of replacing the first match of the regex in /// \arg String with the \arg Repl string. Backreferences like "\0" in the Modified: vendor/llvm/dist/include/llvm/Support/StringPool.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/StringPool.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Support/StringPool.h Thu Jul 15 17:06:11 2010 (r210127) @@ -64,7 +64,7 @@ namespace llvm { /// intern - Adds a string to the pool and returns a reference-counted /// pointer to it. No additional memory is allocated if the string already /// exists in the pool. - PooledStringPtr intern(const StringRef &Str); + PooledStringPtr intern(StringRef Str); /// empty - Checks whether the pool is empty. Returns true if so. /// Modified: vendor/llvm/dist/include/llvm/Target/TargetAsmParser.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetAsmParser.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Target/TargetAsmParser.h Thu Jul 15 17:06:11 2010 (r210127) @@ -49,7 +49,7 @@ public: /// \param Operands [out] - The list of parsed operands, this returns /// ownership of them to the caller. /// \return True on failure. - virtual bool ParseInstruction(const StringRef &Name, SMLoc NameLoc, + virtual bool ParseInstruction(StringRef Name, SMLoc NameLoc, SmallVectorImpl<MCParsedAsmOperand*> &Operands) = 0; /// ParseDirective - Parse a target specific assembler directive Modified: vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h Thu Jul 15 17:06:11 2010 (r210127) @@ -371,7 +371,7 @@ public: unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { - assert(0 && "Target didn't implement TargetInstrInfo::storeRegToStackSlot!"); + assert(0 && "Target didn't implement TargetInstrInfo::storeRegToStackSlot!"); } /// loadRegFromStackSlot - Load the specified register of the given register @@ -383,7 +383,7 @@ public: unsigned DestReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { - assert(0 && "Target didn't implement TargetInstrInfo::loadRegFromStackSlot!"); + assert(0 && "Target didn't implement TargetInstrInfo::loadRegFromStackSlot!"); } /// spillCalleeSavedRegisters - Issues instruction(s) to spill all callee @@ -392,7 +392,7 @@ public: /// storeRegToStackSlot(). Returns false otherwise. virtual bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, - const std::vector<CalleeSavedInfo> &CSI, + const std::vector<CalleeSavedInfo> &CSI, const TargetRegisterInfo *TRI) const { return false; } @@ -457,7 +457,7 @@ protected: /// take care of adding a MachineMemOperand to the newly created instruction. virtual MachineInstr* foldMemoryOperandImpl(MachineFunction &MF, MachineInstr* MI, - const SmallVectorImpl<unsigned> &Ops, + const SmallVectorImpl<unsigned> &Ops, MachineInstr* LoadMI) const { return 0; } @@ -501,7 +501,7 @@ public: /// only differences between the two addresses are the offset. It also returns /// the offsets by reference. virtual bool areLoadsFromSameBasePtr(SDNode *Load1, SDNode *Load2, - int64_t &Offset1, int64_t &Offset2) const { + int64_t &Offset1, int64_t &Offset2) const { return false; } Modified: vendor/llvm/dist/include/llvm/Target/TargetOptions.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetOptions.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Target/TargetOptions.h Thu Jul 15 17:06:11 2010 (r210127) @@ -68,7 +68,7 @@ namespace llvm { /// this flag is off (the default), the code generator is not allowed to /// produce results that are "less precise" than IEEE allows. This includes /// use of X86 instructions like FSIN and FCOS instead of libcalls. - /// UnsafeFPMath implies FiniteOnlyFPMath and LessPreciseFPMAD. + /// UnsafeFPMath implies LessPreciseFPMAD. extern bool UnsafeFPMath; /// FiniteOnlyFPMath - This returns true when the -enable-finite-only-fp-math Modified: vendor/llvm/dist/include/llvm/Value.h ============================================================================== --- vendor/llvm/dist/include/llvm/Value.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Value.h Thu Jul 15 17:06:11 2010 (r210127) @@ -266,6 +266,10 @@ public: SubclassOptionalData &= V->SubclassOptionalData; } + /// hasValueHandle - Return true if there is a value handle associated with + /// this value. + bool hasValueHandle() const { return HasValueHandle; } + // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const Value *) { return true; // Values are always values. Modified: vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -440,27 +440,47 @@ void llvm::ReplaceAndSimplifyAllUses(Ins const TargetData *TD) { assert(From != To && "ReplaceAndSimplifyAllUses(X,X) is not valid!"); - // FromHandle - This keeps a weakvh on the from value so that we can know if - // it gets deleted out from under us in a recursive simplification. + // FromHandle/ToHandle - This keeps a WeakVH on the from/to values so that + // we can know if it gets deleted out from under us or replaced in a + // recursive simplification. WeakVH FromHandle(From); + WeakVH ToHandle(To); while (!From->use_empty()) { // Update the instruction to use the new value. - Use &U = From->use_begin().getUse(); - Instruction *User = cast<Instruction>(U.getUser()); - U = To; + Use &TheUse = From->use_begin().getUse(); + Instruction *User = cast<Instruction>(TheUse.getUser()); + TheUse = To; + + // Check to see if the instruction can be folded due to the operand + // replacement. For example changing (or X, Y) into (or X, -1) can replace + // the 'or' with -1. + Value *SimplifiedVal; + { + // Sanity check to make sure 'User' doesn't dangle across + // SimplifyInstruction. + AssertingVH<> UserHandle(User); - // See if we can simplify it. - if (Value *V = SimplifyInstruction(User, TD)) { - // Recursively simplify this. - ReplaceAndSimplifyAllUses(User, V, TD); - - // If the recursive simplification ended up revisiting and deleting 'From' - // then we're done. - if (FromHandle == 0) - return; + SimplifiedVal = SimplifyInstruction(User, TD); + if (SimplifiedVal == 0) continue; } + + // Recursively simplify this user to the new value. + ReplaceAndSimplifyAllUses(User, SimplifiedVal, TD); + From = dyn_cast_or_null<Instruction>((Value*)FromHandle); + To = ToHandle; + + assert(ToHandle && "To value deleted by recursive simplification?"); + + // If the recursive simplification ended up revisiting and deleting + // 'From' then we're done. + if (From == 0) + return; } + + // If 'From' has value handles referring to it, do a real RAUW to update them. + From->replaceAllUsesWith(To); + From->eraseFromParent(); } Modified: vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -71,22 +71,24 @@ ProfileInfoT<Function,BasicBlock>::getEx // Are there zero predecessors of this block? if (PI == PE) { - Edge e = getEdge(0,BB); + Edge e = getEdge(0, BB); Count = getEdgeWeight(e); } else { // Otherwise, if there are predecessors, the execution count of this block is // the sum of the edge frequencies from the incoming edges. std::set<const BasicBlock*> ProcessedPreds; Count = 0; - for (; PI != PE; ++PI) - if (ProcessedPreds.insert(*PI).second) { - double w = getEdgeWeight(getEdge(*PI, BB)); + for (; PI != PE; ++PI) { + const BasicBlock *P = *PI; + if (ProcessedPreds.insert(P).second) { + double w = getEdgeWeight(getEdge(P, BB)); if (w == MissingValue) { Count = MissingValue; break; } Count += w; } + } } // If the predecessors did not suffice to get block weight, try successors. Modified: vendor/llvm/dist/lib/AsmParser/LLParser.cpp ============================================================================== --- vendor/llvm/dist/lib/AsmParser/LLParser.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/AsmParser/LLParser.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -544,20 +544,21 @@ bool LLParser::ParseNamedMetadata() { return true; SmallVector<MDNode *, 8> Elts; - do { - // Null is a special case since it is typeless. - if (EatIfPresent(lltok::kw_null)) { - Elts.push_back(0); - continue; - } + if (Lex.getKind() != lltok::rbrace) + do { + // Null is a special case since it is typeless. + if (EatIfPresent(lltok::kw_null)) { + Elts.push_back(0); + continue; + } - if (ParseToken(lltok::exclaim, "Expected '!' here")) - return true; + if (ParseToken(lltok::exclaim, "Expected '!' here")) + return true; - MDNode *N = 0; - if (ParseMDNodeID(N)) return true; - Elts.push_back(N); - } while (EatIfPresent(lltok::comma)); + MDNode *N = 0; + if (ParseMDNodeID(N)) return true; + Elts.push_back(N); + } while (EatIfPresent(lltok::comma)); if (ParseToken(lltok::rbrace, "expected end of metadata node")) return true; @@ -2021,33 +2022,8 @@ bool LLParser::ParseValID(ValID &ID, Per ID.StrVal = Lex.getStrVal(); ID.Kind = ValID::t_LocalName; break; - case lltok::exclaim: // !{...} MDNode, !"foo" MDString - Lex.Lex(); - - if (EatIfPresent(lltok::lbrace)) { - SmallVector<Value*, 16> Elts; - if (ParseMDNodeVector(Elts, PFS) || - ParseToken(lltok::rbrace, "expected end of metadata node")) - return true; - - ID.MDNodeVal = MDNode::get(Context, Elts.data(), Elts.size()); - ID.Kind = ValID::t_MDNode; - return false; - } - - // Standalone metadata reference - // !{ ..., !42, ... } - if (Lex.getKind() == lltok::APSInt) { - if (ParseMDNodeID(ID.MDNodeVal)) return true; - ID.Kind = ValID::t_MDNode; - return false; - } - - // MDString: - // ::= '!' STRINGCONSTANT - if (ParseMDString(ID.MDStringVal)) return true; - ID.Kind = ValID::t_MDString; - return false; + case lltok::exclaim: // !42, !{...}, or !"foo" + return ParseMetadataValue(ID, PFS); case lltok::APSInt: ID.APSIntVal = Lex.getAPSIntVal(); ID.Kind = ValID::t_APSInt; @@ -2528,6 +2504,42 @@ bool LLParser::ParseGlobalValueVector(Sm return false; } +/// ParseMetadataValue +/// ::= !42 +/// ::= !{...} +/// ::= !"string" +bool LLParser::ParseMetadataValue(ValID &ID, PerFunctionState *PFS) { + assert(Lex.getKind() == lltok::exclaim); + Lex.Lex(); + + // MDNode: + // !{ ... } + if (EatIfPresent(lltok::lbrace)) { + SmallVector<Value*, 16> Elts; + if (ParseMDNodeVector(Elts, PFS) || + ParseToken(lltok::rbrace, "expected end of metadata node")) + return true; + + ID.MDNodeVal = MDNode::get(Context, Elts.data(), Elts.size()); + ID.Kind = ValID::t_MDNode; + return false; + } + + // Standalone metadata reference + // !42 + if (Lex.getKind() == lltok::APSInt) { + if (ParseMDNodeID(ID.MDNodeVal)) return true; + ID.Kind = ValID::t_MDNode; + return false; + } + + // MDString: + // ::= '!' STRINGCONSTANT + if (ParseMDString(ID.MDStringVal)) return true; + ID.Kind = ValID::t_MDString; + return false; +} + //===----------------------------------------------------------------------===// // Function Parsing. @@ -3983,6 +3995,10 @@ int LLParser::ParseInsertValue(Instructi /// ::= 'null' | TypeAndValue bool LLParser::ParseMDNodeVector(SmallVectorImpl<Value*> &Elts, PerFunctionState *PFS) { + // Check for an empty list. + if (Lex.getKind() == lltok::rbrace) + return false; + do { // Null is a special case since it is typeless. if (EatIfPresent(lltok::kw_null)) { Modified: vendor/llvm/dist/lib/AsmParser/LLParser.h ============================================================================== --- vendor/llvm/dist/lib/AsmParser/LLParser.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/AsmParser/LLParser.h Thu Jul 15 17:06:11 2010 (r210127) @@ -308,6 +308,7 @@ namespace llvm { bool ParseGlobalValue(const Type *Ty, Constant *&V); bool ParseGlobalTypeAndValue(Constant *&V); bool ParseGlobalValueVector(SmallVectorImpl<Constant*> &Elts); + bool ParseMetadataValue(ValID &ID, PerFunctionState *PFS); bool ParseMDNodeVector(SmallVectorImpl<Value*> &, PerFunctionState *PFS); // Function Parsing. Modified: vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp ============================================================================== --- vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -820,7 +820,7 @@ bool BitcodeReader::ParseMetadata() { IsFunctionLocal = true; // fall-through case bitc::METADATA_NODE: { - if (Record.empty() || Record.size() % 2 == 1) + if (Record.size() % 2 == 1) return Error("Invalid METADATA_NODE record"); unsigned Size = Record.size(); @@ -834,7 +834,8 @@ bool BitcodeReader::ParseMetadata() { else Elts.push_back(NULL); } - Value *V = MDNode::getWhenValsUnresolved(Context, &Elts[0], Elts.size(), + Value *V = MDNode::getWhenValsUnresolved(Context, + Elts.data(), Elts.size(), IsFunctionLocal); IsFunctionLocal = false; MDValueList.AssignValue(V, NextMDValueNo++); Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -178,7 +178,7 @@ bool AsmPrinter::doInitialization(Module if (!M.getModuleInlineAsm().empty()) { OutStreamer.AddComment("Start of file scope inline assembly"); OutStreamer.AddBlankLine(); - EmitInlineAsm(M.getModuleInlineAsm(), 0/*no loc cookie*/); + EmitInlineAsm(M.getModuleInlineAsm()+"\n", 0/*no loc cookie*/); OutStreamer.AddComment("End of file scope inline assembly"); OutStreamer.AddBlankLine(); } Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -53,17 +53,6 @@ void AsmPrinter::EmitInlineAsm(StringRef } SourceMgr SrcMgr; - - // Ensure the buffer is newline terminated. - char *TmpString = 0; - if (Str.back() != '\n') { - TmpString = new char[Str.size() + 2]; - memcpy(TmpString, Str.data(), Str.size()); - TmpString[Str.size()] = '\n'; - TmpString[Str.size() + 1] = 0; - isNullTerminated = true; - Str = TmpString; - } // If the current LLVMContext has an inline asm handler, set it in SourceMgr. LLVMContext &LLVMCtx = MMI->getModule()->getContext(); @@ -95,9 +84,6 @@ void AsmPrinter::EmitInlineAsm(StringRef /*NoFinalize*/ true); if (Res && !HasDiagHandler) report_fatal_error("Error parsing inline asm\n"); - - if (TmpString) - delete[] TmpString; } Modified: vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -119,6 +119,7 @@ bool LiveInterval::killedInRange(SlotInd // bool LiveInterval::overlapsFrom(const LiveInterval& other, const_iterator StartPos) const { + assert(!empty() && "empty interval"); const_iterator i = begin(); const_iterator ie = end(); const_iterator j = StartPos; @@ -161,16 +162,8 @@ bool LiveInterval::overlapsFrom(const Li /// by [Start, End). bool LiveInterval::overlaps(SlotIndex Start, SlotIndex End) const { assert(Start < End && "Invalid range"); - const_iterator I = begin(); - const_iterator E = end(); - const_iterator si = std::upper_bound(I, E, Start); - const_iterator ei = std::upper_bound(I, E, End); - if (si != ei) - return true; - if (si == I) - return false; - --si; - return si->contains(Start); + const_iterator I = std::lower_bound(begin(), end(), End); + return I != begin() && (--I)->end > Start; } /// extendIntervalEndTo - This method is used when we want to extend the range @@ -868,6 +861,10 @@ void LiveInterval::print(raw_ostream &OS OS << "?"; else OS << vni->def; + if (vni->hasPHIKill()) + OS << "-phikill"; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007151706.o6FH6Chx047561>