Consolidate some duplicate code used by forall query.
Delete extra query test.
Squashed 'llvm/' changes from 58cb7be..fb59c03

fb59c03 Relax the gcov version.ll test to check '.' instead of '\*'
b036e71 Silence MSVC warning on missing return after fully covered switch
6f485c0 R600/SI: Fix fmin_legacy / fmax_legacy matching for SI
e094cca Use nullptr instead of NULL for variadic sentinels
7984fde Revert "[GVN] Perform Scalar PRE on gep indices that feed loads before doing Load PRE."
a5408b9 [x86] Add some tests for specific patterns of lane-flips combined with in-lane shuffles that aren't always handled well by the current vector shuffle lowering.
83e56d6 Move calls to push_back out of readAbbreviated(Literal|Field).
c12b641 Avoid usage of char16_t as MSVC "14" doesn't appear to support it
de67e5c Fix nested namespace with decltype to hopefully work with MSVC
b92db75 Make a few helper functions static. NFC.
bea87da Use unique_ptr to handle ownership of TreePatterns in CodeGenDAGPatterns::PatternFragments
365df40 We can get the TLOF from the TargetMachine - so constructor no longer requires TargetLoweringObjectFile to be passed.
a9cc4e7 [GVN] Perform Scalar PRE on gep indices that feed loads before doing Load PRE.
add7c56 [FastISel][AArch64] Don't bail during simple GEP instruction selection.
01ab7a8 R600/SI: Use s_movk_i32
0fed4c6 R600/SI: Fix definition for s_cselect_b32
60c3acb R600: Fix assert on empty function
fb113f6 Un-break the big-endian buildbots
8082990 R600: Error on initializer for LDS.
b44e436 R600/SI: Get rid of FCLAMP_SI pseudo
4141e00 Object, Mach-O: Refactor and clean code up
89a5f54 Use -Wcast-qual in cmake builds, not only autoconfo ones.
e59f9f4 R600/SI: Allow commuting with src2_modifiers
1aae959 R600/SI: Allow commuting some 3 op instructions
ab9c404 Return word_t from read.
8bca5de ARM: allow constpool entry to be moved to the user's block in all cases.
064da63 ARM: avoid duplicating branches during constant islands.
5bd311b ARM: add @llvm.arm.space intrinsic for testing ConstantIslands.
bb11e56 Fix the other build system.
961f1bb Fix a regression on the disassembling C API.
511fa66 [Hexagon] NFC Renaming reserved identifier.
ddf4026 [Reassociate] Update comment. NFC.
9731c7a Simplify code a bit. NFC.
a9fbbb4 Small optimization: once the size is know, we don't have to call fillCurWord.
dbe68ad Fixing -Wtype-limits warnings with the asserts (the expression would always evaluate to true). Also fixing a -Wcast-qual warning, where the cast expression isn't required.
5f34bd9 Fixing some sign comparison warnings from MSVC; NFC.
b89064f IR: Create the Metadata class
18e1185 AVX-512: SINT_TO_FP cost model and some bugfixes Checked some corner cases, for example translation of <8 x i1> to <8 x double>
a98fcec Object, COFF: Refactor code to get relocation iterators
6fef94e OCAMLFLAGS can contain =, don't use = with sed
847729d This patch changes the ownership of TLOF from TargetLoweringBase to TargetMachine so that different subtargets could share the TLOF effectively
db1e513 Revert r219432 - "Revert "[BasicAA] Revert "Revert r218714 - Make better use of zext and sign information."""
b6ddb3c Object, COFF: Increase code reuse
aff22c9 llvm-readobj: relocAddressLess could potentially lie
f6a1958 llvm-readobj, COFF: Remove an unused variable
344411b Object, COFF: getRelocationSymbol shouldn't assert
f7046b7 Object, COFF: Cleanup some code in getSectionName
465237b Object, COFF: Fix some theoretical bugs
7daa543 Object, COFF: Clean up formatting in hasExtendedRelocations
509156a Read 64 bits at a time in the bitcode reader.
551319d Update \param(s) in MemoryObject::readBytes(). [-Wdocumentation]
4ea3097 [x86] Teach the vector shuffle lowering to make a more nuanced decision between splitting a vector into 128-bit lanes and recombining them vs. decomposing things into single-input shuffles and a final blend.
08f70b5 llvm-readobj: Print out address table when dumping COFF delay-import table
7880ed5 Add an assert and a test that verify r221709's fix.
927a5f4 [x86] Don't form overly fragmented blends when splitting and re-combining shuffles because nothing was available in the wider vector type.
e8a8dea [CodeGenPrepare] Handle zero extensions in the TypePromotionHelper.
7ccd2f5 CMake: stop setting (well, #undef'ing) HOST_LINK_VERSION; it's used in Clang, not LLVM
9bb95dd [FastISel][AArch64] Optimize select when one of the operands is a 'true' or 'false' value.
b80d6be [FastISel][AArch64] Fold the cmp into the select when possible.
8d6824e [FastISel][AArch64] Extend 'select' lowering to support also i1 to i16.
4848765 Drop a few unneeded ctor calls (missed code review comment).
8839439 Revert "[dwarfdump] Add support for dumping accelerator tables."
038e204 Improve long path name support on Windows.
2217648 [Bitcode] AtEndOfStream should only check against the size if it's known.
de87c91 Teach ScalarEvolution to sharpen range information.
72c32c6 Fix emission of Dwarf accelerator table when there are multiple CUs.
931e22f [dwarfdump] Add support for dumping accelerator tables.
0275be3 Allow DWARFFormValue::extractValue to be called with a null CU.
f1faaf2 Remove unsused variables.
cd2f8c9 [CodeGenPrepare] Replace other uses of EVT::getEVT with TL::getValueType.
b990a25 [CodeGenPrepare][AArch64] Fix a TLI legality check on iPTR to use a lowered instead.
dab91bc Expose the number of Newton-Raphson iterations applied to the hardware's reciprocal estimate as a parameter (x86).
f9e1e56 Add fortified (__*_chk) library functions to TLI (NFC)
fc0d323 Temporary fix for PR21528 - use mangled C++ function names in COFF debug info to un-break ASan on Windows
629ba0a [COFF] Make it clearer that the symbols subsection holds function display name rather than just name
be30336 [AVX512] Add integer shift by immediate intrinsics.
027b4c7 Changing a StringRef::begin() call into StringRef::data(); NFC.
ea3c211 Use the return of readBytes to find out if we are at the end of the stream.
bc8114f CGSCC should not treat intrinsic calls like function calls (PR21403)
dc9e73b Fix broken doxygen annotations, NFC
83c8e73 Disable indvar widening if arithmetics on the wider type are more expensive
04a3fdf remove function names from comments; NFC
d0ab582 Return the number of read bytes in MemoryObject::readBytes.
86a3cdf Revert part of the PIC tests (TLS part)
5a3eb1d Fix thet tests.
fcd08c2 Add support for small-model PIC for PowerPC.
8c2a552 Reduce code duplication a bit. NFC.
e4e7ad3 Fix the test.
1caf520 Fixing more -Wcast-qual warnings; NFC.
ba7dc29 Fixing a -Wcast-qual warning; NFC.
cb5fadf [mips][micromips] Add predicate 'InMicroMips' at CodeGen patterns for microMIPS instructions Differential Revision: http://reviews.llvm.org/D6198
556578e [x86] Start improving the matching of unpck instructions based on test cases from Halide folks. This initial step was extracted from a prototype change by Clay Wood to try and address regressions found with Halide and the new vector shuffle lowering.
3baea18 [x86] Clean up a bunch of vector shuffle tests with my script. Notably, removes windows line endings and other noise. This is in prelude to making substantive changes to these tests.
23fc2a3 MCDisassembler::getInstruction():: Prune also "\param Region", since it was removed in r221751. [-Wdocumentation]
5f9c438 AVX-512: Intrinsics for ERI 3 instructions: vrcp28, vrsqrt28, vexp2, only vector forms. Intrinsics include SAE (Suppres All Exceptions) parameter.
ee709fe Reverts r221772 which fails tests
69adc15 Disable indvar widening if arithmetics on the wider type are more expensive
a43247c Delete dead code. NFC.
fc22bfd [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsics
d051856 Merge StreamableMemoryObject into MemoryObject.
64f62a0 Fix non-variadic function_ref cases to match r221753
6cf5613 Don't duplicate name in comments. NFC.
214b84b Revert "Use a function_ref now that it works (r221753)."
b0022d4 Remove unused method. NFC.
ccb2a0e Make readBytes pure virtual. Every real implementation has it.
67a38a8 Remove unused method. NFC.
07ac2e2 Use a function_ref now that it works (r221753).
a48b83e Remove the now unused StringRefMemoryObject.h.
d907838 Ensure function_refs are copyable even from non-const references
6a222ec Pass an ArrayRef to MCDisassembler::getInstruction.
9abbcb7 Object, support both mach-o archive t.o.c file names
dc70865 Remove a bit of dead code.
25703e8 Extend intrinsic name mangling to support arrays, named structs, and function types.
a735d52 Make TreePattern::error use Twine
7ad8db4 [Reassociate] Canonicalize negative constants out of expressions.
a03cda0 Canonicalize an assume(load != null) into !nonnull metadata
4f89709 libLTO: Allow linker to choose context of modules and codegen
4e9c3e9 Initialize new subtarget feature variable for generating reciprocal estimate instructions.
ab75fd0 libLTO: Assert if LTOCodeGenerator and LTOModule are from different contexts
4f0d671 [FastISel][AArch64] Add support for fabs intrinsic.
18a16fd libLTO: Allow LTOModule to own a context
bce4007 libLTO: Allow LTOCodeGenerator to own a context
d54a2bf [asan] adding ShadowOffset64 for mips64, patch by Kumar Sukhani
2244d9a [Reassociate] Canonicalize negative constants out of expressions.
abb3335 Move asan-coverage into a separate phase.
5bf8ade Revert "IR: MDNode => Value"
15d6f7c Fix build break: remove unused variable in FCFI.
6eb7964 Totally forget deallocated SDNodes in SDDbgInfo.
63dea2c Add Forward Control-Flow Integrity.
6d093fd [llvm-mc] Fixing case where if a file ended with non-newline whitespace or a comma it would access invalid memory. Cleaned up parse loop.
e7c966f Use rcpss/rcpps (X86) to speed up reciprocal calcs (PR21385).
612f7d7 Simplify testcase. NFC.
10161a0 [PowerPC] Replace foul hackery with real calls to __tls_get_addr
71c7073 Use a 8 bit immediate when possible.
5cebd7c Fix a warning about ‘r_type’ may be used uninitialized.
949d328 [X86][ELF] Fix PR20243 - leaf frame pointer bug with TLS access
659b149 LLVM incorrectly folds xor into select
328bc2f [mips] Add preliminary support for the MIPS II target.
b001cb6 [mips] Add hardware register name "hwr_ulr" ($29)
d6548ad [X86] Add missing check for 'isINSERTPSMask' in method 'isShuffleMaskLegal'.
d3da72c Recommit "[mips] Add names and tests for the hardware registers"
1dd631f llvm-objdump: Skip empty sections when dumping contents
dd848e9 Was convinced in commit comments that requiring a specific python version is the wrong approach; reverting.
16d8031 MC, COFF: Use relocations for function references inside the section
fdf5961 [CMake] llvm-shlib: Prune redundant components, AsmPrinter, MC, and SelectionDAG.
e190f77 Addition to r216371 (SLP and Loop Vectorization) and r218607 where cost model for signed division by power of 2 was improved for AArch64. The revision r218607 missed test case for Loop Vectorization. Adding it in this revision.
20d2a26 Use uint64_t as the type for the X86 TSFlag format enum. Allows removal of the VEXShift hack that was used to access the higher bits of TSFlags.
f2fe3b7 [X86] Fix pattern match for 32-to-64-bit zext in the presence of AssertSext
bc64560 Only run the gold plugin tests if gold supports the targets we test with.
7b901e3 [NVPTX] Remove dead code in NVPTXTargetTransformInfo (NFC)
9272305 MCAsmParserExtension has a copy of the MCAsmParser. Use it.
26dd220 Add const. NFC.
6d5452d Don't duplicate names in comments. NFC.
3959002 Don't repeat name in comment. NFC.
8201185 [X86] Custom lower UINT_TO_FP from v4f32 to v4i32, and for v8f32 to v8i32 if AVX2 is available. According to IACA, the new lowering has a throughput of 8 cycles instead of 13 with the previous one.
bc741c1 speling.
daeae53 [yaml2obj] Support AArch64 relocations.
dc0f7df configure.ac lives in autoconf/, not autotools/
dee48e7 Reverting r221626 due to a too-strict test.
1b9706b [AArch64][FastISel] Fix kill flags for integer extends.
d0995fb [SwitchLowering] Fix the "fixPhis" function.
1a66dc7 [X86] Fix pattern match for 32-to-64-bit zext in the presence of AssertSext
b3da08d Copy externally_initialized in GlobalVariable::copyAttributesFrom.
26e0544 [NVPTX] Add an NVPTX-specific TargetTransformInfo
d342c4c Misc style fixes. NFC.
2d26874 Fix extra semicolon warning. NFC.
c63c935 [mips][microMIPS] Fix issue with delay slot filler and microMIPS Differential Revision: http://reviews.llvm.org/D6193
d2c5947 Fix variable names and comment style. NFC.
62c2faa [mips] Fix sret arguments for N32/N64 which were accidentally broken in r221534.
d8d51ff Mark test using python as REQUIRES: python27.
75318bc [CMake] llvm-c-test: Use libLLVM.so if it is available.
5f3f254 [CMake] Let llvm-shlib work on Linux with --whole-archive.
c305163 [CMake] Move llvm-shlib in prior to other tools.
e1e1392 [CMake] llvm-shlib: Add possibly missing BitReader and MCDisassembler for llvm-c.
79da624 R600/SI: Fix broken check prefixes in test
bbfcec1 Transforms: address some late comments
8724a6d Transforms: sort source files in build
d913458 SelectionDAG: Assert if we truncate SDNode's NumOperands or NumValues
bcdc476 [Reassociate] Better preserve NSW/NUW flags. Part of PR12985.
6faf6b1 Transforms: use typedef rather than using aliases
3fc63a6 Remove unused variable.
35c1630 Transform: add SymbolRewriter pass
0493682 Fix style.
4d84fe9 R600: Remove unused define
3d8a2f0 Don't redeclare a pure virtual method.
0cb5820 Use StringRefMemoryObject in llvm-mc. NFC.
fe2b8b1 [mips] Promote i32 arguments to i64 for the N32/N64 ABI and fix <64-bit structs...
93f761e [CMake] LLVMSupport: Give system_libs PRIVATE scope when LLVMSupport is built as SHARED. Users of LLVMSupport won't inherit ${system_libs}.
b3963d6 Pass PRIVATE to target_link_libraries if using shared libraries.
01657f3 [mips] Removed the remainder of MipsCC. NFC.
46c0982 [mips] Remove MipsCC::reservedArgArea() in favour of MipsABIInfo::GetCalleeAllocdArgSizeInBytes(). NFC.
490119e MipsCCState.h: Use LLVM_DELETED_FUNCTION for msc17.
7ad3ceb llvm/test/tools/llvm-symbolizer/ppc64.test: Avoid subshell.
6b84694 [mips] Move MipsCCState to a separate file and clang-formatted it.
7fc57f4 [mips] Fix unused variable warnings introduced in r221521
605a80b [mips] Remove remaining use of MipsCC::intArgRegs() in favour of MipsABIInfo::GetByValArgRegs() and MipsABIInfo::GetVarArgRegs()
73bbfc5 [mips] Remove MipsCC::getRegVT(). NFC
b4b8239 [mips] Remove MipsCC::analyzeCallOperands in favour of CCState::AnalyzeCallOperands. NFC
e40a531 [mips] Move SpecialCallingConv to MipsCCState and use it from tablegen-erated code. NFC
37dbb74 [mips] Removed IsVarArg from MipsISelLowering::analyzeCallOperands(). NFC.
222fcc5 llvm-symbolizer: teach it about PowerPC64 ELF function descriptors
3f2ffe0 SCCP: overdefined calls cannot become constant
893f22f Add Position-independent Code model Module API.
75da31f [AArch64] Keep flags on condition vreg when instantiating a CB branch.
3f40213 Use a StringRefMemoryObject. NFC.
751848b Use StringRefMemoryObject. NFC.
bb642c4 LoopVectorize: Don't assume pointees are sized
9806641 InstCombine: Rely on cmpxchg's return code when it's strong
7d60fe0 Remove unused variable. NFC.
cce2cdd Don't repeat names in comments. NFC.
848edb1 [ELF][yaml2obj] Handle additional MIPS specific st_other field flags
8e617cc Factor out call to push_back. NFC.
de3d506 [X86][SSE] Vector integer/float conversion memory folding (cvttps2dq / cvttpd2dq)
112aabe [X86] Add VFMADDSUB cases for the 213->231 custom inserter.
f44d4cd [X86] Add missing FMA3 VFMADDSUB in the emitter.
c4e8fb9 Object, COFF: Don't consider AuxFunctionDefinition for getSymbolSize
8b6319b [X86] Split FMA4 RM tests into a separate file. NFC.
d8eb4f1 Base check on the section name, not the variable name.
0ea3b24 [RegAlloc] Remove reference to the trivial spiller in test case.
4e2cbd5 [RegAlloc] Kill off the trivial spiller - nobody is using it any more.
14f5cb6 Indentation fixes
2dc0735 Try to appease MSVC buildbots after r221466.
3b80486 Plumb in the ARM thumb symbolizer in llvm-objdump’s Mach-O disassembler and add the code and test cases for 32-bit ARM symbolizer.
6df2a3b Change DIBuilder::createImportedDeclaration from taking a DIScope to a DIDescriptor.
d67fc42 [Hexagon] Adding basic Hexagon ELF object emitter.
9b644c8 Clean up NVPTXLowerStructArgs.cpp. NFC
0d9e067 [mips] Removed IsSoftFloat from MipsISelLowering::analyzeCallOperands(). NFC
e15b20e [Reassociate] Don't reassociate when mixing regular and fast-math FP instructions.  Inlining might cause such cases and it's not valid to reassociate floating-point instructions without the unsafe algebra flag.
20e3be7 [mips] Removed MipsISelLowering::analyzeFormalArguments() in favour of CCState::AnalyzeFormalArguments()
4396b44 Use FileCheck in a few tests.
eed9590 Compute the correct jump table entries on 32 bit windows.
f0f66a2 [X86] When commuting SSE immediate blend, make sure that the new blend mask is a valid imm8.
22cfcb2 Fixing some -Wcast-qual warnings; NFC.
7f22a20 [mips] Tolerate the use of the %z inline asm operand modifier with non-immediates.
2b8f969 [mips] Add the following MIPS options that control gp-relative addressing of small data items: -mgpopt, -mlocal-sdata, -mextern-sdata. Implement gp-relative addressing for constants.
ea60f51 [mips] Improve error/warning messages and testing for the .cpload assembler directive.
10f28ec [JIT] Fix more missing endian conversions (opcodes for AArch64, ARM, and Mips stub functions, and ARM target in general)
42b17f9 Object, COFF: Infer symbol sizes from adjacent symbols
a67e169 X86, MC: Tidy up some whitespace in GetRelocType
03e3dfd GCOV: Make sure that function idents in the .gcda and .gcno match
58de709 Add three other sections when L symbols are allowed.
e1f22e3 Allow L symbols in no_dead_strip sections.
d465ece [X86] Lower VSELECT into SHRUNKBLEND when we shrink the bits used into the condition to match a blend. This prevents optimizations that work on VSELECT to perform invalid transformations. Indeed, the optimized condition does not match the vector boolean content that is expected and bad things may happen.
4ebcbd0 Remove unnecessary .c_str() when implicitly converting to Twine
6c100e7 [Docs][JIT] Update the clang++ invocation lines in the kaleidoscope docs.
5940390 [mips64] Fix MIPS64 exception personality encoding
3f1d66f [X86][SSE] Vector integer to float conversion memory folding
3911374 [docs] Document usage of Inputs/ for extra test files.
212f3ab [Linker] Add some test coverage for llvm.ident merging
9f59bc4 Fix heap-use-after-free bug in expandSDiv when the operands are constants, as discovered by ASAN.
36c4749 Remove obsolete ARM intrinsics vclz and vcnt
5563be0 Add accessor to get 'visibility' part of st_other field
65c7979 Fix test breakage from r221386
ecb144e R600/SI: Fix omod display for VOP3b
07ffcb1 [x86 fast-isel] Materialize allocas with the correct-sized lea for ILP32
e7a8e29 R600/SI: Add testcase I forgot to commit from months ago
d858637 R600/SI: Move all rsrc building functions to SIISelLowering
12bd9f1 R600/SI: Remove SI_ADDR64_RSRC
e459c0b [NVPTX] Add NVPTXLowerStructArgs pass
bad06b1 IR: MDNode => Value: NamedMDNode::getOperator()
4a6537c remove extra breaks; NFC
ee64335 IR: MDNode => Value: AsmWriter SlotTracker API
463e275 [ARM] Remove more dead code.
cd2d40c ps][microMIPS] Implement CodeGen support for ANDI16 instruction
455618c [Hexagon] [NFC] Alphabetizing cmake files.
a1925e6 ps][microMIPS] Implement CodeGen support for SLL16 and SRL16 instructions
4929a03 [ARM] Remove another redundant assignment.
8dad1e1 [mips][microMIPS] Implement ANDI16 instruction
8e4d0d8 [ARM] Remove redundant assignment.
7cc4447 [dfsan] Abort at runtime on indirect calls to uninstrumented vararg functions.
72ced73 IR: MDNode => Value: NamedMDNode::addOperand()
33ccf8e [ARM] Remove dead code identified by the Clang static analyzer.
0f0a134 [mips][microMIPS] Mark symbols as microMIPS if necessary Differential Revision: http://reviews.llvm.org/D6039
e9b9ca4 Reverted revisions 221351, 221352 and 221353.
e7ec22d [mips][microMIPS] Implement CodeGen support for ANDI16 instruction Differential Revision: http://reviews.llvm.org/D5797
8cfd490 [mips][microMIPS] Implement CodeGen support for SLL16 and SRL16 instructions Differential Revision: http://reviews.llvm.org/D5933
7c63a63 [mips][microMIPS] Implement ANDI16 instruction Differential Revision: http://reviews.llvm.org/D5163
8eaed0f R600/SI: Change all instruction assembly names to lowercase.
1f06060 R600/SI: Add an extra check line to make test more strict
3ee42f6 Add a LLVM_BUILD_STATIC option to cmake.
042bee8 [X86] Teach method 'isVectorClearMaskLegal' how to check for legal blend masks.
6b418b2 Fix bashism in tests added by r221341
382f7d7 [ARM] Honor FeatureD16 in the assembler and disassembler
04a4594 Improve logic that decides if its profitable to commute when some of the virtual registers involved have uses/defs chains connecting them to physical register. Fix up the tests that this change improves.
090bd82 llvm/test/Transforms/GCOVProfiling: Avoid to parse backslashes in MDString. Use %/T instead of %T.
4787059 llvm-readobj: Add support for dumping the DOS header in PE files
07e1080 Revert 220932.
84dc1b5 IR: Metadata: Remove unnecessary dyn_cast
1e28840 Fix broken C++ mode comment
49c14f5 InstSimplify: Exact shifts of X by Y are X if X has the lsb set
4cd064b Add a check for misbehaving -Wcomment from gcc-4.7 and add -Wno-comment to the compilation flags if so.
cafa378 ARM: try to add extra CS-register whenever stack alignment >= 8.
1f771b8 ARM/Dwarf: correctly align stack before callee-saved VPRs
3839fd1 Analysis: Make isSafeToSpeculativelyExecute fire less for divides
11e6e00 Revert "[Reassociate] Canonicalize negative constants out of expressions."
4ad0654 [X86][SSE] Enable commutation for SSE immediate blend instructions
ffb62b7 Revert earlier change removing setPreservesCFG from instcombine (r221223) and change LoopSimplifyPass to be !isCFGOnly.  The motivation for the earlier patch (r221223) was that LoopSimplify is not preserved by instcombine though setPreservesCFG indicates that it is.  This change fixes the issue by making setPreservesCFG no longer imply LoopSimplifyPass, and is therefore less invasive.
6612e3a [AArch64] Use the correct register class for ORR.
2ca0328 Revert "[mips] Add names and tests for the hardware registers"
f49ead7 Provide gmlt-like inline scope information in the skeleton CU to facilitate symbolication without needing the .dwo files
41ebc26 Move cross-unit DIE caching to the DwarfFile level, so it doesn't interfere with fission-gmlt data and produce skeleton<>full unit cross referencing.
c326067 Don't produce relocations for a difference in a section with no symbols.
1aa0694 [mips] Move COP2 & COP3 load/store instructions from MipsInstrFPU.td to MipsInstrInfo.td. NFC.
a7a01d3 [mips] Add names and tests for the hardware registers
c270e8a [X86] Add 'FeatureSlowSHLD' to cpu 'bdver3'. Also explicit set FeatureAVX and FeatureSSE4A for all the bdver* cpus.
d2d9ad0 ErrorOr: Be more explicit in the implicit conversion to bool docs
e1bec75 [PBQP] Callee saved regs should have a higher cost than scratch regs
8025a39 [PBQP] Tweak spill costs and coalescing benefits
e246328 R600/SI: Rename div_scale dest operands to match documentation
4844826 AArch64: Pattern match integer vector abs like we do on ARM.
c45da43 [asan] [mips] changed ShadowOffset32 for systems having 16kb PageSize; patch by Kumar Sukhani
d21956e Remove unused DisableRedZone option.
e756ecf InstSimplify: Fold a hasNoSignedWrap() call into a match() expression
57269b0 InstSimplify: Fold a hasNoUnsignedWrap() call into a match() expression
dd3894a [mips] Improve support for the .set mips16/nomips16 assembler directives.
d0de1a5 [Stackmaps] Make test less fragile. NFC.
0bbad01 remove function names from comments; NFC
f1ab807 fix typo in comment

git-subtree-dir: llvm
git-subtree-split: fb59c03af9e3b2fe76b19ddcbb39ace4b67c42ea
Merge commit '39b035bd2986d25382f952fc8b38cb9193863718' into devel
Squashed 'llvm/tools/clang/' changes from cbe3082..739237c

739237c Fix assert/crash on invalid with __builtin_constant_p conditionals in constant expressions.
5a9e570 Objective-C. Fixes a regression caused by implementation of new warning for deprecated method call for receiver of type 'id'. This addresses rdar://18960378 where unintended warnings being issued.
773d19c PR21437, final part of DR1330: delay-parsing of exception-specifications. This is a re-commit of Doug's r154844 (modernized and updated to fit into current Clang).
8cfc35f Remove -Wcast-qual as it's inherited from llvm since r221913.
2154176 Hook up FreeBSD AArch64 support
8be48bc clang-format: Format extern "C" blocks like namespace blocks.
ffc8655 clang-format: [Java] Support Java enums.
97fba2d Support non-owned DiagnosticConsumer in SetupSerializedDiagnostics
da5bcf3 [libclang] Make sure to visit the body of a CXXForRangeStmt.
1dde64b [liblang] Handle CXXForRangeStmt during AST visitation.
94a9396 CMake: Set HOST_LINK_VERSION on Darwin (PR21268)
44575a0 Fixes test.
3cdb918 Another test for PR19372, showing why we need to keep checking arguments after a pack expansion.
17a23e4 Add another testcase.
4e0b432 PR19372: Keep checking template arguments after we see an argument pack expansion into a parameter pack; we know that we're still filling in that parameter's arguments. Previously, if we hit this case for an alias template, we'd try to substitute using non-canonical template arguments.
82a3c12 Temporary revert r221818 until all the problems with objc stuff will be resolved.
2e0947a Now really fix the typo in the test
93e667c Update the tests to handle proper result type of (?:)
6d75427 [Objective-C++ IRGen] do not generate .cxx_construct for class that contains trivially-constructible struct ivar. rdar://18950072
24a4c64 Fix fallout from r219557
081c114 Fix brace init of unions with unnamed struct members
c644bb9 Update Clang's SD-6 support to match N4200 (except for __has_cpp_attribute, which we don't yet implement).
3f2a09e Pass the filter function_ref by value now that r221753 fixes the bug that was preventing pass-by-value from working correctly.
1314a7c Check for IRGen output when varag is used in -funknown-anytype  mode (in lldb use).
1a1ff4f Update for llvm api change.
3d4dc34 Simplify code a bit by passing StreamFile to the BitstreamCursor constructor.
ff0fd44 Mark TypeDecls used in explicit destructor calls as referenced.
232aa4a [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsics
09a479e Mark TypeDecls used in member initializers as referenced.
4e7c8db clang-format a few lines, fixes one 80col violation. nfc.
f2c3e5a Try a different workaround for GCC 4.7.2 lambda capture bug. The previous workaround took us from wrong-code to ICE.
7c4e87a Instantiate exception specifications when instantiating function types (other than the type of a function declaration). We previously didn't instantiate these at all! This also covers the pathological case where the only mention of a parameter pack is within the exception specification; this gives us a second way (other than alias templates) to reach the horrible state where a type contains an unexpanded pack, but its canonical type does not.
b6ff562 PR21536: Fix a corner case where we'd get confused by a pack expanding into the penultimate parameter of a template parameter list, where the last parameter is itself a pack, and build a bogus empty final pack argument.
affaed5 Fix this code to follow the coding style regarding anonymous namespaces and static functions. Make a bunch of file-local functions static. Remove one unused static function revealed by this.
e6ec983 Make Sema::CollectMultipleMethodsInGlobalPool() public.
f1fd4f7 clang/test/CodeGenCXX/debug-info-cxx1y.cpp: Add %itanium_abi_triple for incompatible MS targets.
be9aef8 [clang/asan] Do not emit memcpy for trivial operator= when -fsanitize-address-field-padding >= 1
fafd752 Have LookupMemberExprInRecord only call CorrectTypoDelayed, dropping the code for calling CorrectTypo.
1fb78b7 Create two helpers for running the typo-correction tree transform.
b58dc0d Replace MemberTypoDiags and MemberExprTypoRecovery with lambdas.
b8fa2b8 Remove unnecessary semicolon.
411d4e1 clang-format: Improve handling of comments in binary expressions.
dbcf981 Make LookupResult be copyable to avoid decomposing an existing one and initializing a new one every time a copy is needed.
35fad28 Explicitly exclude keywords from the member validator.
aecfb60 Fix some formatting prior to refactoring the code.
8b5a561 Introduce -fsanitize-coverage=N flag
07f5b04 Bundle conditions checked by UBSan with sanitizer kinds they implement.
41d9177 Remove this test too.
11cd6ea Revert r221702 until I address Richard Trieu's comments.
23b4498 Simplify the test by using multiple --check-prefix arguments
fc82946 Revert "IR: MDNode => Value: Update for LLVM API change in r221375"
afc3c5a PR16091 continued: Debug Info for member functions with undeduced return types.
9f9a74f Patch to warn when logical evaluation of operand evalutes to a true value; That this is a c-only patch. c++ already has this warning. This addresses rdar://18716393
aebf04a clang-format: Preserve trailing-comma logic even with comments.
1d53e9c First half of CWG1962: decltype(__func__) should not be a reference type, because __func__ is supposed to act like a local static variable.
d45e221 This patch fixes a crash after rebuilding call AST of an __unknown_anytype(...). In this case, we rebuild the vararg function type specially to convert the call expression to  something that IRGen can handle. However, FunctionDecl as rebuilt in RebuildUnknownAnyExpr::resolveDecl is bogus and results in crash when accessing its params later on. This patch fixes the crash by rebuilding the FunctionDecl to match its new resolved type. rdar://15297105. (patch reapplied after lldb issue was fixed in r221660).
3b5935e DiagnosticParseKinds is close to running into DiagnosticASTKinds.
109623a CGOpenMPRuntime.h: Fix a couple of \param(s) introduced in r221663. [-Wdocumentation]
40279b3 [OPENMP] Codegen for threadprivate variables For all threadprivate variables which have constructor/destructor emit call to void __kmpc_threadprivate_register(ident_t * <Current Location>, void *<Original Global Addr>, kmpc_ctor <Constructor>, kmpc_cctor NULL, kmpc_dtor <Destructor>); In expressions all references to such variables are replaced by calls to void *__kmpc_threadprivate_cached(ident_t *<Current Location>, kmp_int32 <Current Thread Id>, void *<Original Global Addr>, size_t <Size of Data>, void ***<Pointer to autogenerated cache – array of private copies of threadprivate variable>); Test test/OpenMP/threadprivate_codegen.cpp checks that codegen is correct. Also it checks that codegen is correct after serialization/deserialization and one of passes verifies debug info. Differential Revision: http://reviews.llvm.org/D4002
ecb1dc5 Fix parsing of fold-expressions within a cast expression. We parse the parenthesized expression a bit differently in this case, just in case the commas have special meaning.
3c9036c InstrProf: Remove an unnecessary helper function (NFC)
180cfaf CGExpr.cpp: Suppress a warning. [-Wunused-variable]
edab6ac [Sanitizer] Refactor sanitizer options in LangOptions.
98feb81 Move CodeGenOptions constructor out-of-line and add missing headers. NFC.
f785bb4 Move SanitizerKind class to a separate header. NFC.
5f43709 [libclang] When initializing an ObjC object via the "[[ClassName alloc] init*]" pattern, report the 'init*' invocation as non-dynamic via clang_Cursor_isDynamicCall.
bd74c05 Propagate SanitizerKind into CodeGenFunction::EmitCheck() call.
bd92c8c Validate user headers even if -fmodules-validate-once-per-build-session
45417a6 AArch64: set all processor features from -arch if nothing else present
82019ed Improve diagnostics if _Noreturn is placed after a function declarator. (This sometimes happens when a macro is used that expands to either the GNU noreturn attribute or _Noreturn.)
089b9a8 Remove change to set SDKROOT when building compiler-rt on Darwin.
06f3748 Update fold-expression mangling to match cxx-abi-dev discussion.
2b5488a Only build iOS runtime libraries when the iOS SDKs are available.
2b03c64 clang-format: Fix pointer formatting.
ae1c3ef clang-format: [Java] Never treat @interface as annotation.
8390f77 clang-format: Document that --assume-filename affects the language.
67132db Remove unused diagnostic.
ffbc7861 [Tooling] Restore current directory after processing each file.
5b0b279 Missing testcase from r221581.
132515f Updated the wording for a diagnostic to be more grammatically correct, and use a %select. Also ensure that nested namespace definitions are diagnosed properly. Both changes are motivated by post-commit feedback from r221580.
079c143 [c++1z] Support for attributes on namespaces and enumerators.
9443d04 [c++1z] Support for u8 character literals.
d331bec [c++1z] Implement nested-namespace-definitions.
4617a9d [c++1z] N4295: fold-expressions.
15e9ab9 Check module signature when the module has already been loaded
a281c97 Fixed a buildbot failure.
6a5c539 Fix unintended fallthrough in ASTReader
90d23dd [Objective-C Sema]. Issue availability/deprecated warning when there is a uinque method found when message is sent to receiver of 'id' type. // rdar://18848183
4efc410 ARM ABI: simplify decisions on whether args can be expanded.
c914e25 Introduce a SanitizerKind enum to LangOptions.
64f15a1 Use @rpath for ASan dylib in Makefiles
f7a6c46 Fix style.
e088642 Fix clash of gcc toolchains in hexagon driver regression tests.
baca33c Revert r221404 which caused lldb to not display vararg expressions.
33b3411 Improve comments in vtordisp tests: fix a typo, add a bit more clarity
507d386 CodeGen, Itanium: Properly dllimport RTTI data
b18ef04 Return a DIDescriptor from CGDebugInfo::getDeclarationOrDefinition...
2fbefbf Remove references to the cortex-a9-mp CPU.
136e63d Don't manually insert L prefixes.
d081dde [X86] Slightly refactor default features for AMD bdver cpus (NFC). Also add missing checks to test for target features.
f945e90 Fix for exception specification mismatch in explicit instantiation. According to C++ standard if an exception-specification is specified in an explicit instantiation directive, it shall be compatible with the exception-specifications of other declarations of that function. This patch adds checks for this. Differential Revision: http://reviews.llvm.org/D5822
1d9ac08 [X86] Use fallthroughs to reduce the number of calls to setFeatureEnabled for different CPUs.
a46cc67 Use FileCheck.
93db585 Delete dead test.
366198b Patch for small addition to availability attribute. This is to accept "NA" in place of vesion number for availability attribute. Used on introduced=NA to mean unavailable and deprecated=NA to mean nothing (not deprecated). rdar://18804883
c8eb29b cmake: Only export targets in the standalone build
732ef3c Make it easier to build against a pre-built Clang package with CMake
362e509 Thread Safety Analysis: move warnings on range-based for loops out of beta and into -Wthread-safety.
0b9bdca This patch fixes a crash after rebuilding call AST of an __unknown_anytype(...). In this case, we rebuild the vararg function type specially to convert the call expression to  something that IRGen can handle. However, FunctionDecl as rebuilt in RebuildUnknownAnyExpr::resolveDecl is bogus and results in crash when accessing its params later on. This patch fixes the crash by rebuilding the FunctionDecl to match its new resolved type. rdar://15297105. John McCall, please review post-commit.
5e32d18 cmake: Conditionalize CodeGen's dependency on intrinsics_gen
86751f3 [DebugInfo] Do not record artificial global initializer functions in the DeclCache.
7763d27 IR: MDNode => Value: Update for LLVM API change in r221375
1f8f132 Revert "clang-format: [js] Updates to Google's JavaScript style."
af20ce4 Remove superceded warning warn_forgotten_module_header
e99b833 Support LLVM_BUILD_STATIC.
63c7eb8 MS ABI: Correctly mangle CV qualifiers from typedefs
562463e clang-format: Add test to prevent regression in r221125.
dc293d3 clang-format: Improve free-standing macro detection.
c3863c7 Mark darwin-debug-flags.c as REQUIRES:shell, due to quoting issue.
1f50b30 clang-format: Make it possible to (require 'clang-format)
f650020 Debug info: Emit the correct type for the __FuncPtr field in a block descriptor.
4da3581 Filter out non-static class members when correcting non-member-references.
6c99bdc Fix the test failure on Windows introduced by r221279.
257215d Use backslashes to escape spaces and other backslashes in -dwarf-debug-flags.
ff59493 Make helper function static. NFC.
bf0173a Since the file has both ppc and ppc64 tests in it rename it.
eff1a8c Rewrite the test to not require asserts.
442e646 Use @rpath as LC_ID_DYLIB for ASan dylib on OS X

git-subtree-dir: llvm/tools/clang
git-subtree-split: 739237cc07ba3ac36622fb0024d1efbed4772237
Merge with Clang.
Squashed 'llvm/tools/lldb/' changes from 4426eaa..3e7e4ee

3e7e4ee Specify checksums properly for llgs test suite packets.
2b35804 Fixed "SBTarget SBDebugger::CreateTarget (const char *filename)" to use the same semantics as other SBDebugger::CreateTarget() functions.
d11607e Remove extra "/" character from paths resolved in iOS SDKs and also be sure to update the SDK directory infos if needed before we start using m_sdk_directory_infos.
39d8e27 Refactor NativeProcessLinux::AttachToProcess in order to avoid reinterpret_cast from NativeProcessProtocol* to NativeProcessLinux*.
0504992 A pretty big overhaul of the TryFallbackUnwindPlan method in RegisterContextLLDB.  I have core files of half a dozen tricky unwind situations on x86/arm and they're all working pretty much correctly at this point, but we'll need to keep an eye out for unwinder regressions for a little while; it's tricky to get these heuristics completely correct in all unwind situations.
57bb1c0 TestConcurrentEvents - delay threads not working
894f679 Do not override the existing definition of addr_size when adding new properties to SBTarget. Fixes rdar://18963842
7525f3a Fix so this test runs successfully on armv7 devices.
2debeec Add a makefile even though it isn't used by the test in case we need to debug it when it fails.
72c8526 Add decorator for failing null dereference test on FreeBSD
eba14db Use PRIx64 when printing addr_t's.  Don't need to force full-width 0 padding with addresses that aren't designed to be column-aligned across multiple lines.
d15b972 Update comments to reflect how the new methods ended up being written.
51c7987 [ProcessWindows] Improve support for launching processes.
1fa6c93 [ProcessWindows] Simplify the DebugDelegate interface.
bd6a187 Avoid crash in InitializeNonZerothFrame if no module found
e30f3c5 Fix the iOS build after recent inherited OTHER_LDFLAGS.
07d0120 FIx a bug with PC-register handling in a RA register.
e6a3008 Improve PowerPC unwind support
1ad5a4a Add an alternative CFA type.
b8887fc Add powerpc support for the test suite.
40fa2d7 Enable armv7 core file writing for Mach-O binaries. The problems with the dyld all image infos struct seems to be specific to arm64.
a96f621 Update for llvm API change.
1a3759e Revert "Update for LLVM API change in r221024"
81a123b Sketch out the armv7 and arm64 core file writing support in ObjectFileMachO.  It's close but we seem to be missing some of the memory region segments - not exactly sure how that's happening.  The register context writing into the LC_THREAD load commands is working correctly though.
5f0807e Move a bunch of summary formatters to oneliner mode. This makes more cases eligible for oneline printing, and fixes rdar://18120906
faae68a Add -std=c99 for building the test case of TestValueVarUpdate - for Siva Chandra : http://reviews.llvm.org/D6201
a9a6b5c Substitute cc with c++ when compiling c++ test files for Siva Chandra : http://reviews.llvm.org/D6199
970eaf29 Add support for 32-bit core file dumping.  Add support for i386 process core file dumping.
ed9a06e Put the current pc arrow back into the default disassembly format. I went back and forth on removing this - and tried dropping it for a few weeks.  But when you're working at an assembly language, it really is helpful to have this displayed to show where the current pc is.
9290f07 Add an operator== to the RegisterNumber class; it simplifies RegisterContextLLDB a bit more in a few places.
cf4a458 Made the expression parser more resilient against being asked about symbols it doesn't know about.  If it's asked about a symbol by mangled name and it finds nothing, then it will try again with the demangled base name.
d24ed32 Ignore templated aggregates in the Objective-C runtime.  This eliminates potential confusion when the compiler has to deal with these weird types later on.
10e1359 Fixed two issues in the type encoding parser:
413ea88 Fix error handling in NativeProcessLinux::AttachToInferior: http://reviews.llvm.org/D6158
254c0be Added a testcase that checks that fairly complicated structures are parsed safely by the Objective-C runtime.
e95cd60 [ProcessWindows] Implement breakpoint stop / resume on Windows.
da05de3 Cleaned up the StringLexer a little bit.  It turns out we only want to roll back text that was in the buffer to begin with, so it's not necessary to provide a pushback stack.
3eea248 [ProcessWindows] Notify process plugin when the launch succeeds.
6e96e12 Fix some compiler warnings, one of which was a legit bug.
3585127 Fix comments to match the current reality.
4dc38e6 Fix selectors not being objc-uniquified in the expression parser after a recent renaming in clang (clang change for revision 221451). This broke all objective C expressions in LLDB.
7b7ae34 Fix a problem reported by Ed Maste where the test harness was failing to call bound methods as cleanup hooks
293297c Fix new noreturn test on !darwin platforms
2120f3e LLGS Android target support (r221570) missed adding some files: http://reviews.llvm.org/D6166
c472ac9 Add a RegisterNumber class to RegisterContextLLDB.h and start using it in RegisterContext.cpp.
8897d67 Fix a corner case with the handling of noreturn functions. If a noreturn function was the last function in a section, we wouldn't correctly back up the saved-pc value into the correct section leading to us showing the wrong function in the backtrace.
9b4c252 LLGS Android target support - for Andy Chien : http://reviews.llvm.org/D6166
0f970ba fix for unit tests finding path to LLDB.h  http://reviews.llvm.org/D6177
c7b8a74 Remove the top-level DebugDriverThread in ProcessWindows.
c7a4167 This was meant to be count, not m_count
697a3a3 SBValue::Cast is deprecated. This does not work as reliably as free-form casting via the expression evaluator. Some of our clients depend on it, so we can't remove it. But any new adopters should favor the expression parser as the way forward
20f751c Use llvm::StringRefMemoryObject NFC.
01cd915 Fixes so tests compile and run remotely.
2ed5464 Changed program to go along with the previous commit to allow this test to be run remotely via lldb-platform.
4fdc615 Fix the test to not have to run the binary separately first to get the golden output, use the process STDOUT instead.
8ef2b49 Make sure stderr is filtered out in case xcodebuild or xcrun print errors when getting the SDK path and use xcrun to find the SDK path.
ef1d6f2 This is a large, but clearical, commit that enables the C++ formatters to take on the additional TypeSummaryOptions argument. It is still not used for anything, but it is now there. Adding support for this extra argument to Python formatters will follow suit
87fa8ff Introduce the notion of "type summary options" as flags that can be passed down to individual summary formatters to alter their behavior in a formatter-dependent way Two flags are introduced: - preferred display language (as in, ObjC vs. C++) - summary capping (as in, should a limit be put to the amount of data retrieved)
a2d7811 Handle types from the runtime that conform to protocols.
cb3d9ee Pick better floating point numbers (ones that can be exactly represented) in floating point instead of something that can't to avoid test suite failures on different devices and architectures.
2d9176f fixed minor code indenting  http://reviews.llvm.org/D6127
060996d Fix lldb-mi warnings so that it builds when --enable-werror is set.
d96a3c0 Fixed the C++ method name class to be a bit more picky about what it identifies as a C++ method.
5edf090 cmake: Make the LLDB standalone build work for me
055d5f7 Decouple ProcessWindows from the Windows debug driver thread.
8d7c5ae Allow inline test case to register actually useful teardown hooks by allowing a hook to be passed back the test instance, were it not to be already bound to self. Use this ability to make the reversal of escape-non-printables a teardown hook for added reliability of the testing logic
2b04cda Fixed the Objective-C stripped ivar test to ensure that we load debug information properly.  If we don't explicitly add-dsym, sometimes Spotlight will help out and tell us about the dSYM but we shouldn't be relying on that.  Thanks to Jim for catching this.
88f9e0e Add a setting escape-non-printables that drives whether the StringPrinter should or should not escape sequences such as \t, \n, .. and generally any non-printing character
f5ed285 Fix LLDB build as a result of upstream LLVM changes.
ecde1cf for Oleksiy Vyalov - Redirect stdin, stdout and stderr to /dev/null when launching LLGS process. Differential Revision: http://reviews.llvm.org/D6105
1efd1ab Rename some classes in ProcessWindows.
8fa4792 Avoid building lldb-mi when --enable-werror is set as it doesn't build and is optional.
cb20b73 for Siva Chandra: Fix compilation of StringPrinter.cpp with GCC. Differential Revision:  http://reviews.llvm.org/D6122
bfca945 Fix a problem where ValueObjectVariable was not correctly setting its 'has value changed' flag for scalar valued variables. This fixes rdar://17851144
7c96dc1 Fix the build for LLVM changes

git-subtree-dir: llvm/tools/lldb
git-subtree-split: 3e7e4eeaf44c964b6488b513fedf1866b743bae2
Merge with LLDB.
Finish merge.