Squashed 'llvm/' changes from 837a7c0..db0ec65

db0ec65 Sink DwarfDebug::createAndAddScopeChildren down into DwarfCompileUnit.
7cb5e0f Sink DwarfDebug::constructSubprogramScopeDIE down into DwarfCompileUnit
c2bf8fb [Reassociate] Don't canonicalize X - undef to X + (-undef).
07200c4 Remove a compiler bug workaround from 2007. The affected versions of gcc are long gone.
adba582 Revert "[BasicAA] Revert "Revert r218714 - Make better use of zext and sign information.""
2b3bbbd Remove unused field from Operand
2e3ee4c Fix typo
a8b2e6f R600/SI: Legalize CopyToReg during instruction selection
80bfef5 [PBQP] Add missing headers from r219421.
5465cc6 Sink DwarfDebug::createScopeChildrenDIE down into DwarfCompileUnit.
54d63b4 [PBQP] Replace PBQPBuilder with composable constraints (PBQPRAConstraint).
d0fb5b1 R600/SI: Legalize INSERT_SUBREG instructions during PostISelFolding
81a95a8 Sink DwarfDebug.cpp::constructVariableDIE into DwarfCompileUnit.
4710301 Move DwarfUnit::constructVariableDIE down to DwarfCompileUnit, since it's only needed there.
c307b30 [PPC64] VSX indexed-form loads use wrong instruction format
12a37fc Sink DwarfDebug::constructLexicalScopeDIE into DwarfCompileUnit
44524f4 Missing reformatting
3fcb9f3 Sink DwarfDebug::constructInlinedScopeDIE into DwarfCompileUnit
c53401e [InstCombine] Fix wrong folding of constant comparisons involving ashr and negative values.
f73400a [AArch64] Enable partial & runtime unrolling on cortex-a57.
06f1f35 Object, COFF: Move the VirtualSize/SizeOfRawData logic to getSectionSize
340b5b9 [AVX512] Extended avx512_binop_rm for AVX512VL subsets. Added avx512_binop_rm_vl multiclass for VL subset Added encoding tests
5b1b984 Object, COFF: Cap the section contents to min(VirtualSize, SizeOfRawData)
d9b7ba1 Remove more calls to getSubtargetImpl from the schedulers and remove cached or unnecessary TargetMachines.
8e67357 Use triple's isiOS() and isOSDarwin() methods.
f02f03c Object: Add range iterators for COFF import/export table
e6d9709 Remove unused argument to CreateTargetScheduleState and change the TargetMachine to a TargetSubtargetInfo since everything we wanted is off of that.
939dd38 Remove uses of getSubtargetImpl from ResourcePriorityQueue and replace them with calls off of the MachineFuncton.
b78fd03 Remove the uses of getSubtargetImpl from InstrEmitter and remove the now unused TargetMachine variable.
05597e9 Use the subtarget on the dag to get TargetFrameLowering rather than off the target machine.
31c9cd0 Remove uses of the TargetMachine from FunctionLoweringInfo via caching TargetLowering and using the MachineFunction.
7ed0e6d Push DwarfDebug::attachRangesOrLowHighPC down into DwarfCompileUnit
cbb705d Sink DwarfDebug::addScopeRangeList down into DwarfCompileUnit
6aaac28 Remove unnecessary include.
f6d0280 Use both the cached TLI and the subtarget off of the DAG in the DAG combiner.
5d61941 Remove getSubtargetImpl calls from FastISel, we can get it from the MachineFunction where it's already cached.
38a670a Fix typo in comment
e988932 Sink DwarfUnit::addSectionDelta into DwarfCompileUnit, the only place it's needed.
8088af2 [AVX512] Rename AVX512_masking* to AVX512_maskable*
fbd0e46 [AVX512] Intrinsics for vextract*x4
e868005 [AVX512] Add asm-only support for vextract*x4 masking variants
9d0ec92 [AVX512] Move DAG for all-zero node to X86VectorVTInfo
74459cb [AVX512] Support mask register in MRMDestReg format
6feb834 [AVX512] Peel off an asm-only class from AVX512_masking_common.
b79d91c [X86] Don't transform atomic-load-add into an inc/dec when inc/dec is slow
f616a4b Reformat some stuff I missed in recent previous commits
aa486d0 Revert r219354. It seems to break some buildbots.
ee3948f Use llvm-symbolizer to symbolize LLVM/Clang crash dumps.
46e2970 Sink and coalesce DwarfDebug.cpp::addSectionLabel and DwarfUnit::addSectionLabel down into DwarfCompileUnit::addSectionLabel
50822e6 Remove dead call to getTypeToTransformTo. The result is unused.
3e9c8c5 DebugInfo: The rest of pushing DwarfDebug::constructScopeDIE down into DwarfCompileUnit
3f2f969 Push DwarfDebug::constructScopeDIE down into DwarfCompileUnit
b05e2be Remove a bunch of getSubtargetImpl calls since we already have a cached TLI instance.
48dfa12 [X86] Avoid generating inc/dec when slow for x.atomic_store(1 + x.atomic_load())
b5b306e Inliner: Non-local functions in COMDATs shouldn't be dropped
0a5843e Fix COFF section index relocation should be 16 bits, not 32
8e5fbd7 Correctly compute the size of common symbols in COFF.
c5dc4aa Print symbol sizes in this test in preparation for fixing COFF common sizes.
41c4eb7 Revert "[InstCombine] re-commit r218721 with fix for pr21199"
0e37546 [AVX512] Added intrinsics for 128-, 256- and 512-bit versions of VPCMP/VPCMPU{BWDQ} Added CMP_MASK_CC intrinsic type. Added tests for intrinsics.
8175be5 Remove bogus std::error_code returns form SectionRef.
1a98f79 Fix indentation.
6c54948 Update dwarf::ApplePropertyAttributes enum to meaningful values.
e659ba9 [AVX512] Refactoring of avx512_binop_rm multiclass through AVX512_masking. Added new argrument for AVX512_masking: InstrItinClass and bit isCommutable. No functional change.
c0f7cfa Remove an out of date comment.
1e059a8 Emit unaligned access build attribute for ARM
ef2ed3f Refactor isThumb1Only() && isMClass() into a predicate called isV6M()
3828392 Simplify switch statement in ARM subtarget align access
5a2fda0 Use the TargetLowering information we already have on the SelectionDAG in SelectionDAGBuilder rather than going through the TargetMachine for lookup.
c586355 Grab the TargetRegisterInfo off of the subtarget from the MachineFunction rather than a lookup on the TargetMachine to avoid unnecessary lookups.
9e9c2af Update git-svnrevert to accept git and svn revisions
8e0fd8c Unix/Process: Don't use pthread_sigmask if we aren't built with threads
5dd4454 Replace calls to get the subtarget and TargetFrameLowering with cached variables and a single call in the constructor.
13ffdf8 Format spacing and remove extra lines to comply with standards. NFC.
c720405 Use cached subtarget rather than looking it up on the TargetMachine again.
b7cd35b Cache TargetLowering on SelectionDAGISel and update previous calls to getTargetLowering() with the cached variable.
b07b097 GlobalOpt: Don't drop unused memberes of a Comdat
f8b5847 [InstCombine] re-commit r218721 with fix for pr21199
1fa70c9 COFF: Don't oversize COMMON symbols when targeting BFD ld
3d371bd llvm-dwarfdump: Add support for some COFF relocations
2929da9 [AArch64] Generate vector signed/unsigned mul and mla/mls long.
f3c82a5 llvm-readobj: add test for r219228
f3358e3 Cache SelectionDAGISel TargetInstrInfo lookups on the class and propagate. Also use the TargetSubtargetInfo and the MachineFunction and move TargetRegisterInfo query closer to uses.
ede41a9 Reset the target options and optimization level as the first thing we do inside selection dag. This code needs to be migrated to queries on the function rather than global data, but this organizes things before we start grabbing the subtarget.
48b1918 Have the selection dag grab TargetLowering off of the subtarget inside init rather than have it passed in as an argument.
8315bd8 Revert r219175 - [InstCombine] re-commit r218721 icmp-select-icmp optimization
6e36592 Have SelectionDAG's subtarget TargetSelectionDAGInfo be set during init rather than construction time.
8d74900 [DebugInfo] Pass DWARFSection down to DWARFUnit constructor (NFC).
52688c3 [Support] Add MemoryBuffer::getFileSlice()
a29287d [DebugInfo] Pass DWARFSection into DWARFUnitSection constructor (NFC).
28127ff [X86] Fix a bug with fetch_add(INT32_MIN)
806e08c R600/SI: Refactor VOP3 instruction defs
96c9ebb R600/SI: Refactor VOPC instruction defs
4094973 R600/SI: Refactor VOP2 instruction defs
6bf4c41 R600/SI: Refactor VOP1 instruction defs
99ff4a2 [DebugInfo] Turn DWARFContext::Section into DWARFSection (NFC).
502b4d1 Add return value and negative checks to MapVector::erase from r219240.
5f3c0ba DebugInfo+DFSan: Ensure that debug info references to llvm::Functions remain pointing to the underlying function when wrappers are created
7106ab7 [Bugpoint] Close error log in ProcessFailure. Bugpoint had been failing to close this, and in some circumstances (e.g. reducing particularly large test-cases) this was causing bugpoint to be killed for hitting open file-handle limits.
1ba00ea R600: Remove dead code
de7465a LoopUnroll: Create sub-loops in LoopInfo
25cfb5c Add size_t MapVector::erase(KeyT) similar to the one in std::map.
9b303dc LoopUnroll: Only check for ScalarEvolution analysis once, NFC
ae06e97 R600: Remove some redundant initializations from AMDGPUMCAsmInfo
9eb63e5 R600: Use MCAsmInfoELF as AMDGPUMCAsmInfo base class
b8fee4f R600/SI: Remove assertion in SIInstrInfo::areLoadsFromSameBasePtr()
63cdf9f Don't check for null after calling COFFObjectFile::toSec.
fbf9a40 Optimize COFFObjectFile::sectionContainsSymbol a bit.
29890f7 MC: add support for -aligncomm GNU extension
db02fa5 llvm-readobj: add support to dump (COFF) directives
b3a0758 Remove the IsVolatileSize parameter of getOpenFileSlice.
6477842 Be consistent about using "const Twine &" for filenames.
5c98f14 Two case switch to select optimization
ebc756d typos
87ce2e3 typos
0575fb9 don't repeat function name in comments
4658d7a typos
08942b9 DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself.
92f9736 DebugInfo+DeadArgElimination: Ensure llvm::Function*s from debug info are updated even when DAE removes both varargs and non-varargs arguments on the same function.
7839762 Reformat if statement to comply with LLVM standards. NFC.
1e4680c Reformat to comply with LLVM coding standards using clang-format. NFC.
ea7f495 Remove Extra lines. NFC.
86e0844 [asan-asm-instrumentation] CFI directives are generated for .S files.
0ef79aa [InstCombine] Reformat if statements to comply with LLVM Coding Standards.
75046b4 [mips] Return {f128} correctly for N32/N64.
95717db [X86] Fix a bug where the disassembler was ignoring the VEX.W bit in 32-bit mode for certain instructions it shouldn't.
ada4703 Formatting fixes. Most putting 'else' on the same line as the preceding curly brace.
038a3b8 Fix filename in header and use C++ version of the C header files.
2869d48 GlobalDCE: Don't drop any COMDAT members
ba2113f Attempt to calm down buildbots
220c5ca Support: Don't call close again if we get EINTR
61c4e41 gold plugin: Handle gold selecting a linkonce GV when a weak is present.
301d3d0 [FastISel][AArch64] Teach the address computation code to also fold sign-/zero-extends.
3692081 [FastISel][AArch64] Teach the address computation to also fold sub instructions.
ca07e25 [FastISel][AArch64] Fix "Fold sign-/zero-extends into the load instruction."
4f17a54 gold plugin: create internal replacement with original linkage first.
3ddd4fa gold plugin: Remap function arguments when creating a replacement function.
5307076 [InstCombine] re-commit r218721 icmp-select-icmp optimization
844eeb3 ARMInstPrinter.cpp: Suppress a warning for -Asserts. [-Wunused-variable]
e6fb726 llvm/test/lit.cfg: Suppress dwarf stuff for targeting x86_64-mingw32 while investigating since r219108.
3ba3a4c Support: Add a utility to remap std{in,out,err} to /dev/null if closed
5b8cd15 Recognize aarch64_be as valid architecture.
becb208 range-for some loops in DAE
9aba189 LoopUnroll: Change code order of changes to new basic blocks
703bd8d Sink comment, NFC
807111a [DAGCombine] Remove SIGN_EXTEND-related inf-loop
b671003 Fast-math fold:  x / (y * sqrt(z)) -> x * (rsqrt(z) / y)
b9ce60f [BasicAA] Revert "Revert r218714 - Make better use of zext and sign information."
27069a9 Update documentation with link to Sea Islands documentation
7609712 BFI: Improve assertion message, since it's actually firing
ca6c95d ARM: silence unused variable warning
969587d ARM: remove dead InstPrinting code
7fcd5f8 MachObjectWriter: optimize the string table for common suffices
3e3908e Fix dumping codeview line tables when there are multiple debug sections
8ea5b71 DbgValueHistoryCalculator: Store modified registers in a BitVector instead of std::set.
6a075f5 [CFL-AA] Update for handling of globals and more tests
636eb39 Make the MD5 result name consistent between functions, header and source.
852c0d6 Note that a gold bug has been fixed.
043994e X86: Drop the isConvertibleTo3Addr bit from shufps/shufpd now that we don't convert them anymore.
862c93c For biendian targets like ARM and AArch64, it is useful to have the output of the llvm-dwarfdump and llvm-objdump report the endianness used when the object files were generated.
8e59427 Add support for ARM and AArch64 big endian objects to RelocVisitor.
7d0a297 Refactor RelocVisitor to take an object. This removes some string comparisons and makes it a bit easier to check individual targets.
b23e9d7 Add some tests for RelocVisitor.
e6f32be Add subtarget caches to aarch64, arm, ppc, and x86. These will make it easier to test further changes to the code generation and optimization pipelines as those are moved to subtargets initialized with target feature and target cpu.
a37095e Resolve ambiguity between llvm::make_unique and std::make_unique.
d53f7f4 DebugInfo: Sink constructImportedEntityDIE down into DwarfUnit from DwarfDebug.
f2eddd6 [dwarfdump] Print the name for referenced specification of abstract_origin DIEs.
3736cc5 Factor the Unit section parsing into the DWARFUnitSection class.
ef68758 [PM] Remove an unused and rather expensive mapping from an analysis group's interface to all of the implementations of that analysis group. The groups themselves can and do manage this anyways, the pass registry needn't involve itself.
891fb0b [PM] Remove the (deeply misguided) 'unregister' functionality from the pass registry.
24a1934 [cleanup] Switch to using range-based for loops in two very obvious places.
b3d7f9c [cleanup] Fix up trailing whitespace and formatting in the pass regitsry code prior to hacking on it more significantly.
eb2be34 Give the Reassociate pass a bit more flexibility and autonomy when optimizing expressions. Particularly, it addresses cases where Reassociate breaks Subtracts but then fails to optimize combinations like I1 + -I2 where I1 and I2 have the same rank and are identical.
1d02acb [x86] Remove the 2-addr-to-3-addr "optimization" from shufps to pshufd.
560bddc [x86, dag] Teach the DAG combiner to prune inputs toa vector_shuffle that are unused.
446817b Remove unused map
88b3a52 X86: Don't drop half of the mask when converting 2-address shufps into 3-address pshufd.
a0cb2c7 AVX-512-SKX: Added instruction VPMOVM2B/W/D/Q. This instruction allows to broadacst mask vector to data vector.
740cc26 Simplify code. No functionality change.
30ae72f [x86] Fix PR21139, one of the last remaining regressions found in the new vector shuffle lowering.
a644b09 [x86] Teach the new vector shuffle lowering how to lower 128-bit shuffles using AVX and AVX2 instructions. This fixes PR21138, one of the few remaining regressions impacting benchmarks from the new vector shuffle lowering.
529fcbe HexagonMCCodeEmitter.cpp: Prune 2nd redundant \brief. [-Wdocumentation]
4462f60 [CMake] HexagonTests: Update LINK_COMPONENTS.
935e432 HexagonDesc: Update LLVMBuild.txt.
bda7a45 [InstCombine] Simplify the logic from r219067 using ValueTracking
3cdf75c [SystemZ] Make operator bool explicit. NFC.
814a2ff Make AAMDNodes ctor and operator bool (!!!) explicit, mop up bugs and weirdness exposed by it.
a5fda70 [InstCombine] Remove redundant @llvm.assume intrinsics
30d433d Solve Visual C++ warning C4805 on getAsInteger<bool>.
dbc6d9b Remove unnecessary copying or replace it with moves in a bunch of places.
53b95f3 Sink DwarfDebug::updateSubprogramScopeDIE into DwarfCompileUnit
dba26ca Reformatting accidentally left out of r219057
2c9ba7b Sink DwarfDebug::attachLowHighPC into DwarfCompileUnit
a2ec9db Move DwarfCompileUnit from DwarfUnit.h to its own header (DwarfCompileUnit.h)
f13b76b DI: Fixup global syntax in example
1225b7a DI: Line up comments in examples
a472e86 DI: Fixup example IR from r219051
c48707a DI: Prune another example
ffd2f50 DI: Update and prune metadata examples
9e8c2e8 [x86] Slap a triple on this test since it is poking around at the stack and calling conventions. Otherwise its too hard to craft a usefully generic set of assertions.
03a7783 [x86] Enable the new vector shuffle lowering by default.
ea1cccd Add fake use to suppress defined-but-unused warnings
1e663cf [x86] Fix a bug in the VZEXT DAG combine that I just made more powerful.
cd2c1d8 [x86] Sink a generic combine of VZEXT nodes from the lowering to VZEXT nodes to the DAG combining of them.
9747d27 R600/SI: Custom lower f64 -> i64 conversions
ad2f641 R600: Custom lower [s|u]int_to_fp for i64 -> f64
24cee77 R600/SI: Fix ftrunc f64 conformance failures.
d6b988a Remove unused ALL_BINDINGS configuration variable.
f159de9 [x86] Add a really preposterous number of patterns for matching all of the various ways in which blends can be used to do vector element insertion for lowering with the scalar math instruction forms that effectively re-blend with the high elements after performing the operation.
be77ea3 Converting the ErrorHandlerMutex to a ManagedStatic to avoid the static constructor and destructor.
91ea3e4 [x86] Adjust the patterns for lowering X86vzmovl nodes which don't perform a load to use blendps rather than movss when it is available.
69ee7cb Fix typo in TableGen documentation
4cd443a Add unit tests to verify Hexagon emission.
17dfc38 Add a reference to Phabricator.rst to docs/index.rst.
2451e5b PR21145: Teach LLVM about C++14 sized deallocation functions.
8390283 Revert "Revert "DI: Fold constant arguments into a single MDString""
726942c [ISel] Keep matching state consistent when folding during X86 address match
77859c9 R600: Align functions to 256 bytes
63688e6 Eliminate some deep std::vector copies. NFC.
3c5eaff MCParser: Modernize memory handling.
83e571e [Power] Delete redundant test Atomics-32.ll
a6abd9e llvm-readobj: print out the fields of the COFF delay-import table
8e2b2ae [Power] Use lwsync for non-seq_cst fences
d8af735 MipsAsmParser.cpp: fix VS2012 build
8651aec HexagonMCCodeEmitter.h: deleted member functions are not supported in VS2012
61bc405 [mips] Print warning when using register names not available in N32/64
c4d1131 Fix build break on Hexagon
30d67d9 Adding skeleton for unit testing Hexagon Code Emission
dce98e6 [x86] Teach the new vector shuffle lowering to aggressively form MOVSS and MOVSD nodes for single element vector inserts.
ea01fda [sphinx cleanup] Fix unexpected indentation warning introduced by r218937
b157cb7 Revert 202433 - Provide a target override for the latest regalloc heuristic
7ae6f2a [x86] Refactor the element insertion logic in the new vector shuffle lowering to handle the potential mirroring of 2-element vectors (because we can't reliably sort them one way) in the caller rather than in the insertion logic.
0cd2a89 Fix typo in comment
f6fb5f4 [x86] Fix the RUN-lines of this test to make sense.
01b3858 [x86] Significantly improve the ability of the new vector shuffle lowering to match VZEXT_MOVL patterns.
ca77e58 [x86] Add some important, missing test coverage for blending from one vector to a zero vector for the v2 cases and fix the v4 integer cases to actually blend from a vector.
53bf81a [x86] Unbreak SSE1 with the new vector shuffle lowering. We can't widen element types to form illegal vector types.
558e368 [x86] Add two more triples to stabilize the precise assembly syntax across platforms.
7e26571 [x86] Remove a couple of fairly pointless tests. These were merely testing that we generated divps and divss but not in a very systematic way. There are other tests for widening binary operations already that make these unnecessary.
c75d43e Revert r215343.
4643143 [mips] Remove XFAIL from two XPASS'ing tests on the llvm-mips-linux builder
988acb6 [x86] Add another triple to a test to make the comment syntax stable. Should fix darwin builders.
67a869d [x86] Add triples to these tests so that we see fewer calling convention differences and they're a bit easier to maintain. This should fix the tests on cygwin bots, etc.
2470f44 [x86] Regenerate precise FileCheck lines for the lats batch of test cases.
1741215 [x86] Remove another low-value test still written using grep. We have many tests for movss and friends.
1756cdf [x86] Regenerate precise checks for a couple of test cases and remove a test case that was just grepping the debug stats output rather than actually checking the generated code for anything useful.
076ca3b [x86] Remove an over-reduced test case. This would need to be intergrated much more fully into some logical part of the backend to really understand what it is trying to accomplish and how to update it. I suspect it no longer holds enough value to be worth having.
4d6f14c [x86] Regenerate and clean up more tests is preparation for vector shufle switch.
2ce5aac [x86] Cleanup and generate precise FileCheck assertions for a bunch of SSE tests.
9e7173e [x86] This is a terrible SSE1 test, but we should keep it. I've deleted two functions that really didn't have any interesting assertions, and generated more precise tests for one of the others.
9a71253 [x86] Merge two very similar tests and regenerate FileCheck lines for them.
07c5f89 [BasicAA] Revert r218714 - Make better use of zext and sign information.
ea3d31f [x86] Regenerate a number of FileCheck assertions with my script for test cases that will change with the new vector shuffle lowering. This gives us a nice baseline for deltas against. I've checked and removed the cases where there were weird register usage being pinned down, and all of these are extremely pin-pointed tests so fully checking them seems very appropriate.
f71a17d [x86] Remove a couple of other overly isolated tests that are low-value at this point. We have lots of tests of peephole optimizations with insert and extract on vectors.
95c5e55 [x86] Remove a test that provides little value. There are plenty of tests for zext of a vector.
6f6512c Update Atomics.rst
b534439 [x86] Regenerate a bunch more avx512 test cases using my script to have tighter, more strict FileCheck assertions. Some of these I really like as they show case exactly what instruction sequences come out of these microscopic functionality tests.
77e97ff [x86] Regenerate an avx512 test with my script to provide a nice baseline for updates from the new vector shuffle lowering.
8f09464 constify TargetMachine parameter.
8206646 llvm-readobj: print COFF delay-load import table
5c10a02 [x86] Remove some of the --show-mc-encoding flags from avx512 tests that need to be updated for the new vector shuffle lowering.
59cacc9 constify TargetMachine argument.
1340986 We can grab the options struct from the TargetMachine, no need to pass it down in the constructor.
6955c9d [AVX512] Pull pattern for subvector insert into the instruction definition
d9e2cc7 [AVX512] Refactor subvector inserts
a9014e5 [AVX512] Fix i256mem->f256mem typo in VINSERTF64x4rm
793b1cb llvm-readobj: add a test for COFF import-by-ordinal symbols
626236d [PowerPC] Modern Book-E cores support sync
2b1874c [Power] Improve the expansion of atomic loads/stores
bbb28e7 Fix the threshold added in r186434 (a re-apply of r185393) and updaated to be a ManagedStatic in r218163 to not be a global variable written and read to from within the innards of SpillPlacement.
b3f91b0 [Stackmaps] Make ithe frame-pointer required for stackmaps.
32e192a Revert "DI: Fold constant arguments into a single MDString"
7bd81ba Rename data -> Data
3d49ad0 llvm-readobj: print COFF imported symbols
0917b70 DI: Fold constant arguments into a single MDString
bf21d40 [x86] Teach the new vector shuffle lowering to widen floating point elements as well as integer elements in order to form simpler shuffle patterns.
b417a35 Remove unused function attribute params.
49048ec LTO: Document the Boolean argument from r218784
0ff4eb6 Optimize square root squared (PR21126).
130d072 [x86] Move the vperm2f128 test to be vperm2x128 and test both the floating point and integer domains.
d765126 InstrProf: Avoid linear search in a hot loop
f3cd10b This patch adds a new flag "-coff-imports" to llvm-readobj. When the flag is given, the command prints out the COFF import table.
ddc725b Reapply "InstrProf: Don't keep a large sparse list around just to zero it"
f9e44c8 Remove an extra whitespace.
8ceff5c Pretty-printer: Paper over an ambiguity between line table entries and tagged mdnodes.
a740e5d Revert "InstrProf: Don't keep a large sparse list around just to zero it"
1476756 InstrProf: Don't keep a large sparse list around just to zero it
dafb357 Use the local variable that other clauses around here are already using.
e165693 Remove duplicate function names from comments. NFC.
ad7783d [NVPTX] Remove dead code.
92583e0 Support padding unaligned data in .text.
1af4bec Silence a -Wsign-compare warning. NFC.
3171394 [BUG][INDVAR] Fix for PR21014: wrong SCEV operands commuting for non-commutative instructions
fd94d1b [x86] Just delete the last combine test file.
7d66305 [x86] Merge still more combine tests into the common file. These at least seem *slightly* more interesting test wise, although given how spotily we actually combine anything, I remain somewhat suspicious.
cd91200 [x86] Merge the third combining test into the generic one and add proper checks for all the ISA variants.
84b3f53 [x86] Merge the second set of vector combining tests into a common test file.
84c7078 [x86] Merge the bitwise operation shuffle combining into the common test file, adding assertions across the ISA variants for it.
f25a5f3 [x86] Update this test to run a full complement of the ISA extensions, and use the new grouped FileCheck patterns to match them.
fd153c1 [x86] Minimize the parameters to this test for clarity.
1ad4741 [x86] Add a comment clarifying that this test should span all manners of generic DAG combining of shuffles relevant to x86.
0c9da85 [x86] Switch some of the new consolidated vector tests to use a bare-metal triple and have nice BB labels, etc.
6a98396 [PBQP] Update doxygen comment style to match the rest of the file. NFC.
48d779f [PBQP] Add support for graph-level metadata to the PBQP graph. This will be used in the future to attach useful information about the PBQP graph (e.g. the associated MachineFunction, pointers to regalloc passes) to the graph itself, making that information accessible to the solver. This should also allow the PBQPBuilder interface to be simplified.
c37a639 Remove test directories with no tests.
3cef611 InstrProf: Simplify counting a file's regions when writing coverage (NFC)
4bbf21e [x86] Improve and correct how the new vector shuffle lowering was matching and lowering 64-bit insertions.
52c08fd PR21101: tablegen's FastISel emitter should filter out unused functions.
959030a [MCJIT] Don't crash in debugging output for sections that aren't emitted.
300743f constify the TargetMachine argument used in the subtarget and lowering constructors.
e3e44fc DIBuilder: Remove duplicated comments, NFC
328f64b Revert "DIBuilder: Remove dead code"
2b91838 Lower FNEG ( FABS (x) ) -> FNABS (x) [X86 codegen] PR20578
42f40db Update test name to match changes made in r218783
c729bae DIBuilder: Remove dead code
9380353 [x86] Merge the remaining test cases into vector-blend.ll and remove all the ISA-specific test files.
406dcce Now that the optimization level is adjusting the feature string before we hit the subtarget, remove the constructor parameter.
b1b266c [x86] Expand the ISA coverage of our blend test in preparation for merging ISA-specific testing into this file.
7fae208 Adds 'override' to overriding methods. NFC.
11e1c61 [x86] Merge the interesting test cases from blend-msb.ll into vector-blend.ll and remove the former.
ccee7a8 [x86] Move the AVX blend test to a generic name. I'm going to fold other blend tests into this one.
f90b2fb [x86] Remove a test that wasn't doing anything really. We have plenty of better tests for zext of vectors at this point.
eeb4a0c [x86] Add a 32-bit run to the sext test, and remove a sad vec_sext.ll test file.
3916c26 [x86] Teach both sext and zext vector tests to cover a nice wide range of architectures: SSE2, SSSE3, SSE4.1, AVX, and AVX2.
c9038d9 Rework the PPC TargetMachine so that the non-function specific overrides happen at TargetMachine creation and not on every subtarget creation.
2e07ded constify TargetMachine parameter for X86TargetLowering.
0056820 Make the sqrt intrinsic return undef for a negative input.
03eb5f8 [x86] Sort the ISA-specific RUN lines for vector-sext.ll to go from oldest to newest. This makes more sense to me and is more consistent with other tests.
c1b22c6 ARM: yes it can (as of r218789)
edc4728 [x86] Rename avx-{s,z}ext.ll to vector-{s,z}ext.ll.
0f1d402 [x86] Cleanup and re-generate the checks for avx-zext.ll using the new script.
d045b84 DIBuilder: Encapsulate DIExpression's element type
024b291 [x86] Generate the FileCheck assertions for avx-blend.ll with my new script to make them nice and predictable. This will ease updating them for the new vector shuffle lowering and seeing the delta if any.
0c7a4b9 [x86] Clean up and generate detailed FileCheck assertions for avx-sext.ll using my new script.
1610bcf [MemoryDepAnalysis] Fix compile time slowdown
7244721 Don't repeat function/variable name in comment. NFC.
9e5cb2f [X86 disasm tblegen backend] Clean up numPhysicalOperands asserts
472f2a0 ARM: allow copying of CPSR when all else fails.
02474a3 Move the complex address expression out of DIVariable and into an extra argument of the llvm.dbg.declare/llvm.dbg.value intrinsics.
0ad623b LTO: Add missing target triple from r218784
befab0a Add fptrunc to mips fast-sel
04d2186 LTO: Ignore disabled diagnostic remarks
7538bab Add an immovable type to test Optional<T>::emplace more rigorously after r218732.
10c4265 Revert r218778 while investigating buldbot breakage. "Move the complex address expression out of DIVariable and into an extra"
076fd5d Move the complex address expression out of DIVariable and into an extra argument of the llvm.dbg.declare/llvm.dbg.value intrinsics.
56077f5 R600: Call EmitFunctionHeader() in the AsmPrinter to populate the ELF symbol table
6a0fcf7 C API: Add LLVMCloneModule()
ccd995a Revert r216862 due to a performance regression
a2878ec [mips] Rename emit and parse functions for the .cpload assembler directive. NFC.
f7082f9 R600/SI: Add a generic pseudo EXP instruction
cbb6331 R600/SI: Add generic pseudo MTBUF instructions
f69ae48 R600/SI: Add generic pseudo SMRD instructions
9d7038c [ARM] Allow selecting VRINT[APMXZR] and VCVT[BT] instructions for FPv5
7d64681 [x86] Fix a few more tiny patterns with the new vector shuffle lowering that keep cropping up in the regression test suite.
a1b88ab [x86] Delete some extraneous logic from the new vector shuffle lowering.
01649de [AArch64] Allow access to all system registers with MRS/MSR instructions.
82e145f Revert r218721, r218735.
e9bbacd Add missing natual vector cast.
909a111 ADTTests/OptionalTest.cpp: Use LLVM_DELETED_FUNCTION.
ff18b9f [ARM] Add support for Cortex-M7, FPv5-SP and FPv5-DP (LLVM)
9a11fba [mips] Fix disassembly of [ls][wd]c[23], cache, and pref
05a13f0 [mips] For indirect calls we don't need $gp to point to .got.  Mips linker doesn't generate lazy binding stub for a function whose address is taken in the program.
c68ef2a test: XFAIL the non-darwin gmlt test on darwin
e2ef441 [MCJIT] Turn the getSymbolAddress free function created in r218626 into a static member of RTDyldMemoryManager (and rename to getSymbolAddressInProcess).
b69f873 Fix typo in comment from r218733
d49903c InstrProf: Make coverage::Counter comparable
3adf585 [InstCombine] Fix for assert build failures caused by r218721
9e2fe46 [x86] Teach the new vector shuffle lowering to be even more aggressive in exposing the scalar value to the broadcast DAG fragment so that we can catch even reloads and fold them into the broadcast.
429670f [x86] Hoist the zext-lowering up in the v4i32 lowering routine -- it is the same speed as pshufd but we can fold loads into the pmovzx instructions.
771ac70 Add an emplace(...) method to llvm::Optional<T>.
06c1373 Implement DW_TAG_subrange_type with DW_AT_count rather than DW_AT_upper_bound
d0d5b08 [AVX512] Remove space before \t in AsmStrings.
afe7517 [x86] Teach the new vector shuffle lowering about VBROADCAST and VPBROADCAST.
a7ac986 llvm-cov/CoverageReport.cpp: Quick fix for msvcrt, since width specifier "z" is unavailable.
5a82a26 llvm/test/DebugInfo/X86/gmlt.test: Get rid of %llc_dwarf. It should not be used with -mtriple.
2318c2f [InstCombine] Optimize icmp-select-icmp
8f70c48 Omit DW_AT_inline under -gmlt to save a little more space.
a071557 [BasicAA] Make better use of zext and sign information
2c453a0 DebugInfo: Sink the code emitting DW_AT_APPLE_omit_frame_ptr down to a more common spot.
ce10279 MSBuild integration: fix the loop in install.bat
9cd9e4b [SimplifyCFG] threshold for folding branches with common destination
b3ce9470 [x86] Add AVX1 and AVX2 testing to all of the 128-bit shuffle test cases.
3a926b9 [x86] Update the exact FileCheck syntax of the 256-bit and 512-bit shuffle tests to match that used in the script I posted and now used consistently in 128-bit tests.
f0fd2f8 Adjust test case addition in r218702 so as not to fail when the X86 target isn't built.
8b6f2ee [x86] Rework all of the 128-bit vector shuffle tests with my handy test updating script so that they are more thorough and consistent.
76ff19f Disable the -gmlt optimization implemented in r218129 under Darwin due to issues with dsymutil.
73a335f Use the target-specified iteration count to opt out of any further refinement of an estimate. NFC.
cafc85b Split the estimate() interface into separate functions for each type. NFC.
9952c92 Recommit r218010 [FastISel][AArch64] Fold bit test and branch into TBZ and TBNZ.
28233d3 R600/SI: Fix printing of clamp and omod
532a5c7 R600/SI: Update VOP3b to not include obsolete operands
95b3e16 Extend C disassembler API to allow specifying target features
8a6f79e Add numeric extend, trunctate to mips fast-isel
8a23890 [AArch64] Remove unnecessary whitespace. (Test commit)
9e6df85 [DAG] Check in advance if a build_vector has a legal type before attempting to convert it into a shuffle.
a66e3bb Revert r218673 'llvm-cov: add test for report's function & file association.'
c174931 llvm-cov: add test for report's function & file association.
38c59de llvm-cov: Use the number of executed functions for the function coverage metric.
f49592d Introduce support for custom wrappers for vararg functions.
8acdc52 [AVX512] Added intrinsics for 128-, 256- and 512-bit versions of VCMPGT{BWDQ}. Patch by Sergey Lisitsyn <sergey.lisitsyn@intel.com>
175ff01 [AVX512] Added intrinsics for 128- and 256-bit versions of VCMPEQ{BWDQ} Fixed lowering of this intrinsics in case when mask is v2i1 and v4i1. Now cmp intrinsics lower in the following way:  (i8 (int_x86_avx512_mask_pcmpeq_q_128              (v2i64 %a), (v2i64 %b), (i8 %mask))) ->  (i8 (bitcast    (v8i1 (insert_subvector undef,            (v2i1 (and (PCMPEQM %a, %b),                       (extract_subvector                          (v8i1 (bitcast %mask)), 0))), 0))))
cfa5724 [AVX512] Added intrinsics for VPCMPEQB and VPCMPEQW. Added new operand type for intrinsics (IIT_V64)
58da66b [AVX512] Enabled intrinsics for VPCMPEQD and VPCMPEQQ. Added CMP_MASK intrinsic type
deb16c9 Make sure aggregates are properly alligned on MSP430.
ecea7ba [IndVarSimplify] Widen loop unsigned compares.
4abb04a [x86] Revert r218588, r218589, and r218600. These patches were pursuing a flawed direction and causing miscompiles. Read on for details.
52b072d [x86] Add some vector-register broadcast operations to the 256-bit v4 tests which were missing them.
cbb188b R600: Fix broken check lines, missing scalar case.
108eb07 Fix missing C++ mode comment
a0af4b0 [FastISel][AArch64] Fold sign-/zero-extends into the load instruction.
e8a9706 [FastISel][AArch64] Factor out scale factor calculation. NFC.
c27ddda [llvm-objdump] switch some uses of format() to format_hex() and left_justify()
11bea1b Simplify conditional.
e3d2fcc [AVX512] Use X86VectorVTInfo in the masking helper classes and the FMAs
4edcbae WinCOFFObjectWriter: optimize the string table for common suffices
6a2169e Add soft-float to the key for the subtarget lookup in the TargetMachine map, this makes sure that we can compile the same code for two different ABIs (hard and soft float) in the same module.
200f376 Fix spelling and reflow comments.
f657899 [AArch64] Refines the Cortex-A57 Machine Model
03b4667 Unit test r218187, changing RTDyldMemoryManager::getSymbolAddress's behavior favor mangled lookup over unmangled lookup.
7b2aaad Fixing the build for compilers which do not yet have support for constexpr functions, NFC.
88c0ed3 Add getValueOr to llvm::Optional<T>.
ede14e3 Add "typedef T value_type;" to llvm::Optional<T>.
78beaa5 Fixing missing C++ mode comment
0db97bb Fix include order
1bcadc9 R600/SI: Fix hardcoded values for modifiers.
49cbc18 R600/SI: Also fix fsub + fadd a, a to mad combines
a5f45d5 R600/SI: Fix using mad with multiplies by 2
ea64dce [AArch64] Improve cost model to handle sdiv by a pow-of-two.
97552d7 Store TypeUnits in a SmallVector<DWARFUnitSection> instead of a single DWARFUnitSection.
dbaeb6e Use a loop to simplify the runtime unrolling prologue.
017c611 [Thumb2] ldrexd and strexd are not defined on v7M
8ac2f14 [x86] Make the new vector shuffle lowering lower blends as VSELECT nodes, and rely exclusively on its logic. This removes a ton of duplication from the blend lowering and centralizes it in one place.
bc88cfc Remove dead code from DIBuilder
d23f188 [x86] Delete a bunch of really bad and totally unnecessary code in the X86 target-specific DAG combining that tried to convert VSELECT nodes into VECTOR_SHUFFLE nodes that it "knew" would lower into immediate-controlled blend nodes.
3589550 [x86] Refactor all of the VSELECT-as-blend lowering code to avoid domain crossing and generally work more like the blend emission code in the new vector shuffle lowering.
b3cf6a6 [x86] Improve naming and comments for VSELECT lowering.
8e93ce1 [x86] Add the dispatch skeleton to the new vector shuffle lowering for AVX-512.
3bc1ba6 [x86] Make the split-and-lower routine fully generic by relaxing the assertion, making the name generic, and improving the documentation.
b61dfec [x86] Teach the new vector shuffle lowering to fall back on AVX-512 vectors.
4f42804 [x86] Fix the new vector shuffle lowering's use of VSELECT for AVX2 lowerings.
0df40b4 Add MachineOperand::ChangeToFPImmediate and setFPImm
3f40848 [x86] Fix a really silly bug that I introduced fixing another bug in the new vector shuffle target DAG combines -- it helps to actually test for the value you want rather than just using an integer in a boolean context.
21b6929 [x86] Fix yet another bug in the new vector shuffle lowering's handling of widening masks.
e05d3b9 WinCOFFObjectWriter.cpp: make write_uint32_le more efficient
aada521 [AArch64] Redundant store instructions should be removed as dead code
af34c3a Fix llvm::huge_valf multiple initializations with Visual C++.
b66b0cf [x86] Fix yet another issue with widening vector shuffle elements. I spotted this by inspection when debugging something else, so I have no test case what-so-ever, and am not even sure it is possible to realistically trigger the bug. But this is what was intended here.
0066619 Update test case to match minor formatting change introduced in r218563.
2895d95 Reduce code duplication a bit.
72c3b07 [x86] Fix terrible bugs everywhere in the new vector shuffle lowering and in the target shuffle combining when trying to widen vector elements.
8470b5b [x86] Flip the sentinel values used in the target shuffle mask decoding to significantly more sane sentinels. Notably, everywhere else in the backend's representation of shuffles uses '-1' to represent undef. The target shuffle masks really shouldn't diverge from that, especially as in a few places they are manipulated by shared code.
00bc445 Fix TableGen -gen-disassembler output for bit fields with an offset.
676af35 Refactor reciprocal and reciprocal square root estimate into target-independent functions (part 2).
1735737 Add LLVM_ENABLE_MODULES flag to CMake to enable building with C++ modules.
98a2899 llvm-vtabledump: Further simplification
01ea611 Object: BSS/virtual sections don't have contents
a51dbbd clang-format of ChangeStdinToBinary & ChangeStdoutToBinary.
7118c73 Update llvm-objdump’s Mach-O symbolizer code to print the name of symbol stubs.
aeb9ee0 Remove definition of LLVM_VERSION_INFO; this macro is not used by any of the files in this directory. If it should be defined anywhere, it should be defined when building lib/LTO/LTOCodeGenerator.cpp, but we've not had it defined there for quite some time, so that doesn't really seem to be very important. (It also would slow down the modules build by creating extra module variants.)
7e0a0e2 Fix CMake warning CMP0054: don't quote a variable name that is intended to be expanded; future versions of cmake may not expand the variable in this case.
dadfd4f Fix misinterpretation of CMake rule found by a CMake warning (related to CMP0054).
0a31a52 [x86] Fix a moderately terrifying bug in the new 128-bit shuffle logic that managed to elude all of my fuzz testing historically. =/
4150a8d [IndVar] Don't widen loop compare unless IV user is sign extended. PR21030
07b7c98 R600/SI: Use break instead of continue
5435c66 R600/SI: Add strict check lines to div_scale tests.
88416c3 R600/SI: Add a note about the order of the operands to div_scale
508b8db R600/SI: Move finding SGPR operand to move to separate function
d991d22 R600/SI Allow same SGPR to be used for multiple operands
aed12d4 R600/SI: Partially move operand legalization to post-isel hook.
2920283 R600/SI: Implement findCommutedOpIndices
8a70e28 R600/SI: Don't move operands that are required to be SGPRs
5b199b5 R600/SI: Don't assert on exotic operand types
26b2a78 R600/SI: Fix using wrong operand indices when commuting
ea849e9 R600/SI: Remove apparently dead code in legalizeOperands
ea468dd Ignore annotation function calls in cost computation
a7579ed [x86] The mnemonic is SHUFPS not SHUPFS. =[ I'm very bad at spelling sadly.
7929a21 [x86] In the new vector shuffle lowering, when trying to do another layer of tie-breaking sorting, it really helps to check that you're in a tie first. =] Otherwise the whole thing cycles infinitely. Test case added, another one found through fuzz testing.
7164a4a [x86] Fix a large collection of bugs that crept in as I fleshed out the AVX support.
6215f78 Elide repeated register operand in Thumb1 instructions
a5ab9ba [X86][SchedModel] SSE reciprocal square root instruction latencies.
a0d5d7a Revert "Store TypeUnits in a SmallVector<DWARFUnitSection> instead of a single DWARFUnitSection."
5fb5bdb Store TypeUnits in a SmallVector<DWARFUnitSection> instead of a single DWARFUnitSection.
12aa552 Fix unused variable warning added in r218509
7ecd986 [mips] Generalize the handling of f128 return values to support f128 arguments.
26ba182 [AVX512] Added load/store from BW/VL subsets to Register2Memory opcode tables. Added lowering tests for these instructions.
5373645 llvm-vtabledump: Small cleanup
72db9e5 fix a typo in doumentation index.
178cb75 llvm-vtabledump: strip trailing NUL bytes
ed2b757 Fix build breakage on MSVC 2013
035e22b llvm-vtabledump: Dump RTTI structures for the MS ABI
af100b0 Target: Fix build breakage.
346056f Support: Remove undefined behavior from &raw_ostream::operator<<
abf5bf2 Revert patch of r218493, delete the test case
2109982 Revert patch ofr218493
c41ae2a Redundant store instructions should be removed as dead code
55a90ab Add the first backend support for on demand subtarget creation based on the Function. This is currently used to implement mips16 support in the mips backend via the existing module pass resetting the subtarget.
792f334 Add a FIXME to TargetMachine to remove the function specific code generation options from TargetMachine. This will depend upon Function + TargetSubtargetInfo based code generation at which point resetTargetOptions and this code can be removed.
eea543f Have setSubtarget take a const subtarget.
a6e0a6e Move resetTargetOptions from taking a MachineFunction to a Function since we are accessing the TargetMachine that we're a member function of.
deaa9d8 R600: Avoid repeated check lines
584886c R600/SI: Fix emitting trailing whitespace after s_waitcnt
479f2f7 [AVX512] Simplify use of !con()
08f261a [AVX512] Pull pattern for subvector extract into the instruction definition
2f3ccfc [AVX512] Make vextract*x4/vinsert*x4 tests check for the index as well
4007b30 [AVX512] Refactor subvector extracts
1973ffe [AVX512] Fix typo
2a7d068 Add SDAG TableGen definitions for BR_CC
3011a60 R600: Fix some missing conversion testcases
556ae04 Remove duplicated RUN lines in middle of test
f423025 [MachineSink+PGO] Teach MachineSink to use BlockFrequencyInfo
5c1c055 Object: Add range iterators for Archive children
2fe3200 [Support] Fix Format.h to build on Windows
e93da60 [Support] Add type-safe alternative to llvm::format()
f85d5cf Refactoring: raw pointer -> unique_ptr
8361c84 ARM: Remove unneeded check for MI->hasPostISelHook()
bdaf056 SelectionDAG: Remove #if NDEBUG from check for a post-isel hook
29d48e6 R600/SI: Add support for global atomic add
79826e0 Lower idempotent RMWs to fence+load

git-subtree-dir: llvm
git-subtree-split: db0ec65e79f7c8d0fdc4ad1d956dee611826ae7d
Merge commit '703911cbf26b44205bfbd9d6a454a23cd33e3846' into devel
Squashed 'llvm/tools/clang/' changes from 702863c..e136c9d

e136c9d Special case 0 and 1 matcher in makeAllOfComposite().
74871ae [SystemZ] Turn on the integrated assembler by default
24102cb Objective-C SDK modernization. convert message expression to Objective-C dot-syntax. rdar://18498572
4cdae70 Add experimental clang/driver flag -fsanitize-address-field-padding=N
6f64a3a Separated RecursiveASTVisitorTest into multiple files.
bcdf605 Implement various matchers around template argument handling.
fe9c20a Escaping a special character in the documentation.
601b26a Fix compatibility issues in tests for PredefinedExpr with MSVC.
01d1a20 clang-format: Add option to control call argument bin-packing separately
b800824 Fix for bug http://llvm.org/PR17427. Assertion failed: "Computed __func__ length differs from type!" Reworked PredefinedExpr representation with internal StringLiteral field for function declaration. Differential Revision: http://reviews.llvm.org/D5365
2b16d27 [OPENMP] 'omp teams' directive basic support. Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive.
43992fe Replace a destructor of EHCleanupScope with a Destroy() method to reflect the current usage.
3dc3287 Added new headers to CMakeLists.txt. Fix for rev219319
de87f96 ms-inline-asm: Correctly mark MS inline ASM labels as used
1b6fd15 [AVX512] Added VPCMPEQ intrinisics to headers. Added tests.
9ce2d73 Fixed OpenMP/parallel_firstprivate_codegen.cpp Fixed compatibility issues on ARM.
0e65afd Fix test OpenMP/parallel_firstprivate_codegen.cpp Fixed compatibility issues with MSVC mode and ARM target.
93de272 Revert "Remove threshold on object size for inserting lifetime begin / end"
1cda601 [OPENMP] Codegen for 'firstprivate' clause. This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy. In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D5140
eee131d Remove threshold on object size for inserting lifetime begin / end
5ab907d Revert commit r219297. Still troubles with OpenMP/parallel_firstprivate_codegen.cpp (now in ARM buildbots).
91cc6cf [OPENMP] Codegen for 'firstprivate' clause. This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy. In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D5140
a08c9151 Revert back r219295. To fix issues with test OpenMP/parallel_firstprivate_codegen.cpp
10b0957 [OPENMP] Codegen for 'firstprivate' clause. This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy. In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D5140
37d95eb Revert "[OPENMP] 'omp teams' directive basic support. Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive."
9693d20 AST: Fix a typo (NFC)
9e077ef Disallow using function parameters in extended asm inputs or outputs in naked functions (PR21178)
5fea933 Fix test case in no asserts build
2564ee2 Fix IRGen for referencing a static local before emitting its decl
0b18174 Avoid code duplication by calling setAliasAttributes in EmitAliasDefinition.
ed0d4e8 Objective-C SDK modernization. When modernizing to use NS_ENUM/NS_OPTIONS macros, add an import of Foundation.h (or its module) as necessary. rdar://18498550
45991fc PR21180: Lambda closure types are neither aggregates nor literal types.
f2860df Emit diagnostic for -munaligned-access on v6m
80d8966 clang-format: Fix bug with comments between non-trival parameters.
b831731 Allow dllexport alias to base destructors.
9861783 clang-format: Add documentation about disabling formatting.
95a2fbb [OPENMP] 'omp teams' directive basic support. Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive.
ea6ec7c [OPENMP] Small refactoring of EmitOMPSimdLoop helper routine. No functional changes intended. Renamed EmitOMPSimdLoop to EmitOMPInnerLoop, I plan to re-use it to emit inner loop in the future patches for CodeGen of the worksharing loop directives (omp for, omp for simd).
4895f53 driver: Map closed standard file descriptors to /dev/null
6c85568 Objective-C SDK modernizer. Patch to support modernization to NS_ENUM/NS_OPTION macros when typedef names are other than NSInteger/NSUInteger (int8_t, etc.). rdar://18532199
34e9fc3 Update title of the ReleaseNodes doc.
1818d24 [PATCH][Power] Fix (and deprecate) vec_lvsl and vec_lvsr for little endian
1fdd00c Remove cases that are now handled by the parent class implementation.
3b01619 Turn on the integrated assembler by default for ppc64 and ppc64le.
835452b Patch to wrap up '_' as separator in version numbers in availability attribute by preserving this info. in VersionTuple and using it in pretty printing of attributes and yet using '.' as separator when diagnosing unavailable message calls. rdar://18490958
788b836 clang-format: If in doubt, assume '+' is a binary operator.
ea9c99d Fix bug in DynTypedMatcher::constructVariadic() that would cause false negatives.
eca23c6 Using an explicit cast to work around MSVC 2013 not picking the conversion operator as expected. NFC, should fix the MSVC build bots.
0397326 [OPENMP] Fix target triple of a test, which uses __int128 type
0015bb4 [OPENMP] Limit the loop counters to 64 bits for the worksharing loops
4095bfe Add FIXME/notes to the future.
e807775 DebugInfo: Don't include implicit special members in the list of class members
98ca940 DebugInfo: Don't include member function template specializations in the list of class members
b037369 MS ABI: Make comment more accurate
6e19120 MS ABI: Use '1' (instead of '0') relative scope discriminators
6c9b7bc MS ABI: Implement thread_local for global variables
cec1839 Return a reference instead of vector copy for parentmap queries.
8a079dd Emit @llvm.assume for non-parameter lvalue align_value-attribute loads
107c30e -ms-extensions: Allow __super in return stements.
18fa145 MS ABI: Disallow dllimported/exported variables from having TLS
751c0f0 Sema: Simplify checkAttributesAfterMerging
700b7e5 PR20991: ::decltype is not valid.
3e665b1 Remove stray enum keywords. MSVC sees this as a redeclaration at global scope.
636d9eb test: Disable standard system includes in %clang_cc1
b7a8446 Suppress defined-but-unused warnings
f38a63a CFE Knob for: Add a thread-model knob for lowering atomics on baremetal & single threaded systems
6e140cf [analyzer] Refactor and cleanup IsCompleteType There are three copies of IsCompleteType(...) functions in CSA and all of them are incomplete (I experienced  crashes in some CSA's test cases). I have replaced these function calls with Type::isIncompleteType() calls.
5a9b42f [analyzer] Make Malloc Checker track memory allocated by if_nameindex
6118a4a [analyzer] Make CStringChecker correctly calculate return value of mempcpy
8357cdc Initialize MCObjectFileInfo when parsing ms-style asm.
15f47d4 Objective-C. Assortment of improvements pretty printing objective-C declarations, including printing of availability attributes on methods.
7f5bedf Revert "Revert "DI: LLVM schema change: fold constants into string""
71dc046 ASTUnit: Replace out parameter with return value, we have NRVO for this.
7a61f1e Format: ArrayRefize some implicit copies away.
84b6e85 Add getOpenMPSimdDefaultAlignment for PowerPC
e4b6b08 Add comment about separators must match in version numbers.
6e05581 constexpr evaluation for __builtin_assume_aligned
0999b0d [sphinx clean up] Fix warning introduced by r218957
657bf2a Revert changes in r218863, r218864
284d72e Revert r218925 - "Patch to warn if 'override' is missing"
071f8b0 MS ABI: Move test from virtual-inheritance to single-inheritance
f5cbeeb MS ABI: Add a vftable test for pure virtual methods
4c243d4 MS ABI: Clean up test to not use dllexport, check vftable entries
a5472de MS ABI: Add an additional test for empty structs in C
ce45d89 Make test/CodeGen/atomic-ops.c free-standing
048ea3b Make test/Sema/atomic-ops.c free-standing
b1aa9bb Revert useless part of r217349
39f1f1f Add an implementation of C11's stdatomic.h
9a0b6f5 Driver: Update clang-interpreter example for r218938
6597883 Driver: Use pointee_iterator rather than iterating over unique_ptrs
b3385dc Fix interaction of max_align_t and modules.
6756af3 Patch to warn if 'override' is missing for an overriding method if class has at least one 'override' specified on one of its methods. Reviewed by Doug Gregor. rdar://18295240 (I have already checked in all llvm files with missing 'override'  methods and Bob Wilson has fixed a TableGen of FastISel so  no warnings are expected from build of llvm after this patch.  I have already verified this).
bb17ae0 Revert "DI: LLVM schema change: fold constants into string"
eb92c2f DI: LLVM schema change: fold constants into string
f646819 Reflowing some comments, NFC.
d4bc37b Initial support for the align_value attribute
536d277 Add __sync_fetch_and_nand (again)
328cf98 Diagnose mixed use of '_' and '.' as version separators in my previous patch.
247809b [x32/NaCl] Check if method pointers straddle an eightbyte to classify Hi
96a2387 Reapply "InstrProf: Update for the LLVM API change in r218879"
6c083aa Patch to accept '_' in addition to '.' as version number separator in "availability" attribute. rdar://18490958
aeb7173 Revert "InstrProf: Update for the LLVM API change in r218879"
4f4a18b InstrProf: Update for the LLVM API change in r218879
6538729 Emit lifetime.start / lifetime.end markers for unnamed temporary objects.
83b9e92 Fix a broken test case.
c3185e4 [ARM] Handle conflicts between -mfpu and -mfloat-abi options.
f48a758 Reduce the PR20399 test case.
3b49de5 Test case for my r218780 patch. Suggested by Richard Smith. rdar://18508589.
4bc65b4 Fix trailing commas in AMD define.
66504d1 Add the various signature macros.
2785bed Rename bit_RDRAND to bit_RDRND to match GCC's version of this header.
2b67319 Objective-C Modernizer. Patch to remove dangling space before the semicolon wahen modernizing to use NS_ENUM/NS_OPTIONS macros. rdar://18498539
facc757 DIBuilder: Encapsulate DIExpression's element type
156ce8d Update CGDebugInfo to the updated API in LLVM. Complex address expressions are no longer part of DIVariable, but rather an extra argument to the debug intrinsics.
efb1963 Reverting r218777 while investigating buildbot breakage. "Update CGDebugInfo to the updated API in LLVM."
a0031bd c++ error recovery. Build a valid AST when trying to recover from parse error parsing the default argument. Patch prevents crash after spewing 100s of errors caused by someone who forgot to compile in c++11 mode. So no test. rdar://18508589
f6cd7f4 Do not use delegated constructors.
9fb397c Update CGDebugInfo to the updated API in LLVM. Complex address expressions are no longer part of DIVariable, but rather an extra argument to the debug intrinsics.
85516c5 Adds 'override' to overriding methods. NFC. These were uncoveredby my yet undelivered patch.
b01e48d Refactor Matcher<T> and DynTypedMatcher to reduce overhead of casts.
3a8811e [ARM] Add support for Cortex-M7, FPv5-SP and FPv5-DP
2dfdada [OPENMP] Loop collapsing and codegen for 'omp simd' directive.
496202d Improve -Wuninitialized warnings for fields that are record types.
f5d5d35 InstrProf: Avoid repeated linear searches in a hot path
e740642 InstrProf: Hide SourceMappingRegion's internals (NFC)
a20834d Update uninitialized tests to ensure that field initialization has the same coverage as the global checker.
ce4ac7b Enable both C and C++ modules with -fmodules, by switching -fcxx-modules to being on by default. -fno-cxx-modules can still be used to enable C modules but not C++ modules, but C++ modules is not significantly less stable than C modules any more.
deabe6f Update -Wuninitialized to be stricter on CK_NoOp casts.
beaa443 InstrProf: Remove an unused member (NFC)
65b3ed2 Avoid a crash after loading an #undef'd macro in code completion
e712375 clang-format: [JS] Support AllowShortFunctionsOnASingleLine.
d5b7fbe CUDA: mark the target of implicit intrinsics properly
9855068 Make sure aggregates are properly alligned on MSP430.
a129dbb MS ABI: Correct layout for empty records
e0d26d6 [OPENMP] Codegen of the ‘aligned’ clause for the ‘omp simd’ directive. Differential Revision: http://reviews.llvm.org/D5499
b379c06 PR20399: Do not assert when adding an implicit member coming from a module at writing time.
2de468a Revert r218616, "Refactor Matcher<T> and DynTypedMatcher to reduce overhead of casts."
bc4a71b clang/test/CodeGenCXX/vararg-non-pod-ms-compat.cpp: Appease -Asserts to skip 1st alloca.
3379720 Try to fix non-asserts CodeGenCXX/vararg-non-pod-ms-compat.cpp
c543a65 Don't trap when passing non-POD arguments to variadic functions in MS-compatibility mode
9b130df Use ClangToLLVMArgsMapping in CodeGenTypes::GetFunctionType(). NFC.
958eabf Test commit. Fix a whitespace in ToolChains.cpp.
30740e5 AST: Fix a typo in RecordLayoutBuilder
7a37fa6 Introduce CGFunctionInfo::getNumRequiredArgs(). NFC.
dcb6994 CUDA: Fix incorrect target inference for implicit members.
7cff877 Speedup ClangToLLVMArgMapping construction. NFC.
d1ca470 Objective-C [qoi] - provide group name for warn_property_types_are_incompatible. rdar://18487506
1130708 Refactor Matcher<T> and DynTypedMatcher to reduce overhead of casts.
0114fc7 Refactor ABIArgInfo::Expand implementation (NFC).
780ceee Update modules documentation now that C++ support is working pretty well.
c31e006 Fix bug 20116 - http://llvm.org/bugs/show_bug.cgi?id=20116
d53cbcf clang-format: Fix GCC warning about implicit bool pointer conversion.
3c23474 clang-format: [JS] Improve formatting of function literals in chains
dff837f Remove dead code from DIBuilder
f6794f4 testing commit access to clang repo
16016b5 Tests for DR600-640.
7cbd087 Fix "unsupported friend" diagnostic to also appear for friend functions with dependent scopes.
f1ac6d3 Add the tests for __super that I forgot to commit in as part of r218484.
0ba4d8b Run DR tests in C++17 mode too.
3e25c0c CodeGen: Don't crash when initializing pointer-to-member fields in bases
5ce2184 Add back checking for condition of conditional operator for -Wuninitialized
5a1246e Ensure that all module build failures get diagnosed
a065071 Don't link in sanitizer runtimes if -nostdlib/-nodefaultlibs is provided.
fdd013e Fix an assertion failure trying to emit a trivial destructor in ObjC++
7c3d5fc clang/test/CodeGen/builtin-assume-aligned.c: Fix for -Asserts.
d12b996 MS ABI: Assert that vftables should have a non-RTTI entry
b6aad17 Small fix for bug 18635. (clang crashed in CodeGen in llvm::Module::getNamedValue on  thread_local std::unique_ptr<int>). Differential Revision: http://reviews.llvm.org/D5353
8602f3c Support the assume_aligned function attribute
6192145 CGBuiltin: Use frem instruction rather than libcall to implement fmod
7159053 -ms-extensions: Implement __super scope specifier (PR13236).
9177165 Fix PR20886 - enforce CUDA target match in method calls
74bda9c Suggest fix-it for missing '{' after base-clause
cb48eba Move calls to ResolveExceptionSpec out of SetDeclDefaulted and into DefineImplicit*
aef0810 MS ABI: Avoid hashing back reference keys in mangler

git-subtree-dir: llvm/tools/clang
git-subtree-split: e136c9dba2063de9b90da23b9a9807257a91b4f9
Merge with Clang.
Squashed 'llvm/tools/lldb/' changes from 5ca74eb..aad8d5c

aad8d5c Correctly fix ScriptInterpreterPython::ExecuteOneLine for windows.
904a81b If a ValueObject has a child that vends synthetic children, but only does so to generate a value for itself, that's not a disqualifier from one-line printing. Also, fetch synthetic values if available and requested for children as well while printing them
0396670 Add an API on ValueObject to retrieve the desired dynamic/synthetic combination all at once, if available, working somewhat hard to avoid returning an invalid ValueObject in the process
12b5a86 thread state coordinator: fixed bug in thread running state book-keeping.
ba1d944 logging: added more logging to the Target/Platform launch & attach sequence.
4a0379c Added a bit of logging around GDBRemoteCommunicationClient::SendGDBStoppointTypePacket.
24c18bb Fix MacOSX Xcode build for Pipe changes.
d998937 POSIX dynamic loader: add more logging around launch/attach, fix breakpoint handling on entry callback.
181bf92 Add a SyntheticValueProviderFrontEnd that serves internally the same purpose as lldb.SBSyntheticValueProvider serves on the API layer
1720601 Fix compile error on posix.
acde4f4 Fix deadlock in Python one-line execution.
f6729e8 Add a (Python only) lldb.SBSyntheticValueProvider class to our API surface On a suggestion from Jim Ingham, this class allows you to very easily define synthetic child providers that return a synthetic value (in the sense of r219330), but no children
5f472d5 Extend synthetic children to produce synthetic values (as in, those that GetValueAsUnsigned(), GetValueAsCString() would return)
137f4c5 Add decorator for FreeBSD failure
9387937 Skip asan test on FreeBSD
439bd4c llgs: add logging to Native*Protocol breakpoints around byte values replaced and restored.
6b5450c Minor comment change to test out svn access
43ecbf3 Fix stepping over the inserted breakpoint trap when the NEXT instruction also contains a breakpoint.
1e6a405 Update TestInlinedBreakpoints to reflect the fact that the default search method is "always" as of r218405.
61f3ebe Change this test case so that it no longer fails in the face of Bug 21190. The failure and the bug are entirely unrelated, and it's trivial to write a repro case for that bug anyway, so no need to use this complicated test case
ba85ad6 When we detect a stack unwind loop, before we abort the backtrace, try falling back to the architecture default unwind plan and see if we can backtrace a little further. <rdar://problem/18556719>
1ad54bf The type category enable * was implemented assuming a previous disable * had happened. While that will most likely be true in practice, the consequences of this not being the case will be a crash. I fix the crash by doing two things: 1) don't let already-enabled categories be enabled anyway; 2) if a category were disabled but with a bogus last-enabled position - highly highly unlikely - just put it in the first empty slot. I am not so sure 2) is bulletproof perfect, but I also don't think 2) will practically ever happen
d017c4d This test case was incorrect, it was relying on the fact that the function we were calling would continue to sleep for the requested time even if it was interrupted.  That is not true of std::this_thread::sleep_for, at least not on OS X.
2c1e7af Fix compile error on Windows.
253bf34 Improved the TreeItem delegate which simplifies making tree items: - tree items can define any number of key/value pairs - creating a tree you specify which columns you want to display and it will pick out the right key/value pairs from the new tree item dictionaries - added new "tk-target" command to explore the target's images, sections, symbols, compile units and line tables.
cfa54b7 Fix spurious output to command line when launching a process on Linux.
d7a21eb Fix exception text to match function name
6e95ba4 Add "target.expr-parser-compiler-args" setting.
0d1b3c9 Add another address to check for the kernel's load addr in debug configs. <rdar://problem/18560328>
8d3992f Update xcode project file to match zach's move of connetionfiledescriptor in r219143.
a68846d And here's another test case that uses the SB API. Skip it too
8522fe2 This test also relies on the SB API headers. Same logic
90e5b65 In some cases, the LLDB test suite will be run on a built framework with no sources coming along. In those cases, we want to skip the SB API test case. Add a marker for that, and apply it
21a8e7f Create a ConnectionGenericFile class for Windows.
0af3c89 Make TimeValue support returning the time in milliseconds.
fde1cb6 Move ConnectionFileDescriptor to platform-specific Host directory.
5c9925a Fix a problem where LLDB was constructing a TypeImpl marking the dynamic type as the static type. Instead use the TypeImpl() constructor correctly
a19e4e1 Made TestCommandScript more robust against new lines at arbitrary points.
6c6af06 Revert r219102 as it caused significant buildbot breakage
a857551 Call SBDebugger::Initialize/Terminate from within Create/Destroy.
9008abd These two tests were failing on the FreeBSD bot - one has to assume because FreeBSD comes with libc++. Skip them
50d090c These tests all seem to pass on my machine, marking them as non-Xfail on Darwin, or clang where applicable. Non-Apple folks, if these fail for you, maybe we can put some more helpful markers on them
2dd7940 Remove compiler warnings.
2857ecd Stop enabling the std::vector<bool> data formatter for libstdc++, and for that matter, also skip running the test on Darwin. libstdc++ is more relevant on non-Apple platforms
bebc8ca Issuing a "type category disable *" command followed by a "type category enable *" command does not honor the order in which categories were previously enabled While we didn't really promise it would, it seems like it should
0939407 Add FreeBSD test failure decorators
8e9cffc Limit test to Darwin
c0ada81 Fix stale comments in new tests.
533c340 thread state coordinator: add tests and impl to error on creation/death issues.
60cf9d6 Add ENABLE_THREADS for these threaded tests
6ddf72b thread state coordinator: added simpler deferred stop notification method.
c47e3a7 Make this test case a little more resilient to class name changes
a710c94 Fix codesigning of MacOSX debugserver when built with cmake.
6ea86d7 Fix up stale comments from last change.
214b461 thread state coordinator: requesting resume now signals error appropriately.
50b561c gtest runner: now always does a clean step after running.
178753c Update to match strings output by lldb.
5888694 Add a couple of extra exepct strings so this test file keeps in sync with lldb a little better.
3dfcb42 Add SBExecutionContext.h to the list of headers to copy into the LLDB framework.
8746a3f Add a mutex lock to StackFrame to protect race conditions for updating its ivars.  We've had a lot of crash reports and careful analysis shows that we've got multiple threads operating on the same StackFrame objects, changing their m_sc and m_flags ivars. <rdar://problem/18406111>
2b07cad Remove unused variable.
b9d9bb9 Add SBExecutionContext.cpp to this file as well, as the comment in source/API/CMakeLists.txt instructs...
bd5c0e3 Add documentation about the new SBExecutionContext for Python commands feature. This marks the end of rdar://18142728
5c59ee7 Allow Python commands to optionally take an SBExecutionContext argument in case they need to handle 'where they want to act' separately from the notion of 'currently-selected entity' that is associated to the debugger. Do this in an (hopefully) non-breaking way by running an argcount check before passing in the new argument. Update the test case to also check for this new feature. www update to follow
a812a08 thread state coordinator: added error callbacks, cleaned up tests.
ea97b78 [cmake] Include the new file in the CMake lists. Without this every CMake build of any part of LLVM with LLDB checked out fails immediately. =[
397fc1a Add an accessor to PyCallable that allows one to determine the count of arguments that a Python function allows, and whether varargs/kwargs are also accepted by the same function
7071069 Add a new SBExecutionContext class that wraps an ExecutionContextRef. This class is a convenient way at the API level to package a target,process,thread and frame all together - or just a subset of those
31c895a thread state coordinator: replaced shortened type name Func suffix with Function.
8bf18b7 Minor tweak to Ed's FreeBSD fix.
9a93a93 Add a bandaid to fix the FreeBSD build
90700cc Adding a test for k5 binaries
7c37d3e Fix the kalimba arch 4 test, broken when I introduced handling of kalimba architecture variants.
835dfd8 Not all processes have a Dynamic Loader.  Be sure to check that it exists before using it.
8f2db11 Add SBThreadPlan to this CMakeLists.txt as well.
f9bc540 thread state coordinator: add additional assert missing from previous test check-in.
0221f22 Fix FreeBSD build.
d6d096a Fixup some minor issues with HostProcess.
1f7d74a thread state coordinator: add test to be explicit about resume behavior in presence of deferred stop notification still pending.
c0d9854 Fix cmake build for new thread plan files.
b61ed75 Fix some errors that crept in when I cut & pasted into emacs.
85bd686 Add a very trivial example for scripted stepping.
77746a7 This checkin is the first step in making the lldb thread stepping mechanism more accessible from the user level.  It adds the ability to invent new stepping modes implemented by python classes, and to view the current thread plan stack and to some extent alter it.
24c18de dwarf: add dwarf v4 maximum_operations_per_instruction to DWARFDebugLine.
16041f5 thread state coordinator: added a thread resume request and related tests.
4a9fce1 thread state coordinator: add exec reset support, remove empty virtual destructors.
a0c294b Very minimal support 24-bit kalimbas. Vanilla "memory read" for data sections works, as do breakpoints, run and pause, display zeroth frame.
0b640d6 Included cstdarg for compilation of va_start and va_end.
471f089 thread state coordinator: added new thread support.
cd8c58c Enable llgs to build against experimental Android AOSP lldb/llvm/clang/compiler-rt repos.
3218d3f thread state coordinator: added thread death support and more tests.
3fbaf94 thread state coordinator: added test for notify after two pending thread stops.
cb4de2d thread state coordinator: handle when prerequisite pending stop is already stopped.
59b5ae1 gtest: tweaked test runner to fix an extra comma, added more tdd-based thread coordinator behavior.
ab52005 gtest: modified Xcode integration so gtest assert/expect failure now shows error content in the error marker at the line of failure.
1121ada gtest: remove recursive make, add python driver + Xcode error hook-up.
82b0a30 Fixup gtest layout, add Linux ThreadStateCoordinator.cpp.

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