Commit Graph

1528 Commits

Author SHA1 Message Date
LLVM GN Syncbot d938e6e3c2 [gn build] Port 412cdcf2ed 2020-10-13 01:07:55 +00:00
Nico Weber 4a96b2e75f [gn build] Add libclang_rt.ios.a, libclang_rt.iossim.a to the build
It's built with just-built clang, like all other compiler-rt parts
in the GN build.

This requires adding some cross build support to the mac toolchain.

Also add explicit mmacosx-version-min and miphoneos-version-min
flags to the build.

ios.a is only built with the arm64 slice, iossim.a only with the
x86_64 slice for now. (The latter should maybe become host_cpu
when Arm Macs become a common iOS development platform.)

With this, it's possible to build chromium/iOS with a GN-built LLVM.

Differential Revision: https://reviews.llvm.org/D89260
2020-10-12 16:21:04 -04:00
LLVM GN Syncbot defd01bc59 [gn build] Port f9317f7bf6 2020-10-12 13:27:45 +00:00
LLVM GN Syncbot 5e65d384a2 [gn build] Port 0741a2c9ca 2020-10-09 13:54:24 +00:00
Nico Weber 02e4800eeb [gn build] (manually) port 9b58b0c06e better 2020-10-08 10:13:54 -04:00
Nico Weber c78fecba32 [gn build] (manually) port 9b58b0c06e 2020-10-08 10:08:45 -04:00
LLVM GN Syncbot d6af25e07c [gn build] Port ddf1864ace 2020-10-07 15:50:43 +00:00
Nico Weber fbce456fad [gn build] (manually) port ce1365f8f7 2020-10-07 10:33:51 -04:00
Nico Weber dfa70a483a [gn build] manually port 5e4409f308 2020-10-06 18:43:49 -04:00
LLVM GN Syncbot 260892dff0 [gn build] Port aa2b593f14 2020-10-06 14:49:44 +00:00
LLVM GN Syncbot 95429b88a4 [gn build] Port d6c9dc3c17 2020-10-06 12:02:07 +00:00
LLVM GN Syncbot 955b926b0b [gn build] Port 6c6cd5f8a9 2020-10-04 19:10:39 +00:00
LLVM GN Syncbot c8e73920ee [gn build] Port ace644030e 2020-10-02 23:59:59 +00:00
Arthur Eubanks 354ba1cb80 [gn build] Don't define CINDEX_EXPORTS
This causes
../../clang/include\clang-c/Platform.h(23,11): warning: 'CINDEX_EXPORTS' macro redefined [-Wmacro-redefined]
  #define CINDEX_EXPORTS
2020-10-02 10:39:49 -07:00
LLVM GN Syncbot d9e3972080 [gn build] Port 0c1bb4f885 2020-10-02 14:24:01 +00:00
Arthur Eubanks b29573b672 [gn build] Support building with ThinLTO
Differential Revision: https://reviews.llvm.org/D88584
2020-10-01 13:48:31 -07:00
LLVM GN Syncbot 56d8a37216 [gn build] Port f6b1323bc6 2020-10-01 14:18:52 +00:00
LLVM GN Syncbot 5101e7e8dd [gn build] Port d53b4bee0c 2020-10-01 12:55:59 +00:00
LLVM GN Syncbot e39d7884a1 [gn build] Port 413577a879 2020-09-30 10:09:34 +00:00
Arthur Eubanks e6e73712dd [gn build] Add missing dependency to Extensions 2020-09-29 20:12:00 -07:00
LLVM GN Syncbot 4cda881e0d [gn build] Port 6d193ba333 2020-09-29 17:50:16 +00:00
LLVM GN Syncbot 727c4223d7 [gn build] Port 54d9f743c8 2020-09-29 00:24:06 +00:00
Nico Weber d897351335 [gn build] Re-run CompletionModelCodegen when input json files change 2020-09-28 16:58:00 -04:00
LLVM GN Syncbot 31b3f32104 [gn build] Port 018066d947 2020-09-28 11:38:04 +00:00
Nico Weber 46b671a908 [gn build] update TODO 2020-09-26 12:42:50 -04:00
LLVM GN Syncbot 9112567bbd [gn build] Port e336b74c99 2020-09-25 12:13:19 +00:00
Arthur Eubanks 11a75e6c92 [gn build] Allow option to build with asan/tsan/ubsan
Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D88056
2020-09-23 11:24:38 -07:00
LLVM GN Syncbot 5ae94047bf [gn build] Port 8a64689e26 2020-09-22 18:07:36 +00:00
LLVM GN Syncbot a75f75415a [gn build] Port 848d66fafd 2020-09-22 18:07:35 +00:00
LLVM GN Syncbot 9114d6cbda [gn build] Port af582c9b0f 2020-09-22 06:47:54 +00:00
LLVM GN Syncbot 6d2bf5e3c8 [gn build] Port 4fc0214a10 2020-09-21 12:47:54 +00:00
Nico Weber 70409b2897 [gn build] Port 2124ca1d5c 2020-09-19 08:34:58 -04:00
Nico Weber ec9fb73277 [gn build] (manually) merge 2124ca1d5 2020-09-19 08:29:55 -04:00
Nico Weber 3618ac203f Revert "Revert "[gn build] (manually) port 9b6765e784b3" anf follow-ups"
This reverts commit 90fffdd0f7.
The original change relanded.
2020-09-19 08:28:38 -04:00
Nico Weber 528a1f121c [gn build] (manually) port 5495b69164 2020-09-18 21:27:49 -04:00
Nico Weber 90fffdd0f7 Revert "[gn build] (manually) port 9b6765e784b3" anf follow-ups
9b6765e784 was reverted in 549e55b3d5.

This reverts commit 442801a7b9.
This reverts commit 929d91a556.
This reverts commit 7c2d83347f.
2020-09-18 21:14:27 -04:00
Nico Weber 7c2d83347f [gn build] add file i forgot to add in 929d91a556 2020-09-18 16:01:00 -04:00
Nico Weber 929d91a556 [gn build] (manually) port 9b6765e784 more 2020-09-18 15:56:34 -04:00
Nico Weber 9b346f974e [gn build] Do not sync filenames containing variable references 2020-09-18 15:34:33 -04:00
Nico Weber 442801a7b9 [gn build] (manually) port 9b6765e784 2020-09-18 15:26:58 -04:00
LLVM GN Syncbot 667762c64e [gn build] Port 7e4c6fb854 2020-09-17 19:09:34 +00:00
Nico Weber 504697e6f4 [gn build] (manually) port c9af34027b 2020-09-17 06:33:24 -04:00
LLVM GN Syncbot 0dd4d70ec2 [gn build] Port a895040eb0 2020-09-17 03:02:00 +00:00
LLVM GN Syncbot 436a43afb2 [gn build] Port b04c1a9d31 2020-09-17 01:54:10 +00:00
Nico Weber 0c6a56e41d [gn build] (manually) port 1321160a2 2020-09-16 18:29:07 -04:00
LLVM GN Syncbot 2a078a977e [gn build] Port 56069b5c71 2020-09-16 19:03:25 +00:00
Nico Weber 15c378f6e6 [gn build] unconfuse sync script about "sources = []" in clang/lib/Headers/BUILD.gn 2020-09-16 14:50:29 -04:00
Nico Weber b3d33f5e83 [gn build] make "all" target build
If you want to build everything, building the default target
via just `ninja` is better, but `ninja all` shouldn't give you
compile errors -- this fixes that.
2020-09-16 14:21:48 -04:00
LLVM GN Syncbot 32a61531b8 [gn build] Port 3d42d54955 2020-09-15 18:32:17 +00:00
LLVM GN Syncbot c0809f8d79 [gn build] Port cd4edf94cd 2020-09-15 13:32:48 +00:00
LLVM GN Syncbot 46dc41e1ef [gn build] Port a8058c6f8d 2020-09-15 13:32:47 +00:00
Nico Weber 57752b1449 [gn build] (semi-manually) port 380e746bcc 2020-09-15 09:25:30 -04:00
Arthur Eubanks 10b12d4035 Reland [docs][NewPM] Add docs for writing NPM passes
As to not conflict with the legacy PM example passes under
llvm/lib/Transforms/Hello, this is under HelloNew. This makes the
CMakeLists.txt and general directory structure less confusing for people
following the example.

Much of the doc structure was taken from WritinAnLLVMPass.rst.

This adds a HelloWorld pass which simply prints out each function name.

More will follow after this, e.g. passes over different units of IR, analyses.
https://llvm.org/docs/WritingAnLLVMPass.html contains a lot more.

Relanded with missing "Support" dependency in LLVMBuild.txt.

Reviewed By: ychen, asbirlea

Differential Revision: https://reviews.llvm.org/D86979
2020-09-14 16:06:19 -07:00
Arthur Eubanks 39ec36415d Revert "[docs][NewPM] Add docs for writing NPM passes"
This reverts commit c2590de30d.

Breaks shared libs build
2020-09-14 15:55:17 -07:00
Arthur Eubanks c2590de30d [docs][NewPM] Add docs for writing NPM passes
As to not conflict with the legacy PM example passes under
llvm/lib/Transforms/Hello, this is under HelloNew. This makes the
CMakeLists.txt and general directory structure less confusing for people
following the example.

Much of the doc structure was taken from WritinAnLLVMPass.rst.

This adds a HelloWorld pass which simply prints out each function name.

More will follow after this, e.g. passes over different units of IR, analyses.
https://llvm.org/docs/WritingAnLLVMPass.html contains a lot more.

Reviewed By: ychen, asbirlea

Differential Revision: https://reviews.llvm.org/D86979
2020-09-14 13:26:03 -07:00
LLVM GN Syncbot 2ad38f7a46 [gn build] Port 226d80ebe2 2020-09-14 20:16:21 +00:00
LLVM GN Syncbot 119e57be76 [gn build] Port 30667c967d 2020-09-14 08:53:33 +00:00
LLVM GN Syncbot 70daa353e2 [gn build] Port cc2da5554b 2020-09-12 23:13:20 +00:00
LLVM GN Syncbot 4ede83c068 [gn build] Port 19531a81f1 2020-09-12 10:08:18 +00:00
LLVM GN Syncbot 0e0d93e2f0 [gn build] Port ad99e34c59 2020-09-12 01:54:23 +00:00
Reid Kleckner 12a281d368 [gn] Remove unneeded MC dep from llvm-tblgen
Tablegen does not have link time dependencies on MC. Having llvm-tblgen
depend on it causes it to be rebuilt in the gn build every time somebody
touches any cpp file in llvm/lib/MC* or llvm/lib/DebugInfo/Codeview*.
Touching tablegen invalidates most of the rest of the build, and
re-running it takes a while. This is is annoying for me when swapping
between branches that touch CodeView logic.

This dep was added to LLVMBuild.txt back in 2018, and presumably it was
carried over into the gn build.

Differential Revision: https://reviews.llvm.org/D87553
2020-09-11 18:28:49 -07:00
LLVM GN Syncbot c931dc0bf5 [gn build] Port 31ecf8d29d 2020-09-11 23:54:25 +00:00
Nico Weber 87494def48 [gn build] slightly improve libcxx_needs_site_config
The write_cmake_config() here still looks busted, but at least
the value that's explicitly set is now set correctly.
2020-09-11 11:32:20 -04:00
LLVM GN Syncbot de2adfaf25 [gn build] Port 8da6ae4ce1 2020-09-11 13:49:35 +00:00
LLVM GN Syncbot bbb6392c14 [gn build] Port 3eb141e507 2020-09-11 13:43:45 +00:00
Nico Weber 5692497aef [gn build] (semi-manually) port 009cd4e491 2020-09-10 15:15:59 -04:00
LLVM GN Syncbot be7cef789e [gn build] Port c01d28dc51 2020-09-10 16:54:11 +00:00
Nico Weber 29cecbc5d6 Fix clangd build after 33c9dbbd38 2020-09-10 11:05:53 -04:00
Nico Weber 33c9dbbd38 Add an explicit toggle for the static analyzer in clang-tidy
Instead of using CLANG_ENABLE_STATIC_ANALYZER for use of the
static analyzer in both clang and clang-tidy, add a second
toggle CLANG_TIDY_ENABLE_STATIC_ANALYZER.

This allows enabling the static analyzer in clang-tidy while
disabling it in clang.

Differential Revison: https://reviews.llvm.org/D87118
2020-09-10 10:48:17 -04:00
LLVM GN Syncbot 64104db59d [gn build] Port ebf496d805 2020-09-10 13:33:11 +00:00
Petr Hosek c4d7536136 [CMake] Simplify CMake handling for libxml2
This matches the changes made to handling of zlib done in 10b1b4a
where we rely on find_package and the imported target rather than
manually appending the library and include paths. The use of
LLVM_LIBXML2_ENABLED has been replaced by LLVM_ENABLE_LIBXML2
thus reducing the number of variables.

Differential Revision: https://reviews.llvm.org/D84563
2020-09-09 21:44:44 -07:00
LLVM GN Syncbot fdc8a1aac2 [gn build] Port c0e5e3fbfa 2020-09-09 07:32:57 +00:00
Nico Weber e09e1d97c1 [gn build] (manually) port 156b127945 2020-09-08 10:00:41 -04:00
LLVM GN Syncbot bb73fcfd07 [gn build] Port 23f700c785 2020-09-07 12:51:23 +00:00
LLVM GN Syncbot 9764eb9212 [gn build] Port 0478720157 2020-09-07 10:32:22 +00:00
LLVM GN Syncbot 56d1f3138b [gn build] Port 81aa66f65f 2020-09-07 10:25:26 +00:00
LLVM GN Syncbot b07cbccf28 [gn build] Port 69e5abb57b 2020-09-04 21:18:33 +00:00
Nico Weber c88a776204 [gn build] fix llvm-lit after d23b15cc16 2020-09-04 10:23:16 -04:00
LLVM GN Syncbot 952dc7f288 [gn build] Port 7fff1fbd3c 2020-09-03 20:13:38 +00:00
Arthur Eubanks e440b4933a Revert "[NewPM][Lint] Port -lint to NewPM"
This reverts commit 883399c840.
2020-09-02 21:34:29 -07:00
Arthur Eubanks 883399c840 [NewPM][Lint] Port -lint to NewPM
This also changes -lint from an analysis to a pass. It's similar to
-verify, and that is a normal pass, and lives in llvm/IR.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D87057
2020-09-02 21:13:01 -07:00
Nico Weber 1426ac0482 [gn build] Fix COMPILER_RT_HAS_* defines for libclang_rt.profile
The cmake build uses COMPILER_RT_TARGET_HAS_* in the CMakeLists.txt
but then translates it to -DCOMPILER_RT_HAS_* flags which the
c++ code checks for. So we need to define the latter, not the former.
2020-09-02 14:29:59 -04:00
LLVM GN Syncbot 293fc6c2f3 [gn build] Port 3e1e5f5449 2020-09-01 18:30:13 +00:00
LLVM GN Syncbot 1914fc9eca [gn build] Port 3d90a61cf2 2020-09-01 18:30:13 +00:00
Nico Weber ab919eed21 [gn build] port 5ffd940ac0 a bit more 2020-09-01 14:30:01 -04:00
Raphael Isemann 5ffd940ac0 Reland [FileCheck] Move FileCheck implementation out of LLVMSupport into its own library
This relands e9a3d1a401 which was originally
missing linking LLVMSupport into LLMVFileCheck which broke the SHARED_LIBS build.

Original summary:

The actual FileCheck logic seems to be implemented in LLVMSupport. I don't see a
good reason for having FileCheck implemented there as it has a very specific use
while LLVMSupport is a dependency of pretty much every LLVM tool there is. In
fact, the only use of FileCheck I could find (outside the FileCheck tool and the
FileCheck unit test) is a single call in GISelMITest.h.

This moves the FileCheck logic to its own LLVMFileCheck library. This way only
FileCheck and the GlobalISelTests now have a dependency on this code.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D86344
2020-09-01 14:59:28 +02:00
Petr Hosek 3c7bfbd683 [CMake] Use find_library for ncurses
Currently it is hard to avoid having LLVM link to the system install of
ncurses, since it uses check_library_exists to find e.g. libtinfo and
not find_library or find_package.

With this change the ncurses lib is found with find_library, which also
considers CMAKE_PREFIX_PATH. This solves an issue for the spack package
manager, where we want to use the zlib installed by spack, and spack
provides the CMAKE_PREFIX_PATH for it.

This is a similar change as https://reviews.llvm.org/D79219, which just
landed in master.

Patch By: haampie

Differential Revision: https://reviews.llvm.org/D85820
2020-08-31 20:06:21 -07:00
LLVM GN Syncbot 077238f1e1 [gn build] Port f5fd7486d6 2020-08-31 14:02:39 +00:00
LLVM GN Syncbot 04b30afed0 [gn build] Port 14dd073782 2020-08-31 14:02:39 +00:00
Raphael Isemann ed89eb3571 Revert "[FileCheck] Move FileCheck implementation out of LLVMSupport into its own library"
This reverts commit e9a3d1a401. Seems the new
FileCheck library doesn't link on some bots. Reverting for now.
2020-08-31 11:38:40 +02:00
Raphael Isemann e9a3d1a401 [FileCheck] Move FileCheck implementation out of LLVMSupport into its own library
The actual FileCheck logic seems to be implemented in LLVMSupport. I don't see a
good reason for having FileCheck implemented there as it has a very specific use
while LLVMSupport is a dependency of pretty much every LLVM tool there is. In
fact, the only use of FileCheck I could find (outside the FileCheck tool and the
FileCheck unit test) is a single call in GISelMITest.h.

This moves the FileCheck logic to its own LLVMFileCheck library. This way only
FileCheck and the GlobalISelTests now have a dependency on this code.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D86344
2020-08-31 11:24:41 +02:00
Arthur Eubanks cfde93e5d6 [ObjCARCOpt] Port objc-arc to NPM
Since doInitialization() in the legacy pass modifies the module, the NPM
pass is a Module pass.

Reviewed By: ahatanak, ychen

Differential Revision: https://reviews.llvm.org/D86178
2020-08-28 12:59:33 -07:00
LLVM GN Syncbot 73f4317ffd [gn build] Port 94faadaca4 2020-08-28 18:14:11 +00:00
LLVM GN Syncbot a5d0fd19d9 [gn build] Port b1f4e5979b 2020-08-28 05:56:49 +00:00
Harmen Stoppels cdcb9ab10e Revert "Use find_library for ncurses"
The introduction of find_library for ncurses caused more issues than it solved problems. The current open issue is it makes the static build of LLVM fail. It is better to revert for now, and get back to it later.

Revert "[CMake] Fix an issue where get_system_libname creates an empty regex capture on windows"
This reverts commit 1ed1e16ab8.

Revert "Fix msan build"
This reverts commit 34fe9613dd.

Revert "[CMake] Always mark terminfo as unavailable on Windows"
This reverts commit 76bf26236f.

Revert "[CMake] Fix OCaml build failure because of absolute path in system libs"
This reverts commit 8e4acb82f7.

Revert "[CMake] Don't look for terminfo libs when LLVM_ENABLE_TERMINFO=OFF"
This reverts commit 495f91fd33.

Revert "Use find_library for ncurses"
This reverts commit a52173a3e5.

Differential revision: https://reviews.llvm.org/D86521
2020-08-27 17:57:26 -07:00
LLVM GN Syncbot b3efa65363 [gn build] Port 7ed8124d46 2020-08-27 17:08:02 +00:00
Arthur Eubanks 897839425b [gn build] Manually port c9455d3 2020-08-27 10:05:34 -07:00
LLVM GN Syncbot 176f26f7da [gn build] Port cf918c809b 2020-08-27 05:59:55 +00:00
LLVM GN Syncbot a6b95b287f [gn build] Port 7394460d87 2020-08-27 05:59:55 +00:00
LLVM GN Syncbot ce3f26c1d0 [gn build] Port 7a457593ef 2020-08-27 01:24:30 +00:00
Arthur Eubanks 486ed88533 [ConstProp] Remove ConstantPropagation
As discussed in
http://lists.llvm.org/pipermail/llvm-dev/2020-July/143801.html.

Currently no users outside of unit tests.

Replace all instances in tests of -constprop with -instsimplify.
Notable changes in tests:
* vscale.ll - @llvm.sadd.sat.nxv16i8 is evaluated by instsimplify, use a fake intrinsic instead
* InsertElement.ll - insertelement undef is removed by instsimplify in @insertelement_undef
llvm/test/Transforms/ConstProp moved to llvm/test/Transforms/InstSimplify/ConstProp

Reviewed By: lattner, nikic

Differential Revision: https://reviews.llvm.org/D85159
2020-08-26 15:51:30 -07:00
Arthur Eubanks 1446c1801d [gn build] Manually port ed07e1fe 2020-08-26 11:30:37 -07:00
LLVM GN Syncbot fc13d3d50e [gn build] Port 357dc1ed12 2020-08-26 11:33:42 +00:00
LLVM GN Syncbot 21ad3c4738 [gn build] Port ae6f788240 2020-08-22 17:32:25 +00:00
LLVM GN Syncbot eeb4636772 [gn build] Port 20bb9fe565 2020-08-22 13:52:08 +00:00
LLVM GN Syncbot cfc76d2bce [gn build] Port fba06e3c85 2020-08-22 12:40:06 +00:00
Nico Weber 72d0f09489 [gn build] Port 57903cf093 -- https://reviews.llvm.org/rG57903cf0933 2020-08-21 12:02:30 -04:00
LLVM GN Syncbot ffadd30b31 [gn build] Port 1a995a0af3 2020-08-20 18:24:44 +00:00
LLVM GN Syncbot 9896546e8b [gn build] Port 7546b29e76 2020-08-19 03:44:19 +00:00
Arthur Eubanks a1caa30297 [gn build] Add support for expensive checks
Reviewed By: hans, MaskRay

Differential Revision: https://reviews.llvm.org/D86007
2020-08-18 09:53:39 -07:00
LLVM GN Syncbot b246bea921 [gn build] Port 00d7b7d014 2020-08-18 09:10:43 +00:00
Harmen Stoppels a52173a3e5 Use find_library for ncurses
Currently it is hard to avoid having LLVM link to the system install of
ncurses, since it uses check_library_exists to find e.g. libtinfo and
not find_library or find_package.

With this change the ncurses lib is found with find_library, which also
considers CMAKE_PREFIX_PATH. This solves an issue for the spack package
manager, where we want to use the zlib installed by spack, and spack
provides the CMAKE_PREFIX_PATH for it.

This is a similar change as https://reviews.llvm.org/D79219, which just
landed in master.

Differential revision: https://reviews.llvm.org/D85820
2020-08-17 19:52:52 -07:00
LLVM GN Syncbot cb00609de9 [gn build] Port 2f0d755d81 2020-08-17 20:30:41 +00:00
LLVM GN Syncbot e0eb4f204a [gn build] Port c1f6ce0c73 2020-08-17 12:02:24 +00:00
LLVM GN Syncbot 1bc298aa12 [gn build] Port 577e58bcc7 2020-08-16 03:17:58 +00:00
LLVM GN Syncbot 160c133be5 [gn build] Port 79298a5067 2020-08-15 16:24:37 +00:00
LLVM GN Syncbot d795f968d9 [gn build] Port 2e4a20fd70 2020-08-14 07:42:49 +00:00
Nico Weber 661d83aa38 [gn build] (manually) port d650cbc349 better 2020-08-13 15:48:03 -04:00
Nico Weber 5092039644 [gn build] (manually) port d650cbc349 2020-08-13 15:43:43 -04:00
LLVM GN Syncbot fc7f004b88 [gn build] Port d17437d2bd 2020-08-13 13:35:44 +00:00
Petr Hosek 31e5f7120b [CMake] Simplify CMake handling for zlib
Rather than handling zlib handling manually, use find_package from CMake
to find zlib properly. Use this to normalize the LLVM_ENABLE_ZLIB,
HAVE_ZLIB, HAVE_ZLIB_H. Furthermore, require zlib if LLVM_ENABLE_ZLIB is
set to YES, which requires the distributor to explicitly select whether
zlib is enabled or not. This simplifies the CMake handling and usage in
the rest of the tooling.

This is a reland of abb0075 with all followup changes and fixes that
should address issues that were reported in PR44780.

Differential Revision: https://reviews.llvm.org/D79219
2020-08-11 20:22:11 -07:00
Arthur Eubanks b9c1bd39d0 [gn build] Fix CodeGenTests
Missing dependency required by https://reviews.llvm.org/D67687.

Fixes
lld-link: error: undefined symbol: public: __cdecl llvm::PipelineTuningOptions::PipelineTuningOptions(void)
>>> referenced by C:\src\llvm-project\llvm\unittests\CodeGen\PassManagerTest.cpp:215
>>>               obj/llvm/unittests/CodeGen/CodeGenTests.PassManagerTest.obj:(private: virtual void __cdecl `anonymous namespace'::PassManagerTest_Basic_Test::TestBody(void))

Differential Revision: https://reviews.llvm.org/D85682
2020-08-11 12:31:42 -07:00
LLVM GN Syncbot a542eec462 [gn build] Port db91320a89 2020-08-11 04:32:01 +00:00
LLVM GN Syncbot a423c18462 [gn build] Port e6f8ba12e6 2020-08-11 04:24:23 +00:00
LLVM GN Syncbot 1042f079ee [gn build] Port e2d61ae573 2020-08-10 15:55:00 +00:00
Petr Hosek a4d78d23c5 Revert "[CMake] Simplify CMake handling for zlib"
This reverts commit ccbc1485b5 which
is still failing on the Windows MLIR bots.
2020-08-08 17:08:23 -07:00
Petr Hosek ccbc1485b5 [CMake] Simplify CMake handling for zlib
Rather than handling zlib handling manually, use find_package from CMake
to find zlib properly. Use this to normalize the LLVM_ENABLE_ZLIB,
HAVE_ZLIB, HAVE_ZLIB_H. Furthermore, require zlib if LLVM_ENABLE_ZLIB is
set to YES, which requires the distributor to explicitly select whether
zlib is enabled or not. This simplifies the CMake handling and usage in
the rest of the tooling.

This is a reland of abb0075 with all followup changes and fixes that
should address issues that were reported in PR44780.

Differential Revision: https://reviews.llvm.org/D79219
2020-08-08 16:44:08 -07:00
LLVM GN Syncbot ca4bcfbf2c [gn build] Port f5b5ccf2a6 2020-08-07 23:43:14 +00:00
LLVM GN Syncbot 7764b52cbd [gn build] Port 320eab2d55 2020-08-07 19:01:40 +00:00
LLVM GN Syncbot cc5f6252c7 [gn build] Port 911565d108 2020-08-07 18:22:24 +00:00
Christian Kühnel f3cc4df51d Revert "[CMake] Simplify CMake handling for zlib"
This reverts commit 1adc494bce.
This patch broke the Windows compilation on buildbot and pre-merge testing:
http://lab.llvm.org:8011/builders/mlir-windows/builds/5945
https://buildkite.com/llvm-project/llvm-master-build/builds/780
2020-08-07 09:36:49 +02:00
Mark Mentovai 92d5839297 [gn build] mac: use frameworks instead of libs where appropriate
As of GN 3028c6a426a4, the hack that transformed "libs" ending in
".framework" from -l arguments to -framework arguments has been removed.
Instead, "frameworks" must be used, and the toolchain must provide
support.

Differential Revision: https://reviews.llvm.org/D84219
2020-08-06 18:58:57 -04:00
Snehasish Kumar 8d943a928d [NFC] Rename BBSectionsPrepare -> BasicBlockSections.
Rename the BBSectionsPrepare pass as suggested by the review comment in
https://reviews.llvm.org/D85368.

Differential Revision: https://reviews.llvm.org/D85380
2020-08-06 13:12:06 -07:00
LLVM GN Syncbot dd892a33e1 [gn build] Port 820e8d8656 2020-08-05 23:35:59 +00:00
Petr Hosek 1adc494bce [CMake] Simplify CMake handling for zlib
Rather than handling zlib handling manually, use find_package from CMake
to find zlib properly. Use this to normalize the LLVM_ENABLE_ZLIB,
HAVE_ZLIB, HAVE_ZLIB_H. Furthermore, require zlib if LLVM_ENABLE_ZLIB is
set to YES, which requires the distributor to explicitly select whether
zlib is enabled or not. This simplifies the CMake handling and usage in
the rest of the tooling.

This is a reland of abb0075 with all followup changes and fixes that
should address issues that were reported in PR44780.

Differential Revision: https://reviews.llvm.org/D79219
2020-08-05 16:07:11 -07:00
Nico Weber cc26121858 [gn build] (manually) merge 3ab01550b
This reverts commit 0bbaacc8ca and
2ad56119f5 which merged 10b1b4a23
(and follow-ups), since that change was reverted in 3ab01550b.
2020-08-05 08:56:14 -04:00
Nico Weber 6a4fd03698 [gn build] (manually) merge 593e1962 2020-08-04 13:05:31 -04:00
Fangrui Song bcea3a7a28 Add test utility 'split-file'
See https://lists.llvm.org/pipermail/llvm-dev/2020-July/143373.html
"[llvm-dev] Multiple documents in one test file" for some discussions.

This patch has explored several alternatives. The current semantics are similar to
what @dblaikie proposed.
`split-file filename output` splits the input file into multiple parts separated by
regex `^(.|//)--- filename` and write each part to the file `output/filename`
(`filename` can include path separators).

Use case A (organizing input of different formats (e.g. linker
script+assembly) in one file).

```
# RUN: split-file %s %t
# RUN: llvm-mc %t/asm -o %t.o
# RUN: ld.lld -T %t/lds %t.o -o %t
This is sometimes better than the %S/Inputs/ approach because the user
can see the auxiliary files immediately and don't have to open another file.

# asm
...
# lds
...
```

Use case B (for utilities which don't have built-in input splitting
feature):

```
// RUN: split-file %s %t
// RUN: llc < %t/1.ll | FileCheck %s --check-prefix=CASE1
// RUN: llc < %t/2.ll | FileCheck %s --check-prefix=CASE2
Combing tests prudently can improve readability.
For example, when testing parsing errors if the recovery mechanism isn't possible,
grouping the tests in one file can more readily see test coverage/strategy.

//--- 1.ll
...
//--- 2.ll
...
```

Since this is a new utility, there is no git history concerns for
UpperCase variable names. I use lowerCase variable names like mlir/lld.

Reviewed By: jhenderson, lattner

Differential Revision: https://reviews.llvm.org/D83834
2020-08-03 20:42:09 -07:00
LLVM GN Syncbot c12bd8dac9 [gn build] Port f78f509c75 2020-08-03 18:05:15 +00:00
Alex Richardson d23b15cc16 Execute llvm-lit with the python found by CMake by default
The check-* targets run ${Python3_EXECUTABLE} $BUILD/bin/llvm-lit, but
running `./bin/llvm-lit $ARGS` from the build directory currently always
uses "python" to run llvm-lit. On most systems this will be python2.7 even
if we found python3 at CMake time.

Reviewed By: compnerd

Differential Revision: https://reviews.llvm.org/D84625
2020-08-03 10:51:35 +01:00
Fangrui Song c41a18cf61 [CMake] Default ENABLE_X86_RELAX_RELOCATIONS to ON
This makes clang default to -Wa,-mrelax-relocations=yes, which enables
R_386_GOT32X (GNU as enables it regardless of -mrelax-relocations=) and
R_X86_64_[REX_]GOTPCRELX in MC. The produced object files require GNU ld>=2.26
to link. binutils 2.26 is considered a very old release today.
2020-08-02 23:06:31 -07:00
LLVM GN Syncbot 5a4cd55e5d [gn build] Port 160ff83765 2020-08-03 05:55:14 +00:00
Florian Hahn 599955eb56 Recommit "[IPConstProp] Remove and move tests to SCCP."
This reverts commit 59d6e814ce.

The cause for the revert (3 clang tests running opt -ipconstprop) was
fixed by removing those lines.
2020-08-02 22:23:54 +01:00
LLVM GN Syncbot 09746fbfb9 [gn build] Port b7cfa6ca92 2020-07-31 18:32:54 +00:00
LLVM GN Syncbot c75c7d5196 [gn build] Port df69492cdf 2020-07-31 16:23:24 +00:00
Nico Weber 2da9b44415 [gn build] (manually) merge 63d3aeb529 2020-07-31 09:54:39 -04:00
LLVM GN Syncbot b811736f8b [gn build] Port 763671f387 2020-07-30 22:29:22 +00:00
Florian Hahn 59d6e814ce Revert "[IPConstProp] Remove and move tests to SCCP."
This reverts commit e77624a3be.

Looks like some clang tests manually invoke -ipconstprop via opt.....
2020-07-30 13:06:54 +01:00
Florian Hahn e77624a3be [IPConstProp] Remove and move tests to SCCP.
As far as I know, ipconstprop has not been used in years and ipsccp has
been used instead. This has the potential for confusion and sometimes
leads people to spend time finding & reporting bugs as well as
updating it to work with the latest API changes.

This patch moves the tests over to SCCP. There's one functional difference
I am aware of: ipconstprop propagates for each call-site individually, so
for functions that are called with different constant arguments it can sometimes
produce better results than ipsccp (at much higher compile-time cost).But
IPSCCP can be thought to do so as well for internal functions and as mentioned
earlier, the pass seems unused in practice (and there are no plans on working
towards enabling it anytime).

Also discussed on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2020-July/143773.html

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D84447
2020-07-30 12:36:27 +01:00
LLVM GN Syncbot 0c4ea27510 [gn build] Port 276f9e8cfa 2020-07-29 17:37:10 +00:00