platform/upstream/llvm.git
5 years ago[lldb] [lit] Use LLDB-like output for XMM registers in write tests
Michal Gorny [Thu, 2 May 2019 12:55:54 +0000 (12:55 +0000)]
[lldb] [lit] Use LLDB-like output for XMM registers in write tests

llvm-svn: 359784

5 years ago[lldb] [lit] Introduce tests for writing YMM registers
Michal Gorny [Thu, 2 May 2019 12:55:44 +0000 (12:55 +0000)]
[lldb] [lit] Introduce tests for writing YMM registers

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

llvm-svn: 359783

5 years ago[X86][SSE] Move shouldUseHorizontalOp inside isHorizontalBinOp. NFCI.
Simon Pilgrim [Thu, 2 May 2019 12:18:24 +0000 (12:18 +0000)]
[X86][SSE] Move shouldUseHorizontalOp inside isHorizontalBinOp. NFCI.

Matches what we do for lowerAddSubToHorizontalOp and will make it easier to peek through subvectors to help fix PR39921

llvm-svn: 359782

5 years ago[llvm-strip]Add --no-strip-all to disable --strip-all behaviour (including default...
James Henderson [Thu, 2 May 2019 11:53:02 +0000 (11:53 +0000)]
[llvm-strip]Add --no-strip-all to disable --strip-all behaviour (including default stripping)

If certain switches are not specified, llvm-strip behaves as if
--strip-all were specified. This means that for testing, when we don't
want the stripping behaviour, we have to specify one of these switches,
which can be confusing. This change adds --no-strip-all to allow an
alternative way of suppressing the default stripping, in a less
confusing manner.

Reviewed by: jakehehrlich, MaskRay

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

llvm-svn: 359781

5 years ago[lldb] [lit] Split 'register read' tests between zmm*, xmm16+, ymm16+
Michal Gorny [Thu, 2 May 2019 11:26:30 +0000 (11:26 +0000)]
[lldb] [lit] Split 'register read' tests between zmm*, xmm16+, ymm16+

Since Darwin target implements support for zmm* registers without
matching support for the respectively added xmm* and ymm* registers,
split the tests for each register group.  To reduce code duplication,
the tests are using the same source file (which sets more registers
than necessary but that should not cause any harm).

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

llvm-svn: 359780

5 years agoAdd std::stack and std::queue support to CxxModuleHandler
Raphael Isemann [Thu, 2 May 2019 11:25:50 +0000 (11:25 +0000)]
Add std::stack and std::queue support to CxxModuleHandler

Reviewers: aprantl, shafik

Reviewed By: aprantl, shafik

Subscribers: lldb-commits

Tags: #c_modules_in_lldb, #lldb

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

llvm-svn: 359779

5 years ago[clangd] Fix code completion of macros defined in the preamble region of the main...
Sam McCall [Thu, 2 May 2019 11:06:44 +0000 (11:06 +0000)]
[clangd] Fix code completion of macros defined in the preamble region of the main file.

Summary:
This is a tricky case (we baked the assumption that symbols come from
the preamble xor mainfile pretty deeply) and the fix is a bit of a hack:
We look at the code to guess the macro names, and deserialize them from
the preamble "by hand".

Reviewers: ilya-biryukov

Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 359778

5 years agoRename Minion to ASTImporterDelegate
Raphael Isemann [Thu, 2 May 2019 10:58:33 +0000 (10:58 +0000)]
Rename Minion to ASTImporterDelegate

Summary:
I think there universal agreement that Minion isn't the best name for this class. This patch renames the class
 to ASTImporterDelegate to better reflect it's goal of monitoring and extending the ASTImporter.

Reviewers: aprantl, shafik, martong, a.sidorin, davide

Reviewed By: aprantl, shafik, davide

Subscribers: rnkovacs, davide, abidh, lldb-commits

Tags: #lldb

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

llvm-svn: 359777

5 years ago[LTO] Migrate typedef to using
Fangrui Song [Thu, 2 May 2019 10:52:34 +0000 (10:52 +0000)]
[LTO] Migrate typedef to using

using has been used in several places in the file. Migrate the rest for consistency.

llvm-svn: 359776

5 years ago[llvm-readobj] Delete and inline relocAddressLess
Fangrui Song [Thu, 2 May 2019 10:49:27 +0000 (10:49 +0000)]
[llvm-readobj] Delete and inline relocAddressLess

It is used only once in COFFDumper.cpp. Deleting it from the public
interface seems better.

llvm-svn: 359775

5 years ago[Object] Change getSectionName() to return Expected<StringRef>
Fangrui Song [Thu, 2 May 2019 10:32:03 +0000 (10:32 +0000)]
[Object] Change getSectionName() to return Expected<StringRef>

Summary:
It currently receives an output parameter and returns
std::error_code. Expected<StringRef> fits for this purpose perfectly.

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

llvm-svn: 359774

5 years agoInject only relevant local variables in the expression evaluation context
Raphael Isemann [Thu, 2 May 2019 10:12:56 +0000 (10:12 +0000)]
Inject only relevant local variables in the expression evaluation context

Summary:
In r259902, LLDB started injecting all the locals in every expression
evaluation. This fixed a bunch of issues, but also caused others, mostly
performance regressions on some codebases. The regressions were bad
enough that we added a setting in r274783 to control the behavior and
we have been shipping with the setting off to avoid the perf regressions.

This patch changes the logic injecting the local variables to only inject
the ones present in the expression typed by the user. The approach is
fairly simple and just scans the typed expression for every local name.
Hopefully this gives us the best of both world as it just realizes the
types of the variables really used by the expression.

Landing this requires the 2 other issues I pointed out today to be addressed
but I wanted to gather comments right away.

Original patch by Frédéric Riss!

Reviewers: jingham, clayborg, friss, shafik

Reviewed By: jingham, clayborg

Subscribers: teemperor, labath, lldb-commits

Tags: #lldb

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

llvm-svn: 359773

5 years ago[ARM GlobalISel] Fixup r359768
Diana Picus [Thu, 2 May 2019 10:08:29 +0000 (10:08 +0000)]
[ARM GlobalISel] Fixup r359768

Get rid of local variable used only in assertion.

llvm-svn: 359772

5 years ago[clangd] Improvements to header mapping: more precise parsing of cppreference symbol...
Sam McCall [Thu, 2 May 2019 09:34:30 +0000 (09:34 +0000)]
[clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

Summary:
Previously we were just jumping from the symbol index to the symbol page, and
grabbing all the headers mentioned there. But the page often lists multiple
symbols, and so we got false positives and thus ambiguities (which were dropped).

Now we look at which declarations are for the symbol we want, and prefer headers
listed above that symbol. If there are none, we fall back to the old behavior.

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 359771

5 years ago[clangd] Standard library mapping: prefer "primary" versions of functions over variants.
Sam McCall [Thu, 2 May 2019 09:31:24 +0000 (09:31 +0000)]
[clangd] Standard library mapping: prefer "primary" versions of functions over variants.

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 359770

5 years ago[ELF] Delete a cant-write test from test/lto/thinlto-index-only.ll
Fangrui Song [Thu, 2 May 2019 09:29:24 +0000 (09:29 +0000)]
[ELF] Delete a cant-write test from test/lto/thinlto-index-only.ll

The test is performed by thinlto-cant-write-index.ll

llvm-svn: 359769

5 years ago[ARM GlobalISel] Select extensions to < 32 bits
Diana Picus [Thu, 2 May 2019 09:28:00 +0000 (09:28 +0000)]
[ARM GlobalISel] Select extensions to < 32 bits

Select G_SEXT and G_ZEXT with destination types smaller than 32 bits in
the exact same way as 32 bits. This overwrites the higher bits, but that
should be ok since all legal users of types smaller than 32 bits ignore
those bits anyway.

llvm-svn: 359768

5 years ago[ARM GlobalISel] Rename some inst selector tests. NFC
Diana Picus [Thu, 2 May 2019 09:24:47 +0000 (09:24 +0000)]
[ARM GlobalISel] Rename some inst selector tests. NFC

Prepare to add support for extensions to types smaller than 32 bits.

llvm-svn: 359767

5 years ago[ARM GlobalISel] Legalize extensions to < 32 bits
Diana Picus [Thu, 2 May 2019 09:21:46 +0000 (09:21 +0000)]
[ARM GlobalISel] Legalize extensions to < 32 bits

Make it legal to extend from e.g. s1 to s8 or s16.

llvm-svn: 359766

5 years agoFix MSVC build
Pavel Labath [Thu, 2 May 2019 08:52:06 +0000 (08:52 +0000)]
Fix MSVC build

Address an ambiguity between lldb_private::Thread and
llvm::minidump::Thread. Follow-up to llvm r359762 (which introduced the
second type).

llvm-svn: 359765

5 years ago[NFC][PowerPC] Return early if the element type is not byte-sized in combineBVOfConse...
Kang Zhang [Thu, 2 May 2019 08:15:13 +0000 (08:15 +0000)]
[NFC][PowerPC] Return early if the element type is not byte-sized in combineBVOfConsecutiveLoads

Summary:
Based on the Eli Friedman's comments in https://reviews.llvm.org/D60811 , we'd better return early if the element type is not byte-sized in `combineBVOfConsecutiveLoads`.

Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D61076

llvm-svn: 359764

5 years ago[clangd] Restore conventional names for lit configs, and .in/.py split. Fix build_mod...
Sam McCall [Thu, 2 May 2019 08:00:39 +0000 (08:00 +0000)]
[clangd] Restore conventional names for lit configs, and .in/.py split. Fix build_mode indirection.

llvm-svn: 359763

5 years agoObject/Minidump: Add support for the ThreadList stream
Pavel Labath [Thu, 2 May 2019 07:45:42 +0000 (07:45 +0000)]
Object/Minidump: Add support for the ThreadList stream

Summary:
The stream contains the list of threads belonging to the process
described by the minidump. Its structure is the same as the ModuleList
stream, and in fact, I have generalized the ModuleList reading code to
handle this stream too.

Reviewers: amccarth, jhenderson, clayborg

Subscribers: llvm-commits, lldb-commits, markmentovai, zturner

Tags: #llvm

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

llvm-svn: 359762

5 years agoFix typo in test case.
Akira Hatanaka [Thu, 2 May 2019 07:38:07 +0000 (07:38 +0000)]
Fix typo in test case.

llvm-svn: 359761

5 years agoFix for Windows
Stephan Bergmann [Thu, 2 May 2019 07:05:29 +0000 (07:05 +0000)]
Fix for Windows

...after 5745eccef54ddd3caca278d1d292a88b2281528b "Adapt -fsanitize=function to
SANITIZER_NON_UNIQUE_TYPEINFO"

llvm-svn: 359760

5 years agoAdapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO
Stephan Bergmann [Thu, 2 May 2019 06:40:33 +0000 (06:40 +0000)]
Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO

This follows up after b7692bc3e9ad2691fc07261904b88fb15f30696b "[UBSan] Fix
isDerivedFromAtOffset on iOS ARM64" fixed the RTTI comparison in
isDerivedFromAtOffset on just one platform and then
a25a2c7c9a7e1e328a5bd8274d2d86b1fadc4692 "Always compare C++ typeinfo (based on
libstdc++ implementation)" extended that fix to more platforms.

But there is another RTTI comparison for -fsanitize=function generated in
clang's CodeGenFunction::EmitCall as just a pointer comparison.  For
SANITIZER_NON_UNIQUE_TYPEINFO platforms this needs to be extended to also do
string comparison.  For that, __ubsan_handle_function_type_mismatch[_abort]
takes the two std::type_info pointers as additional parameters now, checks them
internally for potential equivalence, and returns without reporting failure if
they turn out to be equivalent after all.  (NORETURN needed to be dropped from
the _abort variant for that.)  Also these functions depend on ABI-specific RTTI
now, so needed to be moved from plain UBSAN_SOURCES (ubsan_handlers.h/cc) to
UBSAN_CXXABI_SOURCES (ubsan_handlers_cxx.h/cc), but as -fsanitize=function is
only supported in C++ mode that's not a problem.

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

llvm-svn: 359759

5 years ago[Support] Don't check MAP_ANONYMOUS, just use MAP_ANON
Fangrui Song [Thu, 2 May 2019 05:58:09 +0000 (05:58 +0000)]
[Support] Don't check MAP_ANONYMOUS, just use MAP_ANON

Though being marked "deprecated" by the Linux man-pages project
(MAP_ANON is a synonym of MAP_ANONYMOUS), it is the mostly widely
available macro - many systems that don't provide MAP_ANONYMOUS have
MAP_ANON. MAP_ANON is also used here and there in compiler-rt.

llvm-svn: 359758

5 years ago[AMDGPU] gfx1010 lost VOP2 forms of some add/sub
Stanislav Mekhanoshin [Thu, 2 May 2019 04:26:35 +0000 (04:26 +0000)]
[AMDGPU] gfx1010 lost VOP2 forms of some add/sub

Add legalization of V_ADD_I32, V_SUB_I32, V_SUBREV_I32.

Differential Revision:

llvm-svn: 359757

5 years ago[AMDGPU] gfx1010 allows VOP3 to have a literal
Stanislav Mekhanoshin [Thu, 2 May 2019 04:01:39 +0000 (04:01 +0000)]
[AMDGPU] gfx1010 allows VOP3 to have a literal

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

llvm-svn: 359756

5 years ago[libcxx] cmake - guard list remove
Brian Cain [Thu, 2 May 2019 03:49:50 +0000 (03:49 +0000)]
[libcxx] cmake - guard list remove

REMOVE_ITEM fails if CMAKE_REQUIRED_LIBRARIES is empty on some
versions of cmake.

llvm-svn: 359755

5 years ago[AMDGPU] gfx1010 constant bus limit
Stanislav Mekhanoshin [Thu, 2 May 2019 03:47:23 +0000 (03:47 +0000)]
[AMDGPU] gfx1010 constant bus limit

Constant bus limit has increased to 2 with GFX10.

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

llvm-svn: 359754

5 years ago[X86] Remove the redundant suffix in vfpclassp[d,s]'s broadcasting variant
Craig Topper [Thu, 2 May 2019 03:25:50 +0000 (03:25 +0000)]
[X86] Remove the redundant suffix in vfpclassp[d,s]'s broadcasting variant

The broadcasting variant for instruction vfpclassp[d,s] shouldn't use suffix q/l. So remove them from the template.

Patch by Pengfei Wang

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

llvm-svn: 359753

5 years agoMention the thread-format & frame-format settings in help.
Jim Ingham [Thu, 2 May 2019 02:14:08 +0000 (02:14 +0000)]
Mention the thread-format & frame-format settings in help.

You can only find out about this useful customization by browsing
the settings list output or the llvm.org web pages.  Mention it
in the help for thread list, thread backtrace & _regex_bt commands
to make it more discoverable.

llvm-svn: 359752

5 years ago[test] Convert TestWatchpointSetErrorCases.py to lit
Jonas Devlieghere [Thu, 2 May 2019 01:54:05 +0000 (01:54 +0000)]
[test] Convert TestWatchpointSetErrorCases.py to lit

This test is flaky on GreenDragon. Since it was a pexpect test and
straightforward enough to convert, I went ahead and converted it to a
lit test.

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

llvm-svn: 359751

5 years ago[CommandObjectCommands] Honor stop-command-source-on-error
Jonas Devlieghere [Thu, 2 May 2019 01:54:02 +0000 (01:54 +0000)]
[CommandObjectCommands] Honor stop-command-source-on-error

This patch ensures that we honor the stop-command-source-on-error
setting from `command source`. The problem is that we didn't
differentiate between the boolean value being true or false, or not
being set. For the latter scenario, we should calculate the value in the
command interpreter based on the global options.

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

llvm-svn: 359750

5 years agolld-link: Make "duplicate resource" error message a bit more concise
Nico Weber [Thu, 2 May 2019 01:52:24 +0000 (01:52 +0000)]
lld-link: Make "duplicate resource" error message a bit more concise

Reduces the error message from:
    lld-link: error: failed to parse .res file: duplicate resource: type STRINGTABLE (ID 6)/name ID 3/language 1033, in test1.res and in test2.res

To:
    lld-link: error: duplicate resource: type STRINGTABLE (ID 6)/name ID 3/language 1033, in test1.res and in test2.res

Make sure every error message emitted by cvtres contains the name of at
least one ".res" file, so that removing the "failed to parse .res file"
string doesn't lose information.

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

llvm-svn: 359749

5 years ago[CMake] Remove EmulateInstructionMIPS dependency on Interpreter
Alex Langford [Thu, 2 May 2019 01:10:38 +0000 (01:10 +0000)]
[CMake] Remove EmulateInstructionMIPS dependency on Interpreter

llvm-svn: 359748

5 years agoReplace ad-hoc tracking of pattern for an instantiated class-scope
Richard Smith [Thu, 2 May 2019 00:49:14 +0000 (00:49 +0000)]
Replace ad-hoc tracking of pattern for an instantiated class-scope
explicit function specialization with the MemberSpecializationInfo used
everywhere else.

Not NFC: the ad-hoc pattern tracking was not being serialized /
deserialized properly. That's fixed here.

llvm-svn: 359747

5 years agoDiagnose non-dependent qualified friend function template declarations
Richard Smith [Thu, 2 May 2019 00:49:05 +0000 (00:49 +0000)]
Diagnose non-dependent qualified friend function template declarations
that don't match any existing declaration. Don't get confused and treat
such declarations as template *specializations*.

llvm-svn: 359746

5 years agoDelete trailing \r. NFC
Fangrui Song [Thu, 2 May 2019 00:39:03 +0000 (00:39 +0000)]
Delete trailing \r. NFC

llvm-svn: 359745

5 years ago[COFF, ARM64] Align global symbol by size for ARM64 MSVC ABI
Tom Tan [Thu, 2 May 2019 00:38:14 +0000 (00:38 +0000)]
[COFF, ARM64] Align global symbol by size for ARM64 MSVC ABI

According to alignment section in below ARM64 ABI document, MSVC could increase
alignment of global data based on its total size. Clang doesn't do this. Compile
the same symbol into different alignments by Clang and MSVC could cause link
error because some instruction encodings, like 64-bit LDR/STR with immediate,
require the target to be 8 bytes aligned, and linker could choose code stream
with such LDR/STR instruction from MSVC and 4 bytes aligned data from Clang into
final image, which actually cannot be linked together
(see https://bugs.llvm.org/show_bug.cgi?id=41506 for more details).

https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=vs-2019#alignment

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

llvm-svn: 359744

5 years agoremove inalloca parameters in globalopt and simplify argpromotion
Bob Haarman [Thu, 2 May 2019 00:37:36 +0000 (00:37 +0000)]
remove inalloca parameters in globalopt and simplify argpromotion

Summary:
Inalloca parameters require special handling in some optimizations.
This change causes globalopt to strip the inalloca attribute from
function parameters when it is safe to do so, removes the special
handling for inallocas from argpromotion, and replaces it with a
simple check that causes argpromotion to skip functions that receive
inallocas (for when the pass is invoked on code that didn't run
through globalopt first). This also avoids a case where argpromotion
would incorrectly try to pass an inalloca in a register.

Fixes PR41658.

Reviewers: rnk, efriedma

Reviewed By: rnk

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 359743

5 years ago[FileCheck] Fix line-count.txt test
Thomas Preud'homme [Thu, 2 May 2019 00:04:44 +0000 (00:04 +0000)]
[FileCheck] Fix line-count.txt test

Summary: Enable currently skipped diagnostic test and fix column number

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

Tags: #llvm

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

llvm-svn: 359742

5 years agoFileCheck [4/12]: Introduce @LINE numeric expressions
Thomas Preud'homme [Thu, 2 May 2019 00:04:38 +0000 (00:04 +0000)]
FileCheck [4/12]: Introduce @LINE numeric expressions

Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch introduces the @LINE numeric
expressions.

This commit introduces a new syntax to express a relation a numeric
value in the input text must have with the line number of a given CHECK
pattern: [[#<@LINE numeric expression>]]. Further commits build on that
to express relations between several numeric values in the input text.
To help with naming, regular variables are renamed into pattern
variables and old @LINE expression syntax is referred to as legacy
numeric expression.

Compared to existing @LINE expressions, this new syntax allow arbitrary
spacing between the component of the expression. It offers otherwise the
same functionality but the commit serves to introduce some of the data
structure needed to support more general numeric expressions.

Copyright:
    - Linaro (changes up to diff 183612 of revision D55940)
    - GraphCore (changes in later versions of revision D55940 and
                 in new revision created off D55940)

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

Tags: #llvm

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

llvm-svn: 359741

5 years agoConsume unexpected "template" keywords after "using"
Richard Trieu [Wed, 1 May 2019 23:33:49 +0000 (23:33 +0000)]
Consume unexpected "template" keywords after "using"

The parser was dealing with unexpected "template" keywords after "using"
keywords too late and putting the parser into the wrong state, which could
lead to a crash down the line.  This change allows the parser to consume the
bad "template" keywords earlier, and continue parsing as if "template" was
never there to begin with for better error recovery.

llvm-svn: 359740

5 years agoRevert r359717, "Make check-clang depend on the clang-check binary always"
Nico Weber [Wed, 1 May 2019 23:32:38 +0000 (23:32 +0000)]
Revert r359717, "Make check-clang depend on the clang-check binary always"

The Tooling tests do have a lit.local.cfg with

    if not config.root.clang_staticanalyzer:
        config.unsupported = True

so what's wrong isn't the missing dep, but that lit prints a warning for
the binary missing. This will need a different kind of fix.

llvm-svn: 359739

5 years agolldb-server: remove link against lldbInterpreter
Saleem Abdulrasool [Wed, 1 May 2019 23:06:45 +0000 (23:06 +0000)]
lldb-server: remove link against lldbInterpreter

This dependency is unused. Remove the extraneous link.

llvm-svn: 359738

5 years agoFix erroneous flag in GISel line for arm64-fast-isel-materialize.ll
Jessica Paquette [Wed, 1 May 2019 22:50:11 +0000 (22:50 +0000)]
Fix erroneous flag in GISel line for arm64-fast-isel-materialize.ll

Accidentally put a fast-isel-abort=2 instead of the GISel abort line.

This test doesn't actually fall back at all for GISel though, so remove the
fallback checks entirely.

llvm-svn: 359737

5 years ago[PGO][CHR] A bug fix.
Hiroshi Yamauchi [Wed, 1 May 2019 22:49:52 +0000 (22:49 +0000)]
[PGO][CHR] A bug fix.

Summary: Fix a transformation bug where two scopes share a common instrution to hoist.

Reviewers: davidxl

Reviewed By: davidxl

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 359736

5 years ago[ORC] Pass object buffer ownership back in NotifyEmitted.
Lang Hames [Wed, 1 May 2019 22:40:23 +0000 (22:40 +0000)]
[ORC] Pass object buffer ownership back in NotifyEmitted.

Clients who want to regain ownership of object buffers after they have been
linked may now use the NotifyEmitted callback for this purpose.

Note: Currently NotifyEmitted is only called if linking succeeds. If linking
fails the buffer is always discarded.

llvm-svn: 359735

5 years ago[GlobalISel][AArch64] Use fmov for G_FCONSTANT when possible
Jessica Paquette [Wed, 1 May 2019 22:39:43 +0000 (22:39 +0000)]
[GlobalISel][AArch64] Use fmov for G_FCONSTANT when possible

This adds support for using fmov rather than a standard mov to materialize
G_FCONSTANT when it's safe to do so.

Update arm64-fast-isel-materialize.ll and select-constant.mir to show that the
selection is correct.

llvm-svn: 359734

5 years ago[compiler-rt][tests] Propagate COMPILER_RT_UNITTEST_LINK_FLAGS
Hubert Tong [Wed, 1 May 2019 22:25:16 +0000 (22:25 +0000)]
[compiler-rt][tests] Propagate COMPILER_RT_UNITTEST_LINK_FLAGS

`COMPILER_RT_UNITTEST_LINK_FLAGS` is dropped in many places, unlike
`COMPILER_RT_UNITTEST_CFLAGS`. This patch attempts to remove that
inconsistency.

Previously reviewed as part of D58951.

Reviewers: sfertile, peter.smith, pzheng, phosek, Hahnfeld, nemanjai, jasonliu

Reviewed By: sfertile

Subscribers: jsji, kubamracek, dberris, mgorny, delcypher, jdoerfert, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 359733

5 years agoSet a CXXRecordDecl to not be passed in registers if DW_CC_pass_by_reference when...
Shafik Yaghmour [Wed, 1 May 2019 22:23:06 +0000 (22:23 +0000)]
Set a CXXRecordDecl to not be passed in registers if DW_CC_pass_by_reference when loading from DWARF

Summary:
This will fix a bug where during expression parsing we are not setting a CXXRecordDecl to not be passed in registers and the resulting code generation is wrong.
The DWARF attribute DW_CC_pass_by_reference tells us that we should not be passing in registers i.e. RAA_Indirect.
This change depends this clang change which fixes the fact that the ASTImporter does not copy RecordDeclBits for CXXRecordDecl: https://reviews.llvm.org/D61140

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

llvm-svn: 359732

5 years ago[tsan] Fix and re-enable user_malloc.cc test
Vitaly Buka [Wed, 1 May 2019 21:53:39 +0000 (21:53 +0000)]
[tsan] Fix and re-enable user_malloc.cc test

Summary: no_sanitize_thread is not enough as it still puts some tsan instrumentation

Reviewers: eugenis

Subscribers: kubamracek, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 359731

5 years ago[lldb-server] Remove lldb-server's dependency on Core
Alex Langford [Wed, 1 May 2019 21:41:40 +0000 (21:41 +0000)]
[lldb-server] Remove lldb-server's dependency on Core

No need to directly link against Core, as lldb-server doesn't directly
use it.

llvm-svn: 359730

5 years ago[sanitizer][NFC] Remove unneeded SizeClassAllocatorLocalCache
Vitaly Buka [Wed, 1 May 2019 21:23:07 +0000 (21:23 +0000)]
[sanitizer][NFC] Remove unneeded SizeClassAllocatorLocalCache

llvm-svn: 359729

5 years ago[sanitizer][NFC] Add const/static into a couple of methods
Vitaly Buka [Wed, 1 May 2019 21:22:59 +0000 (21:22 +0000)]
[sanitizer][NFC] Add const/static into a couple of methods

llvm-svn: 359728

5 years ago[analyzer] Fix buildbot failures caused by a forgotten initialization
Kristof Umann [Wed, 1 May 2019 21:09:32 +0000 (21:09 +0000)]
[analyzer] Fix buildbot failures caused by a forgotten initialization

llvm-svn: 359727

5 years agoAdd missing locale requirement to test.
Dan Albert [Wed, 1 May 2019 21:02:32 +0000 (21:02 +0000)]
Add missing locale requirement to test.

Linux is failing even though the test runner does report this locale
is available, but the test still isn't expected to work on platforms
without the locale (like Android).

llvm-svn: 359726

5 years ago[Sanitizer] Reland "Cleanup INTERCEPT_FUNCTION macro"
Julian Lettner [Wed, 1 May 2019 20:57:59 +0000 (20:57 +0000)]
[Sanitizer] Reland "Cleanup INTERCEPT_FUNCTION macro"

On Linux both version of the INTERCEPT_FUNCTION macro now return true
when interception was successful. Adapt and cleanup some usages.

Also note that `&(func) == &WRAP(func)` is a link-time property, but we
do a runtime check.

Tested on Linux and macOS.

Previous attempt reverted by: 5642c3feb03d020dc06a62e3dc54f3206a97a391

This attempt to bring order to the interceptor macro goes the other
direction and aligns the Linux implementation with the way things are
done on Windows.

Reviewed By: vitalybuka, rnk

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

llvm-svn: 359725

5 years agoDisable queues_with_libBacktraceRecording
Jonas Devlieghere [Wed, 1 May 2019 20:37:05 +0000 (20:37 +0000)]
Disable queues_with_libBacktraceRecording

After multiple attempts from both Fred and Adrian, this variant of the
test is still flaky on GreenDragon. This commit disables it while we
continue investigate.

llvm-svn: 359724

5 years ago[AArch64] Add tests for bool vector reductions; NFC
Nikita Popov [Wed, 1 May 2019 20:18:36 +0000 (20:18 +0000)]
[AArch64] Add tests for bool vector reductions; NFC

Baseline tests for PR41635.

llvm-svn: 359723

5 years agoMake clang/utils/creduce-clang-crash.py executable
Reid Kleckner [Wed, 1 May 2019 20:15:39 +0000 (20:15 +0000)]
Make clang/utils/creduce-clang-crash.py executable

llvm-svn: 359722

5 years agoTry to unbreak sphinx bot after r359714
Nico Weber [Wed, 1 May 2019 20:00:45 +0000 (20:00 +0000)]
Try to unbreak sphinx bot after r359714

The now-correctly-referenced label dbi_type_server_map_substream didn't
exist. Rewrite things a bit after looking at NewDBIHdr in dbi.h and its
use in dbi.cpp in the reference implementation.

llvm-svn: 359721

5 years ago[analyzer] Don't display implementation checkers under -analyzer-checker-help, but...
Kristof Umann [Wed, 1 May 2019 19:56:47 +0000 (19:56 +0000)]
[analyzer] Don't display implementation checkers under -analyzer-checker-help, but do under the new flag -analyzer-checker-help-hidden

During my work on analyzer dependencies, I created a great amount of new
checkers that emitted no diagnostics at all, and were purely modeling some
function or another.

However, the user shouldn't really disable/enable these by hand, hence this
patch, which hides these by default. I intentionally chose not to hide alpha
checkers, because they have a scary enough name, in my opinion, to cause no
surprise when they emit false positives or cause crashes.

The patch introduces the Hidden bit into the TableGen files (you may remember
it before I removed it in D53995), and checkers that are either marked as
hidden, or are in a package that is marked hidden won't be displayed under
-analyzer-checker-help. -analyzer-checker-help-hidden, a new flag meant for
developers only, displays the full list.

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

llvm-svn: 359720

5 years ago[sanitizer][NFC] Set LargeMmapAllocator type from PrimaryAllocator
Vitaly Buka [Wed, 1 May 2019 19:41:54 +0000 (19:41 +0000)]
[sanitizer][NFC] Set LargeMmapAllocator type from PrimaryAllocator

They need to have same AddressSpaceView and MapUnmapCallback.

Reviewers: eugenis

Subscribers: kubamracek, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 359719

5 years ago[scudo][NFC] Remove unneeded template from scudo::CombinedAllocator
Vitaly Buka [Wed, 1 May 2019 19:36:26 +0000 (19:36 +0000)]
[scudo][NFC] Remove unneeded template from scudo::CombinedAllocator

Reviewers: cryptoad, eugenis

Reviewed By: cryptoad

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 359718

5 years agoMake check-clang depend on the clang-check binary always
Nico Weber [Wed, 1 May 2019 19:34:00 +0000 (19:34 +0000)]
Make check-clang depend on the clang-check binary always

check-clang (the target that runs all clang tests) used to
only depend on clang-check (a binary like clang-tidy,
clang-refactor, etc) if the static analyzer is enabled.
However, several lit tests call clang-check unconditionally,
so always depend on it.

Fixes a "could not find clang-check" lit warning in clean builds with
the static analyzer disabled.

Also sort the deps in the CMake file and put just one dep on each line.

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

llvm-svn: 359717

5 years agoEnable OpenMP build for 32-bit FreeBSD
Dimitry Andric [Wed, 1 May 2019 19:32:58 +0000 (19:32 +0000)]
Enable OpenMP build for 32-bit FreeBSD

Summary:
To be able to successfully build OpenMP on 32-bit FreeBSD, such as
FreeBSD/i386, I first had to provide a few wrappers (see D60916), and
then add `KMP_OS_FREEBSD` to the list of defines checked for 32-bit
architectures in `kmp_runtime.cpp`.

I have successfully built libomp.so and ran a bunch of test programs on
FreeBSD/i386 with this.

See also https://svnweb.freebsd.org/changeset/base/345283

Reviewers: emaste, jlpeyton, Hahnfeld

Reviewed By: jlpeyton

Subscribers: krytarowski, guansong, jdoerfert, openmp-commits, llvm-commits

Tags: #openmp

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

llvm-svn: 359716

5 years ago[sanitizer][NFC] Get type of AllocatorCache from CombinedAllocator
Vitaly Buka [Wed, 1 May 2019 19:30:49 +0000 (19:30 +0000)]
[sanitizer][NFC] Get type of AllocatorCache from CombinedAllocator

Reviewers: eugenis, cryptoad, kcc

Reviewed By: kcc

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

Tags: #sanitizers, #llvm

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

llvm-svn: 359715

5 years agoMinor tweaks to PDB docs
Nico Weber [Wed, 1 May 2019 19:29:30 +0000 (19:29 +0000)]
Minor tweaks to PDB docs

- Fix a broken link
- Some spelling fixes
- Remove an unnecessary "amortized"
- Don't say "log(n) random access"; "random access" means O(1)
- Make MSF overview a bit more concise

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

llvm-svn: 359714

5 years ago[Parser] Avoid correcting delayed typos in array subscript multiple times.
Volodymyr Sapsai [Wed, 1 May 2019 19:24:50 +0000 (19:24 +0000)]
[Parser] Avoid correcting delayed typos in array subscript multiple times.

We correct some typos in `ActOnArraySubscriptExpr` and
`ActOnOMPArraySectionExpr`, so when their result is `ExprError`, we can
end up correcting delayed typos in the same expressions again. In
general it is OK but when `NumTypos` is incorrect, we can hit the
assertion

> Assertion failed: (Entry != DelayedTypos.end() && "Failed to get the state for a TypoExpr!"), function getTypoExprState, file clang/lib/Sema/SemaLookup.cpp, line 5219.

Fix by replacing some subscript `ExprResult` with typo-corrected expressions
instead of keeping the original expressions. Thus if original expressions
contained `TypoExpr`, we'll use corrected expressions instead of trying to
correct them again.

rdar://problem/47403222

Reviewers: rsmith, erik.pilkington, majnemer

Reviewed By: erik.pilkington

Subscribers: jkorous, dexonsmith, cfe-commits

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

llvm-svn: 359713

5 years agoConvert PDB docs to unix line endings. No other changes.
Nico Weber [Wed, 1 May 2019 19:15:05 +0000 (19:15 +0000)]
Convert PDB docs to unix line endings. No other changes.

llvm-svn: 359712

5 years ago[clang-format] Fix a bug in AlignConsecutiveDeclarations.
Owen Pan [Wed, 1 May 2019 18:23:44 +0000 (18:23 +0000)]
[clang-format] Fix a bug in AlignConsecutiveDeclarations.

Fixes PR37175

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

llvm-svn: 359711

5 years ago[OpenMP] Implement task modifier for reduction clause
Jonathan Peyton [Wed, 1 May 2019 17:54:01 +0000 (17:54 +0000)]
[OpenMP] Implement task modifier for reduction clause

Implemented task modifier in two versions - one without taking into account
omp_orig variable (the omp_orig still can be processed by compiler without help
of the library, but each reduction object will need separate initializer with
global access to omp_orig), another with omp_orig variable included into
interface (single initializer can be used for multiple reduction objects of
the same type). Second version can be used when the omp_orig is not globally
accessible, or to optimize code in case of multiple reduction objects
of the same type.

Patch by Andrey Churbanov

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

llvm-svn: 359710

5 years ago[PowerPC] add test that could infinite loop with reordered transforms; NFC
Sanjay Patel [Wed, 1 May 2019 17:34:30 +0000 (17:34 +0000)]
[PowerPC] add test that could infinite loop with reordered transforms; NFC

This is a slightly reduced version of the test from D61384.
Adding this as a preliminary step, so I can update D61149 with
the proposed fix.

llvm-svn: 359709

5 years ago[sanitizer] Implement reallocarray.
Evgeniy Stepanov [Wed, 1 May 2019 17:33:01 +0000 (17:33 +0000)]
[sanitizer] Implement reallocarray.

Summary:
It's a cross of calloc and realloc. Sanitizers implement calloc-like check for size
overflow.

Reviewers: vitalybuka, kcc

Subscribers: kubamracek, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 359708

5 years ago[X86][SSE] Fold scalar horizontal add/sub for non-0/1 element extractions
Simon Pilgrim [Wed, 1 May 2019 17:13:35 +0000 (17:13 +0000)]
[X86][SSE] Fold scalar horizontal add/sub for non-0/1 element extractions

We already perform horizontal add/sub if we extract from elements 0 and 1, this patch extends it to non-0/1 element extraction indices (as long as they are from the lowest 128-bit vector).

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

llvm-svn: 359707

5 years ago[Driver] Explicitly request platform rtlib in the Driver pic test
Petr Hosek [Wed, 1 May 2019 16:52:45 +0000 (16:52 +0000)]
[Driver] Explicitly request platform rtlib in the Driver pic test

This test checks whether crtbegin.o and crtend.o appear on the link
line, but names of these files may be affected by the choice of the
rtlib, specifically when compiler-rt is used as the default rtlib
the names will be clang_rt.crtbegin.o and clang_rt.crtend.o instead
of crtbeginS.o and crtendS.o. To avoid the test failure, explicitly
request to use the platform rtlib.

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

llvm-svn: 359706

5 years ago[globalisel] Update the legalizer documentation
Daniel Sanders [Wed, 1 May 2019 16:52:29 +0000 (16:52 +0000)]
[globalisel] Update the legalizer documentation

Summary:
* The getActionDefinitionsBuilder() is now documented.
  * Includes descriptions of the various actions (legal*, widenScalar*, lower*,
    etc).
  * Includes descriptions of the various predicates (*If, *For,
    *ForCartesianProduct, etc.)
  * Includes the rule-order details
* Removed the out-of-date prohibition on non-power-of-2 types.
* Removed the Vector types section since it was incorrect and vectors follow the
  same ruleset as scalars. They're only special in the sense that more of the
  actions and predicates are meaningful for them (e.g. moreElements).
* Clarified the position on context sensitive legality (which is not permitted)
  and contrasted this with context sensitive legalization (which is permitted).

Reviewers: bogner, aditya_nandakumar, volkan, aemerson, paquette, arsenm

Reviewed By: paquette

Subscribers: wdng, rovka, kristof.beyls, jfb, Petar.Avramovic, llvm-commits

Tags: #llvm

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

llvm-svn: 359705

5 years ago[AMDGPU] gfx1010 GCNRegBankReassign pass
Stanislav Mekhanoshin [Wed, 1 May 2019 16:49:31 +0000 (16:49 +0000)]
[AMDGPU] gfx1010 GCNRegBankReassign pass

Reassign registers to reduce register bank conflicts.

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

llvm-svn: 359704

5 years ago[WebAssembly] WASI support for libcxx
Dan Gohman [Wed, 1 May 2019 16:47:30 +0000 (16:47 +0000)]
[WebAssembly] WASI support for libcxx

This adds explicit support for the WASI platform to libcxx.

WASI libc uses some components from musl, however it's not fully compatible
with musl, so we're planning to stop using _LIBCPP_HAS_MUSL_LIBC and
customize for WASI libc specifically.

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

Reviewers: sbc100, ldionne
llvm-svn: 359703

5 years agoBump DIAG_SIZE_SEMA, as we've hit it.
Scott Linder [Wed, 1 May 2019 16:45:49 +0000 (16:45 +0000)]
Bump DIAG_SIZE_SEMA, as we've hit it.

$ grep 'DIAG_SIZE_SEMA          =' include/clang/Basic/DiagnosticIDs.h
      DIAG_SIZE_SEMA          = 4000,
$ grep DIAG $(build)/tools/clang/include/clang/Basic/DiagnosticSemaKinds.inc | wc -l
3499

llvm-svn: 359702

5 years agoOption spell checking: Penalize delimiter flags if input has no argument
Nico Weber [Wed, 1 May 2019 16:45:15 +0000 (16:45 +0000)]
Option spell checking: Penalize delimiter flags if input has no argument

If the user passes a flag like `-version` to a program, it's more likely
they mean `--version` than `-version:`, since there's no parameter
passed. Hence, give delimited arguments a penalty of 1 if the user input
doesn't contain the delimiter or no data after it.

The motivation is that with this, lld-link can suggest "--version"
instead of "-version:" for "-version" and "-nodefaultlib" instead of
"-nodefaultlib:" for "-nodefaultlibs".

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

llvm-svn: 359701

5 years ago[AMDGPU] gfx1010 GCNNSAReassign pass
Stanislav Mekhanoshin [Wed, 1 May 2019 16:40:49 +0000 (16:40 +0000)]
[AMDGPU] gfx1010 GCNNSAReassign pass

Convert NSA into non-NSA images.

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

llvm-svn: 359700

5 years agoDisabling test in TestClassTemplateParameterPack.py until we do template lookup correctly
Shafik Yaghmour [Wed, 1 May 2019 16:39:31 +0000 (16:39 +0000)]
Disabling test in TestClassTemplateParameterPack.py until we do template lookup correctly

Summary:
Some tests currently only work because we are pulling all the local variables when we are evaluating an expression. This will soon
change and these test are working but for the wrong reasons. The details can be found in the discussion here:
http://lists.llvm.org/pipermail/lldb-commits/Week-of-Mon-20180507/040689.html

Differential Review:  https://reviews.llvm.org/D61266

llvm-svn: 359699

5 years ago[AMDGPU] gfx1010 MIMG implementation
Stanislav Mekhanoshin [Wed, 1 May 2019 16:32:58 +0000 (16:32 +0000)]
[AMDGPU] gfx1010 MIMG implementation

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

llvm-svn: 359698

5 years ago[ThinLTO] Fix unreachable code when parsing summary entries.
Teresa Johnson [Wed, 1 May 2019 16:26:59 +0000 (16:26 +0000)]
[ThinLTO] Fix unreachable code when parsing summary entries.

Summary:
Early returns were causing some code to be skipped. This was missed
since the summary entries are typically at the end of the llvm assembly
file.

Fixes PR41663.

Reviewers: RKSimon, wristow

Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits

Tags: #llvm

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

llvm-svn: 359697

5 years ago[AMDGPU] gfx1010 DS implementation
Stanislav Mekhanoshin [Wed, 1 May 2019 16:11:11 +0000 (16:11 +0000)]
[AMDGPU] gfx1010 DS implementation

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

llvm-svn: 359696

5 years agoRevert "[DAGCombiner] try repeated fdiv divisor transform before building estimate"
Sanjay Patel [Wed, 1 May 2019 16:06:21 +0000 (16:06 +0000)]
Revert "[DAGCombiner] try repeated fdiv divisor transform before building estimate"

This reverts commit fb9a5307a94e6f1f850e4d89f79103b123f16279 (rL359398)
because it can cause an infinite loop due to opposing combines.

llvm-svn: 359695

5 years agoFix 80 column violation. NFCI.
Simon Pilgrim [Wed, 1 May 2019 16:01:49 +0000 (16:01 +0000)]
Fix 80 column violation. NFCI.

llvm-svn: 359694

5 years ago[SCEV] Use isKnownViaNonRecursiveReasoning for smax simplification
Keno Fischer [Wed, 1 May 2019 15:58:24 +0000 (15:58 +0000)]
[SCEV] Use isKnownViaNonRecursiveReasoning for smax simplification

Summary:
Commit
rL331949: SCEV] Do not use induction in isKnownPredicate for simplification umax

changed the codepath for umax from isKnownPredicate to
isKnownViaNonRecursiveReasoning to avoid compile time blow up (and as
I found out also stack overflows). However, there is an exact copy of
the code for umax that was lacking this change. In D50167 I want to unify
these codepaths, but to avoid that being a behavior change for the smax
case, pull this independent bit out of it.

Reviewed By: sanjoy
Differential Revision: https://reviews.llvm.org/D61166

llvm-svn: 359693

5 years ago[analyzer][tests][NFC] Add EOF newlines, normalize reference expected files
Hubert Tong [Wed, 1 May 2019 15:57:00 +0000 (15:57 +0000)]
[analyzer][tests][NFC] Add EOF newlines, normalize reference expected files

Reference expected files not ending with a newline are normalized to
have said newlines. Additionally `plist-macros-with-expansion.cpp.plist`
is modified to add a line that is ignored by `%diff_plist`, but not by
the more sensitive pattern proposed by
http://lists.llvm.org/pipermail/cfe-dev/2019-April/061904.html for
`%normalize_plist`.

llvm-svn: 359692

5 years ago[analyzer][tests] Use diff_plist, correct order of arguments for missed cases; NFC
Hubert Tong [Wed, 1 May 2019 15:53:56 +0000 (15:53 +0000)]
[analyzer][tests] Use diff_plist, correct order of arguments for missed cases; NFC

For various files under `clang/test/Analysis`, D52036 applied
`%diff_plist` to replace `diff` invocations with certain options and
D56340 swapped the order of the arguments so that the reference file
comes first. The tests that used `tail` to filter the test output were
not modified accordingly. This patch applies the corresponding update
to those tests.

llvm-svn: 359691

5 years ago[lit][tests][AIX] Update expected form of diagnostic messages; use `not` to normalize...
Hubert Tong [Wed, 1 May 2019 15:47:16 +0000 (15:47 +0000)]
[lit][tests][AIX] Update expected form of diagnostic messages; use `not` to normalize non-zero exit values

Summary:
Various tests in the `lit` testing suite expect specific return codes
and forms of diagnostic message from utility programs. As per
POSIX.1-2017 XCU Section 1.4, Utility Description Defaults, "[the]
format of diagnostic messages for most utilities is unspecified".
The STDERR subsections of the `cat` and `wc` utilities merely indicate
that "[the] standard error shall be used only for diagnostic messages".
The corresponding EXIT STATUS subsections merely indicate, with regard
to errors, an exit value of >0.

The affected tests are updated to accept the applicable diagnostic
message as produced by the utilities on AIX. The exit value is
normalized using `not` as necessary.

Reviewers: xingxue, sfertile, jasonliu

Reviewed By: xingxue

Subscribers: delcypher, jsji, llvm-commits

Tags: #llvm

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

llvm-svn: 359690

5 years ago[tests] Add host-byteorder-*-endian; update XFAILs of big-endian triples
Hubert Tong [Wed, 1 May 2019 15:36:18 +0000 (15:36 +0000)]
[tests] Add host-byteorder-*-endian; update XFAILs of big-endian triples

Summary:
Triple components in `XFAIL` lines are tested against the target triple.
Various tests that are expected to fail on big-endian hosts are marked
as being `XFAIL` for big-endian targets. This patch corrects these tests
by having them test against a new `host-byteorder-big-endian` feature.

Reviewers: xingxue, sfertile, jasonliu

Reviewed By: xingxue

Subscribers: jvesely, nhaehnle, fedor.sergeev, llvm-commits

Tags: #llvm

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

llvm-svn: 359689

5 years ago[llvm-ar][llvm-nm][llvm-size] Change -long-option to --long-option in tests. NFC
Fangrui Song [Wed, 1 May 2019 15:31:15 +0000 (15:31 +0000)]
[llvm-ar][llvm-nm][llvm-size] Change -long-option to --long-option in tests. NFC

llvm-svn: 359688

5 years ago[clang-format] Fix bug that misses some function-like macro usages
Owen Pan [Wed, 1 May 2019 15:03:41 +0000 (15:03 +0000)]
[clang-format] Fix bug that misses some function-like macro usages

Fixes PR41483

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

llvm-svn: 359687

5 years ago[X86][SSE] Add demanded elts support X86ISD::PMULDQ\PMULUDQ
Simon Pilgrim [Wed, 1 May 2019 14:50:50 +0000 (14:50 +0000)]
[X86][SSE] Add demanded elts support X86ISD::PMULDQ\PMULUDQ

Add to SimplifyDemandedVectorEltsForTargetNode and SimplifyDemandedBitsForTargetNode

llvm-svn: 359686

5 years agoFix OptTable::findNearest() adding delimiter for free
Nico Weber [Wed, 1 May 2019 14:46:17 +0000 (14:46 +0000)]
Fix OptTable::findNearest() adding delimiter for free

Prior to this, OptTable::findNearest() thought that the input `--foo`
had an editing distance of 0 from an existing flag `--foo=`, which made
it suggest flags with delimiters more often than flags without one.
After this, it correctly assigns this case an editing distance of 1.

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

llvm-svn: 359685