svn commit: r317760 - in vendor/llvm/dist: . docs include/llvm/ADT include/llvm/CodeGen include/llvm/DebugInfo/CodeView include/llvm/DebugInfo/DWARF include/llvm/DebugInfo/PDB/Native include/llvm/I...
Dimitry Andric
dim at FreeBSD.org
Wed May 3 20:26:15 UTC 2017
Author: dim
Date: Wed May 3 20:26:11 2017
New Revision: 317760
URL: https://svnweb.freebsd.org/changeset/base/317760
Log:
Vendor import of llvm trunk r302069:
https://llvm.org/svn/llvm-project/llvm/trunk@302069
Added:
vendor/llvm/dist/include/llvm/DebugInfo/CodeView/StringTable.h (contents, props changed)
vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFVerifier.h (contents, props changed)
vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/PDBStringTable.h (contents, props changed)
vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h (contents, props changed)
vendor/llvm/dist/lib/DebugInfo/CodeView/StringTable.cpp (contents, props changed)
vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFVerifier.cpp (contents, props changed)
vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBStringTable.cpp (contents, props changed)
vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBStringTableBuilder.cpp (contents, props changed)
vendor/llvm/dist/test/CodeGen/AMDGPU/promote-alloca-calling-conv.ll
vendor/llvm/dist/test/CodeGen/ARM/load-arm.ll
vendor/llvm/dist/test/CodeGen/BPF/reloc.ll
vendor/llvm/dist/test/CodeGen/Hexagon/adjust-latency-stackST.ll
vendor/llvm/dist/test/CodeGen/Hexagon/multi-cycle.ll
vendor/llvm/dist/test/CodeGen/Hexagon/plt-rel.ll
vendor/llvm/dist/test/CodeGen/X86/lwp-intrinsics-x86_64.ll
vendor/llvm/dist/test/CodeGen/X86/lwp-intrinsics.ll
vendor/llvm/dist/test/CodeGen/X86/stack-folding-lwp.ll
vendor/llvm/dist/test/CodeGen/X86/x86-no_caller_saved_registers-preserve.ll
vendor/llvm/dist/test/CodeGen/X86/x86-no_caller_saved_registers.ll
vendor/llvm/dist/test/MC/Hexagon/PacketRules/endloop_branches.s (contents, props changed)
vendor/llvm/dist/test/MC/Hexagon/PacketRules/restrict_ax.s (contents, props changed)
vendor/llvm/dist/test/MC/Hexagon/dealloc-return-jump.s (contents, props changed)
vendor/llvm/dist/test/MC/Hexagon/plt-rel.s (contents, props changed)
vendor/llvm/dist/test/MC/Hexagon/solo-axok.s (contents, props changed)
vendor/llvm/dist/test/MC/X86/lwp-x86_64.s (contents, props changed)
vendor/llvm/dist/test/MC/X86/lwp.s (contents, props changed)
vendor/llvm/dist/test/Transforms/LoopDeletion/unreachable-loops.ll
vendor/llvm/dist/test/Transforms/SpeculativeExecution/spec-other.ll
vendor/llvm/dist/test/Transforms/SpeculativeExecution/spec-vector.ll
vendor/llvm/dist/test/Verifier/scatter_gather.ll
Deleted:
vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/StringTable.h
vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/StringTableBuilder.h
vendor/llvm/dist/lib/DebugInfo/PDB/Native/StringTable.cpp
vendor/llvm/dist/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp
vendor/llvm/dist/test/CodeGen/AMDGPU/promote-alloca-shaders.ll
vendor/llvm/dist/test/MC/AArch64/arm32-large-relocs.s
vendor/llvm/dist/test/MC/AArch64/arm32-tls-relocs.s
vendor/llvm/dist/test/MC/AArch64/elf-reloc-pcreladdressing-ilp32.s
vendor/llvm/dist/test/MC/AArch64/lp64-diagnostics.s
vendor/llvm/dist/test/MC/Hexagon/endloop.s
vendor/llvm/dist/test/Transforms/FunctionImport/unnamed-globals.ll
Modified:
vendor/llvm/dist/CMakeLists.txt
vendor/llvm/dist/docs/LangRef.rst
vendor/llvm/dist/include/llvm/ADT/APInt.h
vendor/llvm/dist/include/llvm/CodeGen/CommandFlags.h
vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVRecord.h
vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h
vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugFragmentRecord.h
vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h
vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h
vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h
vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h
vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h
vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptor.h
vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiStream.h
vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/PDBFile.h
vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h
vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/RawTypes.h
vendor/llvm/dist/include/llvm/IR/Attributes.h
vendor/llvm/dist/include/llvm/IR/CallSite.h
vendor/llvm/dist/include/llvm/IR/Function.h
vendor/llvm/dist/include/llvm/IR/Instructions.h
vendor/llvm/dist/include/llvm/IR/Intrinsics.h
vendor/llvm/dist/include/llvm/IR/Intrinsics.td
vendor/llvm/dist/include/llvm/IR/IntrinsicsX86.td
vendor/llvm/dist/include/llvm/Support/BinaryStreamArray.h
vendor/llvm/dist/include/llvm/Support/BinaryStreamReader.h
vendor/llvm/dist/include/llvm/Support/BinaryStreamRef.h
vendor/llvm/dist/include/llvm/Support/BinaryStreamWriter.h
vendor/llvm/dist/include/llvm/Support/DataExtractor.h
vendor/llvm/dist/include/llvm/Support/ELFRelocs/Hexagon.def
vendor/llvm/dist/include/llvm/Target/TargetLowering.h
vendor/llvm/dist/lib/Analysis/CFLGraph.h
vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp
vendor/llvm/dist/lib/Analysis/ModuleSummaryAnalysis.cpp
vendor/llvm/dist/lib/Analysis/ValueTracking.cpp
vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp
vendor/llvm/dist/lib/CodeGen/GlobalISel/CallLowering.cpp
vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
vendor/llvm/dist/lib/DebugInfo/CodeView/CMakeLists.txt
vendor/llvm/dist/lib/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.cpp
vendor/llvm/dist/lib/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.cpp
vendor/llvm/dist/lib/DebugInfo/CodeView/ModuleDebugLineFragment.cpp
vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolDumper.cpp
vendor/llvm/dist/lib/DebugInfo/DWARF/CMakeLists.txt
vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp
vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
vendor/llvm/dist/lib/DebugInfo/PDB/CMakeLists.txt
vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp
vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiStream.cpp
vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBFile.cpp
vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
vendor/llvm/dist/lib/IR/Attributes.cpp
vendor/llvm/dist/lib/IR/AutoUpgrade.cpp
vendor/llvm/dist/lib/IR/Function.cpp
vendor/llvm/dist/lib/IR/IRBuilder.cpp
vendor/llvm/dist/lib/IR/Instructions.cpp
vendor/llvm/dist/lib/IR/LLVMContextImpl.h
vendor/llvm/dist/lib/MC/MCObjectFileInfo.cpp
vendor/llvm/dist/lib/Support/APInt.cpp
vendor/llvm/dist/lib/Support/BinaryStreamReader.cpp
vendor/llvm/dist/lib/Support/BinaryStreamWriter.cpp
vendor/llvm/dist/lib/Support/DataExtractor.cpp
vendor/llvm/dist/lib/Support/Host.cpp
vendor/llvm/dist/lib/Support/Triple.cpp
vendor/llvm/dist/lib/Target/AArch64/AArch64CallLowering.cpp
vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
vendor/llvm/dist/lib/Target/ARM/ARM.td
vendor/llvm/dist/lib/Target/ARM/ARMCallLowering.cpp
vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp
vendor/llvm/dist/lib/Target/AVR/AVRFrameLowering.cpp
vendor/llvm/dist/lib/Target/AVR/AVRRegisterInfo.cpp
vendor/llvm/dist/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp
vendor/llvm/dist/lib/Target/Hexagon/HexagonAsmPrinter.cpp
vendor/llvm/dist/lib/Target/Hexagon/HexagonISelLowering.cpp
vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrFormats.td
vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrFormatsV60.td
vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.cpp
vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.h
vendor/llvm/dist/lib/Target/Hexagon/HexagonMCInstLower.cpp
vendor/llvm/dist/lib/Target/Hexagon/HexagonOperands.td
vendor/llvm/dist/lib/Target/Hexagon/HexagonPseudo.td
vendor/llvm/dist/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
vendor/llvm/dist/lib/Target/Hexagon/HexagonVLIWPacketizer.h
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonFixupKinds.h
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCChecker.cpp
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCChecker.h
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCExpr.cpp
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCExpr.h
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.h
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp
vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.h
vendor/llvm/dist/lib/Target/Mips/Mips16HardFloat.cpp
vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h
vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
vendor/llvm/dist/lib/Target/X86/X86.td
vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp
vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp
vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h
vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp
vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td
vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp
vendor/llvm/dist/lib/Target/X86/X86Schedule.td
vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp
vendor/llvm/dist/lib/Target/X86/X86Subtarget.h
vendor/llvm/dist/lib/Target/X86/X86WinEHState.cpp
vendor/llvm/dist/lib/Transforms/Coroutines/CoroSplit.cpp
vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp
vendor/llvm/dist/lib/Transforms/IPO/FunctionAttrs.cpp
vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp
vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp
vendor/llvm/dist/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
vendor/llvm/dist/lib/Transforms/Instrumentation/InstrProfiling.cpp
vendor/llvm/dist/lib/Transforms/Instrumentation/MemorySanitizer.cpp
vendor/llvm/dist/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h
vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
vendor/llvm/dist/lib/Transforms/Scalar/GuardWidening.cpp
vendor/llvm/dist/lib/Transforms/Scalar/LoopDeletion.cpp
vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp
vendor/llvm/dist/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
vendor/llvm/dist/lib/Transforms/Scalar/SpeculativeExecution.cpp
vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp
vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp
vendor/llvm/dist/lib/Transforms/Utils/SimplifyLibCalls.cpp
vendor/llvm/dist/test/Analysis/CostModel/X86/masked-intrinsic-cost.ll
vendor/llvm/dist/test/Analysis/CostModel/X86/vector_gep.ll
vendor/llvm/dist/test/Assembler/auto_upgrade_intrinsics.ll
vendor/llvm/dist/test/CodeGen/ARM/build-attributes.ll
vendor/llvm/dist/test/CodeGen/AVR/brind.ll
vendor/llvm/dist/test/CodeGen/AVR/dynalloca.ll
vendor/llvm/dist/test/CodeGen/AVR/inline-asm/inline-asm.ll
vendor/llvm/dist/test/CodeGen/PowerPC/shift_mask.ll
vendor/llvm/dist/test/CodeGen/X86/addcarry.ll
vendor/llvm/dist/test/CodeGen/X86/masked_gather_scatter.ll
vendor/llvm/dist/test/CodeGen/X86/version_directive.ll
vendor/llvm/dist/test/CodeGen/X86/x86-32-intrcc.ll
vendor/llvm/dist/test/CodeGen/X86/x86-64-intrcc.ll
vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-header.elf-x86-64
vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-header.s
vendor/llvm/dist/test/DebugInfo/dwarfdump-header.test
vendor/llvm/dist/test/Feature/intrinsics.ll
vendor/llvm/dist/test/MC/Disassembler/X86/x86-32.txt
vendor/llvm/dist/test/MC/Disassembler/X86/x86-64.txt
vendor/llvm/dist/test/MC/Hexagon/iconst.s
vendor/llvm/dist/test/Transforms/BBVectorize/simple-int.ll
vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineOptRemark.ll
vendor/llvm/dist/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll
vendor/llvm/dist/test/Transforms/FunctionAttrs/readattrs.ll
vendor/llvm/dist/test/Transforms/GVN/2016-08-30-MaskedScatterGather.ll
vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll
vendor/llvm/dist/test/Transforms/InstCombine/masked_intrinsics.ll
vendor/llvm/dist/test/Transforms/InstCombine/pow-sqrt.ll
vendor/llvm/dist/test/Transforms/InstCombine/sub-xor.ll
vendor/llvm/dist/test/Transforms/LoopVectorize/X86/consecutive-ptr-uniforms.ll
vendor/llvm/dist/test/Transforms/LoopVectorize/X86/gather_scatter.ll
vendor/llvm/dist/test/Transforms/LoopVectorize/X86/scatter_crash.ll
vendor/llvm/dist/test/Transforms/NewGVN/2016-08-30-MaskedScatterGather.ll
vendor/llvm/dist/test/Transforms/ObjCARC/basic.ll
vendor/llvm/dist/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll
vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/call.ll
vendor/llvm/dist/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp
vendor/llvm/dist/tools/llvm-pdbdump/Diff.cpp
vendor/llvm/dist/tools/llvm-pdbdump/LLVMOutputStyle.cpp
vendor/llvm/dist/tools/llvm-pdbdump/YAMLOutputStyle.cpp
vendor/llvm/dist/tools/llvm-pdbdump/llvm-pdbdump.cpp
vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp
vendor/llvm/dist/tools/llvm-readobj/llvm-readobj.h
vendor/llvm/dist/tools/llvm-shlib/CMakeLists.txt
vendor/llvm/dist/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
vendor/llvm/dist/unittests/DebugInfo/PDB/ErrorChecking.h
vendor/llvm/dist/unittests/DebugInfo/PDB/StringTableBuilderTest.cpp
vendor/llvm/dist/unittests/ExecutionEngine/Orc/IndirectionUtilsTest.cpp
vendor/llvm/dist/unittests/IR/AttributesTest.cpp
vendor/llvm/dist/unittests/Support/BinaryStreamTest.cpp
vendor/llvm/dist/utils/TableGen/IntrinsicEmitter.cpp
vendor/llvm/dist/utils/lit/lit/main.py
vendor/llvm/dist/utils/lit/lit/run.py
Modified: vendor/llvm/dist/CMakeLists.txt
==============================================================================
--- vendor/llvm/dist/CMakeLists.txt Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/CMakeLists.txt Wed May 3 20:26:11 2017 (r317760)
@@ -530,6 +530,8 @@ if(LLVM_LINK_LLVM_DYLIB OR LLVM_BUILD_LL
endif()
option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" ${LLVM_BUILD_LLVM_DYLIB_default})
+option(LLVM_DYLIB_SYMBOL_VERSIONING OFF)
+
option(LLVM_OPTIMIZED_TABLEGEN "Force TableGen to be built with optimization" OFF)
if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND (LLVM_ENABLE_ASSERTIONS OR CMAKE_CONFIGURATION_TYPES)))
set(LLVM_USE_HOST_TOOLS ON)
Modified: vendor/llvm/dist/docs/LangRef.rst
==============================================================================
--- vendor/llvm/dist/docs/LangRef.rst Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/docs/LangRef.rst Wed May 3 20:26:11 2017 (r317760)
@@ -1539,7 +1539,7 @@ example:
This function attribute indicates that the function does not have any
effects besides calculating its result and does not have undefined behavior.
Note that ``speculatable`` is not enough to conclude that along any
- particular exection path the number of calls to this function will not be
+ particular execution path the number of calls to this function will not be
externally observable. This attribute is only valid on functions
and declarations, not on individual call sites. If a function is
incorrectly marked as speculatable and really does exhibit
@@ -7915,7 +7915,7 @@ makes sense:
; get pointers for 8 elements from array B
%ptrs = getelementptr double, double* %B, <8 x i32> %C
; load 8 elements from array B into A
- %A = call <8 x double> @llvm.masked.gather.v8f64(<8 x double*> %ptrs,
+ %A = call <8 x double> @llvm.masked.gather.v8f64.v8p0f64(<8 x double*> %ptrs,
i32 8, <8 x i1> %mask, <8 x double> %passthru)
Conversion Operations
@@ -12024,9 +12024,9 @@ This is an overloaded intrinsic. The loa
::
- declare <16 x float> @llvm.masked.gather.v16f32 (<16 x float*> <ptrs>, i32 <alignment>, <16 x i1> <mask>, <16 x float> <passthru>)
- declare <2 x double> @llvm.masked.gather.v2f64 (<2 x double*> <ptrs>, i32 <alignment>, <2 x i1> <mask>, <2 x double> <passthru>)
- declare <8 x float*> @llvm.masked.gather.v8p0f32 (<8 x float**> <ptrs>, i32 <alignment>, <8 x i1> <mask>, <8 x float*> <passthru>)
+ declare <16 x float> @llvm.masked.gather.v16f32.v16p0f32 (<16 x float*> <ptrs>, i32 <alignment>, <16 x i1> <mask>, <16 x float> <passthru>)
+ declare <2 x double> @llvm.masked.gather.v2f64.v2p1f64 (<2 x double addrspace(1)*> <ptrs>, i32 <alignment>, <2 x i1> <mask>, <2 x double> <passthru>)
+ declare <8 x float*> @llvm.masked.gather.v8p0f32.v8p0p0f32 (<8 x float**> <ptrs>, i32 <alignment>, <8 x i1> <mask>, <8 x float*> <passthru>)
Overview:
"""""""""
@@ -12049,7 +12049,7 @@ The semantics of this operation are equi
::
- %res = call <4 x double> @llvm.masked.gather.v4f64 (<4 x double*> %ptrs, i32 8, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x double> undef)
+ %res = call <4 x double> @llvm.masked.gather.v4f64.v4p0f64 (<4 x double*> %ptrs, i32 8, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x double> undef)
;; The gather with all-true mask is equivalent to the following instruction sequence
%ptr0 = extractelement <4 x double*> %ptrs, i32 0
@@ -12078,9 +12078,9 @@ This is an overloaded intrinsic. The dat
::
- declare void @llvm.masked.scatter.v8i32 (<8 x i32> <value>, <8 x i32*> <ptrs>, i32 <alignment>, <8 x i1> <mask>)
- declare void @llvm.masked.scatter.v16f32 (<16 x float> <value>, <16 x float*> <ptrs>, i32 <alignment>, <16 x i1> <mask>)
- declare void @llvm.masked.scatter.v4p0f64 (<4 x double*> <value>, <4 x double**> <ptrs>, i32 <alignment>, <4 x i1> <mask>)
+ declare void @llvm.masked.scatter.v8i32.v8p0i32 (<8 x i32> <value>, <8 x i32*> <ptrs>, i32 <alignment>, <8 x i1> <mask>)
+ declare void @llvm.masked.scatter.v16f32.v16p1f32 (<16 x float> <value>, <16 x float addrspace(1)*> <ptrs>, i32 <alignment>, <16 x i1> <mask>)
+ declare void @llvm.masked.scatter.v4p0f64.v4p0p0f64 (<4 x double*> <value>, <4 x double**> <ptrs>, i32 <alignment>, <4 x i1> <mask>)
Overview:
"""""""""
@@ -12101,7 +12101,7 @@ The '``llvm.masked.scatter``' intrinsics
::
;; This instruction unconditionally stores data vector in multiple addresses
- call @llvm.masked.scatter.v8i32 (<8 x i32> %value, <8 x i32*> %ptrs, i32 4, <8 x i1> <true, true, .. true>)
+ call @llvm.masked.scatter.v8i32.v8p0i32 (<8 x i32> %value, <8 x i32*> %ptrs, i32 4, <8 x i1> <true, true, .. true>)
;; It is equivalent to a list of scalar stores
%val0 = extractelement <8 x i32> %value, i32 0
Modified: vendor/llvm/dist/include/llvm/ADT/APInt.h
==============================================================================
--- vendor/llvm/dist/include/llvm/ADT/APInt.h Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/include/llvm/ADT/APInt.h Wed May 3 20:26:11 2017 (r317760)
@@ -86,7 +86,7 @@ private:
union {
uint64_t VAL; ///< Used to store the <= 64 bits integer value.
uint64_t *pVal; ///< Used to store the >64 bits integer value.
- };
+ } U;
unsigned BitWidth; ///< The number of bits in this APInt.
@@ -98,7 +98,9 @@ private:
///
/// This constructor is used only internally for speed of construction of
/// temporaries. It is unsafe for general use so it is not public.
- APInt(uint64_t *val, unsigned bits) : pVal(val), BitWidth(bits) {}
+ APInt(uint64_t *val, unsigned bits) : BitWidth(bits) {
+ U.pVal = val;
+ }
/// \brief Determine if this APInt just has one word to store value.
///
@@ -143,16 +145,16 @@ private:
// Mask out the high bits.
uint64_t mask = WORD_MAX >> (APINT_BITS_PER_WORD - WordBits);
if (isSingleWord())
- VAL &= mask;
+ U.VAL &= mask;
else
- pVal[getNumWords() - 1] &= mask;
+ U.pVal[getNumWords() - 1] &= mask;
return *this;
}
/// \brief Get the word corresponding to a bit position
/// \returns the corresponding word for the specified bit position.
uint64_t getWord(unsigned bitPosition) const {
- return isSingleWord() ? VAL : pVal[whichWord(bitPosition)];
+ return isSingleWord() ? U.VAL : U.pVal[whichWord(bitPosition)];
}
/// \brief Convert a char array into an APInt
@@ -258,7 +260,7 @@ public:
: BitWidth(numBits) {
assert(BitWidth && "bitwidth too small");
if (isSingleWord()) {
- VAL = val;
+ U.VAL = val;
clearUnusedBits();
} else {
initSlowCase(val, isSigned);
@@ -300,20 +302,21 @@ public:
/// @brief Copy Constructor.
APInt(const APInt &that) : BitWidth(that.BitWidth) {
if (isSingleWord())
- VAL = that.VAL;
+ U.VAL = that.U.VAL;
else
initSlowCase(that);
}
/// \brief Move Constructor.
- APInt(APInt &&that) : VAL(that.VAL), BitWidth(that.BitWidth) {
+ APInt(APInt &&that) : BitWidth(that.BitWidth) {
+ memcpy(&U, &that.U, sizeof(U));
that.BitWidth = 0;
}
/// \brief Destructor.
~APInt() {
if (needsCleanup())
- delete[] pVal;
+ delete[] U.pVal;
}
/// \brief Default constructor that creates an uninteresting APInt
@@ -321,7 +324,7 @@ public:
///
/// This is useful for object deserialization (pair this with the static
/// method Read).
- explicit APInt() : VAL(0), BitWidth(1) {}
+ explicit APInt() : BitWidth(1) { U.VAL = 0; }
/// \brief Returns whether this instance allocated memory.
bool needsCleanup() const { return !isSingleWord(); }
@@ -373,7 +376,7 @@ public:
/// This checks to see if the value has all bits of the APInt are set or not.
bool isAllOnesValue() const {
if (isSingleWord())
- return VAL == WORD_MAX >> (APINT_BITS_PER_WORD - BitWidth);
+ return U.VAL == WORD_MAX >> (APINT_BITS_PER_WORD - BitWidth);
return countPopulationSlowCase() == BitWidth;
}
@@ -428,7 +431,7 @@ public:
/// \returns true if the argument APInt value is a power of two > 0.
bool isPowerOf2() const {
if (isSingleWord())
- return isPowerOf2_64(VAL);
+ return isPowerOf2_64(U.VAL);
return countPopulationSlowCase() == 1;
}
@@ -461,7 +464,7 @@ public:
assert(numBits != 0 && "numBits must be non-zero");
assert(numBits <= BitWidth && "numBits out of range");
if (isSingleWord())
- return VAL == (WORD_MAX >> (APINT_BITS_PER_WORD - numBits));
+ return U.VAL == (WORD_MAX >> (APINT_BITS_PER_WORD - numBits));
unsigned Ones = countTrailingOnesSlowCase();
return (numBits == Ones) &&
((Ones + countLeadingZerosSlowCase()) == BitWidth);
@@ -472,7 +475,7 @@ public:
/// Ex. isMask(0x0000FFFFU) == true.
bool isMask() const {
if (isSingleWord())
- return isMask_64(VAL);
+ return isMask_64(U.VAL);
unsigned Ones = countTrailingOnesSlowCase();
return (Ones > 0) && ((Ones + countLeadingZerosSlowCase()) == BitWidth);
}
@@ -481,7 +484,7 @@ public:
/// the remainder zero.
bool isShiftedMask() const {
if (isSingleWord())
- return isShiftedMask_64(VAL);
+ return isShiftedMask_64(U.VAL);
unsigned Ones = countPopulationSlowCase();
unsigned LeadZ = countLeadingZerosSlowCase();
return (Ones + LeadZ + countTrailingZeros()) == BitWidth;
@@ -639,8 +642,8 @@ public:
/// conversions.
const uint64_t *getRawData() const {
if (isSingleWord())
- return &VAL;
- return &pVal[0];
+ return &U.VAL;
+ return &U.pVal[0];
}
/// @}
@@ -686,7 +689,7 @@ public:
/// \returns true if *this is zero, false otherwise.
bool operator!() const {
if (isSingleWord())
- return VAL == 0;
+ return U.VAL == 0;
return countLeadingZerosSlowCase() == BitWidth;
}
@@ -700,7 +703,7 @@ public:
APInt &operator=(const APInt &RHS) {
// If the bitwidths are the same, we can avoid mucking with memory
if (isSingleWord() && RHS.isSingleWord()) {
- VAL = RHS.VAL;
+ U.VAL = RHS.U.VAL;
BitWidth = RHS.BitWidth;
return clearUnusedBits();
}
@@ -713,11 +716,11 @@ public:
APInt &operator=(APInt &&that) {
assert(this != &that && "Self-move not supported");
if (!isSingleWord())
- delete[] pVal;
+ delete[] U.pVal;
// Use memcpy so that type based alias analysis sees both VAL and pVal
// as modified.
- memcpy(&VAL, &that.VAL, sizeof(uint64_t));
+ memcpy(&U, &that.U, sizeof(U));
BitWidth = that.BitWidth;
that.BitWidth = 0;
@@ -734,11 +737,11 @@ public:
/// \returns *this after assignment of RHS value.
APInt &operator=(uint64_t RHS) {
if (isSingleWord()) {
- VAL = RHS;
+ U.VAL = RHS;
clearUnusedBits();
} else {
- pVal[0] = RHS;
- memset(pVal+1, 0, (getNumWords() - 1) * APINT_WORD_SIZE);
+ U.pVal[0] = RHS;
+ memset(U.pVal+1, 0, (getNumWords() - 1) * APINT_WORD_SIZE);
}
return *this;
}
@@ -752,7 +755,7 @@ public:
APInt &operator&=(const APInt &RHS) {
assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
if (isSingleWord())
- VAL &= RHS.VAL;
+ U.VAL &= RHS.U.VAL;
else
AndAssignSlowCase(RHS);
return *this;
@@ -765,11 +768,11 @@ public:
/// the LHS.
APInt &operator&=(uint64_t RHS) {
if (isSingleWord()) {
- VAL &= RHS;
+ U.VAL &= RHS;
return *this;
}
- pVal[0] &= RHS;
- memset(pVal+1, 0, (getNumWords() - 1) * APINT_WORD_SIZE);
+ U.pVal[0] &= RHS;
+ memset(U.pVal+1, 0, (getNumWords() - 1) * APINT_WORD_SIZE);
return *this;
}
@@ -782,7 +785,7 @@ public:
APInt &operator|=(const APInt &RHS) {
assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
if (isSingleWord())
- VAL |= RHS.VAL;
+ U.VAL |= RHS.U.VAL;
else
OrAssignSlowCase(RHS);
return *this;
@@ -795,10 +798,10 @@ public:
/// the LHS.
APInt &operator|=(uint64_t RHS) {
if (isSingleWord()) {
- VAL |= RHS;
+ U.VAL |= RHS;
clearUnusedBits();
} else {
- pVal[0] |= RHS;
+ U.pVal[0] |= RHS;
}
return *this;
}
@@ -812,7 +815,7 @@ public:
APInt &operator^=(const APInt &RHS) {
assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
if (isSingleWord())
- VAL ^= RHS.VAL;
+ U.VAL ^= RHS.U.VAL;
else
XorAssignSlowCase(RHS);
return *this;
@@ -825,10 +828,10 @@ public:
/// the LHS.
APInt &operator^=(uint64_t RHS) {
if (isSingleWord()) {
- VAL ^= RHS;
+ U.VAL ^= RHS;
clearUnusedBits();
} else {
- pVal[0] ^= RHS;
+ U.pVal[0] ^= RHS;
}
return *this;
}
@@ -865,9 +868,9 @@ public:
assert(ShiftAmt <= BitWidth && "Invalid shift amount");
if (isSingleWord()) {
if (ShiftAmt == BitWidth)
- VAL = 0;
+ U.VAL = 0;
else
- VAL <<= ShiftAmt;
+ U.VAL <<= ShiftAmt;
return clearUnusedBits();
}
shlSlowCase(ShiftAmt);
@@ -913,11 +916,11 @@ public:
void ashrInPlace(unsigned ShiftAmt) {
assert(ShiftAmt <= BitWidth && "Invalid shift amount");
if (isSingleWord()) {
- int64_t SExtVAL = SignExtend64(VAL, BitWidth);
+ int64_t SExtVAL = SignExtend64(U.VAL, BitWidth);
if (ShiftAmt == BitWidth)
- VAL = SExtVAL >> (APINT_BITS_PER_WORD - 1); // Fill with sign bit.
+ U.VAL = SExtVAL >> (APINT_BITS_PER_WORD - 1); // Fill with sign bit.
else
- VAL = SExtVAL >> ShiftAmt;
+ U.VAL = SExtVAL >> ShiftAmt;
clearUnusedBits();
return;
}
@@ -938,9 +941,9 @@ public:
assert(ShiftAmt <= BitWidth && "Invalid shift amount");
if (isSingleWord()) {
if (ShiftAmt == BitWidth)
- VAL = 0;
+ U.VAL = 0;
else
- VAL >>= ShiftAmt;
+ U.VAL >>= ShiftAmt;
return;
}
lshrSlowCase(ShiftAmt);
@@ -1059,7 +1062,7 @@ public:
bool operator[](unsigned bitPosition) const {
assert(bitPosition < getBitWidth() && "Bit position out of bounds!");
return (maskBit(bitPosition) &
- (isSingleWord() ? VAL : pVal[whichWord(bitPosition)])) !=
+ (isSingleWord() ? U.VAL : U.pVal[whichWord(bitPosition)])) !=
0;
}
@@ -1074,7 +1077,7 @@ public:
bool operator==(const APInt &RHS) const {
assert(BitWidth == RHS.BitWidth && "Comparison requires equal bit widths");
if (isSingleWord())
- return VAL == RHS.VAL;
+ return U.VAL == RHS.U.VAL;
return EqualSlowCase(RHS);
}
@@ -1265,7 +1268,7 @@ public:
bool intersects(const APInt &RHS) const {
assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
if (isSingleWord())
- return (VAL & RHS.VAL) != 0;
+ return (U.VAL & RHS.U.VAL) != 0;
return intersectsSlowCase(RHS);
}
@@ -1273,7 +1276,7 @@ public:
bool isSubsetOf(const APInt &RHS) const {
assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
if (isSingleWord())
- return (VAL & ~RHS.VAL) == 0;
+ return (U.VAL & ~RHS.U.VAL) == 0;
return isSubsetOfSlowCase(RHS);
}
@@ -1333,10 +1336,10 @@ public:
/// \brief Set every bit to 1.
void setAllBits() {
if (isSingleWord())
- VAL = WORD_MAX;
+ U.VAL = WORD_MAX;
else
// Set all the bits in all the words.
- memset(pVal, -1, getNumWords() * APINT_WORD_SIZE);
+ memset(U.pVal, -1, getNumWords() * APINT_WORD_SIZE);
// Clear the unused ones
clearUnusedBits();
}
@@ -1348,9 +1351,9 @@ public:
assert(BitPosition <= BitWidth && "BitPosition out of range");
WordType Mask = maskBit(BitPosition);
if (isSingleWord())
- VAL |= Mask;
+ U.VAL |= Mask;
else
- pVal[whichWord(BitPosition)] |= Mask;
+ U.pVal[whichWord(BitPosition)] |= Mask;
}
/// Set the sign bit to 1.
@@ -1369,9 +1372,9 @@ public:
uint64_t mask = WORD_MAX >> (APINT_BITS_PER_WORD - (hiBit - loBit));
mask <<= loBit;
if (isSingleWord())
- VAL |= mask;
+ U.VAL |= mask;
else
- pVal[0] |= mask;
+ U.pVal[0] |= mask;
} else {
setBitsSlowCase(loBit, hiBit);
}
@@ -1395,9 +1398,9 @@ public:
/// \brief Set every bit to 0.
void clearAllBits() {
if (isSingleWord())
- VAL = 0;
+ U.VAL = 0;
else
- memset(pVal, 0, getNumWords() * APINT_WORD_SIZE);
+ memset(U.pVal, 0, getNumWords() * APINT_WORD_SIZE);
}
/// \brief Set a given bit to 0.
@@ -1407,9 +1410,9 @@ public:
assert(BitPosition <= BitWidth && "BitPosition out of range");
WordType Mask = ~maskBit(BitPosition);
if (isSingleWord())
- VAL &= Mask;
+ U.VAL &= Mask;
else
- pVal[whichWord(BitPosition)] &= Mask;
+ U.pVal[whichWord(BitPosition)] &= Mask;
}
/// Set the sign bit to 0.
@@ -1420,7 +1423,7 @@ public:
/// \brief Toggle every bit to its opposite value.
void flipAllBits() {
if (isSingleWord()) {
- VAL ^= WORD_MAX;
+ U.VAL ^= WORD_MAX;
clearUnusedBits();
} else {
flipAllBitsSlowCase();
@@ -1500,9 +1503,9 @@ public:
/// uint64_t. Otherwise an assertion will result.
uint64_t getZExtValue() const {
if (isSingleWord())
- return VAL;
+ return U.VAL;
assert(getActiveBits() <= 64 && "Too many bits for uint64_t");
- return pVal[0];
+ return U.pVal[0];
}
/// \brief Get sign extended value
@@ -1512,9 +1515,9 @@ public:
/// int64_t. Otherwise an assertion will result.
int64_t getSExtValue() const {
if (isSingleWord())
- return SignExtend64(VAL, BitWidth);
+ return SignExtend64(U.VAL, BitWidth);
assert(getMinSignedBits() <= 64 && "Too many bits for int64_t");
- return int64_t(pVal[0]);
+ return int64_t(U.pVal[0]);
}
/// \brief Get bits required for string value.
@@ -1534,7 +1537,7 @@ public:
unsigned countLeadingZeros() const {
if (isSingleWord()) {
unsigned unusedBits = APINT_BITS_PER_WORD - BitWidth;
- return llvm::countLeadingZeros(VAL) - unusedBits;
+ return llvm::countLeadingZeros(U.VAL) - unusedBits;
}
return countLeadingZerosSlowCase();
}
@@ -1575,7 +1578,7 @@ public:
/// of ones from the least significant bit to the first zero bit.
unsigned countTrailingOnes() const {
if (isSingleWord())
- return llvm::countTrailingOnes(VAL);
+ return llvm::countTrailingOnes(U.VAL);
return countTrailingOnesSlowCase();
}
@@ -1587,7 +1590,7 @@ public:
/// \returns 0 if the value is zero, otherwise returns the number of set bits.
unsigned countPopulation() const {
if (isSingleWord())
- return llvm::countPopulation(VAL);
+ return llvm::countPopulation(U.VAL);
return countPopulationSlowCase();
}
@@ -1646,7 +1649,7 @@ public:
uint64_t I;
double D;
} T;
- T.I = (isSingleWord() ? VAL : pVal[0]);
+ T.I = (isSingleWord() ? U.VAL : U.pVal[0]);
return T.D;
}
@@ -1660,7 +1663,7 @@ public:
unsigned I;
float F;
} T;
- T.I = unsigned((isSingleWord() ? VAL : pVal[0]));
+ T.I = unsigned((isSingleWord() ? U.VAL : U.pVal[0]));
return T.F;
}
@@ -1718,7 +1721,7 @@ public:
// get 0. If VAL is 0, we get WORD_MAX which gets truncated to
// UINT32_MAX.
if (BitWidth == 1)
- return VAL - 1;
+ return U.VAL - 1;
// Handle the zero case.
if (isNullValue())
Modified: vendor/llvm/dist/include/llvm/CodeGen/CommandFlags.h
==============================================================================
--- vendor/llvm/dist/include/llvm/CodeGen/CommandFlags.h Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/include/llvm/CodeGen/CommandFlags.h Wed May 3 20:26:11 2017 (r317760)
@@ -346,29 +346,21 @@ static inline void setFunctionAttributes
Module &M) {
for (auto &F : M) {
auto &Ctx = F.getContext();
- AttributeList Attrs = F.getAttributes(), NewAttrs;
+ AttributeList Attrs = F.getAttributes();
+ AttrBuilder NewAttrs;
if (!CPU.empty())
- NewAttrs = NewAttrs.addAttribute(Ctx, AttributeList::FunctionIndex,
- "target-cpu", CPU);
-
+ NewAttrs.addAttribute("target-cpu", CPU);
if (!Features.empty())
- NewAttrs = NewAttrs.addAttribute(Ctx, AttributeList::FunctionIndex,
- "target-features", Features);
-
+ NewAttrs.addAttribute("target-features", Features);
if (DisableFPElim.getNumOccurrences() > 0)
- NewAttrs = NewAttrs.addAttribute(Ctx, AttributeList::FunctionIndex,
- "no-frame-pointer-elim",
- DisableFPElim ? "true" : "false");
-
+ NewAttrs.addAttribute("no-frame-pointer-elim",
+ DisableFPElim ? "true" : "false");
if (DisableTailCalls.getNumOccurrences() > 0)
- NewAttrs = NewAttrs.addAttribute(Ctx, AttributeList::FunctionIndex,
- "disable-tail-calls",
- toStringRef(DisableTailCalls));
-
+ NewAttrs.addAttribute("disable-tail-calls",
+ toStringRef(DisableTailCalls));
if (StackRealign)
- NewAttrs = NewAttrs.addAttribute(Ctx, AttributeList::FunctionIndex,
- "stackrealign");
+ NewAttrs.addAttribute("stackrealign");
if (TrapFuncName.getNumOccurrences() > 0)
for (auto &B : F)
@@ -382,8 +374,8 @@ static inline void setFunctionAttributes
Attribute::get(Ctx, "trap-func-name", TrapFuncName));
// Let NewAttrs override Attrs.
- NewAttrs = Attrs.addAttributes(Ctx, AttributeList::FunctionIndex, NewAttrs);
- F.setAttributes(NewAttrs);
+ F.setAttributes(
+ Attrs.addAttributes(Ctx, AttributeList::FunctionIndex, NewAttrs));
}
}
Modified: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVRecord.h
==============================================================================
--- vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVRecord.h Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVRecord.h Wed May 3 20:26:11 2017 (r317760)
@@ -53,7 +53,7 @@ struct VarStreamArrayExtractor<codeview:
typedef void ContextType;
static Error extract(BinaryStreamRef Stream, uint32_t &Len,
- codeview::CVRecord<Kind> &Item, void *Ctx) {
+ codeview::CVRecord<Kind> &Item) {
using namespace codeview;
const RecordPrefix *Prefix = nullptr;
BinaryStreamReader Reader(Stream);
Modified: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h
==============================================================================
--- vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h Wed May 3 20:26:11 2017 (r317760)
@@ -21,6 +21,8 @@
namespace llvm {
namespace codeview {
+class StringTable;
+
struct FileChecksumEntry {
uint32_t FileNameOffset; // Byte offset of filename in global stringtable.
FileChecksumKind Kind; // The type of checksum.
@@ -35,7 +37,7 @@ public:
typedef void ContextType;
static Error extract(BinaryStreamRef Stream, uint32_t &Len,
- codeview::FileChecksumEntry &Item, void *Ctx);
+ codeview::FileChecksumEntry &Item);
};
}
@@ -55,8 +57,8 @@ public:
Error initialize(BinaryStreamReader Reader);
- Iterator begin() const { return Checksums.begin(); }
- Iterator end() const { return Checksums.end(); }
+ Iterator begin() { return Checksums.begin(); }
+ Iterator end() { return Checksums.end(); }
const FileChecksumArray &getArray() const { return Checksums; }
@@ -66,20 +68,22 @@ private:
class ModuleDebugFileChecksumFragment final : public ModuleDebugFragment {
public:
- ModuleDebugFileChecksumFragment();
+ explicit ModuleDebugFileChecksumFragment(StringTable &Strings);
static bool classof(const ModuleDebugFragment *S) {
return S->kind() == ModuleDebugFragmentKind::FileChecksums;
}
- void addChecksum(uint32_t StringTableOffset, FileChecksumKind Kind,
+ void addChecksum(StringRef FileName, FileChecksumKind Kind,
ArrayRef<uint8_t> Bytes);
uint32_t calculateSerializedLength() override;
Error commit(BinaryStreamWriter &Writer) override;
- uint32_t mapChecksumOffset(uint32_t StringTableOffset) const;
+ uint32_t mapChecksumOffset(StringRef FileName) const;
private:
+ StringTable &Strings;
+
DenseMap<uint32_t, uint32_t> OffsetMap;
uint32_t SerializedSize = 0;
llvm::BumpPtrAllocator Storage;
Modified: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugFragmentRecord.h
==============================================================================
--- vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugFragmentRecord.h Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugFragmentRecord.h Wed May 3 20:26:11 2017 (r317760)
@@ -57,8 +57,6 @@ private:
ModuleDebugFragment &Frag;
};
-typedef VarStreamArray<ModuleDebugFragmentRecord> ModuleDebugFragmentArray;
-
} // namespace codeview
template <>
@@ -66,13 +64,17 @@ struct VarStreamArrayExtractor<codeview:
typedef void ContextType;
static Error extract(BinaryStreamRef Stream, uint32_t &Length,
- codeview::ModuleDebugFragmentRecord &Info, void *Ctx) {
+ codeview::ModuleDebugFragmentRecord &Info) {
if (auto EC = codeview::ModuleDebugFragmentRecord::initialize(Stream, Info))
return EC;
Length = Info.getRecordLength();
return Error::success();
}
};
+
+namespace codeview {
+typedef VarStreamArray<ModuleDebugFragmentRecord> ModuleDebugFragmentArray;
+}
} // namespace llvm
#endif // LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENTRECORD_H
Modified: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h
==============================================================================
--- vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h Wed May 3 20:26:11 2017 (r317760)
@@ -20,6 +20,8 @@ namespace llvm {
namespace codeview {
class ModuleDebugInlineeLineFragmentRef;
+class ModuleDebugFileChecksumFragment;
+class StringTable;
enum class InlineeLinesSignature : uint32_t {
Normal, // CV_INLINEE_SOURCE_LINE_SIGNATURE
@@ -42,11 +44,10 @@ struct InlineeSourceLine {
}
template <> struct VarStreamArrayExtractor<codeview::InlineeSourceLine> {
- typedef codeview::ModuleDebugInlineeLineFragmentRef ContextType;
+ typedef bool ContextType;
static Error extract(BinaryStreamRef Stream, uint32_t &Len,
- codeview::InlineeSourceLine &Item,
- ContextType *Fragment);
+ codeview::InlineeSourceLine &Item, bool HasExtraFiles);
};
namespace codeview {
@@ -74,7 +75,8 @@ private:
class ModuleDebugInlineeLineFragment final : public ModuleDebugFragment {
public:
- explicit ModuleDebugInlineeLineFragment(bool HasExtraFiles);
+ ModuleDebugInlineeLineFragment(ModuleDebugFileChecksumFragment &Checksums,
+ bool HasExtraFiles);
static bool classof(const ModuleDebugFragment *S) {
return S->kind() == ModuleDebugFragmentKind::InlineeLines;
@@ -83,11 +85,12 @@ public:
Error commit(BinaryStreamWriter &Writer) override;
uint32_t calculateSerializedLength() override;
- void addInlineSite(TypeIndex FuncId, uint32_t FileOffset,
- uint32_t SourceLine);
- void addExtraFile(uint32_t FileOffset);
+ void addInlineSite(TypeIndex FuncId, StringRef FileName, uint32_t SourceLine);
+ void addExtraFile(StringRef FileName);
private:
+ ModuleDebugFileChecksumFragment &Checksums;
+
bool HasExtraFiles = false;
uint32_t ExtraFileCount = 0;
Modified: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h
==============================================================================
--- vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h Wed May 3 20:26:11 2017 (r317760)
@@ -19,6 +19,9 @@
namespace llvm {
namespace codeview {
+class ModuleDebugFileChecksumFragment;
+class StringTable;
+
// Corresponds to the `CV_DebugSLinesHeader_t` structure.
struct LineFragmentHeader {
support::ulittle32_t RelocOffset; // Code offset of line contribution.
@@ -61,10 +64,10 @@ struct LineColumnEntry {
class LineColumnExtractor {
public:
- typedef const LineFragmentHeader ContextType;
+ typedef const LineFragmentHeader *ContextType;
static Error extract(BinaryStreamRef Stream, uint32_t &Len,
- LineColumnEntry &Item, const LineFragmentHeader *Header);
+ LineColumnEntry &Item, const LineFragmentHeader *Ctx);
};
class ModuleDebugLineFragmentRef final : public ModuleDebugFragmentRef {
@@ -104,13 +107,14 @@ class ModuleDebugLineFragment final : pu
};
public:
- ModuleDebugLineFragment();
+ ModuleDebugLineFragment(ModuleDebugFileChecksumFragment &Checksums,
+ StringTable &Strings);
static bool classof(const ModuleDebugFragment *S) {
return S->kind() == ModuleDebugFragmentKind::Lines;
}
- void createBlock(uint32_t ChecksumBufferOffset);
+ void createBlock(StringRef FileName);
void addLineInfo(uint32_t Offset, const LineInfo &Line);
void addLineAndColumnInfo(uint32_t Offset, const LineInfo &Line,
uint32_t ColStart, uint32_t ColEnd);
@@ -125,6 +129,8 @@ public:
bool hasColumnInfo() const;
private:
+ ModuleDebugFileChecksumFragment &Checksums;
+
uint16_t RelocOffset = 0;
uint16_t RelocSegment = 0;
uint32_t CodeSize = 0;
Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/StringTable.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/StringTable.h Wed May 3 20:26:11 2017 (r317760)
@@ -0,0 +1,75 @@
+//===- StringTable.h - CodeView String Table Reader/Writer ------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_CODEVIEW_STRINGTABLE_H
+#define LLVM_DEBUGINFO_CODEVIEW_STRINGTABLE_H
+
+#include "llvm/ADT/StringMap.h"
+#include "llvm/ADT/StringRef.h"
+
+#include "llvm/Support/BinaryStreamRef.h"
+#include "llvm/Support/Error.h"
+
+#include <stdint.h>
+
+namespace llvm {
+
+class BinaryStreamReader;
+class BinaryStreamRef;
+class BinaryStreamWriter;
+
+namespace codeview {
+
+/// Represents a read-only view of a CodeView string table. This is a very
+/// simple flat buffer consisting of null-terminated strings, where strings
+/// are retrieved by their offset in the buffer. StringTableRef does not own
+/// the underlying storage for the buffer.
+class StringTableRef {
+public:
+ StringTableRef();
+
+ Error initialize(BinaryStreamRef Contents);
+
+ Expected<StringRef> getString(uint32_t Offset) const;
+
+ bool valid() const { return Stream.valid(); }
+
+private:
+ BinaryStreamRef Stream;
+};
+
+/// Represents a read-write view of a CodeView string table. StringTable owns
+/// the underlying storage for the table, and is capable of serializing the
+/// string table into a format understood by StringTableRef.
+class StringTable {
+public:
+ // If string S does not exist in the string table, insert it.
+ // Returns the ID for S.
+ uint32_t insert(StringRef S);
+
+ // Return the ID for string S. Assumes S exists in the table.
+ uint32_t getStringId(StringRef S) const;
+
+ uint32_t calculateSerializedSize() const;
+ Error commit(BinaryStreamWriter &Writer) const;
+
+ uint32_t size() const;
+
+ StringMap<uint32_t>::const_iterator begin() const { return Strings.begin(); }
+
+ StringMap<uint32_t>::const_iterator end() const { return Strings.end(); }
+
+private:
+ StringMap<uint32_t> Strings;
+ uint32_t StringSize = 1;
+};
+}
+}
+
+#endif
Modified: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h
==============================================================================
--- vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h Wed May 3 20:26:11 2017 (r317760)
@@ -19,13 +19,15 @@ class BinaryStreamReader;
namespace codeview {
+class StringTableRef;
+
class SymbolVisitorDelegate {
public:
virtual ~SymbolVisitorDelegate() = default;
virtual uint32_t getRecordOffset(BinaryStreamReader Reader) = 0;
virtual StringRef getFileNameForFileOffset(uint32_t FileOffset) = 0;
- virtual StringRef getStringTable() = 0;
+ virtual StringTableRef getStringTable() = 0;
};
} // end namespace codeview
Modified: vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h
==============================================================================
--- vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h Wed May 3 20:26:11 2017 (r317760)
@@ -172,6 +172,9 @@ public:
return DWOCUs[index].get();
}
+ /// Get a DIE given an exact offset.
+ DWARFDie getDIEForOffset(uint32_t Offset);
+
const DWARFUnitIndex &getCUIndex();
DWARFGdbIndex &getGdbIndex();
const DWARFUnitIndex &getTUIndex();
Modified: vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
==============================================================================
--- vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h Wed May 3 20:26:11 2017 (r317760)
@@ -30,7 +30,7 @@ public:
struct FileNameEntry {
FileNameEntry() = default;
- const char *Name = nullptr;
+ StringRef Name = StringRef();
uint64_t DirIdx = 0;
uint64_t ModTime = 0;
uint64_t Length = 0;
@@ -44,6 +44,10 @@ public:
uint64_t TotalLength;
/// Version identifier for the statement information format.
uint16_t Version;
+ /// In v5, size in bytes of an address (or segment offset).
+ uint8_t AddressSize;
+ /// In v5, size in bytes of a segment selector.
+ uint8_t SegSelectorSize;
/// The number of bytes following the prologue_length field to the beginning
/// of the first byte of the statement program itself.
uint64_t PrologueLength;
@@ -63,7 +67,7 @@ public:
/// The number assigned to the first special opcode.
uint8_t OpcodeBase;
std::vector<uint8_t> StandardOpcodeLengths;
- std::vector<const char *> IncludeDirectories;
+ std::vector<StringRef> IncludeDirectories;
std::vector<FileNameEntry> FileNames;
bool IsDWARF64;
@@ -100,7 +104,7 @@ public:
void postAppend();
void reset(bool DefaultIsStmt);
void dump(raw_ostream &OS) const;
-
+ static void dumpTableHeader(raw_ostream &OS);
static bool orderByAddress(const Row &LHS, const Row &RHS) {
return LHS.Address < RHS.Address;
}
Modified: vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h
==============================================================================
--- vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h Wed May 3 19:56:55 2017 (r317759)
+++ vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h Wed May 3 20:26:11 2017 (r317760)
@@ -312,9 +312,9 @@ public:
[](const DWARFDebugInfoEntry &LHS, uint32_t Offset) {
return LHS.getOffset() < Offset;
});
- if (it == DieArray.end())
- return DWARFDie();
- return DWARFDie(this, &*it);
+ if (it != DieArray.end() && it->getOffset() == Offset)
+ return DWARFDie(this, &*it);
+ return DWARFDie();
}
uint32_t getLineTableOffset() const {
Added: vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFVerifier.h Wed May 3 20:26:11 2017 (r317760)
@@ -0,0 +1,98 @@
+//===- DWARFVerifier.h ----------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_DWARF_DWARFVERIFIER_H
+#define LLVM_DEBUGINFO_DWARF_DWARFVERIFIER_H
+
+#include <cstdint>
+#include <map>
+#include <set>
+
+namespace llvm {
+class raw_ostream;
+struct DWARFAttribute;
+class DWARFContext;
+class DWARFDie;
+class DWARFUnit;
+
+/// A class that verifies DWARF debug information given a DWARF Context.
+class DWARFVerifier {
+ raw_ostream &OS;
+ DWARFContext &DCtx;
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-vendor
mailing list