Squashed 'llvm/' changes from 5bf7bcf..d2f12fd

d2f12fd [Hexagon] Relocating logical instructions and templates later in the td file.
ec51bc6 [Hexagon] Adding sub/and/or reg, imm forms
9423af6 Remove dead code. We are only lazy about functions with bodies.
05c096b Reverting r223513 and r223514.
ab4ad4f Optimize merging of scalar loads for 32-byte vectors [X86, AVX]
9371287 [DFSAN][MIPS][LLVM] Defining ShadowPtrMask variable for MIPS64
5db47f1 [Hexagon] Updating mux_ir/ri/ii/rr with encoding bits
86af53e AddressSanitizer - Don't instrument globals from cstring_literals sections. (llvm part)
f117c8a Simplify the loop linking function bodies. NFC.
a44126f Use 32-bit ebp for NaCl64 in a limited case: llvm.frameaddress.
8dcc5c0 [PowerPC]Update Power VSX test cases to also test fast-isel
dfa6293 [PowerPC]Add VSX loads/stores to fastisel for PPC target
4fda99f [Hexagon] Adding tfrih/l instructions.
6a9a49d [X86] Improved lowering of packed vector shifts to vpsllq/vpsrlq.
189606d [Hexagon] Adding add reg, imm form with encoding bits and test.
98821ee Remove unused arguments. NFC.
7a76d76 These two calls were grabbing the same register info. Unify them.
1a28340 BFI: Saturate when combining edges to a successor
78ec901 [Hexagon] Adding DoubleRegs decoder.  Moving C2_mux and A2_nop.  Adding combine imm-imm form.
33ada85 Fix a bug when pretty-printing DW_OP_deref.
bb3e8dc Regenerate this stale testcase from source.
bf6e012 [CodeGenPrepare] Use variables for reused values. NFC.
fba1340 [Hexagon] [NFC] Rearranging patterns and mux instruction.
639b824 [Hexagon] [NFC] Rearranging def order.
24ba299 Refactor duplicated code. NFC.
0785bdf [Hexagon] Adding combine reg-reg forms.
4c58675 [Hexagon] Marking several instructions as isCodeGenOnly=0 and adding direct disassembly tests for many instructions.
33f1a43 Be less conservative about when we build the gold plugin.
472e9cc LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps.
3ad7621 Improvements to ARM assembler tests
dd6794f Small cleanup on how we clear constant variables. NFC.
58f462f Update TargetTriple format info. Phabricator revision: http://reviews.llvm.org/D6543
f69cd1d Fix typos in llvm/IR/Module.h Phabricator revision: http://reviews.llvm.org/D6535
46cbde2 Use an early return. NFC.
c4c08aa [msan] Avoid extra origin address realignment.
54529ed [X86] Avoid introducing extra shuffles when lowering packed vector shifts.
1610d6e Add missing FP build attribute tests.
138d5bf Revert "r223440 - Consider subregs when calling MI::registerDefIsDead for phys deps"
d281f14 Consider subregs when calling MI::registerDefIsDead for phys deps
afcbfb4 ADT: Remove GetStringMapEntryFromValue()
397b575 IR: Stop relying on GetStringMapEntryFromValue()
74fb019 Cleanup: Calls to getDwarfRegNum() may actually fail, if there is no DWARF register number mapping, or if the register was a virtual register that was never materialized. Previously, we would just emit a bogus location, after this patch we don't emit a location at all by doing an early exit.
af25a5d Add a comment.
ebde740 Make GetSVN.cmake do its VCS queries with native CMake code. This lets the queries work on Windows as well as Linux.
7eaee30 linkGlobalVariableProto never returns null. Simplify the caller. NFC.
52978c2 Rename the x86 isTargetMacho to isTargetMachO for uniformity.
62b1007 Both of these subtargets have functions that check whether or not the target is mach-o. Use them.
aa8cddc Move merging of alignment to a central location. NFC.
d3c3235 Add a few extra cases to the test. NFC.
543abe4 Re-add support to llvm-objdump for Mach-O universal files and archives with -macho with fixes.  Includes the move of tests for llvm-objdump for universal files to an X86 directory.  And the fix where it was failing on linux Rafael tracked down with asan. I had both Jim Grosbach and Adam Hemet look over the second fix since I could not set up asan to reproduce with the old version but not with the fix.
3d5af84 [X86] Delete dead code in fcopysign lowering. NFC.
fe13702 Convert test to use an extra Input file. NFC.
59d8674 Revert "Fix UBSan report in StringMap implementation."
9e80837 Simplify implementation and testcase of r223401 based on feedback from dblaikie.
8bc0067 Fix UBSan report in StringMap implementation.
fb8dcb4 Debug info: If the RegisterCoalescer::reMaterializeTrivialDef() is eliminating all uses of a vreg, update any DBG_VALUE describing that vreg to point to the rematerialized register instead.
76b1313 Add some tests for SimplifyCFG's TurnSwitchRangeIntoICmp(). NFC.
8de6d3e Add some tests for SimplifyCFG's ConstantFoldTerminator(). NFC.
838e181 Also use --icf=safe if we are being linked by gold.
924476a Add a FIXME as requested by Renato Golin.
499e74c Silence warning: variable 'buffer' set but not used.
9eb2a38 [x86] Fix isOffsetSuitableForCodeModel kernel code model offset
1b77bb5 [AArch64] Combining Load and IntToFp should check for neon availability
61f3193 Fix yet another unseen regression caused by r223113
3d47855 Fix thumbv4t indirect calls
ef7c2ff Add a test case for argument type coercion in an invoke of a vararg function
327f243 Add a section to Statepoint docs mentioning shared bugzilla search and standard mailing lists
89f1920 Detect if the linker is gold and if so always use --gc-sections.
efbb95a Revert "r223364 - Revert r223347 which has caused crashes on bootstrap bots."
ad90e3a Fix a typo: use of cast where dyn_cast was intended
86bf881 test-release.sh: Add a way to specify --build to configure
3f598f7 Remove dead code. NFC.
9571274 Fix a minor regression introduced in r223113
a300b8d Use size_type in the interface exposed by SmallVector.
182d9aa Revert r223347 which has caused crashes on bootstrap bots.
7e32ae6 Revert "[Thumb/Thumb2] Added restrictions on PC, LR, SP in the register list for PUSH/POP/LDM/STM. <Differential Revision: http://reviews.llvm.org/D6090>"
5e343e6 [X86] Improve a dag-combine that handles a vector extract -> zext sequence.
996b683 [Thumb/Thumb2] Added restrictions on PC, LR, SP in the register list for PUSH/POP/LDM/STM. <Differential Revision: http://reviews.llvm.org/D6090>
e6cb701 [X86] Simplify code. NFC.
d27b0b9 test-release.sh: Correct the logged configure command to match the one actually issued.
cfb121f Use DomTree in MachineSink to sink over diamonds.
94590ca [InstCombine] Minor optimization for bswap with binary ops
73ae1df Masked Load / Store Intrinsics - the CodeGen part. I'm recommiting the codegen part of the patch. The vectorizer part will be send to review again.
d70d514 Restrict somewhat the memory-allocation pointer cmp opt from r223093
9ce0115 Add missing test file
ba8180b clang-formatted ranged loops and assignment, NFC.
206b84f Add mach-o LC_RPATH support to llvm-objdump
d3c452a [X86] Clean up whitespace as well as minor coding style
4fe0f3f Revert "Add missing test dependency and use a more canonical target name."
13740c9 Add missing test dependency and use a more canonical target name.
0af45bd [Hexagon] Adding lit exception if Hexagon isn't built.
152ac18 [Hexagon] Marking some instructions as CodeGenOnly=0 and adding disassembly tests.
6c46ca3 Introduce "llvm-ranlib" as a name of targets since Object/archive-symtab.test requires llvm-ranlib.
7aa44f5 Sort by alphabetical order.
fd0832e [X86] Restore X86 base pointer after call to llvm.eh.sjlj.setjmp
ec086bf [PowerPC] 'cc' should be an alias only to 'cr0'
6bb0038 Minor typo and link fixes for Statepoint documentation
f769980 HexagonMCInst.h: Qualify constants explicitly to appease msc17.
471e834 For copy, cmake needs the full path to llvm-ar.
459e595 Allow target to specify prefix for labels
5862c2a A few more checks for gc.statepoints in the Verifier
fbcb697 Add missing dependency on llvm-ar. Should hopefully fix the bots.
c48b3bf [PowerPC] Fix inline asm memory operands not to use r0
331ec37 [RegAllocFast] Handle implicit definitions conservatively.
cc0061b This reverts commit r223306 and  r223277.
0fd28b4 [msan] allow -fsanitize-coverage=N together with -fsanitize=memory, llvm part
a78929d Test commit.
a63b95f Make llvm-ar a real build target and install it.
0baca95 Add a test-case for lit xunit output
15d4003 Move tests for llvm-objdump for universal files to X86 directory to fix build bots.
06a1a5f Don't allow test-suite names with . in them in xml output
55d5ea3 Split the set of identified struct types into opaque and non-opaque ones.
5b9d42b Add support to llvm-objdump for Mach-O universal files and archives with -macho.
7e4c9bd fix typos, grammar, formatting; NFC
07caf6b Strength Verifier checks around the types involved in a statepoint
704923b correct spelling, NFC
b0ec6c2 [SimplifyLibCalls] Improve double->float shrinking to consider constants
9d362ec [SimplifyLibCalls] Enable double to float shrinking for copysign
ec42b05 [Hexagon] Converting member InstrDesc to static variable.
e3f1271 Fix grammar-o.
ca1a325 [Hexagon] Converting subclass members to an implicit operand.
687f237 range-for some things
4496906 Simplify CodeGenRegBank::inferMatchingSuperRegClass & its caller by passing an iterator rather than index
7a16f34 Simplify ownership of RegClasses by using list<CodeGenRegisterClass> instead of vector<CodeGenRegisterClass*>
89036eb Range-for some stuff related to RegClasses, and comment cases where range-for isn't suitable.
93ce526 Make the Verifier more strict about gc.statepoints
ad30415 Add TableGen info for Power8. This is based on the Power7 version, with units added and renamed to match P8.
788af07 Change the name to be in style.
99eff50 Fix sphinx error from Statepoints.rst
f41e1d1 R600/SI: Move SIInsertWaits into AMDGPUPassConfig::addPreSched2()
8a8dc6a R600/SI: Don't run SI passes on R600 subtargets
34c1d66 AArch64: fix wrong-endian parameter passing.
cf17914 [NFC] Fixing pendantic warning extra semicolons.
d54ac60 [Hexagon] [NFC] Moving function implementations out of header.  Clang-formatting files.
0f87df2 Fix test to use the right metadata node (reapply r223239 plus a fix) and also to use the correct path to the GCNO file.
e6c2d47 [Hexagon] [NFC] Renaming *packetStart to *packetBegin
22b6c01 Revert r223239, which broke some bots.
2afd191 Fix the metadata number used by llvm.gcov to match the number of the inserted metadata node.
42fcf3d Silencing several "multiple copy constructors" warnings from MSVC; NFC.
13e20a9 Silencing a 32-bit implicit conversion warning in MSVC; NFC.
78d5d1e msan] Add compile-time checks for missing origins.
10e28ca InstCombine: simplify signed range checks
cf988bc [PowerPC] Print all inline-asm consts as signed numbers
10cae8e Emit ABI_FP_rounding attribute.
78f9ab5 Add tests for default value of Tag_ABI_FP_rounding.
a941057 Fix a typo in the documentation of LTO
eee41db Ask the module for its the identified types.
59c9cb7 ADT: Rename argument in emplace_back_impl
3c6860c Revert r222997. The newly added compile-time checks are finding missing origins, testcase is being reduced and a PR will be posted shortly.
5ed8a76 LoopVectorize: Remove unnecessary RAUW
a4ec31e R600/SI: Fix SIFixSGPRCopies for copies to physical registers
5c2d295 R600/SI: Remove incorrect assertion
ec0a7cd R600/SI: Remove i1 pseudo VALU ops
bd5f9f4 R600/SI: Fix suspicious indexing
cfde1fb R600/SI: Fix running SILowerI1Copies a second time
84e23e0 R600/SI: Fix live range error hidden by SIFoldOperands
ba2915d ADT: Add SmallVector<>::emplace_back(): fixup
fe03508 ADT: Add SmallVector<>::emplace_back()
8575503 StructurizeCFG: Use LoopInfo analysis for better loop detection
2212800 NVPTX: Delete dead code
a4cb890 R600/SI: Enable inline assembly
0245b12 [OCaml] [cmake] Disable OCaml bindings if ctypes >=0.3 is not found.
5097660 R600/SI: Change mubuf offsets to print as decimal
92d7d4d Emit the entry block first and the exit block second, then all the blocks in between afterwards. This is what gcc always does, and some out of tree tools depend on that.
61372ea GCRelocateOperands: Try to appease msc17.
bb660fc Prologue support
8cc929e ExceptionDemo: Let setMCJITMemoryManager() take unique_ptr, since r223183.
ad41590 [X86][MC] Intel syntax: accept implicit memory operand sizes larger than 80.
5ab94e7 [MCJIT] Unique-ptrify the RTDyldMemoryManager member of MCJIT. NFC.
1dce7b1 [PowerPC] Fix readcyclecounter to be custom expanded for all 32-bit targets
09d2a61 AArch64: strengthen Darwin ABI alignment assumptions
dfc69d2 Use a typed enum instead of 'unsigned char' for packed field.  NFC.
1dad693 AArch64: don't be too greedy when folding :lo12: accesses into mem ops.
97be10d PR21302. Vectorize only bottom-tested loops.
6845cac Apply loop-rotate to several vectorizer tests.
ec49b72 [X86][SSE] Keep 4i32 vector insertions in integer domain on SSE4.1 targets
dcedd15 Give lit a --xunit-xml-output option for saving results in xunit format
1855b26 [PowerPC] Implement readcyclecounter for PPC32
db70676 R600/SI: Emit amd_kernel_code_t header for AMDGPU environment
9643005 Make sure that the TargetOptions operator== is checking the full contents of the class.
26cc5be [AArch64][Stackmaps] Optimize stackmap shadows on AArch64.
d90fc9d R600/SI: Move more information into SIProgramInfo struct
73271f0 Add bindings for the rest of the MCJIT options that we previously had support for. We're still missing a binding for an MCJIT memory manager.
8d7b46d R600: Cleanup some tests and add missing testcases
301256d Restructure some assertion checking based on post commit feedback by Aaron and Tom.
d69ec73 [mips] Fix passing of small structures for big-endian O32.
2664ea9 Introduce CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing.
3089232 R600/SI: Refactor AMDGPUAsmPrinter::EmitProgramInfoSI()
70fb375 [Statepoints 4/4] Statepoint infrastructure for garbage collection: Documentation
5eccf7b Appease a build bot complaining about an unused variable that's used in an assertion.
efcedf9 cmake: Remove MAXPATHLEN define as autoconf does not provide it
cda6894 Remove '#undef const' from config.h.cmake to sync with autoconf
d021bb8 [Statepoints 3/4] Statepoint infrastructure for garbage collection: SelectionDAGBuilder
495e547 [SwitchLowering] Handle destinations on multiple phi instructions
88d2b58 [MachineCSE] Clear kill-flag on registers imp-def'd by the CSE'd instruction.
712af37 Remove unneccessary code introduced with 223101.
46c07c3 R600/SI: Set correct number of user sgprs for HSA runtime
39f6e73 [OCaml] Add Llvm.mdnull.
0a24620 fix typo in comment
b588e02 AArch64: make register block rules apply to vector types too.
15e1919 R600/SI: Set the ATC bit on all resource descriptors for the HSA runtime
fcf4242 Triple: Add AMDHSA operating system type
8fc3ffb [LICM] Avoind store sinking if no preheader is available
bd3e068 Remove unused function.
dc05f3a Add support for ARM modified-immediate assembly syntax.
fc3aa4b Add ARM relocations to ELFYAML
364f2f3 Emit Tag_ABI_FP_denormal correctly in fast-math mode.
4b09648 [signext.ll] Removal Of Duplicate Test Cases
1bd6c62 Fix variable used only in assertion.
84c0f65 Fix several bugs in r221220's new program finding code.
7e32aa1 Simplify pointer comparisons involving memory allocation functions
0dfac40 Try to fix a bot failure due to a variable used only in an assert.
78cc6fc [Statepoints 2/4] Statepoint infrastructure for garbage collection: MI & x86-64 Backend
204e21b [Statepoints 1/4] Statepoint infrastructure for garbage collection: IR Intrinsics
b043278 [NVPTX] Do not emit .weak symbols for NVPTX
03c735b Parse 'ghccc' in .ll files as the GHC convention (cc 10)
14fe2e6 [AArch64] Don't combine "select (setcc i1 LHS, RHS), vL, vR".
217a4a8 [AArch64] Fix v2i8->i16 bitcast legalization.
787a419 [OCaml] Move Llvm.clone_module to its own Llvm_transform_utils module.
a0a26f2 [OCaml] [cmake] Add CMake buildsystem for OCaml.
f97b79e Use a continue to reduce indentation and clang-format. NFC.
6eee2bb Use a range loop. NFC.
fcf3609 Use C++ typed enums instead of 'unsigned char' for MCInst Kind.  NFC.
eb1f2e8 [MachineVerifier] Accept a MBB with a single landing pad successor.
e8f8c64 Drop SrcStructTypesSet. It is redundant.
f7f8809 ARM: lower tail calls correctly when using GHC calling convention.
c9605b6 Revert r223049, r223050 and r223051 while investigating test failures.
07c6024 SimplifyCFG: Omit range checks for switch lookup tables when default is unreachable
b2fd944 SimplifyCFG: don't remove unreachable default switch destinations
e6f4d33 SelectionDAG switch lowering: Replace unreachable default with most popular case.
d9788e9 Partial revert of r222986.
0b2f9a2 R600/SI: Various instruction format bit test cleanups
462763d The andi16, addiusp and jraddiusp micromips instructions were missing dedicated decoder methods in MipsDisassembler.cpp to properly decode immediate operands. These methods are added together with corresponding tests.
f1b5d9a [msan] Add compile-time checks for missing origins.
8b9cea4 [PowerPC] Fix unwind info with dynamic stack realignment
5e6e75a Removed extra whitespace. (Testing commit access). NFC.
94df8b1 Add post-decode checking of HVC instruction.
4344941 [asan] Change dynamic alloca instrumentation to only consider allocas that are dominating all exits from function.
eed2e8b Add Thumb HVC and ERET virtualisation extension instructions.
42563ac Add ARM ERET and HVC virtualisation extension instructions.
92cc5cf Fix capitalization. NFC.
ca780b4 [stack protector] Set edge weights for newly created basic blocks.
7a551b7 Change how we keep track of which types are in the dest module.
805b816 Add a test showing what the linker IdentifiedStructTypes is for.
6c8ce66 Relax an assert a bit to avoid a crash on unreachable code.
186abcb [PowerPC] Add asm support for cache-inhibited ld/st instructions
73642a8 Revert r222957 "Replace std::map<K, V*> with std::map<K, V> to handle ownership and deletion of the values."
066fdfa Revert r222965 "Make MultiClass::DefPrototypes own their Records to fix memory leaks."
e1e5343 Qualify one more make_unique call.
45f731a Speculatively qualify some llvm::make_unique calls trying to please MSVC
d45efb54 Use an unsigned type because there seems to be no reason for it to be signed.
a1fa859 Make MultiClass::DefPrototypes own their Records to fix memory leaks.
809b955 Switch lowering: reformat some for loops etc. NFC
5c6c5e2 Switch lowering: Fix broken 'Figure out which block is next' code
1c86b63 Target triple OS detection tidyup. NFC
9611a1f Remove some unnecessary vector::reserve/assign calls.
e722713 Remove indirection of vector<T*> in favor of deque<T>
710cdf7 Replace std::map<K, V*> with std::map<K, V> to handle ownership and deletion of the values.
355d069 Remove 'else' after 'return'. Fix formatting of a 'switch' statement.
b087448 [mips][microMIPS] Implement NOP aliases
c7d3454 Use deque<T> rather than vector<T*> since it provides the same invalidation semantics (at least when removal is not needed) without the extra indirection/ownership complexity
71f69c8 Constify some things in preparation for CodeGenSubRegIndex to be stored by value in their container, removing the indirection
2935bbc Make RecordKeeper::addClass/addDef take unique_ptrs instead of creating one internally.
2d37070 Use unique_ptr to remove some explicit deletes on some error case returns. At least one spot of weird ownership passing that needs some future cleanup.
38b20f0 DebugIR: Remove empty directories from SVN
9416f9c DebugIR: Delete -debug-ir
e395d742 Support: remove some variable names
b60bcfd Revert "Simplify some more ownership using forward_list<T> rather than vector<unique_ptr<T>>"
6e5862c R600/SI: Fix assertion on sign extend of 3 vectors
5f95140 Reapply "Use std::map<K, V> rather than std::map<K, std::unique_ptr<V>>""
833ccf8 Revert "Use std::map<K, V> rather than std::map<K, std::unique_ptr<V>>"
47e9836 Push unique_ptr a bit further through some APIs and simplify some cleanup
5a94a64 Use std::map<K, V> rather than std::map<K, std::unique_ptr<V>>
54786a0 Revert "Masked Vector Load and Store Intrinsics."
3ec563c Simplify some more ownership using forward_list<T> rather than vector<unique_ptr<T>>
f1318cf Forgotten formatting from previous commit
841db2c Simplify ownership by using forward_list<T> rather than vector<unique_ptr<T>>
da08412 Fix a few memory leaks in CodeGenRegBank.
0c83952 Use unique_ptr to simplify deletion.
a112962 InstCombine: FoldOrOfICmps harder
69ed1ff [LICM] Store sink and indirectbr instructions
0412209 [SwitchLowering] Handle multiple destinations on condensed case stmts
c599211 Enable FeatureFastUAMem for btver2
f716393 Add back r222727 with a fix.
fdf8098 Add an assert and use a range loop. NFC.
c616745 Add a testcase reduced from clang lto bootstrap on OS X.
3a8b98c Fix wrong encoding of MRSBanked.
434d82e [msan] Fix origin propagation for select of floats.
56101e1 Test all <build attribute, value> pairs.
9e94786 Removed extra line from a comment to test first commit. NFC.
9fd6eeb Fix another memory leak in TableGen AsmMatcher by deleting CodeGenInstAliases.
4c10f17 Add missing 'override' keyword.
44ebfb7 Use unique_ptr to fix some memory leaks in Tablegen AsmMatcherEmitter.
99a2170 Use range-based for loops and const-correct a few things.
402b6fd Stop using ArrayRef of a const type.
d7a4f74 AArch64: treat [N x Ty] as a block during procedure calls.
7dc6143 [mips][microMIPS] Implement SWM16 and LWM16 instructions Differential Revision: http://reviews.llvm.org/D5579
13fbabb [mips][microMIPS] Implement BREAK16 and SDBBP16 instructions
68de93c [mips] Add synci instruction.
e40dbd6 Widen ELFYAML relocation type to 32 bits
8f9f6a6 Commit back the correct bits of r222760 (was r222538).
4bbcb6a Revert "Reapply 222538 and update tests to explicitly request small code model and PIC:"
eb70fd0 Revert "Fix overly aggressive type merging."
6cfbf12 reinstate r222872: Peephole optimization in switch table lookup: reuse the guarding table comparison if possible.
c0b24f7 [msan] Remove indirect call wrapping code.
2b8e58c [mips][microMIPS] Implement disassembler support for 16-bit instructions LI16, ADDIUR1SP, ADDIUR2 and ADDIUS5
72ba1af Stop uppercasing build attribute data.
578b3cc Use FileCheck instead of grep. Change by Ankur Garg.
4646580 Revert "Peephole optimization in switch table lookup: reuse the guarding table comparison if possible."
8fc5d5c Use FileCheck instead of grep. Change by Sonam.
c394c42 Peephole optimization in switch table lookup: reuse the guarding table comparison if possible.
dcf39d2 InstCombine: Restore optimizations lost in r210006
f486061 Add LLVMObject to LLVMExecutionEngine.
f45536e InstSimplify: Restore optimizations lost in r210006
973e54a [MCJIT] Remove the local symbol table from RuntimeDlyd - it's not needed.
21f9d78 [MCJIT] Update CMakeLists.txt for llvm-rtdyld to add Object as a requirement.
7032f3c [MCJIT] Replace JITEventListener::anchor (temporarily removed in r222861), and move GDBRegistrationListener into ExecutionEngine to avoid layering violation.
daed11e [MCJIT] Remove JITEventListener's anchor until I can determine the right place to put it. This should unbreak the Mips bots.
a9ce038 Teach LLVM about llgo subproject.
51bd393 [MCJIT] Move get-any-symbol-load-address logic out of RuntimeDyld and into RuntimeDyldChecker.
9e6a181 Revert "Added inst combine transforms for single bit tests from Chris's note"
6487f4b Add a small "usage:" comment at the top of not.cpp
d2077b0 Object/COFF: Fix off-by-one error for object having lots of relocations
b69378a R600/SI: Use ZeroOrNegativeOneBooleanContent
74eb264 [Hexagon] Adding cmp* immediate form instructions.
832e230 [mips][microMIPS] Implement disassembler support for 16-bit instructions LBU16, LHU16, LW16, SB16, SH16 and SW16
1df05cd [Hexagon] Adding and64, or64, and xor64 instructions.
f87cce1 R600/SI: Create e64 versions of and/or/xor in SILowerI1Copies
47539e0 [MCJIT] Fix missing return statement.
216e532 [MCJIT] Reapply r222828 and r222810-r222812 with fix for MSVC move-op issues.
19afe67 Reverting r222828 and r222810-r222812 as they broke the build on Windows.
83fca23 Removing a spurious semicolon; NFC
a5a7331 Add missing "override".
87a2f37 Update AArch64 ELF relocations to ABI 1.0
10c8f38 AVX-512: Scalar ERI intrinsics including SAE mode and memory operand. Added AVX512_maskable_scalar template, that should cover all scalar instructions in the future.
e984415 Update ARM ELF relocations to ABI 2.09
31862ae [MCJIT] Re-enable GDB registration (temporarily disabled in r222811), but check that we actually have an object to register first.
11f81ba [MCJIT] Temporarily disable automatic JIT debugger registration.
7acaefa [MCJIT] Clean up RuntimeDyld's quirky object-ownership/modification scheme.
568f7e8 Remove neverHasSideEffects support from TableGen CodeGenInstruction. Everyone should use hasSideEffects now.
e2fc38a Try to make the modules buildbot happy again.
0118981 Reformat with gofmt.
2d3f97d Make SetMCJITOptimizationLevel more of a method and pass options as a reference. Move closer to the type.
82ec847 Make sure that the go bindings call LLVMInitializeMCJITCompilerOptions so that they initialize the code generation model to the correct (non-zero) default model.
c0dae44 Replace neverHasSideEffects=1 with hasSideEffects=0 in all .td files.
7f6cee9 [X86][SSE] Improvements to byte shift shuffle matching

git-subtree-dir: llvm
git-subtree-split: d2f12fd27a0b01e227e0dbacd208e6f1c640562f
Merge with LLVM.
Squashed 'llvm/tools/clang/' changes from 68d4a96..8c585cd

8c585cd Make DiagnosticErrorTrap work even if SuppressAllDiagnostics is enabled. Patch by Brad King!
dcbb8fe Workaround attribute ordering issue with kernel only attributes
aefc430 Use else if when checking multiple attributes.
cc90f03 Amending r223468 with this documentation change.
640f660 Fix Typos in include/clang-c/Index.h Phabricator revision: http://reviews.llvm.org/D6507
e3446ce Modify __has_attribute so that it only looks for GNU-style attributes. Removes the ability to look for generic attributes and keywords via this macro, which has the potential to be a breaking change. However, since there is __has_cpp_attribute and __has_declspec_attribute, and given the limited usefulness of querying a generic attribute name regardless of syntax, this seems like the correct path forward.
bf260bb Added a new preprocessor macro: __has_declspec_attribute. This can be used as a way to determine whether Clang supports a __declspec spelling for a given attribute, similar to  __has_attribute and __has_cpp_attribute.
aa8362e Temporarily reverting r223443 due to bot breakage.
4af108f Fix a warning with generating the attribute documentation; NFC.
f1a4b00 clang-format: Support NS_OPTIONS, CF_ENUM and CF_OPTIONS.
64a12ad Driver: Objective-C should respect -fno-exceptions
ee0543e Driver: Cleanup -fexceptions behavior
bb77427 [OPENMP] Test for 'omp barrier' directive
2832eb7 [OPENMP] Codegen for 'omp barrier' directive. Adds generation of call to "i32 kmpc_cancel_barrier(ident_t *, i32)" libcall for explicitly specified barriers (OMP_IDENT_BARRIER_EXPL flag is added to "flags" field of "ident_t" structure). Also this patch replaces all calls to "kmpc_barrier" function by calls of "__kmpc_cancel_barrier" function which provides additional functionality for OpenMP 4.0. Also, library specific enum OpenMPLocationFlags moved to private section of CGOpenMPRuntime class to make it more independent from library implementation. Differential Revision: http://reviews.llvm.org/D6447
addfc66 [modules] Instead of storing absolute paths in a .pcm file, store the path to the root of the module and use paths relative to that directory wherever possible. This is a step towards allowing explicit modules to be relocated without being rebuilt, which is important for some kinds of distributed builds, for good paths in diagnostics, and for appropriate .d output.
b3f7232 Have the driver and the target code agree on what the default ABI is for each machine. Fix up darwin tests that were testing for aapcs on armv7-ios when the actual ABI is apcs.
488283b [analyzer] Eliminated endless loop.
b0c1091 Use isOSBinFormatMachO() instead of comparing the object format against an enum.
ee66c4c Parse qualifiers after comma in declarator lists as a Microsoft extension
59b7991 Recognize __unaligned keyword after type specifier
9310241 Adding a FIXME to the code, based on a discussion in IRC; NFC.
d8a0a3c Silence warning: "NOMINMAX" redefined.
501dbb2 Add attributes for AMDGPU register limits.
6141363 clang-format: [JS] Don't put top-level dict literals on a single line.
61f9a77 Fix PR21684 - Ellipsis following an 'auto' parameter sans name/ID should indicate a c++ parameter pack not a c-variadic.
6531d35 Make getInsertArgumentAdjuster insert extra arguments to the end by default.
ff99664 clang-format: More restrictively classify import declarations.
528f83c [OPENMP] Codegen for 'omp master' directive Patch adds 2 library functions to OpenMPRuntime class - int32 kmpc_master(ident_t *, int32 gtid) and void kmpc_end_master(ident_t *, int32 gtid); For 'omp master' directive the next code is generated:
f514ca8 Always emit kernel arg info for SPIR.
c082dc3 CodeGen: refactor ARM builtin handling
10ea5b0 CMake: try to actually fix the regexes for setting HOST_LINK_VERSION this time (PR21268)
955c343 Add test for __umulh
253c097 Implement __umulh with __int128 arithmetic
9181092 [msan] allow -fsanitize-coverage=N together with -fsanitize=memory, clang part
3dadd70 CUDA host device code with two code paths
70d0d3c Cast vtable address points to i32 (...)** to enable more globalopt
8e531d4 Teach EvaluatedExprVisitor that the condition and unselected branches of a _Generic expression are unevaluated.
dd74c42 Make ArgumentsAdjuster an std::function.
98d2316 Fix isThreadModelSupported()'s comment. NFC
8c2a47d clang-format: Fix fake parentheses placement with comments.
54986d9 clang-format: Fix expression parser not closing stuff at end of stmt.
332c79b [OPENMP] Code formatting and improvement, no functional changes.
9e06fec Preserve LD_LIBRARY_PATH when using the 'env' command
240324b Handle delayed corrections in a couple more error paths in ParsePostfixExpressionSuffix.
cbd0cd3 Update test to check for prologue instead of prefix
106ceaf UBSan now uses prologue data instead of prefix data
8e9d616 Add support for has_feature(cxx_alignof) and has_feature(c_alignof).
2ed848d Fix incorrect codegen for devirtualized calls to virtual overloaded operators.
25a330f PR21706: -Wunsequenced was missing warnings when leaving a sequenced region that contained side effects.
157da18 FullProduct should be _FullProduct
d86a4ad Ensure typos in the default values of template parameters get diagnosed.
4cd38f7 Intrin: shrx_u64 should be _shrx_u64
f89684e Intrin: Add _umul128
9aadb4d InstrProf: Use the same names for variables as we use in the profile
8f007b5 Another warning with no group name bites the dust. rdar://19116886
b1d3eaf InstrProf: Remove some pointless indirection (NFC)
878c801 Diagnose TypoExprs in a couple of error cases in ParsePostfixExpressionSuffix.
7567b2f Wrap to 80 columns. No behavior change.
71b093c Make le64 DescriptionString consistent with other targets.
ad01257 This patch fixes a crash involving use of predefined expressions. It fixes crash when mangling name for block's helper function used inside a constructor/destructor. rdar://19065361.
c97ed59 Skip some unnecessary type checks.
227f91e Fix invalid calling convention used for libcalls on ARM. ARM ABI specifies that all the libcalls use soft FP ABI (even hard FP binaries). These days clang emits _mulsc3 / _muldc3 calls with default (C) calling convention which would be translated into AAPCS_VFP LLVM calling and thus the result of complex multiplication will be bogus.
a72e27b Reverted r223114, it caused failure on on clang-native-arm-cortex-a9.
6c59461 clang-format: Escape '*' in generated flag documentation.
f6babdd clang-format: Add option to suppress operator alignment.
8a112fe [NVPTX] Fix type error for some builtins in BuiltinsNVPTX.def
d04e6fd Emit warning if define or undef reserved identifier or keyword.
85fd102 clang-format: precedence-based indentation when breaking before operators.
95712cb Re-apply "Revert r166370 and r166540 now that Xcode 4.6 has been available for a while."
eda75a1 clang/test/Modules/malformed.cpp REQUIRES shell due to "cd".
37c3ef4 CMake: make the regexes used for setting HOST_LINK_VERSION more forgiving (PR21268)
da7accb Try to fix the MSVC build.
b947ab8 Rely on fewer features of the 'env' command. Darwin only supports '-i'. I'm explicitly setting LC_ALL=C somewhat for documentation, but hopefully this also removes some host variation from the test results.
d385dba Add a test that ensures the Clang driver behaves itself when the PATH environment variable is changed to strange things out from under it. Prior to r223099 in LLVM, these test cases would crash in various ways (assert fails, stack exhaustion, etc.).
de75064 Remove special case for aarch64 static vs. PIC code in iOS kernel code.
b911ec1 [modules] Track how 'header' directives were written in module map files, rather than trying to extract this information from the FileEntry after the fact.
e03d3c2 Perform correct lookup when '__super' is used in class with dependent base.
1c629f3 Make -fuse-ld=lld work properly on Windows.
491c76a Use nullptr to silence -Wsentinel when self-hosting on Windows
778ed7b Add missing 'break's, found by inspection. No functionality change; the fallthrough happened to do the right thing in both cases.
d977929 Add a test for devirtualization of virtual operator calls.
ac94c45 Update R600 address space map to include generic
0a7a42e Make the function pointer a template argument instead of a runtime value.
c7de011 [OPENMP] Formating and code improvement for codegen of 'omp critical' directive. No functional changes, only code improvements.
c18cd67 Revert "Remove threshold for lifetime marker insertion of named temporaries"
b8432d9 Remove threshold for lifetime marker insertion of named temporaries
763bcb8 clang/test/CodeGenOpenCL/opencl_types.cl: Appease i686-msvc.
4fcdac5 Fix typo.
7df0a26 Fix grammar error in err_bad_reinterpret_cast_reference error message.
8cda724 Tweak clang/test/CodeGenOpenCL/opencl_types.cl to appease msvc since r222941.
76742ae AST: Consider pseudo-struct builtin types as substitutable
f661c5a Add additional arguments for -mfpu options
33d4f2f Add -mfpu=neon-vfpv4
424a82d [OPENMP] Additional processing of 'omp atomic write' directive. According to OpenMP standard, Section 2.12.6, atomic Construct, '#pragma omp atomic write' is allowed to be used only for expression statements of form 'x = expr;', where x is a lvalue expression and expr is an expression with scalar type. Patch adds checks for it.
6724817 Create a new 'flag_enum' attribute.
5609bba AArch64: simplify PCS mapping.
ef2bbb8 Sphinx does not have a lexer for OpenCL, so falling back to C for the language on the code block. Also fixing an indentation warning. NFC to the content of the documentation itself.
b16303b clang-format: [JS] Contract fewer functions to a single line.
a6b1f70 clang-format: [JS] Try not to break in container literals.
ea63da2 clang-format: [JS] new and delete are valid function names.
68d993f clang-format: [JS] Make Closure module detection more narrow.
e89a0fd clang-format: Don't use column layout with AlignAfterOpenBrackets.
a379fcb [c++1z] Remove terse range-based for loops; they've been removed from consideration for C++17 for now. Update C++ status page to match.
abd574e When checking for uninitialized values, do not confuse "std::move" with every other function named "move".
bde3837 OpenCL: fix test for lack of names in release builds
6d4b97c [analyzer] Indented code within the DisplayHelp sub.
320ab1e Fix buildbot failure on LLP64 platforms like MSVC x86_64.
fa67c1e clang-format: [Java] Don't line-wrap package declarations.
e47c313 clang-format: Tweak -style=Chromium for Java files.
a6257a2 Adding an explicit triple to this test to get it to pass all build bots.
77ebcbe [OpenCL] Implemented restrictions for pointer conversions specified in OpenCL v2.0.
7893925 [OpenCL] Generic address space parsing and diagnostics test (forgotten previously)
08c2586 [OpenCL] Generic address space has been added in OpenCL v2.0.
572143c clang-format: [Java] Improve formatting of throws declarations.
6d16545 clang-format: [Java] Improve cast detection.
bd89313 clang-format: [Java] Fix breaking after annotations.
6cb96e4 clang-format: Add SFS_Empty to only empty functions on a single line.
0f7e9eb clang-format: [Java] Support Foo.class;
aa45eba [c++1z] Most of N4268 (allow constant evaluation for non-type template arguments).
0cd2954 CodeGen: Fix emission of __atomic_compare_exchange
a7f9372 Ensure that any TypoExprs in the arguments to bultins with custom type checking are handled before the custom type checking is performed.

git-subtree-dir: llvm/tools/clang
git-subtree-split: 8c585cdfb1053afa9b1c81bd0db1f1c3c20d1d67
Merge with Clang.
Squashed 'llvm/tools/lldb/' changes from ed6f4c4..4c96149

4c96149 Add commands type format info type summary info type synthetic info
eef8152 Fix a bunch of [-Werror,-Winconsistent-missing-override] warnings.
8554d34 Fix a few default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default] warnings.
3935623 Subtract the size of the breakpoint opcode from the PC when getting the bp site.
98a4488 Load / unload modules in the target when the OS events occur.
a88ddbb Implement an empty DynamicLoader plugin for Windows.
7090ba8 Fix compilation errors after clang modules checkin.
c40d8c7 Fix a crash in dotest.py when the lldb executable is not built.
4c5782a Reverting r223423, test timeout
e335856 Added CMake support so all the Clang modules code will at least be built by non-OS X builders. This should head off some build breakage at the pass.
376af98 Changes to the expression parser to actually use the types that we find in Clang modules.
6922bd7 Additional changes required by r223433.
228bbb4 Removed a stray directory.
aa3a798 This is the meat of the code to add Clang modules support to LLDB.  It includes the following:
473f1c7 Added the LLDB enumeration necessary to find the Clang headers directory.  Needed by r223430.
08d3720 Added support to Platform to indicate (1) whether the current platform supports Clang modules, and (2) what options to pass to Clang so it can load those Clang modules.
6de1ba4 Add support for embedding Clang compiler headers like tgmath.h and stdarg.h into the LLDB installation, and then finding them through the Host infrastructure.
3948b96 Kill any python test script that takes more than 5 minutes
c81ae60 Fix a minor error where I forgot to declare a variable.
5830231 Revert "Use timeout when reading debugserver's port from a named pipe."
f09f169 Revert "Fix a build breakage. Looks like the LLVM side of this change has been reverted"
cb3f979 We should not pretend that an int is a valid ObjC pointer. If your number truly is a pointer, po (id)myNumber is a better alternative. Fixes rdar://16585032
a22905d Remove dead code from SymbolFileDWARF:
e86c6fc Fix a build breakage. Looks like the LLVM side of this change has been reverted
8ad6e32 Cleanup of the fix done recently for a lldb-mi hang on OSX. It was observed that we dont need to set stdin to unbuffered and setting console to non-canonical mode.
d28712c Improve the comments on PutSTDIN, GetSTDOUT, and GetSTDERR.
a90cc45 Manually call ModulesDidLoad when the executable is loaded.
1129723 Correctly shutdown when DoDestroy is called with an active exception.
4a5ad2c Use timeout when reading debugserver's port from a named pipe.
fa38aa1 Remove unnecessary changes committed in r223222. There were 2 different patches in discussion. One using ioctl and other using select. We decided to use the ioctl but committed code also have some changes which were only needed for 'select'. This patch removes them.
cfdeadf Fix a hang on OSX while executing -exec-run. Now we wait for input to become available before blocking in fgets. More details on problem can be found in http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20141201/014290.html
2c2ea78 Update setMCJITMemoryManager call to keep in line with llvm r223183. Patch from Ryan Goodfellow.
ea0c564 Mark the armv7 q0-q3 and q8-q15 registers as volatile (not callee preserved) in the ABI.
68aff33 Fix broken test suite on Windows after r223091.
37df9bc Fix the behavior of ${current-pc-arrow} in the default disassembly format for the not-current-stack-frame.  This was causing test/functionalities/inferior-assert to fail.
0efb51c Fix several test failures on Linux/FreeBSD caused by compiler configuration and invalid environment - make lldbtest.registerSharedLibrariesWithTarget to support multiple platforms. http://reviews.llvm.org/D6392
369a722 Enable enabling and disabling breakpoints on Windows.
2bc42f7 Link test executables with LLD on Windows.
3ec2927 Only normalize FileSpec paths *after* resolving them.
164d8e0 The register keyword is deprecated in C++11, so clang complains strongly about swig generating register declarations. Abuse the preprocessor to define the keyword away
646b468 lldb can deadlock when launched with an non-existing executable:
5701018 Added a new regular expression to the "_regexp-break" command ("b" by default):
316fc59 Added StringExtractor::DecodeHexU8 && GetHexBytesAvail
c52e543 StringExtractor unit tests
db97280 Add support for 32-bit i386 binaries.
8d1bd93 The finishing touches on getting the compact unwind dumping completed for x86_64.  i386, arm, arm64 aren't handled yet but those are minor variations on this format.
e04b58c Add support for UNWIND_X86_64_MODE_STACK_IND entries. Correct the function offset computations in UNWIND_SECOND_LEVEL_REGULAR tables.  A few other small fixes.
9e7799f Make LLGS to open a named pipe and write a listening port to it only when a proper port value is received.
3bf8955 A little more work on the compact unwind dumper. UNWIND_X86_64_MODE_STACK_IND mode is almost correct; extra stack space allocated before the reg saves isn't handled right.  Still a little wobbily on the file addresses of functions.  Finally understand how the 6 registers that may be saved are ordered in just 10 its of space -- the Lehmer code for the registers is derived and then the sequence is encoded in a variable base number.  Added some comments with references to what the code is doing so it'll be easier for others to track down.
3f0ef7d Add test for MI tokens. This file tests the sequence of digits that can come before an MI command.
9c0574b Refactor SocketAddress::getaddrinfo - avoid calling IsValid if ::getaddrinfo has failed. Otherwise, IsValid crashes on assertation in GetFamilyLength.
a21ae47 Fix several test failures on Linux/FreeBSD caused by compiler configuration and invalid environment.
380121a Improve lldb-mi tests.
fce63dd Re-order the base classes to prevent a crash in Linux.

git-subtree-dir: llvm/tools/lldb
git-subtree-split: 4c961499b88bba8d1e0d1621e02ba95eb241ddad
Merge commit 'a81c08137cbf57f6fc0bb230f67ab97313f51326' into devel