Commit Graph

11634 Commits

Author SHA1 Message Date
LLVM GN Syncbot ab8fcd5ab0 [gn build] Port 134d017b88 2022-08-23 11:31:54 +00:00
LLVM GN Syncbot 684e71eef2 [gn build] Port 15b65bcd65 2022-08-23 05:49:48 +00:00
Nico Weber 4a2c8dcc17 [gn build] port e78208f082 2022-08-22 21:46:36 -04:00
Dave Lee 987d5e6c6c [llvm][utils] Make lldb data formatters show both summaries and children
When a type has a summary and synthetic child provider, the children are shown
only if `--expand`/`-e` is given.

This updates `lldbDataFormatters.py` to expand children of types that have both
a summary and synthetic children.

Differential Revision: https://reviews.llvm.org/D132095
2022-08-22 18:08:53 -07:00
Nemanja Ivanovic 8537a99b2c [GTest] Change detection of libpthread
We currently use CMake's find_library function to detect whether
libpthread exists on the system to determine if pthread should
be added on the link step. However, there are configurations in
which CMake's path checking fails to find the library even though
the toolchain has it.

One such case is with Clang 14.0.0 on PowerPC. Due to a recent
change, the build puts libc++ and related libraries in a
subdirectory that appears to depend on the default target triple.
CMake then uses that subdirectory to determine the architecture
and adds that name to its search paths. However, the triple for
the system GNU toolchain is different so CMake fails to find it.
Namely, Clang 14.0.0's default target triple and the subdirectory
name is powerpc64le-unknown-linux-gnu whereas the system GNU
toolchain has powerpc64le-linux-gnu. Clang's driver has no trouble
finding either the GNU includes/libraries or Clang's own. But
CMake seems to get this wrong.

The net result of this is that we can't do a shared libraries
build of ToT with Clang 14.0.0.

This patch proposes using HAVE_LIBPTHREAD which CMake seems to
determine by compiling a test file with -lpthread (or perhaps
-pthread, I can't really get CMake to tell me how it is figuring
this out). If that variable tells CMake that the build compiler
accepts the pthread option, it seems reasonable to depend on
that variable to determine if we should add it to the link step
when building the llvm_gtest library.
2022-08-22 13:05:40 -05:00
Kazu Hirata 36357c967c Remove llvm::is_trivially_copyable (NFC)
This patch removes llvm::is_trivially_copyable as it seems to be dead.
Once I remove it, HAVE_STD_IS_TRIVIALLY_COPYABLE has no users, so this
patch removes the macro also.

The comment on llvm::is_trivially_copyable mentions GCC 4.9, but note
that we now require GCC 7.1 or higher.

Differential Revision: https://reviews.llvm.org/D132328
2022-08-21 10:39:19 -07:00
Kazu Hirata 8b1b0d1d81 Revert "Use std::is_same_v instead of std::is_same (NFC)"
This reverts commit c5da37e42d.

This patch seems to break builds with some versions of MSVC.
2022-08-20 23:00:39 -07:00
Kazu Hirata c5da37e42d Use std::is_same_v instead of std::is_same (NFC) 2022-08-20 22:36:26 -07:00
Kazu Hirata 258531b7ac Remove redundant initialization of Optional (NFC) 2022-08-20 21:18:28 -07:00
Nico Weber 804d4594cb [gn build] Fix oversight in 3adda398ce 2022-08-20 13:39:45 -04:00
John Ericson 3adda398ce [clang][lldb][cmake] Use new `*_INSTALL_LIBDIR_BASENAME` CPP macro
Use this instead of `*_LIBDIR_SUFFIX`, from which it is computed.

This gets us ready for D130586, in which `*_LIBDIR_SUFFIX` is
deprecated.

Differential Revision: https://reviews.llvm.org/D132300
2022-08-20 12:52:21 -04:00
LLVM GN Syncbot 9e51cbac9e [gn build] Port 57c9780d60 2022-08-19 21:56:27 +00:00
Nico Weber 6a62fc1827 [gn build] Port c74c17f37a 2022-08-19 07:45:44 -04:00
Nico Weber ca5902cc82 Revert "[gn build] port f7a33090a910"
This reverts commit d3a1dbc490.
f7a33090a9 was reverted in e941b031d3.
2022-08-19 07:40:45 -04:00
John Ericson e941b031d3 Revert "[cmake] Use `CMAKE_INSTALL_LIBDIR` too"
This reverts commit f7a33090a9.

Unfortunately this causes a number of failures that didn't show up in my
local build.
2022-08-18 22:46:32 -04:00
LLVM GN Syncbot aaccb2370f [gn build] Port ad8eb85545 2022-08-18 22:43:34 +00:00
LLVM GN Syncbot 6fed13f502 [gn build] Port 0ac597f3ca 2022-08-18 21:18:53 +00:00
Nico Weber d3a1dbc490 [gn build] port f7a33090a9 2022-08-18 15:48:22 -04:00
John Ericson f7a33090a9 [cmake] Use `CMAKE_INSTALL_LIBDIR` too
We held off on this before as `LLVM_LIBDIR_SUFFIX` conflicted with it.
Now we return this.

`LLVM_LIBDIR_SUFFIX` is kept as a deprecated way to set
`CMAKE_INSTALL_LIBDIR`. The other `*_LIBDIR_SUFFIX` are just removed
entirely.

I imagine this is too potentially-breaking to make LLVM 15. That's fine.
I have a more minimal version of this in the disto (NixOS) patches for
LLVM 15 (like previous versions). This more expansive version I will
test harder after the release is cut.

Reviewed By: sebastian-ne, ldionne, #libc, #libc_abi

Differential Revision: https://reviews.llvm.org/D130586
2022-08-18 15:33:35 -04:00
Vitaly Buka fae656b2dd [test] Add 'hwasan' feature and disable a test 2022-08-17 23:50:35 -07:00
Vitaly Buka 3f5f2905c4 [test] Propagate HWASAN_OPTIONS 2022-08-17 18:59:49 -07:00
Nico Weber b098407280 [gn build] build libclang_rt.ubsan_osx_dynamic.dylib on mac
For now, this only builds the dylib, so using `-fsanitize=undefined`
with `-static-libsan` or `fsanitize-minimal-runtime` still won't
work -- but the common case does work.

Differential Revision: https://reviews.llvm.org/D131969
2022-08-17 15:35:41 -04:00
Alexander Shaposhnikov d68ba43ad2 [Intrinsics] Add initial support for NonNull attribute
Add initial support for NonNull attribute.
(https://github.com/llvm/llvm-project/issues/57113)

Test plan:

verify that for
__thread int x;
int main() {

int* y = &x;
return *y;
}
(with this patch) clang -O -fsanitize=null -S -emit-llvm -o -
doesn't emit a null-pointer check

Differential revision: https://reviews.llvm.org/D131872
2022-08-16 21:28:23 +00:00
Nikita Popov 8f555a52e0 [cmake] Fix tablegen exports
This fixes some fallout from D131282. Currently, add_tablegen() will add the tablegen target to LLVM_EXPORTS and associates the install with LLVMExports. For non-standalone builds, this means that you end up with mlir-tblgen and clang-tblgen in LLVMExports.

However, these projects should instead be using MLIR_EXPORTS/MLIRTargets and CLANG_EXPORTS/ClangTargets. To fix this, add an extra EXPORT option and make use of get_target_export_arg() to create the correct export argument.

Reviewed By: ashay-github

Differential Revision: https://reviews.llvm.org/D131565
2022-08-16 14:17:23 +02:00
LLVM GN Syncbot f09f4b73fc [gn build] Port 5f300397c6 2022-08-16 01:39:36 +00:00
LLVM GN Syncbot a74b028f58 [gn build] Port 2f1fa6242a 2022-08-15 22:49:18 +00:00
Nico Weber 73f0ca806e [gn build] Try to unbreak mac after f56e486fdc 2022-08-15 18:22:08 -04:00
Rafael Auler e99490512e [test-release] Add option to build BOLT
Add a flag to enable BOLT. Should be used in x86-64 and
AArch64 linux builds only, since BOLT doesn't really support other
targets and is mostly tested on these two systems as hosts.

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D131703
2022-08-15 14:03:30 -07:00
Arthur Eubanks 6d17254df4 [gn build] Add ubsan libraries
clang -fsanitize=undefined works with this.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D131916
2022-08-15 13:55:36 -07:00
Kazu Hirata 6d9cd9199a Use llvm::all_of (NFC) 2022-08-14 16:25:36 -07:00
LLVM GN Syncbot e83408c6ee [gn build] Port 1cf81274f4 2022-08-14 17:56:25 +00:00
LLVM GN Syncbot 6b6e9d2268 [gn build] Port 7ae66e5e95 2022-08-14 08:35:03 +00:00
Nico Weber 6bb243bbdb [gn build] port 7260cdd2e1 more 2022-08-13 08:41:58 -04:00
Arthur Eubanks bd1f80f54e [llvm-reduce] Add delta pass to run IR passes
The exact IR passes run is customizable via `-ir-passes`.

Reviewed By: regehr

Differential Revision: https://reviews.llvm.org/D123749
2022-08-12 10:38:19 -07:00
Nico Weber 8b3c274efb [gn build] port 3e119c0efd (split-file move to utils/) 2022-08-12 08:20:08 -04:00
Markus Böck 3e119c0efd [llvm][CMake] Move `split-file` from tools to utils
It fittingly already makes use of add_llvm_utility during target creation and is usually only used in conjunction with other (test) related utilities such as FileCheck and not, which are already in utils.

Differential Revision: https://reviews.llvm.org/D131713
2022-08-12 14:16:48 +02:00
Nico Weber 3d53ecfc19 [gn build] port 74384c7fce 2022-08-12 08:10:16 -04:00
Nico Weber d299c033e6 [gn build] Make it possible to do PGO-optimized builds
This is fairly manual for now.

Differential Revision: https://reviews.llvm.org/D131710
2022-08-11 18:39:46 -04:00
LLVM GN Syncbot 88a521a048 [gn build] Port 9ae5896d96 2022-08-11 08:37:36 +00:00
LLVM GN Syncbot e04f8c81d5 [gn build] Port 7bece0f03b 2022-08-11 06:28:14 +00:00
LLVM GN Syncbot a5656496f0 [gn build] Port 7260cdd2e1 2022-08-11 06:28:12 +00:00
Tobias Hieta 70165c55dc
[release] Use threaded compression with xz
Use xz -T0 to use your threads

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D131470
2022-08-10 10:01:47 +02:00
Alex Richardson 9a2b14afa0 [ARM] Emit local aliases (.Lfoo$local) for functions
ARMAsmPrinter::emitFunctionEntryLabel() was not calling the base class
function so the $local alias was not being emitted. This should not have
any function effect right now since ARM does not generate different code
for the $local symbols, but it could be improved in the future.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D131392
2022-08-09 09:53:47 +00:00
Fangrui Song de9d80c1c5 [llvm] LLVM_FALLTHROUGH => [[fallthrough]]. NFC
With C++17 there is no Clang pedantic warning or MSVC C5051.
2022-08-08 11:24:15 -07:00
Nico Weber e4161e88f3 [gn build] port 59bb9e37c6 2022-08-08 14:16:30 -04:00
Simon Pilgrim 1f30ebc898 [llvm-tblgen] Fix copy+paste typo in CodeGenSchedModels::collectLoadStoreQueueInfo
Confirmed with @andreadb - repeated PM.LoadQueue->getLoc() should have been PM.StoreQueue->getLoc()

Found by coverity
2022-08-08 17:51:45 +01:00
Nico Weber cf7c8bd74e [gn build] (manually) port ace6e172bd 2022-08-07 22:02:51 -04:00
Ashay Rane d1bb3016dd
[mlir] fix `add_tablegen()` macro to allow installing mlir-pdll
Prior to this patch, the `add_tablegen()` macro in
llvm/cmake/modules/TableGen.cmake added the install rule only if
`project` matched `LLVM` or `MLIR`.  This patch adds an optional
`DESTINATION` argument, which, if non-empty, decides whether (and where)
to install the tablegen tool, thus eliminating the need for
project-specific overrides.  This patch also updates all other
invocations of the `add_tablegen()` macro.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D131282
2022-08-07 15:48:38 -07:00
Kazu Hirata a2d4501718 [llvm] Fix comment typos (NFC) 2022-08-07 00:16:14 -07:00
Nico Weber f489297501 [gn build] fix 547c551925 2022-08-06 08:36:01 -04:00