Date: Thu, 15 Jul 2010 17:46:21 +0000 (UTC) From: Roman Divacky <rdivacky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r210130 - in projects/clangbsd/contrib/llvm: . include/llvm include/llvm/ADT include/llvm/CodeGen include/llvm/MC/MCParser include/llvm/Support include/llvm/Target lib/Analysis lib/AsmP... Message-ID: <201007151746.o6FHkLp7056588@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rdivacky Date: Thu Jul 15 17:46:21 2010 New Revision: 210130 URL: http://svn.freebsd.org/changeset/base/210130 Log: Merge from vendor. Added: projects/clangbsd/contrib/llvm/tools/clang/include/clang/Frontend/PCHDeserializationListener.h - copied unchanged from r210129, vendor/clang/dist/include/clang/Frontend/PCHDeserializationListener.h projects/clangbsd/contrib/llvm/tools/clang/runtime/ - copied from r210129, vendor/clang/dist/runtime/ Deleted: projects/clangbsd/contrib/llvm/lib/Target/X86/X86COFF.h Modified: projects/clangbsd/contrib/llvm/Makefile.rules projects/clangbsd/contrib/llvm/include/llvm/ADT/APFloat.h projects/clangbsd/contrib/llvm/include/llvm/ADT/APInt.h projects/clangbsd/contrib/llvm/include/llvm/CodeGen/FastISel.h projects/clangbsd/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h projects/clangbsd/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h projects/clangbsd/contrib/llvm/include/llvm/CodeGen/ProcessImplicitDefs.h projects/clangbsd/contrib/llvm/include/llvm/MC/MCParser/AsmParser.h projects/clangbsd/contrib/llvm/include/llvm/Support/COFF.h projects/clangbsd/contrib/llvm/include/llvm/Support/Regex.h projects/clangbsd/contrib/llvm/include/llvm/Support/StringPool.h projects/clangbsd/contrib/llvm/include/llvm/Target/TargetAsmParser.h projects/clangbsd/contrib/llvm/include/llvm/Target/TargetInstrInfo.h projects/clangbsd/contrib/llvm/include/llvm/Target/TargetOptions.h projects/clangbsd/contrib/llvm/include/llvm/Value.h projects/clangbsd/contrib/llvm/lib/Analysis/InstructionSimplify.cpp projects/clangbsd/contrib/llvm/lib/Analysis/ProfileInfo.cpp projects/clangbsd/contrib/llvm/lib/AsmParser/LLParser.cpp projects/clangbsd/contrib/llvm/lib/AsmParser/LLParser.h projects/clangbsd/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp projects/clangbsd/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp projects/clangbsd/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp projects/clangbsd/contrib/llvm/lib/CodeGen/LiveInterval.cpp projects/clangbsd/contrib/llvm/lib/CodeGen/MachineLICM.cpp projects/clangbsd/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp projects/clangbsd/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp projects/clangbsd/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp projects/clangbsd/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp projects/clangbsd/contrib/llvm/lib/MC/MCParser/AsmParser.cpp projects/clangbsd/contrib/llvm/lib/Support/APFloat.cpp projects/clangbsd/contrib/llvm/lib/Support/APInt.cpp projects/clangbsd/contrib/llvm/lib/Support/Regex.cpp projects/clangbsd/contrib/llvm/lib/Support/StringPool.cpp projects/clangbsd/contrib/llvm/lib/System/Unix/Program.inc projects/clangbsd/contrib/llvm/lib/Target/ARM/ARM.td projects/clangbsd/contrib/llvm/lib/Target/ARM/ARMAddressingModes.h projects/clangbsd/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp projects/clangbsd/contrib/llvm/lib/Target/ARM/ARMISelLowering.h projects/clangbsd/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td projects/clangbsd/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td projects/clangbsd/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td projects/clangbsd/contrib/llvm/lib/Target/ARM/ARMSubtarget.h projects/clangbsd/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp projects/clangbsd/contrib/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp projects/clangbsd/contrib/llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp projects/clangbsd/contrib/llvm/lib/Target/ARM/README.txt projects/clangbsd/contrib/llvm/lib/Target/Alpha/AlphaMCAsmInfo.cpp projects/clangbsd/contrib/llvm/lib/Target/Alpha/AlphaMCAsmInfo.h projects/clangbsd/contrib/llvm/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp projects/clangbsd/contrib/llvm/lib/Target/Blackfin/BlackfinMCAsmInfo.h projects/clangbsd/contrib/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp projects/clangbsd/contrib/llvm/lib/Target/CellSPU/SPUMCAsmInfo.h projects/clangbsd/contrib/llvm/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp projects/clangbsd/contrib/llvm/lib/Target/MBlaze/MBlazeMCAsmInfo.h projects/clangbsd/contrib/llvm/lib/Target/MSIL/MSILWriter.cpp projects/clangbsd/contrib/llvm/lib/Target/MSIL/MSILWriter.h projects/clangbsd/contrib/llvm/lib/Target/MSP430/MSP430MCAsmInfo.cpp projects/clangbsd/contrib/llvm/lib/Target/MSP430/MSP430MCAsmInfo.h projects/clangbsd/contrib/llvm/lib/Target/Mips/MipsMCAsmInfo.cpp projects/clangbsd/contrib/llvm/lib/Target/Mips/MipsMCAsmInfo.h projects/clangbsd/contrib/llvm/lib/Target/PIC16/PIC16DebugInfo.cpp projects/clangbsd/contrib/llvm/lib/Target/PIC16/PIC16MCAsmInfo.cpp projects/clangbsd/contrib/llvm/lib/Target/PIC16/PIC16MCAsmInfo.h projects/clangbsd/contrib/llvm/lib/Target/Sparc/SparcMCAsmInfo.cpp projects/clangbsd/contrib/llvm/lib/Target/Sparc/SparcMCAsmInfo.h projects/clangbsd/contrib/llvm/lib/Target/SystemZ/SystemZMCAsmInfo.cpp projects/clangbsd/contrib/llvm/lib/Target/SystemZ/SystemZMCAsmInfo.h projects/clangbsd/contrib/llvm/lib/Target/TargetMachine.cpp projects/clangbsd/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp projects/clangbsd/contrib/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp projects/clangbsd/contrib/llvm/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp projects/clangbsd/contrib/llvm/lib/Target/X86/X86FastISel.cpp projects/clangbsd/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp projects/clangbsd/contrib/llvm/lib/Target/X86/X86ISelLowering.h projects/clangbsd/contrib/llvm/lib/Target/X86/X86InstrFormats.td projects/clangbsd/contrib/llvm/lib/Target/X86/X86InstrInfo.h projects/clangbsd/contrib/llvm/lib/Target/X86/X86InstrSSE.td projects/clangbsd/contrib/llvm/lib/Target/X86/X86MCCodeEmitter.cpp projects/clangbsd/contrib/llvm/lib/Target/XCore/XCoreMCAsmInfo.cpp projects/clangbsd/contrib/llvm/lib/Target/XCore/XCoreMCAsmInfo.h projects/clangbsd/contrib/llvm/lib/Transforms/IPO/Inliner.cpp projects/clangbsd/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp projects/clangbsd/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp projects/clangbsd/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp projects/clangbsd/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp projects/clangbsd/contrib/llvm/lib/Transforms/Utils/Local.cpp projects/clangbsd/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp projects/clangbsd/contrib/llvm/lib/VMCore/AsmWriter.cpp projects/clangbsd/contrib/llvm/lib/VMCore/Metadata.cpp projects/clangbsd/contrib/llvm/tools/Makefile projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Expr.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Type.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/ArgList.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/Driver.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/Options.td projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/Types.def projects/clangbsd/contrib/llvm/tools/clang/include/clang/Frontend/ASTConsumers.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/Frontend/PCHReader.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/Frontend/PCHWriter.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/Rewrite/Rewriter.h projects/clangbsd/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/AST/Expr.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/AST/Type.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Basic/Targets.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Checker/GRExprEngine.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Checker/LLVMConventionsChecker.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGException.h projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/Mangle.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Driver/ArgList.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Driver/Driver.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Driver/Tools.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/GeneratePCH.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/PCHReader.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/PCHWriter.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Rewrite/Rewriter.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/Sema.h projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaCXXCast.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h projects/clangbsd/contrib/llvm/tools/clang/utils/TestUtils/pch-test.pl projects/clangbsd/contrib/llvm/tools/edis/Makefile projects/clangbsd/contrib/llvm/utils/buildit/GNUmakefile projects/clangbsd/contrib/llvm/utils/buildit/build_llvm Directory Properties: projects/clangbsd/contrib/llvm/ (props changed) projects/clangbsd/contrib/llvm/tools/clang/ (props changed) Modified: projects/clangbsd/contrib/llvm/Makefile.rules ============================================================================== --- projects/clangbsd/contrib/llvm/Makefile.rules Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/Makefile.rules Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/ADT/APFloat.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/ADT/APFloat.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/ADT/APFloat.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/ADT/APInt.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/ADT/APInt.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/ADT/APInt.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/CodeGen/FastISel.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/CodeGen/FastISel.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/CodeGen/FastISel.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/CodeGen/ProcessImplicitDefs.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/CodeGen/ProcessImplicitDefs.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/CodeGen/ProcessImplicitDefs.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/MC/MCParser/AsmParser.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/MC/MCParser/AsmParser.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/MC/MCParser/AsmParser.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/Support/COFF.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/Support/COFF.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/Support/COFF.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/Support/Regex.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/Support/Regex.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/Support/Regex.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/Support/StringPool.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/Support/StringPool.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/Support/StringPool.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/Target/TargetAsmParser.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/Target/TargetAsmParser.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/Target/TargetAsmParser.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/Target/TargetInstrInfo.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/Target/TargetInstrInfo.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/Target/TargetInstrInfo.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/Target/TargetOptions.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/Target/TargetOptions.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/Target/TargetOptions.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/include/llvm/Value.h ============================================================================== --- projects/clangbsd/contrib/llvm/include/llvm/Value.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/include/llvm/Value.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/lib/Analysis/InstructionSimplify.cpp ============================================================================== --- projects/clangbsd/contrib/llvm/lib/Analysis/InstructionSimplify.cpp Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/lib/Analysis/InstructionSimplify.cpp Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/lib/Analysis/ProfileInfo.cpp ============================================================================== --- projects/clangbsd/contrib/llvm/lib/Analysis/ProfileInfo.cpp Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/lib/Analysis/ProfileInfo.cpp Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/lib/AsmParser/LLParser.cpp ============================================================================== --- projects/clangbsd/contrib/llvm/lib/AsmParser/LLParser.cpp Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/lib/AsmParser/LLParser.cpp Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/lib/AsmParser/LLParser.h ============================================================================== --- projects/clangbsd/contrib/llvm/lib/AsmParser/LLParser.h Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/lib/AsmParser/LLParser.h Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp ============================================================================== --- projects/clangbsd/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp ============================================================================== --- projects/clangbsd/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp ============================================================================== --- projects/clangbsd/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Thu Jul 15 17:46:21 2010 (r210130) @@ -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: projects/clangbsd/contrib/llvm/lib/CodeGen/LiveInterval.cpp ============================================================================== --- projects/clangbsd/contrib/llvm/lib/CodeGen/LiveInterval.cpp Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/lib/CodeGen/LiveInterval.cpp Thu Jul 15 17:46:21 2010 (r210130) @@ -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"; + if (vni->hasRedefByEC()) + OS << "-ec"; } } } Modified: projects/clangbsd/contrib/llvm/lib/CodeGen/MachineLICM.cpp ============================================================================== --- projects/clangbsd/contrib/llvm/lib/CodeGen/MachineLICM.cpp Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/lib/CodeGen/MachineLICM.cpp Thu Jul 15 17:46:21 2010 (r210130) @@ -497,11 +497,6 @@ void MachineLICM::HoistRegion(MachineDom /// candidate for LICM. e.g. If the instruction is a call, then it's obviously /// not safe to hoist it. bool MachineLICM::IsLICMCandidate(MachineInstr &I) { - // It is not profitable to hoist implicitdefs. FIXME: Why not? what if they - // are an argument to some other otherwise-hoistable instruction? - if (I.isImplicitDef()) - return false; - // Check if it's safe to move the instruction. bool DontMoveAcrossStore = true; if (!I.isSafeToMove(TII, AA, DontMoveAcrossStore)) @@ -717,7 +712,9 @@ MachineLICM::LookForDuplicate(const Mach bool MachineLICM::EliminateCSE(MachineInstr *MI, DenseMap<unsigned, std::vector<const MachineInstr*> >::iterator &CI) { - if (CI == CSEMap.end()) + // Do not CSE implicit_def so ProcessImplicitDefs can properly propagate + // the undef property onto uses. + if (CI == CSEMap.end() || MI->isImplicitDef()) return false; if (const MachineInstr *Dup = LookForDuplicate(MI, CI->second)) { Modified: projects/clangbsd/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp ============================================================================== --- projects/clangbsd/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp Thu Jul 15 17:46:21 2010 (r210130) @@ -563,3 +563,26 @@ unsigned MachineModuleInfo::getPersonali return 0; } +namespace { + /// VariableDebugSorter - Comparison to sort the VariableDbgInfo map + /// by source location, to avoid depending on the arbitrary order that + /// instruction selection visits variables in. + struct VariableDebugSorter { + bool operator()(const MachineModuleInfo::VariableDbgInfoMapTy::value_type &A, + const MachineModuleInfo::VariableDbgInfoMapTy::value_type &B) + const { + if (A.second.second.getLine() != B.second.second.getLine()) + return A.second.second.getLine() < B.second.second.getLine(); + if (A.second.second.getCol() != B.second.second.getCol()) + return A.second.second.getCol() < B.second.second.getCol(); + return false; + } + }; +} + +MachineModuleInfo::VariableDbgInfoMapTy & +MachineModuleInfo::getVariableDbgInfo() { + std::stable_sort(VariableDbgInfo.begin(), VariableDbgInfo.end(), + VariableDebugSorter()); + return VariableDbgInfo; +} Modified: projects/clangbsd/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp ============================================================================== --- projects/clangbsd/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp Thu Jul 15 17:11:49 2010 (r210129) +++ projects/clangbsd/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp Thu Jul 15 17:46:21 2010 (r210130) @@ -41,21 +41,51 @@ void ProcessImplicitDefs::getAnalysisUsa MachineFunctionPass::getAnalysisUsage(AU); } -bool ProcessImplicitDefs::CanTurnIntoImplicitDef(MachineInstr *MI, - unsigned Reg, unsigned OpIdx, - const TargetInstrInfo *tii_) { +bool +ProcessImplicitDefs::CanTurnIntoImplicitDef(MachineInstr *MI, + unsigned Reg, unsigned OpIdx, + const TargetInstrInfo *tii_, + SmallSet<unsigned, 8> &ImpDefRegs) { unsigned SrcReg, DstReg, SrcSubReg, DstSubReg; if (tii_->isMoveInstr(*MI, SrcReg, DstReg, SrcSubReg, DstSubReg) && - Reg == SrcReg && DstSubReg == 0) + Reg == SrcReg && + (DstSubReg == 0 || ImpDefRegs.count(DstReg))) return true; switch(OpIdx) { - case 1: return MI->isCopy() && MI->getOperand(0).getSubReg() == 0; - case 2: return MI->isSubregToReg() && MI->getOperand(0).getSubReg() == 0; - default: return false; + case 1: + return MI->isCopy() && (MI->getOperand(0).getSubReg() == 0 || + ImpDefRegs.count(MI->getOperand(0).getReg())); + case 2: + return MI->isSubregToReg() && (MI->getOperand(0).getSubReg() == 0 || + ImpDefRegs.count(MI->getOperand(0).getReg())); + default: return false; } } +static bool isUndefCopy(MachineInstr *MI, unsigned Reg, + const TargetInstrInfo *tii_, + SmallSet<unsigned, 8> &ImpDefRegs) { + if (MI->isCopy()) { + MachineOperand &MO0 = MI->getOperand(0); + MachineOperand &MO1 = MI->getOperand(1); + if (MO1.getReg() != Reg) + return false; + if (!MO0.getSubReg() || ImpDefRegs.count(MO0.getReg())) + return true; + return false; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007151746.o6FHkLp7056588>