LLVM/llvm 361375llvm/trunk/lib/Target/Hexagon HexagonTargetTransformInfo.cpp

[Hexagon] assert getRegisterBitWidth returns non-zero value. NFCI.

Fixes scan-build warning.

LLVM/llvm 361374cfe/trunk/test/Driver darwin-header-search-libcxx.cpp darwin-header-search-libstdcxx.cpp

Mark tests from r361278 as unsupported on Windows.

LLVM/llvm 361373lldb/trunk/lit/SymbolFile/DWARF debug_rnglists.s debug_ranges.s

DWARF: Add debug_ranges/rnglists tests

.debug_ranges parsing is not well tested [citation needed] because this
section tends to be only used in optimized code, and we don't build
optimized executables in our tests, as they produce unpredictable
results.

This patch aims to add some very simple tests for parsing static range
data, which can serve as a first line of defense in case things break.

I also include one XFAILed test, which demonstrates that we don't
correctly handle mixed DWARF v5 and v4 ranges in a single file.

LLVM/llvm 361372cfe/trunk/lib/AST ASTContext.cpp, cfe/trunk/lib/CodeGen TargetInfo.cpp

[ARM][AArch64] Fix incorrect handling of alignment in va_arg code generation

Overaligned and underaligned types (i.e. types where the alignment has been
increased or decreased using the aligned and packed attributes) weren't being
correctly handled in all cases, as the unadjusted alignment should be used.

This patch also adjusts getTypeUnadjustedAlign to correctly handle typedefs of
non-aggregate types, which it appears it never had to handle before.

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

LLVM/llvm 361371llvm/trunk/lib/Support VirtualFileSystem.cpp

[VirtualFileSystem] Fix uninitialized variable warning. NFCI.

LLVM/llvm 361370llvm/trunk/include/llvm/Target TargetMachine.h, llvm/trunk/lib/Target/PowerPC PPCTargetMachine.cpp

[TargetMachine] error message unsupported code model

When the tiny code model is requested for a target machine that does not
support this, we get an error message (which is nice) but also this diagnostic
and request to submit a bug report:

    fatal error: error in backend: Target does not support the tiny CodeModel
    [Inferior 2 (process 31509) exited with code 0106]
    clang-9: error: clang frontend command failed with exit code 70 (use -v to see 
invocation)
    (gdb) clang version 9.0.0 (http://llvm.org/git/clang.git 
29994b0c63a40f9c97c664170244a7bba5ecc15e) (http://llvm.org/git/llvm.git 
95606fdf91c2d63a931e865f4b78b2e9828ddc74)
    Target: arm-arm-none-eabi
    Thread model: posix
    clang-9: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ 
and include the crash backtrace, preprocessed source, and associated run script.
    clang-9: note: diagnostic msg:
    ********************
    PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
    Preprocessed source(s) and associated run script(s) are located at:
    clang-9: note: diagnostic msg: /tmp/tiny-dfe1a2.c
    clang-9: note: diagnostic msg: /tmp/tiny-dfe1a2.sh
    clang-9: note: diagnostic msg:


    [7 lines not shown]

LLVM/llvm 361369www/trunk/devmtg/2019-04 talks.html index.html, www/trunk/devmtg/2019-04/slides BoF-HendersonRupprecht-LLVM_binutils.pdf

[www][EuroLLVM'19] Add BoF slides and notes links for LLVM Binutils BoF

Reviewed by: tonic

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

LLVM/llvm 361368cfe/trunk/lib/Driver/ToolChains Clang.cpp, cfe/trunk/test/Driver cl-options.c

[Driver][Windows] Add dependent lib argument for -fprofile-generate and 
-fcs-profile-generate

Follows on from r360674 which added it for -fprofile-instr-generate.

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

LLVM/llvm 361367llvm/trunk/lib/Object COFFImportFile.cpp, llvm/trunk/test/tools/llvm-dlltool coff-noname.def

[llvm-dlltool] Respect NONAME keyword

This adds proper handling of the NONAME-keyword, which makes llvm-dlltool
generate an import using the ordinal instead of the name.

Patch by by Jannik Vogel, test added by Stefan Schmidt.

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

LLVM/llvm 361366llvm/trunk/lib/Transforms/Scalar MergeICmps.cpp

Re-land r361257 "[MergeICmps][NFC] Make BCEAtom move-only.""

LLVM/llvm 361365cfe/trunk/lib/Basic/Targets PPC.h

[PPC64] Fix PPC64TargetInfo ABI on clang side after D61950

LLVM/llvm 361364lld/trunk/ELF Symbols.h

Copy symbol length when we replace a symbol.

Symbol's NameSize is computed lazily. Currently, when we replace a symbol,
a cached length value can be discarded. This patch propagates that value.

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

LLVM/llvm 361363cfe/trunk/lib/Basic/Targets PPC.h

[PPC64] Fix PPC64TargetInfo after D61950

LLVM/llvm 361362lldb/trunk/include/lldb/Utility Logging.h, lldb/trunk/source/Symbol ClangASTImporter.cpp

Add AST logging

Summary:
Log the AST of the TU associated with LLDB's `expr` command, once a declaration
is completed

Reviewers: shafik

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, lldb-commits

Tags: #lldb

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

LLVM/llvm 361361lldb/trunk/source/Plugins/SymbolFile/DWARF DWARFDebugInfoEntry.cpp

DWARFDebugInfoEntry: remove unused variable

LLVM/llvm 361360lldb/trunk/lit/SymbolFile/DWARF debug-types-basic.test debug-types-expressions.test, lldb/trunk/lit/SymbolFile/DWARF/Inputs debug-types-expressions.cpp

DWARF: Introduce DWARFTypeUnit class

Summary:
This patch introduces the DWARFTypeUnit class, and teaches lldb to parse
type units out of both the debug_types section (DWARF v4), and from the
regular debug_info section (DWARF v5).

The most important piece of functionality - resolving DW_AT_signatures
to connect type forward declarations to their definitions - is not
implemented here, but even without that, a lot of functionality becomes
available. I've added tests for the commands that start to work after
this patch.

The changes in this patch were greatly inspired by D61505, which in turn took
over changes from D32167.

Reviewers: JDevlieghere, clayborg, aprantl

Subscribers: mgorny, jankratochvil, lldb-commits

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

LLVM/llvm 361359lld/trunk/ELF Relocations.cpp InputFiles.cpp, lld/trunk/test/ELF comdat-discarded-error.s exclude-discarded-error.s

[ELF] Improve error message for relocations to symbols defined in discarded sections

Rather than report "undefined symbol: ", give more informative message
about the object file that defines the discarded section.

In particular, PR41133, if the section is a discarded COMDAT, print the
section group signature and the object file with the prevailing
definition. This is useful to track down some ODR issues.

We need to
* add `uint32_t DiscardedSecIdx` to Undefined for this feature.
* make ComdatGroups public and change its type to DenseMap<CachedHashStringRef, const 
InputFile *>

Reviewed By: ruiu

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

LLVM/llvm 361358lldb/trunk/include/lldb/Utility FileSpec.h, lldb/trunk/source/Plugins/ScriptInterpreter/Python PythonDataObjects.cpp PythonDataObjects.h

Delete unnecessary copy ctors

LLVM/llvm 361357compiler-rt/trunk/lib/sanitizer_common sanitizer_common_interceptors.inc sanitizer_platform_interceptors.h, compiler-rt/trunk/test/sanitizer_common/TestCases/Posix wcsdup.c

[Sanitizer] Add interceptor for wcsdup

Summary: The wide-string equivalent of strdup. Implementation trivial.

Reviewers: vitalybuka, eugenis

Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers

Tags: #llvm, #sanitizers

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

LLVM/llvm 361356llvm/trunk/lib/CodeGen MachineCSE.cpp, llvm/trunk/test/CodeGen/X86 masked_compressstore.ll masked_store.ll

[MIR] Add simple PRE pass to MachineCSE

This is the second part of the commit fixing PR38917 (hoisting
partitially redundant machine instruction). Most of PRE (partitial
redundancy elimination) and CSE work is done on LLVM IR, but some of
redundancy arises during DAG legalization. Machine CSE is not enough
to deal with it. This simple PRE implementation works a little bit
intricately: it passes before CSE, looking for partitial redundancy
and transforming it to fully redundancy, anticipating that the next
CSE step will eliminate this created redundancy. If CSE doesn't
eliminate this, than created instruction will remain dead and eliminated
later by Remove Dead Machine Instructions pass.

The third part of the commit is supposed to refactor MachineCSE,
to make it more clear and to merge MachinePRE with MachineCSE,
so one need no rely on further Remove Dead pass to clear instrs
not eliminated by CSE.

First step: https://reviews.llvm.org/D54839

Fixes llvm.org/PR38917

LLVM/llvm 361355cfe/trunk/lib/Basic/Targets PPC.h, llvm/trunk/include/llvm/ADT Triple.h

[PPC64] Parse -elfv1 -elfv2 when specified on target triple

Summary:
For big-endian powerpc64, the default ABI is ELFv1. OpenPower ABI ELFv2 is supported when 
-mabi=elfv2 is specified. FreeBSD support for PowerPC64 ELFv2 ABI with LLVM is in 
progress[1]. This patch adds an alternative way to specify ELFv2 ABI on target triple [2].

The following results are expected:

ELFv1 when using:
-target powerpc64-unknown-freebsd12.0
-target powerpc64-unknown-freebsd12.0 -mabi=elfv1
-target powerpc64-unknown-freebsd12.0-elfv1

ELFv2 when using:
-target powerpc64-unknown-freebsd12.0 -mabi=elfv2
-target powerpc64-unknown-freebsd12.0-elfv2

[1] https://wiki.freebsd.org/powerpc/llvm-elfv2
[2] https://clang.llvm.org/docs/CrossCompilation.html

Patch by Alfredo Dal'Ava Júnior!

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

LLVM/llvm 361354llvm/trunk/lib/Target/AArch64 AArch64Subtarget.h

[AArch64] Subtarget crypto extension defaults

The Armv8.2-A crypto extensions all defaulted to true, but should default to
false, like all the other extensions.

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

LLVM/llvm 361353cfe/trunk/lib/AST ExprConstant.cpp

Fixed a -Wunused-variable warning when assertions are disabled

LLVM/llvm 361352llvm/trunk/lib/Target/X86 X86ISelLowering.cpp, llvm/trunk/test/CodeGen/X86 setcc-wide-types.ll

[X86] Don't compare i128 through vector if construction not cheap (PR41971)

Fix for https://bugs.llvm.org/show_bug.cgi?id=41971. Make the
combineVectorSizedSetCCEquality() transform more conservative by
checking that the bitcast to the vector type will be cheap/free
for both operands. I'm considering it cheap if it's a constant,
a load or already a vector. I've dropped the explicit check for
f128 because it should fall out naturally (in the cases where
it'd be detrimental).

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

LLVM/llvm 361351llvm/trunk/tools/llvm-objdump llvm-objdump.cpp MachODump.cpp

Properly categorize llvm-objdump options

Filters out noise, and distinguish Mach-O related options from others.

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

LLVM/llvm 361350lld/trunk/ELF InputFiles.cpp

Simplify the logic to instantiate Symbols. Should be NFC.

LLVM/llvm 361349llvm/trunk/test/tools/llvm-objcopy/ELF remove-section.test

[NFC] Remove a blank line (test commit)

LLVM/llvm 361348libcxx/trunk/src iostream.cpp

Speculative fix for std stream destruction order on Windows.

The MSVC CRT uses TLS storage to implement per-thread locales.
This storage gets freed during program termination, and if we attempt
to do any io operations (like flushing the std streams) after this occurs
the program may abort.

This patch is a speculative fix for that issue.

The fix tries forcing the initialization of the locale TLS before
initializing the std streams. This should mean that the TLS is freed
after we destroy the streams.

LLVM/llvm 361347llvm/trunk/lib/Target/PowerPC PPCInstrVSX.td PPCInstr64Bit.td

[PowerPC] use meaningful name for displacement form aligned with x-form - NFC

LLVM/llvm 361346llvm/trunk/lib/Target/PowerPC PPCInstrVSX.td PPCISelDAGToDAG.cpp, llvm/trunk/test/CodeGen/PowerPC build-vector-tests.ll unaligned-addressing-mode.ll

[PowerPC] [ISEL] select x-form instruction for unaligned offset
Differential Revision: https://reviews.llvm.org/D62173

LLVM/llvm 361345lld/trunk/docs ld.lld.1

[docs] Fix troff macro (.F1 -> .Fl) in ld.lld.1

LLVM/llvm 361344clang-tools-extra/trunk/clang-tidy/tool run-clang-tidy.py

[clang-tidy] remove default header-filter for run-clang-tidy

Summary:
run-clang-tidy.py was enforcing '-header-filter' parameter with an
unfortunate default value when none was given. Thus, leading to
overwritten clang-tidy configuration (e.g. from .clang-tidy).

This change removes the default value for '-header-filter' resulting in
the default behaviour of clang-tidy itself.

Fixes PR#41426

Reviewed By: hintonda

Patch by Torbjörn Klatt!

Tags: #clang-tools-extra, #clang

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

LLVM/llvm 361343cfe/trunk/docs doxygen.cfg.in, llvm/trunk/docs doxygen.cfg.in

[Docs] Increase Doxygen cache size

Summary:
When building Doxygen docs for llvm and clang, it helpfully prints a warning at
the end noting that the `LOOKUP_CACHE_SIZE` value was too small to keep all
symbols in memory.

By increasing to the size it recommends, Doxygen builds have greatly improved
performance. On my machine, time to run `doxygen-llvm` changes from 34 minutes
to 22 minutes, which is a decent amount of time saved by changing a single
number.

Reviewed By: hintonda

Patch by J. Ryan Stinnett!

Tags: #clang, #llvm

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

LLVM/llvm 361342llvm/trunk/lib/Target/X86 X86IndirectBranchTracking.cpp, llvm/trunk/test/CodeGen/X86 indirect-branch-tracking-r2.ll

[X86] [CET] Deal with return-twice function such as vfork, setjmp when
CET-IBT enabled

Return-twice functions will indirectly jump after the caller's position.
So when CET-IBT is enable, we should make sure these is endbr*
instructions follow these Return-twice function caller. Like GCC does.

Patch by Xiang Zhang (xiangzhangllvm)

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

LLVM/llvm 361341llvm/trunk/docs CodeGenerator.rst

[Docs] fix formatting for bullet list; NFC

LLVM/llvm 361340cfe/trunk/test/Analysis/plugins/CheckerDependencyHandling CMakeLists.txt, cfe/trunk/test/Analysis/plugins/CheckerOptionHandling CMakeLists.txt

[Analysis] Link library dependencies to Analysis plugins

These are needed to avoid undefined symbols which aren't satisfied
by Clang itself.

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

LLVM/llvm 361339compiler-rt/trunk/test/fuzzer merge-sigusr.test

[libFuzzer] Sleep after process exits in merge-sigusr.test.

Ensure that log file has been fully updated before trying to read it.

LLVM/llvm 361338llvm/trunk/docs CodeGenerator.rst, llvm/trunk/lib/Transforms/InstCombine InstCombineVectorOps.cpp

[InstCombine] fold shuffles of insert_subvectors

This should be a valid exception to the general rule of not creating new shuffle masks in 
IR...
because we already do it. :)
Also, DAG combining/legalization will undo this by widening the shuffle back out if 
needed.

Explanation for how we already do this: SLP or vector source can create chains of 
insert/extract
as shown in 1 of the examples from PR16739:
https://godbolt.org/z/NlK7rA
https://bugs.llvm.org/show_bug.cgi?id=16739

And we expect instcombine or DAGCombine to clean that up by creating relatively simple 
shuffles.

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

LLVM/llvm 361337lldb/trunk/source/Symbol DWARFCallFrameInfo.cpp

[Symbol] Remove dead code

LLVM/llvm 361336compiler-rt/trunk/test/fuzzer merge-sigusr.test

[libFuzzer] Kill by session ID in merge-sigusr.test.

Ensures that parent and all child processes are killed at once.

LLVM/llvm 361335cfe/trunk/docs ClangPlugins.rst, cfe/trunk/include/clang/Lex Pragma.h Preprocessor.h

[PragmaHandler] Expose `#pragma` location

Currently, a pragma AST node's recorded location starts at the
namespace token (such as `omp` in the case of OpenMP) after the
`#pragma` token, and the `#pragma` location isn't available.  However,
the `#pragma` location can be useful when, for example, rewriting a
directive using Clang's Rewrite facility.

This patch makes `#pragma` locations available in any `PragmaHandler`
but it doesn't yet make use of them.

This patch also uses the new `struct PragmaIntroducer` to simplify
`Preprocessor::HandlePragmaDirective`.  It doesn't do the same for
`PPCallbacks::PragmaDirective` because that changes the API documented
in `clang-tools-extra/docs/pp-trace.rst`, and I'm not sure about
backward compatibility guarantees there.

Reviewed By: ABataev, lebedev.ri, aaron.ballman

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

LLVM/llvm 361334cfe/trunk/tools/clang-shlib CMakeLists.txt

Fix target property to make BUILD_SHARED_LIBS work

Public and Private link libraries get merged in the LINK_LIBRARIES property instead of 
being kept separate.

With any luck this will get `BUILD_SHARED_LIBS` working again on Linux.

LLVM/llvm 361333llvm/trunk/lib/Target/AMDGPU SIInstrInfo.cpp, llvm/trunk/test/CodeGen/AMDGPU collapse-endcf2.mir

AMDGPU: Assume calls read exec

LLVM/llvm 361332llvm/trunk/test/CodeGen/AMDGPU endpgm-dce.mir

AMDGPU: Add some tests for inlineasm behavior

LLVM/llvm 361331llvm/trunk/lib/Target/AMDGPU SIInstructions.td, llvm/trunk/test/CodeGen/AMDGPU tail-duplication-convergent.ll

AMDGPU: Assume call pseudos are convergent

There should probably be nonconvergent versions, but my guess is it
doesn't matter in practice.

LLVM/llvm 361330llvm/trunk/lib/Target/AMDGPU AMDGPUCallingConv.td, llvm/trunk/test/CodeGen/AMDGPU csr-gfx10.ll

AMDGPU: Fix not marking new gfx10 SGPRs as CSRs

LLVM/llvm 361329cfe/trunk/include/clang/AST Expr.h APValue.h, cfe/trunk/lib/AST ExprConstant.cpp

[c++20] P1330R0: permit simple-assignments that change the active member
of a union within constant expression evaluation.

LLVM/llvm 361328cfe/trunk/include/clang/AST APValue.h, cfe/trunk/include/clang/Basic DiagnosticASTKinds.td

Refactor: split Uninitialized state on APValue into an "Absent" state
representing no such object, and an "Indeterminate" state representing
an uninitialized object. The latter is not yet used, but soon will be.

LLVM/llvm 361327llvm/trunk/lib/Target/WebAssembly WebAssemblyRuntimeLibcallSignatures.cpp, llvm/trunk/test/CodeGen/WebAssembly llround-conv-i32.ll

[WebAssembly] Add the signature for the new llround builtin function

r360889 added new llround builtin functions. This patch adds their
signatures for the WebAssembly backend.

It also adds wasm32 support to utils/update_llc_test_checks.py, since
that's the script other targets are using for their testcases for this
feature.

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

LLVM/llvm 361326compiler-rt/trunk/test/fuzzer merge-sigusr.test

[libFuzzer] Ignore exit status of wait in merge-sigusr.test.

If process $PID has already exited, wait will give a non-zero exit
status.