Commit Graph

356922 Commits

Author SHA1 Message Date
Sander de Smalen a8fbbf8fe2 [SveEmitter] NFC: Add missing ACLE tests
These ACLE tests were missing in previous patches:
- D79357: [SveEmitter] Add builtins for svdup and svindex
- D78747: [SveEmitter] Add builtins for compares and ReverseCompare flag.
- D76238: [SveEmitter] Implement builtins for contiguous loads/stores
2020-06-10 08:29:34 +01:00
Eli Friedman a92dcffcd3 Revert "[SPARC] Lower fp16 ops to libcalls"
This reverts commit 28415e588f.  It's
causing buildbot failures. (Probably just need to fix the triple for the
test, but I'll look more tomorrow.)
2020-06-10 00:27:29 -07:00
Endre Fülöp 020815fafd [analyzer] On-demand parsing capability for CTU
Summary:
Introduce on-demand parsing of needed ASTs during CTU analysis.
The index-file format is extended, and analyzer-option CTUInvocationList
is added to specify the exact invocations needed to parse the needed
source-files.

Reviewers: martong, balazske, Szelethus, xazax.hun, whisperity

Reviewed By: martong, xazax.hun

Subscribers: gribozavr2, thakis, ASDenysPetrov, ormris, mgorny, whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, steakhal, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D75665
2020-06-10 08:59:04 +02:00
LLVM GN Syncbot 801d1235c8 [gn build] Port 4f03c0b806 2020-06-10 06:34:38 +00:00
LLVM GN Syncbot c4e3e81786 [gn build] Port 075890ca55 2020-06-10 06:34:37 +00:00
Amara Emerson 075890ca55 [AArch64] Move RegisterBankInfo.cpp/h to GISel.
Missed this file in the recent reorg.
2020-06-09 23:26:25 -07:00
Fangrui Song b114e134bd [ELF] Fix --thinlto-index-only regression after D79300
After D79300, we don't rewrite InputFile::mb to an empty buffer.
In thinLTOCreateEmptyIndexFiles(), we should check LazyObjFile::fetched
as well as checking whether mb is a bitcode, otherwise we would overwrite (path + .thinlto.bc) with an empty index.
2020-06-09 23:10:30 -07:00
Siva Chandra Reddy 4be1c116ad [libc] Add implementations of round and roundf.
Reviewers: asteinhauser

Differential Revision: https://reviews.llvm.org/D80779
2020-06-09 23:01:20 -07:00
Shawn Landden 9ec57cce62 [AArch64] custom lowering for i128 popcount
halves the number of CNT instructions generated
2020-06-10 09:44:16 +04:00
Stephen Neuendorffer d3ead060be [JitRunner] add support for i32 and i64 output
Differential Revision: https://reviews.llvm.org/D80675
2020-06-09 22:25:03 -07:00
Stephen Neuendorffer 698462336a [MLIR] expose applyCmpPredicate
This is useful for manipulating the standard dialect from transformations
outside of the standard dialect.

Differential Revision: https://reviews.llvm.org/D80609
2020-06-09 22:25:03 -07:00
Siva Chandra Reddy 9894236e70 [libc] Skip fuzzer as well if its dependent entrypoints are skipped.
Reviewers: asteinhauser

Subscribers: mgorny, tschuett, ecnelises, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D81519
2020-06-09 21:49:50 -07:00
LemonBoy 28415e588f [SPARC] Lower fp16 ops to libcalls
The fp16 ops are legalized by extending/chopping them as needed.
The tests are shamelessly stolen from the RISC-V backend.

Differential Revision: https://reviews.llvm.org/D77569
2020-06-09 19:29:42 -07:00
Fangrui Song ceaee253f4 [Support][unittest] Fix asan failure after D81156 2020-06-09 17:48:00 -07:00
Sterling Augustine ccd192204d Fix variables used only in asserts.
Summary: Fix variables used only in asserts.

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81522
2020-06-09 17:19:38 -07:00
Amara Emerson 938cc573ee [AArch64][GlobalISel] Select G_ADD_LOW into a MOVaddr pseudo.
This ensures that we match SelectionDAG behaviour by waiting until the expand
pseudos pass to generate ADRP + ADD pairs. Doing this at selection time for the
G_ADD_LOW is fine because by the time we get to selecting the G_ADD_LOW,
previous attempts to fold it into loads/stores must have failed.

Differential Revision: https://reviews.llvm.org/D81512
2020-06-09 16:47:58 -07:00
Craig Topper 641d5ac4d1 [X86] Assign a feature to tremont, goldmont, goldmont-plus, icelake-client, and icelake for target multiversioning priority.
Without this these CPUs all caused the compiler to assert when
used for multiversioning.
2020-06-09 16:39:41 -07:00
Vy Nguyen a21a462051 Make the diagnostic-missing-prototypes put the suggested `static` in front of `const` if exists.
Summary:
Consider: `const int* get_foo() {return nullptr;}`
The suggested fix should be `static const int* get_foo(){}`
and not `const static int* get_foo(){}`

Reviewers: gribozavr2

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81444
2020-06-09 19:34:57 -04:00
Siva Chandra Reddy ef0ea8717a [libc][NFC] Adjust sinf and cosf around -infinity inputs.
The current tests verify if the result of -infinity is a quiet NaN with
sign bit set. But, that need not be the case on all platforms. So, just
checking that the result is a quiet NaN and ignoring the sign bit is
good enough.
2020-06-09 16:23:12 -07:00
Jonas Devlieghere 7dd86c9e7c [lldb/Reproducers] Skip test_remove_placeholder_add_real_module with reproducers
Modules are not orphaned and it finds the existing module with the same
UUID from test_partial_uuid_match.
2020-06-09 16:17:53 -07:00
aartbik 1e45b55dcc [mlir] [VectorOps] Handle 'vector.shape_cast' lowering for all cases
Summary:
Even though this operation is intended for 1d/2d conversions currently,
leaving a semantic hole in the lowering prohibits proper testing of this
operation. This CL adds a straightforward reference implementation for the
missing cases.

Reviewers: nicolasvasilache, mehdi_amini, ftynse, reidtatge

Reviewed By: reidtatge

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, msifontes

Tags: #mlir

Differential Revision: https://reviews.llvm.org/D81503
2020-06-09 16:08:45 -07:00
Akira Hatanaka f56659d2ba Don't use a variable that isn't defined
The line defining CAPTURE was removed in r302270.
2020-06-09 16:07:29 -07:00
Siva Chandra Reddy 235e9cc924 [libc][NFC][Obvious] Tidy up some CMake files.
Conditionally adding subdirectories was missed in a few places previously.
This change adds the conditionals. A sub-directory was being added
needlessly in another place. That has been removed.
2020-06-09 15:54:07 -07:00
Siva Chandra Reddy fd3295fb6f [libc] Skip entrypoints not present in the entrypoints list.
Summary:
If a test depends on a skipped entrypoint, then the test is also
skipped. This setup will be useful as we gradually add support for
more operating systems and target architectures.

Reviewers: asteinhauser

Differential Revision: https://reviews.llvm.org/D81489
2020-06-09 14:40:28 -07:00
Whitney Tsang 01e64c9712 [LoopFusion] Update second loop guard non loop successor phis incoming
blocks.

Summary: The current LoopFusion forget to update the incoming block of
the phis in second loop guard non loop successor from second loop guard
block to first loop guard block. A test case is provided to better
understand the problem.
Reviewed By: jdoerfert
Subscribers: hiraditya, llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D81421
2020-06-09 21:14:51 +00:00
Tim Keith a27d385209 [flang] Fix bug resolving type in type definition
When we encountered a type name in a derived type definition, we were
sometimes finding a component of that name rather than the type from
the enclosing scope. Fix this by introducing `NonDerivedTypeScope()` to
start the search in the right scope.

Differential Revision: https://reviews.llvm.org/D81493
2020-06-09 14:14:03 -07:00
Jonas Devlieghere 2c0afacada [lldb/CMake] Add LLDB_PYTHON_VERSION to use Python 2 with CMake > 3.12
In addition to having the default fallback from Python 3 to Python 2, it
should also be possible to build against Python 2 explicitly. This patch
makes that possible by setting LLDB_PYTHON_VERSION. The variable only
has effect with CMake 3.12 or later.

Differential revision: https://reviews.llvm.org/D81501
2020-06-09 14:11:11 -07:00
Christopher Tetreault 765ac39db2 [SVE] Eliminate calls to default-false VectorType::get() from Scalar
Reviewers: efriedma, kmclaughlin, sdesmalen, fhahn, bkramer, anna, gchatelet, c-rhodes, david-arm, fpetrogalli

Reviewed By: david-arm

Subscribers: tschuett, hiraditya, rkruppe, psnobl, dantrushin, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80336
2020-06-09 14:09:02 -07:00
Sam McCall 2a3ac01b68 Reland [clangd] Resolve driver symlinks, and look up unknown relative drivers in PATH.
This reverts commit f25e3c2d0e.
Added workaround for tempdir being a symlink on mac.
2020-06-09 23:07:28 +02:00
Christopher Tetreault e8f815a494 [SVE] Eliminate calls to default-false VectorType::get() from FuzzMutate
Reviewers: efriedma, kmclaughlin, sdesmalen, bogner, chandlerc, c-rhodes, david-arm, fpetrogalli

Reviewed By: c-rhodes

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80325
2020-06-09 13:57:36 -07:00
Thomas Lively a96414527c [NFC][WebAssembly] Add tests for alignment on new SIMD loads
Summary:
The natural alignments for extending and splatting loads had not
previously been tested. It is good to have them tested because they
are non-obvious details in the SIMD spec proposal.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81303
2020-06-09 13:46:12 -07:00
diggerlin 2a3f5021f5 Added test case for the patch D75866 "supporting the visibility attribute for aix assembly"
The test case has been reviewed in the patch D75866

Reviewers: Jason Liu ,hubert.reinterpretcast,James Henderson

Differential Revision: https://reviews.llvm.org/D75866
2020-06-09 16:29:28 -04:00
Bruno Ricci 856ba638d5
[clang][NFC] Fix and simplify the test added in 8dcc7eecb7
We only have to create a TypeTraitExpr node with 16 bits worth of
arguments to detect an overflow with the assertion added in the
constructor of TypeTraitExpr. Moreover the static_assert in
original test is pointless since __is_constructible only check
that the corresponding expression is well-formed.
2020-06-09 21:17:19 +01:00
diggerlin edd819c757 [AIX] supporting the visibility attribute for aix assembly
SUMMARY:

in the aix assembly , it do not have .hidden and .protected directive.
in current llvm. if a function or a variable which has visibility attribute, it will generate something like the .hidden or .protected , it can not recognize by aix as.
in aix assembly, the visibility attribute are support in the pseudo-op like
.extern Name [ , Visibility ]
.globl Name [, Visibility ]
.weak Name [, Visibility ]

in this patch, we implement the visibility attribute for the global variable, function or extern function .

for example.

extern __attribute__ ((visibility ("hidden"))) int
  bar(int* ip);
__attribute__ ((visibility ("hidden"))) int b = 0;
__attribute__ ((visibility ("hidden"))) int
  foo(int* ip){
   return (*ip)++;
}
the visibility of .comm linkage do not support , we will have a separate patch for it.
we have the unsupported cases ("default" and "internal") , we will implement them in a a separate patch for it.

Reviewers: Jason Liu ,hubert.reinterpretcast,James Henderson

Differential Revision: https://reviews.llvm.org/D75866
2020-06-09 16:15:06 -04:00
Louis Dionne e6d94f4bd2 [libc++abi] Replace LIBCXXABI_HAS_NO_EXCEPTIONS by TEST_HAS_NO_EXCEPTIONS
This clarifies the difference between test for exception support in
libc++abi tests and support for exceptions built into libc++abi.
This also removes the rather confusing similarity between the
_LIBCXXABI_NO_EXCEPTIONS and LIBCXXABI_HAS_NO_EXCEPTIONS macros.

Finally, TEST_HAS_NO_EXCEPTIONS is also detected automatically based
on -fno-exceptions, so it doesn't have to be specified explicitly
through Lit's compile_flags.
2020-06-09 16:13:17 -04:00
Jaroslav Sevcik fac5d05eb7 [lldb] Fix and enable Windows minidump tests
SBFileSpec.fullpath always uses the forward slash to join the directory with the
base name. This causes mismatches when comparing Windows paths with backslashes
in two of the minidump tests. To get around that we just compare the directory
names separately from the filenames.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D81465
2020-06-09 20:03:44 +00:00
Louis Dionne 168681abce [libc++abi][libunwind] Don't override libc++'s handling of exception features
0e04342ae0 simplified exceptions-related configurations for libc++abi
and libunwind by reusing the logic in libc++. However, it missed the fact
that libc++abi and libunwind were overriding libc++'s handling of exceptions.

This commit removes special handling in libc++abi and libunwind to use
the logic in libc++, which is the right one.
2020-06-09 16:03:22 -04:00
Mitch Phillips e26b25f8b1 [HWASan] Add sizeof(global) in report even if symbols missing.
Summary: Refactor the current global header iteration to be callback-based, and add a feature that reports the size of the global variable during reporting. This allows binaries without symbols to still report the size of the global variable, which is always available in the HWASan globals PT_NOTE metadata.

Reviewers: eugenis, pcc

Reviewed By: pcc

Subscribers: mgorny, llvm-commits, #sanitizers

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D80599
2020-06-09 13:02:13 -07:00
Mitch Phillips 9bca45bd45 Rebase. 2020-06-09 13:01:40 -07:00
Mitch Phillips 2ecf32fb35 remove redundant comment about Android. 2020-06-09 13:01:40 -07:00
Mitch Phillips 1bfb5b8e36 Address Peter's comments. 2020-06-09 13:01:40 -07:00
Mitch Phillips 184b437699 Move DSO dependencies inside the group. 2020-06-09 13:01:40 -07:00
Mitch Phillips 9e9142cbb9 Patch up issues with GN builds (pthread / libz)
Summary:
Fixes up two small issues with the gn build.

 1 - Ensures that the correct ldflag `-pthread` is provided, not just linking the library.
 2 - Ensures that libraries are linked in the same group as the dependencies. This fixes a problem where system libraries (libc) are involved in a link-order dependency that's not being fulfilled.

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80591
2020-06-09 13:01:40 -07:00
LLVM GN Syncbot a7e0d55de0 [gn build] Port d5c28c4094 2020-06-09 19:53:21 +00:00
Craig Topper d5c28c4094 [X86] Move CPUKind enum from clang to llvm/lib/Support. NFCI
Similar to what some other targets have done. This information
could be reused by other frontends so doesn't make sense to live
in clang.

-Rename CK_Generic to CK_None to better reflect its illegalness.
-Move function for translating from string to enum into llvm.
-Call checkCPUKind directly from the string to enum translation
and update CPU kind to CK_None accordinly. Caller will use CK_None
as sentinel for bad CPU.

I'm planning to move all the CPU to feature mapping out next. As
part of that I want to devise a better way to express CPUs inheriting
features from an earlier CPU. Allowing this to be expressed in a
less rigid way than just falling through a switch. Or using gotos
as we've had to do lately.

Differential Revision: https://reviews.llvm.org/D81439
2020-06-09 12:52:41 -07:00
Matt Arsenault 44b355f34b AMDGPU/GlobalISel: Add new baseline tests for bitcast legalization 2020-06-09 15:46:53 -04:00
Sanjay Patel 6f6d2d2383 [x86] refine conditions for immediate hoisting to save code-size
As shown in PR46237:
https://bugs.llvm.org/show_bug.cgi?id=46237

The size-savings win for hoisting an 8-bit ALU immediate (intentionally
excluding store constants) requires extreme conditions; it may not even
be possible when including REX prefix bytes on x86-64.

I did draft a version of this patch that included use counts after the
loop, but I suspect that accounting is not working as expected. I think
that is because the number of constant uses are changing as we select
instructions (for example as we transform shl/add into LEA).

Differential Revision: https://reviews.llvm.org/D81468
2020-06-09 15:44:55 -04:00
Erich Keane 90ee8cf636 Undo change inadvertently added in 113b0d7d 2020-06-09 12:41:52 -07:00
Matt Arsenault 32823091c3 GlobalISel: Set instr/debugloc before any legalizer action
It was annoying enough that every custom lowering needed to set the
insert point, but this was made worse since now these all needed to be
updated to setInstrAndDebugLoc. Consolidate these so every
legalization action has the right insert position by default.

This should fix dropping debug info in every custom AMDGPU
legalization.
2020-06-09 15:37:02 -04:00
Louis Dionne 0e04342ae0 [NFCI] Clean up exceptions related CMake and Lit options in libc++abi and libunwind
First, libc++abi doesn't need to add the no-exceptions Lit feature itself,
since that is already done in the config.py for libc++, which it reuses.
Specifically, config.enable_exceptions is set based on @LIBCXXABI_ENABLE_EXCEPTIONS@
in libc++abi's lit.cfg.in, and libc++'s config.py handles that correctly.

Secondly, libunwind's LIBUNWIND_ENABLE_EXCEPTIONS is never set (it's
probably a remnant of copy-pasting code between the runtime libraries),
so the library is always built with exceptions disabled (which makes
sense since it implements the runtime support for exceptions).
Conversely, the test suite is always run with exceptions enabled
(not sure why), but that is preserved by the default behavior of
libc++'s config.py.
2020-06-09 15:34:29 -04:00