Date: Sat, 3 Jun 2017 18:18:35 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r319547 - in projects/clang500-import: contrib/compiler-rt/include/sanitizer contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/lsan contrib/compiler-rt/lib/sanitizer_common contrib/c... Message-ID: <201706031818.v53IIZAu054194@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sat Jun 3 18:18:34 2017 New Revision: 319547 URL: https://svnweb.freebsd.org/changeset/base/319547 Log: Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304659, and update build glue. Added: projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMScheduleA57.td - copied unchanged from r319534, vendor/llvm/dist/lib/Target/ARM/ARMScheduleA57.td projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMScheduleA57WriteRes.td - copied unchanged from r319534, vendor/llvm/dist/lib/Target/ARM/ARMScheduleA57WriteRes.td Deleted: projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_mapping_libcdep.cc Modified: projects/clang500-import/contrib/compiler-rt/include/sanitizer/coverage_interface.h projects/clang500-import/contrib/compiler-rt/lib/asan/asan_activation.cc projects/clang500-import/contrib/compiler-rt/lib/asan/asan_interceptors.cc projects/clang500-import/contrib/compiler-rt/lib/asan/asan_thread.cc projects/clang500-import/contrib/compiler-rt/lib/lsan/lsan_common.cc projects/clang500-import/contrib/compiler-rt/lib/lsan/lsan_common_linux.cc projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.h projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_interface.inc projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform.h projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win.cc projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_checks.inc projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.h projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_interface.inc projects/clang500-import/contrib/libc++/include/__hash_table projects/clang500-import/contrib/llvm/include/llvm/ADT/SmallVector.h projects/clang500-import/contrib/llvm/include/llvm/Analysis/OrderedBasicBlock.h projects/clang500-import/contrib/llvm/include/llvm/Analysis/RegionPass.h projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineRegionInfo.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineScheduler.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/PBQP/CostAllocator.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/PBQP/Graph.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/PBQP/Math.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/PBQP/ReductionRules.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/PBQP/Solution.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/PBQPRAConstraint.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/Passes.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/RegAllocPBQP.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/RegisterScavenging.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/StackMaps.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/TargetSchedule.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/WinEHFuncInfo.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeView.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeViewRecordIO.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolDumper.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolRecordMapping.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolSerializer.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/MSF/MappedBlockStream.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTable.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/TpiStream.h projects/clang500-import/contrib/llvm/include/llvm/IR/DIBuilder.h projects/clang500-import/contrib/llvm/include/llvm/IR/DebugLoc.h projects/clang500-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndex.h projects/clang500-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h projects/clang500-import/contrib/llvm/include/llvm/IR/Statepoint.h projects/clang500-import/contrib/llvm/include/llvm/InitializePasses.h projects/clang500-import/contrib/llvm/include/llvm/LTO/Config.h projects/clang500-import/contrib/llvm/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h projects/clang500-import/contrib/llvm/include/llvm/ObjectYAML/CodeViewYAMLSymbols.h projects/clang500-import/contrib/llvm/include/llvm/TableGen/Record.h projects/clang500-import/contrib/llvm/include/llvm/Transforms/IPO/FunctionImport.h projects/clang500-import/contrib/llvm/include/llvm/Transforms/Instrumentation.h projects/clang500-import/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h projects/clang500-import/contrib/llvm/lib/Analysis/ConstantFolding.cpp projects/clang500-import/contrib/llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp projects/clang500-import/contrib/llvm/lib/Analysis/InlineCost.cpp projects/clang500-import/contrib/llvm/lib/Analysis/LazyValueInfo.cpp projects/clang500-import/contrib/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp projects/clang500-import/contrib/llvm/lib/Analysis/OrderedBasicBlock.cpp projects/clang500-import/contrib/llvm/lib/Analysis/RegionPass.cpp projects/clang500-import/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp projects/clang500-import/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/CodeGen.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalMerge.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/LivePhysRegs.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/LiveRegUnits.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/MachineRegionInfo.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/MachineVerifier.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/RegAllocBasic.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/TargetLoweringBase.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/SymbolSerializer.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/MSF/MappedBlockStream.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/InfoStreamBuilder.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/PDBStringTable.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/TpiStream.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp projects/clang500-import/contrib/llvm/lib/IR/DIBuilder.cpp projects/clang500-import/contrib/llvm/lib/IR/DebugLoc.cpp projects/clang500-import/contrib/llvm/lib/IR/OptBisect.cpp projects/clang500-import/contrib/llvm/lib/LTO/LTO.cpp projects/clang500-import/contrib/llvm/lib/LTO/LTOBackend.cpp projects/clang500-import/contrib/llvm/lib/LTO/ThinLTOCodeGenerator.cpp projects/clang500-import/contrib/llvm/lib/MC/WasmObjectWriter.cpp projects/clang500-import/contrib/llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp projects/clang500-import/contrib/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp projects/clang500-import/contrib/llvm/lib/Passes/PassBuilder.cpp projects/clang500-import/contrib/llvm/lib/Support/Triple.cpp projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.h projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64SchedFalkorDetails.td projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPU.h projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPU.td projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIInsertWaits.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SMInstructions.td projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/VOP3Instructions.td projects/clang500-import/contrib/llvm/lib/Target/ARM/ARM.td projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMCallLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMSchedule.td projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMSubtarget.h projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/Mips/MicroMipsSizeReduction.cpp projects/clang500-import/contrib/llvm/lib/Target/WebAssembly/known_gcc_test_failures.txt projects/clang500-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Coroutines/CoroSplit.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Coroutines/Coroutines.cpp projects/clang500-import/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp projects/clang500-import/contrib/llvm/lib/Transforms/IPO/FunctionImport.cpp projects/clang500-import/contrib/llvm/lib/Transforms/IPO/LowerTypeTests.cpp projects/clang500-import/contrib/llvm/lib/Transforms/IPO/PartialInlining.cpp projects/clang500-import/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/SROA.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerializationKinds.td projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/Module.h projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.h projects/clang500-import/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td projects/clang500-import/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def projects/clang500-import/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h projects/clang500-import/contrib/llvm/tools/clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/ARCMigrate/TransformActions.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/AST/ASTStructuralEquivalence.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/AST/Expr.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Analysis/ScanfFormatString.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Basic/LangOptions.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Basic/Module.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGCoroutine.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Edit/RewriteObjCFoundationAPI.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/Rewrite/FrontendActions.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticReader.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Parse/ParseOpenMP.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Parse/Parser.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Rewrite/HTMLRewrite.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/CoroutineStmtBuilder.h projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaCoroutine.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h projects/clang500-import/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp projects/clang500-import/contrib/llvm/tools/llc/llc.cpp projects/clang500-import/contrib/llvm/tools/lld/COFF/DLL.cpp projects/clang500-import/contrib/llvm/tools/lld/COFF/DLL.h projects/clang500-import/contrib/llvm/tools/lld/COFF/Driver.cpp projects/clang500-import/contrib/llvm/tools/lld/COFF/PDB.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/LinkerScript.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/OutputSections.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/OutputSections.h projects/clang500-import/contrib/llvm/tools/lld/ELF/Writer.cpp projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/Host/Config.h.cmake projects/clang500-import/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp projects/clang500-import/contrib/llvm/tools/llvm-lto2/llvm-lto2.cpp projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/PdbYaml.cpp projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/PdbYaml.h projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/YAMLOutputStyle.cpp projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/YAMLOutputStyle.h projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp projects/clang500-import/contrib/llvm/tools/llvm-readobj/COFFDumper.cpp projects/clang500-import/contrib/llvm/utils/TableGen/X86FoldTablesEmitter.cpp projects/clang500-import/lib/clang/include/clang/Basic/Version.inc projects/clang500-import/lib/clang/include/lld/Config/Version.inc projects/clang500-import/lib/clang/include/lldb/Host/Config.h projects/clang500-import/lib/clang/include/llvm/Support/DataTypes.h projects/clang500-import/lib/clang/include/llvm/Support/VCSRevision.h projects/clang500-import/lib/libclang_rt/asan/Makefile projects/clang500-import/lib/libclang_rt/asan_dynamic/Makefile projects/clang500-import/lib/libclang_rt/stats/Makefile projects/clang500-import/lib/libclang_rt/ubsan_standalone/Makefile Directory Properties: projects/clang500-import/contrib/compiler-rt/ (props changed) projects/clang500-import/contrib/libc++/ (props changed) projects/clang500-import/contrib/llvm/ (props changed) projects/clang500-import/contrib/llvm/tools/clang/ (props changed) projects/clang500-import/contrib/llvm/tools/lld/ (props changed) projects/clang500-import/contrib/llvm/tools/lldb/ (props changed) Modified: projects/clang500-import/contrib/compiler-rt/include/sanitizer/coverage_interface.h ============================================================================== --- projects/clang500-import/contrib/compiler-rt/include/sanitizer/coverage_interface.h Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/include/sanitizer/coverage_interface.h Sat Jun 3 18:18:34 2017 (r319547) @@ -19,8 +19,6 @@ extern "C" { #endif - // Initialize coverage. - void __sanitizer_cov_init(); // Record and dump coverage info. void __sanitizer_cov_dump(); @@ -28,10 +26,6 @@ extern "C" { // .sancov files. void __sanitizer_dump_coverage(const uintptr_t *pcs, uintptr_t len); - // Open <name>.sancov.packed in the coverage directory and return the file - // descriptor. Returns -1 on failure, or if coverage dumping is disabled. - // This is intended for use by sandboxing code. - intptr_t __sanitizer_maybe_open_cov_file(const char *name); #ifdef __cplusplus } // extern "C" #endif Modified: projects/clang500-import/contrib/compiler-rt/lib/asan/asan_activation.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/asan/asan_activation.cc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/asan/asan_activation.cc Sat Jun 3 18:18:34 2017 (r319547) @@ -106,7 +106,6 @@ void AsanDeactivate() { // Deactivate the runtime. SetCanPoisonMemory(false); SetMallocContextSize(1); - ReInitializeCoverage(false, nullptr); AllocatorOptions disabled = asan_deactivated_flags.allocator_options; disabled.quarantine_size_mb = 0; @@ -130,8 +129,6 @@ void AsanActivate() { SetCanPoisonMemory(asan_deactivated_flags.poison_heap); SetMallocContextSize(asan_deactivated_flags.malloc_context_size); - ReInitializeCoverage(asan_deactivated_flags.coverage, - asan_deactivated_flags.coverage_dir); ReInitializeAllocator(asan_deactivated_flags.allocator_options); asan_is_deactivated = false; Modified: projects/clang500-import/contrib/compiler-rt/lib/asan/asan_interceptors.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/asan/asan_interceptors.cc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/asan/asan_interceptors.cc Sat Jun 3 18:18:34 2017 (r319547) @@ -242,9 +242,8 @@ DECLARE_REAL_AND_INTERCEPTOR(void, free, void *) CheckNoDeepBind(filename, flag); \ } while (false) #define COMMON_INTERCEPTOR_ON_EXIT(ctx) OnExit() -#define COMMON_INTERCEPTOR_LIBRARY_LOADED(filename, handle) \ - CoverageUpdateMapping() -#define COMMON_INTERCEPTOR_LIBRARY_UNLOADED() CoverageUpdateMapping() +#define COMMON_INTERCEPTOR_LIBRARY_LOADED(filename, handle) +#define COMMON_INTERCEPTOR_LIBRARY_UNLOADED() #define COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED (!asan_inited) #define COMMON_INTERCEPTOR_GET_TLS_RANGE(begin, end) \ if (AsanThread *t = GetCurrentThread()) { \ @@ -723,9 +722,7 @@ static void AfterFork() { INTERCEPTOR(int, fork, void) { ENSURE_ASAN_INITED(); BeforeFork(); - if (common_flags()->coverage) CovBeforeFork(); int pid = REAL(fork)(); - if (common_flags()->coverage) CovAfterFork(pid); AfterFork(); return pid; } Modified: projects/clang500-import/contrib/compiler-rt/lib/asan/asan_thread.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/asan/asan_thread.cc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/asan/asan_thread.cc Sat Jun 3 18:18:34 2017 (r319547) @@ -166,16 +166,19 @@ void AsanThread::FinishSwitchFiber(FakeStack *fake_sta } inline AsanThread::StackBounds AsanThread::GetStackBounds() const { - if (!atomic_load(&stack_switching_, memory_order_acquire)) - return StackBounds{stack_bottom_, stack_top_}; // NOLINT + if (!atomic_load(&stack_switching_, memory_order_acquire)) { + // Make sure the stack bounds are fully initialized. + if (stack_bottom_ >= stack_top_) return {0, 0}; + return {stack_bottom_, stack_top_}; + } char local; const uptr cur_stack = (uptr)&local; // Note: need to check next stack first, because FinishSwitchFiber // may be in process of overwriting stack_top_/bottom_. But in such case // we are already on the next stack. if (cur_stack >= next_stack_bottom_ && cur_stack < next_stack_top_) - return StackBounds{next_stack_bottom_, next_stack_top_}; // NOLINT - return StackBounds{stack_bottom_, stack_top_}; // NOLINT + return {next_stack_bottom_, next_stack_top_}; + return {stack_bottom_, stack_top_}; } uptr AsanThread::stack_top() { @@ -197,6 +200,7 @@ FakeStack *AsanThread::AsyncSignalSafeLazyInitFakeStac uptr stack_size = this->stack_size(); if (stack_size == 0) // stack_size is not yet available, don't use FakeStack. return nullptr; + CHECK_LE(stack_size, 0x10000000); uptr old_val = 0; // fake_stack_ has 3 states: // 0 -- not initialized Modified: projects/clang500-import/contrib/compiler-rt/lib/lsan/lsan_common.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/lsan/lsan_common.cc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/lsan/lsan_common.cc Sat Jun 3 18:18:34 2017 (r319547) @@ -408,6 +408,9 @@ static void MarkInvalidPCCb(uptr chunk, void *arg) { // On Linux, handles dynamically allocated TLS blocks by treating all chunks // allocated from ld-linux.so as reachable. +// On Linux, treats all chunks allocated from ld-linux.so as reachable, which +// covers dynamically allocated TLS blocks, internal dynamic loader's loaded +// modules accounting etc. // Dynamic TLS blocks contain the TLS variables of dynamically loaded modules. // They are allocated with a __libc_memalign() call in allocate_and_init() // (elf/dl-tls.c). Glibc won't tell us the address ranges occupied by those Modified: projects/clang500-import/contrib/compiler-rt/lib/lsan/lsan_common_linux.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/lsan/lsan_common_linux.cc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/lsan/lsan_common_linux.cc Sat Jun 3 18:18:34 2017 (r319547) @@ -23,6 +23,10 @@ #include "sanitizer_common/sanitizer_linux.h" #include "sanitizer_common/sanitizer_stackdepot.h" +#if SANITIZER_USE_GETAUXVAL +#include <sys/auxv.h> +#endif // SANITIZER_USE_GETAUXVAL + namespace __lsan { static const char kLinkerName[] = "ld"; @@ -30,8 +34,12 @@ static const char kLinkerName[] = "ld"; static char linker_placeholder[sizeof(LoadedModule)] ALIGNED(64); static LoadedModule *linker = nullptr; -static bool IsLinker(const char* full_name) { - return LibraryNameIs(full_name, kLinkerName); +static bool IsLinker(const LoadedModule& module) { +#if SANITIZER_USE_GETAUXVAL + return module.base_address() == getauxval(AT_BASE); +#else + return LibraryNameIs(module.full_name(), kLinkerName); +#endif // SANITIZER_USE_GETAUXVAL } __attribute__((tls_model("initial-exec"))) @@ -49,22 +57,25 @@ void InitializePlatformSpecificModules() { ListOfModules modules; modules.init(); for (LoadedModule &module : modules) { - if (!IsLinker(module.full_name())) continue; + if (!IsLinker(module)) + continue; if (linker == nullptr) { linker = reinterpret_cast<LoadedModule *>(linker_placeholder); *linker = module; module = LoadedModule(); } else { VReport(1, "LeakSanitizer: Multiple modules match \"%s\". " - "TLS will not be handled correctly.\n", kLinkerName); + "TLS and other allocations originating from linker might be " + "falsely reported as leaks.\n", kLinkerName); linker->clear(); linker = nullptr; return; } } if (linker == nullptr) { - VReport(1, "LeakSanitizer: Dynamic linker not found. " - "TLS will not be handled correctly.\n"); + VReport(1, "LeakSanitizer: Dynamic linker not found. TLS and other " + "allocations originating from linker might be falsely reported " + "as leaks.\n"); } } Modified: projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.h ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.h Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.h Sat Jun 3 18:18:34 2017 (r319547) @@ -317,15 +317,9 @@ bool AddressSpaceIsUnlimited(); void SetAddressSpaceUnlimited(); void AdjustStackSize(void *attr); void PrepareForSandboxing(__sanitizer_sandbox_arguments *args); -void CovPrepareForSandboxing(__sanitizer_sandbox_arguments *args); void SetSandboxingCallback(void (*f)()); -void CoverageUpdateMapping(); -void CovBeforeFork(); -void CovAfterFork(int child_pid); - void InitializeCoverage(bool enabled, const char *coverage_dir); -void ReInitializeCoverage(bool enabled, const char *coverage_dir); void InitTlsSize(); uptr GetTlsSize(); Modified: projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_interface.inc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_interface.inc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_interface.inc Sat Jun 3 18:18:34 2017 (r319547) @@ -11,7 +11,6 @@ INTERFACE_FUNCTION(__sanitizer_cov_dump) INTERFACE_FUNCTION(__sanitizer_dump_coverage) INTERFACE_FUNCTION(__sanitizer_dump_trace_pc_guard_coverage) -INTERFACE_FUNCTION(__sanitizer_maybe_open_cov_file) INTERFACE_WEAK_FUNCTION(__sancov_default_options) INTERFACE_WEAK_FUNCTION(__sanitizer_cov_trace_cmp) INTERFACE_WEAK_FUNCTION(__sanitizer_cov_trace_cmp1) Modified: projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc Sat Jun 3 18:18:34 2017 (r319547) @@ -146,6 +146,17 @@ static TracePcGuardController pc_guard_controller; } // namespace } // namespace __sancov +namespace __sanitizer { +void InitializeCoverage(bool enabled, const char *dir) { + static bool coverage_enabled = false; + if (coverage_enabled) + return; // May happen if two sanitizer enable coverage in the same process. + coverage_enabled = enabled; + Atexit(__sanitizer_cov_dump); + AddDieCallback(__sanitizer_cov_dump); +} +} // namespace __sanitizer + extern "C" { SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_dump_coverage( // NOLINT const uptr* pcs, uptr len) { @@ -166,4 +177,18 @@ SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_tra SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_dump_trace_pc_guard_coverage() { __sancov::pc_guard_controller.Dump(); } +SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_cov_dump() { + __sanitizer_dump_trace_pc_guard_coverage(); +} +// Default empty implementations (weak). Users should redefine them. +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_cmp, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_cmp1, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_cmp2, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_cmp4, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_cmp8, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_switch, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_div4, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_div8, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_gep, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_pc_indir, void) {} } // extern "C" Modified: projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc Sat Jun 3 18:18:34 2017 (r319547) @@ -138,16 +138,6 @@ COMMON_FLAG( bool, coverage, false, "If set, coverage information will be dumped at program shutdown (if the " "coverage instrumentation was enabled at compile time).") -COMMON_FLAG(bool, coverage_pcs, true, - "If set (and if 'coverage' is set too), the coverage information " - "will be dumped as a set of PC offsets for every module.") -COMMON_FLAG(bool, coverage_order_pcs, false, - "If true, the PCs will be dumped in the order they've" - " appeared during the execution.") -COMMON_FLAG(bool, coverage_direct, SANITIZER_ANDROID, - "If set, coverage information will be dumped directly to a memory " - "mapped file. This way data is not lost even if the process is " - "suddenly killed.") COMMON_FLAG(const char *, coverage_dir, ".", "Target directory for coverage dumps. Defaults to the current " "directory.") Modified: projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc Sat Jun 3 18:18:34 2017 (r319547) @@ -75,16 +75,6 @@ extern char **environ; // provided by crt1 #include <sys/signal.h> #endif -#ifndef __GLIBC_PREREQ -#define __GLIBC_PREREQ(x, y) 0 -#endif - -#if SANITIZER_LINUX && __GLIBC_PREREQ(2, 16) -# define SANITIZER_USE_GETAUXVAL 1 -#else -# define SANITIZER_USE_GETAUXVAL 0 -#endif - #if SANITIZER_USE_GETAUXVAL #include <sys/auxv.h> #endif Modified: projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform.h ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform.h Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform.h Sat Jun 3 18:18:34 2017 (r319547) @@ -269,5 +269,14 @@ # define SANITIZER_SUPPRESS_LEAK_ON_PTHREAD_EXIT 0 #endif +#ifndef __GLIBC_PREREQ +#define __GLIBC_PREREQ(x, y) 0 +#endif + +#if SANITIZER_LINUX && __GLIBC_PREREQ(2, 16) +# define SANITIZER_USE_GETAUXVAL 1 +#else +# define SANITIZER_USE_GETAUXVAL 0 +#endif #endif // SANITIZER_PLATFORM_H Modified: projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h Sat Jun 3 18:18:34 2017 (r319547) @@ -23,6 +23,9 @@ // incorporates the map structure. # define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \ ((link_map*)((handle) == nullptr ? nullptr : ((char*)(handle) + 544))) +// Get sys/_types.h, because that tells us whether 64-bit inodes are +// used in struct dirent below. +#include <sys/_types.h> #else # define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) ((link_map*)(handle)) #endif // !SANITIZER_FREEBSD @@ -489,8 +492,12 @@ namespace __sanitizer { }; #elif SANITIZER_FREEBSD struct __sanitizer_dirent { +#if defined(__INO64) unsigned long long d_fileno; unsigned long long d_off; +#else + unsigned int d_fileno; +#endif unsigned short d_reclen; // more fields that we don't care about }; Modified: projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc Sat Jun 3 18:18:34 2017 (r319547) @@ -264,7 +264,6 @@ void PrepareForSandboxing(__sanitizer_sandbox_argument // Same for /proc/self/exe in the symbolizer. #if !SANITIZER_GO Symbolizer::GetOrInit()->PrepareForSandboxing(); - CovPrepareForSandboxing(args); #endif } Modified: projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win.cc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win.cc Sat Jun 3 18:18:34 2017 (r319547) @@ -400,9 +400,6 @@ void ReExec() { } void PrepareForSandboxing(__sanitizer_sandbox_arguments *args) { -#if !SANITIZER_GO - CovPrepareForSandboxing(args); -#endif } bool StackSizeIsUnlimited() { Modified: projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_checks.inc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_checks.inc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_checks.inc Sat Jun 3 18:18:34 2017 (r319547) @@ -19,6 +19,7 @@ UBSAN_CHECK(GenericUB, "undefined-behavior", "undefined") UBSAN_CHECK(NullPointerUse, "null-pointer-use", "null") +UBSAN_CHECK(PointerOverflow, "pointer-overflow", "pointer-overflow") UBSAN_CHECK(MisalignedPointerUse, "misaligned-pointer-use", "alignment") UBSAN_CHECK(InsufficientObjectSize, "insufficient-object-size", "object-size") UBSAN_CHECK(SignedIntegerOverflow, "signed-integer-overflow", Modified: projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc Sat Jun 3 18:18:34 2017 (r319547) @@ -554,6 +554,37 @@ void __ubsan::__ubsan_handle_nullability_arg_abort(Non Die(); } +static void handlePointerOverflowImpl(PointerOverflowData *Data, + ValueHandle Base, + ValueHandle Result, + ReportOptions Opts) { + SourceLocation Loc = Data->Loc.acquire(); + ErrorType ET = ErrorType::PointerOverflow; + + if (ignoreReport(Loc, Opts, ET)) + return; + + ScopedReport R(Opts, Loc, ET); + + Diag(Loc, DL_Error, "pointer index expression with base %0 overflowed to %1") + << (void *)Base << (void*)Result; +} + +void __ubsan::__ubsan_handle_pointer_overflow(PointerOverflowData *Data, + ValueHandle Base, + ValueHandle Result) { + GET_REPORT_OPTIONS(false); + handlePointerOverflowImpl(Data, Base, Result, Opts); +} + +void __ubsan::__ubsan_handle_pointer_overflow_abort(PointerOverflowData *Data, + ValueHandle Base, + ValueHandle Result) { + GET_REPORT_OPTIONS(true); + handlePointerOverflowImpl(Data, Base, Result, Opts); + Die(); +} + static void handleCFIBadIcall(CFICheckFailData *Data, ValueHandle Function, ReportOptions Opts) { if (Data->CheckKind != CFITCK_ICall) Modified: projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.h ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.h Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.h Sat Jun 3 18:18:34 2017 (r319547) @@ -152,6 +152,13 @@ struct NonNullArgData { RECOVERABLE(nonnull_arg, NonNullArgData *Data) RECOVERABLE(nullability_arg, NonNullArgData *Data) +struct PointerOverflowData { + SourceLocation Loc; +}; + +RECOVERABLE(pointer_overflow, PointerOverflowData *Data, ValueHandle Base, + ValueHandle Result) + /// \brief Known CFI check kinds. /// Keep in sync with the enum of the same name in CodeGenFunction.h enum CFITypeCheckKind : unsigned char { Modified: projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_interface.inc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_interface.inc Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_interface.inc Sat Jun 3 18:18:34 2017 (r319547) @@ -36,6 +36,8 @@ INTERFACE_FUNCTION(__ubsan_handle_nullability_return) INTERFACE_FUNCTION(__ubsan_handle_nullability_return_abort) INTERFACE_FUNCTION(__ubsan_handle_out_of_bounds) INTERFACE_FUNCTION(__ubsan_handle_out_of_bounds_abort) +INTERFACE_FUNCTION(__ubsan_handle_pointer_overflow) +INTERFACE_FUNCTION(__ubsan_handle_pointer_overflow_abort) INTERFACE_FUNCTION(__ubsan_handle_shift_out_of_bounds) INTERFACE_FUNCTION(__ubsan_handle_shift_out_of_bounds_abort) INTERFACE_FUNCTION(__ubsan_handle_sub_overflow) Modified: projects/clang500-import/contrib/libc++/include/__hash_table ============================================================================== --- projects/clang500-import/contrib/libc++/include/__hash_table Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/libc++/include/__hash_table Sat Jun 3 18:18:34 2017 (r319547) @@ -137,7 +137,7 @@ inline _LIBCPP_INLINE_VISIBILITY size_t __next_hash_pow2(size_t __n) { - return size_t(1) << (std::numeric_limits<size_t>::digits - __clz(__n-1)); + return __n < 2 ? __n : (size_t(1) << (std::numeric_limits<size_t>::digits - __clz(__n-1))); } Modified: projects/clang500-import/contrib/llvm/include/llvm/ADT/SmallVector.h ============================================================================== --- projects/clang500-import/contrib/llvm/include/llvm/ADT/SmallVector.h Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/llvm/include/llvm/ADT/SmallVector.h Sat Jun 3 18:18:34 2017 (r319547) @@ -415,12 +415,20 @@ class SmallVectorImpl : public SmallVectorTemplateBase append(IL.begin(), IL.end()); } + // FIXME: Consider assigning over existing elements, rather than clearing & + // re-initializing them - for all assign(...) variants. + void assign(size_type NumElts, const T &Elt) { clear(); if (this->capacity() < NumElts) this->grow(NumElts); this->setEnd(this->begin()+NumElts); std::uninitialized_fill(this->begin(), this->end(), Elt); + } + + template <typename in_iter> void assign(in_iter in_start, in_iter in_end) { + clear(); + append(in_start, in_end); } void assign(std::initializer_list<T> IL) { Modified: projects/clang500-import/contrib/llvm/include/llvm/Analysis/OrderedBasicBlock.h ============================================================================== --- projects/clang500-import/contrib/llvm/include/llvm/Analysis/OrderedBasicBlock.h Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/llvm/include/llvm/Analysis/OrderedBasicBlock.h Sat Jun 3 18:18:34 2017 (r319547) @@ -58,6 +58,7 @@ class OrderedBasicBlock { (public) /// comes before \p B in \p BB. This is a simplification that considers /// cached instruction positions and ignores other basic blocks, being /// only relevant to compare relative instructions positions inside \p BB. + /// Returns false for A == B. bool dominates(const Instruction *A, const Instruction *B); }; Modified: projects/clang500-import/contrib/llvm/include/llvm/Analysis/RegionPass.h ============================================================================== --- projects/clang500-import/contrib/llvm/include/llvm/Analysis/RegionPass.h Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/llvm/include/llvm/Analysis/RegionPass.h Sat Jun 3 18:18:34 2017 (r319547) @@ -78,6 +78,11 @@ class RegionPass : public Pass { (public) return PMT_RegionPassManager; } //@} + +protected: + /// Optional passes call this function to check whether the pass should be + /// skipped. This is the case when optimization bisect is over the limit. + bool skipRegion(Region &R) const; }; /// @brief The pass manager to schedule RegionPasses. Modified: projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h ============================================================================== --- projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h Sat Jun 3 18:18:34 2017 (r319547) @@ -636,7 +636,7 @@ class ScalarEvolution { (private) /// @} public: - BackedgeTakenInfo() : MaxAndComplete(nullptr, 0) {} + BackedgeTakenInfo() : MaxAndComplete(nullptr, 0), MaxOrZero(false) {} BackedgeTakenInfo(BackedgeTakenInfo &&) = default; BackedgeTakenInfo &operator=(BackedgeTakenInfo &&) = default; Modified: projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineRegionInfo.h ============================================================================== --- projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineRegionInfo.h Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineRegionInfo.h Sat Jun 3 18:18:34 2017 (r319547) @@ -10,83 +10,77 @@ #ifndef LLVM_CODEGEN_MACHINEREGIONINFO_H #define LLVM_CODEGEN_MACHINEREGIONINFO_H +#include "llvm/ADT/DepthFirstIterator.h" #include "llvm/Analysis/RegionInfo.h" #include "llvm/Analysis/RegionIterator.h" +#include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineDominanceFrontier.h" #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineLoopInfo.h" +#include <cassert> - namespace llvm { -class MachineDominatorTree; struct MachinePostDominatorTree; class MachineRegion; class MachineRegionNode; class MachineRegionInfo; -template<> -struct RegionTraits<MachineFunction> { - typedef MachineFunction FuncT; - typedef MachineBasicBlock BlockT; - typedef MachineRegion RegionT; - typedef MachineRegionNode RegionNodeT; - typedef MachineRegionInfo RegionInfoT; - typedef MachineDominatorTree DomTreeT; - typedef MachineDomTreeNode DomTreeNodeT; - typedef MachinePostDominatorTree PostDomTreeT; - typedef MachineDominanceFrontier DomFrontierT; - typedef MachineInstr InstT; - typedef MachineLoop LoopT; - typedef MachineLoopInfo LoopInfoT; +template <> struct RegionTraits<MachineFunction> { + using FuncT = MachineFunction; + using BlockT = MachineBasicBlock; + using RegionT = MachineRegion; + using RegionNodeT = MachineRegionNode; + using RegionInfoT = MachineRegionInfo; + using DomTreeT = MachineDominatorTree; + using DomTreeNodeT = MachineDomTreeNode; + using PostDomTreeT = MachinePostDominatorTree; + using DomFrontierT = MachineDominanceFrontier; + using InstT = MachineInstr; + using LoopT = MachineLoop; + using LoopInfoT = MachineLoopInfo; static unsigned getNumSuccessors(MachineBasicBlock *BB) { return BB->succ_size(); } }; - class MachineRegionNode : public RegionNodeBase<RegionTraits<MachineFunction>> { public: - inline MachineRegionNode(MachineRegion *Parent, - MachineBasicBlock *Entry, + inline MachineRegionNode(MachineRegion *Parent, MachineBasicBlock *Entry, bool isSubRegion = false) - : RegionNodeBase<RegionTraits<MachineFunction>>(Parent, Entry, isSubRegion) { + : RegionNodeBase<RegionTraits<MachineFunction>>(Parent, Entry, + isSubRegion) {} - } - bool operator==(const MachineRegion &RN) const { - return this == reinterpret_cast<const MachineRegionNode*>(&RN); + return this == reinterpret_cast<const MachineRegionNode *>(&RN); } }; class MachineRegion : public RegionBase<RegionTraits<MachineFunction>> { public: MachineRegion(MachineBasicBlock *Entry, MachineBasicBlock *Exit, - MachineRegionInfo* RI, - MachineDominatorTree *DT, MachineRegion *Parent = nullptr); + MachineRegionInfo *RI, MachineDominatorTree *DT, + MachineRegion *Parent = nullptr); ~MachineRegion(); bool operator==(const MachineRegionNode &RN) const { - return &RN == reinterpret_cast<const MachineRegionNode*>(this); + return &RN == reinterpret_cast<const MachineRegionNode *>(this); } }; class MachineRegionInfo : public RegionInfoBase<RegionTraits<MachineFunction>> { public: explicit MachineRegionInfo(); - ~MachineRegionInfo() override; // updateStatistics - Update statistic about created regions. void updateStatistics(MachineRegion *R) final; - void recalculate(MachineFunction &F, - MachineDominatorTree *DT, - MachinePostDominatorTree *PDT, - MachineDominanceFrontier *DF); + void recalculate(MachineFunction &F, MachineDominatorTree *DT, + MachinePostDominatorTree *PDT, MachineDominanceFrontier *DF); }; class MachineRegionInfoPass : public MachineFunctionPass { @@ -94,17 +88,13 @@ class MachineRegionInfoPass : public MachineFunctionPa public: static char ID; - explicit MachineRegionInfoPass(); + explicit MachineRegionInfoPass(); ~MachineRegionInfoPass() override; - MachineRegionInfo &getRegionInfo() { - return RI; - } + MachineRegionInfo &getRegionInfo() { return RI; } - const MachineRegionInfo &getRegionInfo() const { - return RI; - } + const MachineRegionInfo &getRegionInfo() const { return RI; } /// @name MachineFunctionPass interface //@{ @@ -117,66 +107,76 @@ class MachineRegionInfoPass : public MachineFunctionPa //@} }; - template <> template <> -inline MachineBasicBlock* RegionNodeBase<RegionTraits<MachineFunction>>::getNodeAs<MachineBasicBlock>() const { +inline MachineBasicBlock * +RegionNodeBase<RegionTraits<MachineFunction>>::getNodeAs<MachineBasicBlock>() + const { assert(!isSubRegion() && "This is not a MachineBasicBlock RegionNode!"); return getEntry(); } -template<> -template<> -inline MachineRegion* RegionNodeBase<RegionTraits<MachineFunction>>::getNodeAs<MachineRegion>() const { +template <> +template <> +inline MachineRegion * +RegionNodeBase<RegionTraits<MachineFunction>>::getNodeAs<MachineRegion>() + const { assert(isSubRegion() && "This is not a subregion RegionNode!"); - auto Unconst = const_cast<RegionNodeBase<RegionTraits<MachineFunction>>*>(this); - return reinterpret_cast<MachineRegion*>(Unconst); + auto Unconst = + const_cast<RegionNodeBase<RegionTraits<MachineFunction>> *>(this); + return reinterpret_cast<MachineRegion *>(Unconst); } - RegionNodeGraphTraits(MachineRegionNode, MachineBasicBlock, MachineRegion); -RegionNodeGraphTraits(const MachineRegionNode, MachineBasicBlock, MachineRegion); +RegionNodeGraphTraits(const MachineRegionNode, MachineBasicBlock, + MachineRegion); RegionGraphTraits(MachineRegion, MachineRegionNode); RegionGraphTraits(const MachineRegion, const MachineRegionNode); -template <> struct GraphTraits<MachineRegionInfo*> - : public GraphTraits<FlatIt<MachineRegionNode*> > { - typedef df_iterator<NodeRef, df_iterator_default_set<NodeRef>, false, - GraphTraits<FlatIt<NodeRef>>> - nodes_iterator; +template <> +struct GraphTraits<MachineRegionInfo *> + : public GraphTraits<FlatIt<MachineRegionNode *>> { + using nodes_iterator = df_iterator<NodeRef, df_iterator_default_set<NodeRef>, + false, GraphTraits<FlatIt<NodeRef>>>; static NodeRef getEntryNode(MachineRegionInfo *RI) { - return GraphTraits<FlatIt<MachineRegion*> >::getEntryNode(RI->getTopLevelRegion()); + return GraphTraits<FlatIt<MachineRegion *>>::getEntryNode( + RI->getTopLevelRegion()); } - static nodes_iterator nodes_begin(MachineRegionInfo* RI) { + + static nodes_iterator nodes_begin(MachineRegionInfo *RI) { return nodes_iterator::begin(getEntryNode(RI)); } + static nodes_iterator nodes_end(MachineRegionInfo *RI) { return nodes_iterator::end(getEntryNode(RI)); } }; -template <> struct GraphTraits<MachineRegionInfoPass*> - : public GraphTraits<MachineRegionInfo *> { - typedef df_iterator<NodeRef, df_iterator_default_set<NodeRef>, false, - GraphTraits<FlatIt<NodeRef>>> - nodes_iterator; +template <> +struct GraphTraits<MachineRegionInfoPass *> + : public GraphTraits<MachineRegionInfo *> { + using nodes_iterator = df_iterator<NodeRef, df_iterator_default_set<NodeRef>, + false, GraphTraits<FlatIt<NodeRef>>>; static NodeRef getEntryNode(MachineRegionInfoPass *RI) { - return GraphTraits<MachineRegionInfo*>::getEntryNode(&RI->getRegionInfo()); + return GraphTraits<MachineRegionInfo *>::getEntryNode(&RI->getRegionInfo()); } - static nodes_iterator nodes_begin(MachineRegionInfoPass* RI) { - return GraphTraits<MachineRegionInfo*>::nodes_begin(&RI->getRegionInfo()); + + static nodes_iterator nodes_begin(MachineRegionInfoPass *RI) { + return GraphTraits<MachineRegionInfo *>::nodes_begin(&RI->getRegionInfo()); } + static nodes_iterator nodes_end(MachineRegionInfoPass *RI) { - return GraphTraits<MachineRegionInfo*>::nodes_end(&RI->getRegionInfo()); + return GraphTraits<MachineRegionInfo *>::nodes_end(&RI->getRegionInfo()); } }; extern template class RegionBase<RegionTraits<MachineFunction>>; extern template class RegionNodeBase<RegionTraits<MachineFunction>>; extern template class RegionInfoBase<RegionTraits<MachineFunction>>; -} -#endif +} // end namespace llvm + +#endif // LLVM_CODEGEN_MACHINEREGIONINFO_H Modified: projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h ============================================================================== --- projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h Sat Jun 3 18:12:00 2017 (r319546) +++ projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h Sat Jun 3 18:18:34 2017 (r319547) @@ -14,11 +14,13 @@ #ifndef LLVM_CODEGEN_MACHINEREGISTERINFO_H #define LLVM_CODEGEN_MACHINEREGISTERINFO_H +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IndexedMap.h" #include "llvm/ADT/iterator_range.h" #include "llvm/ADT/PointerUnion.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/GlobalISel/RegisterBank.h" #include "llvm/CodeGen/LowLevelType.h" #include "llvm/CodeGen/MachineBasicBlock.h" @@ -41,8 +43,8 @@ namespace llvm { class PSetIterator; /// Convenient type to represent either a register class or a register bank. -typedef PointerUnion<const TargetRegisterClass *, const RegisterBank *> - RegClassOrRegBank; +using RegClassOrRegBank = + PointerUnion<const TargetRegisterClass *, const RegisterBank *>; /// MachineRegisterInfo - Keep track of information for virtual and physical /// registers, including vreg register classes, use/def chains for registers, @@ -125,7 +127,7 @@ class MachineRegisterInfo { (private) /// started. BitVector ReservedRegs; - typedef DenseMap<unsigned, LLT> VRegToTypeMap; + using VRegToTypeMap = DenseMap<unsigned, LLT>; /// Map generic virtual registers to their actual size. mutable std::unique_ptr<VRegToTypeMap> VRegToType; @@ -266,8 +268,8 @@ class MachineRegisterInfo { (private) /// reg_iterator/reg_begin/reg_end - Walk all defs and uses of the specified /// register. - typedef defusechain_iterator<true,true,false,true,false,false> - reg_iterator; + using reg_iterator = + defusechain_iterator<true, true, false, true, false, false>; reg_iterator reg_begin(unsigned RegNo) const { return reg_iterator(getRegUseDefListHead(RegNo)); } @@ -279,8 +281,8 @@ class MachineRegisterInfo { (private) /// reg_instr_iterator/reg_instr_begin/reg_instr_end - Walk all defs and uses /// of the specified register, stepping by MachineInstr. - typedef defusechain_instr_iterator<true,true,false,false,true,false> - reg_instr_iterator; + using reg_instr_iterator = + defusechain_instr_iterator<true, true, false, false, true, false>; reg_instr_iterator reg_instr_begin(unsigned RegNo) const { return reg_instr_iterator(getRegUseDefListHead(RegNo)); } @@ -295,8 +297,8 @@ class MachineRegisterInfo { (private) /// reg_bundle_iterator/reg_bundle_begin/reg_bundle_end - Walk all defs and uses /// of the specified register, stepping by bundle. - typedef defusechain_instr_iterator<true,true,false,false,false,true> - reg_bundle_iterator; + using reg_bundle_iterator = + defusechain_instr_iterator<true, true, false, false, false, true>; reg_bundle_iterator reg_bundle_begin(unsigned RegNo) const { return reg_bundle_iterator(getRegUseDefListHead(RegNo)); } @@ -314,8 +316,8 @@ class MachineRegisterInfo { (private) /// reg_nodbg_iterator/reg_nodbg_begin/reg_nodbg_end - Walk all defs and uses /// of the specified register, skipping those marked as Debug. - typedef defusechain_iterator<true,true,true,true,false,false> - reg_nodbg_iterator; + using reg_nodbg_iterator = + defusechain_iterator<true, true, true, true, false, false>; reg_nodbg_iterator reg_nodbg_begin(unsigned RegNo) const { return reg_nodbg_iterator(getRegUseDefListHead(RegNo)); } @@ -331,8 +333,8 @@ class MachineRegisterInfo { (private) /// reg_instr_nodbg_iterator/reg_instr_nodbg_begin/reg_instr_nodbg_end - Walk /// all defs and uses of the specified register, stepping by MachineInstr, /// skipping those marked as Debug. - typedef defusechain_instr_iterator<true,true,true,false,true,false> - reg_instr_nodbg_iterator; + using reg_instr_nodbg_iterator = + defusechain_instr_iterator<true, true, true, false, true, false>; reg_instr_nodbg_iterator reg_instr_nodbg_begin(unsigned RegNo) const { return reg_instr_nodbg_iterator(getRegUseDefListHead(RegNo)); } @@ -348,8 +350,8 @@ class MachineRegisterInfo { (private) /// reg_bundle_nodbg_iterator/reg_bundle_nodbg_begin/reg_bundle_nodbg_end - Walk /// all defs and uses of the specified register, stepping by bundle, /// skipping those marked as Debug. - typedef defusechain_instr_iterator<true,true,true,false,false,true> - reg_bundle_nodbg_iterator; + using reg_bundle_nodbg_iterator = + defusechain_instr_iterator<true, true, true, false, false, true>; reg_bundle_nodbg_iterator reg_bundle_nodbg_begin(unsigned RegNo) const { return reg_bundle_nodbg_iterator(getRegUseDefListHead(RegNo)); } @@ -369,8 +371,8 @@ class MachineRegisterInfo { (private) } /// def_iterator/def_begin/def_end - Walk all defs of the specified register. - typedef defusechain_iterator<false,true,false,true,false,false> - def_iterator; + using def_iterator = + defusechain_iterator<false, true, false, true, false, false>; def_iterator def_begin(unsigned RegNo) const { return def_iterator(getRegUseDefListHead(RegNo)); } @@ -382,8 +384,8 @@ class MachineRegisterInfo { (private) /// def_instr_iterator/def_instr_begin/def_instr_end - Walk all defs of the /// specified register, stepping by MachineInst. - typedef defusechain_instr_iterator<false,true,false,false,true,false> - def_instr_iterator; + using def_instr_iterator = + defusechain_instr_iterator<false, true, false, false, true, false>; def_instr_iterator def_instr_begin(unsigned RegNo) const { return def_instr_iterator(getRegUseDefListHead(RegNo)); } @@ -398,8 +400,8 @@ class MachineRegisterInfo { (private) /// def_bundle_iterator/def_bundle_begin/def_bundle_end - Walk all defs of the /// specified register, stepping by bundle. - typedef defusechain_instr_iterator<false,true,false,false,false,true> - def_bundle_iterator; + using def_bundle_iterator = + defusechain_instr_iterator<false, true, false, false, false, true>; def_bundle_iterator def_bundle_begin(unsigned RegNo) const { return def_bundle_iterator(getRegUseDefListHead(RegNo)); } @@ -425,8 +427,8 @@ class MachineRegisterInfo { (private) } /// use_iterator/use_begin/use_end - Walk all uses of the specified register. - typedef defusechain_iterator<true,false,false,true,false,false> - use_iterator; + using use_iterator = + defusechain_iterator<true, false, false, true, false, false>; use_iterator use_begin(unsigned RegNo) const { return use_iterator(getRegUseDefListHead(RegNo)); } @@ -438,8 +440,8 @@ class MachineRegisterInfo { (private) /// use_instr_iterator/use_instr_begin/use_instr_end - Walk all uses of the /// specified register, stepping by MachineInstr. - typedef defusechain_instr_iterator<true,false,false,false,true,false> - use_instr_iterator; + using use_instr_iterator = + defusechain_instr_iterator<true, false, false, false, true, false>; use_instr_iterator use_instr_begin(unsigned RegNo) const { return use_instr_iterator(getRegUseDefListHead(RegNo)); } @@ -454,8 +456,8 @@ class MachineRegisterInfo { (private) /// use_bundle_iterator/use_bundle_begin/use_bundle_end - Walk all uses of the /// specified register, stepping by bundle. - typedef defusechain_instr_iterator<true,false,false,false,false,true> - use_bundle_iterator; + using use_bundle_iterator = + defusechain_instr_iterator<true, false, false, false, false, true>; use_bundle_iterator use_bundle_begin(unsigned RegNo) const { return use_bundle_iterator(getRegUseDefListHead(RegNo)); } @@ -482,8 +484,8 @@ class MachineRegisterInfo { (private) /// use_nodbg_iterator/use_nodbg_begin/use_nodbg_end - Walk all uses of the /// specified register, skipping those marked as Debug. - typedef defusechain_iterator<true,false,true,true,false,false> - use_nodbg_iterator; + using use_nodbg_iterator = + defusechain_iterator<true, false, true, true, false, false>; use_nodbg_iterator use_nodbg_begin(unsigned RegNo) const { return use_nodbg_iterator(getRegUseDefListHead(RegNo)); } @@ -499,8 +501,8 @@ class MachineRegisterInfo { (private) /// use_instr_nodbg_iterator/use_instr_nodbg_begin/use_instr_nodbg_end - Walk /// all uses of the specified register, stepping by MachineInstr, skipping /// those marked as Debug. - typedef defusechain_instr_iterator<true,false,true,false,true,false> - use_instr_nodbg_iterator; + using use_instr_nodbg_iterator = + defusechain_instr_iterator<true, false, true, false, true, false>; use_instr_nodbg_iterator use_instr_nodbg_begin(unsigned RegNo) const { return use_instr_nodbg_iterator(getRegUseDefListHead(RegNo)); } @@ -516,8 +518,8 @@ class MachineRegisterInfo { (private) /// use_bundle_nodbg_iterator/use_bundle_nodbg_begin/use_bundle_nodbg_end - Walk /// all uses of the specified register, stepping by bundle, skipping /// those marked as Debug. - typedef defusechain_instr_iterator<true,false,true,false,false,true> - use_bundle_nodbg_iterator; + using use_bundle_nodbg_iterator = + defusechain_instr_iterator<true, false, true, false, false, true>; use_bundle_nodbg_iterator use_bundle_nodbg_begin(unsigned RegNo) const { return use_bundle_nodbg_iterator(getRegUseDefListHead(RegNo)); } @@ -593,7 +595,6 @@ class MachineRegisterInfo { (private) /// Return the register class of the specified virtual register. /// This shouldn't be used directly unless \p Reg has a register class. /// \see getRegClassOrNull when this might happen. - /// const TargetRegisterClass *getRegClass(unsigned Reg) const { assert(VRegInfo[Reg].first.is<const TargetRegisterClass *>() && "Register class not set, wrong accessor"); @@ -620,7 +621,6 @@ class MachineRegisterInfo { (private) /// a register bank or has been assigned a register class. /// \note It is possible to get the register bank from the register class via /// RegisterBankInfo::getRegBankFromRegClass. - /// const RegisterBank *getRegBankOrNull(unsigned Reg) const { const RegClassOrRegBank &Val = VRegInfo[Reg].first; return Val.dyn_cast<const RegisterBank *>(); @@ -629,17 +629,14 @@ class MachineRegisterInfo { (private) /// Return the register bank or register class of \p Reg. /// \note Before the register bank gets assigned (i.e., before the /// RegBankSelect pass) \p Reg may not have either. - /// const RegClassOrRegBank &getRegClassOrRegBank(unsigned Reg) const { return VRegInfo[Reg].first; } /// setRegClass - Set the register class of the specified virtual register. - /// void setRegClass(unsigned Reg, const TargetRegisterClass *RC); /// Set the register bank to \p RegBank for \p Reg. - /// void setRegBank(unsigned Reg, const RegisterBank &RegBank); void setRegClassOrRegBank(unsigned Reg, @@ -653,7 +650,6 @@ class MachineRegisterInfo { (private) /// new register class, or NULL if no such class exists. /// This should only be used when the constraint is known to be trivial, like /// GR32 -> GR32_NOSP. Beware of increasing register pressure. - /// const TargetRegisterClass *constrainRegClass(unsigned Reg, const TargetRegisterClass *RC, unsigned MinNumRegs = 0); @@ -665,12 +661,10 @@ class MachineRegisterInfo { (private) /// This method can be used after constraints have been removed from a /// virtual register, for example after removing instructions or splitting /// the live range. - /// bool recomputeRegClass(unsigned Reg); /// createVirtualRegister - Create and return a new virtual register in the /// function with the specified register class. - /// unsigned createVirtualRegister(const TargetRegisterClass *RegClass); /// Accessor for VRegToType. This accessor should only be used @@ -704,7 +698,6 @@ class MachineRegisterInfo { (private) unsigned createIncompleteVirtualRegister(); /// getNumVirtRegs - Return the number of virtual registers created. - /// unsigned getNumVirtRegs() const { return VRegInfo.size(); } /// clearVirtRegs - Remove all virtual registers (after physreg assignment). @@ -810,7 +803,6 @@ class MachineRegisterInfo { (private) /// /// Reserved registers may belong to an allocatable register class, but the /// target has explicitly requested that they are not used. - /// bool isReserved(unsigned PhysReg) const { return getReservedRegs().test(PhysReg); } @@ -838,8 +830,8 @@ class MachineRegisterInfo { (private) // Iteration support for the live-ins set. It's kept in sorted order // by register number. - typedef std::vector<std::pair<unsigned,unsigned>>::const_iterator - livein_iterator; + using livein_iterator = + std::vector<std::pair<unsigned,unsigned>>::const_iterator; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706031818.v53IIZAu054194>