Date: Fri, 6 Jan 2017 20:24:06 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r311544 - in projects/clang400-import/contrib/llvm: include/llvm include/llvm/Analysis include/llvm/Bitcode include/llvm/CodeGen include/llvm/CodeGen/GlobalISel include/llvm/DebugInfo/D... Message-ID: <201701062024.v06KO6NB073291@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Fri Jan 6 20:24:06 2017 New Revision: 311544 URL: https://svnweb.freebsd.org/changeset/base/311544 Log: Merge llvm, clang, lld and lldb trunk r291274, and resolve conflicts. Added: projects/clang400-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h - copied unchanged from r311543, vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h projects/clang400-import/contrib/llvm/include/llvm/Support/TarWriter.h - copied unchanged from r311543, vendor/llvm/dist/include/llvm/Support/TarWriter.h projects/clang400-import/contrib/llvm/lib/Support/TarWriter.cpp - copied unchanged from r311543, vendor/llvm/dist/lib/Support/TarWriter.cpp Modified: projects/clang400-import/contrib/llvm/include/llvm/Analysis/CGSCCPassManager.h projects/clang400-import/contrib/llvm/include/llvm/Analysis/TargetTransformInfo.h projects/clang400-import/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h projects/clang400-import/contrib/llvm/include/llvm/Bitcode/BitCodes.h projects/clang400-import/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h projects/clang400-import/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h projects/clang400-import/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h projects/clang400-import/contrib/llvm/include/llvm/CodeGen/BasicTTIImpl.h projects/clang400-import/contrib/llvm/include/llvm/CodeGen/DIE.h projects/clang400-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h projects/clang400-import/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h projects/clang400-import/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h projects/clang400-import/contrib/llvm/include/llvm/ExecutionEngine/Orc/RawByteChannel.h projects/clang400-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndex.h projects/clang400-import/contrib/llvm/include/llvm/IR/PassManager.h projects/clang400-import/contrib/llvm/include/llvm/LTO/LTO.h projects/clang400-import/contrib/llvm/include/llvm/MC/MCTargetOptions.h projects/clang400-import/contrib/llvm/include/llvm/Support/FileSystem.h projects/clang400-import/contrib/llvm/include/llvm/Transforms/IPO/FunctionImport.h projects/clang400-import/contrib/llvm/include/llvm/Transforms/IPO/LowerTypeTests.h projects/clang400-import/contrib/llvm/include/llvm/Transforms/Utils/FunctionImportUtils.h projects/clang400-import/contrib/llvm/include/llvm/module.modulemap projects/clang400-import/contrib/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp projects/clang400-import/contrib/llvm/lib/Analysis/TargetTransformInfo.cpp projects/clang400-import/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp projects/clang400-import/contrib/llvm/lib/Bitcode/Reader/BitstreamReader.cpp projects/clang400-import/contrib/llvm/lib/Bitcode/Reader/MetadataLoader.cpp projects/clang400-import/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/IfConversion.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/MIRPrinter.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/MachineVerifier.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp projects/clang400-import/contrib/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp projects/clang400-import/contrib/llvm/lib/LTO/LTO.cpp projects/clang400-import/contrib/llvm/lib/LTO/ThinLTOCodeGenerator.cpp projects/clang400-import/contrib/llvm/lib/Support/APInt.cpp projects/clang400-import/contrib/llvm/lib/Support/Host.cpp projects/clang400-import/contrib/llvm/lib/Support/Unix/Signals.inc projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.h projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64InstructionSelector.h projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.cpp projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h projects/clang400-import/contrib/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp projects/clang400-import/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.h projects/clang400-import/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp projects/clang400-import/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp projects/clang400-import/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp projects/clang400-import/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp projects/clang400-import/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.h projects/clang400-import/contrib/llvm/lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp projects/clang400-import/contrib/llvm/lib/Target/Lanai/Disassembler/LanaiDisassembler.h projects/clang400-import/contrib/llvm/lib/Target/Lanai/InstPrinter/LanaiInstPrinter.h projects/clang400-import/contrib/llvm/lib/Target/Lanai/LanaiISelLowering.cpp projects/clang400-import/contrib/llvm/lib/Target/Lanai/LanaiRegisterInfo.h projects/clang400-import/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiELFObjectWriter.cpp projects/clang400-import/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCCodeEmitter.cpp projects/clang400-import/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.cpp projects/clang400-import/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h projects/clang400-import/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td projects/clang400-import/contrib/llvm/lib/Target/PowerPC/PPCInstrFormats.td projects/clang400-import/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td projects/clang400-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp projects/clang400-import/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp projects/clang400-import/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.h projects/clang400-import/contrib/llvm/lib/Transforms/IPO/FunctionImport.cpp projects/clang400-import/contrib/llvm/lib/Transforms/IPO/LowerTypeTests.cpp projects/clang400-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp projects/clang400-import/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/GVN.cpp projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/LICM.cpp projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/LoopSink.cpp projects/clang400-import/contrib/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp projects/clang400-import/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp projects/clang400-import/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Basic/Attr.td projects/clang400-import/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsPPC.def projects/clang400-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td projects/clang400-import/contrib/llvm/tools/clang/include/clang/CodeGen/BackendUtil.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorOptions.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Sema/Ownership.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Sema/Sema.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Serialization/ModuleFileExtension.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h projects/clang400-import/contrib/llvm/tools/clang/include/clang/Tooling/Tooling.h projects/clang400-import/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/VariantValue.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Basic/Targets.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.h projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Driver/Driver.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Driver/MSVCToolChain.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Driver/MinGWToolChain.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Driver/ToolChains.h projects/clang400-import/contrib/llvm/tools/clang/lib/Driver/Tools.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Driver/Tools.h projects/clang400-import/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Frontend/ChainedIncludesSource.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Frontend/TestModuleFileExtension.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_cmath.h projects/clang400-import/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_intrinsics.h projects/clang400-import/contrib/llvm/tools/clang/lib/Headers/altivec.h projects/clang400-import/contrib/llvm/tools/clang/lib/Headers/intrin.h projects/clang400-import/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Serialization/GeneratePCH.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Serialization/GlobalModuleIndex.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Tooling/Tooling.cpp projects/clang400-import/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp projects/clang400-import/contrib/llvm/tools/llc/llc.cpp projects/clang400-import/contrib/llvm/tools/lld/COFF/Driver.cpp projects/clang400-import/contrib/llvm/tools/lld/COFF/Driver.h projects/clang400-import/contrib/llvm/tools/lld/COFF/InputFiles.cpp projects/clang400-import/contrib/llvm/tools/lld/COFF/InputFiles.h projects/clang400-import/contrib/llvm/tools/lld/COFF/Symbols.cpp projects/clang400-import/contrib/llvm/tools/lld/COFF/Symbols.h projects/clang400-import/contrib/llvm/tools/lld/ELF/Driver.cpp projects/clang400-import/contrib/llvm/tools/lld/ELF/Driver.h projects/clang400-import/contrib/llvm/tools/lld/ELF/DriverUtils.cpp projects/clang400-import/contrib/llvm/tools/lld/ELF/InputFiles.cpp projects/clang400-import/contrib/llvm/tools/lld/ELF/InputFiles.h projects/clang400-import/contrib/llvm/tools/lld/ELF/InputSection.cpp projects/clang400-import/contrib/llvm/tools/lld/ELF/InputSection.h projects/clang400-import/contrib/llvm/tools/lld/ELF/LinkerScript.cpp projects/clang400-import/contrib/llvm/tools/lld/ELF/OutputSections.cpp projects/clang400-import/contrib/llvm/tools/lld/ELF/OutputSections.h projects/clang400-import/contrib/llvm/tools/lld/ELF/Symbols.cpp projects/clang400-import/contrib/llvm/tools/lld/ELF/Symbols.h projects/clang400-import/contrib/llvm/tools/lld/ELF/Target.cpp projects/clang400-import/contrib/llvm/tools/lld/ELF/Target.h projects/clang400-import/contrib/llvm/tools/lld/include/lld/Core/Reproduce.h projects/clang400-import/contrib/llvm/tools/lld/lib/Core/Reproduce.cpp projects/clang400-import/contrib/llvm/tools/lldb/include/lldb/Core/MappedHash.h projects/clang400-import/contrib/llvm/tools/lldb/include/lldb/Host/Editline.h projects/clang400-import/contrib/llvm/tools/lldb/source/Core/DataEncoder.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Core/ValueObjectMemory.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Expression/IRInterpreter.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Expression/IRMemoryMap.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Host/common/Editline.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Interpreter/OptionValueProperties.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/CrashReason.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Symbol/Type.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Target/ABI.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Target/Platform.cpp projects/clang400-import/contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp projects/clang400-import/contrib/llvm/tools/lldb/tools/driver/Platform.cpp projects/clang400-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdEnviro.cpp projects/clang400-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp projects/clang400-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbSet.h projects/clang400-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbShow.cpp projects/clang400-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbShow.h projects/clang400-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdMiscellanous.cpp projects/clang400-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTarget.cpp projects/clang400-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp projects/clang400-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h Directory Properties: projects/clang400-import/contrib/llvm/ (props changed) projects/clang400-import/contrib/llvm/tools/clang/ (props changed) projects/clang400-import/contrib/llvm/tools/lld/ (props changed) projects/clang400-import/contrib/llvm/tools/lldb/ (props changed) Modified: projects/clang400-import/contrib/llvm/include/llvm/Analysis/CGSCCPassManager.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/Analysis/CGSCCPassManager.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/Analysis/CGSCCPassManager.h Fri Jan 6 20:24:06 2017 (r311544) @@ -128,7 +128,7 @@ extern template class PassManager<LazyCa /// \brief The CGSCC pass manager. /// /// See the documentation for the PassManager template for details. It runs -/// a sequency of SCC passes over each SCC that the manager is run over. This +/// a sequence of SCC passes over each SCC that the manager is run over. This /// typedef serves as a convenient way to refer to this construct. typedef PassManager<LazyCallGraph::SCC, CGSCCAnalysisManager, LazyCallGraph &, CGSCCUpdateResult &> Modified: projects/clang400-import/contrib/llvm/include/llvm/Analysis/TargetTransformInfo.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/Analysis/TargetTransformInfo.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/Analysis/TargetTransformInfo.h Fri Jan 6 20:24:06 2017 (r311544) @@ -36,6 +36,8 @@ namespace llvm { class Function; class GlobalValue; class Loop; +class ScalarEvolution; +class SCEV; class Type; class User; class Value; @@ -613,10 +615,11 @@ public: /// merged into the instruction indexing mode. Some targets might want to /// distinguish between address computation for memory operations on vector /// types and scalar types. Such targets should override this function. - /// The 'IsComplex' parameter is a hint that the address computation is likely - /// to involve multiple instructions and as such unlikely to be merged into - /// the address indexing mode. - int getAddressComputationCost(Type *Ty, bool IsComplex = false) const; + /// The 'SE' parameter holds pointer for the scalar evolution object which + /// is used in order to get the Ptr step value in case of constant stride. + /// The 'Ptr' parameter holds SCEV of the access pointer. + int getAddressComputationCost(Type *Ty, ScalarEvolution *SE = nullptr, + const SCEV *Ptr = nullptr) const; /// \returns The cost, if any, of keeping values of the given types alive /// over a callsite. @@ -795,7 +798,8 @@ public: virtual int getCallInstrCost(Function *F, Type *RetTy, ArrayRef<Type *> Tys) = 0; virtual unsigned getNumberOfParts(Type *Tp) = 0; - virtual int getAddressComputationCost(Type *Ty, bool IsComplex) = 0; + virtual int getAddressComputationCost(Type *Ty, ScalarEvolution *SE, + const SCEV *Ptr) = 0; virtual unsigned getCostOfKeepingLiveOverCall(ArrayRef<Type *> Tys) = 0; virtual bool getTgtMemIntrinsic(IntrinsicInst *Inst, MemIntrinsicInfo &Info) = 0; @@ -1044,8 +1048,9 @@ public: unsigned getNumberOfParts(Type *Tp) override { return Impl.getNumberOfParts(Tp); } - int getAddressComputationCost(Type *Ty, bool IsComplex) override { - return Impl.getAddressComputationCost(Ty, IsComplex); + int getAddressComputationCost(Type *Ty, ScalarEvolution *SE, + const SCEV *Ptr) override { + return Impl.getAddressComputationCost(Ty, SE, Ptr); } unsigned getCostOfKeepingLiveOverCall(ArrayRef<Type *> Tys) override { return Impl.getCostOfKeepingLiveOverCall(Tys); Modified: projects/clang400-import/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h Fri Jan 6 20:24:06 2017 (r311544) @@ -15,6 +15,7 @@ #ifndef LLVM_ANALYSIS_TARGETTRANSFORMINFOIMPL_H #define LLVM_ANALYSIS_TARGETTRANSFORMINFOIMPL_H +#include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/IR/CallSite.h" #include "llvm/IR/DataLayout.h" @@ -370,7 +371,10 @@ public: unsigned getNumberOfParts(Type *Tp) { return 0; } - unsigned getAddressComputationCost(Type *Tp, bool) { return 0; } + unsigned getAddressComputationCost(Type *Tp, ScalarEvolution *, + const SCEV *) { + return 0; + } unsigned getReductionCost(unsigned, Type *, bool) { return 1; } @@ -422,6 +426,30 @@ public: VectorType *VecTy) const { return VF; } +protected: + bool isStridedAccess(const SCEV *Ptr) { + return Ptr && isa<SCEVAddRecExpr>(Ptr); + } + + const SCEVConstant *getConstantStrideStep(ScalarEvolution *SE, + const SCEV *Ptr) { + if (!isStridedAccess(Ptr)) + return nullptr; + const SCEVAddRecExpr *AddRec = cast<SCEVAddRecExpr>(Ptr); + return dyn_cast<SCEVConstant>(AddRec->getStepRecurrence(*SE)); + } + + bool isConstantStridedAccessLessThan(ScalarEvolution *SE, const SCEV *Ptr, + int64_t MergeDistance) { + const SCEVConstant *Step = getConstantStrideStep(SE, Ptr); + if (!Step) + return false; + APInt StrideVal = Step->getAPInt(); + if (StrideVal.getBitWidth() > 64) + return false; + // FIXME: need to take absolute value for negtive stride case + return StrideVal.getSExtValue() < MergeDistance; + } }; /// \brief CRTP base class for use as a mix-in that aids implementing Modified: projects/clang400-import/contrib/llvm/include/llvm/Bitcode/BitCodes.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/Bitcode/BitCodes.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/Bitcode/BitCodes.h Fri Jan 6 20:24:06 2017 (r311544) @@ -18,7 +18,6 @@ #ifndef LLVM_BITCODE_BITCODES_H #define LLVM_BITCODE_BITCODES_H -#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/DataTypes.h" #include "llvm/Support/ErrorHandling.h" @@ -166,11 +165,8 @@ template <> struct isPodLike<BitCodeAbbr /// BitCodeAbbrev - This class represents an abbreviation record. An /// abbreviation allows a complex record that has redundancy to be stored in a /// specialized format instead of the fully-general, fully-vbr, format. -class BitCodeAbbrev : public RefCountedBase<BitCodeAbbrev> { +class BitCodeAbbrev { SmallVector<BitCodeAbbrevOp, 32> OperandList; - // Only RefCountedBase is allowed to delete. - ~BitCodeAbbrev() = default; - friend class RefCountedBase<BitCodeAbbrev>; public: unsigned getNumOperandInfos() const { Modified: projects/clang400-import/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h Fri Jan 6 20:24:06 2017 (r311544) @@ -16,7 +16,6 @@ #define LLVM_BITCODE_BITSTREAMREADER_H #include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Bitcode/BitCodes.h" #include "llvm/Support/Endian.h" @@ -42,7 +41,7 @@ public: /// describe abbreviations that all blocks of the specified ID inherit. struct BlockInfo { unsigned BlockID; - std::vector<IntrusiveRefCntPtr<BitCodeAbbrev>> Abbrevs; + std::vector<std::shared_ptr<BitCodeAbbrev>> Abbrevs; std::string Name; std::vector<std::pair<unsigned, std::string> > RecordNames; }; @@ -316,11 +315,11 @@ class BitstreamCursor : SimpleBitstreamC unsigned CurCodeSize = 2; /// Abbrevs installed at in this block. - std::vector<IntrusiveRefCntPtr<BitCodeAbbrev>> CurAbbrevs; + std::vector<std::shared_ptr<BitCodeAbbrev>> CurAbbrevs; struct Block { unsigned PrevCodeSize; - std::vector<IntrusiveRefCntPtr<BitCodeAbbrev>> PrevAbbrevs; + std::vector<std::shared_ptr<BitCodeAbbrev>> PrevAbbrevs; explicit Block(unsigned PCS) : PrevCodeSize(PCS) {} }; @@ -478,8 +477,8 @@ public: return CurAbbrevs[AbbrevNo].get(); } - /// Read the current record and discard it. - void skipRecord(unsigned AbbrevID); + /// Read the current record and discard it, returning the code for the record. + unsigned skipRecord(unsigned AbbrevID); unsigned readRecord(unsigned AbbrevID, SmallVectorImpl<uint64_t> &Vals, StringRef *Blob = nullptr); Modified: projects/clang400-import/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h Fri Jan 6 20:24:06 2017 (r311544) @@ -43,12 +43,12 @@ class BitstreamWriter { unsigned BlockInfoCurBID; /// CurAbbrevs - Abbrevs installed at in this block. - std::vector<IntrusiveRefCntPtr<BitCodeAbbrev>> CurAbbrevs; + std::vector<std::shared_ptr<BitCodeAbbrev>> CurAbbrevs; struct Block { unsigned PrevCodeSize; size_t StartSizeWord; - std::vector<IntrusiveRefCntPtr<BitCodeAbbrev>> PrevAbbrevs; + std::vector<std::shared_ptr<BitCodeAbbrev>> PrevAbbrevs; Block(unsigned PCS, size_t SSW) : PrevCodeSize(PCS), StartSizeWord(SSW) {} }; @@ -59,7 +59,7 @@ class BitstreamWriter { /// These describe abbreviations that all blocks of the specified ID inherit. struct BlockInfo { unsigned BlockID; - std::vector<IntrusiveRefCntPtr<BitCodeAbbrev>> Abbrevs; + std::vector<std::shared_ptr<BitCodeAbbrev>> Abbrevs; }; std::vector<BlockInfo> BlockInfoRecords; @@ -469,12 +469,12 @@ public: private: // Emit the abbreviation as a DEFINE_ABBREV record. - void EncodeAbbrev(BitCodeAbbrev *Abbv) { + void EncodeAbbrev(const BitCodeAbbrev &Abbv) { EmitCode(bitc::DEFINE_ABBREV); - EmitVBR(Abbv->getNumOperandInfos(), 5); - for (unsigned i = 0, e = static_cast<unsigned>(Abbv->getNumOperandInfos()); + EmitVBR(Abbv.getNumOperandInfos(), 5); + for (unsigned i = 0, e = static_cast<unsigned>(Abbv.getNumOperandInfos()); i != e; ++i) { - const BitCodeAbbrevOp &Op = Abbv->getOperandInfo(i); + const BitCodeAbbrevOp &Op = Abbv.getOperandInfo(i); Emit(Op.isLiteral(), 1); if (Op.isLiteral()) { EmitVBR64(Op.getLiteralValue(), 8); @@ -489,10 +489,10 @@ public: /// EmitAbbrev - This emits an abbreviation to the stream. Note that this /// method takes ownership of the specified abbrev. - unsigned EmitAbbrev(BitCodeAbbrev *Abbv) { + unsigned EmitAbbrev(std::shared_ptr<BitCodeAbbrev> Abbv) { // Emit the abbreviation as a record. - EncodeAbbrev(Abbv); - CurAbbrevs.push_back(Abbv); + EncodeAbbrev(*Abbv); + CurAbbrevs.push_back(std::move(Abbv)); return static_cast<unsigned>(CurAbbrevs.size())-1 + bitc::FIRST_APPLICATION_ABBREV; } @@ -532,13 +532,13 @@ public: /// EmitBlockInfoAbbrev - Emit a DEFINE_ABBREV record for the specified /// BlockID. - unsigned EmitBlockInfoAbbrev(unsigned BlockID, BitCodeAbbrev *Abbv) { + unsigned EmitBlockInfoAbbrev(unsigned BlockID, std::shared_ptr<BitCodeAbbrev> Abbv) { SwitchToBlockID(BlockID); - EncodeAbbrev(Abbv); + EncodeAbbrev(*Abbv); // Add the abbrev to the specified block record. BlockInfo &Info = getOrCreateBlockInfo(BlockID); - Info.Abbrevs.push_back(Abbv); + Info.Abbrevs.push_back(std::move(Abbv)); return Info.Abbrevs.size()-1+bitc::FIRST_APPLICATION_ABBREV; } Modified: projects/clang400-import/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h Fri Jan 6 20:24:06 2017 (r311544) @@ -140,6 +140,9 @@ private: /// If the target supports dwarf debug info, this pointer is non-null. DwarfDebug *DD; + /// If the current module uses dwarf CFI annotations strictly for debugging. + bool isCFIMoveForDebugging; + protected: explicit AsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer); @@ -262,6 +265,10 @@ public: enum CFIMoveType { CFI_M_None, CFI_M_EH, CFI_M_Debug }; CFIMoveType needsCFIMoves(); + /// Returns false if needsCFIMoves() == CFI_M_EH for any function + /// in the module. + bool needsOnlyDebugCFIMoves() const { return isCFIMoveForDebugging; } + bool needsSEHMoves(); /// Print to the current output stream assembly representations of the Modified: projects/clang400-import/contrib/llvm/include/llvm/CodeGen/BasicTTIImpl.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/CodeGen/BasicTTIImpl.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/CodeGen/BasicTTIImpl.h Fri Jan 6 20:24:06 2017 (r311544) @@ -925,7 +925,10 @@ public: return LT.first; } - unsigned getAddressComputationCost(Type *Ty, bool IsComplex) { return 0; } + unsigned getAddressComputationCost(Type *Ty, ScalarEvolution *, + const SCEV *) { + return 0; + } unsigned getReductionCost(unsigned Opcode, Type *Ty, bool IsPairwise) { assert(Ty->isVectorTy() && "Expect a vector type"); Modified: projects/clang400-import/contrib/llvm/include/llvm/CodeGen/DIE.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/CodeGen/DIE.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/CodeGen/DIE.h Fri Jan 6 20:24:06 2017 (r311544) @@ -651,6 +651,9 @@ class DIE : IntrusiveBackListNode, publi unsigned AbbrevNumber = ~0u; /// Dwarf tag code. dwarf::Tag Tag = (dwarf::Tag)0; + /// Set to true to force a DIE to emit an abbreviation that says it has + /// children even when it doesn't. This is used for unit testing purposes. + bool ForceChildren; /// Children DIEs. IntrusiveBackList<DIE> Children; @@ -659,7 +662,8 @@ class DIE : IntrusiveBackListNode, publi PointerUnion<DIE *, DIEUnit *> Owner; DIE() = delete; - explicit DIE(dwarf::Tag Tag) : Offset(0), Size(0), Tag(Tag) {} + explicit DIE(dwarf::Tag Tag) : Offset(0), Size(0), Tag(Tag), + ForceChildren(false) {} public: static DIE *get(BumpPtrAllocator &Alloc, dwarf::Tag Tag) { @@ -677,7 +681,8 @@ public: /// Get the compile/type unit relative offset of this DIE. unsigned getOffset() const { return Offset; } unsigned getSize() const { return Size; } - bool hasChildren() const { return !Children.empty(); } + bool hasChildren() const { return ForceChildren || !Children.empty(); } + void setForceChildren(bool B) { ForceChildren = B; } typedef IntrusiveBackList<DIE>::iterator child_iterator; typedef IntrusiveBackList<DIE>::const_iterator const_child_iterator; Modified: projects/clang400-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h Fri Jan 6 20:24:06 2017 (r311544) @@ -180,6 +180,8 @@ private: /// \pre \p U is a branch instruction. bool translateBr(const User &U, MachineIRBuilder &MIRBuilder); + bool translateSwitch(const User &U, MachineIRBuilder &MIRBuilder); + bool translateExtractValue(const User &U, MachineIRBuilder &MIRBuilder); bool translateInsertValue(const User &U, MachineIRBuilder &MIRBuilder); @@ -292,12 +294,8 @@ private: return translateBinaryOp(TargetOpcode::G_FREM, U, MIRBuilder); } - // Stubs to keep the compiler happy while we implement the rest of the // translation. - bool translateSwitch(const User &U, MachineIRBuilder &MIRBuilder) { - return false; - } bool translateIndirectBr(const User &U, MachineIRBuilder &MIRBuilder) { return false; } Modified: projects/clang400-import/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h Fri Jan 6 20:24:06 2017 (r311544) @@ -308,7 +308,7 @@ public: // Iteration support for live in sets. These sets are kept in sorted // order by their register number. typedef LiveInVector::const_iterator livein_iterator; - livein_iterator livein_begin() const { return LiveIns.begin(); } + livein_iterator livein_begin() const; livein_iterator livein_end() const { return LiveIns.end(); } bool livein_empty() const { return LiveIns.empty(); } iterator_range<livein_iterator> liveins() const { Modified: projects/clang400-import/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h Fri Jan 6 20:24:06 2017 (r311544) @@ -10,6 +10,8 @@ #ifndef LLVM_LIB_DEBUGINFO_DWARFDIE_H #define LLVM_LIB_DEBUGINFO_DWARFDIE_H +#include "llvm/ADT/iterator.h" +#include "llvm/ADT/iterator_range.h" #include "llvm/ADT/Optional.h" #include "llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h" @@ -40,9 +42,6 @@ public: bool isValid() const { return U && Die; } explicit operator bool() const { return isValid(); } - bool operator ==(const DWARFDie &RHS) const { - return Die == RHS.Die && U == RHS.U; - } const DWARFDebugInfoEntry *getDebugInfoEntry() const { return Die; } DWARFUnit *getDwarfUnit() const { return U; } @@ -361,8 +360,61 @@ public: getInlinedChainForAddress(const uint64_t Address, SmallVectorImpl<DWARFDie> &InlinedChain) const; + class iterator; + + iterator begin() const; + iterator end() const; + iterator_range<iterator> children() const; +}; + + +inline bool operator==(const DWARFDie &LHS, const DWARFDie &RHS) { + return LHS.getDebugInfoEntry() == RHS.getDebugInfoEntry() && + LHS.getDwarfUnit() == RHS.getDwarfUnit(); +} + +inline bool operator!=(const DWARFDie &LHS, const DWARFDie &RHS) { + return !(LHS == RHS); +} + +class DWARFDie::iterator : public iterator_facade_base<iterator, + std::forward_iterator_tag, + const DWARFDie> { + DWARFDie Die; + void skipNull() { + if (Die && Die.isNULL()) + Die = DWARFDie(); + } +public: + iterator() = default; + explicit iterator(DWARFDie D) : Die(D) { + // If we start out with only a Null DIE then invalidate. + skipNull(); + } + iterator &operator++() { + Die = Die.getSibling(); + // Don't include the NULL die when iterating. + skipNull(); + return *this; + } + explicit operator bool() const { return Die.isValid(); } + const DWARFDie &operator*() const { return Die; } + bool operator==(const iterator &X) const { return Die == X.Die; } }; +// These inline functions must follow the DWARFDie::iterator definition above +// as they use functions from that class. +inline DWARFDie::iterator DWARFDie::begin() const { + return iterator(getFirstChild()); +} + +inline DWARFDie::iterator DWARFDie::end() const { + return iterator(); +} + +inline iterator_range<DWARFDie::iterator> DWARFDie::children() const { + return make_range(begin(), end()); +} } // end namespace llvm Modified: projects/clang400-import/contrib/llvm/include/llvm/ExecutionEngine/Orc/RawByteChannel.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/ExecutionEngine/Orc/RawByteChannel.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/ExecutionEngine/Orc/RawByteChannel.h Fri Jan 6 20:24:06 2017 (r311544) @@ -47,9 +47,9 @@ public: /// Locks the channel for writing. template <typename FunctionIdT, typename SequenceIdT> Error startSendMessage(const FunctionIdT &FnId, const SequenceIdT &SeqNo) { + writeLock.lock(); if (auto Err = serializeSeq(*this, FnId, SeqNo)) return Err; - writeLock.lock(); return Error::success(); } Modified: projects/clang400-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndex.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndex.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndex.h Fri Jan 6 20:24:06 2017 (r311544) @@ -28,6 +28,10 @@ namespace llvm { +namespace yaml { +template <typename T> struct MappingTraits; +} + /// \brief Class to accumulate and hold information about a callee. struct CalleeInfo { enum class HotnessType : uint8_t { Unknown = 0, Cold = 1, None = 2, Hot = 3 }; @@ -102,7 +106,7 @@ public: /// \brief Sububclass discriminator (for dyn_cast<> et al.) enum SummaryKind : unsigned { AliasKind, FunctionKind, GlobalVarKind }; - /// Group flags (Linkage, noRename, isOptSize, etc.) as a bitfield. + /// Group flags (Linkage, NotEligibleToImport, etc.) as a bitfield. struct GVFlags { /// \brief The linkage type of the associated global value. /// @@ -113,39 +117,20 @@ public: /// types based on global summary-based analysis. unsigned Linkage : 4; - /// Indicate if the global value cannot be renamed (in a specific section, - /// possibly referenced from inline assembly, etc). - unsigned NoRename : 1; - - /// Indicate if a function contains inline assembly (which is opaque), - /// that may reference a local value. This is used to prevent importing - /// of this function, since we can't promote and rename the uses of the - /// local in the inline assembly. Use a flag rather than bloating the - /// summary with references to every possible local value in the - /// llvm.used set. - unsigned HasInlineAsmMaybeReferencingInternal : 1; - - /// Indicate if the function is not viable to inline. - unsigned IsNotViableToInline : 1; + /// Indicate if the global value cannot be imported (e.g. it cannot + /// be renamed or references something that can't be renamed). + unsigned NotEligibleToImport : 1; + + /// Indicate that the global value must be considered a live root for + /// index-based liveness analysis. Used for special LLVM values such as + /// llvm.global_ctors that the linker does not know about. + unsigned LiveRoot : 1; /// Convenience Constructors - explicit GVFlags(GlobalValue::LinkageTypes Linkage, bool NoRename, - bool HasInlineAsmMaybeReferencingInternal, - bool IsNotViableToInline) - : Linkage(Linkage), NoRename(NoRename), - HasInlineAsmMaybeReferencingInternal( - HasInlineAsmMaybeReferencingInternal), - IsNotViableToInline(IsNotViableToInline) {} - - GVFlags(const GlobalValue &GV) - : Linkage(GV.getLinkage()), NoRename(GV.hasSection()), - HasInlineAsmMaybeReferencingInternal(false) { - IsNotViableToInline = false; - if (const auto *F = dyn_cast<Function>(&GV)) - // Inliner doesn't handle variadic functions. - // FIXME: refactor this to use the same code that inliner is using. - IsNotViableToInline = F->isVarArg(); - } + explicit GVFlags(GlobalValue::LinkageTypes Linkage, + bool NotEligibleToImport, bool LiveRoot) + : Linkage(Linkage), NotEligibleToImport(NotEligibleToImport), + LiveRoot(LiveRoot) {} }; private: @@ -213,31 +198,19 @@ public: Flags.Linkage = Linkage; } - bool isNotViableToInline() const { return Flags.IsNotViableToInline; } + /// Return true if this global value can't be imported. + bool notEligibleToImport() const { return Flags.NotEligibleToImport; } - /// Return true if this summary is for a GlobalValue that needs promotion - /// to be referenced from another module. - bool needsRenaming() const { return GlobalValue::isLocalLinkage(linkage()); } - - /// Return true if this global value cannot be renamed (in a specific section, - /// possibly referenced from inline assembly, etc). - bool noRename() const { return Flags.NoRename; } - - /// Flag that this global value cannot be renamed (in a specific section, - /// possibly referenced from inline assembly, etc). - void setNoRename() { Flags.NoRename = true; } - - /// Return true if this global value possibly references another value - /// that can't be renamed. - bool hasInlineAsmMaybeReferencingInternal() const { - return Flags.HasInlineAsmMaybeReferencingInternal; - } - - /// Flag that this global value possibly references another value that - /// can't be renamed. - void setHasInlineAsmMaybeReferencingInternal() { - Flags.HasInlineAsmMaybeReferencingInternal = true; - } + /// Return true if this global value must be considered a root for live + /// value analysis on the index. + bool liveRoot() const { return Flags.LiveRoot; } + + /// Flag that this global value must be considered a root for live + /// value analysis on the index. + void setLiveRoot() { Flags.LiveRoot = true; } + + /// Flag that this global value cannot be imported. + void setNotEligibleToImport() { Flags.NotEligibleToImport = true; } /// Return the list of values referenced by this global value definition. ArrayRef<ValueInfo> refs() const { return RefEdgeList; } @@ -330,6 +303,30 @@ public: } }; +struct TypeTestResolution { + /// Specifies which kind of type check we should emit for this byte array. + /// See http://clang.llvm.org/docs/ControlFlowIntegrityDesign.html for full + /// details on each kind of check; the enumerators are described with + /// reference to that document. + enum Kind { + Unsat, ///< Unsatisfiable type (i.e. no global has this type metadata) + ByteArray, ///< Test a byte array (first example) + Inline, ///< Inlined bit vector ("Short Inline Bit Vectors") + Single, ///< Single element (last example in "Short Inline Bit Vectors") + AllOnes, ///< All-ones bit vector ("Eliminating Bit Vector Checks for + /// All-Ones Bit Vectors") + } TheKind = Unsat; + + /// Range of the size expressed as a bit width. For example, if the size is in + /// range [0,256), this number will be 8. This helps generate the most compact + /// instruction sequences. + unsigned SizeBitWidth = 0; +}; + +struct TypeIdSummary { + TypeTestResolution TTRes; +}; + /// 160 bits SHA1 typedef std::array<uint32_t, 5> ModuleHash; @@ -370,11 +367,20 @@ private: /// Holds strings for combined index, mapping to the corresponding module ID. ModulePathStringTableTy ModulePathStringTable; + /// Mapping from type identifiers to summary information for that type + /// identifier. + // FIXME: Add bitcode read/write support for this field. + std::map<std::string, TypeIdSummary> TypeIdMap; + + // YAML I/O support. + friend yaml::MappingTraits<ModuleSummaryIndex>; + public: gvsummary_iterator begin() { return GlobalValueMap.begin(); } const_gvsummary_iterator begin() const { return GlobalValueMap.begin(); } gvsummary_iterator end() { return GlobalValueMap.end(); } const_gvsummary_iterator end() const { return GlobalValueMap.end(); } + size_t size() const { return GlobalValueMap.size(); } /// Get the list of global value summary objects for a given value name. const GlobalValueSummaryList &getGlobalValueSummaryList(StringRef ValueName) { Copied: projects/clang400-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h (from r311543, vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang400-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h Fri Jan 6 20:24:06 2017 (r311544, copy of r311543, vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h) @@ -0,0 +1,111 @@ +//===-- llvm/ModuleSummaryIndexYAML.h - YAML I/O for summary ----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_IR_MODULESUMMARYINDEXYAML_H +#define LLVM_IR_MODULESUMMARYINDEXYAML_H + +#include "llvm/IR/ModuleSummaryIndex.h" +#include "llvm/Support/YAMLTraits.h" + +namespace llvm { +namespace yaml { + +template <> struct ScalarEnumerationTraits<TypeTestResolution::Kind> { + static void enumeration(IO &io, TypeTestResolution::Kind &value) { + io.enumCase(value, "Unsat", TypeTestResolution::Unsat); + io.enumCase(value, "ByteArray", TypeTestResolution::ByteArray); + io.enumCase(value, "Inline", TypeTestResolution::Inline); + io.enumCase(value, "Single", TypeTestResolution::Single); + io.enumCase(value, "AllOnes", TypeTestResolution::AllOnes); + } +}; + +template <> struct MappingTraits<TypeTestResolution> { + static void mapping(IO &io, TypeTestResolution &res) { + io.mapRequired("Kind", res.TheKind); + io.mapRequired("SizeBitWidth", res.SizeBitWidth); + } +}; + +template <> struct MappingTraits<TypeIdSummary> { + static void mapping(IO &io, TypeIdSummary& summary) { + io.mapRequired("TTRes", summary.TTRes); + } +}; + +struct FunctionSummaryYaml { + std::vector<uint64_t> TypeTests; +}; + +} // End yaml namespace +} // End llvm namespace + +LLVM_YAML_IS_SEQUENCE_VECTOR(uint64_t) + +namespace llvm { +namespace yaml { + +template <> struct MappingTraits<FunctionSummaryYaml> { + static void mapping(IO &io, FunctionSummaryYaml& summary) { + io.mapRequired("TypeTests", summary.TypeTests); + } +}; + +} // End yaml namespace +} // End llvm namespace + +LLVM_YAML_IS_STRING_MAP(TypeIdSummary) +LLVM_YAML_IS_SEQUENCE_VECTOR(FunctionSummaryYaml) + +namespace llvm { +namespace yaml { + +// FIXME: Add YAML mappings for the rest of the module summary. +template <> struct CustomMappingTraits<GlobalValueSummaryMapTy> { + static void inputOne(IO &io, StringRef Key, GlobalValueSummaryMapTy &V) { + std::vector<FunctionSummaryYaml> FSums; + io.mapRequired(Key.str().c_str(), FSums); + uint64_t KeyInt; + if (Key.getAsInteger(0, KeyInt)) { + io.setError("key not an integer"); + return; + } + auto &Elem = V[KeyInt]; + for (auto &FSum : FSums) { + GlobalValueSummary::GVFlags GVFlags(GlobalValue::ExternalLinkage, false, + false); + Elem.push_back(llvm::make_unique<FunctionSummary>( + GVFlags, 0, ArrayRef<ValueInfo>{}, + ArrayRef<FunctionSummary::EdgeTy>{}, std::move(FSum.TypeTests))); + } + } + static void output(IO &io, GlobalValueSummaryMapTy &V) { + for (auto &P : V) { + std::vector<FunctionSummaryYaml> FSums; + for (auto &Sum : P.second) { + if (auto *FSum = dyn_cast<FunctionSummary>(Sum.get())) + FSums.push_back(FunctionSummaryYaml{FSum->type_tests()}); + } + if (!FSums.empty()) + io.mapRequired(llvm::utostr(P.first).c_str(), FSums); + } + } +}; + +template <> struct MappingTraits<ModuleSummaryIndex> { + static void mapping(IO &io, ModuleSummaryIndex& index) { + io.mapRequired("GlobalValueMap", index.GlobalValueMap); + io.mapRequired("TypeIdMap", index.TypeIdMap); + } +}; + +} // End yaml namespace +} // End llvm namespace + +#endif Modified: projects/clang400-import/contrib/llvm/include/llvm/IR/PassManager.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/IR/PassManager.h Fri Jan 6 20:14:20 2017 (r311543) +++ projects/clang400-import/contrib/llvm/include/llvm/IR/PassManager.h Fri Jan 6 20:24:06 2017 (r311544) @@ -64,32 +64,31 @@ namespace llvm { struct alignas(8) AnalysisKey {}; /// A special type used to provide an address that identifies a set of related -/// analyses. +/// analyses. These sets are primarily used below to mark sets of analyses as +/// preserved. /// -/// These sets are primarily used below to mark sets of analyses as preserved. -/// An example would be analyses depending only on the CFG of a function. -/// A transformation can mark that it is preserving the CFG of a function and -/// then analyses can check for this rather than each transform having to fully -/// enumerate every analysis preserved. +/// For example, a transformation can indicate that it preserves the CFG of a +/// function by preserving the appropriate AnalysisSetKey. An analysis that +/// depends only on the CFG can then check if that AnalysisSetKey is preserved; +/// if it is, the analysis knows that it itself is preserved. struct alignas(8) AnalysisSetKey {}; -/// Class for tracking what analyses are preserved after a transformation pass -/// runs over some unit of IR. +/// A set of analyses that are preserved following a run of a transformation +/// pass. /// -/// Transformation passes build and return these objects when run over the IR -/// to communicate which analyses remain valid afterward. For most passes this -/// is fairly simple: if they don't change anything all analyses are preserved, +/// Transformation passes build and return these objects to communicate which +/// analyses are still valid after the transformation. For most passes this is +/// fairly simple: if they don't change anything all analyses are preserved, /// otherwise only a short list of analyses that have been explicitly updated /// are preserved. /// -/// This class also provides the ability to mark abstract *sets* of analyses as -/// preserved. These sets allow passes to indicate that they preserve broad -/// aspects of the IR (such as its CFG) and analyses to opt in to that being -/// sufficient without the passes having to fully enumerate such analyses. -/// -/// Finally, this class can represent "abandoning" an analysis, which marks it -/// as not-preserved even if it would be covered by some abstract set of -/// analyses. +/// This class also lets transformation passes mark abstract *sets* of analyses +/// as preserved. A transformation that (say) does not alter the CFG can +/// indicate such by marking a particular AnalysisSetKey as preserved, and +/// then analyses can query whether that AnalysisSetKey is preserved. +/// +/// Finally, this class can represent an "abandoned" analysis, which is +/// not preserved even if it would be covered by some abstract set of analyses. /// /// Given a `PreservedAnalyses` object, an analysis will typically want to /// figure out whether it is preserved. In the example below, MyAnalysisType is @@ -120,7 +119,8 @@ public: /// Mark an analysis as preserved. template <typename AnalysisT> void preserve() { preserve(AnalysisT::ID()); } - /// Mark an analysis as preserved using its ID. + /// \brief Given an analysis's ID, mark the analysis as preserved, adding it + /// to the set. void preserve(AnalysisKey *ID) { // Clear this ID from the explicit not-preserved set if present. NotPreservedAnalysisIDs.erase(ID); @@ -224,17 +224,17 @@ public: : PA(PA), ID(ID), IsAbandoned(PA.NotPreservedAnalysisIDs.count(ID)) {} public: - /// Returns true if the checker's analysis was not abandoned and the - /// analysis is either is explicitly preserved or all analyses are - /// preserved. + /// Returns true if the checker's analysis was not abandoned and either + /// - the analysis is explicitly preserved or + /// - all analyses are preserved. bool preserved() { return !IsAbandoned && (PA.PreservedIDs.count(&AllAnalysesKey) || PA.PreservedIDs.count(ID)); } - /// Returns true if the checker's analysis was not abandoned and either the - /// provided set type is either explicitly preserved or all analyses are - /// preserved. + /// Returns true if the checker's analysis was not abandoned and either + /// - \p AnalysisSetT is explicitly preserved or + /// - all analyses are preserved. template <typename AnalysisSetT> bool preservedSet() { AnalysisSetKey *SetID = AnalysisSetT::ID(); return !IsAbandoned && (PA.PreservedIDs.count(&AllAnalysesKey) || @@ -262,8 +262,8 @@ public: /// Test whether all analyses are preserved (and none are abandoned). /// - /// This lets analyses optimize for the common case where a transformation - /// made no changes to the IR. + /// This is used primarily to optimize for the common case of a transformation + /// which makes no changes to the IR. bool areAllPreserved() const { return NotPreservedAnalysisIDs.empty() && PreservedIDs.count(&AllAnalysesKey); @@ -307,9 +307,9 @@ template <typename IRUnitT, typename... /// A CRTP mix-in to automatically provide informational APIs needed for /// passes. /// -/// This provides some boiler plate for types that are passes. +/// This provides some boilerplate for types that are passes. template <typename DerivedT> struct PassInfoMixin { - /// Returns the name of the derived pass type. + /// Gets the name of the pass we are mixed into. static StringRef name() { StringRef Name = getTypeName<DerivedT>(); if (Name.startswith("llvm::")) @@ -318,41 +318,35 @@ template <typename DerivedT> struct Pass } }; -/// A CRTP mix-in to automatically provide informational APIs needed for -/// analysis passes. +/// A CRTP mix-in that provides informational APIs needed for analysis passes. /// -/// This provides some boiler plate for types that are analysis passes. It -/// automatically mixes in \c PassInfoMixin and adds informational APIs -/// specifically used for analyses. +/// This provides some boilerplate for types that are analysis passes. It +/// automatically mixes in \c PassInfoMixin. template <typename DerivedT> struct AnalysisInfoMixin : PassInfoMixin<DerivedT> { /// Returns an opaque, unique ID for this analysis type. /// - /// This ID is a pointer type that is guaranteed to be 8-byte aligned and - /// thus suitable for use in sets, maps, and other data structures optimized - /// for pointer-like types using the alignment-provided low bits. + /// This ID is a pointer type that is guaranteed to be 8-byte aligned and thus + /// suitable for use in sets, maps, and other data structures that use the low + /// bits of pointers. /// /// Note that this requires the derived type provide a static \c AnalysisKey /// member called \c Key. /// - /// FIXME: The only reason the derived type needs to provide this rather than - /// this mixin providing it is due to broken implementations which cannot - /// correctly unique a templated static so that they have the same addresses - /// for each instantiation and are definitively emitted once for each - /// instantiation. The only currently known platform with this limitation are - /// Windows DLL builds, specifically building each part of LLVM as a DLL. If - /// we ever remove that build configuration, this mixin can provide the - /// static key as well. + /// FIXME: The only reason the mixin type itself can't declare the Key value + /// is that some compilers cannot correctly unique a templated static variable + /// so it has the same addresses in each instantiation. The only currently + /// known platform with this limitation is Windows DLL builds, specifically + /// building each part of LLVM as a DLL. If we ever remove that build + /// configuration, this mixin can provide the static key as well. static AnalysisKey *ID() { return &DerivedT::Key; } }; -/// A class template to provide analysis sets for IR units. +/// This templated class represents "all analyses that operate over \<a +/// particular IR unit\>" (e.g. a Function or a Module) in instances of +/// PreservedAnalysis. /// -/// Analyses operate on units of IR. It is useful to be able to talk about -/// preservation of all analyses for a given unit of IR as a set. This class -/// template can be used with the \c PreservedAnalyses API for that purpose and -/// the \c AnalysisManager will automatically check and use this set to skip -/// invalidation events. +/// This lets a transformation say e.g. "I preserved all function analyses". /// /// Note that you must provide an explicit instantiation declaration and /// definition for this template in order to get the correct behavior on @@ -371,17 +365,18 @@ template <typename IRUnitT> AnalysisSetK extern template class AllAnalysesOn<Module>; extern template class AllAnalysesOn<Function>; -/// \brief Manages a sequence of passes over units of IR. +/// \brief Manages a sequence of passes over a particular unit of IR. /// -/// A pass manager contains a sequence of passes to run over units of IR. It is -/// itself a valid pass over that unit of IR, and when over some given IR will -/// run each pass in sequence. This is the primary and most basic building -/// block of a pass pipeline. -/// -/// If it is run with an \c AnalysisManager<IRUnitT> argument, it will propagate -/// that analysis manager to each pass it runs, as well as calling the analysis -/// manager's invalidation routine with the PreservedAnalyses of each pass it -/// runs. +/// A pass manager contains a sequence of passes to run over a particular unit +/// of IR (e.g. Functions, Modules). It is itself a valid pass over that unit of +/// IR, and when run over some given IR will run each of its contained passes in +/// sequence. Pass managers are the primary and most basic building block of a +/// pass pipeline. +/// +/// When you run a pass manager, you provide an \c AnalysisManager<IRUnitT> +/// argument. The pass manager will propagate that analysis manager to each +/// pass it runs, and will call the analysis manager's invalidation routine with +/// the PreservedAnalyses of each pass it runs. template <typename IRUnitT, typename AnalysisManagerT = AnalysisManager<IRUnitT>, typename... ExtraArgTs> @@ -390,7 +385,7 @@ class PassManager : public PassInfoMixin public: /// \brief Construct a pass manager. /// - /// It can be passed a flag to get debug logging as the passes are run. + /// If \p DebugLogging is true, we'll log our progress to llvm::dbgs(). explicit PassManager(bool DebugLogging = false) : DebugLogging(DebugLogging) {} // FIXME: These are equivalent to the default move constructor/move @@ -400,13 +395,15 @@ public: PassManager(PassManager &&Arg) : Passes(std::move(Arg.Passes)), DebugLogging(std::move(Arg.DebugLogging)) {} + PassManager &operator=(PassManager &&RHS) { Passes = std::move(RHS.Passes); DebugLogging = std::move(RHS.DebugLogging); return *this; } - /// \brief Run all of the passes in this manager over the IR. + /// \brief Run all of the passes in this manager over the given unit of IR. + /// ExtraArgs are passed to each pass. PreservedAnalyses run(IRUnitT &IR, AnalysisManagerT &AM, ExtraArgTs... ExtraArgs) { PreservedAnalyses PA = PreservedAnalyses::all(); @@ -425,7 +422,7 @@ public: // invalidates analyses. AM.invalidate(IR, PassPA); - // Finally, we intersect the preserved analyses to compute the aggregate + // Finally, intersect the preserved analyses to compute the aggregate // preserved set for this pass manager. PA.intersect(std::move(PassPA)); @@ -473,30 +470,29 @@ extern template class PassManager<Functi /// \brief Convenience typedef for a pass manager over functions. typedef PassManager<Function> FunctionPassManager; -/// \brief A generic analysis pass manager with lazy running and caching of +/// \brief A container for analyses that lazily runs them and caches their /// results. /// -/// This analysis manager can be used for any IR unit where the address of the -/// IR unit sufficies as its identity. It manages the cache for a unit of IR via -/// the address of each unit of IR cached. +/// This class can manage analyses for any IR unit where the address of the IR +/// unit sufficies as its identity. template <typename IRUnitT, typename... ExtraArgTs> class AnalysisManager { public: class Invalidator; private: - // Now that we've defined our invalidator, we can build types for the concept - // types. + // Now that we've defined our invalidator, we can define the concept types. typedef detail::AnalysisResultConcept<IRUnitT, PreservedAnalyses, Invalidator> ResultConceptT; typedef detail::AnalysisPassConcept<IRUnitT, PreservedAnalyses, Invalidator, ExtraArgTs...> PassConceptT; - /// \brief List of function analysis pass IDs and associated concept pointers. + /// \brief List of analysis pass IDs and associated concept pointers. /// *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701062024.v06KO6NB073291>