Commit Graph

356272 Commits

Author SHA1 Message Date
Louis Dionne 68e4e8a8d0 [libc++] Disable LLVM benchmarks in the Apple build 2020-06-04 12:03:25 -04:00
Fangrui Song 9be3567df2 [llvm-dwarfdump] Add a table header for -debug-line -verbose output
Like non-verbose output, so that it is easy to recognize the `Line,Column,File,ISA,Discriminator` column values.

Reviewed By: JDevlieghere, jhenderson

Differential Revision: https://reviews.llvm.org/D80874
2020-06-04 08:56:17 -07:00
Dmitri Gribenko b5fc1deb5b Use libClangTesting in the unittest for AST matchers
Summary:
The unittest for AST matchers has its own way to specify language
standards. I unified it with the shared infrastructure from
libClangTesting.

Reviewers: jdoerfert, hlopko

Reviewed By: hlopko

Subscribers: mgorny, sstefan1, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81150
2020-06-04 17:40:39 +02:00
Louis Dionne b68bf11efc [libc++] Merge the Apple install-libcxx and libcxxabi scripts
Also, refactor the now-merged script to remove code duplication in the
creation of universal dylibs.
2020-06-04 11:20:03 -04:00
Matt Arsenault af867b7850 DAG: Change computeKnownBitsForFrameIndex to be usable by GISel
This wasn't getting much value from the DAG or depth arguments, since
it's only called on the frame index root nodes. FrameIndexes can also
only return a scalar value, so it also didn't need DemandedElts.
2020-06-04 10:50:26 -04:00
Jonathan Coe 9520bf146d [clang-format] Update GoogleStyle for C# code to match Google's internal C# style guide
Summary: Google's C# style guide is at https://google.github.io/styleguide/csharp-style.html

Reviewers: krasimir, MyDeveloperDay, sammccall

Reviewed By: MyDeveloperDay

Subscribers: cfe-commits, klimek

Tags: #clang-format, #clang

Differential Revision: https://reviews.llvm.org/D79715
2020-06-04 15:48:00 +01:00
Louis Dionne 39a116ee07 [libc++] Move away from the standalone build for Apple libc++ and libc++abi 2020-06-04 10:19:38 -04:00
Eduardo Caldas 62305f6db4 Rename arrow -> arrowToken for unified naming
Reviewers: gribozavr2

Reviewed By: gribozavr2

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81155
2020-06-04 16:12:16 +02:00
Balázs Kéri 0bfd70bdad [Analyzer][StreamChecker] Updated initialization of BugType's.
Summary:
BugType objects are initialized in-class instead of by lazy initialization.
FuchsiaHandleChecker does this already.

Reviewers: Szelethus, baloghadamsoftware, martong

Reviewed By: Szelethus

Subscribers: rnkovacs, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80725
2020-06-04 16:06:07 +02:00
Russell Gallop 3dad390719 Revert "Relands "[YAMLVFSWriter][Test][NFC] Add couple tests" vol. 2"
This reverts commit 30949926f9.

This was failing on bot here:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/32749
2020-06-04 14:59:45 +01:00
Matt Arsenault 931a68f26b RegAllocFast: Remove dead code 2020-06-04 09:38:31 -04:00
Alexey Bataev 3c191ae555 [OPENMP]Fix PR45383: type dependent array subscripts are diagnosed erroneously.
Summary:
If the array subscript expression is type depent, its analysis must be
delayed before its instantiation.

Reviewers: jdoerfert

Subscribers: yaxunl, guansong, caomhin, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D78637
2020-06-04 09:34:59 -04:00
Sanjay Patel 652b3757c8 [x86] add test/code comment for chain value use (PR46195); NFC 2020-06-04 09:15:17 -04:00
Denis Antrushin f2c9765664 [TableGen] Handle (outs variable_ops)
When `variable_ops` is specified in `InOperandList` of instruction,
it behaves as expected, i.e., does not count as operand.
So for `(ins variable_ops)` instruction description will have 0
operands.  However when used in OutOperandList it is counted as
operand. So `(outs variable_ops)` results in instruction with
one def.
This patch makes behavior of `variable_ops` in `out` list to match
that of `in` list.

Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D81095
2020-06-04 16:07:33 +03:00
LLVM GN Syncbot 8ccb9f98ea [gn build] Port 48cd9d9dd8 2020-06-04 12:56:45 +00:00
Pavel Labath 48cd9d9dd8 [Support] Use outs() in ToolOutputFile
Summary:
If the output filename was specified as "-", the ToolOutputFile class
would create a brand new raw_ostream object referring to the stdout.
This patch changes it to reuse the llvm::outs() singleton.

At the moment, this change should be "NFC", but it does enable other
enhancements, like the automatic stdout/stderr synchronization as
discussed on D80803.

I've checked the history, and I did not find any indication that this
class *has* to use a brand new stream object instead of outs() --
indeed, it is special-casing "-" in a number of places already, so this
change fits the pattern pretty well. I suspect the main reason for the
current state of affairs is that the class was originally introduced
(r111595, in 2010) as a raw_fd_ostream subclass, which made any other
solution impossible.

Another potential benefit of this patch is that it makes it possible to
move the raw_ostream class out of the business of special-casing "-" for
stdout handling. That state of affairs does not seem appropriate because
"-" is a valid filename (albeit hard to access with a lot of command
line tools) on most systems. Handling "-" in ToolOutputFile seems more
appropriate.

To make this possible, this patch changes the return type of
llvm::outs() and errs() to raw_fd_ostream&. Previously the functions
were constructing objects of that type, but returning a generic
raw_ostream reference. This makes it possible for new ToolOutputFile and
other code to use raw_fd_ostream methods like error() on the outs()
object. This does not seem like a bad thing (since stdout is a file
descriptor which can be redirected to anywhere, it makes sense to ask it
whether the writing was successful or if it supports seeking), and
indeed a lot of code was already depending on this fact via the
ToolOutputFile "back door".

Reviewers: dblaikie, JDevlieghere, MaskRay, jhenderson

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81078
2020-06-04 14:56:35 +02:00
AndreyChurbanov abe64360ae [openmp] Fixed nonmonotonic schedule implementation.
Differential Revision: https://reviews.llvm.org/D80942
2020-06-04 15:39:45 +03:00
Sanjay Patel de38e882bb [x86] add FileCheck / assertions to test; NFC 2020-06-04 08:34:25 -04:00
Anastasia Stulova 4a4402f0d7 [OpenCL] Add cl_khr_extended_subgroup extensions.
Added extensions and their function declarations into
the standard header.

Patch by Piotr Fusik!

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79781
2020-06-04 13:29:30 +01:00
Vince Bridgers bd42582541 [analyzer] Ignore calculated indices of <= 0 in VLASizeChecker
Summary:
See https://bugs.llvm.org/show_bug.cgi?id=46128. The checker does not
yet comprehend constraints involving multiple symbols, so it's possible
to calculate a VLA size that's negative or 0. A LIT is added to catch
regressions, and this change simply bails if a VLA size of 0 or less is
calculated.

Reviewers: balazske, NoQ, martong, baloghadamsoftware, Szelethus, gamesh411

Reviewed By: balazske, NoQ, Szelethus

Subscribers: xazax.hun, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, Charusso, ASDenysPetrov, cfe-commits, dkrupp

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80903
2020-06-04 07:25:35 -05:00
Sanjay Patel ecbf34c0e4 [PhaseOrdering] add more tests for vector reductions; NFC
More coverage for D80867.
2020-06-04 08:19:40 -04:00
Simon Moll a0dfdda4e5 [VP][Fix] canIgnoreVectorLength for scalable types
This patch fixes VPIntrinsic::canIgnoreVectorLength when used on a
VPIntrinsic with scalable vector types. Also includes new unittest cases
for the '<vscale x 1 x whatever>' and '%evl == vscale' corner cases.
2020-06-04 14:17:42 +02:00
David Green 7d4ebc98af [ARM] FP16 conversion tests. NFC 2020-06-04 13:13:56 +01:00
Nico Weber 3871ad366b [gn build] port some -Wno flags for gcc from the cmake build. 2020-06-04 08:10:29 -04:00
Eduardo Caldas 3b739690b0 Add support for IntegerLiteral in SyntaxTree
Reviewers: gribozavr2

Reviewed By: gribozavr2

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81135
2020-06-04 14:05:31 +02:00
Max Kazantsev 9bdb918890 [InstCombine][NFC] Factor out constant check
We plan to add more transforms here. Besides, this check should be
done in the beginning just from function's name.
2020-06-04 18:54:23 +07:00
Max Kazantsev 18134511d9 [Test] Add test showing missing opportunity of folding ICmp(Phi(Consts...)) 2020-06-04 18:26:24 +07:00
Georgii Rymar 9d739a9157 [ObjectYAML] - Remove unused function. NFC.
Was introduced in D81005 by mistake.

Catched by BB:
http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/4070/steps/build%20stage%201/logs/stdio
2020-06-04 14:22:51 +03:00
Paul Walker ed9df8621a [FileCheck] Implement equality operators for ExpressionValue.
Subscribers: hiraditya, thopre, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81094
2020-06-04 11:18:35 +00:00
Yvan Roux 6b9e102243 [ARM][MachineOutliner] Remove unneeded dynamic allocation. 2020-06-04 13:12:26 +02:00
Simon Pilgrim adf10dcf2e [DAG] scalarizeBinOpOfSplats - extract from the source of splat vector (PR46189)
D79003/rG9fa58d1bf2f8 exposed an issue with scalarizeBinOpOfSplats that we were extracting from the splatted vector result instead of the source, the splat index is only valid for the source vector not the result, which may contain undefs, including at the splat index.
2020-06-04 11:58:59 +01:00
Tim Northover 87e24c3200 Revert "[DAGCombiner] avoid unnecessary indirection from SDNode/SDValue; NFCI"
This reverts commit 21dadd774f.

In at least PromoteIntBinOps, they wanted to know about users of *all* values
produced by the node not just the integer being promoted. For example not
replacing chain users if the operation was a load breaks the ordering of the
DAG.
2020-06-04 11:53:14 +01:00
Georgii Rymar c781e7370e [yaml2obj] - Add a way to exclude specified sections from the section header.
This implements a new "Excluded" key that can be used
to exclude entries from section header:

```
SectionHeaderTable:
  Sections:
    ...
  Excluded:
    - Name: .foo
```

Differential revision: https://reviews.llvm.org/D81005
2020-06-04 13:50:35 +03:00
Djordje Todorovic 7fbbc82057 [CSInfo][MIPS] Describe parameter value loaded by ADDiu
Describe parameter's value loaded by MIPS ADDiu instruction.
When parameter's value is loaded into a register by mips ADDiu/DADDiu
instruction, it could be described correctly and emitted as
DW_AT_GNU_call_site_value.

Patch by Nikola Tesic

Differential revision: https://reviews.llvm.org/D78108
2020-06-04 12:39:56 +02:00
Florian Hahn a7c6bec228 [Sema] Remove unused matrix_begin/end helpers (NFC).
The matrix_types() helper returning an iterator range is used instead.
2020-06-04 11:29:01 +01:00
Simon Pilgrim b0c7d6bfdb [X86] Add test case for PR46189 2020-06-04 11:18:23 +01:00
Georgii Rymar 5750f12b82 Revert "[yaml2obj] - Allocate the file space for SHT_NOBITS sections in some cases."
This reverts commit aa3a85cdaa.

There are problems with it. See here: https://reviews.llvm.org/D80629
2020-06-04 13:17:48 +03:00
Esme-Yi 1b6cccba3e [PowerPC][NFC] Testing ROTL of v1i128.
Summary: A bug is reported in bugzilla-45628, where the swap_with_shift case can’t be matched to a single HW instruction xxswapd as expected. In fact the case matches the idiom of rotate, but PPC doesn’t support ROTL v1i128.
This is a NFC patch for testing ROTL with v1i128 at master.

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D81073
2020-06-04 10:09:06 +00:00
Kadir Cetinkaya 4f4a8ae72e
[clangd] Fix build for gcc 7.4 2020-06-04 12:02:49 +02:00
Vitaly Buka af6e054730 [StackSafety] Rename testing opts 2020-06-04 02:39:16 -07:00
Vitaly Buka 81826c7ac6 [StackSafety,NFC] Remove SCEVRewriteVisitor
Summary: Depends on D80956.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80976
2020-06-04 02:32:36 -07:00
Jay Foad 590964c835 [AMDGPU] More accurate gfx10 latencies
Differential Revision: https://reviews.llvm.org/D81012
2020-06-04 10:29:32 +01:00
Jay Foad 9ce0f7eed6 [AMDGPU] Introduce new sched classes for transcendental instructions
This is in preparation for scheduling them slightly differently on
gfx10. NFC.

Differential Revision: https://reviews.llvm.org/D81011
2020-06-04 10:29:32 +01:00
Kazushi (Jam) Marukawa 52ed34deeb [VE] Clean SDNodeXForm stuff
Summary:
Gather definitions of SDNodeXForm and change them to call C functions
instead of copying C expressions in td files.  Doing this solved some
bugs in mimm detections.

Differential Revision: https://reviews.llvm.org/D81132
2020-06-04 11:28:24 +02:00
Georgii Rymar 2ad0ef6ef1 [llvm-readelf] - Do not try to read past the end of the file when dumping the the SHT_GNU_HASH.
We have unobvious issue in the condition that is used to check
that we do not read past the EOF.

The problem is that the result of "GnuHashTable->nbuckets * 4" expression is uint32.
Because of that it was still possible to overflow it and pass the check.

There was no such problem with the "GnuHashTable->maskwords * sizeof(typename ELFT::Off)"
condition, because of `sizeof` on the right (which gives 64-bits value on x64),
but I've added an explicit conversion to 64-bit value for `GnuHashTable->maskwords` too.

Differential revision: https://reviews.llvm.org/D81103
2020-06-04 12:00:44 +03:00
Dmitri Gribenko 06cf7adcc8 Make syntax tree test print the line number when it fails
Summary:
The syntax tree test uses a helper function that executes all testing
assertions. When an assertion fails, the only line number that gets
printed to the log refers to the helper function. After this change, we
would also get the line number of the EXPECT_TRUE macro invocation
(unfortunately, the line number of the last token of it, not the first
one, but there's not much I can do about it).

Reviewers: hlopko, eduucaldas

Reviewed By: hlopko, eduucaldas

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81107
2020-06-04 10:42:44 +02:00
Qiu Chaofan 7a001a2d92 [PowerPC] Require nsz flag for c-a*b to FNMSUB
On PowerPC, FNMSUB (both VSX and non-VSX version) means -(a*b-c). But
the backend used to generate these instructions regardless whether nsz
flag exists or not. If a*b-c==0, such transformation changes sign of
zero.

This patch introduces PPC specific FNMSUB ISD opcode, which may help
improving combined FMA code sequence.

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D76585
2020-06-04 16:41:27 +08:00
Yevgeny Rouban dcfa78a4cc Extend InvokeInst !prof branch_weights metadata to unwind branches
Allow InvokeInst to have the second optional prof branch weight for
its unwind branch. InvokeInst is a terminator with two successors.
It might have its unwind branch taken many times. If so
the BranchProbabilityInfo unwind branch heuristic can be inaccurate.
This patch allows a higher accuracy calculated with both branch
weights set.

Changes:
 - A new section about InvokeInst is added to
   the BranchWeightMetadata page. It states the old information that
   missed in the doc and adds new about the second branch weight.
 - Verifier is changed to allow either 1 or 2 branch weights
   for InvokeInst.
 - A new test is written for BranchProbabilityInfo to demonstrate
   the main improvement of the simple fix in calcMetadataWeights().
 - Several new testcases are created for Inliner. Those check that
    both weights are accounted for invoke instruction weight
    calculation.
 - PGOUseFunc::setBranchWeights() is fixed to be applicable to
   InvokeInst.

Reviewers: davidxl, reames, xur, yamauchi
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80618
2020-06-04 15:37:15 +07:00
Raphael Isemann 2ebe30c6e4 [lldb][NFC] Address some review feedback for D80775 ('command script delete' completion)
In the similar review D81128, Jonas pointed out some style errors that also
apply to D80775 (which is already committed). Also applying the changes
suggested there to this code.
2020-06-04 10:30:27 +02:00
Jan Korous 30949926f9 Relands "[YAMLVFSWriter][Test][NFC] Add couple tests" vol. 2
This reverts commit e4e3e41905.

Fixed dangling StringRef in test.
2020-06-04 01:26:12 -07:00