LLVM/llvm 342835llvm/trunk/lib/Passes CMakeLists.txt

Build PassBuilder.cpp with /bigobj to try and appease MSVC EXPENSIVE_CHECKS buildbot

LLVM/llvm 342834cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject UninitializedObjectChecker.cpp UninitializedObject.h

[analyzer][UninitializedObjectChecker] Using the new const methods of ImmutableList

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

LLVM/llvm 342833cfe/trunk/cmake/caches Fuchsia-stage2.cmake

[CMake] Use internal_linkage rather than always_inline for libc++

This is a workaround for PR39053 which was uncovered by D50652 when
the default attribute has been changed from internal_linkage to

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

LLVM/llvm 342832cfe/trunk/lib/StaticAnalyzer/Checkers CStringSyntaxChecker.cpp, cfe/trunk/test/Analysis cstring-syntax.c

[CStringSyntaxChecker] Check strlcat sizeof check

Assuming strlcat is used with strlcpy we check as we can if the last argument does not 
equal os not larger than the buffer.
Advising the proper usual pattern.

Reviewers: george.karpenkov, NoQ, MaskRay

Reviewed By: MaskRay

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

LLVM/llvm 342831cfe/trunk/lib/Index IndexTypeSourceInfo.cpp, cfe/trunk/test/Index index-template-specialization.cpp

[Index] Report specialization bases as references when IndexImplicitInstantiation is true

    template <typename T> struct B {};
    template <typename T> struct D : B<T> {}; // `B` was not reported as a reference

This patch fixes this.

Reviewers: akyrtzi, arphaman, devnexen

Reviewed By: devnexen

Subscribers: cfe-commits

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

LLVM/llvm 342830llvm/trunk/lib/Target/X86 X86InstrAVX512.td, llvm/trunk/test/CodeGen/X86 avx512-ext.ll

[X86] Add isel pattern for (v8i16 (sext (v8i1))) with DQI and no BWI.

Our lowering that tries to avoid this sign extend can be defeated by the DAG combine 
folding it with a truncate.

The pattern needs to extend to an v8i32 then truncate back down to v8i16.

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

[X86] Fix a few typos in comments.

LLVM/llvm 342828llvm/trunk/include/llvm-c OrcBindings.h Error.h, llvm/trunk/lib/ExecutionEngine/Orc OrcCBindingsStack.h OrcCBindings.cpp

[ORC] Update ORC C bindings to use the new llvm::Error C API.

This replaces instances of the LLVMOrcErrorCode type with LLVMErrorRef,
simplifying the implementation of the OrcCBindingsStack class and ORC
C API bindings and making it possible to return arbitrary (wrapped)

LLVM/llvm 342827cfe/trunk/include/clang module.modulemap

Fix modules build with shared library.

r341994 caused clangAnalysis to pull all of the AST matchers
library into clang. Due to inline key functions in the headers,
importing the AST matchers library gives a link dependency on the
AST matchers (and thus the AST), which clang should not

This patch works around the issues by excluding the offending
libclangAnalysis header in the modulemap.

LLVM/llvm 342826llvm/trunk/lib/CodeGen/SelectionDAG DAGCombiner.cpp

[DAGCombiner] Simplify some code in visitBITCAST. NFCI

LLVM/llvm 342825cfe/trunk/include/clang/Index USRGeneration.h

[Index] Fix header guard naming

LLVM/llvm 342824llvm/trunk/lib/Target/AArch64 AArch64RegisterInfo.cpp AArch64ISelLowering.cpp, llvm/trunk/test/CodeGen/AArch64 arm64-custom-call-saved-reg.ll arm64-reserve-call-saved-reg.ll

[AArch64] Support adding X[8-15,18] registers as CSRs.

Specifying X[8-15,18] registers as callee-saved is used to support
CONFIG_ARM64_LSE_ATOMICS in Linux kernel. As part of this patch we:
- use custom CSR list/mask when user specifies custom CSRs
- update Machine Register Info's list of CSRs with additional custom CSRs in
LowerCall and LowerFormalArguments.

Reviewers: srhines, nickdesaulniers, efriedma, javed.absar

Reviewed By: nickdesaulniers

Subscribers: kristof.beyls, jfb, llvm-commits

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

LLVM/llvm 342823cfe/trunk/include/clang/Analysis/Analyses ThreadSafetyTIL.h, cfe/trunk/lib/Analysis ThreadSafetyTIL.cpp ThreadSafety.cpp

Eliminate some unneeded signed/unsigned conversions

No functional change is intended, but generally this should be a bit
more safe.

LLVM/llvm 342822libcxx/trunk CMakeLists.txt

[NFC][libc++] Fix typo in the description of LIBCXX_INCLUDE_BENCHMARKS

LLVM/llvm 342821libcxx/trunk/test/libcxx/diagnostics nodiscard_extensions.fail.cpp

Mark [[nodiscard]] tests unsupported on GCC prior to 7.0

LLVM/llvm 342820libcxx/trunk/test/std/experimental/simd/simd.access default.pass.cpp

Fix UB in SIMD tests.

One of the SIMD tests attempted to left shift a value by 42, which
is UB when the left hand side is a 32 bit integer type.

This patch adjusts the test to use the value 4 instead of 42.

LLVM/llvm 342819libcxx/trunk/test/libcxx/diagnostics nodiscard_extensions.pass.cpp

[libcxx] Readjust nodiscard_extensions.pass.cpp test - just disable for ASAN

In rL342814, i have committed a blind fix to unbreak the asan buildbot,
but as it was later discussed, the leak is intentional,
so we can not fix the failure that way.

So this reverts the leak 'fix',
and simply disables the test in the presence of ASAN.

LLVM/llvm 342818libcxx/trunk/test/std/thread/futures/futures.shared_future wait_until.pass.cpp

Mark test as flaky

LLVM/llvm 342817libcxxabi/trunk/www index.html

Update docs to reference new libc++ mailing lists.

LLVM/llvm 342816libcxx/trunk/docs index.rst, libcxx/trunk/www index.html

Correct docs to reference the new libc++ lists.

We recently added libcxx-dev and libcxx-commits mailing lists.
This patch updates the libc++ documentation to correctly reference
the libc++ lists instead of the old Clang ones.

LLVM/llvm 342815libcxxabi/trunk/src fallback_malloc.cpp

Fix incorrectly aligned exceptions in 32 bit builds.

This patch fixes a bug where exceptions in 32 bit builds
would be incorrectly aligned because malloc only provides 8 byte aligned
memory where 16 byte alignment is needed.

This patch makes libc++abi correctly use posix_memalign when it's
available. This requires defining _LIBCPP_BUILDING_LIBRARY so that
libc++ only defines _LIBCPP_HAS_NO_ALIGNED_ALLOCATION when libc doesn't
support it and not when aligned new/delete are disable for other

This bug somehow made it into the 7.0 release, making it a regression.
Therefore this patch should be included in the next dot release.

LLVM/llvm 342814libcxx/trunk/test/libcxx/diagnostics nodiscard_extensions.pass.cpp

[libcxx] Blind attempt to fix harmless leak in nodiscard_extensions.pass.cpp test

libcxx-libcxxabi-x86_64-linux-ubuntu-asan complains about a leak here.

LLVM/llvm 342813libcxx/trunk/lib/abi CMakeLists.txt

[libcxx] Fix the definition of the check-cxx-abilist target on Darwin

r342805 added support for the check-cxx-abilist target on FreeBSD, but broke
the target on macOS in doing so. The problem is that the GENERIC_TARGET_TRIPLE
gets overwritten after replacing the FreeBSD regular expression, which
nullifies the replacement done with the darwin regular expression.

Reviewers: dim, EricWF

Subscribers: emaste, mgorny, krytarowski, christof, dexonsmith, cfe-commits, 

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

LLVM/llvm 342812cfe/trunk/test/CodeGen codemodels.c

Fix codemodels.c test case (only test mcmodel=medium on X86).

aarch64 testing is broken because "medium" is not a valid
code-model on aarch64, and codemodels.c tests that.  This fixes
that problem by adding "-triple x86_64-unknown-linux-gnu" to the
test with "-mcode-model moedium".

LLVM/llvm 342811libunwind/trunk/src Registers.hpp

[libunwind][NFC] Suppress unused parameter warnings

Reviewers: EricWF

Subscribers: christof, chrib, dexonsmith, cfe-commits

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

LLVM/llvm 342810libcxx/trunk/lib/abi CHANGELOG.TXT

Document new symbols for __u64toa and __u32toa

They are introduced in r338479; their Linux ABI changes are recorded in r338486.

TODO: Record the Mac OS X ABI changes.

Reviewers: EricWF

Reviewed By: EricWF

Subscribers: christof, ldionne, libcxx-commits, cfe-commits

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

LLVM/llvm 342809llvm/trunk/lib/CodeGen/SelectionDAG DAGCombiner.cpp

[DAGCombiner] Rewrite r331896 in a different way to address a FIXME. NFCI

LLVM/llvm 342808libcxx/trunk/docs UsingLibcxx.rst, libcxx/trunk/test/libcxx/diagnostics enable_nodiscard.fail.cpp enable_nodiscard_disable_after_cxx17.fail.cpp

[libc++] Add _LIBCPP_ENABLE_NODISCARD and _LIBCPP_NODISCARD_EXT to allow pre-C++2a 

The `[[nodiscard]]` attribute is intended to help users find bugs where
function return values are ignored when they shouldn't be. After C++17 the
C++ standard has started to declared such library functions as `[[nodiscard]]`.
However, this application is limited and applies only to dialects after C++17.
Users who want help diagnosing misuses of STL functions may desire a more
liberal application of `[[nodiscard]]`.

For this reason libc++ provides an extension that does just that! The
extension must be enabled by defining `_LIBCPP_ENABLE_NODISCARD`. The extended
applications of `[[nodiscard]]` takes two forms:

1. Backporting `[[nodiscard]]` to entities declared as such by the
   standard in newer dialects, but not in the present one.

2. Extended applications of `[[nodiscard]]`, at the libraries discretion,
   applied to entities never declared as such by the standard.

Users may also opt-out of additional applications `[[nodiscard]]` using
additional macros.

Applications of the first form, which backport `[[nodiscard]]` from a newer

    [17 lines not shown]

LLVM/llvm 342807llvm/trunk/test/CodeGen/BPF elf-symbol-information.ll

[bpf] Test case for symbol information in object file

This patch tests the change introduced in r342556.

Signed-off-by: Paul Chaignon <paul.chaignon at orange.com>

LLVM/llvm 342806llvm/trunk/lib/Transforms/InstCombine InstCombineCalls.cpp, llvm/trunk/test/Transforms/InstCombine/X86 blend_x86.ll

[InstCombine][x86] try even harder to convert blendv intrinsic to generic IR (PR38814)

Follow-up to rL342324 (D52059):

Missing optimizations with blendv are shown in:

This is an easier and more powerful solution than adding pattern matching for a few 
special cases in the backend. The potential danger with this transform in IR is that 
the condition value can get separated from the select, and the backend might not be 
able to make a blendv out of it again.

LLVM/llvm 342805libcxx/trunk/lib/abi CMakeLists.txt

Similar to the handling of darwin target triples, strip the version
numbers off of freebsd target triples, when generating the name of the
ABI list file for check-cxx-abilist target.

Also remove unnecessary parentheses in the regex for darwin, and
slightly reword the comment.

LLVM/llvm 342804lldb/trunk/source/Plugins/ExpressionParser/Clang ClangUserExpression.h ClangUserExpression.cpp

Change type of m_user_expression_start_pos to size_t

AbsPosToLineColumnPos is the only reader of m_user_expression_start_pos
and actually treats it like a size_t. Also the value we store in
m_user_expression_start_pos is originally a size_t, so it makes sense
to change the type of this variable to size_t.

LLVM/llvm 342803libcxx/trunk/test/std/experimental/filesystem class.rec.dir.itr fs.enum, libcxx/trunk/test/std/utilities/memory/unique.ptr unique.ptr.create

Remove a bunch of empty subdirectories. NFCI.

LLVM/llvm 342802cfe/trunk/www menu.html.incl get_involved.html

use the current url for bugzilla

LLVM/llvm 342801cfe/trunk/www get_started.html

update the links to use https

LLVM/llvm 342800llvm/trunk/lib/MC MCObjectFileInfo.cpp, llvm/trunk/test/MC/ELF exclude-debug-dwo.s

[lib/MC] - Set SHF_EXCLUDE flag for .dwo sections.

DWARF5 spec says about single file split case:

"The sections that do not require relocation, however, can be written
to the relocatable object (.o) file but ignored by the
the linker or they can be written to a separate DWARF object (.dwo) file
that need not be accessed by the linker."

Nice way to make linker to ignore them is to set SHF_EXCLUDE flag.
It seems to be not harmful to always set it for .dwo sections.
That is what this patch does.

Differential revision: https://reviews.llvm.org/D52303

LLVM/llvm 342799llvm/trunk/lib/Target/Mips/TargetInfo MipsTargetInfo.cpp

[mips] Provide more detailed description for MIPS targets. NFC

LLVM/llvm 342798llvm/trunk/lib/Target/Mips/TargetInfo MipsTargetInfo.cpp

[mips] Remove obsoleted "experimental" tag from MIPS 64-bit targets. NFC

LLVM/llvm 342797llvm/trunk/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/trunk/test/Transforms/InstCombine sub.ll select_meta.ll

[InstCombine] Fold (min/max ~X, Y) -> ~(max/min X, ~Y) when Y is freely invertible

Summary: This restores the combine that was reverted in r341883. The infinite loop from 
the failing test no longer occurs due to changes from r342163.

Reviewers: spatel, dmgreen

Reviewed By: spatel

Subscribers: llvm-commits

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

LLVM/llvm 342796llvm/trunk/lib/Target/X86 X86InstrCompiler.td X86SelectionDAGInfo.cpp, llvm/trunk/test/CodeGen/X86 pr38865-3.ll

[X86] Fix inline expansion for memset in x32

Summary: Similar to D51893 which was for memcpy

Reviewers: efriedma

Reviewed By: efriedma

Subscribers: llvm-commits

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

LLVM/llvm 342795llvm/trunk/lib/Target/X86 X86ISelLowering.cpp, llvm/trunk/test/CodeGen/X86 movmsk-cmp.ll

[X86] Fold (movmsk (setne (and X, (1 << C)), 0)) -> (movmsk (X << C)) for vXi8 vectors.

We don't have a vXi8 shift left so we need to bitcast to a vXi16 vector to perform the 
shift. If we let lowering legalize the vXi8 shift we get an extra and that we don't need 
and fail to remove.

LLVM/llvm 342794cfe/trunk/lib/Sema SemaDeclAttr.cpp, cfe/trunk/test/SemaCXX warn-thread-safety-analysis.cpp

Update smart pointer detection for thread safety analysis.

Objects are determined to be smart pointers if they have both a star and arrow
operator.  Some implementations of smart pointers have these overloaded
operators in a base class, while the check only searched the derived class.
This fix will also look for the operators in the base class.

LLVM/llvm 342793cfe/trunk/include/clang/Basic Features.def, cfe/trunk/test/Lexer has_feature_undefined_behavior_sanitizer.cpp

[Lexer] Add udefined_behavior_sanitizer feature

This can be used to detect whether the code is being built with UBSan using
the __has_feature(undefined_behavior_sanitizer) predicate.

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

LLVM/llvm 342792llvm/trunk README.txt

Test commit.

LLVM/llvm 342791llvm/trunk/test/tools/llvm-size/X86 format-berkeley-tabs.s, llvm/trunk/tools/llvm-size llvm-size.cpp

[llvm-size] Berkeley formatting: use tabs instead of spaces as field delimeters.

This matches GNU behavior for size and allows use of cut to parse the output of llvm-size.

LLVM/llvm 342790cfe/trunk/include/clang/Analysis/Analyses ThreadSafetyTraverse.h, cfe/trunk/lib/Analysis ThreadSafetyCommon.cpp ThreadSafety.cpp

Thread safety analysis: Make printSCFG compile again [NFC]

Not used productively, so no observable functional change.

Note that printSCFG doesn't yet work reliably, it seems to crash

LLVM/llvm 342789cfe/trunk/test/CodeGen codemodels.c

Fix codemodels.c test case (only test mcmodel-kernel on x86)

A recent commit I made broke aarch64 testing, because "kernel"
apparently is not a valid code-model on aarch64, and one of my tests
tested that. This fixes the problem (hopefully) by adding "-triple
x86_64-unknown-linux-gnu" to the test build with "-mcodel-model

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

LLVM/llvm 342788llvm/trunk/lib/Target/X86 X86FastISel.cpp, llvm/trunk/test/CodeGen/X86 bmi-intrinsics-fast-isel-x86_64.ll

[X86] Teach fast isel to use MOV32ri64 for loading an unsigned 32 immediate into a 64-bit 

Previously we used SUBREG_TO_REG+MOV32ri. But regular isel was changed recently to use the 
MOV32ri64 pseudo. Fast isel now does the same.

LLVM/llvm 342787cfe/trunk/lib/Analysis ThreadSafety.cpp

Thread safety analysis: Make sure FactEntrys stored in FactManager are immutable [NFC]

Since FactEntrys are stored in the FactManager, we can't manipulate them
anymore when they are stored there.

LLVM/llvm 342786llvm/trunk/lib/Transforms/Vectorize LoopVectorizationLegality.cpp LoopVectorize.cpp, llvm/trunk/test/Transforms/LoopVectorize pr38800.ll pr37515.ll

[Loop Vectorizer] Abandon vectorization when no integer IV found

Support for vectorizing loops with secondary floating-point induction
variables was added in r276554.  A primary integer IV is still required
for vectorization to be done.  If an FP IV was found, but no integer IV
was found at all (primary or secondary), the attempt to vectorize still
went forward, causing a compiler-crash.  This change abandons that
attempt when no integer IV is found.  (Vectorizing FP-only cases like
this, rather than bailing out, is discussed as possible future work
in D52327.)

See PR38800 for more information.

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