LLVM/llvm 354742cfe/trunk/test/CodeGenCXX pragma-loop-safety.cpp

Typo: s/CHCCK/CHECK

LLVM/llvm 354741cfe/trunk/lib/AST Type.cpp

[NFC] Minor coding style (indent) fix.

LLVM/llvm 354740llvm/trunk/lib/Target/Hexagon HexagonSplitDouble.cpp HexagonFrameLowering.cpp, llvm/trunk/lib/Target/SystemZ SystemZInstrInfo.cpp

[Hexagon, SystemZ] Be super conservative about atomics

As requested during review of D57601, be equally conservative for atomic MMOs as for 
volatile MMOs in all in tree backends. At the moment, all atomic MMOs are also volatile, 
but I'm about to change that.

Reviewed as part of https://reviews.llvm.org/D58490, with other backends still pending 
review.  

LLVM/llvm 354739llvm/trunk/include/llvm/Support VirtualFileSystem.h, llvm/trunk/lib/Support VirtualFileSystem.cpp

VFS: Avoid some unnecessary std::string copies

Thread Twine a little deeper through the VFS to avoid unnecessarily
constructing the same std::string twice in a parameter sequence:

    Twine -> std::string -> StringRef -> std::string

Changing a few parameters from StringRef to Twine avoids the early call
to `Twine::str()`.

LLVM/llvm 354738llvm/trunk/lib/CodeGen TwoAddressInstructionPass.cpp, llvm/trunk/test/CodeGen/X86 commute-blend-sse41.ll

[TwoAddressInstructionPass] After commuting an instruction and before trying to look for 
more commutable operands, resample the number of operands.

The new instruciton might have less operands than the original instruction. If we don't 
resample, the next loop iteration might read an operand that doesn't exist.

X86 can commute blends to movss/movsd which reduces from 4 operands to 3. This happened in 
the test case that caused r354363 & company to be reverted. A reduced version of that has 
been committed here.

Really this whole checking for more commutable operands is a little fragile. It assumes 
that the new instructions operands are the same order and positions as the original except 
for the pair that was swapped. I don't know of anything that breaks this assumption today, 
but I've left a fixme. Fixing this will likely require an interface change.

LLVM/llvm 354737llvm/trunk/lib/Target/X86 X86ISelLowering.cpp X86InstrSSE.td, llvm/trunk/test/CodeGen/X86 vector-shuffle-256-v32.ll oddshuffles.ll

Recommit r354363 "[X86][SSE] Generalize X86ISD::BLENDI support to more value types"

And its follow ups r354511, r354640.

A follow patch will fix the issue that caused it to be reverted.

LLVM/llvm 354736cfe/trunk/include/clang/Basic TokenKinds.def, cfe/trunk/lib/Basic Module.cpp

Enable coroutines under -std=c++2a.

LLVM/llvm 354735cfe/trunk/www cxx_status.html

[cxx_status] Update to match Kona motions.

LLVM/llvm 354734llvm/trunk/lib/CodeGen/SelectionDAG LegalizeIntegerTypes.cpp, llvm/trunk/lib/Target/X86 X86ISelLowering.cpp

Recommit r354647 and r354648 "[LegalizeTypes] When promoting the result of 
EXTRACT_SUBVECTOR, also check if the input needs to be promoted. Use that to determine the 
element type to extract"

r354648 was a follow up to fix a regression "[X86] Add a DAG combine for 
(aext_vector_inreg (aext_vector_inreg X)) -> (aext_vector_inreg X) to fix a regression 
from my previous commit."

These were reverted in r354713 as their context depended on other patches that were 
reverted for a bug.

LLVM/llvm 354733llvm/trunk/lib/Target/WebAssembly WebAssemblyInstrInteger.td, llvm/trunk/test/CodeGen/WebAssembly select.ll simd-select.ll

[WebAssembly] Fix select of and (PR40805)

Fixes https://bugs.llvm.org/show_bug.cgi?id=40805 introduced by
patterns added in D53676.

I'm removing the patterns entirely here, as they are not correct
in the general case. If necessary something more specific can be
added in the future.

Differential Revision: https://reviews.llvm.org/D58575

LLVM/llvm 354732llvm/trunk/lib/Target/X86 X86ISelLowering.cpp

[X86][AVX] combineInsertSubvector - remove concat_vectors(load(x),load(x)) --> 
sub_vbroadcast(x)

D58053/rL354340 added this to EltsFromConsecutiveLoads directly

LLVM/llvm 354731llvm/trunk/lib/Target/X86 X86InstrInfo.cpp

Fix MSVC constant truncation warnings. NFCI.

LLVM/llvm 354730llvm/trunk/lib/Target/X86 X86ISelLowering.cpp, llvm/trunk/test/CodeGen/X86 subvector-broadcast.ll avx512dqvl-intrinsics-upgrade.ll

[X86][AVX] concat_vectors(scalar_to_vector(x),scalar_to_vector(x)) --> broadcast(x)

For AVX1, limit this to i32/f32/i64/f64 loading cases only.

LLVM/llvm 354729llvm/trunk/lib/Target/X86 X86ISelLowering.cpp, llvm/trunk/test/CodeGen/X86 subvector-broadcast.ll

[X86][AVX] Shuffle->Permute+Blend if we have one v4f64/v4i64 shuffle input in place

Even on AVX1 we can pretty cheaply (VPERM2F128+VSHUFPD) permute a single v4f64/v4i64 input 
(on AVX2 its just a single VPERMPD), followed by a BLENDPD.

LLVM/llvm 354728cfe/trunk/include/clang/AST OpenMPClause.h

[NFC] Fix Wdocumentation warning in OMPToClause

LLVM/llvm 354727cfe/trunk/test/SemaCXX warn-unsequenced.cpp

[Sema][NFC] SequenceChecker: More tests in preparation for D57660

LLVM/llvm 354726llvm/trunk/test/CodeGen/Mips sll-micromips-r6-encoding.mir

[MIPS] Fix a incorrect test. (NFC)

This test is incorrect as it should be using the microMIPSR6 instruction to
return, not the microMIPS version.

LLVM/llvm 354725libcxx/trunk/test/libcxx/experimental lit.local.cfg, libcxx/trunk/test/libcxx/experimental/memory/memory.resource.global global_memory_resource_lifetime.pass.cpp new_delete_resource_lifetime.pass.cpp

[libcxx] Make sure all experimental tests are disabled when enable_experimental=False

Summary:
Previously, we'd run some experimental tests even when enable_experimental=False
was used with lit.

Reviewers: EricWF

Subscribers: christof, jkorous, dexonsmith, libcxx-commits, mclow.lists

Differential Revision: https://reviews.llvm.org/D55834

LLVM/llvm 354724llvm/trunk/lib/Target/X86 X86InstrInfo.cpp, llvm/trunk/test/CodeGen/X86 masked_load.ll masked_store.ll

[X86] Sign extend the 8-bit immediate when commuting blend instructions to match isel.

Conversion from ConstantSDNode to MachineInstr sign extends immediates from their APInt 
representation to int64_t.

This commit makes sure we do the same for commuting. The tests changes show how this 
improves CSE. This issue was made worse by the MachineCSE using commuteInstruction to undo 
a commute. So we virtually guarantee the sign extend from isel would be lost.

The improved CSE also occurred with r354363, but that was reverted. I'm working to undo 
the revert, but wanted to get this fix in while it was easy to see the results.

LLVM/llvm 354723cfe/trunk/lib/Frontend InitHeaderSearch.cpp

Remove OpenBSD case for old system libstdc++ header path as OpenBSD
has switched to libc++.

LLVM/llvm 354722llvm/trunk/lib/Object MachOObjectFile.cpp, llvm/trunk/test/tools/llvm-objdump/X86 macho-disassemble-stab.test

objdump fails to parse Mach-O binaries with n_desc bearing stabs

Summary:
The objdump Mach-O parser uses MachOObjectFile::checkSymbolTable() to
verify the symbol table is in a legal state before dereferencing the
offsets in the table. This routine missed a test for N_STAB symbols
when validating the two-level name space library ordinal for undefined
symbols. If the binary in question contained a value in the n_desc high
byte that is larger than the list of loaded dylibs, checkSymbolTable()
will flag the library ordinal as being out of range. Most of the time
the n_desc field is set to 0 or to small values, but old final linked
binaries exist with N_STAB symbols bearing non-trivial n_desc fields. 

The change here is simply to verify a symbol is not an N_STAB symbol
before consulting the values of n_other or n_desc.

rdar://44977336

Reviewers: lhames, pete, ab

Reviewed By: pete

Subscribers: llvm-commits, rupprecht

Tags: #llvm

    [2 lines not shown]

LLVM/llvm 354721cfe/trunk/lib/Driver/ToolChains OpenBSD.cpp

Remove sanitizer context workaround no longer necessary

The base linker is now lld.

LLVM/llvm 354720compiler-rt/trunk/lib/sanitizer_common sanitizer_stacktrace.h

Remove overly broad assert from r354717.

LLVM/llvm 354719llvm/trunk/unittests/CodeGen TargetOptionsTest.cpp

Try again to fix memory leak in r354692

The previous one didn't fix everything.

LLVM/llvm 354718compiler-rt/trunk/lib/sanitizer_common sanitizer_stacktrace.cc sanitizer_stacktrace_sparc.cc

[NFC][Sanitizer] Comment out argument checks

These break clang-ppc64 bots.

LLVM/llvm 354717compiler-rt/trunk/lib/sanitizer_common sanitizer_symbolizer_markup.cc sanitizer_unwind_win.cc

[NFC][Sanitizer] Add argument checks to BufferedStackTrace::Unwind* functions

Reviewers: vitalybuka

Differential Revision: https://reviews.llvm.org/D58555

LLVM/llvm 354716lld/trunk/COFF PDB.cpp InputFiles.cpp, lld/trunk/test/COFF functionpadmin.test

[LLD][COFF] Add support for /FUNCTIONPADMIN command-line option

Initial patch by Stefan Reinalter.

Fixes PR36775

Differential Revision: https://reviews.llvm.org/D49366

LLVM/llvm 354715llvm/trunk/docs GlobalISel.rst, llvm/trunk/include/llvm/Analysis InstructionPrecedenceTracking.h

[NFC] Fix typos: preceeding -> preceding

LLVM/llvm 354714zorg/trunk/zorg/buildbot/builders LLDBBuilder.py

LLDBBuilder.getLLDBScriptCommandsFactory to use LLVMBuildFactory if depends_on_projects is 
given.

LLVM/llvm 354713llvm/trunk/lib/Target/X86 X86ISelLowering.cpp X86InstrSSE.td, llvm/trunk/test/CodeGen/X86 vector-shuffle-256-v32.ll oddshuffles.ll

Revert r354363 & co "[X86][SSE] Generalize X86ISD::BLENDI support to more value types"

r354363 caused https://crbug.com/934963#c1, which has a plain C reduced
test case.

I also had to revert some dependent changes:
- r354648
- r354647
- r354640
- r354511

LLVM/llvm 354712llvm/trunk/unittests/CodeGen TargetOptionsTest.cpp

Fix memory leak in r354692

LLVM/llvm 354711lldb/trunk/include/lldb/Target Target.h, lldb/trunk/lit/ExecControl/StopHook stop-hook-threads.test

Revert r354706 - lit touched my thigh

LLVM/llvm 354710llvm/trunk/lib/CodeGen/SelectionDAG LegalizeIntegerTypes.cpp

[LegalizeTypes] Use PromoteTargetBoolean in PromoteIntOp_ADDSUBCARRY instead of 
reimplementing it. NFCI

LLVM/llvm 354709llvm/trunk/test/CodeGen/X86 vec_smulo.ll vec_ssubo.ll

[X86] Enable custom splitting of v8i64/v16i32 sext/zext for avx/avx2 when input type will 
be promoted by the type legalize to 128-bits.

If the the input type will be promoted to 128 bits its better to put a 
sign_extend_inreg/and in the 128 bit register before the split occurs. Otherwise we end up 
doing it on each half in the wider register.

Some of the overflow arithmetic tests are regressions, but I think we can make some 
improvement using getSetccResultType in DAG combine and/or type legalization.

LLVM/llvm 354708llvm/trunk/test/CodeGen/X86 vector-sext-widen.ll vector-sext.ll

[X86] Add a few test cases for a v8i64 sext/zext from an illegal type that needs to be 
promoted to 128 bits.

If v8i64 isn't a legal type but v4i64 is, these will be split and then each half will get 
their input promoted and become an any_extend_vector_inreg/punpckhwd + any_extend + 
and/sign_extend_inreg.

If we instead recognize the input will be promoted we can emit the and/sign_extend_inreg 
first in a 128 bit register. Then we can sign_extend/zero_extend one half and 
pshufd+sign_extend/zero_extend the other half.

LLVM/llvm 354707lld/trunk/docs missingkeyfunction.rst

Split a long line to avoid annoying horizontal scrolling on a browser.

LLVM/llvm 354706lldb/trunk/include/lldb/Target Target.h, lldb/trunk/lit/ExecControl/StopHook stop-hook-threads.test

Make sure that stop-hooks run asynchronously.

They aren't designed to nest recursively, so this will prevent that.
Also add a --auto-continue flag, putting "continue" in the stop hook makes
the stop hooks fight one another in multi-threaded programs.
Also allow more than one -o options so you can make more complex stop hooks w/o
having to go into the editor.

<rdar://problem/48115661>

Differential Revision: https://reviews.llvm.org/D58394

LLVM/llvm 354705llvm/trunk/test/CodeGen/WebAssembly function-bitcasts.ll userstack.ll

[WebAssembly] Update CodeGen test expectations after rL354697. NFC

LLVM/llvm 354704lld/trunk/docs missingkeyfunction.rst

s/method/function/g since function is the correct name in C++.

LLVM/llvm 354703lld/trunk/Common Reproduce.cpp, lld/trunk/ELF DriverUtils.cpp

Remove a function from header and move the implementation to a .cpp file. NFC.

LLVM/llvm 354702lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize TestBreakpointSerialization.py, lldb/trunk/source/Breakpoint BreakpointOptions.cpp

When deserializing breakpoints some options may not be present.
The deserializer was not handling this case.  For now we just
accept the absent option, and set it to the breakpoint default.
This will be more important if/when I figure out how to serialize
the options set on breakpont locations.

<rdar://problem/48322664>

LLVM/llvm 354701compiler-rt/trunk/test/sanitizer_common/TestCases/Posix dedup_token_length_test.cc

[NFC][Sanitizer] Re-enable test on Darwin

This unexpectedly passes on our CI, although it still fails on my
machine.

LLVM/llvm 354700llvm/trunk/lib/Target/AMDGPU VOP3Instructions.td AMDGPU.td

Revert "AMDGPU/NFC: Cleanup subtarget predicates"

It breaks one of our downstream merges, so revert it
temporarily while investigating failures downstream

LLVM/llvm 354699llvm/trunk/test/CodeGen/AArch64 uaddo.ll, llvm/trunk/test/CodeGen/X86 codegen-prepare-uaddo.ll

[CGP] add tests for uaddo increment/decrement; NFC

LLVM/llvm 354698cfe/trunk/include/clang/AST OpenMPClause.h, cfe/trunk/lib/AST OpenMPClause.cpp

[OpenMP 5.0] Parsing/sema support for to clause with mapper modifier.

This patch implements the parsing and sema support for OpenMP to clause
with potential user-defined mappers attached. User defined mapper is a
new feature in OpenMP 5.0. A to/from clause can have an explicit or
implicit associated mapper, which instructs the compiler to generate and
use customized mapping functions. An example is shown below:

    struct S { int len; int *d; };
    #pragma omp declare mapper(id: struct S s) map(s, s.d[0:s.len])
    struct S ss;
    #pragma omp target update to(mapper(id): ss) // use the mapper with name 'id' to map 
ss to device

Contributed-by: <lildmh at gmail.com>

Differential Revision: https://reviews.llvm.org/D58523

LLVM/llvm 354697llvm/trunk/lib/MC WasmObjectWriter.cpp MCExpr.cpp, llvm/trunk/lib/Target/WebAssembly WebAssemblyMCInstLower.cpp WebAssemblyAsmPrinter.cpp

[WebAssembly] Remove unneeded MCSymbolRefExpr variants

We record the type of the symbol (event/function/data/global) in the
MCWasmSymbol and so it should always be clear how to handle a relocation
based on the symbol itself.

The exception is a function which still needs the special @TYPEINDEX
then the relocation contains the signature rather than the address
of the functions.

Differential Revision: https://reviews.llvm.org/D58472

LLVM/llvm 354696compiler-rt/trunk/lib/sanitizer_common sanitizer_stacktrace.h sanitizer_unwind_linux_libcdep.cc

[NFC][Sanitizer] Rename BufferedStackTrace::FastUnwindStack

FastUnwindStack -> UnwindFast
SlowUnwindStack -> UnwindSlow
Stack is redundant, verb should come first.

SlowUnwindStackWithContext(uptr pc, void *context, u32 max_depth) ->
SlowUnwindStack
WithContext is redundant, since it is a required parameter.

Reviewers: vitalybuka

Differential Revision: https://reviews.llvm.org/D58551

LLVM/llvm 354695compiler-rt/trunk/lib/sanitizer_common sanitizer_symbolizer_report.cc, compiler-rt/trunk/lib/tsan/rtl tsan_rtl.cc

[Sanitizer] Fix uses of stack->Unwind(..., fast)

Apply StackTrace::WillUseFastUnwind(fast) in a few more places missed by
my previous patch (https://reviews.llvm.org/D58156).

Reviewers: vitalybuka

Differential Revision: https://reviews.llvm.org/D58550

LLVM/llvm 354694llvm/trunk/lib/MC WasmObjectWriter.cpp, llvm/trunk/test/MC/WebAssembly function-alias.ll

[WebAssembly] MC: Handle aliases of aliases

Differential Revision: https://reviews.llvm.org/D58417

LLVM/llvm 354693llvm/trunk CMakeLists.txt

[CMake] Honor LLVM_EXTERNAL_<proj>_SOURCE_DIR

When LLVM_ENABLE_PROJECTS is set, CMake assumes the project
directories are all side-by-side. This is not always the case and
there's no reason to expect it if LLVM_EXTERNAL_<proj>_SOURCE_DIR is
set. Honor that setting if it exists and allow the build configuration
to continue.

Differential Revision: https://reviews.llvm.org/D49672