Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2017 21:48:54 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r317230 - in projects/clang500-import: contrib/llvm/include/llvm contrib/llvm/include/llvm-c contrib/llvm/include/llvm/ADT contrib/llvm/include/llvm/Analysis contrib/llvm/include/llvm/B...
Message-ID:  <201704202148.v3KLms0M014554@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Thu Apr 20 21:48:54 2017
New Revision: 317230
URL: https://svnweb.freebsd.org/changeset/base/317230

Log:
  Merge llvm, clang, lld and lldb trunk r300890, and update build glue.

Added:
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/AttrSubjectMatchRules.h
     - copied unchanged from r317229, vendor/clang/dist/include/clang/Basic/AttrSubjectMatchRules.h
Modified:
  projects/clang500-import/contrib/llvm/include/llvm-c/Core.h
  projects/clang500-import/contrib/llvm/include/llvm-c/Types.h
  projects/clang500-import/contrib/llvm/include/llvm/ADT/APInt.h
  projects/clang500-import/contrib/llvm/include/llvm/ADT/BitVector.h
  projects/clang500-import/contrib/llvm/include/llvm/ADT/SmallBitVector.h
  projects/clang500-import/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
  projects/clang500-import/contrib/llvm/include/llvm/Analysis/DominanceFrontierImpl.h
  projects/clang500-import/contrib/llvm/include/llvm/Analysis/LoopInfo.h
  projects/clang500-import/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h
  projects/clang500-import/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h
  projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h
  projects/clang500-import/contrib/llvm/include/llvm/Bitcode/BitcodeReader.h
  projects/clang500-import/contrib/llvm/include/llvm/Bitcode/BitcodeWriter.h
  projects/clang500-import/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h
  projects/clang500-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h
  projects/clang500-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/Utils.h
  projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineInstrBuilder.h
  projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineValueType.h
  projects/clang500-import/contrib/llvm/include/llvm/CodeGen/ValueTypes.h
  projects/clang500-import/contrib/llvm/include/llvm/CodeGen/ValueTypes.td
  projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h
  projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
  projects/clang500-import/contrib/llvm/include/llvm/IR/Argument.h
  projects/clang500-import/contrib/llvm/include/llvm/IR/Attributes.h
  projects/clang500-import/contrib/llvm/include/llvm/IR/ConstantRange.h
  projects/clang500-import/contrib/llvm/include/llvm/IR/DIBuilder.h
  projects/clang500-import/contrib/llvm/include/llvm/IR/DebugInfoMetadata.h
  projects/clang500-import/contrib/llvm/include/llvm/IR/Instructions.h
  projects/clang500-import/contrib/llvm/include/llvm/IR/Metadata.h
  projects/clang500-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndex.h
  projects/clang500-import/contrib/llvm/include/llvm/IR/PatternMatch.h
  projects/clang500-import/contrib/llvm/include/llvm/IR/Use.h
  projects/clang500-import/contrib/llvm/include/llvm/MC/MCAsmInfo.h
  projects/clang500-import/contrib/llvm/include/llvm/MC/MCStreamer.h
  projects/clang500-import/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h
  projects/clang500-import/contrib/llvm/include/llvm/Object/Archive.h
  projects/clang500-import/contrib/llvm/include/llvm/Object/Binary.h
  projects/clang500-import/contrib/llvm/include/llvm/Object/COFF.h
  projects/clang500-import/contrib/llvm/include/llvm/Object/IRSymtab.h
  projects/clang500-import/contrib/llvm/include/llvm/Object/ObjectFile.h
  projects/clang500-import/contrib/llvm/include/llvm/Object/SymbolicFile.h
  projects/clang500-import/contrib/llvm/include/llvm/ObjectYAML/DWARFYAML.h
  projects/clang500-import/contrib/llvm/include/llvm/PassSupport.h
  projects/clang500-import/contrib/llvm/include/llvm/Support/ARMTargetParser.def
  projects/clang500-import/contrib/llvm/include/llvm/Support/ArrayRecycler.h
  projects/clang500-import/contrib/llvm/include/llvm/Support/BinaryStreamArray.h
  projects/clang500-import/contrib/llvm/include/llvm/Support/Dwarf.def
  projects/clang500-import/contrib/llvm/include/llvm/Support/Dwarf.h
  projects/clang500-import/contrib/llvm/include/llvm/Support/GenericDomTree.h
  projects/clang500-import/contrib/llvm/include/llvm/Support/GraphWriter.h
  projects/clang500-import/contrib/llvm/include/llvm/Support/LowLevelTypeImpl.h
  projects/clang500-import/contrib/llvm/include/llvm/Support/MathExtras.h
  projects/clang500-import/contrib/llvm/include/llvm/Support/Recycler.h
  projects/clang500-import/contrib/llvm/include/llvm/Support/Regex.h
  projects/clang500-import/contrib/llvm/include/llvm/Support/TargetParser.h
  projects/clang500-import/contrib/llvm/include/llvm/TableGen/StringToOffsetTable.h
  projects/clang500-import/contrib/llvm/include/llvm/Target/TargetLowering.h
  projects/clang500-import/contrib/llvm/include/llvm/Transforms/Utils/CodeExtractor.h
  projects/clang500-import/contrib/llvm/include/llvm/XRay/InstrumentationMap.h
  projects/clang500-import/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp
  projects/clang500-import/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Analysis/CFLGraph.h
  projects/clang500-import/contrib/llvm/lib/Analysis/InstructionSimplify.cpp
  projects/clang500-import/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp
  projects/clang500-import/contrib/llvm/lib/Analysis/MemorySSA.cpp
  projects/clang500-import/contrib/llvm/lib/Analysis/ScalarEvolution.cpp
  projects/clang500-import/contrib/llvm/lib/Analysis/ValueTracking.cpp
  projects/clang500-import/contrib/llvm/lib/AsmParser/LLParser.cpp
  projects/clang500-import/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
  projects/clang500-import/contrib/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
  projects/clang500-import/contrib/llvm/lib/Bitcode/Reader/MetadataLoader.h
  projects/clang500-import/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
  projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalISel/Utils.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/InlineSpiller.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/LowLevelType.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/MachineInstr.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/MachineVerifier.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/RegAllocFast.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/SafeStack.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
  projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  projects/clang500-import/contrib/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
  projects/clang500-import/contrib/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
  projects/clang500-import/contrib/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
  projects/clang500-import/contrib/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
  projects/clang500-import/contrib/llvm/lib/IR/Attributes.cpp
  projects/clang500-import/contrib/llvm/lib/IR/ConstantFold.cpp
  projects/clang500-import/contrib/llvm/lib/IR/ConstantRange.cpp
  projects/clang500-import/contrib/llvm/lib/IR/Constants.cpp
  projects/clang500-import/contrib/llvm/lib/IR/Core.cpp
  projects/clang500-import/contrib/llvm/lib/IR/DataLayout.cpp
  projects/clang500-import/contrib/llvm/lib/IR/Function.cpp
  projects/clang500-import/contrib/llvm/lib/IR/Instructions.cpp
  projects/clang500-import/contrib/llvm/lib/MC/MCDwarf.cpp
  projects/clang500-import/contrib/llvm/lib/MC/MCParser/AsmParser.cpp
  projects/clang500-import/contrib/llvm/lib/Object/Archive.cpp
  projects/clang500-import/contrib/llvm/lib/Object/Binary.cpp
  projects/clang500-import/contrib/llvm/lib/Object/COFFObjectFile.cpp
  projects/clang500-import/contrib/llvm/lib/Object/IRSymtab.cpp
  projects/clang500-import/contrib/llvm/lib/Object/ObjectFile.cpp
  projects/clang500-import/contrib/llvm/lib/Object/SymbolicFile.cpp
  projects/clang500-import/contrib/llvm/lib/Support/APFloat.cpp
  projects/clang500-import/contrib/llvm/lib/Support/APInt.cpp
  projects/clang500-import/contrib/llvm/lib/Support/CommandLine.cpp
  projects/clang500-import/contrib/llvm/lib/Support/Dwarf.cpp
  projects/clang500-import/contrib/llvm/lib/Support/LowLevelType.cpp
  projects/clang500-import/contrib/llvm/lib/Support/Regex.cpp
  projects/clang500-import/contrib/llvm/lib/Support/TargetParser.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h
  projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td
  projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64SchedFalkorDetails.td
  projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h
  projects/clang500-import/contrib/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h
  projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
  projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/DSInstructions.td
  projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
  projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARM.td
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMCallingConv.td
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMISelLowering.h
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMInstructionSelector.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMRegisterBankInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMSubtarget.h
  projects/clang500-import/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp
  projects/clang500-import/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
  projects/clang500-import/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h
  projects/clang500-import/contrib/llvm/lib/Target/Hexagon/BitTracker.cpp
  projects/clang500-import/contrib/llvm/lib/Target/Hexagon/BitTracker.h
  projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
  projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.h
  projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp
  projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
  projects/clang500-import/contrib/llvm/lib/Target/Hexagon/RDFCopy.cpp
  projects/clang500-import/contrib/llvm/lib/Target/Hexagon/RDFGraph.h
  projects/clang500-import/contrib/llvm/lib/Target/Hexagon/RDFRegisters.cpp
  projects/clang500-import/contrib/llvm/lib/Target/Hexagon/RDFRegisters.h
  projects/clang500-import/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/Mips/MipsMSAInstrInfo.td
  projects/clang500-import/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp
  projects/clang500-import/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
  projects/clang500-import/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  projects/clang500-import/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCAsmInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
  projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.h
  projects/clang500-import/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp
  projects/clang500-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeReturned.cpp
  projects/clang500-import/contrib/llvm/lib/Target/WebAssembly/known_gcc_test_failures.txt
  projects/clang500-import/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp
  projects/clang500-import/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
  projects/clang500-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp
  projects/clang500-import/contrib/llvm/lib/Target/X86/X86ISelLowering.h
  projects/clang500-import/contrib/llvm/lib/Target/X86/X86InstructionSelector.cpp
  projects/clang500-import/contrib/llvm/lib/Target/X86/X86RegisterBankInfo.cpp
  projects/clang500-import/contrib/llvm/lib/Target/X86/X86RegisterInfo.h
  projects/clang500-import/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/IPO/SampleProfile.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/GVNHoist.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/NewGVN.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Utils/CmpInstAnalysis.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Utils/Local.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  projects/clang500-import/contrib/llvm/lib/Transforms/Utils/VNCoercion.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/AST/Decl.h
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/AST/StmtOpenMP.h
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/Attr.td
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Driver/Options.td
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Index/IndexSymbol.h
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Lex/Token.h
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Parse/Parser.h
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h
  projects/clang500-import/contrib/llvm/tools/clang/include/clang/Sema/Sema.h
  projects/clang500-import/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/AST/Decl.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/AST/ExternalASTMerger.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/AST/StmtOpenMP.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Basic/Attributes.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Basic/OpenMPKinds.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypeCache.h
  projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/CommonArgs.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/CommonArgs.h
  projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Gnu.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/MinGW.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/MinGW.h
  projects/clang500-import/contrib/llvm/tools/clang/lib/Format/FormatTokenLexer.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Headers/smmintrin.h
  projects/clang500-import/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h
  projects/clang500-import/contrib/llvm/tools/clang/lib/Index/CommentToXML.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Index/IndexDecl.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Index/IndexSymbol.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Index/IndexTypeSourceInfo.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Index/IndexingContext.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Index/IndexingContext.h
  projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Parse/Parser.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/AttributeList.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/Sema.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaChecking.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/SemaDeclAttr.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp
  projects/clang500-import/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp
  projects/clang500-import/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp
  projects/clang500-import/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp
  projects/clang500-import/contrib/llvm/tools/clang/utils/TableGen/TableGen.cpp
  projects/clang500-import/contrib/llvm/tools/clang/utils/TableGen/TableGenBackends.h
  projects/clang500-import/contrib/llvm/tools/lld/COFF/Driver.cpp
  projects/clang500-import/contrib/llvm/tools/lld/COFF/DriverUtils.cpp
  projects/clang500-import/contrib/llvm/tools/lld/ELF/Config.h
  projects/clang500-import/contrib/llvm/tools/lld/ELF/Driver.cpp
  projects/clang500-import/contrib/llvm/tools/lld/ELF/LinkerScript.cpp
  projects/clang500-import/contrib/llvm/tools/lld/ELF/LinkerScript.h
  projects/clang500-import/contrib/llvm/tools/lld/ELF/Options.td
  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/Core/ArchSpec.h
  projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/Expression/DiagnosticManager.h
  projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/Utility/StringLexer.h
  projects/clang500-import/contrib/llvm/tools/lldb/source/Commands/CommandObjectCommands.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Commands/CommandObjectFrame.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Core/ArchSpec.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Core/Scalar.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Expression/DiagnosticManager.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Interpreter/CommandHistory.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
  projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
  projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
  projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h
  projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
  projects/clang500-import/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp
  projects/clang500-import/contrib/llvm/tools/lldb/source/Utility/StringLexer.cpp
  projects/clang500-import/contrib/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
  projects/clang500-import/contrib/llvm/tools/llvm-modextract/llvm-modextract.cpp
  projects/clang500-import/contrib/llvm/tools/llvm-xray/xray-extract.cc
  projects/clang500-import/contrib/llvm/utils/TableGen/CodeGenTarget.cpp
  projects/clang500-import/contrib/llvm/utils/TableGen/IntrinsicEmitter.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/llvm/Support/VCSRevision.h
Directory Properties:
  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/llvm/include/llvm-c/Core.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm-c/Core.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm-c/Core.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -2131,6 +2131,16 @@ LLVMValueRef LLVMMDNodeInContext(LLVMCon
 LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count);
 
 /**
+ * Obtain a Metadata as a Value.
+ */
+LLVMValueRef LLVMMetadataAsValue(LLVMContextRef C, LLVMMetadataRef MD);
+
+/**
+ * Obtain a Value as a Metadata.
+ */
+LLVMMetadataRef LLVMValueAsMetadata(LLVMValueRef Val);
+
+/**
  * Obtain the underlying string from a MDString value.
  *
  * @param V Instance to obtain string from.

Modified: projects/clang500-import/contrib/llvm/include/llvm-c/Types.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm-c/Types.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm-c/Types.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -83,6 +83,13 @@ typedef struct LLVMOpaqueValue *LLVMValu
 typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef;
 
 /**
+ * Represents an LLVM Metadata.
+ *
+ * This models llvm::Metadata.
+ */
+typedef struct LLVMOpaqueMetadata *LLVMMetadataRef;
+
+/**
  * Represents an LLVM basic block builder.
  *
  * This models llvm::IRBuilder.
@@ -90,6 +97,13 @@ typedef struct LLVMOpaqueBasicBlock *LLV
 typedef struct LLVMOpaqueBuilder *LLVMBuilderRef;
 
 /**
+ * Represents an LLVM debug info builder.
+ *
+ * This models llvm::DIBuilder.
+ */
+typedef struct LLVMOpaqueDIBuilder *LLVMDIBuilderRef;
+
+/**
  * Interface used to provide a module to JIT or interpreter.
  * This is now just a synonym for llvm::Module, but we have to keep using the
  * different type to keep binary compatibility.

Modified: projects/clang500-import/contrib/llvm/include/llvm/ADT/APInt.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/ADT/APInt.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm/ADT/APInt.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -189,17 +189,17 @@ private:
   void initSlowCase(const APInt &that);
 
   /// out-of-line slow case for shl
-  APInt shlSlowCase(unsigned shiftAmt) const;
+  void shlSlowCase(unsigned ShiftAmt);
+
+  /// out-of-line slow case for lshr.
+  void lshrSlowCase(unsigned ShiftAmt);
 
   /// out-of-line slow case for operator=
-  APInt &AssignSlowCase(const APInt &RHS);
+  void AssignSlowCase(const APInt &RHS);
 
   /// out-of-line slow case for operator==
   bool EqualSlowCase(const APInt &RHS) const LLVM_READONLY;
 
-  /// out-of-line slow case for operator==
-  bool EqualSlowCase(uint64_t Val) const LLVM_READONLY;
-
   /// out-of-line slow case for countLeadingZeros
   unsigned countLeadingZerosSlowCase() const LLVM_READONLY;
 
@@ -209,6 +209,12 @@ private:
   /// out-of-line slow case for countPopulation
   unsigned countPopulationSlowCase() const LLVM_READONLY;
 
+  /// out-of-line slow case for intersects.
+  bool intersectsSlowCase(const APInt &RHS) const LLVM_READONLY;
+
+  /// out-of-line slow case for isSubsetOf.
+  bool isSubsetOfSlowCase(const APInt &RHS) const LLVM_READONLY;
+
   /// out-of-line slow case for setBits.
   void setBitsSlowCase(unsigned loBit, unsigned hiBit);
 
@@ -216,13 +222,13 @@ private:
   void flipAllBitsSlowCase();
 
   /// out-of-line slow case for operator&=.
-  APInt& AndAssignSlowCase(const APInt& RHS);
+  void AndAssignSlowCase(const APInt& RHS);
 
   /// out-of-line slow case for operator|=.
-  APInt& OrAssignSlowCase(const APInt& RHS);
+  void OrAssignSlowCase(const APInt& RHS);
 
   /// out-of-line slow case for operator^=.
-  APInt& XorAssignSlowCase(const APInt& RHS);
+  void XorAssignSlowCase(const APInt& RHS);
 
 public:
   /// \name Constructors
@@ -330,6 +336,20 @@ public:
   /// This tests the high bit of the APInt to determine if it is unset.
   bool isNonNegative() const { return !isNegative(); }
 
+  /// \brief Determine if sign bit of this APInt is set.
+  ///
+  /// This tests the high bit of this APInt to determine if it is set.
+  ///
+  /// \returns true if this APInt has its sign bit set, false otherwise.
+  bool isSignBitSet() const { return (*this)[BitWidth-1]; }
+
+  /// \brief Determine if sign bit of this APInt is clear.
+  ///
+  /// This tests the high bit of this APInt to determine if it is clear.
+  ///
+  /// \returns true if this APInt has its sign bit clear, false otherwise.
+  bool isSignBitClear() const { return !isSignBitSet(); }
+
   /// \brief Determine if this APInt Value is positive.
   ///
   /// This tests if the value of this APInt is positive (> 0). Note
@@ -396,10 +416,10 @@ public:
     return countPopulationSlowCase() == 1;
   }
 
-  /// \brief Check if the APInt's value is returned by getSignBit.
+  /// \brief Check if the APInt's value is returned by getSignMask.
   ///
-  /// \returns true if this is the value returned by getSignBit.
-  bool isSignBit() const { return isMinSignedValue(); }
+  /// \returns true if this is the value returned by getSignMask.
+  bool isSignMask() const { return isMinSignedValue(); }
 
   /// \brief Convert APInt to a boolean value.
   ///
@@ -409,8 +429,7 @@ public:
   /// If this value is smaller than the specified limit, return it, otherwise
   /// return the limit value.  This causes the value to saturate to the limit.
   uint64_t getLimitedValue(uint64_t Limit = UINT64_MAX) const {
-    return (getActiveBits() > 64 || getZExtValue() > Limit) ? Limit
-                                                            : getZExtValue();
+    return ugt(Limit) ? Limit : getZExtValue();
   }
 
   /// \brief Check if the APInt consists of a repeated bit pattern.
@@ -427,8 +446,9 @@ public:
     assert(numBits <= BitWidth && "numBits out of range");
     if (isSingleWord())
       return VAL == (UINT64_MAX >> (APINT_BITS_PER_WORD - numBits));
-    unsigned Ones = countTrailingOnes();
-    return (numBits == Ones) && ((Ones + countLeadingZeros()) == BitWidth);
+    unsigned Ones = countTrailingOnesSlowCase();
+    return (numBits == Ones) &&
+           ((Ones + countLeadingZerosSlowCase()) == BitWidth);
   }
 
   /// \returns true if this APInt is a non-empty sequence of ones starting at
@@ -437,8 +457,8 @@ public:
   bool isMask() const {
     if (isSingleWord())
       return isMask_64(VAL);
-    unsigned Ones = countTrailingOnes();
-    return (Ones > 0) && ((Ones + countLeadingZeros()) == BitWidth);
+    unsigned Ones = countTrailingOnesSlowCase();
+    return (Ones > 0) && ((Ones + countLeadingZerosSlowCase()) == BitWidth);
   }
 
   /// \brief Return true if this APInt value contains a sequence of ones with
@@ -446,8 +466,9 @@ public:
   bool isShiftedMask() const {
     if (isSingleWord())
       return isShiftedMask_64(VAL);
-    unsigned Ones = countPopulation();
-    return (Ones + countTrailingZeros() + countLeadingZeros()) == BitWidth;
+    unsigned Ones = countPopulationSlowCase();
+    unsigned LeadZ = countLeadingZerosSlowCase();
+    return (Ones + LeadZ + countTrailingZeros()) == BitWidth;
   }
 
   /// @}
@@ -476,11 +497,11 @@ public:
     return API;
   }
 
-  /// \brief Get the SignBit for a specific bit width.
+  /// \brief Get the SignMask for a specific bit width.
   ///
   /// This is just a wrapper function of getSignedMinValue(), and it helps code
-  /// readability when we want to get a SignBit.
-  static APInt getSignBit(unsigned BitWidth) {
+  /// readability when we want to get a SignMask.
+  static APInt getSignMask(unsigned BitWidth) {
     return getSignedMinValue(BitWidth);
   }
 
@@ -674,29 +695,22 @@ public:
       return clearUnusedBits();
     }
 
-    return AssignSlowCase(RHS);
+    AssignSlowCase(RHS);
+    return *this;
   }
 
   /// @brief Move assignment operator.
   APInt &operator=(APInt &&that) {
-    if (!isSingleWord()) {
-      // The MSVC STL shipped in 2013 requires that self move assignment be a
-      // no-op.  Otherwise algorithms like stable_sort will produce answers
-      // where half of the output is left in a moved-from state.
-      if (this == &that)
-        return *this;
+    assert(this != &that && "Self-move not supported");
+    if (!isSingleWord())
       delete[] pVal;
-    }
 
     // Use memcpy so that type based alias analysis sees both VAL and pVal
     // as modified.
     memcpy(&VAL, &that.VAL, sizeof(uint64_t));
 
-    // If 'this == &that', avoid zeroing our own bitwidth by storing to 'that'
-    // first.
-    unsigned ThatBitWidth = that.BitWidth;
+    BitWidth = that.BitWidth;
     that.BitWidth = 0;
-    BitWidth = ThatBitWidth;
 
     return *this;
   }
@@ -727,11 +741,11 @@ public:
   /// \returns *this after ANDing with RHS.
   APInt &operator&=(const APInt &RHS) {
     assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
-    if (isSingleWord()) {
+    if (isSingleWord())
       VAL &= RHS.VAL;
-      return *this;
-    }
-    return AndAssignSlowCase(RHS);
+    else
+      AndAssignSlowCase(RHS);
+    return *this;
   }
 
   /// \brief Bitwise AND assignment operator.
@@ -757,11 +771,11 @@ public:
   /// \returns *this after ORing with RHS.
   APInt &operator|=(const APInt &RHS) {
     assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
-    if (isSingleWord()) {
+    if (isSingleWord())
       VAL |= RHS.VAL;
-      return *this;
-    }
-    return OrAssignSlowCase(RHS);
+    else
+      OrAssignSlowCase(RHS);
+    return *this;
   }
 
   /// \brief Bitwise OR assignment operator.
@@ -787,11 +801,11 @@ public:
   /// \returns *this after XORing with RHS.
   APInt &operator^=(const APInt &RHS) {
     assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
-    if (isSingleWord()) {
+    if (isSingleWord())
       VAL ^= RHS.VAL;
-      return *this;
-    }
-    return XorAssignSlowCase(RHS);
+    else
+      XorAssignSlowCase(RHS);
+    return *this;
   }
 
   /// \brief Bitwise XOR assignment operator.
@@ -836,9 +850,17 @@ public:
   ///
   /// Shifts *this left by shiftAmt and assigns the result to *this.
   ///
-  /// \returns *this after shifting left by shiftAmt
-  APInt &operator<<=(unsigned shiftAmt) {
-    *this = shl(shiftAmt);
+  /// \returns *this after shifting left by ShiftAmt
+  APInt &operator<<=(unsigned ShiftAmt) {
+    assert(ShiftAmt <= BitWidth && "Invalid shift amount");
+    if (isSingleWord()) {
+      if (ShiftAmt == BitWidth)
+        VAL = 0;
+      else
+        VAL <<= ShiftAmt;
+      return clearUnusedBits();
+    }
+    shlSlowCase(ShiftAmt);
     return *this;
   }
 
@@ -875,20 +897,26 @@ public:
     return R;
   }
 
-  /// Logical right-shift this APInt by shiftAmt in place.
-  void lshrInPlace(unsigned shiftAmt);
+  /// Logical right-shift this APInt by ShiftAmt in place.
+  void lshrInPlace(unsigned ShiftAmt) {
+    assert(ShiftAmt <= BitWidth && "Invalid shift amount");
+    if (isSingleWord()) {
+      if (ShiftAmt == BitWidth)
+        VAL = 0;
+      else
+        VAL >>= ShiftAmt;
+      return;
+    }
+    lshrSlowCase(ShiftAmt);
+  }
 
   /// \brief Left-shift function.
   ///
   /// Left-shift this APInt by shiftAmt.
   APInt shl(unsigned shiftAmt) const {
-    assert(shiftAmt <= BitWidth && "Invalid shift amount");
-    if (isSingleWord()) {
-      if (shiftAmt >= BitWidth)
-        return APInt(BitWidth, 0); // avoid undefined shift results
-      return APInt(BitWidth, VAL << shiftAmt);
-    }
-    return shlSlowCase(shiftAmt);
+    APInt R(*this);
+    R <<= shiftAmt;
+    return R;
   }
 
   /// \brief Rotate left by rotateAmt.
@@ -905,7 +933,14 @@ public:
   /// \brief Logical right-shift function.
   ///
   /// Logical right-shift this APInt by shiftAmt.
-  APInt lshr(const APInt &shiftAmt) const;
+  APInt lshr(const APInt &ShiftAmt) const {
+    APInt R(*this);
+    R.lshrInPlace(ShiftAmt);
+    return R;
+  }
+
+  /// Logical right-shift this APInt by ShiftAmt in place.
+  void lshrInPlace(const APInt &ShiftAmt);
 
   /// \brief Left-shift function.
   ///
@@ -1003,9 +1038,7 @@ public:
   ///
   /// \returns true if *this == Val
   bool operator==(uint64_t Val) const {
-    if (isSingleWord())
-      return VAL == Val;
-    return EqualSlowCase(Val);
+    return (isSingleWord() || getActiveBits() <= 64) && getZExtValue() == Val;
   }
 
   /// \brief Equality comparison.
@@ -1055,7 +1088,8 @@ public:
   ///
   /// \returns true if *this < RHS when considered unsigned.
   bool ult(uint64_t RHS) const {
-    return getActiveBits() > 64 ? false : getZExtValue() < RHS;
+    // Only need to check active bits if not a single word.
+    return (isSingleWord() || getActiveBits() <= 64) && getZExtValue() < RHS;
   }
 
   /// \brief Signed less than comparison
@@ -1073,7 +1107,8 @@ public:
   ///
   /// \returns true if *this < RHS when considered signed.
   bool slt(int64_t RHS) const {
-    return getMinSignedBits() > 64 ? isNegative() : getSExtValue() < RHS;
+    return (!isSingleWord() && getMinSignedBits() > 64) ? isNegative()
+                                                        : getSExtValue() < RHS;
   }
 
   /// \brief Unsigned less or equal comparison
@@ -1123,7 +1158,8 @@ public:
   ///
   /// \returns true if *this > RHS when considered unsigned.
   bool ugt(uint64_t RHS) const {
-    return getActiveBits() > 64 ? true : getZExtValue() > RHS;
+    // Only need to check active bits if not a single word.
+    return (!isSingleWord() && getActiveBits() > 64) || getZExtValue() > RHS;
   }
 
   /// \brief Signed greather than comparison
@@ -1141,7 +1177,8 @@ public:
   ///
   /// \returns true if *this > RHS when considered signed.
   bool sgt(int64_t RHS) const {
-    return getMinSignedBits() > 64 ? !isNegative() : getSExtValue() > RHS;
+    return (!isSingleWord() && getMinSignedBits() > 64) ? !isNegative()
+                                                        : getSExtValue() > RHS;
   }
 
   /// \brief Unsigned greater or equal comparison
@@ -1179,9 +1216,18 @@ public:
   /// This operation tests if there are any pairs of corresponding bits
   /// between this APInt and RHS that are both set.
   bool intersects(const APInt &RHS) const {
-    APInt temp(*this);
-    temp &= RHS;
-    return temp != 0;
+    assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
+    if (isSingleWord())
+      return (VAL & RHS.VAL) != 0;
+    return intersectsSlowCase(RHS);
+  }
+
+  /// This operation checks that all bits set in this APInt are also set in RHS.
+  bool isSubsetOf(const APInt &RHS) const {
+    assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
+    if (isSingleWord())
+      return (VAL & ~RHS.VAL) == 0;
+    return isSubsetOfSlowCase(RHS);
   }
 
   /// @}
@@ -1404,8 +1450,7 @@ public:
   /// int64_t. Otherwise an assertion will result.
   int64_t getSExtValue() const {
     if (isSingleWord())
-      return int64_t(VAL << (APINT_BITS_PER_WORD - BitWidth)) >>
-             (APINT_BITS_PER_WORD - BitWidth);
+      return SignExtend64(VAL, BitWidth);
     assert(getMinSignedBits() <= 64 && "Too many bits for int64_t");
     return int64_t(pVal[0]);
   }
@@ -1759,13 +1804,13 @@ public:
                       WordType *remainder, WordType *scratch,
                       unsigned parts);
 
-  /// Shift a bignum left COUNT bits.  Shifted in bits are zero.  There are no
-  /// restrictions on COUNT.
-  static void tcShiftLeft(WordType *, unsigned parts, unsigned count);
-
-  /// Shift a bignum right COUNT bits.  Shifted in bits are zero.  There are no
-  /// restrictions on COUNT.
-  static void tcShiftRight(WordType *, unsigned parts, unsigned count);
+  /// Shift a bignum left Count bits. Shifted in bits are zero. There are no
+  /// restrictions on Count.
+  static void tcShiftLeft(WordType *, unsigned Words, unsigned Count);
+
+  /// Shift a bignum right Count bits.  Shifted in bits are zero.  There are no
+  /// restrictions on Count.
+  static void tcShiftRight(WordType *, unsigned Words, unsigned Count);
 
   /// The obvious AND, OR and XOR and complement operations.
   static void tcAnd(WordType *, const WordType *, unsigned);
@@ -1959,7 +2004,7 @@ inline const APInt &umax(const APInt &A,
 /// \brief Compute GCD of two unsigned APInt values.
 ///
 /// This function returns the greatest common divisor of the two APInt values
-/// using Euclid's algorithm.
+/// using Stein's algorithm.
 ///
 /// \returns the greatest common divisor of A and B.
 APInt GreatestCommonDivisor(APInt A, APInt B);

Modified: projects/clang500-import/contrib/llvm/include/llvm/ADT/BitVector.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/ADT/BitVector.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm/ADT/BitVector.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -14,6 +14,8 @@
 #ifndef LLVM_ADT_BITVECTOR_H
 #define LLVM_ADT_BITVECTOR_H
 
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/MathExtras.h"
 #include <algorithm>
 #include <cassert>
@@ -455,6 +457,105 @@ public:
     return *this;
   }
 
+  BitVector &operator>>=(unsigned N) {
+    assert(N <= Size);
+    if (LLVM_UNLIKELY(empty() || N == 0))
+      return *this;
+
+    unsigned NumWords = NumBitWords(Size);
+    assert(NumWords >= 1);
+
+    wordShr(N / BITWORD_SIZE);
+
+    unsigned BitDistance = N % BITWORD_SIZE;
+    if (BitDistance == 0)
+      return *this;
+
+    // When the shift size is not a multiple of the word size, then we have
+    // a tricky situation where each word in succession needs to extract some
+    // of the bits from the next word and or them into this word while
+    // shifting this word to make room for the new bits.  This has to be done
+    // for every word in the array.
+
+    // Since we're shifting each word right, some bits will fall off the end
+    // of each word to the right, and empty space will be created on the left.
+    // The final word in the array will lose bits permanently, so starting at
+    // the beginning, work forwards shifting each word to the right, and
+    // OR'ing in the bits from the end of the next word to the beginning of
+    // the current word.
+
+    // Example:
+    //   Starting with {0xAABBCCDD, 0xEEFF0011, 0x22334455} and shifting right
+    //   by 4 bits.
+    // Step 1: Word[0] >>= 4           ; 0x0ABBCCDD
+    // Step 2: Word[0] |= 0x10000000   ; 0x1ABBCCDD
+    // Step 3: Word[1] >>= 4           ; 0x0EEFF001
+    // Step 4: Word[1] |= 0x50000000   ; 0x5EEFF001
+    // Step 5: Word[2] >>= 4           ; 0x02334455
+    // Result: { 0x1ABBCCDD, 0x5EEFF001, 0x02334455 }
+    const BitWord Mask = maskTrailingOnes<BitWord>(BitDistance);
+    const unsigned LSH = BITWORD_SIZE - BitDistance;
+
+    for (unsigned I = 0; I < NumWords - 1; ++I) {
+      Bits[I] >>= BitDistance;
+      Bits[I] |= (Bits[I + 1] & Mask) << LSH;
+    }
+
+    Bits[NumWords - 1] >>= BitDistance;
+
+    return *this;
+  }
+
+  BitVector &operator<<=(unsigned N) {
+    assert(N <= Size);
+    if (LLVM_UNLIKELY(empty() || N == 0))
+      return *this;
+
+    unsigned NumWords = NumBitWords(Size);
+    assert(NumWords >= 1);
+
+    wordShl(N / BITWORD_SIZE);
+
+    unsigned BitDistance = N % BITWORD_SIZE;
+    if (BitDistance == 0)
+      return *this;
+
+    // When the shift size is not a multiple of the word size, then we have
+    // a tricky situation where each word in succession needs to extract some
+    // of the bits from the previous word and or them into this word while
+    // shifting this word to make room for the new bits.  This has to be done
+    // for every word in the array.  This is similar to the algorithm outlined
+    // in operator>>=, but backwards.
+
+    // Since we're shifting each word left, some bits will fall off the end
+    // of each word to the left, and empty space will be created on the right.
+    // The first word in the array will lose bits permanently, so starting at
+    // the end, work backwards shifting each word to the left, and OR'ing
+    // in the bits from the end of the next word to the beginning of the
+    // current word.
+
+    // Example:
+    //   Starting with {0xAABBCCDD, 0xEEFF0011, 0x22334455} and shifting left
+    //   by 4 bits.
+    // Step 1: Word[2] <<= 4           ; 0x23344550
+    // Step 2: Word[2] |= 0x0000000E   ; 0x2334455E
+    // Step 3: Word[1] <<= 4           ; 0xEFF00110
+    // Step 4: Word[1] |= 0x0000000A   ; 0xEFF0011A
+    // Step 5: Word[0] <<= 4           ; 0xABBCCDD0
+    // Result: { 0xABBCCDD0, 0xEFF0011A, 0x2334455E }
+    const BitWord Mask = maskLeadingOnes<BitWord>(BitDistance);
+    const unsigned RSH = BITWORD_SIZE - BitDistance;
+
+    for (int I = NumWords - 1; I > 0; --I) {
+      Bits[I] <<= BitDistance;
+      Bits[I] |= (Bits[I - 1] & Mask) >> RSH;
+    }
+    Bits[0] <<= BitDistance;
+    clear_unused_bits();
+
+    return *this;
+  }
+
   // Assignment operator.
   const BitVector &operator=(const BitVector &RHS) {
     if (this == &RHS) return *this;
@@ -538,6 +639,54 @@ public:
   }
 
 private:
+  /// \brief Perform a logical left shift of \p Count words by moving everything
+  /// \p Count words to the right in memory.
+  ///
+  /// While confusing, words are stored from least significant at Bits[0] to
+  /// most significant at Bits[NumWords-1].  A logical shift left, however,
+  /// moves the current least significant bit to a higher logical index, and
+  /// fills the previous least significant bits with 0.  Thus, we actually
+  /// need to move the bytes of the memory to the right, not to the left.
+  /// Example:
+  ///   Words = [0xBBBBAAAA, 0xDDDDFFFF, 0x00000000, 0xDDDD0000]
+  /// represents a BitVector where 0xBBBBAAAA contain the least significant
+  /// bits.  So if we want to shift the BitVector left by 2 words, we need to
+  /// turn this into 0x00000000 0x00000000 0xBBBBAAAA 0xDDDDFFFF by using a
+  /// memmove which moves right, not left.
+  void wordShl(uint32_t Count) {
+    if (Count == 0)
+      return;
+
+    uint32_t NumWords = NumBitWords(Size);
+
+    auto Src = ArrayRef<BitWord>(Bits, NumWords).drop_back(Count);
+    auto Dest = MutableArrayRef<BitWord>(Bits, NumWords).drop_front(Count);
+
+    // Since we always move Word-sized chunks of data with src and dest both
+    // aligned to a word-boundary, we don't need to worry about endianness
+    // here.
+    std::memmove(Dest.begin(), Src.begin(), Dest.size() * sizeof(BitWord));
+    std::memset(Bits, 0, Count * sizeof(BitWord));
+    clear_unused_bits();
+  }
+
+  /// \brief Perform a logical right shift of \p Count words by moving those
+  /// words to the left in memory.  See wordShl for more information.
+  ///
+  void wordShr(uint32_t Count) {
+    if (Count == 0)
+      return;
+
+    uint32_t NumWords = NumBitWords(Size);
+
+    auto Src = ArrayRef<BitWord>(Bits, NumWords).drop_front(Count);
+    auto Dest = MutableArrayRef<BitWord>(Bits, NumWords).drop_back(Count);
+    assert(Dest.size() == Src.size());
+
+    std::memmove(Dest.begin(), Src.begin(), Dest.size() * sizeof(BitWord));
+    std::memset(Dest.end(), 0, Count * sizeof(BitWord));
+  }
+
   int next_unset_in_word(int WordIndex, BitWord Word) const {
     unsigned Result = WordIndex * BITWORD_SIZE + countTrailingOnes(Word);
     return Result < size() ? Result : -1;

Modified: projects/clang500-import/contrib/llvm/include/llvm/ADT/SmallBitVector.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/ADT/SmallBitVector.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm/ADT/SmallBitVector.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -508,6 +508,22 @@ public:
     return *this;
   }
 
+  SmallBitVector &operator<<=(unsigned N) {
+    if (isSmall())
+      setSmallBits(getSmallBits() << N);
+    else
+      getPointer()->operator<<=(N);
+    return *this;
+  }
+
+  SmallBitVector &operator>>=(unsigned N) {
+    if (isSmall())
+      setSmallBits(getSmallBits() >> N);
+    else
+      getPointer()->operator>>=(N);
+    return *this;
+  }
+
   // Assignment operator.
   const SmallBitVector &operator=(const SmallBitVector &RHS) {
     if (isSmall()) {

Modified: projects/clang500-import/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -1164,9 +1164,8 @@ template <class BT> struct BlockEdgesAdd
   void operator()(IrreducibleGraph &G, IrreducibleGraph::IrrNode &Irr,
                   const LoopData *OuterLoop) {
     const BlockT *BB = BFI.RPOT[Irr.Node.Index];
-    for (auto I = Successor::child_begin(BB), E = Successor::child_end(BB);
-         I != E; ++I)
-      G.addEdge(Irr, BFI.getNode(*I), OuterLoop);
+    for (const auto Succ : children<const BlockT *>(BB))
+      G.addEdge(Irr, BFI.getNode(Succ), OuterLoop);
   }
 };
 }
@@ -1210,10 +1209,9 @@ BlockFrequencyInfoImpl<BT>::propagateMas
       return false;
   } else {
     const BlockT *BB = getBlock(Node);
-    for (auto SI = Successor::child_begin(BB), SE = Successor::child_end(BB);
-         SI != SE; ++SI)
-      if (!addToDist(Dist, OuterLoop, Node, getNode(*SI),
-                     getWeightFromBranchProb(BPI->getEdgeProbability(BB, SI))))
+    for (const auto Succ : children<const BlockT *>(BB))
+      if (!addToDist(Dist, OuterLoop, Node, getNode(Succ),
+                     getWeightFromBranchProb(BPI->getEdgeProbability(BB, Succ))))
         // Irreducible backedge.
         return false;
   }

Modified: projects/clang500-import/contrib/llvm/include/llvm/Analysis/DominanceFrontierImpl.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/Analysis/DominanceFrontierImpl.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm/Analysis/DominanceFrontierImpl.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -174,12 +174,10 @@ ForwardDominanceFrontierBase<BlockT>::ca
     // Visit each block only once.
     if (visited.insert(currentBB).second) {
       // Loop over CFG successors to calculate DFlocal[currentNode]
-      for (auto SI = BlockTraits::child_begin(currentBB),
-                SE = BlockTraits::child_end(currentBB);
-           SI != SE; ++SI) {
+      for (const auto Succ : children<BlockT *>(currentBB)) {
         // Does Node immediately dominate this successor?
-        if (DT[*SI]->getIDom() != currentNode)
-          S.insert(*SI);
+        if (DT[Succ]->getIDom() != currentNode)
+          S.insert(Succ);
       }
     }
 

Modified: projects/clang500-import/contrib/llvm/include/llvm/Analysis/LoopInfo.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/Analysis/LoopInfo.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm/Analysis/LoopInfo.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -158,11 +158,8 @@ public:
   /// True if terminator in the block can branch to another block that is
   /// outside of the current loop.
   bool isLoopExiting(const BlockT *BB) const {
-    typedef GraphTraits<const BlockT*> BlockTraits;
-    for (typename BlockTraits::ChildIteratorType SI =
-         BlockTraits::child_begin(BB),
-         SE = BlockTraits::child_end(BB); SI != SE; ++SI) {
-      if (!contains(*SI))
+    for (const auto Succ : children<const BlockT*>(BB)) {
+      if (!contains(Succ))
         return true;
     }
     return false;
@@ -186,11 +183,8 @@ public:
     unsigned NumBackEdges = 0;
     BlockT *H = getHeader();
 
-    typedef GraphTraits<Inverse<BlockT*> > InvBlockTraits;
-    for (typename InvBlockTraits::ChildIteratorType I =
-         InvBlockTraits::child_begin(H),
-         E = InvBlockTraits::child_end(H); I != E; ++I)
-      if (contains(*I))
+    for (const auto Pred : children<Inverse<BlockT*> >(H))
+      if (contains(Pred))
         ++NumBackEdges;
 
     return NumBackEdges;
@@ -249,12 +243,9 @@ public:
   /// contains a branch back to the header.
   void getLoopLatches(SmallVectorImpl<BlockT *> &LoopLatches) const {
     BlockT *H = getHeader();
-    typedef GraphTraits<Inverse<BlockT*> > InvBlockTraits;
-    for (typename InvBlockTraits::ChildIteratorType I =
-         InvBlockTraits::child_begin(H),
-         E = InvBlockTraits::child_end(H); I != E; ++I)
-      if (contains(*I))
-        LoopLatches.push_back(*I);
+    for (const auto Pred : children<Inverse<BlockT*>>(H))
+      if (contains(Pred))
+        LoopLatches.push_back(Pred);
   }
 
   //===--------------------------------------------------------------------===//

Modified: projects/clang500-import/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -34,14 +34,11 @@ namespace llvm {
 template<class BlockT, class LoopT>
 void LoopBase<BlockT, LoopT>::
 getExitingBlocks(SmallVectorImpl<BlockT *> &ExitingBlocks) const {
-  typedef GraphTraits<BlockT*> BlockTraits;
-  for (block_iterator BI = block_begin(), BE = block_end(); BI != BE; ++BI)
-    for (typename BlockTraits::ChildIteratorType I =
-           BlockTraits::child_begin(*BI), E = BlockTraits::child_end(*BI);
-         I != E; ++I)
-      if (!contains(*I)) {
+  for (const auto BB : blocks())
+    for (const auto Succ : children<BlockT*>(BB))
+      if (!contains(Succ)) {
         // Not in current loop? It must be an exit block.
-        ExitingBlocks.push_back(*BI);
+        ExitingBlocks.push_back(BB);
         break;
       }
 }
@@ -63,14 +60,11 @@ BlockT *LoopBase<BlockT, LoopT>::getExit
 template<class BlockT, class LoopT>
 void LoopBase<BlockT, LoopT>::
 getExitBlocks(SmallVectorImpl<BlockT*> &ExitBlocks) const {
-  typedef GraphTraits<BlockT*> BlockTraits;
-  for (block_iterator BI = block_begin(), BE = block_end(); BI != BE; ++BI)
-    for (typename BlockTraits::ChildIteratorType I =
-           BlockTraits::child_begin(*BI), E = BlockTraits::child_end(*BI);
-         I != E; ++I)
-      if (!contains(*I))
+  for (const auto BB : blocks())
+    for (const auto Succ : children<BlockT*>(BB))
+      if (!contains(Succ))
         // Not in current loop? It must be an exit block.
-        ExitBlocks.push_back(*I);
+        ExitBlocks.push_back(Succ);
 }
 
 /// getExitBlock - If getExitBlocks would return exactly one block,
@@ -88,14 +82,11 @@ BlockT *LoopBase<BlockT, LoopT>::getExit
 template<class BlockT, class LoopT>
 void LoopBase<BlockT, LoopT>::
 getExitEdges(SmallVectorImpl<Edge> &ExitEdges) const {
-  typedef GraphTraits<BlockT*> BlockTraits;
-  for (block_iterator BI = block_begin(), BE = block_end(); BI != BE; ++BI)
-    for (typename BlockTraits::ChildIteratorType I =
-           BlockTraits::child_begin(*BI), E = BlockTraits::child_end(*BI);
-         I != E; ++I)
-      if (!contains(*I))
+  for (const auto BB : blocks())
+    for (const auto Succ : children<BlockT*>(BB))
+      if (!contains(Succ))
         // Not in current loop? It must be an exit block.
-        ExitEdges.push_back(Edge(*BI, *I));
+        ExitEdges.emplace_back(BB, Succ);
 }
 
 /// getLoopPreheader - If there is a preheader for this loop, return it.  A
@@ -134,15 +125,11 @@ BlockT *LoopBase<BlockT, LoopT>::getLoop
 
   // Loop over the predecessors of the header node...
   BlockT *Header = getHeader();
-  typedef GraphTraits<Inverse<BlockT*> > InvBlockTraits;
-  for (typename InvBlockTraits::ChildIteratorType PI =
-         InvBlockTraits::child_begin(Header),
-         PE = InvBlockTraits::child_end(Header); PI != PE; ++PI) {
-    typename InvBlockTraits::NodeRef N = *PI;
-    if (!contains(N)) {     // If the block is not in the loop...
-      if (Out && Out != N)
+  for (const auto Pred : children<Inverse<BlockT*>>(Header)) {
+    if (!contains(Pred)) {     // If the block is not in the loop...
+      if (Out && Out != Pred)
         return nullptr;     // Multiple predecessors outside the loop
-      Out = N;
+      Out = Pred;
     }
   }
 
@@ -156,17 +143,11 @@ BlockT *LoopBase<BlockT, LoopT>::getLoop
 template<class BlockT, class LoopT>
 BlockT *LoopBase<BlockT, LoopT>::getLoopLatch() const {
   BlockT *Header = getHeader();
-  typedef GraphTraits<Inverse<BlockT*> > InvBlockTraits;
-  typename InvBlockTraits::ChildIteratorType PI =
-    InvBlockTraits::child_begin(Header);
-  typename InvBlockTraits::ChildIteratorType PE =
-    InvBlockTraits::child_end(Header);
   BlockT *Latch = nullptr;
-  for (; PI != PE; ++PI) {
-    typename InvBlockTraits::NodeRef N = *PI;
-    if (contains(N)) {
+  for (const auto Pred : children<Inverse<BlockT*>>(Header)) {
+    if (contains(Pred)) {
       if (Latch) return nullptr;
-      Latch = N;
+      Latch = Pred;
     }
   }
 
@@ -394,11 +375,9 @@ static void discoverAndMapSubloop(LoopT 
       // within this subloop tree itself. Note that a predecessor may directly
       // reach another subloop that is not yet discovered to be a subloop of
       // this loop, which we must traverse.
-      for (typename InvBlockTraits::ChildIteratorType PI =
-             InvBlockTraits::child_begin(PredBB),
-             PE = InvBlockTraits::child_end(PredBB); PI != PE; ++PI) {
-        if (LI->getLoopFor(*PI) != Subloop)
-          ReverseCFGWorklist.push_back(*PI);
+      for (const auto Pred : children<Inverse<BlockT*>>(PredBB)) {
+        if (LI->getLoopFor(Pred) != Subloop)
+          ReverseCFGWorklist.push_back(Pred);
       }
     }
   }
@@ -482,13 +461,7 @@ analyze(const DominatorTreeBase<BlockT> 
     SmallVector<BlockT *, 4> Backedges;
 
     // Check each predecessor of the potential loop header.
-    typedef GraphTraits<Inverse<BlockT*> > InvBlockTraits;
-    for (typename InvBlockTraits::ChildIteratorType PI =
-           InvBlockTraits::child_begin(Header),
-           PE = InvBlockTraits::child_end(Header); PI != PE; ++PI) {
-
-      BlockT *Backedge = *PI;
-
+    for (const auto Backedge : children<Inverse<BlockT*>>(Header)) {
       // If Header dominates predBB, this is a new loop. Collect the backedges.
       if (DomTree.dominates(Header, Backedge)
           && DomTree.isReachableFromEntry(Backedge)) {

Modified: projects/clang500-import/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -54,6 +54,11 @@ bool isCallocLikeFn(const Value *V, cons
                     bool LookThroughBitCast = false);
 
 /// \brief Tests if a value is a call or invoke to a library function that
+/// allocates memory similar to malloc or calloc.
+bool isMallocOrCallocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
+                            bool LookThroughBitCast = false);
+
+/// \brief Tests if a value is a call or invoke to a library function that
 /// allocates memory (either malloc, calloc, or strdup like).
 bool isAllocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
                    bool LookThroughBitCast = false);

Modified: projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -1159,8 +1159,20 @@ public:
   const SCEV *getConstant(const APInt &Val);
   const SCEV *getConstant(Type *Ty, uint64_t V, bool isSigned = false);
   const SCEV *getTruncateExpr(const SCEV *Op, Type *Ty);
+
+  typedef SmallDenseMap<std::pair<const SCEV *, Type *>, const SCEV *, 8>
+      ExtendCacheTy;
   const SCEV *getZeroExtendExpr(const SCEV *Op, Type *Ty);
+  const SCEV *getZeroExtendExprCached(const SCEV *Op, Type *Ty,
+                                      ExtendCacheTy &Cache);
+  const SCEV *getZeroExtendExprImpl(const SCEV *Op, Type *Ty,
+                                    ExtendCacheTy &Cache);
+
   const SCEV *getSignExtendExpr(const SCEV *Op, Type *Ty);
+  const SCEV *getSignExtendExprCached(const SCEV *Op, Type *Ty,
+                                      ExtendCacheTy &Cache);
+  const SCEV *getSignExtendExprImpl(const SCEV *Op, Type *Ty,
+                                    ExtendCacheTy &Cache);
   const SCEV *getAnyExtendExpr(const SCEV *Op, Type *Ty);
   const SCEV *getAddExpr(SmallVectorImpl<const SCEV *> &Ops,
                          SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap,

Modified: projects/clang500-import/contrib/llvm/include/llvm/Bitcode/BitcodeReader.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/Bitcode/BitcodeReader.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm/Bitcode/BitcodeReader.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -46,6 +46,9 @@ namespace llvm {
     ArrayRef<uint8_t> Buffer;
     StringRef ModuleIdentifier;
 
+    // The string table used to interpret this module.
+    StringRef Strtab;
+
     // The bitstream location of the IDENTIFICATION_BLOCK.
     uint64_t IdentificationBit;
 
@@ -70,6 +73,7 @@ namespace llvm {
     StringRef getBuffer() const {
       return StringRef((const char *)Buffer.begin(), Buffer.size());
     }
+    StringRef getStrtab() const { return Strtab; }
 
     StringRef getModuleIdentifier() const { return ModuleIdentifier; }
 

Modified: projects/clang500-import/contrib/llvm/include/llvm/Bitcode/BitcodeWriter.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/Bitcode/BitcodeWriter.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm/Bitcode/BitcodeWriter.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -15,6 +15,7 @@
 #define LLVM_BITCODE_BITCODEWRITER_H
 
 #include "llvm/IR/ModuleSummaryIndex.h"
+#include "llvm/MC/StringTableBuilder.h"
 #include <string>
 
 namespace llvm {
@@ -26,12 +27,25 @@ namespace llvm {
     SmallVectorImpl<char> &Buffer;
     std::unique_ptr<BitstreamWriter> Stream;
 
+    StringTableBuilder StrtabBuilder{StringTableBuilder::RAW};
+    bool WroteStrtab = false;
+
+    void writeBlob(unsigned Block, unsigned Record, StringRef Blob);
+
    public:
     /// Create a BitcodeWriter that writes to Buffer.
     BitcodeWriter(SmallVectorImpl<char> &Buffer);
 
     ~BitcodeWriter();
 
+    /// Write the bitcode file's string table. This must be called exactly once
+    /// after all modules have been written.
+    void writeStrtab();
+
+    /// Copy the string table for another module into this bitcode file. This
+    /// should be called after copying the module itself into the bitcode file.
+    void copyStrtab(StringRef Strtab);
+
     /// Write the specified module to the buffer specified at construction time.
     ///
     /// If \c ShouldPreserveUseListOrder, encode the use-list order for each \a

Modified: projects/clang500-import/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h	Thu Apr 20 21:21:35 2017	(r317229)
+++ projects/clang500-import/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h	Thu Apr 20 21:48:54 2017	(r317230)
@@ -22,7 +22,7 @@
 
 namespace llvm {
 namespace bitc {
-// The only top-level block type defined is for a module.
+// The only top-level block types are MODULE, IDENTIFICATION and STRTAB.
 enum BlockIDs {
   // Blocks
   MODULE_BLOCK_ID = FIRST_APPLICATION_BLOCKID,
@@ -52,7 +52,9 @@ enum BlockIDs {
 
   OPERAND_BUNDLE_TAGS_BLOCK_ID,
 
-  METADATA_KIND_BLOCK_ID
+  METADATA_KIND_BLOCK_ID,
+
+  STRTAB_BLOCK_ID,
 };

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704202148.v3KLms0M014554>